UNPKG

@graphql-yoga/graphiql

Version:

This the GraphiQL used by GraphQL Yoga. This package is currently not published to npm and only contains the React component `GraphQLYoga`.

56,267 lines 1.89 MB
var BV = Object.defineProperty;
var qV = (e, t, n) => t in e ? BV(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
var RO = (e, t, n) => (qV(e, typeof t != "symbol" ? t + "" : t, n), n);
function zV(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" }));
}
var Qd = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function is(e) {
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
}
function HV(e) {
  if (e.__esModule)
    return e;
  var t = e.default;
  if (typeof t == "function") {
    var n = function r() {
      return this instanceof r ? Reflect.construct(t, arguments, this.constructor) : t.apply(this, arguments);
    };
    n.prototype = t.prototype;
  } else
    n = {};
  return Object.defineProperty(n, "__esModule", { value: !0 }), Object.keys(e).forEach(function(r) {
    var o = Object.getOwnPropertyDescriptor(e, r);
    Object.defineProperty(n, r, o.get ? o : {
      enumerable: !0,
      get: function() {
        return e[r];
      }
    });
  }), n;
}
var IR = { exports: {} }, Q0 = {}, LR = { exports: {} }, gt = {};
/**
 * @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 dh = Symbol.for("react.element"), WV = Symbol.for("react.portal"), GV = Symbol.for("react.fragment"), QV = Symbol.for("react.strict_mode"), YV = Symbol.for("react.profiler"), KV = Symbol.for("react.provider"), JV = Symbol.for("react.context"), XV = Symbol.for("react.forward_ref"), ZV = Symbol.for("react.suspense"), e7 = Symbol.for("react.memo"), t7 = Symbol.for("react.lazy"), FO = Symbol.iterator;
function n7(e) {
  return e === null || typeof e != "object" ? null : (e = FO && e[FO] || e["@@iterator"], typeof e == "function" ? e : null);
}
var RR = { isMounted: function() {
  return !1;
}, enqueueForceUpdate: function() {
}, enqueueReplaceState: function() {
}, enqueueSetState: function() {
} }, FR = Object.assign, MR = {};
function _f(e, t, n) {
  this.props = e, this.context = t, this.refs = MR, this.updater = n || RR;
}
_f.prototype.isReactComponent = {};
_f.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");
};
_f.prototype.forceUpdate = function(e) {
  this.updater.enqueueForceUpdate(this, e, "forceUpdate");
};
function PR() {
}
PR.prototype = _f.prototype;
function aT(e, t, n) {
  this.props = e, this.context = t, this.refs = MR, this.updater = n || RR;
}
var lT = aT.prototype = new PR();
lT.constructor = aT;
FR(lT, _f.prototype);
lT.isPureReactComponent = !0;
var MO = Array.isArray, $R = Object.prototype.hasOwnProperty, cT = { current: null }, VR = { key: !0, ref: !0, __self: !0, __source: !0 };
function jR(e, t, n) {
  var r, o = {}, i = null, s = null;
  if (t != null)
    for (r in t.ref !== void 0 && (s = t.ref), t.key !== void 0 && (i = "" + t.key), t)
      $R.call(t, r) && !VR.hasOwnProperty(r) && (o[r] = t[r]);
  var l = arguments.length - 2;
  if (l === 1)
    o.children = n;
  else if (1 < l) {
    for (var c = Array(l), f = 0; f < l; f++)
      c[f] = arguments[f + 2];
    o.children = c;
  }
  if (e && e.defaultProps)
    for (r in l = e.defaultProps, l)
      o[r] === void 0 && (o[r] = l[r]);
  return { $$typeof: dh, type: e, key: i, ref: s, props: o, _owner: cT.current };
}
function r7(e, t) {
  return { $$typeof: dh, type: e.type, key: t, ref: e.ref, props: e.props, _owner: e._owner };
}
function uT(e) {
  return typeof e == "object" && e !== null && e.$$typeof === dh;
}
function o7(e) {
  var t = { "=": "=0", ":": "=2" };
  return "$" + e.replace(/[=:]/g, function(n) {
    return t[n];
  });
}
var PO = /\/+/g;
function wE(e, t) {
  return typeof e == "object" && e !== null && e.key != null ? o7("" + e.key) : t.toString(36);
}
function Vg(e, t, n, r, o) {
  var i = typeof e;
  (i === "undefined" || i === "boolean") && (e = null);
  var s = !1;
  if (e === null)
    s = !0;
  else
    switch (i) {
      case "string":
      case "number":
        s = !0;
        break;
      case "object":
        switch (e.$$typeof) {
          case dh:
          case WV:
            s = !0;
        }
    }
  if (s)
    return s = e, o = o(s), e = r === "" ? "." + wE(s, 0) : r, MO(o) ? (n = "", e != null && (n = e.replace(PO, "$&/") + "/"), Vg(o, t, n, "", function(f) {
      return f;
    })) : o != null && (uT(o) && (o = r7(o, n + (!o.key || s && s.key === o.key ? "" : ("" + o.key).replace(PO, "$&/") + "/") + e)), t.push(o)), 1;
  if (s = 0, r = r === "" ? "." : r + ":", MO(e))
    for (var l = 0; l < e.length; l++) {
      i = e[l];
      var c = r + wE(i, l);
      s += Vg(i, t, n, c, o);
    }
  else if (c = n7(e), typeof c == "function")
    for (e = c.call(e), l = 0; !(i = e.next()).done; )
      i = i.value, c = r + wE(i, l++), s += Vg(i, t, n, c, 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 s;
}
function Bm(e, t, n) {
  if (e == null)
    return e;
  var r = [], o = 0;
  return Vg(e, r, "", "", function(i) {
    return t.call(n, i, o++);
  }), r;
}
function i7(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 Qr = { current: null }, jg = { transition: null }, s7 = { ReactCurrentDispatcher: Qr, ReactCurrentBatchConfig: jg, ReactCurrentOwner: cT };
gt.Children = { map: Bm, forEach: function(e, t, n) {
  Bm(e, function() {
    t.apply(this, arguments);
  }, n);
}, count: function(e) {
  var t = 0;
  return Bm(e, function() {
    t++;
  }), t;
}, toArray: function(e) {
  return Bm(e, function(t) {
    return t;
  }) || [];
}, only: function(e) {
  if (!uT(e))
    throw Error("React.Children.only expected to receive a single React element child.");
  return e;
} };
gt.Component = _f;
gt.Fragment = GV;
gt.Profiler = YV;
gt.PureComponent = aT;
gt.StrictMode = QV;
gt.Suspense = ZV;
gt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = s7;
gt.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 = FR({}, e.props), o = e.key, i = e.ref, s = e._owner;
  if (t != null) {
    if (t.ref !== void 0 && (i = t.ref, s = cT.current), t.key !== void 0 && (o = "" + t.key), e.type && e.type.defaultProps)
      var l = e.type.defaultProps;
    for (c in t)
      $R.call(t, c) && !VR.hasOwnProperty(c) && (r[c] = t[c] === void 0 && l !== void 0 ? l[c] : t[c]);
  }
  var c = arguments.length - 2;
  if (c === 1)
    r.children = n;
  else if (1 < c) {
    l = Array(c);
    for (var f = 0; f < c; f++)
      l[f] = arguments[f + 2];
    r.children = l;
  }
  return { $$typeof: dh, type: e.type, key: o, ref: i, props: r, _owner: s };
};
gt.createContext = function(e) {
  return e = { $$typeof: JV, _currentValue: e, _currentValue2: e, _threadCount: 0, Provider: null, Consumer: null, _defaultValue: null, _globalName: null }, e.Provider = { $$typeof: KV, _context: e }, e.Consumer = e;
};
gt.createElement = jR;
gt.createFactory = function(e) {
  var t = jR.bind(null, e);
  return t.type = e, t;
};
gt.createRef = function() {
  return { current: null };
};
gt.forwardRef = function(e) {
  return { $$typeof: XV, render: e };
};
gt.isValidElement = uT;
gt.lazy = function(e) {
  return { $$typeof: t7, _payload: { _status: -1, _result: e }, _init: i7 };
};
gt.memo = function(e, t) {
  return { $$typeof: e7, type: e, compare: t === void 0 ? null : t };
};
gt.startTransition = function(e) {
  var t = jg.transition;
  jg.transition = {};
  try {
    e();
  } finally {
    jg.transition = t;
  }
};
gt.unstable_act = function() {
  throw Error("act(...) is not supported in production builds of React.");
};
gt.useCallback = function(e, t) {
  return Qr.current.useCallback(e, t);
};
gt.useContext = function(e) {
  return Qr.current.useContext(e);
};
gt.useDebugValue = function() {
};
gt.useDeferredValue = function(e) {
  return Qr.current.useDeferredValue(e);
};
gt.useEffect = function(e, t) {
  return Qr.current.useEffect(e, t);
};
gt.useId = function() {
  return Qr.current.useId();
};
gt.useImperativeHandle = function(e, t, n) {
  return Qr.current.useImperativeHandle(e, t, n);
};
gt.useInsertionEffect = function(e, t) {
  return Qr.current.useInsertionEffect(e, t);
};
gt.useLayoutEffect = function(e, t) {
  return Qr.current.useLayoutEffect(e, t);
};
gt.useMemo = function(e, t) {
  return Qr.current.useMemo(e, t);
};
gt.useReducer = function(e, t, n) {
  return Qr.current.useReducer(e, t, n);
};
gt.useRef = function(e) {
  return Qr.current.useRef(e);
};
gt.useState = function(e) {
  return Qr.current.useState(e);
};
gt.useSyncExternalStore = function(e, t, n) {
  return Qr.current.useSyncExternalStore(e, t, n);
};
gt.useTransition = function() {
  return Qr.current.useTransition();
};
gt.version = "18.2.0";
LR.exports = gt;
var k = LR.exports;
const ce = /* @__PURE__ */ is(k), Ww = /* @__PURE__ */ zV({
  __proto__: null,
  default: ce
}, [k]);
/**
 * @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 a7 = k, l7 = Symbol.for("react.element"), c7 = Symbol.for("react.fragment"), u7 = Object.prototype.hasOwnProperty, f7 = a7.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, d7 = { key: !0, ref: !0, __self: !0, __source: !0 };
function UR(e, t, n) {
  var r, o = {}, i = null, s = null;
  n !== void 0 && (i = "" + n), t.key !== void 0 && (i = "" + t.key), t.ref !== void 0 && (s = t.ref);
  for (r in t)
    u7.call(t, r) && !d7.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: l7, type: e, key: i, ref: s, props: o, _owner: f7.current };
}
Q0.Fragment = c7;
Q0.jsx = UR;
Q0.jsxs = UR;
IR.exports = Q0;
var W = IR.exports, BR = { exports: {} }, Oo = {}, qR = { exports: {} }, zR = {};
/**
 * @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(Y, K) {
    var Z = Y.length;
    Y.push(K);
    e:
      for (; 0 < Z; ) {
        var re = Z - 1 >>> 1, J = Y[re];
        if (0 < o(J, K))
          Y[re] = K, Y[Z] = J, Z = re;
        else
          break e;
      }
  }
  function n(Y) {
    return Y.length === 0 ? null : Y[0];
  }
  function r(Y) {
    if (Y.length === 0)
      return null;
    var K = Y[0], Z = Y.pop();
    if (Z !== K) {
      Y[0] = Z;
      e:
        for (var re = 0, J = Y.length, ie = J >>> 1; re < ie; ) {
          var ne = 2 * (re + 1) - 1, ae = Y[ne], le = ne + 1, de = Y[le];
          if (0 > o(ae, Z))
            le < J && 0 > o(de, ae) ? (Y[re] = de, Y[le] = Z, re = le) : (Y[re] = ae, Y[ne] = Z, re = ne);
          else if (le < J && 0 > o(de, Z))
            Y[re] = de, Y[le] = Z, re = le;
          else
            break e;
        }
    }
    return K;
  }
  function o(Y, K) {
    var Z = Y.sortIndex - K.sortIndex;
    return Z !== 0 ? Z : Y.id - K.id;
  }
  if (typeof performance == "object" && typeof performance.now == "function") {
    var i = performance;
    e.unstable_now = function() {
      return i.now();
    };
  } else {
    var s = Date, l = s.now();
    e.unstable_now = function() {
      return s.now() - l;
    };
  }
  var c = [], f = [], d = 1, g = null, m = 3, v = !1, b = !1, w = !1, _ = typeof setTimeout == "function" ? setTimeout : null, S = 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 C(Y) {
    for (var K = n(f); K !== null; ) {
      if (K.callback === null)
        r(f);
      else if (K.startTime <= Y)
        r(f), K.sortIndex = K.expirationTime, t(c, K);
      else
        break;
      K = n(f);
    }
  }
  function E(Y) {
    if (w = !1, C(Y), !b)
      if (n(c) !== null)
        b = !0, te(N);
      else {
        var K = n(f);
        K !== null && Q(E, K.startTime - Y);
      }
  }
  function N(Y, K) {
    b = !1, w && (w = !1, S(A), A = -1), v = !0;
    var Z = m;
    try {
      for (C(K), g = n(c); g !== null && (!(g.expirationTime > K) || Y && !q()); ) {
        var re = g.callback;
        if (typeof re == "function") {
          g.callback = null, m = g.priorityLevel;
          var J = re(g.expirationTime <= K);
          K = e.unstable_now(), typeof J == "function" ? g.callback = J : g === n(c) && r(c), C(K);
        } else
          r(c);
        g = n(c);
      }
      if (g !== null)
        var ie = !0;
      else {
        var ne = n(f);
        ne !== null && Q(E, ne.startTime - K), ie = !1;
      }
      return ie;
    } finally {
      g = null, m = Z, v = !1;
    }
  }
  var I = !1, D = null, A = -1, F = 5, $ = -1;
  function q() {
    return !(e.unstable_now() - $ < F);
  }
  function H() {
    if (D !== null) {
      var Y = e.unstable_now();
      $ = Y;
      var K = !0;
      try {
        K = D(!0, Y);
      } finally {
        K ? z() : (I = !1, D = null);
      }
    } else
      I = !1;
  }
  var z;
  if (typeof x == "function")
    z = function() {
      x(H);
    };
  else if (typeof MessageChannel < "u") {
    var B = new MessageChannel(), R = B.port2;
    B.port1.onmessage = H, z = function() {
      R.postMessage(null);
    };
  } else
    z = function() {
      _(H, 0);
    };
  function te(Y) {
    D = Y, I || (I = !0, z());
  }
  function Q(Y, K) {
    A = _(function() {
      Y(e.unstable_now());
    }, K);
  }
  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(Y) {
    Y.callback = null;
  }, e.unstable_continueExecution = function() {
    b || v || (b = !0, te(N));
  }, e.unstable_forceFrameRate = function(Y) {
    0 > Y || 125 < Y ? console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported") : F = 0 < Y ? Math.floor(1e3 / Y) : 5;
  }, e.unstable_getCurrentPriorityLevel = function() {
    return m;
  }, e.unstable_getFirstCallbackNode = function() {
    return n(c);
  }, e.unstable_next = function(Y) {
    switch (m) {
      case 1:
      case 2:
      case 3:
        var K = 3;
        break;
      default:
        K = m;
    }
    var Z = m;
    m = K;
    try {
      return Y();
    } finally {
      m = Z;
    }
  }, e.unstable_pauseExecution = function() {
  }, e.unstable_requestPaint = function() {
  }, e.unstable_runWithPriority = function(Y, K) {
    switch (Y) {
      case 1:
      case 2:
      case 3:
      case 4:
      case 5:
        break;
      default:
        Y = 3;
    }
    var Z = m;
    m = Y;
    try {
      return K();
    } finally {
      m = Z;
    }
  }, e.unstable_scheduleCallback = function(Y, K, Z) {
    var re = e.unstable_now();
    switch (typeof Z == "object" && Z !== null ? (Z = Z.delay, Z = typeof Z == "number" && 0 < Z ? re + Z : re) : Z = re, Y) {
      case 1:
        var J = -1;
        break;
      case 2:
        J = 250;
        break;
      case 5:
        J = 1073741823;
        break;
      case 4:
        J = 1e4;
        break;
      default:
        J = 5e3;
    }
    return J = Z + J, Y = { id: d++, callback: K, priorityLevel: Y, startTime: Z, expirationTime: J, sortIndex: -1 }, Z > re ? (Y.sortIndex = Z, t(f, Y), n(c) === null && Y === n(f) && (w ? (S(A), A = -1) : w = !0, Q(E, Z - re))) : (Y.sortIndex = J, t(c, Y), b || v || (b = !0, te(N))), Y;
  }, e.unstable_shouldYield = q, e.unstable_wrapCallback = function(Y) {
    var K = m;
    return function() {
      var Z = m;
      m = K;
      try {
        return Y.apply(this, arguments);
      } finally {
        m = Z;
      }
    };
  };
})(zR);
qR.exports = zR;
var p7 = qR.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 HR = k, So = p7;
function _e(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 WR = /* @__PURE__ */ new Set(), vp = {};
function Nc(e, t) {
  ff(e, t), ff(e + "Capture", t);
}
function ff(e, t) {
  for (vp[e] = t, e = 0; e < t.length; e++)
    WR.add(t[e]);
}
var Ls = !(typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u"), Gw = Object.prototype.hasOwnProperty, h7 = /^[: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]*$/, $O = {}, VO = {};
function m7(e) {
  return Gw.call(VO, e) ? !0 : Gw.call($O, e) ? !1 : h7.test(e) ? VO[e] = !0 : ($O[e] = !0, !1);
}
function g7(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 v7(e, t, n, r) {
  if (t === null || typeof t > "u" || g7(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 Yr(e, t, n, r, o, i, s) {
  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 = s;
}
var ur = {};
"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e) {
  ur[e] = new Yr(e, 0, !1, e, null, !1, !1);
});
[["acceptCharset", "accept-charset"], ["className", "class"], ["htmlFor", "for"], ["httpEquiv", "http-equiv"]].forEach(function(e) {
  var t = e[0];
  ur[t] = new Yr(t, 1, !1, e[1], null, !1, !1);
});
["contentEditable", "draggable", "spellCheck", "value"].forEach(function(e) {
  ur[e] = new Yr(e, 2, !1, e.toLowerCase(), null, !1, !1);
});
["autoReverse", "externalResourcesRequired", "focusable", "preserveAlpha"].forEach(function(e) {
  ur[e] = new Yr(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) {
  ur[e] = new Yr(e, 3, !1, e.toLowerCase(), null, !1, !1);
});
["checked", "multiple", "muted", "selected"].forEach(function(e) {
  ur[e] = new Yr(e, 3, !0, e, null, !1, !1);
});
["capture", "download"].forEach(function(e) {
  ur[e] = new Yr(e, 4, !1, e, null, !1, !1);
});
["cols", "rows", "size", "span"].forEach(function(e) {
  ur[e] = new Yr(e, 6, !1, e, null, !1, !1);
});
["rowSpan", "start"].forEach(function(e) {
  ur[e] = new Yr(e, 5, !1, e.toLowerCase(), null, !1, !1);
});
var fT = /[\-:]([a-z])/g;
function dT(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(
    fT,
    dT
  );
  ur[t] = new Yr(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(fT, dT);
  ur[t] = new Yr(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(fT, dT);
  ur[t] = new Yr(t, 1, !1, e, "http://www.w3.org/XML/1998/namespace", !1, !1);
});
["tabIndex", "crossOrigin"].forEach(function(e) {
  ur[e] = new Yr(e, 1, !1, e.toLowerCase(), null, !1, !1);
});
ur.xlinkHref = new Yr("xlinkHref", 1, !1, "xlink:href", "http://www.w3.org/1999/xlink", !0, !1);
["src", "href", "action", "formAction"].forEach(function(e) {
  ur[e] = new Yr(e, 1, !1, e.toLowerCase(), null, !0, !0);
});
function pT(e, t, n, r) {
  var o = ur.hasOwnProperty(t) ? ur[t] : null;
  (o !== null ? o.type !== 0 : r || !(2 < t.length) || t[0] !== "o" && t[0] !== "O" || t[1] !== "n" && t[1] !== "N") && (v7(t, n, o, r) && (n = null), r || o === null ? m7(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 Ys = HR.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, qm = Symbol.for("react.element"), Ru = Symbol.for("react.portal"), Fu = Symbol.for("react.fragment"), hT = Symbol.for("react.strict_mode"), Qw = Symbol.for("react.profiler"), GR = Symbol.for("react.provider"), QR = Symbol.for("react.context"), mT = Symbol.for("react.forward_ref"), Yw = Symbol.for("react.suspense"), Kw = Symbol.for("react.suspense_list"), gT = Symbol.for("react.memo"), wa = Symbol.for("react.lazy"), YR = Symbol.for("react.offscreen"), jO = Symbol.iterator;
function kd(e) {
  return e === null || typeof e != "object" ? null : (e = jO && e[jO] || e["@@iterator"], typeof e == "function" ? e : null);
}
var cn = Object.assign, xE;
function $d(e) {
  if (xE === void 0)
    try {
      throw Error();
    } catch (n) {
      var t = n.stack.trim().match(/\n( *(at )?)/);
      xE = t && t[1] || "";
    }
  return `
` + xE + e;
}
var SE = !1;
function TE(e, t) {
  if (!e || SE)
    return "";
  SE = !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 (f) {
          var r = f;
        }
        Reflect.construct(e, [], t);
      } else {
        try {
          t.call();
        } catch (f) {
          r = f;
        }
        e.call(t.prototype);
      }
    else {
      try {
        throw Error();
      } catch (f) {
        r = f;
      }
      e();
    }
  } catch (f) {
    if (f && r && typeof f.stack == "string") {
      for (var o = f.stack.split(`
`), i = r.stack.split(`
`), s = o.length - 1, l = i.length - 1; 1 <= s && 0 <= l && o[s] !== i[l]; )
        l--;
      for (; 1 <= s && 0 <= l; s--, l--)
        if (o[s] !== i[l]) {
          if (s !== 1 || l !== 1)
            do
              if (s--, l--, 0 > l || o[s] !== i[l]) {
                var c = `
` + o[s].replace(" at new ", " at ");
                return e.displayName && c.includes("<anonymous>") && (c = c.replace("<anonymous>", e.displayName)), c;
              }
            while (1 <= s && 0 <= l);
          break;
        }
    }
  } finally {
    SE = !1, Error.prepareStackTrace = n;
  }
  return (e = e ? e.displayName || e.name : "") ? $d(e) : "";
}
function y7(e) {
  switch (e.tag) {
    case 5:
      return $d(e.type);
    case 16:
      return $d("Lazy");
    case 13:
      return $d("Suspense");
    case 19:
      return $d("SuspenseList");
    case 0:
    case 2:
    case 15:
      return e = TE(e.type, !1), e;
    case 11:
      return e = TE(e.type.render, !1), e;
    case 1:
      return e = TE(e.type, !0), e;
    default:
      return "";
  }
}
function Jw(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 Fu:
      return "Fragment";
    case Ru:
      return "Portal";
    case Qw:
      return "Profiler";
    case hT:
      return "StrictMode";
    case Yw:
      return "Suspense";
    case Kw:
      return "SuspenseList";
  }
  if (typeof e == "object")
    switch (e.$$typeof) {
      case QR:
        return (e.displayName || "Context") + ".Consumer";
      case GR:
        return (e._context.displayName || "Context") + ".Provider";
      case mT:
        var t = e.render;
        return e = e.displayName, e || (e = t.displayName || t.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
      case gT:
        return t = e.displayName || null, t !== null ? t : Jw(e.type) || "Memo";
      case wa:
        t = e._payload, e = e._init;
        try {
          return Jw(e(t));
        } catch {
        }
    }
  return null;
}
function b7(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 Jw(t);
    case 8:
      return t === hT ? "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 Ha(e) {
  switch (typeof e) {
    case "boolean":
    case "number":
    case "string":
    case "undefined":
      return e;
    case "object":
      return e;
    default:
      return "";
  }
}
function KR(e) {
  var t = e.type;
  return (e = e.nodeName) && e.toLowerCase() === "input" && (t === "checkbox" || t === "radio");
}
function E7(e) {
  var t = KR(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(s) {
      r = "" + s, i.call(this, s);
    } }), Object.defineProperty(e, t, { enumerable: n.enumerable }), { getValue: function() {
      return r;
    }, setValue: function(s) {
      r = "" + s;
    }, stopTracking: function() {
      e._valueTracker = null, delete e[t];
    } };
  }
}
function zm(e) {
  e._valueTracker || (e._valueTracker = E7(e));
}
function JR(e) {
  if (!e)
    return !1;
  var t = e._valueTracker;
  if (!t)
    return !0;
  var n = t.getValue(), r = "";
  return e && (r = KR(e) ? e.checked ? "true" : "false" : e.value), e = r, e !== n ? (t.setValue(e), !0) : !1;
}
function gv(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 Xw(e, t) {
  var n = t.checked;
  return cn({}, t, { defaultChecked: void 0, defaultValue: void 0, value: void 0, checked: n ?? e._wrapperState.initialChecked });
}
function UO(e, t) {
  var n = t.defaultValue == null ? "" : t.defaultValue, r = t.checked != null ? t.checked : t.defaultChecked;
  n = Ha(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 XR(e, t) {
  t = t.checked, t != null && pT(e, "checked", t, !1);
}
function Zw(e, t) {
  XR(e, t);
  var n = Ha(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") ? ex(e, t.type, n) : t.hasOwnProperty("defaultValue") && ex(e, t.type, Ha(t.defaultValue)), t.checked == null && t.defaultChecked != null && (e.defaultChecked = !!t.defaultChecked);
}
function BO(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 ex(e, t, n) {
  (t !== "number" || gv(e.ownerDocument) !== e) && (n == null ? e.defaultValue = "" + e._wrapperState.initialValue : e.defaultValue !== "" + n && (e.defaultValue = "" + n));
}
var Vd = Array.isArray;
function Ju(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 = "" + Ha(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 tx(e, t) {
  if (t.dangerouslySetInnerHTML != null)
    throw Error(_e(91));
  return cn({}, t, { value: void 0, defaultValue: void 0, children: "" + e._wrapperState.initialValue });
}
function qO(e, t) {
  var n = t.value;
  if (n == null) {
    if (n = t.children, t = t.defaultValue, n != null) {
      if (t != null)
        throw Error(_e(92));
      if (Vd(n)) {
        if (1 < n.length)
          throw Error(_e(93));
        n = n[0];
      }
      t = n;
    }
    t == null && (t = ""), n = t;
  }
  e._wrapperState = { initialValue: Ha(n) };
}
function ZR(e, t) {
  var n = Ha(t.value), r = Ha(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 zO(e) {
  var t = e.textContent;
  t === e._wrapperState.initialValue && t !== "" && t !== null && (e.value = t);
}
function eF(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 nx(e, t) {
  return e == null || e === "http://www.w3.org/1999/xhtml" ? eF(t) : e === "http://www.w3.org/2000/svg" && t === "foreignObject" ? "http://www.w3.org/1999/xhtml" : e;
}
var Hm, tF = 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 (Hm = Hm || document.createElement("div"), Hm.innerHTML = "<svg>" + t.valueOf().toString() + "</svg>", t = Hm.firstChild; e.firstChild; )
      e.removeChild(e.firstChild);
    for (; t.firstChild; )
      e.appendChild(t.firstChild);
  }
});
function yp(e, t) {
  if (t) {
    var n = e.firstChild;
    if (n && n === e.lastChild && n.nodeType === 3) {
      n.nodeValue = t;
      return;
    }
  }
  e.textContent = t;
}
var Yd = {
  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
}, w7 = ["Webkit", "ms", "Moz", "O"];
Object.keys(Yd).forEach(function(e) {
  w7.forEach(function(t) {
    t = t + e.charAt(0).toUpperCase() + e.substring(1), Yd[t] = Yd[e];
  });
});
function nF(e, t, n) {
  return t == null || typeof t == "boolean" || t === "" ? "" : n || typeof t != "number" || t === 0 || Yd.hasOwnProperty(e) && Yd[e] ? ("" + t).trim() : t + "px";
}
function rF(e, t) {
  e = e.style;
  for (var n in t)
    if (t.hasOwnProperty(n)) {
      var r = n.indexOf("--") === 0, o = nF(n, t[n], r);
      n === "float" && (n = "cssFloat"), r ? e.setProperty(n, o) : e[n] = o;
    }
}
var x7 = cn({ 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 rx(e, t) {
  if (t) {
    if (x7[e] && (t.children != null || t.dangerouslySetInnerHTML != null))
      throw Error(_e(137, e));
    if (t.dangerouslySetInnerHTML != null) {
      if (t.children != null)
        throw Error(_e(60));
      if (typeof t.dangerouslySetInnerHTML != "object" || !("__html" in t.dangerouslySetInnerHTML))
        throw Error(_e(61));
    }
    if (t.style != null && typeof t.style != "object")
      throw Error(_e(62));
  }
}
function ox(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 ix = null;
function vT(e) {
  return e = e.target || e.srcElement || window, e.correspondingUseElement && (e = e.correspondingUseElement), e.nodeType === 3 ? e.parentNode : e;
}
var sx = null, Xu = null, Zu = null;
function HO(e) {
  if (e = mh(e)) {
    if (typeof sx != "function")
      throw Error(_e(280));
    var t = e.stateNode;
    t && (t = Z0(t), sx(e.stateNode, e.type, t));
  }
}
function oF(e) {
  Xu ? Zu ? Zu.push(e) : Zu = [e] : Xu = e;
}
function iF() {
  if (Xu) {
    var e = Xu, t = Zu;
    if (Zu = Xu = null, HO(e), t)
      for (e = 0; e < t.length; e++)
        HO(t[e]);
  }
}
function sF(e, t) {
  return e(t);
}
function aF() {
}
var CE = !1;
function lF(e, t, n) {
  if (CE)
    return e(t, n);
  CE = !0;
  try {
    return sF(e, t, n);
  } finally {
    CE = !1, (Xu !== null || Zu !== null) && (aF(), iF());
  }
}
function bp(e, t) {
  var n = e.stateNode;
  if (n === null)
    return null;
  var r = Z0(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(_e(231, t, typeof n));
  return n;
}
var ax = !1;
if (Ls)
  try {
    var _d = {};
    Object.defineProperty(_d, "passive", { get: function() {
      ax = !0;
    } }), window.addEventListener("test", _d, _d), window.removeEventListener("test", _d, _d);
  } catch {
    ax = !1;
  }
function S7(e, t, n, r, o, i, s, l, c) {
  var f = Array.prototype.slice.call(arguments, 3);
  try {
    t.apply(n, f);
  } catch (d) {
    this.onError(d);
  }
}
var Kd = !1, vv = null, yv = !1, lx = null, T7 = { onError: function(e) {
  Kd = !0, vv = e;
} };
function C7(e, t, n, r, o, i, s, l, c) {
  Kd = !1, vv = null, S7.apply(T7, arguments);
}
function k7(e, t, n, r, o, i, s, l, c) {
  if (C7.apply(this, arguments), Kd) {
    if (Kd) {
      var f = vv;
      Kd = !1, vv = null;
    } else
      throw Error(_e(198));
    yv || (yv = !0, lx = f);
  }
}
function Oc(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 cF(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 WO(e) {
  if (Oc(e) !== e)
    throw Error(_e(188));
}
function _7(e) {
  var t = e.alternate;
  if (!t) {
    if (t = Oc(e), t === null)
      throw Error(_e(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 WO(o), e;
        if (i === r)
          return WO(o), t;
        i = i.sibling;
      }
      throw Error(_e(188));
    }
    if (n.return !== r.return)
      n = o, r = i;
    else {
      for (var s = !1, l = o.child; l; ) {
        if (l === n) {
          s = !0, n = o, r = i;
          break;
        }
        if (l === r) {
          s = !0, r = o, n = i;
          break;
        }
        l = l.sibling;
      }
      if (!s) {
        for (l = i.child; l; ) {
          if (l === n) {
            s = !0, n = i, r = o;
            break;
          }
          if (l === r) {
            s = !0, r = i, n = o;
            break;
          }
          l = l.sibling;
        }
        if (!s)
          throw Error(_e(189));
      }
    }
    if (n.alternate !== r)
      throw Error(_e(190));
  }
  if (n.tag !== 3)
    throw Error(_e(188));
  return n.stateNode.current === n ? e : t;
}
function uF(e) {
  return e = _7(e), e !== null ? fF(e) : null;
}
function fF(e) {
  if (e.tag === 5 || e.tag === 6)
    return e;
  for (e = e.child; e !== null; ) {
    var t = fF(e);
    if (t !== null)
      return t;
    e = e.sibling;
  }
  return null;
}
var dF = So.unstable_scheduleCallback, GO = So.unstable_cancelCallback, N7 = So.unstable_shouldYield, O7 = So.unstable_requestPaint, bn = So.unstable_now, A7 = So.unstable_getCurrentPriorityLevel, yT = So.unstable_ImmediatePriority, pF = So.unstable_UserBlockingPriority, bv = So.unstable_NormalPriority, D7 = So.unstable_LowPriority, hF = So.unstable_IdlePriority, Y0 = null, Ji = null;
function I7(e) {
  if (Ji && typeof Ji.onCommitFiberRoot == "function")
    try {
      Ji.onCommitFiberRoot(Y0, e, void 0, (e.current.flags & 128) === 128);
    } catch {
    }
}
var Ti = Math.clz32 ? Math.clz32 : F7, L7 = Math.log, R7 = Math.LN2;
function F7(e) {
  return e >>>= 0, e === 0 ? 32 : 31 - (L7(e) / R7 | 0) | 0;
}
var Wm = 64, Gm = 4194304;
function jd(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 Ev(e, t) {
  var n = e.pendingLanes;
  if (n === 0)
    return 0;
  var r = 0, o = e.suspendedLanes, i = e.pingedLanes, s = n & 268435455;
  if (s !== 0) {
    var l = s & ~o;
    l !== 0 ? r = jd(l) : (i &= s, i !== 0 && (r = jd(i)));
  } else
    s = n & ~o, s !== 0 ? r = jd(s) : i !== 0 && (r = jd(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 - Ti(t), o = 1 << n, r |= e[n], t &= ~o;
  return r;
}
function M7(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 P7(e, t) {
  for (var n = e.suspendedLanes, r = e.pingedLanes, o = e.expirationTimes, i = e.pendingLanes; 0 < i; ) {
    var s = 31 - Ti(i), l = 1 << s, c = o[s];
    c === -1 ? (!(l & n) || l & r) && (o[s] = M7(l, t)) : c <= t && (e.expiredLanes |= l), i &= ~l;
  }
}
function cx(e) {
  return e = e.pendingLanes & -1073741825, e !== 0 ? e : e & 1073741824 ? 1073741824 : 0;
}
function mF() {
  var e = Wm;
  return Wm <<= 1, !(Wm & 4194240) && (Wm = 64), e;
}
function kE(e) {
  for (var t = [], n = 0; 31 > n; n++)
    t.push(e);
  return t;
}
function ph(e, t, n) {
  e.pendingLanes |= t, t !== 536870912 && (e.suspendedLanes = 0, e.pingedLanes = 0), e = e.eventTimes, t = 31 - Ti(t), e[t] = n;
}
function $7(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 - Ti(n), i = 1 << o;
    t[o] = 0, r[o] = -1, e[o] = -1, n &= ~i;
  }
}
function bT(e, t) {
  var n = e.entangledLanes |= t;
  for (e = e.entanglements; n; ) {
    var r = 31 - Ti(n), o = 1 << r;
    o & t | e[r] & t && (e[r] |= t), n &= ~o;
  }
}
var Ot = 0;
function gF(e) {
  return e &= -e, 1 < e ? 4 < e ? e & 268435455 ? 16 : 536870912 : 4 : 1;
}
var vF, ET, yF, bF, EF, ux = !1, Qm = [], Ma = null, Pa = null, $a = null, Ep = /* @__PURE__ */ new Map(), wp = /* @__PURE__ */ new Map(), _a = [], V7 = "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 QO(e, t) {
  switch (e) {
    case "focusin":
    case "focusout":
      Ma = null;
      break;
    case "dragenter":
    case "dragleave":
      Pa = null;
      break;
    case "mouseover":
    case "mouseout":
      $a = null;
      break;
    case "pointerover":
    case "pointerout":
      Ep.delete(t.pointerId);
      break;
    case "gotpointercapture":
    case "lostpointercapture":
      wp.delete(t.pointerId);
  }
}
function Nd(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 = mh(t), t !== null && ET(t)), e) : (e.eventSystemFlags |= r, t = e.targetContainers, o !== null && t.indexOf(o) === -1 && t.push(o), e);
}
function j7(e, t, n, r, o) {
  switch (t) {
    case "focusin":
      return Ma = Nd(Ma, e, t, n, r, o), !0;
    case "dragenter":
      return Pa = Nd(Pa, e, t, n, r, o), !0;
    case "mouseover":
      return $a = Nd($a, e, t, n, r, o), !0;
    case "pointerover":
      var i = o.pointerId;
      return Ep.set(i, Nd(Ep.get(i) || null, e, t, n, r, o)), !0;
    case "gotpointercapture":
      return i = o.pointerId, wp.set(i, Nd(wp.get(i) || null, e, t, n, r, o)), !0;
  }
  return !1;
}
function wF(e) {
  var t = Yl(e.target);
  if (t !== null) {
    var n = Oc(t);
    if (n !== null) {
      if (t = n.tag, t === 13) {
        if (t = cF(n), t !== null) {
          e.blockedOn = t, EF(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 Ug(e) {
  if (e.blockedOn !== null)
    return !1;
  for (var t = e.targetContainers; 0 < t.length; ) {
    var n = fx(e.domEventName, e.eventSystemFlags, t[0], e.nativeEvent);
    if (n === null) {
      n = e.nativeEvent;
      var r = new n.constructor(n.type, n);
      ix = r, n.target.dispatchEvent(r), ix = null;
    } else
      return t = mh(n), t !== null && ET(t), e.blockedOn = n, !1;
    t.shift();
  }
  return !0;
}
function YO(e, t, n) {
  Ug(e) && n.delete(t);
}
function U7() {
  ux = !1, Ma !== null && Ug(Ma) && (Ma = null), Pa !== null && Ug(Pa) && (Pa = null), $a !== null && Ug($a) && ($a = null), Ep.forEach(YO), wp.forEach(YO);
}
function Od(e, t) {
  e.blockedOn === t && (e.blockedOn = null, ux || (ux = !0, So.unstable_scheduleCallback(So.unstable_NormalPriority, U7)));
}
function xp(e) {
  function t(o) {
    return Od(o, e);
  }
  if (0 < Qm.length) {
    Od(Qm[0], e);
    for (var n = 1; n < Qm.length; n++) {
      var r = Qm[n];
      r.blockedOn === e && (r.blockedOn = null);
    }
  }
  for (Ma !== null && Od(Ma, e), Pa !== null && Od(Pa, e), $a !== null && Od($a, e), Ep.forEach(t), wp.forEach(t), n = 0; n < _a.length; n++)
    r = _a[n], r.blockedOn === e && (r.blockedOn = null);
  for (; 0 < _a.length && (n = _a[0], n.blockedOn === null); )
    wF(n), n.blockedOn === null && _a.shift();
}
var ef = Ys.ReactCurrentBatchConfig, wv = !0;
function B7(e, t, n, r) {
  var o = Ot, i = ef.transition;
  ef.transition = null;
  try {
    Ot = 1, wT(e, t, n, r);
  } finally {
    Ot = o, ef.transition = i;
  }
}
function q7(e, t, n, r) {
  var o = Ot, i = ef.transition;
  ef.transition = null;
  try {
    Ot = 4, wT(e, t, n, r);
  } finally {
    Ot = o, ef.transition = i;
  }
}
function wT(e, t, n, r) {
  if (wv) {
    var o = fx(e, t, n, r);
    if (o === null)
      ME(e, t, r, xv, n), QO(e, r);
    else if (j7(o, e, t, n, r))
      r.stopPropagation();
    else if (QO(e, r), t & 4 && -1 < V7.indexOf(e)) {
      for (; o !== null; ) {
        var i = mh(o);
        if (i !== null && vF(i), i = fx(e, t, n, r), i === null && ME(e, t, r, xv, n), i === o)
          break;
        o = i;
      }
      o !== null && r.stopPropagation();
    } else
      ME(e, t, r, null, n);
  }
}
var xv = null;
function fx(e, t, n, r) {
  if (xv = null, e = vT(r), e = Yl(e), e !== null)
    if (t = Oc(e), t === null)
      e = null;
    else if (n = t.tag, n === 13) {
      if (e = cF(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 xv = e, null;
}
function xF(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 (A7()) {
        case yT:
          return 1;
        case pF:
          return 4;
        case bv:
        case D7:
          return 16;
        case hF:
          return 536870912;
        default:
          return 16;
      }
    default:
      return 16;
  }
}
var Oa = null, xT = null, Bg = null;
function SF() {
  if (Bg)
    return Bg;
  var e, t = xT, n = t.length, r, o = "value" in Oa ? Oa.value : Oa.textContent, i = o.length;
  for (e = 0; e < n && t[e] === o[e]; e++)
    ;
  var s = n - e;
  for (r = 1; r <= s && t[n - r] === o[i - r]; r++)
    ;
  return Bg = o.slice(e, 1 < r ? 1 - r : void 0);
}
function qg(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 Ym() {
  return !0;
}
function KO() {
  return !1;
}
function Ao(e) {
  function t(n, r, o, i, s) {
    this._reactName = n, this._targetInst = o, this.type = r, this.nativeEvent = i, this.target = s, 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) ? Ym : KO, this.isPropagationStopped = KO, this;
  }
  return cn(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 = Ym);
  }, stopPropagation: function() {
    var n = this.nativeEvent;
    n && (n.stopPropagation ? n.stopPropagation() : typeof n.cancelBubble != "unknown" && (n.cancelBubble = !0), this.isPropagationStopped = Ym);
  }, persist: function() {
  }, isPersistent: Ym }), t;
}
var Nf = { eventPhase: 0, bubbles: 0, cancelable: 0, timeStamp: function(e) {
  return e.timeStamp || Date.now();
}, defaultPrevented: 0, isTrusted: 0 }, ST = Ao(Nf), hh = cn({}, Nf, { view: 0, detail: 0 }), z7 = Ao(hh), _E, NE, Ad, K0 = cn({}, hh, { screenX: 0, screenY: 0, clientX: 0, clientY: 0, pageX: 0, pageY: 0, ctrlKey: 0, shiftKey: 0, altKey: 0, metaKey: 0, getModifierState: TT, 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 !== Ad && (Ad && e.type === "mousemove" ? (_E = e.screenX - Ad.screenX, NE = e.screenY - Ad.screenY) : NE = _E = 0, Ad = e), _E);
}, movementY: function(e) {
  return "movementY" in e ? e.movementY : NE;
} }), JO = Ao(K0), H7 = cn({}, K0, { dataTransfer: 0 }), W7 = Ao(H7), G7 = cn({}, hh, { relatedTarget: 0 }), OE = Ao(G7), Q7 = cn({}, Nf, { animationName: 0, elapsedTime: 0, pseudoElement: 0 }), Y7 = Ao(Q7), K7 = cn({}, Nf, { clipboardData: function(e) {
  return "clipboardData" in e ? e.clipboardData : window.clipboardData;
} }), J7 = Ao(K7), X7 = cn({}, Nf, { data: 0 }), XO = Ao(X7), Z7 = {
  Esc: "Escape",
  Spacebar: " ",
  Left: "ArrowLeft",
  Up: "ArrowUp",
  Right: "ArrowRight",
  Down: "ArrowDown",
  Del: "Delete",
  Win: "OS",
  Menu: "ContextMenu",
  Apps: "ContextMenu",
  Scroll: "ScrollLock",
  MozPrintableKey: "Unidentified"
}, e9 = {
  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"
}, t9 = { Alt: "altKey", Control: "ctrlKey", Meta: "metaKey", Shift: "shiftKey" };
function n9(e) {
  var t = this.nativeEvent;
  return t.getModifierState ? t.getModifierState(e) : (e = t9[e]) ? !!t[e] : !1;
}
function TT() {
  return n9;
}
var r9 = cn({}, hh, { key: function(e) {
  if (e.key) {
    var t = Z7[e.key] || e.key;
    if (t !== "Unidentified")
      return t;
  }
  return e.type === "keypress" ? (e = qg(e), e === 13 ? "Enter" : String.fromCharCode(e)) : e.type === "keydown" || e.type === "keyup" ? e9[e.keyCode] || "Unidentified" : "";
}, code: 0, location: 0, ctrlKey: 0, shiftKey: 0, altKey: 0, metaKey: 0, repeat: 0, locale: 0, getModifierState: TT, charCode: function(e) {
  return e.type === "keypress" ? qg(e) : 0;
}, keyCode: function(e) {
  return e.type === "keydown" || e.type === "keyup" ? e.keyCode : 0;
}, which: function(e) {
  return e.type === "keypress" ? qg(e) : e.type === "keydown" || e.type === "keyup" ? e.keyCode : 0;
} }), o9 = Ao(r9), i9 = cn({}, K0, { pointerId: 0, width: 0, height: 0, pressure: 0, tangentialPressure: 0, tiltX: 0, tiltY: 0, twist: 0, pointerType: 0, isPrimary: 0 }), ZO = Ao(i9), s9 = cn({}, hh, { touches: 0, targetTouches: 0, changedTouches: 0, altKey: 0, metaKey: 0, ctrlKey: 0, shiftKey: 0, getModifierState: TT }), a9 = Ao(s9), l9 = cn({}, Nf, { propertyName: 0, elapsedTime: 0, pseudoElement: 0 }), c9 = Ao(l9), u9 = cn({}, K0, {
  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
}), f9 = Ao(u9), d9 = [9, 13, 27, 32], CT = Ls && "CompositionEvent" in window, Jd = null;
Ls && "documentMode" in document && (Jd = document.documentMode);
var p9 = Ls && "TextEvent" in window && !Jd, TF = Ls && (!CT || Jd && 8 < Jd && 11 >= Jd), e2 = " ", t2 = !1;
function CF(e, t) {
  switch (e) {
    case "keyup":
      return d9.indexOf(t.keyCode) !== -1;
    case "keydown":
      return t.keyCode !== 229;
    case "keypress":
    case "mousedown":
    case "focusout":
      return !0;
    default:
      return !1;
  }
}
function kF(e) {
  return e = e.detail, typeof e == "object" && "data" in e ? e.data : null;
}
var Mu = !1;
function h9(e, t) {
  switch (e) {
    case "compositionend":
      return kF(t);
    case "keypress":
      return t.which !== 32 ? null : (t2 = !0, e2);
    case "textInput":
      return e = t.data, e === e2 && t2 ? null : e;
    default:
      return null;
  }
}
function m9(e, t) {
  if (Mu)
    return e === "compositionend" || !CT && CF(e, t) ? (e = SF(), Bg = xT = Oa = null, Mu = !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 TF && t.locale !== "ko" ? null : t.data;
    default:
      return null;
  }
}
var g9 = { 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 n2(e) {
  var t = e && e.nodeName && e.nodeName.toLowerCase();
  return t === "input" ? !!g9[e.type] : t === "textarea";
}
function _F(e, t, n, r) {
  oF(r), t = Sv(t, "onChange"), 0 < t.length && (n = new ST("onChange", "change", null, n, r), e.push({ event: n, listeners: t }));
}
var Xd = null, Sp = null;
function v9(e) {
  $F(e, 0);
}
function J0(e) {
  var t = Vu(e);
  if (JR(t))
    return e;
}
function y9(e, t) {
  if (e === "change")
    return t;
}
var NF = !1;
if (Ls) {
  var AE;
  if (Ls) {
    var DE = "oninput" in document;
    if (!DE) {
      var r2 = document.createElement("div");
      r2.setAttribute("oninput", "return;"), DE = typeof r2.oninput == "function";
    }
    AE = DE;
  } else
    AE = !1;
  NF = AE && (!document.documentMode || 9 < document.documentMode);
}
function o2() {
  Xd && (Xd.detachEvent("onpropertychange", OF), Sp = Xd = null);
}
function OF(e) {
  if (e.propertyName === "value" && J0(Sp)) {
    var t = [];
    _F(t, Sp, e, vT(e)), lF(v9, t);
  }
}
function b9(e, t, n) {
  e === "focusin" ? (o2(), Xd = t, Sp = n, Xd.attachEvent("onpropertychange", OF)) : e === "focusout" && o2();
}
function E9(e) {
  if (e === "selectionchange" || e === "keyup" || e === "keydown")
    return J0(Sp);
}
function w9(e, t) {
  if (e === "click")
    return J0(t);
}
function x9(e, t) {
  if (e === "input" || e === "change")
    return J0(t);
}
function S9(e, t) {
  return e === t && (e !== 0 || 1 / e === 1 / t) || e !== e && t !== t;
}
var Ai = typeof Object.is == "function" ? Object.is : S9;
function Tp(e, t) {
  if (Ai(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 (!Gw.call(t, o) || !Ai(e[o], t[o]))
      return !1;
  }
  return !0;
}
function i2(e) {
  for (; e && e.firstChild; )
    e = e.firstChild;
  return e;
}
function s2(e, t) {
  var n = i2(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 = i2(n);
  }
}
function AF(e, t) {
  return e && t ? e === t ? !0 : e && e.nodeType === 3 ? !1 : t && t.nodeType === 3 ? AF(e, t.parentNode) : "contains" in e ? e.contains(t) : e.compareDocumentPosition ? !!(e.compareDocumentPosition(t) & 16) : !1 : !1;
}
function DF() {
  for (var e = window, t = gv(); t instanceof e.HTMLIFrameElement; ) {
    try {
      var n = typeof t.contentWindow.location.href == "string";
    } catch {
      n = !1;
    }
    if (n)
      e = t.contentWindow;
    else
      break;
    t = gv(e.document);
  }
  return t;
}
function kT(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 T9(e) {
  var t = DF(), n = e.focusedElem, r = e.selectionRange;
  if (t !== n && n && n.ownerDocument && AF(n.ownerDocument.documentElement, n)) {
    if (r !== null && kT(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 = s2(n, i);
        var s = s2(
          n,
          r
        );
        o && s && (e.rangeCount !== 1 || e.anchorNode !== o.node || e.anchorOffset !== o.offset || e.focusNode !== s.node || e.focusOffset !== s.offset) && (t = t.createRange(), t.setStart(o.node, o.offset), e.removeAllRanges(), i > r ? (e.addRange(t), e.extend(s.node, s.offset)) : (t.setEnd(s.node, s.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 C9 = Ls && "documentMode" in document && 11 >= document.documentMode, Pu = null, dx = null, Zd = null, px = !1;
function a2(e, t, n) {
  var r = n.window === n ? n.document : n.nodeType === 9 ? n : n.ownerDocument;
  px || Pu == null || Pu !== gv(r) || (r = Pu, "selectionStart" in r && kT(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 }), Zd && Tp(Zd, r) || (Zd = r, r = Sv(dx, "onSelect"), 0 < r.length && (t = new ST("onSelect", "select", null, t, n), e.push({ event: t, listeners: r }), t.target = Pu)));
}
function Km(e, t) {
  var n = {};
  return n[e.toLowerCase()] = t.toLowerCase(), n["Webkit" + e] = "webkit" + t, n["Moz" + e] = "moz" + t, n;
}
var $u = { animationend: Km("Animation", "AnimationEnd"), animationiteration: Km("Animation", "AnimationIteration"), animationstart: Km("Animation", "AnimationStart"), transitionend: Km("Transition", "TransitionEnd") }, IE = {}, IF = {};
Ls && (IF = document.createElement("div").style, "AnimationEvent" in window || (delete $u.animationend.animation, delete $u.animationiteration.animation, delete $u.animationstart.animation), "TransitionEvent" in window || delete $u.transitionend.transition);
function X0(e) {
  if (IE[e])
    return IE[e];
  if (!$u[e])
    return e;
  var t = $u[e], n;
  for (n in t)
    if (t.hasOwnProperty(n) && n in IF)
      return IE[e] = t[n];
  return e;
}
var LF = X0("animationend"), RF = X0("animationiteration"), FF = X0("animationstart"), MF = X0("transitionend"), PF = /* @__PURE__ */ new Map(), l2 = "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 el(e, t) {
  PF.set(e, t), Nc(t, [e]);
}
for (var LE = 0; LE < l2.length; LE++) {
  var RE = l2[LE], k9 = RE.toLowerCase(), _9 = RE[0].toUpperCase() + RE.slice(1);
  el(k9, "on" + _9);
}
el(LF, "onAnimationEnd");
el(RF, "onAnimationIteration");
el(FF, "onAnimationStart");
el("dblclick", "onDoubleClick");
el("focusin", "onFocus");
el("focusout", "onBlur");
el(MF, "onTransitionEnd");
ff("onMouseEnter", ["mouseout", "mouseover"]);
ff("onMouseLeave", ["mouseout", "mouseover"]);
ff("onPointerEnter", ["pointerout", "pointerover"]);
ff("onPointerLeave", ["pointerout", "pointerover"]);
Nc("onChange", "change click focusin focusout input keydown keyup selectionchange".split(" "));
Nc("onSelect", "focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));
Nc("onBeforeInput", ["compositionend", "keypress", "textInput", "paste"]);
Nc("onCompositionEnd", "compositionend focusout keydown keypress keyup mousedown".split(" "));
Nc("onCompositionStart", "compositionstart focusout keydown keypress keyup mousedown".split(" "));
Nc("onCompositionUpdate", "compositionupdate focusout keydown keypress keyup mousedown".split(" "));
var Ud = "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(" "), N9 = new Set("cancel close invalid load scroll toggle".split(" ").concat(Ud));
function c2(e, t, n) {
  var r = e.type || "unknown-event";
  e.currentTarget = n, k7(r, t, void 0, e), e.currentTarget = null;
}
function $F(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 s = r.length - 1; 0 <= s; s--) {
          var l = r[s], c = l.instance, f = l.currentTarget;
          if (l = l.listener, c !== i && o.isPropagationStopped())
            break e;
          c2(o, l, f), i = c;
        }
      else
        for (s = 0; s < r.length; s++) {
          if (l = r[s], c = l.instance, f = l.currentTarget, l = l.listener, c !== i && o.isPropagationStopped())
            break e;
          c2(o, l, f), i = c;
        }
    }
  }
  if (yv)
    throw e = lx, yv = !1, lx = null, e;
}
function Bt(e, t) {
  var n = t[yx];
  n === void 0 && (n = t[yx] = /* @__PURE__ */ new Set());
  var r = e + "__bubble";
  n.has(r) || (VF(t, e, 2, !1), n.add(r));
}
function FE(e, t, n) {
  var r = 0;
  t && (r |= 4), VF(n, e, r, t);
}
var Jm = "_reactListening" + Math.random().toString(36).slice(2);
function Cp(e) {
  if (!e[Jm]) {
    e[Jm] = !0, WR.forEach(function(n) {
      n !== "selectionchange" && (N9.has(n) || FE(n, !1, e), FE(n, !0, e));
    });
    var t = e.nodeType === 9 ? e : e.ownerDocument;
    t === null || t[Jm] || (t[Jm] = !0, FE("selectionchange", !1, t));
  }
}
function VF(e, t, n, r) {
  switch (xF(t)) {
    case 1:
      var o = B7;
      break;
    case 4:
      o = q7;
      break;
    default:
      o = wT;
  }
  n = o.bind(null, t, n, e), o = void 0, !ax || 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 ME(e, t, n, r, o) {
  var i = r;
  if (!(t & 1) && !(t & 2) && r !== null)
    e:
      for (; ; ) {
        if (r === null)
          return;
        var s = r.tag;
        if (s === 3 || s === 4) {
          var l = r.stateNode.containerInfo;
          if (l === o || l.nodeType === 8 && l.parentNode === o)
            break;
          if (s === 4)
            for (s = r.return; s !== null; ) {
              var c = s.tag;
              if ((c === 3 || c === 4) && (c = s.stateNode.containerInfo, c === o || c.nodeType === 8 && c.parentNode === o))
                return;
              s = s.return;
            }
          for (; l !== null; ) {
            if (s = Yl(l), s === null)
              return;
            if (c = s.tag, c === 5 || c === 6) {
              r = i = s;
              continue e;
            }
            l = l.parentNode;
          }
        }
        r = r.return;
      }
  lF(function() {
    var f = i, d = vT(n), g = [];
    e: {
      var m = PF.get(e);
      if (m !== void 0) {
        var v = ST, b = e;
        switch (e) {
          case "keypress":
            if (qg(n) === 0)
              break e;
          case "keydown":
          case "keyup":
            v = o9;
            break;
          case "focusin":
            b = "focus", v = OE;
            break;
          case "focusout":
            b = "blur", v = OE;
            break;
          case "beforeblur":
          case "afterblur":
            v = OE;
            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":
            v = JO;
            break;
          case "drag":
          case "dragend":
          case "dragenter":
          case "dragexit":
          case "dragleave":
          case "dragover":
          case "dragstart":
          case "drop":
            v = W7;
            break;
          case "touchcancel":
          case "touchend":
          case "touchmove":
          case "touchstart":
            v = a9;
            break;
          case LF:
          case RF:
          case FF:
            v = Y7;
            break;
          case MF:
            v = c9;
            break;
          case "scroll":
            v = z7;
            break;
          case "wheel":
            v = f9;
            break;
          case "copy":
          case "cut":
          case "paste":
            v = J7;
            break;
          case "gotpointercapture":
          case "lostpointercapture":
          case "pointercancel":
          case "pointerdown":
          case "pointermove":
          case "pointerout":
          case "pointerover":
          case "pointerup":
            v = ZO;
        }
        var w = (t & 4) !== 0, _ = !w && e === "scroll", S = w ? m !== null ? m + "Capture" : null : m;
        w = [];
        for (var x = f, C; x !== null; ) {
          C = x;
          var E = C.stateNode;
          if (C.tag === 5 && E !== null && (C = E, S !== null && (E = bp(x, S), E != null && w.push(kp(x, E, C)))), _)
            break;
          x = x.return;
        }
        0 < w.length && (m = new v(m, b, null, n, d), g.push({ event: m, listeners: w }));
      }
    }
    if (!(t & 7)) {
      e: {
        if (m = e === "mouseover" || e === "pointerover", v = e === "mouseout" || e === "pointerout", m && n !== ix && (b = n.relatedTarget || n.fromElement) && (Yl(b) || b[Rs]))
          break e;
        if ((v || m) && (m = d.window === d ? d : (m = d.ownerDocument) ? m.defaultView || m.parentWindow : window, v ? (b = n.relatedTarget || n.toElement, v = f, b = b ? Yl(b) : null, b !== null && (_ = Oc(b), b !== _ || b.tag !== 5 && b.tag !== 6) && (b = null)) : (v = null, b = f), v !== b)) {
          if (w = JO, E = "onMouseLeave", S = "onMouseEnter", x = "mouse", (e === "pointerout" || e === "pointerover") && (w = ZO, E = "onPointerLeave", S = "onPointerEnter", x = "pointer"), _ = v == null ? m : Vu(v), C = b == null ? m : Vu(b), m = new w(E, x + "leave", v, n, d), m.target = _, m.relatedTarget = C, E = null, Yl(d) === f && (w = new w(S, x + "enter", b, n, d), w.target = C, w.relatedTarget = _, E = w), _ = E, v && b)
            t: {
              for (w = v, S = b, x = 0, C = w; C; C = yu(C))
                x++;
              for (C = 0, E = S; E; E = yu(E))
                C++;
              for (; 0 < x - C; )
                w = yu(w), x--;
              for (; 0 < C - x; )
                S = yu(S), C--;
              for (; x--; ) {
                if (w === S || S !== null && w === S.alternate)
                  break t;
                w = yu(w), S = yu(S);
              }
              w = null;
            }
          else
            w = null;
          v !== null && u2(g, m, v, w, !1), b !== null && _ !== null && u2(g, _, b, w, !0);
        }
      }
      e: {
        if (m = f ? Vu(f) : window, v = m.nodeName && m.nodeName.toLowerCase(), v === "select" || v === "input" && m.type === "file")
          var N = y9;
        else if (n2(m))
          if (NF)
            N = x9;
          else {
            N = E9;
            var I = b9;
          }
        else
          (v = m.nodeName) && v.toLowerCase() === "input" && (m.type === "checkbox" || m.type === "radio") && (N = w9);
        if (N && (N = N(e, f))) {
          _F(g, N, n, d);
          break e;
        }
        I && I(e, m, f), e === "focusout" && (I = m._wrapperState) && I.controlled && m.type === "number" && ex(m, "number", m.value);
      }
      switch (I = f ? Vu(f) : window, e) {
        case "focusin":
          (n2(I) || I.contentEditable === "true") && (Pu = I, dx = f, Zd = null);
          break;
        case "focusout":
          Zd = dx = Pu = null;
          break;
        case "mousedown":
          px = !0;
          break;
        case "contextmenu":
        case "mouseup":
        case "dragend":
          px = !1, a2(g, n, d);
          break;
        case "selectionchange":
          if (C9)
            break;
        case "keydown":
        case "keyup":
          a2(g, n, d);
      }
      var D;
      if (CT)
        e: {
          switch (e) {
            case "compositionstart":
              var A = "onCompositionStart";
              break e;
            case "compositionend":
              A = "onCompositionEnd";
              break e;
            case "compositionupdate":
              A = "onCompositionUpdate";
              break e;
          }
          A = void 0;
        }
      else
        Mu ? CF(e, n) && (A = "onCompositionEnd") : e === "keydown" && n.keyCode === 229 && (A = "onCompositionStart");
      A && (TF && n.locale !== "ko" && (Mu || A !== "onCompositionStart" ? A === "onCompositionEnd" && Mu && (D = SF()) : (Oa = d, xT = "value" in Oa ? Oa.value : Oa.textContent, Mu = !0)), I = Sv(f, A), 0 < I.length && (A = new XO(A, e, null, n, d), g.push({ event: A, listeners: I }), D ? A.data = D : (D = kF(n), D !== null && (A.data = D)))), (D = p9 ? h9(e, n) : m9(e, n)) && (f = Sv(f, "onBeforeInput"), 0 < f.length && (d = new XO("onBeforeInput", "beforeinput", null, n, d), g.push({ event: d, listeners: f }), d.data = D));
    }
    $F(g, t);
  });
}
function kp(e, t, n) {
  return { instance: e, listener: t, currentTarget: n };
}
function Sv(e, t) {
  for (var n = t + "Capture", r = []; e !== null; ) {
    var o = e, i = o.stateNode;
    o.tag === 5 && i !== null && (o = i, i = bp(e, n), i != null && r.unshift(kp(e, i, o)), i = bp(e, t), i != null && r.push(kp(e, i, o))), e = e.return;
  }
  return r;
}
function yu(e) {
  if (e === null)
    return null;
  do
    e = e.return;
  while (e && e.tag !== 5);
  return e || null;
}
function u2(e, t, n, r, o) {
  for (var i = t._reactName, s = []; n !== null && n !== r; ) {
    var l = n, c = l.alternate, f = l.stateNode;
    if (c !== null && c === r)
      break;
    l.tag === 5 && f !== null && (l = f, o ? (c = bp(n, i), c != null && s.unshift(kp(n, c, l))) : o || (c = bp(n, i), c != null && s.push(kp(n, c, l)))), n = n.return;
  }
  s.length !== 0 && e.push({ event: t, listeners: s });
}
var O9 = /\r\n?/g, A9 = /\u0000|\uFFFD/g;
function f2(e) {
  return (typeof e == "string" ? e : "" + e).replace(O9, `
`).replace(A9, "");
}
function Xm(e, t, n) {
  if (t = f2(t), f2(e) !== t && n)
    throw Error(_e(425));
}
function Tv() {
}
var hx = null, mx = null;
function gx(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 vx = typeof setTimeout == "function" ? setTimeout : void 0, D9 = typeof clearTimeout == "function" ? clearTimeout : void 0, d2 = typeof Promise == "function" ? Promise : void 0, I9 = typeof queueMicrotask == "function" ? queueMicrotask : typeof d2 < "u" ? function(e) {
  return d2.resolve(null).then(e).catch(L9);
} : vx;
function L9(e) {
  setTimeout(function() {
    throw e;
  });
}
function PE(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), xp(t);
          return;
        }
        r--;
      } else
        n !== "$" && n !== "$?" && n !== "$!" || r++;
    n = o;
  } while (n);
  xp(t);
}
function Va(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 p2(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 Of = Math.random().toString(36).slice(2), Yi = "__reactFiber$" + Of, _p = "__reactProps$" + Of, Rs = "__reactContainer$" + Of, yx = "__reactEvents$" + Of, R9 = "__reactListeners$" + Of, F9 = "__reactHandles$" + Of;
function Yl(e) {
  var t = e[Yi];
  if (t)
    return t;
  for (var n = e.parentNode; n; ) {
    if (t = n[Rs] || n[Yi]) {
      if (n = t.alternate, t.child !== null || n !== null && n.child !== null)
        for (e = p2(e); e !== null; ) {
          if (n = e[Yi])
            return n;
          e = p2(e);
        }
      return t;
    }
    e = n, n = e.parentNode;
  }
  return null;
}
function mh(e) {
  return e = e[Yi] || e[Rs], !e || e.tag !== 5 && e.tag !== 6 && e.tag !== 13 && e.tag !== 3 ? null : e;
}
function Vu(e) {
  if (e.tag === 5 || e.tag === 6)
    return e.stateNode;
  throw Error(_e(33));
}
function Z0(e) {
  return e[_p] || null;
}
var bx = [], ju = -1;
function tl(e) {
  return { current: e };
}
function Gt(e) {
  0 > ju || (e.current = bx[ju], bx[ju] = null, ju--);
}
function $t(e, t) {
  ju++, bx[ju] = e.current, e.current = t;
}
var Wa = {}, _r = tl(Wa), so = tl(!1), uc = Wa;
function df(e, t) {
  var n = e.type.contextTypes;
  if (!n)
    return Wa;
  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 ao(e) {
  return e = e.childContextTypes, e != null;
}
function Cv() {
  Gt(so), Gt(_r);
}
function h2(e, t, n) {
  if (_r.current !== Wa)
    throw Error(_e(168));
  $t(_r, t), $t(so, n);
}
function jF(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(_e(108, b7(e) || "Unknown", o));
  return cn({}, n, r);
}
function kv(e) {
  return e = (e = e.stateNode) && e.__reactInternalMemoizedMergedChildContext || Wa, uc = _r.current, $t(_r, e), $t(so, so.current), !0;
}
function m2(e, t, n) {
  var r = e.stateNode;
  if (!r)
    throw Error(_e(169));
  n ? (e = jF(e, t, uc), r.__reactInternalMemoizedMergedChildContext = e, Gt(so), Gt(_r), $t(_r, e)) : Gt(so), $t(so, n);
}
var Ss = null, ey = !1, $E = !1;
function UF(e) {
  Ss === null ? Ss = [e] : Ss.push(e);
}
function M9(e) {
  ey = !0, UF(e);
}
function nl() {
  if (!$E && Ss !== null) {
    $E = !0;
    var e = 0, t = Ot;
    try {
      var n = Ss;
      for (Ot = 1; e < n.length; e++) {
        var r = n[e];
        do
          r = r(!0);
        while (r !== null);
      }
      Ss = null, ey = !1;
    } catch (o) {
      throw Ss !== null && (Ss = Ss.slice(e + 1)), dF(yT, nl), o;
    } finally {
      Ot = t, $E = !1;
    }
  }
  return null;
}
var Uu = [], Bu = 0, _v = null, Nv = 0, qo = [], zo = 0, fc = null, Cs = 1, ks = "";
function Bl(e, t) {
  Uu[Bu++] = Nv, Uu[Bu++] = _v, _v = e, Nv = t;
}
function BF(e, t, n) {
  qo[zo++] = Cs, qo[zo++] = ks, qo[zo++] = fc, fc = e;
  var r = Cs;
  e = ks;
  var o = 32 - Ti(r) - 1;
  r &= ~(1 << o), n += 1;
  var i = 32 - Ti(t) + o;
  if (30 < i) {
    var s = o - o % 5;
    i = (r & (1 << s) - 1).toString(32), r >>= s, o -= s, Cs = 1 << 32 - Ti(t) + o | n << o | r, ks = i + e;
  } else
    Cs = 1 << i | n << o | r, ks = e;
}
function _T(e) {
  e.return !== null && (Bl(e, 1), BF(e, 1, 0));
}
function NT(e) {
  for (; e === _v; )
    _v = Uu[--Bu], Uu[Bu] = null, Nv = Uu[--Bu], Uu[Bu] = null;
  for (; e === fc; )
    fc = qo[--zo], qo[zo] = null, ks = qo[--zo], qo[zo] = null, Cs = qo[--zo], qo[zo] = null;
}
var wo = null, Eo = null, Kt = !1, yi = null;
function qF(e, t) {
  var n = Ho(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 g2(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, wo = e, Eo = Va(t.firstChild), !0) : !1;
    case 6:
      return t = e.pendingProps === "" || t.nodeType !== 3 ? null : t, t !== null ? (e.stateNode = t, wo = e, Eo = null, !0) : !1;
    case 13:
      return t = t.nodeType !== 8 ? null : t, t !== null ? (n = fc !== null ? { id: Cs, overflow: ks } : null, e.memoizedState = { dehydrated: t, treeContext: n, retryLane: 1073741824 }, n = Ho(18, null, null, 0), n.stateNode = t, n.return = e, e.child = n, wo = e, Eo = null, !0) : !1;
    default:
      return !1;
  }
}
function Ex(e) {
  return (e.mode & 1) !== 0 && (e.flags & 128) === 0;
}
function wx(e) {
  if (Kt) {
    var t = Eo;
    if (t) {
      var n = t;
      if (!g2(e, t)) {
        if (Ex(e))
          throw Error(_e(418));
        t = Va(n.nextSibling);
        var r = wo;
        t && g2(e, t) ? qF(r, n) : (e.flags = e.flags & -4097 | 2, Kt = !1, wo = e);
      }
    } else {
      if (Ex(e))
        throw Error(_e(418));
      e.flags = e.flags & -4097 | 2, Kt = !1, wo = e;
    }
  }
}
function v2(e) {
  for (e = e.return; e !== null && e.tag !== 5 && e.tag !== 3 && e.tag !== 13; )
    e = e.return;
  wo = e;
}
function Zm(e) {
  if (e !== wo)
    return !1;
  if (!Kt)
    return v2(e), Kt = !0, !1;
  var t;
  if ((t = e.tag !== 3) && !(t = e.tag !== 5) && (t = e.type, t = t !== "head" && t !== "body" && !gx(e.type, e.memoizedProps)), t && (t = Eo)) {
    if (Ex(e))
      throw zF(), Error(_e(418));
    for (; t; )
      qF(e, t), t = Va(t.nextSibling);
  }
  if (v2(e), e.tag === 13) {
    if (e = e.memoizedState, e = e !== null ? e.dehydrated : null, !e)
      throw Error(_e(317));
    e: {
      for (e = e.nextSibling, t = 0; e; ) {
        if (e.nodeType === 8) {
          var n = e.data;
          if (n === "/$") {
            if (t === 0) {
              Eo = Va(e.nextSibling);
              break e;
            }
            t--;
          } else
            n !== "$" && n !== "$!" && n !== "$?" || t++;
        }
        e = e.nextSibling;
      }
      Eo = null;
    }
  } else
    Eo = wo ? Va(e.stateNode.nextSibling) : null;
  return !0;
}
function zF() {
  for (var e = Eo; e; )
    e = Va(e.nextSibling);
}
function pf() {
  Eo = wo = null, Kt = !1;
}
function OT(e) {
  yi === null ? yi = [e] : yi.push(e);
}
var P9 = Ys.ReactCurrentBatchConfig;
function mi(e, t) {
  if (e && e.defaultProps) {
    t = cn({}, t), e = e.defaultProps;
    for (var n in e)
      t[n] === void 0 && (t[n] = e[n]);
    return t;
  }
  return t;
}
var Ov = tl(null), Av = null, qu = null, AT = null;
function DT() {
  AT = qu = Av = null;
}
function IT(e) {
  var t = Ov.current;
  Gt(Ov), e._currentValue = t;
}
function xx(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 tf(e, t) {
  Av = e, AT = qu = null, e = e.dependencies, e !== null && e.firstContext !== null && (e.lanes & t && (oo = !0), e.firstContext = null);
}
function Jo(e) {
  var t = e._currentValue;
  if (AT !== e)
    if (e = { context: e, memoizedValue: t, next: null }, qu === null) {
      if (Av === null)
        throw Error(_e(308));
      qu = e, Av.dependencies = { lanes: 0, firstContext: e };
    } else
      qu = qu.next = e;
  return t;
}
var Kl = null;
function LT(e) {
  Kl === null ? Kl = [e] : Kl.push(e);
}
function HF(e, t, n, r) {
  var o = t.interleaved;
  return o === null ? (n.next = n, LT(t)) : (n.next = o.next, o.next = n), t.interleaved = n, Fs(e, r);
}
function Fs(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 xa = !1;
function RT(e) {
  e.updateQueue = { baseState: e.memoizedState, firstBaseUpdate: null, lastBaseUpdate: null, shared: { pending: null, interleaved: null, lanes: 0 }, effects: null };
}
function WF(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 Ns(e, t) {
  return { eventTime: e, lane: t, tag: 0, payload: null, callback: null, next: null };
}
function ja(e, t, n) {
  var r = e.updateQueue;
  if (r === null)
    return null;
  if (r = r.shared, bt & 2) {
    var o = r.pending;
    return o === null ? t.next = t : (t.next = o.next, o.next = t), r.pending = t, Fs(e, n);
  }
  return o = r.interleaved, o === null ? (t.next = t, LT(r)) : (t.next = o.next, o.next = t), r.interleaved = t, Fs(e, n);
}
function zg(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, bT(e, n);
  }
}
function y2(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 s = { eventTime: n.eventTime, lane: n.lane, tag: n.tag, payload: n.payload, callback: n.callback, next: null };
        i === null ? o = i = s : i = i.next = s, 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 Dv(e, t, n, r) {
  var o = e.updateQueue;
  xa = !1;
  var i = o.firstBaseUpdate, s = o.lastBaseUpdate, l = o.shared.pending;
  if (l !== null) {
    o.shared.pending = null;
    var c = l, f = c.next;
    c.next = null, s === null ? i = f : s.next = f, s = c;
    var d = e.alternate;
    d !== null && (d = d.updateQueue, l = d.lastBaseUpdate, l !== s && (l === null ? d.firstBaseUpdate = f : l.next = f, d.lastBaseUpdate = c));
  }
  if (i !== null) {
    var g = o.baseState;
    s = 0, d = f = c = null, l = i;
    do {
      var m = l.lane, v = l.eventTime;
      if ((r & m) === m) {
        d !== null && (d = d.next = {
          eventTime: v,
          lane: 0,
          tag: l.tag,
          payload: l.payload,
          callback: l.callback,
          next: null
        });
        e: {
          var b = e, w = l;
          switch (m = t, v = n, w.tag) {
            case 1:
              if (b = w.payload, typeof b == "function") {
                g = b.call(v, g, m);
                break e;
              }
              g = b;
              break e;
            case 3:
              b.flags = b.flags & -65537 | 128;
            case 0:
              if (b = w.payload, m = typeof b == "function" ? b.call(v, g, m) : b, m == null)
                break e;
              g = cn({}, g, m);
              break e;
            case 2:
              xa = !0;
          }
        }
        l.callback !== null && l.lane !== 0 && (e.flags |= 64, m = o.effects, m === null ? o.effects = [l] : m.push(l));
      } else
        v = { eventTime: v, lane: m, tag: l.tag, payload: l.payload, callback: l.callback, next: null }, d === null ? (f = d = v, c = g) : d = d.next = v, s |= 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 (d === null && (c = g), o.baseState = c, o.firstBaseUpdate = f, o.lastBaseUpdate = d, t = o.shared.interleaved, t !== null) {
      o = t;
      do
        s |= o.lane, o = o.next;
      while (o !== t);
    } else
      i === null && (o.shared.lanes = 0);
    pc |= s, e.lanes = s, e.memoizedState = g;
  }
}
function b2(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(_e(191, o));
        o.call(r);
      }
    }
}
var GF = new HR.Component().refs;
function Sx(e, t, n, r) {
  t = e.memoizedState, n = n(r, t), n = n == null ? t : cn({}, t, n), e.memoizedState = n, e.lanes === 0 && (e.updateQueue.baseState = n);
}
var ty = { isMounted: function(e) {
  return (e = e._reactInternals) ? Oc(e) === e : !1;
}, enqueueSetState: function(e, t, n) {
  e = e._reactInternals;
  var r = qr(), o = Ba(e), i = Ns(r, o);
  i.payload = t, n != null && (i.callback = n), t = ja(e, i, o), t !== null && (Ci(t, e, o, r), zg(t, e, o));
}, enqueueReplaceState: function(e, t, n) {
  e = e._reactInternals;
  var r = qr(), o = Ba(e), i = Ns(r, o);
  i.tag = 1, i.payload = t, n != null && (i.callback = n), t = ja(e, i, o), t !== null && (Ci(t, e, o, r), zg(t, e, o));
}, enqueueForceUpdate: function(e, t) {
  e = e._reactInternals;
  var n = qr(), r = Ba(e), o = Ns(n, r);
  o.tag = 2, t != null && (o.callback = t), t = ja(e, o, r), t !== null && (Ci(t, e, r, n), zg(t, e, r));
} };
function E2(e, t, n, r, o, i, s) {
  return e = e.stateNode, typeof e.shouldComponentUpdate == "function" ? e.shouldComponentUpdate(r, i, s) : t.prototype && t.prototype.isPureReactComponent ? !Tp(n, r) || !Tp(o, i) : !0;
}
function QF(e, t, n) {
  var r = !1, o = Wa, i = t.contextType;
  return typeof i == "object" && i !== null ? i = Jo(i) : (o = ao(t) ? uc : _r.current, r = t.contextTypes, i = (r = r != null) ? df(e, o) : Wa), t = new t(n, i), e.memoizedState = t.state !== null && t.state !== void 0 ? t.state : null, t.updater = ty, e.stateNode = t, t._reactInternals = e, r && (e = e.stateNode, e.__reactInternalMemoizedUnmaskedChildContext = o, e.__reactInternalMemoizedMaskedChildContext = i), t;
}
function w2(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 && ty.enqueueReplaceState(t, t.state, null);
}
function Tx(e, t, n, r) {
  var o = e.stateNode;
  o.props = n, o.state = e.memoizedState, o.refs = GF, RT(e);
  var i = t.contextType;
  typeof i == "object" && i !== null ? o.context = Jo(i) : (i = ao(t) ? uc : _r.current, o.context = df(e, i)), o.state = e.memoizedState, i = t.getDerivedStateFromProps, typeof i == "function" && (Sx(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 && ty.enqueueReplaceState(o, o.state, null), Dv(e, n, o, r), o.state = e.memoizedState), typeof o.componentDidMount == "function" && (e.flags |= 4194308);
}
function Dd(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(_e(309));
        var r = n.stateNode;
      }
      if (!r)
        throw Error(_e(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(s) {
        var l = o.refs;
        l === GF && (l = o.refs = {}), s === null ? delete l[i] : l[i] = s;
      }, t._stringRef = i, t);
    }
    if (typeof e != "string")
      throw Error(_e(284));
    if (!n._owner)
      throw Error(_e(290, e));
  }
  return e;
}
function eg(e, t) {
  throw e = Object.prototype.toString.call(t), Error(_e(31, e === "[object Object]" ? "object with keys {" + Object.keys(t).join(", ") + "}" : e));
}
function x2(e) {
  var t = e._init;
  return t(e._payload);
}
function YF(e) {
  function t(S, x) {
    if (e) {
      var C = S.deletions;
      C === null ? (S.deletions = [x], S.flags |= 16) : C.push(x);
    }
  }
  function n(S, x) {
    if (!e)
      return null;
    for (; x !== null; )
      t(S, x), x = x.sibling;
    return null;
  }
  function r(S, x) {
    for (S = /* @__PURE__ */ new Map(); x !== null; )
      x.key !== null ? S.set(x.key, x) : S.set(x.index, x), x = x.sibling;
    return S;
  }
  function o(S, x) {
    return S = qa(S, x), S.index = 0, S.sibling = null, S;
  }
  function i(S, x, C) {
    return S.index = C, e ? (C = S.alternate, C !== null ? (C = C.index, C < x ? (S.flags |= 2, x) : C) : (S.flags |= 2, x)) : (S.flags |= 1048576, x);
  }
  function s(S) {
    return e && S.alternate === null && (S.flags |= 2), S;
  }
  function l(S, x, C, E) {
    return x === null || x.tag !== 6 ? (x = HE(C, S.mode, E), x.return = S, x) : (x = o(x, C), x.return = S, x);
  }
  function c(S, x, C, E) {
    var N = C.type;
    return N === Fu ? d(S, x, C.props.children, E, C.key) : x !== null && (x.elementType === N || typeof N == "object" && N !== null && N.$$typeof === wa && x2(N) === x.type) ? (E = o(x, C.props), E.ref = Dd(S, x, C), E.return = S, E) : (E = Kg(C.type, C.key, C.props, null, S.mode, E), E.ref = Dd(S, x, C), E.return = S, E);
  }
  function f(S, x, C, E) {
    return x === null || x.tag !== 4 || x.stateNode.containerInfo !== C.containerInfo || x.stateNode.implementation !== C.implementation ? (x = WE(C, S.mode, E), x.return = S, x) : (x = o(x, C.children || []), x.return = S, x);
  }
  function d(S, x, C, E, N) {
    return x === null || x.tag !== 7 ? (x = oc(C, S.mode, E, N), x.return = S, x) : (x = o(x, C), x.return = S, x);
  }
  function g(S, x, C) {
    if (typeof x == "string" && x !== "" || typeof x == "number")
      return x = HE("" + x, S.mode, C), x.return = S, x;
    if (typeof x == "object" && x !== null) {
      switch (x.$$typeof) {
        case qm:
          return C = Kg(x.type, x.key, x.props, null, S.mode, C), C.ref = Dd(S, null, x), C.return = S, C;
        case Ru:
          return x = WE(x, S.mode, C), x.return = S, x;
        case wa:
          var E = x._init;
          return g(S, E(x._payload), C);
      }
      if (Vd(x) || kd(x))
        return x = oc(x, S.mode, C, null), x.return = S, x;
      eg(S, x);
    }
    return null;
  }
  function m(S, x, C, E) {
    var N = x !== null ? x.key : null;
    if (typeof C == "string" && C !== "" || typeof C == "number")
      return N !== null ? null : l(S, x, "" + C, E);
    if (typeof C == "object" && C !== null) {
      switch (C.$$typeof) {
        case qm:
          return C.key === N ? c(S, x, C, E) : null;
        case Ru:
          return C.key === N ? f(S, x, C, E) : null;
        case wa:
          return N = C._init, m(
            S,
            x,
            N(C._payload),
            E
          );
      }
      if (Vd(C) || kd(C))
        return N !== null ? null : d(S, x, C, E, null);
      eg(S, C);
    }
    return null;
  }
  function v(S, x, C, E, N) {
    if (typeof E == "string" && E !== "" || typeof E == "number")
      return S = S.get(C) || null, l(x, S, "" + E, N);
    if (typeof E == "object" && E !== null) {
      switch (E.$$typeof) {
        case qm:
          return S = S.get(E.key === null ? C : E.key) || null, c(x, S, E, N);
        case Ru:
          return S = S.get(E.key === null ? C : E.key) || null, f(x, S, E, N);
        case wa:
          var I = E._init;
          return v(S, x, C, I(E._payload), N);
      }
      if (Vd(E) || kd(E))
        return S = S.get(C) || null, d(x, S, E, N, null);
      eg(x, E);
    }
    return null;
  }
  function b(S, x, C, E) {
    for (var N = null, I = null, D = x, A = x = 0, F = null; D !== null && A < C.length; A++) {
      D.index > A ? (F = D, D = null) : F = D.sibling;
      var $ = m(S, D, C[A], E);
      if ($ === null) {
        D === null && (D = F);
        break;
      }
      e && D && $.alternate === null && t(S, D), x = i($, x, A), I === null ? N = $ : I.sibling = $, I = $, D = F;
    }
    if (A === C.length)
      return n(S, D), Kt && Bl(S, A), N;
    if (D === null) {
      for (; A < C.length; A++)
        D = g(S, C[A], E), D !== null && (x = i(D, x, A), I === null ? N = D : I.sibling = D, I = D);
      return Kt && Bl(S, A), N;
    }
    for (D = r(S, D); A < C.length; A++)
      F = v(D, S, A, C[A], E), F !== null && (e && F.alternate !== null && D.delete(F.key === null ? A : F.key), x = i(F, x, A), I === null ? N = F : I.sibling = F, I = F);
    return e && D.forEach(function(q) {
      return t(S, q);
    }), Kt && Bl(S, A), N;
  }
  function w(S, x, C, E) {
    var N = kd(C);
    if (typeof N != "function")
      throw Error(_e(150));
    if (C = N.call(C), C == null)
      throw Error(_e(151));
    for (var I = N = null, D = x, A = x = 0, F = null, $ = C.next(); D !== null && !$.done; A++, $ = C.next()) {
      D.index > A ? (F = D, D = null) : F = D.sibling;
      var q = m(S, D, $.value, E);
      if (q === null) {
        D === null && (D = F);
        break;
      }
      e && D && q.alternate === null && t(S, D), x = i(q, x, A), I === null ? N = q : I.sibling = q, I = q, D = F;
    }
    if ($.done)
      return n(
        S,
        D
      ), Kt && Bl(S, A), N;
    if (D === null) {
      for (; !$.done; A++, $ = C.next())
        $ = g(S, $.value, E), $ !== null && (x = i($, x, A), I === null ? N = $ : I.sibling = $, I = $);
      return Kt && Bl(S, A), N;
    }
    for (D = r(S, D); !$.done; A++, $ = C.next())
      $ = v(D, S, A, $.value, E), $ !== null && (e && $.alternate !== null && D.delete($.key === null ? A : $.key), x = i($, x, A), I === null ? N = $ : I.sibling = $, I = $);
    return e && D.forEach(function(H) {
      return t(S, H);
    }), Kt && Bl(S, A), N;
  }
  function _(S, x, C, E) {
    if (typeof C == "object" && C !== null && C.type === Fu && C.key === null && (C = C.props.children), typeof C == "object" && C !== null) {
      switch (C.$$typeof) {
        case qm:
          e: {
            for (var N = C.key, I = x; I !== null; ) {
              if (I.key === N) {
                if (N = C.type, N === Fu) {
                  if (I.tag === 7) {
                    n(S, I.sibling), x = o(I, C.props.children), x.return = S, S = x;
                    break e;
                  }
                } else if (I.elementType === N || typeof N == "object" && N !== null && N.$$typeof === wa && x2(N) === I.type) {
                  n(S, I.sibling), x = o(I, C.props), x.ref = Dd(S, I, C), x.return = S, S = x;
                  break e;
                }
                n(S, I);
                break;
              } else
                t(S, I);
              I = I.sibling;
            }
            C.type === Fu ? (x = oc(C.props.children, S.mode, E, C.key), x.return = S, S = x) : (E = Kg(C.type, C.key, C.props, null, S.mode, E), E.ref = Dd(S, x, C), E.return = S, S = E);
          }
          return s(S);
        case Ru:
          e: {
            for (I = C.key; x !== null; ) {
              if (x.key === I)
                if (x.tag === 4 && x.stateNode.containerInfo === C.containerInfo && x.stateNode.implementation === C.implementation) {
                  n(S, x.sibling), x = o(x, C.children || []), x.return = S, S = x;
                  break e;
                } else {
                  n(S, x);
                  break;
                }
              else
                t(S, x);
              x = x.sibling;
            }
            x = WE(C, S.mode, E), x.return = S, S = x;
          }
          return s(S);
        case wa:
          return I = C._init, _(S, x, I(C._payload), E);
      }
      if (Vd(C))
        return b(S, x, C, E);
      if (kd(C))
        return w(S, x, C, E);
      eg(S, C);
    }
    return typeof C == "string" && C !== "" || typeof C == "number" ? (C = "" + C, x !== null && x.tag === 6 ? (n(S, x.sibling), x = o(x, C), x.return = S, S = x) : (n(S, x), x = HE(C, S.mode, E), x.return = S, S = x), s(S)) : n(S, x);
  }
  return _;
}
var hf = YF(!0), KF = YF(!1), gh = {}, Xi = tl(gh), Np = tl(gh), Op = tl(gh);
function Jl(e) {
  if (e === gh)
    throw Error(_e(174));
  return e;
}
function FT(e, t) {
  switch ($t(Op, t), $t(Np, e), $t(Xi, gh), e = t.nodeType, e) {
    case 9:
    case 11:
      t = (t = t.documentElement) ? t.namespaceURI : nx(null, "");
      break;
    default:
      e = e === 8 ? t.parentNode : t, t = e.namespaceURI || null, e = e.tagName, t = nx(t, e);
  }
  Gt(Xi), $t(Xi, t);
}
function mf() {
  Gt(Xi), Gt(Np), Gt(Op);
}
function JF(e) {
  Jl(Op.current);
  var t = Jl(Xi.current), n = nx(t, e.type);
  t !== n && ($t(Np, e), $t(Xi, n));
}
function MT(e) {
  Np.current === e && (Gt(Xi), Gt(Np));
}
var sn = tl(0);
function Iv(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 VE = [];
function PT() {
  for (var e = 0; e < VE.length; e++)
    VE[e]._workInProgressVersionPrimary = null;
  VE.length = 0;
}
var Hg = Ys.ReactCurrentDispatcher, jE = Ys.ReactCurrentBatchConfig, dc = 0, ln = null, Mn = null, Qn = null, Lv = !1, ep = !1, Ap = 0, $9 = 0;
function Er() {
  throw Error(_e(321));
}
function $T(e, t) {
  if (t === null)
    return !1;
  for (var n = 0; n < t.length && n < e.length; n++)
    if (!Ai(e[n], t[n]))
      return !1;
  return !0;
}
function VT(e, t, n, r, o, i) {
  if (dc = i, ln = t, t.memoizedState = null, t.updateQueue = null, t.lanes = 0, Hg.current = e === null || e.memoizedState === null ? B9 : q9, e = n(r, o), ep) {
    i = 0;
    do {
      if (ep = !1, Ap = 0, 25 <= i)
        throw Error(_e(301));
      i += 1, Qn = Mn = null, t.updateQueue = null, Hg.current = z9, e = n(r, o);
    } while (ep);
  }
  if (Hg.current = Rv, t = Mn !== null && Mn.next !== null, dc = 0, Qn = Mn = ln = null, Lv = !1, t)
    throw Error(_e(300));
  return e;
}
function jT() {
  var e = Ap !== 0;
  return Ap = 0, e;
}
function Gi() {
  var e = { memoizedState: null, baseState: null, baseQueue: null, queue: null, next: null };
  return Qn === null ? ln.memoizedState = Qn = e : Qn = Qn.next = e, Qn;
}
function Xo() {
  if (Mn === null) {
    var e = ln.alternate;
    e = e !== null ? e.memoizedState : null;
  } else
    e = Mn.next;
  var t = Qn === null ? ln.memoizedState : Qn.next;
  if (t !== null)
    Qn = t, Mn = e;
  else {
    if (e === null)
      throw Error(_e(310));
    Mn = e, e = { memoizedState: Mn.memoizedState, baseState: Mn.baseState, baseQueue: Mn.baseQueue, queue: Mn.queue, next: null }, Qn === null ? ln.memoizedState = Qn = e : Qn = Qn.next = e;
  }
  return Qn;
}
function Dp(e, t) {
  return typeof t == "function" ? t(e) : t;
}
function UE(e) {
  var t = Xo(), n = t.queue;
  if (n === null)
    throw Error(_e(311));
  n.lastRenderedReducer = e;
  var r = Mn, o = r.baseQueue, i = n.pending;
  if (i !== null) {
    if (o !== null) {
      var s = o.next;
      o.next = i.next, i.next = s;
    }
    r.baseQueue = o = i, n.pending = null;
  }
  if (o !== null) {
    i = o.next, r = r.baseState;
    var l = s = null, c = null, f = i;
    do {
      var d = f.lane;
      if ((dc & d) === d)
        c !== null && (c = c.next = { lane: 0, action: f.action, hasEagerState: f.hasEagerState, eagerState: f.eagerState, next: null }), r = f.hasEagerState ? f.eagerState : e(r, f.action);
      else {
        var g = {
          lane: d,
          action: f.action,
          hasEagerState: f.hasEagerState,
          eagerState: f.eagerState,
          next: null
        };
        c === null ? (l = c = g, s = r) : c = c.next = g, ln.lanes |= d, pc |= d;
      }
      f = f.next;
    } while (f !== null && f !== i);
    c === null ? s = r : c.next = l, Ai(r, t.memoizedState) || (oo = !0), t.memoizedState = r, t.baseState = s, t.baseQueue = c, n.lastRenderedState = r;
  }
  if (e = n.interleaved, e !== null) {
    o = e;
    do
      i = o.lane, ln.lanes |= i, pc |= i, o = o.next;
    while (o !== e);
  } else
    o === null && (n.lanes = 0);
  return [t.memoizedState, n.dispatch];
}
function BE(e) {
  var t = Xo(), n = t.queue;
  if (n === null)
    throw Error(_e(311));
  n.lastRenderedReducer = e;
  var r = n.dispatch, o = n.pending, i = t.memoizedState;
  if (o !== null) {
    n.pending = null;
    var s = o = o.next;
    do
      i = e(i, s.action), s = s.next;
    while (s !== o);
    Ai(i, t.memoizedState) || (oo = !0), t.memoizedState = i, t.baseQueue === null && (t.baseState = i), n.lastRenderedState = i;
  }
  return [i, r];
}
function XF() {
}
function ZF(e, t) {
  var n = ln, r = Xo(), o = t(), i = !Ai(r.memoizedState, o);
  if (i && (r.memoizedState = o, oo = !0), r = r.queue, UT(nM.bind(null, n, r, e), [e]), r.getSnapshot !== t || i || Qn !== null && Qn.memoizedState.tag & 1) {
    if (n.flags |= 2048, Ip(9, tM.bind(null, n, r, o, t), void 0, null), Yn === null)
      throw Error(_e(349));
    dc & 30 || eM(n, t, o);
  }
  return o;
}
function eM(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 tM(e, t, n, r) {
  t.value = n, t.getSnapshot = r, rM(t) && oM(e);
}
function nM(e, t, n) {
  return n(function() {
    rM(t) && oM(e);
  });
}
function rM(e) {
  var t = e.getSnapshot;
  e = e.value;
  try {
    var n = t();
    return !Ai(e, n);
  } catch {
    return !0;
  }
}
function oM(e) {
  var t = Fs(e, 1);
  t !== null && Ci(t, e, 1, -1);
}
function S2(e) {
  var t = Gi();
  return typeof e == "function" && (e = e()), t.memoizedState = t.baseState = e, e = { pending: null, interleaved: null, lanes: 0, dispatch: null, lastRenderedReducer: Dp, lastRenderedState: e }, t.queue = e, e = e.dispatch = U9.bind(null, ln, e), [t.memoizedState, e];
}
function Ip(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 iM() {
  return Xo().memoizedState;
}
function Wg(e, t, n, r) {
  var o = Gi();
  ln.flags |= e, o.memoizedState = Ip(1 | t, n, void 0, r === void 0 ? null : r);
}
function ny(e, t, n, r) {
  var o = Xo();
  r = r === void 0 ? null : r;
  var i = void 0;
  if (Mn !== null) {
    var s = Mn.memoizedState;
    if (i = s.destroy, r !== null && $T(r, s.deps)) {
      o.memoizedState = Ip(t, n, i, r);
      return;
    }
  }
  ln.flags |= e, o.memoizedState = Ip(1 | t, n, i, r);
}
function T2(e, t) {
  return Wg(8390656, 8, e, t);
}
function UT(e, t) {
  return ny(2048, 8, e, t);
}
function sM(e, t) {
  return ny(4, 2, e, t);
}
function aM(e, t) {
  return ny(4, 4, e, t);
}
function lM(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 cM(e, t, n) {
  return n = n != null ? n.concat([e]) : null, ny(4, 4, lM.bind(null, t, e), n);
}
function BT() {
}
function uM(e, t) {
  var n = Xo();
  t = t === void 0 ? null : t;
  var r = n.memoizedState;
  return r !== null && t !== null && $T(t, r[1]) ? r[0] : (n.memoizedState = [e, t], e);
}
function fM(e, t) {
  var n = Xo();
  t = t === void 0 ? null : t;
  var r = n.memoizedState;
  return r !== null && t !== null && $T(t, r[1]) ? r[0] : (e = e(), n.memoizedState = [e, t], e);
}
function dM(e, t, n) {
  return dc & 21 ? (Ai(n, t) || (n = mF(), ln.lanes |= n, pc |= n, e.baseState = !0), t) : (e.baseState && (e.baseState = !1, oo = !0), e.memoizedState = n);
}
function V9(e, t) {
  var n = Ot;
  Ot = n !== 0 && 4 > n ? n : 4, e(!0);
  var r = jE.transition;
  jE.transition = {};
  try {
    e(!1), t();
  } finally {
    Ot = n, jE.transition = r;
  }
}
function pM() {
  return Xo().memoizedState;
}
function j9(e, t, n) {
  var r = Ba(e);
  if (n = { lane: r, action: n, hasEagerState: !1, eagerState: null, next: null }, hM(e))
    mM(t, n);
  else if (n = HF(e, t, n, r), n !== null) {
    var o = qr();
    Ci(n, e, r, o), gM(n, t, r);
  }
}
function U9(e, t, n) {
  var r = Ba(e), o = { lane: r, action: n, hasEagerState: !1, eagerState: null, next: null };
  if (hM(e))
    mM(t, o);
  else {
    var i = e.alternate;
    if (e.lanes === 0 && (i === null || i.lanes === 0) && (i = t.lastRenderedReducer, i !== null))
      try {
        var s = t.lastRenderedState, l = i(s, n);
        if (o.hasEagerState = !0, o.eagerState = l, Ai(l, s)) {
          var c = t.interleaved;
          c === null ? (o.next = o, LT(t)) : (o.next = c.next, c.next = o), t.interleaved = o;
          return;
        }
      } catch {
      } finally {
      }
    n = HF(e, t, o, r), n !== null && (o = qr(), Ci(n, e, r, o), gM(n, t, r));
  }
}
function hM(e) {
  var t = e.alternate;
  return e === ln || t !== null && t === ln;
}
function mM(e, t) {
  ep = Lv = !0;
  var n = e.pending;
  n === null ? t.next = t : (t.next = n.next, n.next = t), e.pending = t;
}
function gM(e, t, n) {
  if (n & 4194240) {
    var r = t.lanes;
    r &= e.pendingLanes, n |= r, t.lanes = n, bT(e, n);
  }
}
var Rv = { readContext: Jo, useCallback: Er, useContext: Er, useEffect: Er, useImperativeHandle: Er, useInsertionEffect: Er, useLayoutEffect: Er, useMemo: Er, useReducer: Er, useRef: Er, useState: Er, useDebugValue: Er, useDeferredValue: Er, useTransition: Er, useMutableSource: Er, useSyncExternalStore: Er, useId: Er, unstable_isNewReconciler: !1 }, B9 = { readContext: Jo, useCallback: function(e, t) {
  return Gi().memoizedState = [e, t === void 0 ? null : t], e;
}, useContext: Jo, useEffect: T2, useImperativeHandle: function(e, t, n) {
  return n = n != null ? n.concat([e]) : null, Wg(
    4194308,
    4,
    lM.bind(null, t, e),
    n
  );
}, useLayoutEffect: function(e, t) {
  return Wg(4194308, 4, e, t);
}, useInsertionEffect: function(e, t) {
  return Wg(4, 2, e, t);
}, useMemo: function(e, t) {
  var n = Gi();
  return t = t === void 0 ? null : t, e = e(), n.memoizedState = [e, t], e;
}, useReducer: function(e, t, n) {
  var r = Gi();
  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 = j9.bind(null, ln, e), [r.memoizedState, e];
}, useRef: function(e) {
  var t = Gi();
  return e = { current: e }, t.memoizedState = e;
}, useState: S2, useDebugValue: BT, useDeferredValue: function(e) {
  return Gi().memoizedState = e;
}, useTransition: function() {
  var e = S2(!1), t = e[0];
  return e = V9.bind(null, e[1]), Gi().memoizedState = e, [t, e];
}, useMutableSource: function() {
}, useSyncExternalStore: function(e, t, n) {
  var r = ln, o = Gi();
  if (Kt) {
    if (n === void 0)
      throw Error(_e(407));
    n = n();
  } else {
    if (n = t(), Yn === null)
      throw Error(_e(349));
    dc & 30 || eM(r, t, n);
  }
  o.memoizedState = n;
  var i = { value: n, getSnapshot: t };
  return o.queue = i, T2(nM.bind(
    null,
    r,
    i,
    e
  ), [e]), r.flags |= 2048, Ip(9, tM.bind(null, r, i, n, t), void 0, null), n;
}, useId: function() {
  var e = Gi(), t = Yn.identifierPrefix;
  if (Kt) {
    var n = ks, r = Cs;
    n = (r & ~(1 << 32 - Ti(r) - 1)).toString(32) + n, t = ":" + t + "R" + n, n = Ap++, 0 < n && (t += "H" + n.toString(32)), t += ":";
  } else
    n = $9++, t = ":" + t + "r" + n.toString(32) + ":";
  return e.memoizedState = t;
}, unstable_isNewReconciler: !1 }, q9 = {
  readContext: Jo,
  useCallback: uM,
  useContext: Jo,
  useEffect: UT,
  useImperativeHandle: cM,
  useInsertionEffect: sM,
  useLayoutEffect: aM,
  useMemo: fM,
  useReducer: UE,
  useRef: iM,
  useState: function() {
    return UE(Dp);
  },
  useDebugValue: BT,
  useDeferredValue: function(e) {
    var t = Xo();
    return dM(t, Mn.memoizedState, e);
  },
  useTransition: function() {
    var e = UE(Dp)[0], t = Xo().memoizedState;
    return [e, t];
  },
  useMutableSource: XF,
  useSyncExternalStore: ZF,
  useId: pM,
  unstable_isNewReconciler: !1
}, z9 = { readContext: Jo, useCallback: uM, useContext: Jo, useEffect: UT, useImperativeHandle: cM, useInsertionEffect: sM, useLayoutEffect: aM, useMemo: fM, useReducer: BE, useRef: iM, useState: function() {
  return BE(Dp);
}, useDebugValue: BT, useDeferredValue: function(e) {
  var t = Xo();
  return Mn === null ? t.memoizedState = e : dM(t, Mn.memoizedState, e);
}, useTransition: function() {
  var e = BE(Dp)[0], t = Xo().memoizedState;
  return [e, t];
}, useMutableSource: XF, useSyncExternalStore: ZF, useId: pM, unstable_isNewReconciler: !1 };
function gf(e, t) {
  try {
    var n = "", r = t;
    do
      n += y7(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 qE(e, t, n) {
  return { value: e, source: null, stack: n ?? null, digest: t ?? null };
}
function Cx(e, t) {
  try {
    console.error(t.value);
  } catch (n) {
    setTimeout(function() {
      throw n;
    });
  }
}
var H9 = typeof WeakMap == "function" ? WeakMap : Map;
function vM(e, t, n) {
  n = Ns(-1, n), n.tag = 3, n.payload = { element: null };
  var r = t.value;
  return n.callback = function() {
    Mv || (Mv = !0, Fx = r), Cx(e, t);
  }, n;
}
function yM(e, t, n) {
  n = Ns(-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() {
      Cx(e, t);
    };
  }
  var i = e.stateNode;
  return i !== null && typeof i.componentDidCatch == "function" && (n.callback = function() {
    Cx(e, t), typeof r != "function" && (Ua === null ? Ua = /* @__PURE__ */ new Set([this]) : Ua.add(this));
    var s = t.stack;
    this.componentDidCatch(t.value, { componentStack: s !== null ? s : "" });
  }), n;
}
function C2(e, t, n) {
  var r = e.pingCache;
  if (r === null) {
    r = e.pingCache = new H9();
    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 = ij.bind(null, e, t, n), t.then(e, e));
}
function k2(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 _2(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 = Ns(-1, 1), t.tag = 2, ja(n, t, 1))), n.lanes |= 1), e);
}
var W9 = Ys.ReactCurrentOwner, oo = !1;
function Ur(e, t, n, r) {
  t.child = e === null ? KF(t, null, n, r) : hf(t, e.child, n, r);
}
function N2(e, t, n, r, o) {
  n = n.render;
  var i = t.ref;
  return tf(t, o), r = VT(e, t, n, r, i, o), n = jT(), e !== null && !oo ? (t.updateQueue = e.updateQueue, t.flags &= -2053, e.lanes &= ~o, Ms(e, t, o)) : (Kt && n && _T(t), t.flags |= 1, Ur(e, t, r, o), t.child);
}
function O2(e, t, n, r, o) {
  if (e === null) {
    var i = n.type;
    return typeof i == "function" && !KT(i) && i.defaultProps === void 0 && n.compare === null && n.defaultProps === void 0 ? (t.tag = 15, t.type = i, bM(e, t, i, r, o)) : (e = Kg(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 s = i.memoizedProps;
    if (n = n.compare, n = n !== null ? n : Tp, n(s, r) && e.ref === t.ref)
      return Ms(e, t, o);
  }
  return t.flags |= 1, e = qa(i, r), e.ref = t.ref, e.return = t, t.child = e;
}
function bM(e, t, n, r, o) {
  if (e !== null) {
    var i = e.memoizedProps;
    if (Tp(i, r) && e.ref === t.ref)
      if (oo = !1, t.pendingProps = r = i, (e.lanes & o) !== 0)
        e.flags & 131072 && (oo = !0);
      else
        return t.lanes = e.lanes, Ms(e, t, o);
  }
  return kx(e, t, n, r, o);
}
function EM(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 }, $t(Hu, go), go |= 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, $t(Hu, go), go |= e, null;
      t.memoizedState = { baseLanes: 0, cachePool: null, transitions: null }, r = i !== null ? i.baseLanes : n, $t(Hu, go), go |= r;
    }
  else
    i !== null ? (r = i.baseLanes | n, t.memoizedState = null) : r = n, $t(Hu, go), go |= r;
  return Ur(e, t, o, n), t.child;
}
function wM(e, t) {
  var n = t.ref;
  (e === null && n !== null || e !== null && e.ref !== n) && (t.flags |= 512, t.flags |= 2097152);
}
function kx(e, t, n, r, o) {
  var i = ao(n) ? uc : _r.current;
  return i = df(t, i), tf(t, o), n = VT(e, t, n, r, i, o), r = jT(), e !== null && !oo ? (t.updateQueue = e.updateQueue, t.flags &= -2053, e.lanes &= ~o, Ms(e, t, o)) : (Kt && r && _T(t), t.flags |= 1, Ur(e, t, n, o), t.child);
}
function A2(e, t, n, r, o) {
  if (ao(n)) {
    var i = !0;
    kv(t);
  } else
    i = !1;
  if (tf(t, o), t.stateNode === null)
    Gg(e, t), QF(t, n, r), Tx(t, n, r, o), r = !0;
  else if (e === null) {
    var s = t.stateNode, l = t.memoizedProps;
    s.props = l;
    var c = s.context, f = n.contextType;
    typeof f == "object" && f !== null ? f = Jo(f) : (f = ao(n) ? uc : _r.current, f = df(t, f));
    var d = n.getDerivedStateFromProps, g = typeof d == "function" || typeof s.getSnapshotBeforeUpdate == "function";
    g || typeof s.UNSAFE_componentWillReceiveProps != "function" && typeof s.componentWillReceiveProps != "function" || (l !== r || c !== f) && w2(t, s, r, f), xa = !1;
    var m = t.memoizedState;
    s.state = m, Dv(t, r, s, o), c = t.memoizedState, l !== r || m !== c || so.current || xa ? (typeof d == "function" && (Sx(t, n, d, r), c = t.memoizedState), (l = xa || E2(t, n, l, r, m, c, f)) ? (g || typeof s.UNSAFE_componentWillMount != "function" && typeof s.componentWillMount != "function" || (typeof s.componentWillMount == "function" && s.componentWillMount(), typeof s.UNSAFE_componentWillMount == "function" && s.UNSAFE_componentWillMount()), typeof s.componentDidMount == "function" && (t.flags |= 4194308)) : (typeof s.componentDidMount == "function" && (t.flags |= 4194308), t.memoizedProps = r, t.memoizedState = c), s.props = r, s.state = c, s.context = f, r = l) : (typeof s.componentDidMount == "function" && (t.flags |= 4194308), r = !1);
  } else {
    s = t.stateNode, WF(e, t), l = t.memoizedProps, f = t.type === t.elementType ? l : mi(t.type, l), s.props = f, g = t.pendingProps, m = s.context, c = n.contextType, typeof c == "object" && c !== null ? c = Jo(c) : (c = ao(n) ? uc : _r.current, c = df(t, c));
    var v = n.getDerivedStateFromProps;
    (d = typeof v == "function" || typeof s.getSnapshotBeforeUpdate == "function") || typeof s.UNSAFE_componentWillReceiveProps != "function" && typeof s.componentWillReceiveProps != "function" || (l !== g || m !== c) && w2(t, s, r, c), xa = !1, m = t.memoizedState, s.state = m, Dv(t, r, s, o);
    var b = t.memoizedState;
    l !== g || m !== b || so.current || xa ? (typeof v == "function" && (Sx(t, n, v, r), b = t.memoizedState), (f = xa || E2(t, n, f, r, m, b, c) || !1) ? (d || typeof s.UNSAFE_componentWillUpdate != "function" && typeof s.componentWillUpdate != "function" || (typeof s.componentWillUpdate == "function" && s.componentWillUpdate(r, b, c), typeof s.UNSAFE_componentWillUpdate == "function" && s.UNSAFE_componentWillUpdate(r, b, c)), typeof s.componentDidUpdate == "function" && (t.flags |= 4), typeof s.getSnapshotBeforeUpdate == "function" && (t.flags |= 1024)) : (typeof s.componentDidUpdate != "function" || l === e.memoizedProps && m === e.memoizedState || (t.flags |= 4), typeof s.getSnapshotBeforeUpdate != "function" || l === e.memoizedProps && m === e.memoizedState || (t.flags |= 1024), t.memoizedProps = r, t.memoizedState = b), s.props = r, s.state = b, s.context = c, r = f) : (typeof s.componentDidUpdate != "function" || l === e.memoizedProps && m === e.memoizedState || (t.flags |= 4), typeof s.getSnapshotBeforeUpdate != "function" || l === e.memoizedProps && m === e.memoizedState || (t.flags |= 1024), r = !1);
  }
  return _x(e, t, n, r, i, o);
}
function _x(e, t, n, r, o, i) {
  wM(e, t);
  var s = (t.flags & 128) !== 0;
  if (!r && !s)
    return o && m2(t, n, !1), Ms(e, t, i);
  r = t.stateNode, W9.current = t;
  var l = s && typeof n.getDerivedStateFromError != "function" ? null : r.render();
  return t.flags |= 1, e !== null && s ? (t.child = hf(t, e.child, null, i), t.child = hf(t, null, l, i)) : Ur(e, t, l, i), t.memoizedState = r.state, o && m2(t, n, !0), t.child;
}
function xM(e) {
  var t = e.stateNode;
  t.pendingContext ? h2(e, t.pendingContext, t.pendingContext !== t.context) : t.context && h2(e, t.context, !1), FT(e, t.containerInfo);
}
function D2(e, t, n, r, o) {
  return pf(), OT(o), t.flags |= 256, Ur(e, t, n, r), t.child;
}
var Nx = { dehydrated: null, treeContext: null, retryLane: 0 };
function Ox(e) {
  return { baseLanes: e, cachePool: null, transitions: null };
}
function SM(e, t, n) {
  var r = t.pendingProps, o = sn.current, i = !1, s = (t.flags & 128) !== 0, l;
  if ((l = s) || (l = e !== null && e.memoizedState === null ? !1 : (o & 2) !== 0), l ? (i = !0, t.flags &= -129) : (e === null || e.memoizedState !== null) && (o |= 1), $t(sn, o & 1), e === null)
    return wx(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) : (s = r.children, e = r.fallback, i ? (r = t.mode, i = t.child, s = { mode: "hidden", children: s }, !(r & 1) && i !== null ? (i.childLanes = 0, i.pendingProps = s) : i = iy(s, r, 0, null), e = oc(e, r, n, null), i.return = t, e.return = t, i.sibling = e, t.child = i, t.child.memoizedState = Ox(n), t.memoizedState = Nx, e) : qT(t, s));
  if (o = e.memoizedState, o !== null && (l = o.dehydrated, l !== null))
    return G9(e, t, s, r, l, o, n);
  if (i) {
    i = r.fallback, s = t.mode, o = e.child, l = o.sibling;
    var c = { mode: "hidden", children: r.children };
    return !(s & 1) && t.child !== o ? (r = t.child, r.childLanes = 0, r.pendingProps = c, t.deletions = null) : (r = qa(o, c), r.subtreeFlags = o.subtreeFlags & 14680064), l !== null ? i = qa(l, i) : (i = oc(i, s, n, null), i.flags |= 2), i.return = t, r.return = t, r.sibling = i, t.child = r, r = i, i = t.child, s = e.child.memoizedState, s = s === null ? Ox(n) : { baseLanes: s.baseLanes | n, cachePool: null, transitions: s.transitions }, i.memoizedState = s, i.childLanes = e.childLanes & ~n, t.memoizedState = Nx, r;
  }
  return i = e.child, e = i.sibling, r = qa(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 qT(e, t) {
  return t = iy({ mode: "visible", children: t }, e.mode, 0, null), t.return = e, e.child = t;
}
function tg(e, t, n, r) {
  return r !== null && OT(r), hf(t, e.child, null, n), e = qT(t, t.pendingProps.children), e.flags |= 2, t.memoizedState = null, e;
}
function G9(e, t, n, r, o, i, s) {
  if (n)
    return t.flags & 256 ? (t.flags &= -257, r = qE(Error(_e(422))), tg(e, t, s, r)) : t.memoizedState !== null ? (t.child = e.child, t.flags |= 128, null) : (i = r.fallback, o = t.mode, r = iy({ mode: "visible", children: r.children }, o, 0, null), i = oc(i, o, s, null), i.flags |= 2, r.return = t, i.return = t, r.sibling = i, t.child = r, t.mode & 1 && hf(t, e.child, null, s), t.child.memoizedState = Ox(s), t.memoizedState = Nx, i);
  if (!(t.mode & 1))
    return tg(e, t, s, null);
  if (o.data === "$!") {
    if (r = o.nextSibling && o.nextSibling.dataset, r)
      var l = r.dgst;
    return r = l, i = Error(_e(419)), r = qE(i, r, void 0), tg(e, t, s, r);
  }
  if (l = (s & e.childLanes) !== 0, oo || l) {
    if (r = Yn, r !== null) {
      switch (s & -s) {
        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 | s) ? 0 : o, o !== 0 && o !== i.retryLane && (i.retryLane = o, Fs(e, o), Ci(r, e, o, -1));
    }
    return YT(), r = qE(Error(_e(421))), tg(e, t, s, r);
  }
  return o.data === "$?" ? (t.flags |= 128, t.child = e.child, t = sj.bind(null, e), o._reactRetry = t, null) : (e = i.treeContext, Eo = Va(o.nextSibling), wo = t, Kt = !0, yi = null, e !== null && (qo[zo++] = Cs, qo[zo++] = ks, qo[zo++] = fc, Cs = e.id, ks = e.overflow, fc = t), t = qT(t, r.children), t.flags |= 4096, t);
}
function I2(e, t, n) {
  e.lanes |= t;
  var r = e.alternate;
  r !== null && (r.lanes |= t), xx(e.return, t, n);
}
function zE(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 (Ur(e, t, r.children, n), r = sn.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 && I2(e, n, t);
          else if (e.tag === 19)
            I2(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 ($t(sn, 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 && Iv(e) === null && (o = n), n = n.sibling;
        n = o, n === null ? (o = t.child, t.child = null) : (o = n.sibling, n.sibling = null), zE(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 && Iv(e) === null) {
            t.child = o;
            break;
          }
          e = o.sibling, o.sibling = n, n = o, o = e;
        }
        zE(t, !0, n, null, i);
        break;
      case "together":
        zE(t, !1, null, null, void 0);
        break;
      default:
        t.memoizedState = null;
    }
  return t.child;
}
function Gg(e, t) {
  !(t.mode & 1) && e !== null && (e.alternate = null, t.alternate = null, t.flags |= 2);
}
function Ms(e, t, n) {
  if (e !== null && (t.dependencies = e.dependencies), pc |= t.lanes, !(n & t.childLanes))
    return null;
  if (e !== null && t.child !== e.child)
    throw Error(_e(153));
  if (t.child !== null) {
    for (e = t.child, n = qa(e, e.pendingProps), t.child = n, n.return = t; e.sibling !== null; )
      e = e.sibling, n = n.sibling = qa(e, e.pendingProps), n.return = t;
    n.sibling = null;
  }
  return t.child;
}
function Q9(e, t, n) {
  switch (t.tag) {
    case 3:
      xM(t), pf();
      break;
    case 5:
      JF(t);
      break;
    case 1:
      ao(t.type) && kv(t);
      break;
    case 4:
      FT(t, t.stateNode.containerInfo);
      break;
    case 10:
      var r = t.type._context, o = t.memoizedProps.value;
      $t(Ov, r._currentValue), r._currentValue = o;
      break;
    case 13:
      if (r = t.memoizedState, r !== null)
        return r.dehydrated !== null ? ($t(sn, sn.current & 1), t.flags |= 128, null) : n & t.child.childLanes ? SM(e, t, n) : ($t(sn, sn.current & 1), e = Ms(e, t, n), e !== null ? e.sibling : null);
      $t(sn, sn.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), $t(sn, sn.current), r)
        break;
      return null;
    case 22:
    case 23:
      return t.lanes = 0, EM(e, t, n);
  }
  return Ms(e, t, n);
}
var CM, Ax, kM, _M;
CM = 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;
  }
};
Ax = function() {
};
kM = function(e, t, n, r) {
  var o = e.memoizedProps;
  if (o !== r) {
    e = t.stateNode, Jl(Xi.current);
    var i = null;
    switch (n) {
      case "input":
        o = Xw(e, o), r = Xw(e, r), i = [];
        break;
      case "select":
        o = cn({}, o, { value: void 0 }), r = cn({}, r, { value: void 0 }), i = [];
        break;
      case "textarea":
        o = tx(e, o), r = tx(e, r), i = [];
        break;
      default:
        typeof o.onClick != "function" && typeof r.onClick == "function" && (e.onclick = Tv);
    }
    rx(n, r);
    var s;
    n = null;
    for (f in o)
      if (!r.hasOwnProperty(f) && o.hasOwnProperty(f) && o[f] != null)
        if (f === "style") {
          var l = o[f];
          for (s in l)
            l.hasOwnProperty(s) && (n || (n = {}), n[s] = "");
        } else
          f !== "dangerouslySetInnerHTML" && f !== "children" && f !== "suppressContentEditableWarning" && f !== "suppressHydrationWarning" && f !== "autoFocus" && (vp.hasOwnProperty(f) ? i || (i = []) : (i = i || []).push(f, null));
    for (f in r) {
      var c = r[f];
      if (l = o != null ? o[f] : void 0, r.hasOwnProperty(f) && c !== l && (c != null || l != null))
        if (f === "style")
          if (l) {
            for (s in l)
              !l.hasOwnProperty(s) || c && c.hasOwnProperty(s) || (n || (n = {}), n[s] = "");
            for (s in c)
              c.hasOwnProperty(s) && l[s] !== c[s] && (n || (n = {}), n[s] = c[s]);
          } else
            n || (i || (i = []), i.push(
              f,
              n
            )), n = c;
        else
          f === "dangerouslySetInnerHTML" ? (c = c ? c.__html : void 0, l = l ? l.__html : void 0, c != null && l !== c && (i = i || []).push(f, c)) : f === "children" ? typeof c != "string" && typeof c != "number" || (i = i || []).push(f, "" + c) : f !== "suppressContentEditableWarning" && f !== "suppressHydrationWarning" && (vp.hasOwnProperty(f) ? (c != null && f === "onScroll" && Bt("scroll", e), i || l === c || (i = [])) : (i = i || []).push(f, c));
    }
    n && (i = i || []).push("style", n);
    var f = i;
    (t.updateQueue = f) && (t.flags |= 4);
  }
};
_M = function(e, t, n, r) {
  n !== r && (t.flags |= 4);
};
function Id(e, t) {
  if (!Kt)
    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 wr(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 Y9(e, t, n) {
  var r = t.pendingProps;
  switch (NT(t), t.tag) {
    case 2:
    case 16:
    case 15:
    case 0:
    case 11:
    case 7:
    case 8:
    case 12:
    case 9:
    case 14:
      return wr(t), null;
    case 1:
      return ao(t.type) && Cv(), wr(t), null;
    case 3:
      return r = t.stateNode, mf(), Gt(so), Gt(_r), PT(), r.pendingContext && (r.context = r.pendingContext, r.pendingContext = null), (e === null || e.child === null) && (Zm(t) ? t.flags |= 4 : e === null || e.memoizedState.isDehydrated && !(t.flags & 256) || (t.flags |= 1024, yi !== null && ($x(yi), yi = null))), Ax(e, t), wr(t), null;
    case 5:
      MT(t);
      var o = Jl(Op.current);
      if (n = t.type, e !== null && t.stateNode != null)
        kM(e, t, n, r, o), e.ref !== t.ref && (t.flags |= 512, t.flags |= 2097152);
      else {
        if (!r) {
          if (t.stateNode === null)
            throw Error(_e(166));
          return wr(t), null;
        }
        if (e = Jl(Xi.current), Zm(t)) {
          r = t.stateNode, n = t.type;
          var i = t.memoizedProps;
          switch (r[Yi] = t, r[_p] = i, e = (t.mode & 1) !== 0, n) {
            case "dialog":
              Bt("cancel", r), Bt("close", r);
              break;
            case "iframe":
            case "object":
            case "embed":
              Bt("load", r);
              break;
            case "video":
            case "audio":
              for (o = 0; o < Ud.length; o++)
                Bt(Ud[o], r);
              break;
            case "source":
              Bt("error", r);
              break;
            case "img":
            case "image":
            case "link":
              Bt(
                "error",
                r
              ), Bt("load", r);
              break;
            case "details":
              Bt("toggle", r);
              break;
            case "input":
              UO(r, i), Bt("invalid", r);
              break;
            case "select":
              r._wrapperState = { wasMultiple: !!i.multiple }, Bt("invalid", r);
              break;
            case "textarea":
              qO(r, i), Bt("invalid", r);
          }
          rx(n, i), o = null;
          for (var s in i)
            if (i.hasOwnProperty(s)) {
              var l = i[s];
              s === "children" ? typeof l == "string" ? r.textContent !== l && (i.suppressHydrationWarning !== !0 && Xm(r.textContent, l, e), o = ["children", l]) : typeof l == "number" && r.textContent !== "" + l && (i.suppressHydrationWarning !== !0 && Xm(
                r.textContent,
                l,
                e
              ), o = ["children", "" + l]) : vp.hasOwnProperty(s) && l != null && s === "onScroll" && Bt("scroll", r);
            }
          switch (n) {
            case "input":
              zm(r), BO(r, i, !0);
              break;
            case "textarea":
              zm(r), zO(r);
              break;
            case "select":
            case "option":
              break;
            default:
              typeof i.onClick == "function" && (r.onclick = Tv);
          }
          r = o, t.updateQueue = r, r !== null && (t.flags |= 4);
        } else {
          s = o.nodeType === 9 ? o : o.ownerDocument, e === "http://www.w3.org/1999/xhtml" && (e = eF(n)), e === "http://www.w3.org/1999/xhtml" ? n === "script" ? (e = s.createElement("div"), e.innerHTML = "<script><\/script>", e = e.removeChild(e.firstChild)) : typeof r.is == "string" ? e = s.createElement(n, { is: r.is }) : (e = s.createElement(n), n === "select" && (s = e, r.multiple ? s.multiple = !0 : r.size && (s.size = r.size))) : e = s.createElementNS(e, n), e[Yi] = t, e[_p] = r, CM(e, t, !1, !1), t.stateNode = e;
          e: {
            switch (s = ox(n, r), n) {
              case "dialog":
                Bt("cancel", e), Bt("close", e), o = r;
                break;
              case "iframe":
              case "object":
              case "embed":
                Bt("load", e), o = r;
                break;
              case "video":
              case "audio":
                for (o = 0; o < Ud.length; o++)
                  Bt(Ud[o], e);
                o = r;
                break;
              case "source":
                Bt("error", e), o = r;
                break;
              case "img":
              case "image":
              case "link":
                Bt(
                  "error",
                  e
                ), Bt("load", e), o = r;
                break;
              case "details":
                Bt("toggle", e), o = r;
                break;
              case "input":
                UO(e, r), o = Xw(e, r), Bt("invalid", e);
                break;
              case "option":
                o = r;
                break;
              case "select":
                e._wrapperState = { wasMultiple: !!r.multiple }, o = cn({}, r, { value: void 0 }), Bt("invalid", e);
                break;
              case "textarea":
                qO(e, r), o = tx(e, r), Bt("invalid", e);
                break;
              default:
                o = r;
            }
            rx(n, o), l = o;
            for (i in l)
              if (l.hasOwnProperty(i)) {
                var c = l[i];
                i === "style" ? rF(e, c) : i === "dangerouslySetInnerHTML" ? (c = c ? c.__html : void 0, c != null && tF(e, c)) : i === "children" ? typeof c == "string" ? (n !== "textarea" || c !== "") && yp(e, c) : typeof c == "number" && yp(e, "" + c) : i !== "suppressContentEditableWarning" && i !== "suppressHydrationWarning" && i !== "autoFocus" && (vp.hasOwnProperty(i) ? c != null && i === "onScroll" && Bt("scroll", e) : c != null && pT(e, i, c, s));
              }
            switch (n) {
              case "input":
                zm(e), BO(e, r, !1);
                break;
              case "textarea":
                zm(e), zO(e);
                break;
              case "option":
                r.value != null && e.setAttribute("value", "" + Ha(r.value));
                break;
              case "select":
                e.multiple = !!r.multiple, i = r.value, i != null ? Ju(e, !!r.multiple, i, !1) : r.defaultValue != null && Ju(
                  e,
                  !!r.multiple,
                  r.defaultValue,
                  !0
                );
                break;
              default:
                typeof o.onClick == "function" && (e.onclick = Tv);
            }
            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 wr(t), null;
    case 6:
      if (e && t.stateNode != null)
        _M(e, t, e.memoizedProps, r);
      else {
        if (typeof r != "string" && t.stateNode === null)
          throw Error(_e(166));
        if (n = Jl(Op.current), Jl(Xi.current), Zm(t)) {
          if (r = t.stateNode, n = t.memoizedProps, r[Yi] = t, (i = r.nodeValue !== n) && (e = wo, e !== null))
            switch (e.tag) {
              case 3:
                Xm(r.nodeValue, n, (e.mode & 1) !== 0);
                break;
              case 5:
                e.memoizedProps.suppressHydrationWarning !== !0 && Xm(r.nodeValue, n, (e.mode & 1) !== 0);
            }
          i && (t.flags |= 4);
        } else
          r = (n.nodeType === 9 ? n : n.ownerDocument).createTextNode(r), r[Yi] = t, t.stateNode = r;
      }
      return wr(t), null;
    case 13:
      if (Gt(sn), r = t.memoizedState, e === null || e.memoizedState !== null && e.memoizedState.dehydrated !== null) {
        if (Kt && Eo !== null && t.mode & 1 && !(t.flags & 128))
          zF(), pf(), t.flags |= 98560, i = !1;
        else if (i = Zm(t), r !== null && r.dehydrated !== null) {
          if (e === null) {
            if (!i)
              throw Error(_e(318));
            if (i = t.memoizedState, i = i !== null ? i.dehydrated : null, !i)
              throw Error(_e(317));
            i[Yi] = t;
          } else
            pf(), !(t.flags & 128) && (t.memoizedState = null), t.flags |= 4;
          wr(t), i = !1;
        } else
          yi !== null && ($x(yi), yi = 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 || sn.current & 1 ? Un === 0 && (Un = 3) : YT())), t.updateQueue !== null && (t.flags |= 4), wr(t), null);
    case 4:
      return mf(), Ax(e, t), e === null && Cp(t.stateNode.containerInfo), wr(t), null;
    case 10:
      return IT(t.type._context), wr(t), null;
    case 17:
      return ao(t.type) && Cv(), wr(t), null;
    case 19:
      if (Gt(sn), i = t.memoizedState, i === null)
        return wr(t), null;
      if (r = (t.flags & 128) !== 0, s = i.rendering, s === null)
        if (r)
          Id(i, !1);
        else {
          if (Un !== 0 || e !== null && e.flags & 128)
            for (e = t.child; e !== null; ) {
              if (s = Iv(e), s !== null) {
                for (t.flags |= 128, Id(i, !1), r = s.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, s = i.alternate, s === 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 = s.childLanes, i.lanes = s.lanes, i.child = s.child, i.subtreeFlags = 0, i.deletions = null, i.memoizedProps = s.memoizedProps, i.memoizedState = s.memoizedState, i.updateQueue = s.updateQueue, i.type = s.type, e = s.dependencies, i.dependencies = e === null ? null : { lanes: e.lanes, firstContext: e.firstContext }), n = n.sibling;
                return $t(sn, sn.current & 1 | 2), t.child;
              }
              e = e.sibling;
            }
          i.tail !== null && bn() > vf && (t.flags |= 128, r = !0, Id(i, !1), t.lanes = 4194304);
        }
      else {
        if (!r)
          if (e = Iv(s), e !== null) {
            if (t.flags |= 128, r = !0, n = e.updateQueue, n !== null && (t.updateQueue = n, t.flags |= 4), Id(i, !0), i.tail === null && i.tailMode === "hidden" && !s.alternate && !Kt)
              return wr(t), null;
          } else
            2 * bn() - i.renderingStartTime > vf && n !== 1073741824 && (t.flags |= 128, r = !0, Id(i, !1), t.lanes = 4194304);
        i.isBackwards ? (s.sibling = t.child, t.child = s) : (n = i.last, n !== null ? n.sibling = s : t.child = s, i.last = s);
      }
      return i.tail !== null ? (t = i.tail, i.rendering = t, i.tail = t.sibling, i.renderingStartTime = bn(), t.sibling = null, n = sn.current, $t(sn, r ? n & 1 | 2 : n & 1), t) : (wr(t), null);
    case 22:
    case 23:
      return QT(), r = t.memoizedState !== null, e !== null && e.memoizedState !== null !== r && (t.flags |= 8192), r && t.mode & 1 ? go & 1073741824 && (wr(t), t.subtreeFlags & 6 && (t.flags |= 8192)) : wr(t), null;
    case 24:
      return null;
    case 25:
      return null;
  }
  throw Error(_e(156, t.tag));
}
function K9(e, t) {
  switch (NT(t), t.tag) {
    case 1:
      return ao(t.type) && Cv(), e = t.flags, e & 65536 ? (t.flags = e & -65537 | 128, t) : null;
    case 3:
      return mf(), Gt(so), Gt(_r), PT(), e = t.flags, e & 65536 && !(e & 128) ? (t.flags = e & -65537 | 128, t) : null;
    case 5:
      return MT(t), null;
    case 13:
      if (Gt(sn), e = t.memoizedState, e !== null && e.dehydrated !== null) {
        if (t.alternate === null)
          throw Error(_e(340));
        pf();
      }
      return e = t.flags, e & 65536 ? (t.flags = e & -65537 | 128, t) : null;
    case 19:
      return Gt(sn), null;
    case 4:
      return mf(), null;
    case 10:
      return IT(t.type._context), null;
    case 22:
    case 23:
      return QT(), null;
    case 24:
      return null;
    default:
      return null;
  }
}
var ng = !1, Tr = !1, J9 = typeof WeakSet == "function" ? WeakSet : Set, $e = null;
function zu(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 Dx(e, t, n) {
  try {
    n();
  } catch (r) {
    fn(e, t, r);
  }
}
var L2 = !1;
function X9(e, t) {
  if (hx = wv, e = DF(), kT(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 s = 0, l = -1, c = -1, f = 0, d = 0, g = e, m = null;
          t:
            for (; ; ) {
              for (var v; g !== n || o !== 0 && g.nodeType !== 3 || (l = s + o), g !== i || r !== 0 && g.nodeType !== 3 || (c = s + r), g.nodeType === 3 && (s += g.nodeValue.length), (v = g.firstChild) !== null; )
                m = g, g = v;
              for (; ; ) {
                if (g === e)
                  break t;
                if (m === n && ++f === o && (l = s), m === i && ++d === r && (c = s), (v = g.nextSibling) !== null)
                  break;
                g = m, m = g.parentNode;
              }
              g = v;
            }
          n = l === -1 || c === -1 ? null : { start: l, end: c };
        } else
          n = null;
      }
    n = n || { start: 0, end: 0 };
  } else
    n = null;
  for (mx = { focusedElem: e, selectionRange: n }, wv = !1, $e = t; $e !== null; )
    if (t = $e, e = t.child, (t.subtreeFlags & 1028) !== 0 && e !== null)
      e.return = t, $e = e;
    else
      for (; $e !== null; ) {
        t = $e;
        try {
          var b = t.alternate;
          if (t.flags & 1024)
            switch (t.tag) {
              case 0:
              case 11:
              case 15:
                break;
              case 1:
                if (b !== null) {
                  var w = b.memoizedProps, _ = b.memoizedState, S = t.stateNode, x = S.getSnapshotBeforeUpdate(t.elementType === t.type ? w : mi(t.type, w), _);
                  S.__reactInternalSnapshotBeforeUpdate = x;
                }
                break;
              case 3:
                var C = t.stateNode.containerInfo;
                C.nodeType === 1 ? C.textContent = "" : C.nodeType === 9 && C.documentElement && C.removeChild(C.documentElement);
                break;
              case 5:
              case 6:
              case 4:
              case 17:
                break;
              default:
                throw Error(_e(163));
            }
        } catch (E) {
          fn(t, t.return, E);
        }
        if (e = t.sibling, e !== null) {
          e.return = t.return, $e = e;
          break;
        }
        $e = t.return;
      }
  return b = L2, L2 = !1, b;
}
function tp(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 && Dx(t, n, i);
      }
      o = o.next;
    } while (o !== r);
  }
}
function ry(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 Ix(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 NM(e) {
  var t = e.alternate;
  t !== null && (e.alternate = null, NM(t)), e.child = null, e.deletions = null, e.sibling = null, e.tag === 5 && (t = e.stateNode, t !== null && (delete t[Yi], delete t[_p], delete t[yx], delete t[R9], delete t[F9])), 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 OM(e) {
  return e.tag === 5 || e.tag === 3 || e.tag === 4;
}
function R2(e) {
  e:
    for (; ; ) {
      for (; e.sibling === null; ) {
        if (e.return === null || OM(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 Lx(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 = Tv));
  else if (r !== 4 && (e = e.child, e !== null))
    for (Lx(e, t, n), e = e.sibling; e !== null; )
      Lx(e, t, n), e = e.sibling;
}
function Rx(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 (Rx(e, t, n), e = e.sibling; e !== null; )
      Rx(e, t, n), e = e.sibling;
}
var sr = null, gi = !1;
function ga(e, t, n) {
  for (n = n.child; n !== null; )
    AM(e, t, n), n = n.sibling;
}
function AM(e, t, n) {
  if (Ji && typeof Ji.onCommitFiberUnmount == "function")
    try {
      Ji.onCommitFiberUnmount(Y0, n);
    } catch {
    }
  switch (n.tag) {
    case 5:
      Tr || zu(n, t);
    case 6:
      var r = sr, o = gi;
      sr = null, ga(e, t, n), sr = r, gi = o, sr !== null && (gi ? (e = sr, n = n.stateNode, e.nodeType === 8 ? e.parentNode.removeChild(n) : e.removeChild(n)) : sr.removeChild(n.stateNode));
      break;
    case 18:
      sr !== null && (gi ? (e = sr, n = n.stateNode, e.nodeType === 8 ? PE(e.parentNode, n) : e.nodeType === 1 && PE(e, n), xp(e)) : PE(sr, n.stateNode));
      break;
    case 4:
      r = sr, o = gi, sr = n.stateNode.containerInfo, gi = !0, ga(e, t, n), sr = r, gi = o;
      break;
    case 0:
    case 11:
    case 14:
    case 15:
      if (!Tr && (r = n.updateQueue, r !== null && (r = r.lastEffect, r !== null))) {
        o = r = r.next;
        do {
          var i = o, s = i.destroy;
          i = i.tag, s !== void 0 && (i & 2 || i & 4) && Dx(n, t, s), o = o.next;
        } while (o !== r);
      }
      ga(e, t, n);
      break;
    case 1:
      if (!Tr && (zu(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);
        }
      ga(e, t, n);
      break;
    case 21:
      ga(e, t, n);
      break;
    case 22:
      n.mode & 1 ? (Tr = (r = Tr) || n.memoizedState !== null, ga(e, t, n), Tr = r) : ga(e, t, n);
      break;
    default:
      ga(e, t, n);
  }
}
function F2(e) {
  var t = e.updateQueue;
  if (t !== null) {
    e.updateQueue = null;
    var n = e.stateNode;
    n === null && (n = e.stateNode = new J9()), t.forEach(function(r) {
      var o = aj.bind(null, e, r);
      n.has(r) || (n.add(r), r.then(o, o));
    });
  }
}
function fi(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, s = t, l = s;
        e:
          for (; l !== null; ) {
            switch (l.tag) {
              case 5:
                sr = l.stateNode, gi = !1;
                break e;
              case 3:
                sr = l.stateNode.containerInfo, gi = !0;
                break e;
              case 4:
                sr = l.stateNode.containerInfo, gi = !0;
                break e;
            }
            l = l.return;
          }
        if (sr === null)
          throw Error(_e(160));
        AM(i, s, o), sr = null, gi = !1;
        var c = o.alternate;
        c !== null && (c.return = null), o.return = null;
      } catch (f) {
        fn(o, t, f);
      }
    }
  if (t.subtreeFlags & 12854)
    for (t = t.child; t !== null; )
      DM(t, e), t = t.sibling;
}
function DM(e, t) {
  var n = e.alternate, r = e.flags;
  switch (e.tag) {
    case 0:
    case 11:
    case 14:
    case 15:
      if (fi(t, e), Wi(e), r & 4) {
        try {
          tp(3, e, e.return), ry(3, e);
        } catch (w) {
          fn(e, e.return, w);
        }
        try {
          tp(5, e, e.return);
        } catch (w) {
          fn(e, e.return, w);
        }
      }
      break;
    case 1:
      fi(t, e), Wi(e), r & 512 && n !== null && zu(n, n.return);
      break;
    case 5:
      if (fi(t, e), Wi(e), r & 512 && n !== null && zu(n, n.return), e.flags & 32) {
        var o = e.stateNode;
        try {
          yp(o, "");
        } catch (w) {
          fn(e, e.return, w);
        }
      }
      if (r & 4 && (o = e.stateNode, o != null)) {
        var i = e.memoizedProps, s = n !== null ? n.memoizedProps : i, l = e.type, c = e.updateQueue;
        if (e.updateQueue = null, c !== null)
          try {
            l === "input" && i.type === "radio" && i.name != null && XR(o, i), ox(l, s);
            var f = ox(l, i);
            for (s = 0; s < c.length; s += 2) {
              var d = c[s], g = c[s + 1];
              d === "style" ? rF(o, g) : d === "dangerouslySetInnerHTML" ? tF(o, g) : d === "children" ? yp(o, g) : pT(o, d, g, f);
            }
            switch (l) {
              case "input":
                Zw(o, i);
                break;
              case "textarea":
                ZR(o, i);
                break;
              case "select":
                var m = o._wrapperState.wasMultiple;
                o._wrapperState.wasMultiple = !!i.multiple;
                var v = i.value;
                v != null ? Ju(o, !!i.multiple, v, !1) : m !== !!i.multiple && (i.defaultValue != null ? Ju(
                  o,
                  !!i.multiple,
                  i.defaultValue,
                  !0
                ) : Ju(o, !!i.multiple, i.multiple ? [] : "", !1));
            }
            o[_p] = i;
          } catch (w) {
            fn(e, e.return, w);
          }
      }
      break;
    case 6:
      if (fi(t, e), Wi(e), r & 4) {
        if (e.stateNode === null)
          throw Error(_e(162));
        o = e.stateNode, i = e.memoizedProps;
        try {
          o.nodeValue = i;
        } catch (w) {
          fn(e, e.return, w);
        }
      }
      break;
    case 3:
      if (fi(t, e), Wi(e), r & 4 && n !== null && n.memoizedState.isDehydrated)
        try {
          xp(t.containerInfo);
        } catch (w) {
          fn(e, e.return, w);
        }
      break;
    case 4:
      fi(t, e), Wi(e);
      break;
    case 13:
      fi(t, e), Wi(e), o = e.child, o.flags & 8192 && (i = o.memoizedState !== null, o.stateNode.isHidden = i, !i || o.alternate !== null && o.alternate.memoizedState !== null || (WT = bn())), r & 4 && F2(e);
      break;
    case 22:
      if (d = n !== null && n.memoizedState !== null, e.mode & 1 ? (Tr = (f = Tr) || d, fi(t, e), Tr = f) : fi(t, e), Wi(e), r & 8192) {
        if (f = e.memoizedState !== null, (e.stateNode.isHidden = f) && !d && e.mode & 1)
          for ($e = e, d = e.child; d !== null; ) {
            for (g = $e = d; $e !== null; ) {
              switch (m = $e, v = m.child, m.tag) {
                case 0:
                case 11:
                case 14:
                case 15:
                  tp(4, m, m.return);
                  break;
                case 1:
                  zu(m, m.return);
                  var b = m.stateNode;
                  if (typeof b.componentWillUnmount == "function") {
                    r = m, n = m.return;
                    try {
                      t = r, b.props = t.memoizedProps, b.state = t.memoizedState, b.componentWillUnmount();
                    } catch (w) {
                      fn(r, n, w);
                    }
                  }
                  break;
                case 5:
                  zu(m, m.return);
                  break;
                case 22:
                  if (m.memoizedState !== null) {
                    P2(g);
                    continue;
                  }
              }
              v !== null ? (v.return = m, $e = v) : P2(g);
            }
            d = d.sibling;
          }
        e:
          for (d = null, g = e; ; ) {
            if (g.tag === 5) {
              if (d === null) {
                d = g;
                try {
                  o = g.stateNode, f ? (i = o.style, typeof i.setProperty == "function" ? i.setProperty("display", "none", "important") : i.display = "none") : (l = g.stateNode, c = g.memoizedProps.style, s = c != null && c.hasOwnProperty("display") ? c.display : null, l.style.display = nF("display", s));
                } catch (w) {
                  fn(e, e.return, w);
                }
              }
            } else if (g.tag === 6) {
              if (d === null)
                try {
                  g.stateNode.nodeValue = f ? "" : g.memoizedProps;
                } catch (w) {
                  fn(e, e.return, w);
                }
            } else if ((g.tag !== 22 && g.tag !== 23 || g.memoizedState === null || g === e) && g.child !== null) {
              g.child.return = g, g = g.child;
              continue;
            }
            if (g === e)
              break e;
            for (; g.sibling === null; ) {
              if (g.return === null || g.return === e)
                break e;
              d === g && (d = null), g = g.return;
            }
            d === g && (d = null), g.sibling.return = g.return, g = g.sibling;
          }
      }
      break;
    case 19:
      fi(t, e), Wi(e), r & 4 && F2(e);
      break;
    case 21:
      break;
    default:
      fi(
        t,
        e
      ), Wi(e);
  }
}
function Wi(e) {
  var t = e.flags;
  if (t & 2) {
    try {
      e: {
        for (var n = e.return; n !== null; ) {
          if (OM(n)) {
            var r = n;
            break e;
          }
          n = n.return;
        }
        throw Error(_e(160));
      }
      switch (r.tag) {
        case 5:
          var o = r.stateNode;
          r.flags & 32 && (yp(o, ""), r.flags &= -33);
          var i = R2(e);
          Rx(e, i, o);
          break;
        case 3:
        case 4:
          var s = r.stateNode.containerInfo, l = R2(e);
          Lx(e, l, s);
          break;
        default:
          throw Error(_e(161));
      }
    } catch (c) {
      fn(e, e.return, c);
    }
    e.flags &= -3;
  }
  t & 4096 && (e.flags &= -4097);
}
function Z9(e, t, n) {
  $e = e, IM(e);
}
function IM(e, t, n) {
  for (var r = (e.mode & 1) !== 0; $e !== null; ) {
    var o = $e, i = o.child;
    if (o.tag === 22 && r) {
      var s = o.memoizedState !== null || ng;
      if (!s) {
        var l = o.alternate, c = l !== null && l.memoizedState !== null || Tr;
        l = ng;
        var f = Tr;
        if (ng = s, (Tr = c) && !f)
          for ($e = o; $e !== null; )
            s = $e, c = s.child, s.tag === 22 && s.memoizedState !== null ? $2(o) : c !== null ? (c.return = s, $e = c) : $2(o);
        for (; i !== null; )
          $e = i, IM(i), i = i.sibling;
        $e = o, ng = l, Tr = f;
      }
      M2(e);
    } else
      o.subtreeFlags & 8772 && i !== null ? (i.return = o, $e = i) : M2(e);
  }
}
function M2(e) {
  for (; $e !== null; ) {
    var t = $e;
    if (t.flags & 8772) {
      var n = t.alternate;
      try {
        if (t.flags & 8772)
          switch (t.tag) {
            case 0:
            case 11:
            case 15:
              Tr || ry(5, t);
              break;
            case 1:
              var r = t.stateNode;
              if (t.flags & 4 && !Tr)
                if (n === null)
                  r.componentDidMount();
                else {
                  var o = t.elementType === t.type ? n.memoizedProps : mi(t.type, n.memoizedProps);
                  r.componentDidUpdate(o, n.memoizedState, r.__reactInternalSnapshotBeforeUpdate);
                }
              var i = t.updateQueue;
              i !== null && b2(t, i, r);
              break;
            case 3:
              var s = t.updateQueue;
              if (s !== null) {
                if (n = null, t.child !== null)
                  switch (t.child.tag) {
                    case 5:
                      n = t.child.stateNode;
                      break;
                    case 1:
                      n = t.child.stateNode;
                  }
                b2(t, s, n);
              }
              break;
            case 5:
              var l = t.stateNode;
              if (n === null && t.flags & 4) {
                n = l;
                var c = t.memoizedProps;
                switch (t.type) {
                  case "button":
                  case "input":
                  case "select":
                  case "textarea":
                    c.autoFocus && n.focus();
                    break;
                  case "img":
                    c.src && (n.src = c.src);
                }
              }
              break;
            case 6:
              break;
            case 4:
              break;
            case 12:
              break;
            case 13:
              if (t.memoizedState === null) {
                var f = t.alternate;
                if (f !== null) {
                  var d = f.memoizedState;
                  if (d !== null) {
                    var g = d.dehydrated;
                    g !== null && xp(g);
                  }
                }
              }
              break;
            case 19:
            case 17:
            case 21:
            case 22:
            case 23:
            case 25:
              break;
            default:
              throw Error(_e(163));
          }
        Tr || t.flags & 512 && Ix(t);
      } catch (m) {
        fn(t, t.return, m);
      }
    }
    if (t === e) {
      $e = null;
      break;
    }
    if (n = t.sibling, n !== null) {
      n.return = t.return, $e = n;
      break;
    }
    $e = t.return;
  }
}
function P2(e) {
  for (; $e !== null; ) {
    var t = $e;
    if (t === e) {
      $e = null;
      break;
    }
    var n = t.sibling;
    if (n !== null) {
      n.return = t.return, $e = n;
      break;
    }
    $e = t.return;
  }
}
function $2(e) {
  for (; $e !== null; ) {
    var t = $e;
    try {
      switch (t.tag) {
        case 0:
        case 11:
        case 15:
          var n = t.return;
          try {
            ry(4, t);
          } catch (c) {
            fn(t, n, c);
          }
          break;
        case 1:
          var r = t.stateNode;
          if (typeof r.componentDidMount == "function") {
            var o = t.return;
            try {
              r.componentDidMount();
            } catch (c) {
              fn(t, o, c);
            }
          }
          var i = t.return;
          try {
            Ix(t);
          } catch (c) {
            fn(t, i, c);
          }
          break;
        case 5:
          var s = t.return;
          try {
            Ix(t);
          } catch (c) {
            fn(t, s, c);
          }
      }
    } catch (c) {
      fn(t, t.return, c);
    }
    if (t === e) {
      $e = null;
      break;
    }
    var l = t.sibling;
    if (l !== null) {
      l.return = t.return, $e = l;
      break;
    }
    $e = t.return;
  }
}
var ej = Math.ceil, Fv = Ys.ReactCurrentDispatcher, zT = Ys.ReactCurrentOwner, Ko = Ys.ReactCurrentBatchConfig, bt = 0, Yn = null, In = null, cr = 0, go = 0, Hu = tl(0), Un = 0, Lp = null, pc = 0, oy = 0, HT = 0, np = null, ro = null, WT = 0, vf = 1 / 0, xs = null, Mv = !1, Fx = null, Ua = null, rg = !1, Aa = null, Pv = 0, rp = 0, Mx = null, Qg = -1, Yg = 0;
function qr() {
  return bt & 6 ? bn() : Qg !== -1 ? Qg : Qg = bn();
}
function Ba(e) {
  return e.mode & 1 ? bt & 2 && cr !== 0 ? cr & -cr : P9.transition !== null ? (Yg === 0 && (Yg = mF()), Yg) : (e = Ot, e !== 0 || (e = window.event, e = e === void 0 ? 16 : xF(e.type)), e) : 1;
}
function Ci(e, t, n, r) {
  if (50 < rp)
    throw rp = 0, Mx = null, Error(_e(185));
  ph(e, n, r), (!(bt & 2) || e !== Yn) && (e === Yn && (!(bt & 2) && (oy |= n), Un === 4 && Na(e, cr)), lo(e, r), n === 1 && bt === 0 && !(t.mode & 1) && (vf = bn() + 500, ey && nl()));
}
function lo(e, t) {
  var n = e.callbackNode;
  P7(e, t);
  var r = Ev(e, e === Yn ? cr : 0);
  if (r === 0)
    n !== null && GO(n), e.callbackNode = null, e.callbackPriority = 0;
  else if (t = r & -r, e.callbackPriority !== t) {
    if (n != null && GO(n), t === 1)
      e.tag === 0 ? M9(V2.bind(null, e)) : UF(V2.bind(null, e)), I9(function() {
        !(bt & 6) && nl();
      }), n = null;
    else {
      switch (gF(r)) {
        case 1:
          n = yT;
          break;
        case 4:
          n = pF;
          break;
        case 16:
          n = bv;
          break;
        case 536870912:
          n = hF;
          break;
        default:
          n = bv;
      }
      n = jM(n, LM.bind(null, e));
    }
    e.callbackPriority = t, e.callbackNode = n;
  }
}
function LM(e, t) {
  if (Qg = -1, Yg = 0, bt & 6)
    throw Error(_e(327));
  var n = e.callbackNode;
  if (nf() && e.callbackNode !== n)
    return null;
  var r = Ev(e, e === Yn ? cr : 0);
  if (r === 0)
    return null;
  if (r & 30 || r & e.expiredLanes || t)
    t = $v(e, r);
  else {
    t = r;
    var o = bt;
    bt |= 2;
    var i = FM();
    (Yn !== e || cr !== t) && (xs = null, vf = bn() + 500, rc(e, t));
    do
      try {
        rj();
        break;
      } catch (l) {
        RM(e, l);
      }
    while (!0);
    DT(), Fv.current = i, bt = o, In !== null ? t = 0 : (Yn = null, cr = 0, t = Un);
  }
  if (t !== 0) {
    if (t === 2 && (o = cx(e), o !== 0 && (r = o, t = Px(e, o))), t === 1)
      throw n = Lp, rc(e, 0), Na(e, r), lo(e, bn()), n;
    if (t === 6)
      Na(e, r);
    else {
      if (o = e.current.alternate, !(r & 30) && !tj(o) && (t = $v(e, r), t === 2 && (i = cx(e), i !== 0 && (r = i, t = Px(e, i))), t === 1))
        throw n = Lp, rc(e, 0), Na(e, r), lo(e, bn()), n;
      switch (e.finishedWork = o, e.finishedLanes = r, t) {
        case 0:
        case 1:
          throw Error(_e(345));
        case 2:
          ql(e, ro, xs);
          break;
        case 3:
          if (Na(e, r), (r & 130023424) === r && (t = WT + 500 - bn(), 10 < t)) {
            if (Ev(e, 0) !== 0)
              break;
            if (o = e.suspendedLanes, (o & r) !== r) {
              qr(), e.pingedLanes |= e.suspendedLanes & o;
              break;
            }
            e.timeoutHandle = vx(ql.bind(null, e, ro, xs), t);
            break;
          }
          ql(e, ro, xs);
          break;
        case 4:
          if (Na(e, r), (r & 4194240) === r)
            break;
          for (t = e.eventTimes, o = -1; 0 < r; ) {
            var s = 31 - Ti(r);
            i = 1 << s, s = t[s], s > o && (o = s), r &= ~i;
          }
          if (r = o, r = bn() - r, r = (120 > r ? 120 : 480 > r ? 480 : 1080 > r ? 1080 : 1920 > r ? 1920 : 3e3 > r ? 3e3 : 4320 > r ? 4320 : 1960 * ej(r / 1960)) - r, 10 < r) {
            e.timeoutHandle = vx(ql.bind(null, e, ro, xs), r);
            break;
          }
          ql(e, ro, xs);
          break;
        case 5:
          ql(e, ro, xs);
          break;
        default:
          throw Error(_e(329));
      }
    }
  }
  return lo(e, bn()), e.callbackNode === n ? LM.bind(null, e) : null;
}
function Px(e, t) {
  var n = np;
  return e.current.memoizedState.isDehydrated && (rc(e, t).flags |= 256), e = $v(e, t), e !== 2 && (t = ro, ro = n, t !== null && $x(t)), e;
}
function $x(e) {
  ro === null ? ro = e : ro.push.apply(ro, e);
}
function tj(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 (!Ai(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 Na(e, t) {
  for (t &= ~HT, t &= ~oy, e.suspendedLanes |= t, e.pingedLanes &= ~t, e = e.expirationTimes; 0 < t; ) {
    var n = 31 - Ti(t), r = 1 << n;
    e[n] = -1, t &= ~r;
  }
}
function V2(e) {
  if (bt & 6)
    throw Error(_e(327));
  nf();
  var t = Ev(e, 0);
  if (!(t & 1))
    return lo(e, bn()), null;
  var n = $v(e, t);
  if (e.tag !== 0 && n === 2) {
    var r = cx(e);
    r !== 0 && (t = r, n = Px(e, r));
  }
  if (n === 1)
    throw n = Lp, rc(e, 0), Na(e, t), lo(e, bn()), n;
  if (n === 6)
    throw Error(_e(345));
  return e.finishedWork = e.current.alternate, e.finishedLanes = t, ql(e, ro, xs), lo(e, bn()), null;
}
function GT(e, t) {
  var n = bt;
  bt |= 1;
  try {
    return e(t);
  } finally {
    bt = n, bt === 0 && (vf = bn() + 500, ey && nl());
  }
}
function hc(e) {
  Aa !== null && Aa.tag === 0 && !(bt & 6) && nf();
  var t = bt;
  bt |= 1;
  var n = Ko.transition, r = Ot;
  try {
    if (Ko.transition = null, Ot = 1, e)
      return e();
  } finally {
    Ot = r, Ko.transition = n, bt = t, !(bt & 6) && nl();
  }
}
function QT() {
  go = Hu.current, Gt(Hu);
}
function rc(e, t) {
  e.finishedWork = null, e.finishedLanes = 0;
  var n = e.timeoutHandle;
  if (n !== -1 && (e.timeoutHandle = -1, D9(n)), In !== null)
    for (n = In.return; n !== null; ) {
      var r = n;
      switch (NT(r), r.tag) {
        case 1:
          r = r.type.childContextTypes, r != null && Cv();
          break;
        case 3:
          mf(), Gt(so), Gt(_r), PT();
          break;
        case 5:
          MT(r);
          break;
        case 4:
          mf();
          break;
        case 13:
          Gt(sn);
          break;
        case 19:
          Gt(sn);
          break;
        case 10:
          IT(r.type._context);
          break;
        case 22:
        case 23:
          QT();
      }
      n = n.return;
    }
  if (Yn = e, In = e = qa(e.current, null), cr = go = t, Un = 0, Lp = null, HT = oy = pc = 0, ro = np = null, Kl !== null) {
    for (t = 0; t < Kl.length; t++)
      if (n = Kl[t], r = n.interleaved, r !== null) {
        n.interleaved = null;
        var o = r.next, i = n.pending;
        if (i !== null) {
          var s = i.next;
          i.next = o, r.next = s;
        }
        n.pending = r;
      }
    Kl = null;
  }
  return e;
}
function RM(e, t) {
  do {
    var n = In;
    try {
      if (DT(), Hg.current = Rv, Lv) {
        for (var r = ln.memoizedState; r !== null; ) {
          var o = r.queue;
          o !== null && (o.pending = null), r = r.next;
        }
        Lv = !1;
      }
      if (dc = 0, Qn = Mn = ln = null, ep = !1, Ap = 0, zT.current = null, n === null || n.return === null) {
        Un = 1, Lp = t, In = null;
        break;
      }
      e: {
        var i = e, s = n.return, l = n, c = t;
        if (t = cr, l.flags |= 32768, c !== null && typeof c == "object" && typeof c.then == "function") {
          var f = c, d = l, g = d.tag;
          if (!(d.mode & 1) && (g === 0 || g === 11 || g === 15)) {
            var m = d.alternate;
            m ? (d.updateQueue = m.updateQueue, d.memoizedState = m.memoizedState, d.lanes = m.lanes) : (d.updateQueue = null, d.memoizedState = null);
          }
          var v = k2(s);
          if (v !== null) {
            v.flags &= -257, _2(v, s, l, i, t), v.mode & 1 && C2(i, f, t), t = v, c = f;
            var b = t.updateQueue;
            if (b === null) {
              var w = /* @__PURE__ */ new Set();
              w.add(c), t.updateQueue = w;
            } else
              b.add(c);
            break e;
          } else {
            if (!(t & 1)) {
              C2(i, f, t), YT();
              break e;
            }
            c = Error(_e(426));
          }
        } else if (Kt && l.mode & 1) {
          var _ = k2(s);
          if (_ !== null) {
            !(_.flags & 65536) && (_.flags |= 256), _2(_, s, l, i, t), OT(gf(c, l));
            break e;
          }
        }
        i = c = gf(c, l), Un !== 4 && (Un = 2), np === null ? np = [i] : np.push(i), i = s;
        do {
          switch (i.tag) {
            case 3:
              i.flags |= 65536, t &= -t, i.lanes |= t;
              var S = vM(i, c, t);
              y2(i, S);
              break e;
            case 1:
              l = c;
              var x = i.type, C = i.stateNode;
              if (!(i.flags & 128) && (typeof x.getDerivedStateFromError == "function" || C !== null && typeof C.componentDidCatch == "function" && (Ua === null || !Ua.has(C)))) {
                i.flags |= 65536, t &= -t, i.lanes |= t;
                var E = yM(i, l, t);
                y2(i, E);
                break e;
              }
          }
          i = i.return;
        } while (i !== null);
      }
      PM(n);
    } catch (N) {
      t = N, In === n && n !== null && (In = n = n.return);
      continue;
    }
    break;
  } while (!0);
}
function FM() {
  var e = Fv.current;
  return Fv.current = Rv, e === null ? Rv : e;
}
function YT() {
  (Un === 0 || Un === 3 || Un === 2) && (Un = 4), Yn === null || !(pc & 268435455) && !(oy & 268435455) || Na(Yn, cr);
}
function $v(e, t) {
  var n = bt;
  bt |= 2;
  var r = FM();
  (Yn !== e || cr !== t) && (xs = null, rc(e, t));
  do
    try {
      nj();
      break;
    } catch (o) {
      RM(e, o);
    }
  while (!0);
  if (DT(), bt = n, Fv.current = r, In !== null)
    throw Error(_e(261));
  return Yn = null, cr = 0, Un;
}
function nj() {
  for (; In !== null; )
    MM(In);
}
function rj() {
  for (; In !== null && !N7(); )
    MM(In);
}
function MM(e) {
  var t = VM(e.alternate, e, go);
  e.memoizedProps = e.pendingProps, t === null ? PM(e) : In = t, zT.current = null;
}
function PM(e) {
  var t = e;
  do {
    var n = t.alternate;
    if (e = t.return, t.flags & 32768) {
      if (n = K9(n, t), n !== null) {
        n.flags &= 32767, In = n;
        return;
      }
      if (e !== null)
        e.flags |= 32768, e.subtreeFlags = 0, e.deletions = null;
      else {
        Un = 6, In = null;
        return;
      }
    } else if (n = Y9(n, t, go), n !== null) {
      In = n;
      return;
    }
    if (t = t.sibling, t !== null) {
      In = t;
      return;
    }
    In = t = e;
  } while (t !== null);
  Un === 0 && (Un = 5);
}
function ql(e, t, n) {
  var r = Ot, o = Ko.transition;
  try {
    Ko.transition = null, Ot = 1, oj(e, t, n, r);
  } finally {
    Ko.transition = o, Ot = r;
  }
  return null;
}
function oj(e, t, n, r) {
  do
    nf();
  while (Aa !== null);
  if (bt & 6)
    throw Error(_e(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(_e(177));
  e.callbackNode = null, e.callbackPriority = 0;
  var i = n.lanes | n.childLanes;
  if ($7(e, i), e === Yn && (In = Yn = null, cr = 0), !(n.subtreeFlags & 2064) && !(n.flags & 2064) || rg || (rg = !0, jM(bv, function() {
    return nf(), null;
  })), i = (n.flags & 15990) !== 0, n.subtreeFlags & 15990 || i) {
    i = Ko.transition, Ko.transition = null;
    var s = Ot;
    Ot = 1;
    var l = bt;
    bt |= 4, zT.current = null, X9(e, n), DM(n, e), T9(mx), wv = !!hx, mx = hx = null, e.current = n, Z9(n), O7(), bt = l, Ot = s, Ko.transition = i;
  } else
    e.current = n;
  if (rg && (rg = !1, Aa = e, Pv = o), i = e.pendingLanes, i === 0 && (Ua = null), I7(n.stateNode), lo(e, bn()), 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 (Mv)
    throw Mv = !1, e = Fx, Fx = null, e;
  return Pv & 1 && e.tag !== 0 && nf(), i = e.pendingLanes, i & 1 ? e === Mx ? rp++ : (rp = 0, Mx = e) : rp = 0, nl(), null;
}
function nf() {
  if (Aa !== null) {
    var e = gF(Pv), t = Ko.transition, n = Ot;
    try {
      if (Ko.transition = null, Ot = 16 > e ? 16 : e, Aa === null)
        var r = !1;
      else {
        if (e = Aa, Aa = null, Pv = 0, bt & 6)
          throw Error(_e(331));
        var o = bt;
        for (bt |= 4, $e = e.current; $e !== null; ) {
          var i = $e, s = i.child;
          if ($e.flags & 16) {
            var l = i.deletions;
            if (l !== null) {
              for (var c = 0; c < l.length; c++) {
                var f = l[c];
                for ($e = f; $e !== null; ) {
                  var d = $e;
                  switch (d.tag) {
                    case 0:
                    case 11:
                    case 15:
                      tp(8, d, i);
                  }
                  var g = d.child;
                  if (g !== null)
                    g.return = d, $e = g;
                  else
                    for (; $e !== null; ) {
                      d = $e;
                      var m = d.sibling, v = d.return;
                      if (NM(d), d === f) {
                        $e = null;
                        break;
                      }
                      if (m !== null) {
                        m.return = v, $e = m;
                        break;
                      }
                      $e = v;
                    }
                }
              }
              var b = i.alternate;
              if (b !== null) {
                var w = b.child;
                if (w !== null) {
                  b.child = null;
                  do {
                    var _ = w.sibling;
                    w.sibling = null, w = _;
                  } while (w !== null);
                }
              }
              $e = i;
            }
          }
          if (i.subtreeFlags & 2064 && s !== null)
            s.return = i, $e = s;
          else
            e:
              for (; $e !== null; ) {
                if (i = $e, i.flags & 2048)
                  switch (i.tag) {
                    case 0:
                    case 11:
                    case 15:
                      tp(9, i, i.return);
                  }
                var S = i.sibling;
                if (S !== null) {
                  S.return = i.return, $e = S;
                  break e;
                }
                $e = i.return;
              }
        }
        var x = e.current;
        for ($e = x; $e !== null; ) {
          s = $e;
          var C = s.child;
          if (s.subtreeFlags & 2064 && C !== null)
            C.return = s, $e = C;
          else
            e:
              for (s = x; $e !== null; ) {
                if (l = $e, l.flags & 2048)
                  try {
                    switch (l.tag) {
                      case 0:
                      case 11:
                      case 15:
                        ry(9, l);
                    }
                  } catch (N) {
                    fn(l, l.return, N);
                  }
                if (l === s) {
                  $e = null;
                  break e;
                }
                var E = l.sibling;
                if (E !== null) {
                  E.return = l.return, $e = E;
                  break e;
                }
                $e = l.return;
              }
        }
        if (bt = o, nl(), Ji && typeof Ji.onPostCommitFiberRoot == "function")
          try {
            Ji.onPostCommitFiberRoot(Y0, e);
          } catch {
          }
        r = !0;
      }
      return r;
    } finally {
      Ot = n, Ko.transition = t;
    }
  }
  return !1;
}
function j2(e, t, n) {
  t = gf(n, t), t = vM(e, t, 1), e = ja(e, t, 1), t = qr(), e !== null && (ph(e, 1, t), lo(e, t));
}
function fn(e, t, n) {
  if (e.tag === 3)
    j2(e, e, n);
  else
    for (; t !== null; ) {
      if (t.tag === 3) {
        j2(t, e, n);
        break;
      } else if (t.tag === 1) {
        var r = t.stateNode;
        if (typeof t.type.getDerivedStateFromError == "function" || typeof r.componentDidCatch == "function" && (Ua === null || !Ua.has(r))) {
          e = gf(n, e), e = yM(t, e, 1), t = ja(t, e, 1), e = qr(), t !== null && (ph(t, 1, e), lo(t, e));
          break;
        }
      }
      t = t.return;
    }
}
function ij(e, t, n) {
  var r = e.pingCache;
  r !== null && r.delete(t), t = qr(), e.pingedLanes |= e.suspendedLanes & n, Yn === e && (cr & n) === n && (Un === 4 || Un === 3 && (cr & 130023424) === cr && 500 > bn() - WT ? rc(e, 0) : HT |= n), lo(e, t);
}
function $M(e, t) {
  t === 0 && (e.mode & 1 ? (t = Gm, Gm <<= 1, !(Gm & 130023424) && (Gm = 4194304)) : t = 1);
  var n = qr();
  e = Fs(e, t), e !== null && (ph(e, t, n), lo(e, n));
}
function sj(e) {
  var t = e.memoizedState, n = 0;
  t !== null && (n = t.retryLane), $M(e, n);
}
function aj(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(_e(314));
  }
  r !== null && r.delete(t), $M(e, n);
}
var VM;
VM = function(e, t, n) {
  if (e !== null)
    if (e.memoizedProps !== t.pendingProps || so.current)
      oo = !0;
    else {
      if (!(e.lanes & n) && !(t.flags & 128))
        return oo = !1, Q9(e, t, n);
      oo = !!(e.flags & 131072);
    }
  else
    oo = !1, Kt && t.flags & 1048576 && BF(t, Nv, t.index);
  switch (t.lanes = 0, t.tag) {
    case 2:
      var r = t.type;
      Gg(e, t), e = t.pendingProps;
      var o = df(t, _r.current);
      tf(t, n), o = VT(null, t, r, e, o, n);
      var i = jT();
      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, ao(r) ? (i = !0, kv(t)) : i = !1, t.memoizedState = o.state !== null && o.state !== void 0 ? o.state : null, RT(t), o.updater = ty, t.stateNode = o, o._reactInternals = t, Tx(t, r, e, n), t = _x(null, t, r, !0, i, n)) : (t.tag = 0, Kt && i && _T(t), Ur(null, t, o, n), t = t.child), t;
    case 16:
      r = t.elementType;
      e: {
        switch (Gg(e, t), e = t.pendingProps, o = r._init, r = o(r._payload), t.type = r, o = t.tag = cj(r), e = mi(r, e), o) {
          case 0:
            t = kx(null, t, r, e, n);
            break e;
          case 1:
            t = A2(null, t, r, e, n);
            break e;
          case 11:
            t = N2(null, t, r, e, n);
            break e;
          case 14:
            t = O2(null, t, r, mi(r.type, e), n);
            break e;
        }
        throw Error(_e(
          306,
          r,
          ""
        ));
      }
      return t;
    case 0:
      return r = t.type, o = t.pendingProps, o = t.elementType === r ? o : mi(r, o), kx(e, t, r, o, n);
    case 1:
      return r = t.type, o = t.pendingProps, o = t.elementType === r ? o : mi(r, o), A2(e, t, r, o, n);
    case 3:
      e: {
        if (xM(t), e === null)
          throw Error(_e(387));
        r = t.pendingProps, i = t.memoizedState, o = i.element, WF(e, t), Dv(t, r, null, n);
        var s = t.memoizedState;
        if (r = s.element, i.isDehydrated)
          if (i = { element: r, isDehydrated: !1, cache: s.cache, pendingSuspenseBoundaries: s.pendingSuspenseBoundaries, transitions: s.transitions }, t.updateQueue.baseState = i, t.memoizedState = i, t.flags & 256) {
            o = gf(Error(_e(423)), t), t = D2(e, t, r, n, o);
            break e;
          } else if (r !== o) {
            o = gf(Error(_e(424)), t), t = D2(e, t, r, n, o);
            break e;
          } else
            for (Eo = Va(t.stateNode.containerInfo.firstChild), wo = t, Kt = !0, yi = null, n = KF(t, null, r, n), t.child = n; n; )
              n.flags = n.flags & -3 | 4096, n = n.sibling;
        else {
          if (pf(), r === o) {
            t = Ms(e, t, n);
            break e;
          }
          Ur(e, t, r, n);
        }
        t = t.child;
      }
      return t;
    case 5:
      return JF(t), e === null && wx(t), r = t.type, o = t.pendingProps, i = e !== null ? e.memoizedProps : null, s = o.children, gx(r, o) ? s = null : i !== null && gx(r, i) && (t.flags |= 32), wM(e, t), Ur(e, t, s, n), t.child;
    case 6:
      return e === null && wx(t), null;
    case 13:
      return SM(e, t, n);
    case 4:
      return FT(t, t.stateNode.containerInfo), r = t.pendingProps, e === null ? t.child = hf(t, null, r, n) : Ur(e, t, r, n), t.child;
    case 11:
      return r = t.type, o = t.pendingProps, o = t.elementType === r ? o : mi(r, o), N2(e, t, r, o, n);
    case 7:
      return Ur(e, t, t.pendingProps, n), t.child;
    case 8:
      return Ur(e, t, t.pendingProps.children, n), t.child;
    case 12:
      return Ur(e, t, t.pendingProps.children, n), t.child;
    case 10:
      e: {
        if (r = t.type._context, o = t.pendingProps, i = t.memoizedProps, s = o.value, $t(Ov, r._currentValue), r._currentValue = s, i !== null)
          if (Ai(i.value, s)) {
            if (i.children === o.children && !so.current) {
              t = Ms(e, t, n);
              break e;
            }
          } else
            for (i = t.child, i !== null && (i.return = t); i !== null; ) {
              var l = i.dependencies;
              if (l !== null) {
                s = i.child;
                for (var c = l.firstContext; c !== null; ) {
                  if (c.context === r) {
                    if (i.tag === 1) {
                      c = Ns(-1, n & -n), c.tag = 2;
                      var f = i.updateQueue;
                      if (f !== null) {
                        f = f.shared;
                        var d = f.pending;
                        d === null ? c.next = c : (c.next = d.next, d.next = c), f.pending = c;
                      }
                    }
                    i.lanes |= n, c = i.alternate, c !== null && (c.lanes |= n), xx(
                      i.return,
                      n,
                      t
                    ), l.lanes |= n;
                    break;
                  }
                  c = c.next;
                }
              } else if (i.tag === 10)
                s = i.type === t.type ? null : i.child;
              else if (i.tag === 18) {
                if (s = i.return, s === null)
                  throw Error(_e(341));
                s.lanes |= n, l = s.alternate, l !== null && (l.lanes |= n), xx(s, n, t), s = i.sibling;
              } else
                s = i.child;
              if (s !== null)
                s.return = i;
              else
                for (s = i; s !== null; ) {
                  if (s === t) {
                    s = null;
                    break;
                  }
                  if (i = s.sibling, i !== null) {
                    i.return = s.return, s = i;
                    break;
                  }
                  s = s.return;
                }
              i = s;
            }
        Ur(e, t, o.children, n), t = t.child;
      }
      return t;
    case 9:
      return o = t.type, r = t.pendingProps.children, tf(t, n), o = Jo(o), r = r(o), t.flags |= 1, Ur(e, t, r, n), t.child;
    case 14:
      return r = t.type, o = mi(r, t.pendingProps), o = mi(r.type, o), O2(e, t, r, o, n);
    case 15:
      return bM(e, t, t.type, t.pendingProps, n);
    case 17:
      return r = t.type, o = t.pendingProps, o = t.elementType === r ? o : mi(r, o), Gg(e, t), t.tag = 1, ao(r) ? (e = !0, kv(t)) : e = !1, tf(t, n), QF(t, r, o), Tx(t, r, o, n), _x(null, t, r, !0, e, n);
    case 19:
      return TM(e, t, n);
    case 22:
      return EM(e, t, n);
  }
  throw Error(_e(156, t.tag));
};
function jM(e, t) {
  return dF(e, t);
}
function lj(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 Ho(e, t, n, r) {
  return new lj(e, t, n, r);
}
function KT(e) {
  return e = e.prototype, !(!e || !e.isReactComponent);
}
function cj(e) {
  if (typeof e == "function")
    return KT(e) ? 1 : 0;
  if (e != null) {
    if (e = e.$$typeof, e === mT)
      return 11;
    if (e === gT)
      return 14;
  }
  return 2;
}
function qa(e, t) {
  var n = e.alternate;
  return n === null ? (n = Ho(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 Kg(e, t, n, r, o, i) {
  var s = 2;
  if (r = e, typeof e == "function")
    KT(e) && (s = 1);
  else if (typeof e == "string")
    s = 5;
  else
    e:
      switch (e) {
        case Fu:
          return oc(n.children, o, i, t);
        case hT:
          s = 8, o |= 8;
          break;
        case Qw:
          return e = Ho(12, n, t, o | 2), e.elementType = Qw, e.lanes = i, e;
        case Yw:
          return e = Ho(13, n, t, o), e.elementType = Yw, e.lanes = i, e;
        case Kw:
          return e = Ho(19, n, t, o), e.elementType = Kw, e.lanes = i, e;
        case YR:
          return iy(n, o, i, t);
        default:
          if (typeof e == "object" && e !== null)
            switch (e.$$typeof) {
              case GR:
                s = 10;
                break e;
              case QR:
                s = 9;
                break e;
              case mT:
                s = 11;
                break e;
              case gT:
                s = 14;
                break e;
              case wa:
                s = 16, r = null;
                break e;
            }
          throw Error(_e(130, e == null ? e : typeof e, ""));
      }
  return t = Ho(s, n, t, o), t.elementType = e, t.type = r, t.lanes = i, t;
}
function oc(e, t, n, r) {
  return e = Ho(7, e, r, t), e.lanes = n, e;
}
function iy(e, t, n, r) {
  return e = Ho(22, e, r, t), e.elementType = YR, e.lanes = n, e.stateNode = { isHidden: !1 }, e;
}
function HE(e, t, n) {
  return e = Ho(6, e, null, t), e.lanes = n, e;
}
function WE(e, t, n) {
  return t = Ho(4, e.children !== null ? e.children : [], e.key, t), t.lanes = n, t.stateNode = { containerInfo: e.containerInfo, pendingChildren: null, implementation: e.implementation }, t;
}
function uj(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 = kE(0), this.expirationTimes = kE(-1), this.entangledLanes = this.finishedLanes = this.mutableReadLanes = this.expiredLanes = this.pingedLanes = this.suspendedLanes = this.pendingLanes = 0, this.entanglements = kE(0), this.identifierPrefix = r, this.onRecoverableError = o, this.mutableSourceEagerHydrationData = null;
}
function JT(e, t, n, r, o, i, s, l, c) {
  return e = new uj(e, t, n, l, c), t === 1 ? (t = 1, i === !0 && (t |= 8)) : t = 0, i = Ho(3, null, null, t), e.current = i, i.stateNode = e, i.memoizedState = { element: r, isDehydrated: n, cache: null, transitions: null, pendingSuspenseBoundaries: null }, RT(i), e;
}
function fj(e, t, n) {
  var r = 3 < arguments.length && arguments[3] !== void 0 ? arguments[3] : null;
  return { $$typeof: Ru, key: r == null ? null : "" + r, children: e, containerInfo: t, implementation: n };
}
function UM(e) {
  if (!e)
    return Wa;
  e = e._reactInternals;
  e: {
    if (Oc(e) !== e || e.tag !== 1)
      throw Error(_e(170));
    var t = e;
    do {
      switch (t.tag) {
        case 3:
          t = t.stateNode.context;
          break e;
        case 1:
          if (ao(t.type)) {
            t = t.stateNode.__reactInternalMemoizedMergedChildContext;
            break e;
          }
      }
      t = t.return;
    } while (t !== null);
    throw Error(_e(171));
  }
  if (e.tag === 1) {
    var n = e.type;
    if (ao(n))
      return jF(e, n, t);
  }
  return t;
}
function BM(e, t, n, r, o, i, s, l, c) {
  return e = JT(n, r, !0, e, o, i, s, l, c), e.context = UM(null), n = e.current, r = qr(), o = Ba(n), i = Ns(r, o), i.callback = t ?? null, ja(n, i, o), e.current.lanes = o, ph(e, o, r), lo(e, r), e;
}
function sy(e, t, n, r) {
  var o = t.current, i = qr(), s = Ba(o);
  return n = UM(n), t.context === null ? t.context = n : t.pendingContext = n, t = Ns(i, s), t.payload = { element: e }, r = r === void 0 ? null : r, r !== null && (t.callback = r), e = ja(o, t, s), e !== null && (Ci(e, o, s, i), zg(e, o, s)), s;
}
function Vv(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 U2(e, t) {
  if (e = e.memoizedState, e !== null && e.dehydrated !== null) {
    var n = e.retryLane;
    e.retryLane = n !== 0 && n < t ? n : t;
  }
}
function XT(e, t) {
  U2(e, t), (e = e.alternate) && U2(e, t);
}
function dj() {
  return null;
}
var qM = typeof reportError == "function" ? reportError : function(e) {
  console.error(e);
};
function ZT(e) {
  this._internalRoot = e;
}
ay.prototype.render = ZT.prototype.render = function(e) {
  var t = this._internalRoot;
  if (t === null)
    throw Error(_e(409));
  sy(e, t, null, null);
};
ay.prototype.unmount = ZT.prototype.unmount = function() {
  var e = this._internalRoot;
  if (e !== null) {
    this._internalRoot = null;
    var t = e.containerInfo;
    hc(function() {
      sy(null, e, null, null);
    }), t[Rs] = null;
  }
};
function ay(e) {
  this._internalRoot = e;
}
ay.prototype.unstable_scheduleHydration = function(e) {
  if (e) {
    var t = bF();
    e = { blockedOn: null, target: e, priority: t };
    for (var n = 0; n < _a.length && t !== 0 && t < _a[n].priority; n++)
      ;
    _a.splice(n, 0, e), n === 0 && wF(e);
  }
};
function eC(e) {
  return !(!e || e.nodeType !== 1 && e.nodeType !== 9 && e.nodeType !== 11);
}
function ly(e) {
  return !(!e || e.nodeType !== 1 && e.nodeType !== 9 && e.nodeType !== 11 && (e.nodeType !== 8 || e.nodeValue !== " react-mount-point-unstable "));
}
function B2() {
}
function pj(e, t, n, r, o) {
  if (o) {
    if (typeof r == "function") {
      var i = r;
      r = function() {
        var f = Vv(s);
        i.call(f);
      };
    }
    var s = BM(t, r, e, 0, null, !1, !1, "", B2);
    return e._reactRootContainer = s, e[Rs] = s.current, Cp(e.nodeType === 8 ? e.parentNode : e), hc(), s;
  }
  for (; o = e.lastChild; )
    e.removeChild(o);
  if (typeof r == "function") {
    var l = r;
    r = function() {
      var f = Vv(c);
      l.call(f);
    };
  }
  var c = JT(e, 0, !1, null, null, !1, !1, "", B2);
  return e._reactRootContainer = c, e[Rs] = c.current, Cp(e.nodeType === 8 ? e.parentNode : e), hc(function() {
    sy(t, c, n, r);
  }), c;
}
function cy(e, t, n, r, o) {
  var i = n._reactRootContainer;
  if (i) {
    var s = i;
    if (typeof o == "function") {
      var l = o;
      o = function() {
        var c = Vv(s);
        l.call(c);
      };
    }
    sy(t, s, e, o);
  } else
    s = pj(n, t, e, o, r);
  return Vv(s);
}
vF = function(e) {
  switch (e.tag) {
    case 3:
      var t = e.stateNode;
      if (t.current.memoizedState.isDehydrated) {
        var n = jd(t.pendingLanes);
        n !== 0 && (bT(t, n | 1), lo(t, bn()), !(bt & 6) && (vf = bn() + 500, nl()));
      }
      break;
    case 13:
      hc(function() {
        var r = Fs(e, 1);
        if (r !== null) {
          var o = qr();
          Ci(r, e, 1, o);
        }
      }), XT(e, 1);
  }
};
ET = function(e) {
  if (e.tag === 13) {
    var t = Fs(e, 134217728);
    if (t !== null) {
      var n = qr();
      Ci(t, e, 134217728, n);
    }
    XT(e, 134217728);
  }
};
yF = function(e) {
  if (e.tag === 13) {
    var t = Ba(e), n = Fs(e, t);
    if (n !== null) {
      var r = qr();
      Ci(n, e, t, r);
    }
    XT(e, t);
  }
};
bF = function() {
  return Ot;
};
EF = function(e, t) {
  var n = Ot;
  try {
    return Ot = e, t();
  } finally {
    Ot = n;
  }
};
sx = function(e, t, n) {
  switch (t) {
    case "input":
      if (Zw(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 = Z0(r);
            if (!o)
              throw Error(_e(90));
            JR(r), Zw(r, o);
          }
        }
      }
      break;
    case "textarea":
      ZR(e, n);
      break;
    case "select":
      t = n.value, t != null && Ju(e, !!n.multiple, t, !1);
  }
};
sF = GT;
aF = hc;
var hj = { usingClientEntryPoint: !1, Events: [mh, Vu, Z0, oF, iF, GT] }, Ld = { findFiberByHostInstance: Yl, bundleType: 0, version: "18.2.0", rendererPackageName: "react-dom" }, mj = { bundleType: Ld.bundleType, version: Ld.version, rendererPackageName: Ld.rendererPackageName, rendererConfig: Ld.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, overrideProps: null, overridePropsDeletePath: null, overridePropsRenamePath: null, setErrorHandler: null, setSuspenseHandler: null, scheduleUpdate: null, currentDispatcherRef: Ys.ReactCurrentDispatcher, findHostInstanceByFiber: function(e) {
  return e = uF(e), e === null ? null : e.stateNode;
}, findFiberByHostInstance: Ld.findFiberByHostInstance || dj, 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 og = __REACT_DEVTOOLS_GLOBAL_HOOK__;
  if (!og.isDisabled && og.supportsFiber)
    try {
      Y0 = og.inject(mj), Ji = og;
    } catch {
    }
}
Oo.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = hj;
Oo.createPortal = function(e, t) {
  var n = 2 < arguments.length && arguments[2] !== void 0 ? arguments[2] : null;
  if (!eC(t))
    throw Error(_e(200));
  return fj(e, t, null, n);
};
Oo.createRoot = function(e, t) {
  if (!eC(e))
    throw Error(_e(299));
  var n = !1, r = "", o = qM;
  return t != null && (t.unstable_strictMode === !0 && (n = !0), t.identifierPrefix !== void 0 && (r = t.identifierPrefix), t.onRecoverableError !== void 0 && (o = t.onRecoverableError)), t = JT(e, 1, !1, null, null, n, !1, r, o), e[Rs] = t.current, Cp(e.nodeType === 8 ? e.parentNode : e), new ZT(t);
};
Oo.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(_e(188)) : (e = Object.keys(e).join(","), Error(_e(268, e)));
  return e = uF(t), e = e === null ? null : e.stateNode, e;
};
Oo.flushSync = function(e) {
  return hc(e);
};
Oo.hydrate = function(e, t, n) {
  if (!ly(t))
    throw Error(_e(200));
  return cy(null, e, t, !0, n);
};
Oo.hydrateRoot = function(e, t, n) {
  if (!eC(e))
    throw Error(_e(405));
  var r = n != null && n.hydratedSources || null, o = !1, i = "", s = qM;
  if (n != null && (n.unstable_strictMode === !0 && (o = !0), n.identifierPrefix !== void 0 && (i = n.identifierPrefix), n.onRecoverableError !== void 0 && (s = n.onRecoverableError)), t = BM(t, null, e, 1, n ?? null, o, !1, i, s), e[Rs] = t.current, Cp(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 ay(t);
};
Oo.render = function(e, t, n) {
  if (!ly(t))
    throw Error(_e(200));
  return cy(null, e, t, !1, n);
};
Oo.unmountComponentAtNode = function(e) {
  if (!ly(e))
    throw Error(_e(40));
  return e._reactRootContainer ? (hc(function() {
    cy(null, null, e, !1, function() {
      e._reactRootContainer = null, e[Rs] = null;
    });
  }), !0) : !1;
};
Oo.unstable_batchedUpdates = GT;
Oo.unstable_renderSubtreeIntoContainer = function(e, t, n, r) {
  if (!ly(n))
    throw Error(_e(200));
  if (e == null || e._reactInternals === void 0)
    throw Error(_e(38));
  return cy(e, t, n, !1, r);
};
Oo.version = "18.2.0-next-9e3b772b8-20220608";
function zM() {
  if (!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ > "u" || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE != "function"))
    try {
      __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(zM);
    } catch (e) {
      console.error(e);
    }
}
zM(), BR.exports = Oo;
var vh = BR.exports;
const jv = /* @__PURE__ */ is(vh);
function HM(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 = HM(e[t])) && (r && (r += " "), r += n);
    else
      for (t in e)
        e[t] && (r && (r += " "), r += t);
  return r;
}
function Xn() {
  for (var e, t, n = 0, r = ""; n < arguments.length; )
    (e = arguments[n++]) && (t = HM(e)) && (r && (r += " "), r += t);
  return r;
}
const gj = "16.8.1", tC = Object.freeze({
  major: 16,
  minor: 8,
  patch: 1,
  preReleaseTag: null
});
function lt(e, t) {
  if (!!!e)
    throw new Error(t);
}
function To(e) {
  return typeof (e == null ? void 0 : e.then) == "function";
}
function Co(e) {
  return typeof e == "object" && e !== null;
}
function En(e, t) {
  if (!!!e)
    throw new Error(
      t ?? "Unexpected invariant triggered."
    );
}
const vj = /\r\n|[\n\r]/g;
function Uv(e, t) {
  let n = 0, r = 1;
  for (const o of e.body.matchAll(vj)) {
    if (typeof o.index == "number" || En(!1), o.index >= t)
      break;
    n = o.index + o[0].length, r += 1;
  }
  return {
    line: r,
    column: t + 1 - n
  };
}
function WM(e) {
  return nC(
    e.source,
    Uv(e.source, e.start)
  );
}
function nC(e, t) {
  const n = e.locationOffset.column - 1, r = "".padStart(n) + e.body, o = t.line - 1, i = e.locationOffset.line - 1, s = t.line + i, l = t.line === 1 ? n : 0, c = t.column + l, f = `${e.name}:${s}:${c}
`, d = r.split(/\r\n|[\n\r]/g), g = d[o];
  if (g.length > 120) {
    const m = Math.floor(c / 80), v = c % 80, b = [];
    for (let w = 0; w < g.length; w += 80)
      b.push(g.slice(w, w + 80));
    return f + q2([
      [`${s} |`, b[0]],
      ...b.slice(1, m + 1).map((w) => ["|", w]),
      ["|", "^".padStart(v)],
      ["|", b[m + 1]]
    ]);
  }
  return f + q2([
    // Lines specified like this: ["prefix", "string"],
    [`${s - 1} |`, d[o - 1]],
    [`${s} |`, g],
    ["|", "^".padStart(c)],
    [`${s + 1} |`, d[o + 1]]
  ]);
}
function q2(e) {
  const t = e.filter(([r, o]) => o !== void 0), n = Math.max(...t.map(([r]) => r.length));
  return t.map(([r, o]) => r.padStart(n) + (o ? " " + o : "")).join(`
`);
}
function yj(e) {
  const t = e[0];
  return t == null || "kind" in t || "length" in t ? {
    nodes: t,
    source: e[1],
    positions: e[2],
    path: e[3],
    originalError: e[4],
    extensions: e[5]
  } : t;
}
class he extends Error {
  /**
   * An array of `{ line, column }` locations within the source GraphQL document
   * which correspond to this error.
   *
   * Errors during validation often contain multiple locations, for example to
   * point out two things with the same name. Errors during execution include a
   * single location, the field which produced the error.
   *
   * Enumerable, and appears in the result of JSON.stringify().
   */
  /**
   * An array describing the JSON-path into the execution response which
   * corresponds to this error. Only included for errors during execution.
   *
   * Enumerable, and appears in the result of JSON.stringify().
   */
  /**
   * An array of GraphQL AST Nodes corresponding to this error.
   */
  /**
   * The source GraphQL document for the first location of this error.
   *
   * Note that if this Error represents more than one node, the source may not
   * represent nodes after the first node.
   */
  /**
   * An array of character offsets within the source GraphQL document
   * which correspond to this error.
   */
  /**
   * The original error thrown from a field resolver during execution.
   */
  /**
   * Extension fields to add to the formatted error.
   */
  /**
   * @deprecated Please use the `GraphQLErrorOptions` constructor overload instead.
   */
  constructor(t, ...n) {
    var r, o, i;
    const { nodes: s, source: l, positions: c, path: f, originalError: d, extensions: g } = yj(n);
    super(t), this.name = "GraphQLError", this.path = f ?? void 0, this.originalError = d ?? void 0, this.nodes = z2(
      Array.isArray(s) ? s : s ? [s] : void 0
    );
    const m = z2(
      (r = this.nodes) === null || r === void 0 ? void 0 : r.map((b) => b.loc).filter((b) => b != null)
    );
    this.source = l ?? (m == null || (o = m[0]) === null || o === void 0 ? void 0 : o.source), this.positions = c ?? (m == null ? void 0 : m.map((b) => b.start)), this.locations = c && l ? c.map((b) => Uv(l, b)) : m == null ? void 0 : m.map((b) => Uv(b.source, b.start));
    const v = Co(
      d == null ? void 0 : d.extensions
    ) ? d == null ? void 0 : d.extensions : void 0;
    this.extensions = (i = g ?? v) !== null && i !== void 0 ? i : /* @__PURE__ */ Object.create(null), Object.defineProperties(this, {
      message: {
        writable: !0,
        enumerable: !0
      },
      name: {
        enumerable: !1
      },
      nodes: {
        enumerable: !1
      },
      source: {
        enumerable: !1
      },
      positions: {
        enumerable: !1
      },
      originalError: {
        enumerable: !1
      }
    }), d != null && d.stack ? Object.defineProperty(this, "stack", {
      value: d.stack,
      writable: !0,
      configurable: !0
    }) : Error.captureStackTrace ? Error.captureStackTrace(this, he) : Object.defineProperty(this, "stack", {
      value: Error().stack,
      writable: !0,
      configurable: !0
    });
  }
  get [Symbol.toStringTag]() {
    return "GraphQLError";
  }
  toString() {
    let t = this.message;
    if (this.nodes)
      for (const n of this.nodes)
        n.loc && (t += `

` + WM(n.loc));
    else if (this.source && this.locations)
      for (const n of this.locations)
        t += `

` + nC(this.source, n);
    return t;
  }
  toJSON() {
    const t = {
      message: this.message
    };
    return this.locations != null && (t.locations = this.locations), this.path != null && (t.path = this.path), this.extensions != null && Object.keys(this.extensions).length > 0 && (t.extensions = this.extensions), t;
  }
}
function z2(e) {
  return e === void 0 || e.length === 0 ? void 0 : e;
}
function bj(e) {
  return e.toString();
}
function Ej(e) {
  return e.toJSON();
}
function jn(e, t, n) {
  return new he(`Syntax Error: ${n}`, {
    source: e,
    positions: [t]
  });
}
let GM = class {
  /**
   * The character offset at which this Node begins.
   */
  /**
   * The character offset at which this Node ends.
   */
  /**
   * The Token at which this Node begins.
   */
  /**
   * The Token at which this Node ends.
   */
  /**
   * The Source document the AST represents.
   */
  constructor(t, n, r) {
    this.start = t.start, this.end = n.end, this.startToken = t, this.endToken = n, this.source = r;
  }
  get [Symbol.toStringTag]() {
    return "Location";
  }
  toJSON() {
    return {
      start: this.start,
      end: this.end
    };
  }
}, rC = class {
  /**
   * The kind of Token.
   */
  /**
   * The character offset at which this Node begins.
   */
  /**
   * The character offset at which this Node ends.
   */
  /**
   * The 1-indexed line number on which this Token appears.
   */
  /**
   * The 1-indexed column number at which this Token begins.
   */
  /**
   * For non-punctuation tokens, represents the interpreted value of the token.
   *
   * Note: is undefined for punctuation tokens, but typed as string for
   * convenience in the parser.
   */
  /**
   * Tokens exist as nodes in a double-linked-list amongst all tokens
   * including ignored tokens. <SOF> is always the first node and <EOF>
   * the last.
   */
  constructor(t, n, r, o, i, s) {
    this.kind = t, this.start = n, this.end = r, this.line = o, this.column = i, this.value = s, this.prev = null, this.next = null;
  }
  get [Symbol.toStringTag]() {
    return "Token";
  }
  toJSON() {
    return {
      kind: this.kind,
      value: this.value,
      line: this.line,
      column: this.column
    };
  }
};
const QM = {
  Name: [],
  Document: ["definitions"],
  OperationDefinition: [
    "name",
    "variableDefinitions",
    "directives",
    "selectionSet"
  ],
  VariableDefinition: ["variable", "type", "defaultValue", "directives"],
  Variable: ["name"],
  SelectionSet: ["selections"],
  Field: ["alias", "name", "arguments", "directives", "selectionSet"],
  Argument: ["name", "value"],
  FragmentSpread: ["name", "directives"],
  InlineFragment: ["typeCondition", "directives", "selectionSet"],
  FragmentDefinition: [
    "name",
    // Note: fragment variable definitions are deprecated and will removed in v17.0.0
    "variableDefinitions",
    "typeCondition",
    "directives",
    "selectionSet"
  ],
  IntValue: [],
  FloatValue: [],
  StringValue: [],
  BooleanValue: [],
  NullValue: [],
  EnumValue: [],
  ListValue: ["values"],
  ObjectValue: ["fields"],
  ObjectField: ["name", "value"],
  Directive: ["name", "arguments"],
  NamedType: ["name"],
  ListType: ["type"],
  NonNullType: ["type"],
  SchemaDefinition: ["description", "directives", "operationTypes"],
  OperationTypeDefinition: ["type"],
  ScalarTypeDefinition: ["description", "name", "directives"],
  ObjectTypeDefinition: [
    "description",
    "name",
    "interfaces",
    "directives",
    "fields"
  ],
  FieldDefinition: ["description", "name", "arguments", "type", "directives"],
  InputValueDefinition: [
    "description",
    "name",
    "type",
    "defaultValue",
    "directives"
  ],
  InterfaceTypeDefinition: [
    "description",
    "name",
    "interfaces",
    "directives",
    "fields"
  ],
  UnionTypeDefinition: ["description", "name", "directives", "types"],
  EnumTypeDefinition: ["description", "name", "directives", "values"],
  EnumValueDefinition: ["description", "name", "directives"],
  InputObjectTypeDefinition: ["description", "name", "directives", "fields"],
  DirectiveDefinition: ["description", "name", "arguments", "locations"],
  SchemaExtension: ["directives", "operationTypes"],
  ScalarTypeExtension: ["name", "directives"],
  ObjectTypeExtension: ["name", "interfaces", "directives", "fields"],
  InterfaceTypeExtension: ["name", "interfaces", "directives", "fields"],
  UnionTypeExtension: ["name", "directives", "types"],
  EnumTypeExtension: ["name", "directives", "values"],
  InputObjectTypeExtension: ["name", "directives", "fields"]
}, wj = new Set(Object.keys(QM));
function Vx(e) {
  const t = e == null ? void 0 : e.kind;
  return typeof t == "string" && wj.has(t);
}
var Bn;
(function(e) {
  e.QUERY = "query", e.MUTATION = "mutation", e.SUBSCRIPTION = "subscription";
})(Bn || (Bn = {}));
var Fe;
(function(e) {
  e.QUERY = "QUERY", e.MUTATION = "MUTATION", e.SUBSCRIPTION = "SUBSCRIPTION", e.FIELD = "FIELD", e.FRAGMENT_DEFINITION = "FRAGMENT_DEFINITION", e.FRAGMENT_SPREAD = "FRAGMENT_SPREAD", e.INLINE_FRAGMENT = "INLINE_FRAGMENT", e.VARIABLE_DEFINITION = "VARIABLE_DEFINITION", e.SCHEMA = "SCHEMA", e.SCALAR = "SCALAR", e.OBJECT = "OBJECT", e.FIELD_DEFINITION = "FIELD_DEFINITION", e.ARGUMENT_DEFINITION = "ARGUMENT_DEFINITION", e.INTERFACE = "INTERFACE", e.UNION = "UNION", e.ENUM = "ENUM", e.ENUM_VALUE = "ENUM_VALUE", e.INPUT_OBJECT = "INPUT_OBJECT", e.INPUT_FIELD_DEFINITION = "INPUT_FIELD_DEFINITION";
})(Fe || (Fe = {}));
var U;
(function(e) {
  e.NAME = "Name", e.DOCUMENT = "Document", e.OPERATION_DEFINITION = "OperationDefinition", e.VARIABLE_DEFINITION = "VariableDefinition", e.SELECTION_SET = "SelectionSet", e.FIELD = "Field", e.ARGUMENT = "Argument", e.FRAGMENT_SPREAD = "FragmentSpread", e.INLINE_FRAGMENT = "InlineFragment", e.FRAGMENT_DEFINITION = "FragmentDefinition", e.VARIABLE = "Variable", e.INT = "IntValue", e.FLOAT = "FloatValue", e.STRING = "StringValue", e.BOOLEAN = "BooleanValue", e.NULL = "NullValue", e.ENUM = "EnumValue", e.LIST = "ListValue", e.OBJECT = "ObjectValue", e.OBJECT_FIELD = "ObjectField", e.DIRECTIVE = "Directive", e.NAMED_TYPE = "NamedType", e.LIST_TYPE = "ListType", e.NON_NULL_TYPE = "NonNullType", e.SCHEMA_DEFINITION = "SchemaDefinition", e.OPERATION_TYPE_DEFINITION = "OperationTypeDefinition", e.SCALAR_TYPE_DEFINITION = "ScalarTypeDefinition", e.OBJECT_TYPE_DEFINITION = "ObjectTypeDefinition", e.FIELD_DEFINITION = "FieldDefinition", e.INPUT_VALUE_DEFINITION = "InputValueDefinition", e.INTERFACE_TYPE_DEFINITION = "InterfaceTypeDefinition", e.UNION_TYPE_DEFINITION = "UnionTypeDefinition", e.ENUM_TYPE_DEFINITION = "EnumTypeDefinition", e.ENUM_VALUE_DEFINITION = "EnumValueDefinition", e.INPUT_OBJECT_TYPE_DEFINITION = "InputObjectTypeDefinition", e.DIRECTIVE_DEFINITION = "DirectiveDefinition", e.SCHEMA_EXTENSION = "SchemaExtension", e.SCALAR_TYPE_EXTENSION = "ScalarTypeExtension", e.OBJECT_TYPE_EXTENSION = "ObjectTypeExtension", e.INTERFACE_TYPE_EXTENSION = "InterfaceTypeExtension", e.UNION_TYPE_EXTENSION = "UnionTypeExtension", e.ENUM_TYPE_EXTENSION = "EnumTypeExtension", e.INPUT_OBJECT_TYPE_EXTENSION = "InputObjectTypeExtension";
})(U || (U = {}));
function jx(e) {
  return e === 9 || e === 32;
}
function Rp(e) {
  return e >= 48 && e <= 57;
}
function YM(e) {
  return e >= 97 && e <= 122 || // A-Z
  e >= 65 && e <= 90;
}
function oC(e) {
  return YM(e) || e === 95;
}
function KM(e) {
  return YM(e) || Rp(e) || e === 95;
}
function xj(e) {
  var t;
  let n = Number.MAX_SAFE_INTEGER, r = null, o = -1;
  for (let s = 0; s < e.length; ++s) {
    var i;
    const l = e[s], c = Sj(l);
    c !== l.length && (r = (i = r) !== null && i !== void 0 ? i : s, o = s, s !== 0 && c < n && (n = c));
  }
  return e.map((s, l) => l === 0 ? s : s.slice(n)).slice(
    (t = r) !== null && t !== void 0 ? t : 0,
    o + 1
  );
}
function Sj(e) {
  let t = 0;
  for (; t < e.length && jx(e.charCodeAt(t)); )
    ++t;
  return t;
}
function Tj(e) {
  if (e === "")
    return !0;
  let t = !0, n = !1, r = !0, o = !1;
  for (let i = 0; i < e.length; ++i)
    switch (e.codePointAt(i)) {
      case 0:
      case 1:
      case 2:
      case 3:
      case 4:
      case 5:
      case 6:
      case 7:
      case 8:
      case 11:
      case 12:
      case 14:
      case 15:
        return !1;
      case 13:
        return !1;
      case 10:
        if (t && !o)
          return !1;
        o = !0, t = !0, n = !1;
        break;
      case 9:
      case 32:
        n || (n = t);
        break;
      default:
        r && (r = n), t = !1;
    }
  return !(t || r && o);
}
function JM(e, t) {
  const n = e.replace(/"""/g, '\\"""'), r = n.split(/\r\n|[\n\r]/g), o = r.length === 1, i = r.length > 1 && r.slice(1).every((v) => v.length === 0 || jx(v.charCodeAt(0))), s = n.endsWith('\\"""'), l = e.endsWith('"') && !s, c = e.endsWith("\\"), f = l || c, d = !(t != null && t.minimize) && // add leading and trailing new lines only if it improves readability
  (!o || e.length > 70 || f || i || s);
  let g = "";
  const m = o && jx(e.charCodeAt(0));
  return (d && !m || i) && (g += `
`), g += n, (d || f) && (g += `
`), '"""' + g + '"""';
}
var ve;
(function(e) {
  e.SOF = "<SOF>", e.EOF = "<EOF>", e.BANG = "!", e.DOLLAR = "$", e.AMP = "&", e.PAREN_L = "(", e.PAREN_R = ")", e.SPREAD = "...", e.COLON = ":", e.EQUALS = "=", e.AT = "@", e.BRACKET_L = "[", e.BRACKET_R = "]", e.BRACE_L = "{", e.PIPE = "|", e.BRACE_R = "}", e.NAME = "Name", e.INT = "Int", e.FLOAT = "Float", e.STRING = "String", e.BLOCK_STRING = "BlockString", e.COMMENT = "Comment";
})(ve || (ve = {}));
class iC {
  /**
   * The previously focused non-ignored token.
   */
  /**
   * The currently focused non-ignored token.
   */
  /**
   * The (1-indexed) line containing the current token.
   */
  /**
   * The character offset at which the current line begins.
   */
  constructor(t) {
    const n = new rC(ve.SOF, 0, 0, 0, 0);
    this.source = t, this.lastToken = n, this.token = n, this.line = 1, this.lineStart = 0;
  }
  get [Symbol.toStringTag]() {
    return "Lexer";
  }
  /**
   * Advances the token stream to the next non-ignored token.
   */
  advance() {
    return this.lastToken = this.token, this.token = this.lookahead();
  }
  /**
   * Looks ahead and returns the next non-ignored token, but does not change
   * the state of Lexer.
   */
  lookahead() {
    let t = this.token;
    if (t.kind !== ve.EOF)
      do
        if (t.next)
          t = t.next;
        else {
          const n = Cj(this, t.end);
          t.next = n, n.prev = t, t = n;
        }
      while (t.kind === ve.COMMENT);
    return t;
  }
}
function XM(e) {
  return e === ve.BANG || e === ve.DOLLAR || e === ve.AMP || e === ve.PAREN_L || e === ve.PAREN_R || e === ve.SPREAD || e === ve.COLON || e === ve.EQUALS || e === ve.AT || e === ve.BRACKET_L || e === ve.BRACKET_R || e === ve.BRACE_L || e === ve.PIPE || e === ve.BRACE_R;
}
function Af(e) {
  return e >= 0 && e <= 55295 || e >= 57344 && e <= 1114111;
}
function uy(e, t) {
  return ZM(e.charCodeAt(t)) && eP(e.charCodeAt(t + 1));
}
function ZM(e) {
  return e >= 55296 && e <= 56319;
}
function eP(e) {
  return e >= 56320 && e <= 57343;
}
function mc(e, t) {
  const n = e.source.body.codePointAt(t);
  if (n === void 0)
    return ve.EOF;
  if (n >= 32 && n <= 126) {
    const r = String.fromCodePoint(n);
    return r === '"' ? `'"'` : `"${r}"`;
  }
  return "U+" + n.toString(16).toUpperCase().padStart(4, "0");
}
function An(e, t, n, r, o) {
  const i = e.line, s = 1 + n - e.lineStart;
  return new rC(t, n, r, i, s, o);
}
function Cj(e, t) {
  const n = e.source.body, r = n.length;
  let o = t;
  for (; o < r; ) {
    const i = n.charCodeAt(o);
    switch (i) {
      case 65279:
      case 9:
      case 32:
      case 44:
        ++o;
        continue;
      case 10:
        ++o, ++e.line, e.lineStart = o;
        continue;
      case 13:
        n.charCodeAt(o + 1) === 10 ? o += 2 : ++o, ++e.line, e.lineStart = o;
        continue;
      case 35:
        return kj(e, o);
      case 33:
        return An(e, ve.BANG, o, o + 1);
      case 36:
        return An(e, ve.DOLLAR, o, o + 1);
      case 38:
        return An(e, ve.AMP, o, o + 1);
      case 40:
        return An(e, ve.PAREN_L, o, o + 1);
      case 41:
        return An(e, ve.PAREN_R, o, o + 1);
      case 46:
        if (n.charCodeAt(o + 1) === 46 && n.charCodeAt(o + 2) === 46)
          return An(e, ve.SPREAD, o, o + 3);
        break;
      case 58:
        return An(e, ve.COLON, o, o + 1);
      case 61:
        return An(e, ve.EQUALS, o, o + 1);
      case 64:
        return An(e, ve.AT, o, o + 1);
      case 91:
        return An(e, ve.BRACKET_L, o, o + 1);
      case 93:
        return An(e, ve.BRACKET_R, o, o + 1);
      case 123:
        return An(e, ve.BRACE_L, o, o + 1);
      case 124:
        return An(e, ve.PIPE, o, o + 1);
      case 125:
        return An(e, ve.BRACE_R, o, o + 1);
      case 34:
        return n.charCodeAt(o + 1) === 34 && n.charCodeAt(o + 2) === 34 ? Ij(e, o) : Nj(e, o);
    }
    if (Rp(i) || i === 45)
      return _j(e, o, i);
    if (oC(i))
      return Lj(e, o);
    throw jn(
      e.source,
      o,
      i === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : Af(i) || uy(n, o) ? `Unexpected character: ${mc(e, o)}.` : `Invalid character: ${mc(e, o)}.`
    );
  }
  return An(e, ve.EOF, r, r);
}
function kj(e, t) {
  const n = e.source.body, r = n.length;
  let o = t + 1;
  for (; o < r; ) {
    const i = n.charCodeAt(o);
    if (i === 10 || i === 13)
      break;
    if (Af(i))
      ++o;
    else if (uy(n, o))
      o += 2;
    else
      break;
  }
  return An(
    e,
    ve.COMMENT,
    t,
    o,
    n.slice(t + 1, o)
  );
}
function _j(e, t, n) {
  const r = e.source.body;
  let o = t, i = n, s = !1;
  if (i === 45 && (i = r.charCodeAt(++o)), i === 48) {
    if (i = r.charCodeAt(++o), Rp(i))
      throw jn(
        e.source,
        o,
        `Invalid number, unexpected digit after 0: ${mc(
          e,
          o
        )}.`
      );
  } else
    o = GE(e, o, i), i = r.charCodeAt(o);
  if (i === 46 && (s = !0, i = r.charCodeAt(++o), o = GE(e, o, i), i = r.charCodeAt(o)), (i === 69 || i === 101) && (s = !0, i = r.charCodeAt(++o), (i === 43 || i === 45) && (i = r.charCodeAt(++o)), o = GE(e, o, i), i = r.charCodeAt(o)), i === 46 || oC(i))
    throw jn(
      e.source,
      o,
      `Invalid number, expected digit but got: ${mc(
        e,
        o
      )}.`
    );
  return An(
    e,
    s ? ve.FLOAT : ve.INT,
    t,
    o,
    r.slice(t, o)
  );
}
function GE(e, t, n) {
  if (!Rp(n))
    throw jn(
      e.source,
      t,
      `Invalid number, expected digit but got: ${mc(
        e,
        t
      )}.`
    );
  const r = e.source.body;
  let o = t + 1;
  for (; Rp(r.charCodeAt(o)); )
    ++o;
  return o;
}
function Nj(e, t) {
  const n = e.source.body, r = n.length;
  let o = t + 1, i = o, s = "";
  for (; o < r; ) {
    const l = n.charCodeAt(o);
    if (l === 34)
      return s += n.slice(i, o), An(e, ve.STRING, t, o + 1, s);
    if (l === 92) {
      s += n.slice(i, o);
      const c = n.charCodeAt(o + 1) === 117 ? n.charCodeAt(o + 2) === 123 ? Oj(e, o) : Aj(e, o) : Dj(e, o);
      s += c.value, o += c.size, i = o;
      continue;
    }
    if (l === 10 || l === 13)
      break;
    if (Af(l))
      ++o;
    else if (uy(n, o))
      o += 2;
    else
      throw jn(
        e.source,
        o,
        `Invalid character within String: ${mc(
          e,
          o
        )}.`
      );
  }
  throw jn(e.source, o, "Unterminated string.");
}
function Oj(e, t) {
  const n = e.source.body;
  let r = 0, o = 3;
  for (; o < 12; ) {
    const i = n.charCodeAt(t + o++);
    if (i === 125) {
      if (o < 5 || !Af(r))
        break;
      return {
        value: String.fromCodePoint(r),
        size: o
      };
    }
    if (r = r << 4 | Bd(i), r < 0)
      break;
  }
  throw jn(
    e.source,
    t,
    `Invalid Unicode escape sequence: "${n.slice(
      t,
      t + o
    )}".`
  );
}
function Aj(e, t) {
  const n = e.source.body, r = H2(n, t + 2);
  if (Af(r))
    return {
      value: String.fromCodePoint(r),
      size: 6
    };
  if (ZM(r) && n.charCodeAt(t + 6) === 92 && n.charCodeAt(t + 7) === 117) {
    const o = H2(n, t + 8);
    if (eP(o))
      return {
        value: String.fromCodePoint(r, o),
        size: 12
      };
  }
  throw jn(
    e.source,
    t,
    `Invalid Unicode escape sequence: "${n.slice(t, t + 6)}".`
  );
}
function H2(e, t) {
  return Bd(e.charCodeAt(t)) << 12 | Bd(e.charCodeAt(t + 1)) << 8 | Bd(e.charCodeAt(t + 2)) << 4 | Bd(e.charCodeAt(t + 3));
}
function Bd(e) {
  return e >= 48 && e <= 57 ? e - 48 : e >= 65 && e <= 70 ? e - 55 : e >= 97 && e <= 102 ? e - 87 : -1;
}
function Dj(e, t) {
  const n = e.source.body;
  switch (n.charCodeAt(t + 1)) {
    case 34:
      return {
        value: '"',
        size: 2
      };
    case 92:
      return {
        value: "\\",
        size: 2
      };
    case 47:
      return {
        value: "/",
        size: 2
      };
    case 98:
      return {
        value: "\b",
        size: 2
      };
    case 102:
      return {
        value: "\f",
        size: 2
      };
    case 110:
      return {
        value: `
`,
        size: 2
      };
    case 114:
      return {
        value: "\r",
        size: 2
      };
    case 116:
      return {
        value: "	",
        size: 2
      };
  }
  throw jn(
    e.source,
    t,
    `Invalid character escape sequence: "${n.slice(
      t,
      t + 2
    )}".`
  );
}
function Ij(e, t) {
  const n = e.source.body, r = n.length;
  let o = e.lineStart, i = t + 3, s = i, l = "";
  const c = [];
  for (; i < r; ) {
    const f = n.charCodeAt(i);
    if (f === 34 && n.charCodeAt(i + 1) === 34 && n.charCodeAt(i + 2) === 34) {
      l += n.slice(s, i), c.push(l);
      const d = An(
        e,
        ve.BLOCK_STRING,
        t,
        i + 3,
        // Return a string of the lines joined with U+000A.
        xj(c).join(`
`)
      );
      return e.line += c.length - 1, e.lineStart = o, d;
    }
    if (f === 92 && n.charCodeAt(i + 1) === 34 && n.charCodeAt(i + 2) === 34 && n.charCodeAt(i + 3) === 34) {
      l += n.slice(s, i), s = i + 1, i += 4;
      continue;
    }
    if (f === 10 || f === 13) {
      l += n.slice(s, i), c.push(l), f === 13 && n.charCodeAt(i + 1) === 10 ? i += 2 : ++i, l = "", s = i, o = i;
      continue;
    }
    if (Af(f))
      ++i;
    else if (uy(n, i))
      i += 2;
    else
      throw jn(
        e.source,
        i,
        `Invalid character within String: ${mc(
          e,
          i
        )}.`
      );
  }
  throw jn(e.source, i, "Unterminated string.");
}
function Lj(e, t) {
  const n = e.source.body, r = n.length;
  let o = t + 1;
  for (; o < r; ) {
    const i = n.charCodeAt(o);
    if (KM(i))
      ++o;
    else
      break;
  }
  return An(
    e,
    ve.NAME,
    t,
    o,
    n.slice(t, o)
  );
}
const Rj = 10, tP = 2;
function be(e) {
  return fy(e, []);
}
function fy(e, t) {
  switch (typeof e) {
    case "string":
      return JSON.stringify(e);
    case "function":
      return e.name ? `[function ${e.name}]` : "[function]";
    case "object":
      return Fj(e, t);
    default:
      return String(e);
  }
}
function Fj(e, t) {
  if (e === null)
    return "null";
  if (t.includes(e))
    return "[Circular]";
  const n = [...t, e];
  if (Mj(e)) {
    const r = e.toJSON();
    if (r !== e)
      return typeof r == "string" ? r : fy(r, n);
  } else if (Array.isArray(e))
    return $j(e, n);
  return Pj(e, n);
}
function Mj(e) {
  return typeof e.toJSON == "function";
}
function Pj(e, t) {
  const n = Object.entries(e);
  return n.length === 0 ? "{}" : t.length > tP ? "[" + Vj(e) + "]" : "{ " + n.map(
    ([o, i]) => o + ": " + fy(i, t)
  ).join(", ") + " }";
}
function $j(e, t) {
  if (e.length === 0)
    return "[]";
  if (t.length > tP)
    return "[Array]";
  const n = Math.min(Rj, e.length), r = e.length - n, o = [];
  for (let i = 0; i < n; ++i)
    o.push(fy(e[i], t));
  return r === 1 ? o.push("... 1 more item") : r > 1 && o.push(`... ${r} more items`), "[" + o.join(", ") + "]";
}
function Vj(e) {
  const t = Object.prototype.toString.call(e).replace(/^\[object /, "").replace(/]$/, "");
  if (t === "Object" && typeof e.constructor == "function") {
    const n = e.constructor.name;
    if (typeof n == "string" && n !== "")
      return n;
  }
  return t;
}
const Di = (
  /* c8 ignore next 6 */
  // FIXME: https://github.com/graphql/graphql-js/issues/2317
  globalThis.process && globalThis.process.env.NODE_ENV === "production" ? function(t, n) {
    return t instanceof n;
  } : function(t, n) {
    if (t instanceof n)
      return !0;
    if (typeof t == "object" && t !== null) {
      var r;
      const o = n.prototype[Symbol.toStringTag], i = (
        // We still need to support constructor's name to detect conflicts with older versions of this library.
        Symbol.toStringTag in t ? t[Symbol.toStringTag] : (r = t.constructor) === null || r === void 0 ? void 0 : r.name
      );
      if (o === i) {
        const s = be(t);
        throw new Error(`Cannot use ${o} "${s}" from another module or realm.

Ensure that there is only one instance of "graphql" in the node_modules
directory. If different versions of "graphql" are the dependencies of other
relied on modules, use "resolutions" to ensure only one version is installed.

https://yarnpkg.com/en/docs/selective-version-resolutions

Duplicate "graphql" modules cannot be used at the same time since different
versions may have different capabilities and behavior. The data from one
version used in the function from another could produce confusing and
spurious results.`);
      }
    }
    return !1;
  }
);
class yh {
  constructor(t, n = "GraphQL request", r = {
    line: 1,
    column: 1
  }) {
    typeof t == "string" || lt(!1, `Body must be a string. Received: ${be(t)}.`), this.body = t, this.name = n, this.locationOffset = r, this.locationOffset.line > 0 || lt(
      !1,
      "line in locationOffset is 1-indexed and must be positive."
    ), this.locationOffset.column > 0 || lt(
      !1,
      "column in locationOffset is 1-indexed and must be positive."
    );
  }
  get [Symbol.toStringTag]() {
    return "Source";
  }
}
function nP(e) {
  return Di(e, yh);
}
function fr(e, t) {
  return new dy(e, t).parseDocument();
}
function rP(e, t) {
  const n = new dy(e, t);
  n.expectToken(ve.SOF);
  const r = n.parseValueLiteral(!1);
  return n.expectToken(ve.EOF), r;
}
function jj(e, t) {
  const n = new dy(e, t);
  n.expectToken(ve.SOF);
  const r = n.parseConstValueLiteral();
  return n.expectToken(ve.EOF), r;
}
function Uj(e, t) {
  const n = new dy(e, t);
  n.expectToken(ve.SOF);
  const r = n.parseTypeReference();
  return n.expectToken(ve.EOF), r;
}
class dy {
  constructor(t, n = {}) {
    const r = nP(t) ? t : new yh(t);
    this._lexer = new iC(r), this._options = n, this._tokenCounter = 0;
  }
  /**
   * Converts a name lex token into a name parse node.
   */
  parseName() {
    const t = this.expectToken(ve.NAME);
    return this.node(t, {
      kind: U.NAME,
      value: t.value
    });
  }
  // Implements the parsing rules in the Document section.
  /**
   * Document : Definition+
   */
  parseDocument() {
    return this.node(this._lexer.token, {
      kind: U.DOCUMENT,
      definitions: this.many(
        ve.SOF,
        this.parseDefinition,
        ve.EOF
      )
    });
  }
  /**
   * Definition :
   *   - ExecutableDefinition
   *   - TypeSystemDefinition
   *   - TypeSystemExtension
   *
   * ExecutableDefinition :
   *   - OperationDefinition
   *   - FragmentDefinition
   *
   * TypeSystemDefinition :
   *   - SchemaDefinition
   *   - TypeDefinition
   *   - DirectiveDefinition
   *
   * TypeDefinition :
   *   - ScalarTypeDefinition
   *   - ObjectTypeDefinition
   *   - InterfaceTypeDefinition
   *   - UnionTypeDefinition
   *   - EnumTypeDefinition
   *   - InputObjectTypeDefinition
   */
  parseDefinition() {
    if (this.peek(ve.BRACE_L))
      return this.parseOperationDefinition();
    const t = this.peekDescription(), n = t ? this._lexer.lookahead() : this._lexer.token;
    if (n.kind === ve.NAME) {
      switch (n.value) {
        case "schema":
          return this.parseSchemaDefinition();
        case "scalar":
          return this.parseScalarTypeDefinition();
        case "type":
          return this.parseObjectTypeDefinition();
        case "interface":
          return this.parseInterfaceTypeDefinition();
        case "union":
          return this.parseUnionTypeDefinition();
        case "enum":
          return this.parseEnumTypeDefinition();
        case "input":
          return this.parseInputObjectTypeDefinition();
        case "directive":
          return this.parseDirectiveDefinition();
      }
      if (t)
        throw jn(
          this._lexer.source,
          this._lexer.token.start,
          "Unexpected description, descriptions are supported only on type definitions."
        );
      switch (n.value) {
        case "query":
        case "mutation":
        case "subscription":
          return this.parseOperationDefinition();
        case "fragment":
          return this.parseFragmentDefinition();
        case "extend":
          return this.parseTypeSystemExtension();
      }
    }
    throw this.unexpected(n);
  }
  // Implements the parsing rules in the Operations section.
  /**
   * OperationDefinition :
   *  - SelectionSet
   *  - OperationType Name? VariableDefinitions? Directives? SelectionSet
   */
  parseOperationDefinition() {
    const t = this._lexer.token;
    if (this.peek(ve.BRACE_L))
      return this.node(t, {
        kind: U.OPERATION_DEFINITION,
        operation: Bn.QUERY,
        name: void 0,
        variableDefinitions: [],
        directives: [],
        selectionSet: this.parseSelectionSet()
      });
    const n = this.parseOperationType();
    let r;
    return this.peek(ve.NAME) && (r = this.parseName()), this.node(t, {
      kind: U.OPERATION_DEFINITION,
      operation: n,
      name: r,
      variableDefinitions: this.parseVariableDefinitions(),
      directives: this.parseDirectives(!1),
      selectionSet: this.parseSelectionSet()
    });
  }
  /**
   * OperationType : one of query mutation subscription
   */
  parseOperationType() {
    const t = this.expectToken(ve.NAME);
    switch (t.value) {
      case "query":
        return Bn.QUERY;
      case "mutation":
        return Bn.MUTATION;
      case "subscription":
        return Bn.SUBSCRIPTION;
    }
    throw this.unexpected(t);
  }
  /**
   * VariableDefinitions : ( VariableDefinition+ )
   */
  parseVariableDefinitions() {
    return this.optionalMany(
      ve.PAREN_L,
      this.parseVariableDefinition,
      ve.PAREN_R
    );
  }
  /**
   * VariableDefinition : Variable : Type DefaultValue? Directives[Const]?
   */
  parseVariableDefinition() {
    return this.node(this._lexer.token, {
      kind: U.VARIABLE_DEFINITION,
      variable: this.parseVariable(),
      type: (this.expectToken(ve.COLON), this.parseTypeReference()),
      defaultValue: this.expectOptionalToken(ve.EQUALS) ? this.parseConstValueLiteral() : void 0,
      directives: this.parseConstDirectives()
    });
  }
  /**
   * Variable : $ Name
   */
  parseVariable() {
    const t = this._lexer.token;
    return this.expectToken(ve.DOLLAR), this.node(t, {
      kind: U.VARIABLE,
      name: this.parseName()
    });
  }
  /**
   * ```
   * SelectionSet : { Selection+ }
   * ```
   */
  parseSelectionSet() {
    return this.node(this._lexer.token, {
      kind: U.SELECTION_SET,
      selections: this.many(
        ve.BRACE_L,
        this.parseSelection,
        ve.BRACE_R
      )
    });
  }
  /**
   * Selection :
   *   - Field
   *   - FragmentSpread
   *   - InlineFragment
   */
  parseSelection() {
    return this.peek(ve.SPREAD) ? this.parseFragment() : this.parseField();
  }
  /**
   * Field : Alias? Name Arguments? Directives? SelectionSet?
   *
   * Alias : Name :
   */
  parseField() {
    const t = this._lexer.token, n = this.parseName();
    let r, o;
    return this.expectOptionalToken(ve.COLON) ? (r = n, o = this.parseName()) : o = n, this.node(t, {
      kind: U.FIELD,
      alias: r,
      name: o,
      arguments: this.parseArguments(!1),
      directives: this.parseDirectives(!1),
      selectionSet: this.peek(ve.BRACE_L) ? this.parseSelectionSet() : void 0
    });
  }
  /**
   * Arguments[Const] : ( Argument[?Const]+ )
   */
  parseArguments(t) {
    const n = t ? this.parseConstArgument : this.parseArgument;
    return this.optionalMany(ve.PAREN_L, n, ve.PAREN_R);
  }
  /**
   * Argument[Const] : Name : Value[?Const]
   */
  parseArgument(t = !1) {
    const n = this._lexer.token, r = this.parseName();
    return this.expectToken(ve.COLON), this.node(n, {
      kind: U.ARGUMENT,
      name: r,
      value: this.parseValueLiteral(t)
    });
  }
  parseConstArgument() {
    return this.parseArgument(!0);
  }
  // Implements the parsing rules in the Fragments section.
  /**
   * Corresponds to both FragmentSpread and InlineFragment in the spec.
   *
   * FragmentSpread : ... FragmentName Directives?
   *
   * InlineFragment : ... TypeCondition? Directives? SelectionSet
   */
  parseFragment() {
    const t = this._lexer.token;
    this.expectToken(ve.SPREAD);
    const n = this.expectOptionalKeyword("on");
    return !n && this.peek(ve.NAME) ? this.node(t, {
      kind: U.FRAGMENT_SPREAD,
      name: this.parseFragmentName(),
      directives: this.parseDirectives(!1)
    }) : this.node(t, {
      kind: U.INLINE_FRAGMENT,
      typeCondition: n ? this.parseNamedType() : void 0,
      directives: this.parseDirectives(!1),
      selectionSet: this.parseSelectionSet()
    });
  }
  /**
   * FragmentDefinition :
   *   - fragment FragmentName on TypeCondition Directives? SelectionSet
   *
   * TypeCondition : NamedType
   */
  parseFragmentDefinition() {
    const t = this._lexer.token;
    return this.expectKeyword("fragment"), this._options.allowLegacyFragmentVariables === !0 ? this.node(t, {
      kind: U.FRAGMENT_DEFINITION,
      name: this.parseFragmentName(),
      variableDefinitions: this.parseVariableDefinitions(),
      typeCondition: (this.expectKeyword("on"), this.parseNamedType()),
      directives: this.parseDirectives(!1),
      selectionSet: this.parseSelectionSet()
    }) : this.node(t, {
      kind: U.FRAGMENT_DEFINITION,
      name: this.parseFragmentName(),
      typeCondition: (this.expectKeyword("on"), this.parseNamedType()),
      directives: this.parseDirectives(!1),
      selectionSet: this.parseSelectionSet()
    });
  }
  /**
   * FragmentName : Name but not `on`
   */
  parseFragmentName() {
    if (this._lexer.token.value === "on")
      throw this.unexpected();
    return this.parseName();
  }
  // Implements the parsing rules in the Values section.
  /**
   * Value[Const] :
   *   - [~Const] Variable
   *   - IntValue
   *   - FloatValue
   *   - StringValue
   *   - BooleanValue
   *   - NullValue
   *   - EnumValue
   *   - ListValue[?Const]
   *   - ObjectValue[?Const]
   *
   * BooleanValue : one of `true` `false`
   *
   * NullValue : `null`
   *
   * EnumValue : Name but not `true`, `false` or `null`
   */
  parseValueLiteral(t) {
    const n = this._lexer.token;
    switch (n.kind) {
      case ve.BRACKET_L:
        return this.parseList(t);
      case ve.BRACE_L:
        return this.parseObject(t);
      case ve.INT:
        return this.advanceLexer(), this.node(n, {
          kind: U.INT,
          value: n.value
        });
      case ve.FLOAT:
        return this.advanceLexer(), this.node(n, {
          kind: U.FLOAT,
          value: n.value
        });
      case ve.STRING:
      case ve.BLOCK_STRING:
        return this.parseStringLiteral();
      case ve.NAME:
        switch (this.advanceLexer(), n.value) {
          case "true":
            return this.node(n, {
              kind: U.BOOLEAN,
              value: !0
            });
          case "false":
            return this.node(n, {
              kind: U.BOOLEAN,
              value: !1
            });
          case "null":
            return this.node(n, {
              kind: U.NULL
            });
          default:
            return this.node(n, {
              kind: U.ENUM,
              value: n.value
            });
        }
      case ve.DOLLAR:
        if (t)
          if (this.expectToken(ve.DOLLAR), this._lexer.token.kind === ve.NAME) {
            const r = this._lexer.token.value;
            throw jn(
              this._lexer.source,
              n.start,
              `Unexpected variable "$${r}" in constant value.`
            );
          } else
            throw this.unexpected(n);
        return this.parseVariable();
      default:
        throw this.unexpected();
    }
  }
  parseConstValueLiteral() {
    return this.parseValueLiteral(!0);
  }
  parseStringLiteral() {
    const t = this._lexer.token;
    return this.advanceLexer(), this.node(t, {
      kind: U.STRING,
      value: t.value,
      block: t.kind === ve.BLOCK_STRING
    });
  }
  /**
   * ListValue[Const] :
   *   - [ ]
   *   - [ Value[?Const]+ ]
   */
  parseList(t) {
    const n = () => this.parseValueLiteral(t);
    return this.node(this._lexer.token, {
      kind: U.LIST,
      values: this.any(ve.BRACKET_L, n, ve.BRACKET_R)
    });
  }
  /**
   * ```
   * ObjectValue[Const] :
   *   - { }
   *   - { ObjectField[?Const]+ }
   * ```
   */
  parseObject(t) {
    const n = () => this.parseObjectField(t);
    return this.node(this._lexer.token, {
      kind: U.OBJECT,
      fields: this.any(ve.BRACE_L, n, ve.BRACE_R)
    });
  }
  /**
   * ObjectField[Const] : Name : Value[?Const]
   */
  parseObjectField(t) {
    const n = this._lexer.token, r = this.parseName();
    return this.expectToken(ve.COLON), this.node(n, {
      kind: U.OBJECT_FIELD,
      name: r,
      value: this.parseValueLiteral(t)
    });
  }
  // Implements the parsing rules in the Directives section.
  /**
   * Directives[Const] : Directive[?Const]+
   */
  parseDirectives(t) {
    const n = [];
    for (; this.peek(ve.AT); )
      n.push(this.parseDirective(t));
    return n;
  }
  parseConstDirectives() {
    return this.parseDirectives(!0);
  }
  /**
   * ```
   * Directive[Const] : @ Name Arguments[?Const]?
   * ```
   */
  parseDirective(t) {
    const n = this._lexer.token;
    return this.expectToken(ve.AT), this.node(n, {
      kind: U.DIRECTIVE,
      name: this.parseName(),
      arguments: this.parseArguments(t)
    });
  }
  // Implements the parsing rules in the Types section.
  /**
   * Type :
   *   - NamedType
   *   - ListType
   *   - NonNullType
   */
  parseTypeReference() {
    const t = this._lexer.token;
    let n;
    if (this.expectOptionalToken(ve.BRACKET_L)) {
      const r = this.parseTypeReference();
      this.expectToken(ve.BRACKET_R), n = this.node(t, {
        kind: U.LIST_TYPE,
        type: r
      });
    } else
      n = this.parseNamedType();
    return this.expectOptionalToken(ve.BANG) ? this.node(t, {
      kind: U.NON_NULL_TYPE,
      type: n
    }) : n;
  }
  /**
   * NamedType : Name
   */
  parseNamedType() {
    return this.node(this._lexer.token, {
      kind: U.NAMED_TYPE,
      name: this.parseName()
    });
  }
  // Implements the parsing rules in the Type Definition section.
  peekDescription() {
    return this.peek(ve.STRING) || this.peek(ve.BLOCK_STRING);
  }
  /**
   * Description : StringValue
   */
  parseDescription() {
    if (this.peekDescription())
      return this.parseStringLiteral();
  }
  /**
   * ```
   * SchemaDefinition : Description? schema Directives[Const]? { OperationTypeDefinition+ }
   * ```
   */
  parseSchemaDefinition() {
    const t = this._lexer.token, n = this.parseDescription();
    this.expectKeyword("schema");
    const r = this.parseConstDirectives(), o = this.many(
      ve.BRACE_L,
      this.parseOperationTypeDefinition,
      ve.BRACE_R
    );
    return this.node(t, {
      kind: U.SCHEMA_DEFINITION,
      description: n,
      directives: r,
      operationTypes: o
    });
  }
  /**
   * OperationTypeDefinition : OperationType : NamedType
   */
  parseOperationTypeDefinition() {
    const t = this._lexer.token, n = this.parseOperationType();
    this.expectToken(ve.COLON);
    const r = this.parseNamedType();
    return this.node(t, {
      kind: U.OPERATION_TYPE_DEFINITION,
      operation: n,
      type: r
    });
  }
  /**
   * ScalarTypeDefinition : Description? scalar Name Directives[Const]?
   */
  parseScalarTypeDefinition() {
    const t = this._lexer.token, n = this.parseDescription();
    this.expectKeyword("scalar");
    const r = this.parseName(), o = this.parseConstDirectives();
    return this.node(t, {
      kind: U.SCALAR_TYPE_DEFINITION,
      description: n,
      name: r,
      directives: o
    });
  }
  /**
   * ObjectTypeDefinition :
   *   Description?
   *   type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition?
   */
  parseObjectTypeDefinition() {
    const t = this._lexer.token, n = this.parseDescription();
    this.expectKeyword("type");
    const r = this.parseName(), o = this.parseImplementsInterfaces(), i = this.parseConstDirectives(), s = this.parseFieldsDefinition();
    return this.node(t, {
      kind: U.OBJECT_TYPE_DEFINITION,
      description: n,
      name: r,
      interfaces: o,
      directives: i,
      fields: s
    });
  }
  /**
   * ImplementsInterfaces :
   *   - implements `&`? NamedType
   *   - ImplementsInterfaces & NamedType
   */
  parseImplementsInterfaces() {
    return this.expectOptionalKeyword("implements") ? this.delimitedMany(ve.AMP, this.parseNamedType) : [];
  }
  /**
   * ```
   * FieldsDefinition : { FieldDefinition+ }
   * ```
   */
  parseFieldsDefinition() {
    return this.optionalMany(
      ve.BRACE_L,
      this.parseFieldDefinition,
      ve.BRACE_R
    );
  }
  /**
   * FieldDefinition :
   *   - Description? Name ArgumentsDefinition? : Type Directives[Const]?
   */
  parseFieldDefinition() {
    const t = this._lexer.token, n = this.parseDescription(), r = this.parseName(), o = this.parseArgumentDefs();
    this.expectToken(ve.COLON);
    const i = this.parseTypeReference(), s = this.parseConstDirectives();
    return this.node(t, {
      kind: U.FIELD_DEFINITION,
      description: n,
      name: r,
      arguments: o,
      type: i,
      directives: s
    });
  }
  /**
   * ArgumentsDefinition : ( InputValueDefinition+ )
   */
  parseArgumentDefs() {
    return this.optionalMany(
      ve.PAREN_L,
      this.parseInputValueDef,
      ve.PAREN_R
    );
  }
  /**
   * InputValueDefinition :
   *   - Description? Name : Type DefaultValue? Directives[Const]?
   */
  parseInputValueDef() {
    const t = this._lexer.token, n = this.parseDescription(), r = this.parseName();
    this.expectToken(ve.COLON);
    const o = this.parseTypeReference();
    let i;
    this.expectOptionalToken(ve.EQUALS) && (i = this.parseConstValueLiteral());
    const s = this.parseConstDirectives();
    return this.node(t, {
      kind: U.INPUT_VALUE_DEFINITION,
      description: n,
      name: r,
      type: o,
      defaultValue: i,
      directives: s
    });
  }
  /**
   * InterfaceTypeDefinition :
   *   - Description? interface Name Directives[Const]? FieldsDefinition?
   */
  parseInterfaceTypeDefinition() {
    const t = this._lexer.token, n = this.parseDescription();
    this.expectKeyword("interface");
    const r = this.parseName(), o = this.parseImplementsInterfaces(), i = this.parseConstDirectives(), s = this.parseFieldsDefinition();
    return this.node(t, {
      kind: U.INTERFACE_TYPE_DEFINITION,
      description: n,
      name: r,
      interfaces: o,
      directives: i,
      fields: s
    });
  }
  /**
   * UnionTypeDefinition :
   *   - Description? union Name Directives[Const]? UnionMemberTypes?
   */
  parseUnionTypeDefinition() {
    const t = this._lexer.token, n = this.parseDescription();
    this.expectKeyword("union");
    const r = this.parseName(), o = this.parseConstDirectives(), i = this.parseUnionMemberTypes();
    return this.node(t, {
      kind: U.UNION_TYPE_DEFINITION,
      description: n,
      name: r,
      directives: o,
      types: i
    });
  }
  /**
   * UnionMemberTypes :
   *   - = `|`? NamedType
   *   - UnionMemberTypes | NamedType
   */
  parseUnionMemberTypes() {
    return this.expectOptionalToken(ve.EQUALS) ? this.delimitedMany(ve.PIPE, this.parseNamedType) : [];
  }
  /**
   * EnumTypeDefinition :
   *   - Description? enum Name Directives[Const]? EnumValuesDefinition?
   */
  parseEnumTypeDefinition() {
    const t = this._lexer.token, n = this.parseDescription();
    this.expectKeyword("enum");
    const r = this.parseName(), o = this.parseConstDirectives(), i = this.parseEnumValuesDefinition();
    return this.node(t, {
      kind: U.ENUM_TYPE_DEFINITION,
      description: n,
      name: r,
      directives: o,
      values: i
    });
  }
  /**
   * ```
   * EnumValuesDefinition : { EnumValueDefinition+ }
   * ```
   */
  parseEnumValuesDefinition() {
    return this.optionalMany(
      ve.BRACE_L,
      this.parseEnumValueDefinition,
      ve.BRACE_R
    );
  }
  /**
   * EnumValueDefinition : Description? EnumValue Directives[Const]?
   */
  parseEnumValueDefinition() {
    const t = this._lexer.token, n = this.parseDescription(), r = this.parseEnumValueName(), o = this.parseConstDirectives();
    return this.node(t, {
      kind: U.ENUM_VALUE_DEFINITION,
      description: n,
      name: r,
      directives: o
    });
  }
  /**
   * EnumValue : Name but not `true`, `false` or `null`
   */
  parseEnumValueName() {
    if (this._lexer.token.value === "true" || this._lexer.token.value === "false" || this._lexer.token.value === "null")
      throw jn(
        this._lexer.source,
        this._lexer.token.start,
        `${ig(
          this._lexer.token
        )} is reserved and cannot be used for an enum value.`
      );
    return this.parseName();
  }
  /**
   * InputObjectTypeDefinition :
   *   - Description? input Name Directives[Const]? InputFieldsDefinition?
   */
  parseInputObjectTypeDefinition() {
    const t = this._lexer.token, n = this.parseDescription();
    this.expectKeyword("input");
    const r = this.parseName(), o = this.parseConstDirectives(), i = this.parseInputFieldsDefinition();
    return this.node(t, {
      kind: U.INPUT_OBJECT_TYPE_DEFINITION,
      description: n,
      name: r,
      directives: o,
      fields: i
    });
  }
  /**
   * ```
   * InputFieldsDefinition : { InputValueDefinition+ }
   * ```
   */
  parseInputFieldsDefinition() {
    return this.optionalMany(
      ve.BRACE_L,
      this.parseInputValueDef,
      ve.BRACE_R
    );
  }
  /**
   * TypeSystemExtension :
   *   - SchemaExtension
   *   - TypeExtension
   *
   * TypeExtension :
   *   - ScalarTypeExtension
   *   - ObjectTypeExtension
   *   - InterfaceTypeExtension
   *   - UnionTypeExtension
   *   - EnumTypeExtension
   *   - InputObjectTypeDefinition
   */
  parseTypeSystemExtension() {
    const t = this._lexer.lookahead();
    if (t.kind === ve.NAME)
      switch (t.value) {
        case "schema":
          return this.parseSchemaExtension();
        case "scalar":
          return this.parseScalarTypeExtension();
        case "type":
          return this.parseObjectTypeExtension();
        case "interface":
          return this.parseInterfaceTypeExtension();
        case "union":
          return this.parseUnionTypeExtension();
        case "enum":
          return this.parseEnumTypeExtension();
        case "input":
          return this.parseInputObjectTypeExtension();
      }
    throw this.unexpected(t);
  }
  /**
   * ```
   * SchemaExtension :
   *  - extend schema Directives[Const]? { OperationTypeDefinition+ }
   *  - extend schema Directives[Const]
   * ```
   */
  parseSchemaExtension() {
    const t = this._lexer.token;
    this.expectKeyword("extend"), this.expectKeyword("schema");
    const n = this.parseConstDirectives(), r = this.optionalMany(
      ve.BRACE_L,
      this.parseOperationTypeDefinition,
      ve.BRACE_R
    );
    if (n.length === 0 && r.length === 0)
      throw this.unexpected();
    return this.node(t, {
      kind: U.SCHEMA_EXTENSION,
      directives: n,
      operationTypes: r
    });
  }
  /**
   * ScalarTypeExtension :
   *   - extend scalar Name Directives[Const]
   */
  parseScalarTypeExtension() {
    const t = this._lexer.token;
    this.expectKeyword("extend"), this.expectKeyword("scalar");
    const n = this.parseName(), r = this.parseConstDirectives();
    if (r.length === 0)
      throw this.unexpected();
    return this.node(t, {
      kind: U.SCALAR_TYPE_EXTENSION,
      name: n,
      directives: r
    });
  }
  /**
   * ObjectTypeExtension :
   *  - extend type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition
   *  - extend type Name ImplementsInterfaces? Directives[Const]
   *  - extend type Name ImplementsInterfaces
   */
  parseObjectTypeExtension() {
    const t = this._lexer.token;
    this.expectKeyword("extend"), this.expectKeyword("type");
    const n = this.parseName(), r = this.parseImplementsInterfaces(), o = this.parseConstDirectives(), i = this.parseFieldsDefinition();
    if (r.length === 0 && o.length === 0 && i.length === 0)
      throw this.unexpected();
    return this.node(t, {
      kind: U.OBJECT_TYPE_EXTENSION,
      name: n,
      interfaces: r,
      directives: o,
      fields: i
    });
  }
  /**
   * InterfaceTypeExtension :
   *  - extend interface Name ImplementsInterfaces? Directives[Const]? FieldsDefinition
   *  - extend interface Name ImplementsInterfaces? Directives[Const]
   *  - extend interface Name ImplementsInterfaces
   */
  parseInterfaceTypeExtension() {
    const t = this._lexer.token;
    this.expectKeyword("extend"), this.expectKeyword("interface");
    const n = this.parseName(), r = this.parseImplementsInterfaces(), o = this.parseConstDirectives(), i = this.parseFieldsDefinition();
    if (r.length === 0 && o.length === 0 && i.length === 0)
      throw this.unexpected();
    return this.node(t, {
      kind: U.INTERFACE_TYPE_EXTENSION,
      name: n,
      interfaces: r,
      directives: o,
      fields: i
    });
  }
  /**
   * UnionTypeExtension :
   *   - extend union Name Directives[Const]? UnionMemberTypes
   *   - extend union Name Directives[Const]
   */
  parseUnionTypeExtension() {
    const t = this._lexer.token;
    this.expectKeyword("extend"), this.expectKeyword("union");
    const n = this.parseName(), r = this.parseConstDirectives(), o = this.parseUnionMemberTypes();
    if (r.length === 0 && o.length === 0)
      throw this.unexpected();
    return this.node(t, {
      kind: U.UNION_TYPE_EXTENSION,
      name: n,
      directives: r,
      types: o
    });
  }
  /**
   * EnumTypeExtension :
   *   - extend enum Name Directives[Const]? EnumValuesDefinition
   *   - extend enum Name Directives[Const]
   */
  parseEnumTypeExtension() {
    const t = this._lexer.token;
    this.expectKeyword("extend"), this.expectKeyword("enum");
    const n = this.parseName(), r = this.parseConstDirectives(), o = this.parseEnumValuesDefinition();
    if (r.length === 0 && o.length === 0)
      throw this.unexpected();
    return this.node(t, {
      kind: U.ENUM_TYPE_EXTENSION,
      name: n,
      directives: r,
      values: o
    });
  }
  /**
   * InputObjectTypeExtension :
   *   - extend input Name Directives[Const]? InputFieldsDefinition
   *   - extend input Name Directives[Const]
   */
  parseInputObjectTypeExtension() {
    const t = this._lexer.token;
    this.expectKeyword("extend"), this.expectKeyword("input");
    const n = this.parseName(), r = this.parseConstDirectives(), o = this.parseInputFieldsDefinition();
    if (r.length === 0 && o.length === 0)
      throw this.unexpected();
    return this.node(t, {
      kind: U.INPUT_OBJECT_TYPE_EXTENSION,
      name: n,
      directives: r,
      fields: o
    });
  }
  /**
   * ```
   * DirectiveDefinition :
   *   - Description? directive @ Name ArgumentsDefinition? `repeatable`? on DirectiveLocations
   * ```
   */
  parseDirectiveDefinition() {
    const t = this._lexer.token, n = this.parseDescription();
    this.expectKeyword("directive"), this.expectToken(ve.AT);
    const r = this.parseName(), o = this.parseArgumentDefs(), i = this.expectOptionalKeyword("repeatable");
    this.expectKeyword("on");
    const s = this.parseDirectiveLocations();
    return this.node(t, {
      kind: U.DIRECTIVE_DEFINITION,
      description: n,
      name: r,
      arguments: o,
      repeatable: i,
      locations: s
    });
  }
  /**
   * DirectiveLocations :
   *   - `|`? DirectiveLocation
   *   - DirectiveLocations | DirectiveLocation
   */
  parseDirectiveLocations() {
    return this.delimitedMany(ve.PIPE, this.parseDirectiveLocation);
  }
  /*
   * DirectiveLocation :
   *   - ExecutableDirectiveLocation
   *   - TypeSystemDirectiveLocation
   *
   * ExecutableDirectiveLocation : one of
   *   `QUERY`
   *   `MUTATION`
   *   `SUBSCRIPTION`
   *   `FIELD`
   *   `FRAGMENT_DEFINITION`
   *   `FRAGMENT_SPREAD`
   *   `INLINE_FRAGMENT`
   *
   * TypeSystemDirectiveLocation : one of
   *   `SCHEMA`
   *   `SCALAR`
   *   `OBJECT`
   *   `FIELD_DEFINITION`
   *   `ARGUMENT_DEFINITION`
   *   `INTERFACE`
   *   `UNION`
   *   `ENUM`
   *   `ENUM_VALUE`
   *   `INPUT_OBJECT`
   *   `INPUT_FIELD_DEFINITION`
   */
  parseDirectiveLocation() {
    const t = this._lexer.token, n = this.parseName();
    if (Object.prototype.hasOwnProperty.call(Fe, n.value))
      return n;
    throw this.unexpected(t);
  }
  // Core parsing utility functions
  /**
   * Returns a node that, if configured to do so, sets a "loc" field as a
   * location object, used to identify the place in the source that created a
   * given parsed object.
   */
  node(t, n) {
    return this._options.noLocation !== !0 && (n.loc = new GM(
      t,
      this._lexer.lastToken,
      this._lexer.source
    )), n;
  }
  /**
   * Determines if the next token is of a given kind
   */
  peek(t) {
    return this._lexer.token.kind === t;
  }
  /**
   * If the next token is of the given kind, return that token after advancing the lexer.
   * Otherwise, do not change the parser state and throw an error.
   */
  expectToken(t) {
    const n = this._lexer.token;
    if (n.kind === t)
      return this.advanceLexer(), n;
    throw jn(
      this._lexer.source,
      n.start,
      `Expected ${oP(t)}, found ${ig(n)}.`
    );
  }
  /**
   * If the next token is of the given kind, return "true" after advancing the lexer.
   * Otherwise, do not change the parser state and return "false".
   */
  expectOptionalToken(t) {
    return this._lexer.token.kind === t ? (this.advanceLexer(), !0) : !1;
  }
  /**
   * If the next token is a given keyword, advance the lexer.
   * Otherwise, do not change the parser state and throw an error.
   */
  expectKeyword(t) {
    const n = this._lexer.token;
    if (n.kind === ve.NAME && n.value === t)
      this.advanceLexer();
    else
      throw jn(
        this._lexer.source,
        n.start,
        `Expected "${t}", found ${ig(n)}.`
      );
  }
  /**
   * If the next token is a given keyword, return "true" after advancing the lexer.
   * Otherwise, do not change the parser state and return "false".
   */
  expectOptionalKeyword(t) {
    const n = this._lexer.token;
    return n.kind === ve.NAME && n.value === t ? (this.advanceLexer(), !0) : !1;
  }
  /**
   * Helper function for creating an error when an unexpected lexed token is encountered.
   */
  unexpected(t) {
    const n = t ?? this._lexer.token;
    return jn(
      this._lexer.source,
      n.start,
      `Unexpected ${ig(n)}.`
    );
  }
  /**
   * Returns a possibly empty list of parse nodes, determined by the parseFn.
   * This list begins with a lex token of openKind and ends with a lex token of closeKind.
   * Advances the parser to the next lex token after the closing token.
   */
  any(t, n, r) {
    this.expectToken(t);
    const o = [];
    for (; !this.expectOptionalToken(r); )
      o.push(n.call(this));
    return o;
  }
  /**
   * Returns a list of parse nodes, determined by the parseFn.
   * It can be empty only if open token is missing otherwise it will always return non-empty list
   * that begins with a lex token of openKind and ends with a lex token of closeKind.
   * Advances the parser to the next lex token after the closing token.
   */
  optionalMany(t, n, r) {
    if (this.expectOptionalToken(t)) {
      const o = [];
      do
        o.push(n.call(this));
      while (!this.expectOptionalToken(r));
      return o;
    }
    return [];
  }
  /**
   * Returns a non-empty list of parse nodes, determined by the parseFn.
   * This list begins with a lex token of openKind and ends with a lex token of closeKind.
   * Advances the parser to the next lex token after the closing token.
   */
  many(t, n, r) {
    this.expectToken(t);
    const o = [];
    do
      o.push(n.call(this));
    while (!this.expectOptionalToken(r));
    return o;
  }
  /**
   * Returns a non-empty list of parse nodes, determined by the parseFn.
   * This list may begin with a lex token of delimiterKind followed by items separated by lex tokens of tokenKind.
   * Advances the parser to the next lex token after last item in the list.
   */
  delimitedMany(t, n) {
    this.expectOptionalToken(t);
    const r = [];
    do
      r.push(n.call(this));
    while (this.expectOptionalToken(t));
    return r;
  }
  advanceLexer() {
    const { maxTokens: t } = this._options, n = this._lexer.advance();
    if (t !== void 0 && n.kind !== ve.EOF && (++this._tokenCounter, this._tokenCounter > t))
      throw jn(
        this._lexer.source,
        n.start,
        `Document contains more that ${t} tokens. Parsing aborted.`
      );
  }
}
function ig(e) {
  const t = e.value;
  return oP(e.kind) + (t != null ? ` "${t}"` : "");
}
function oP(e) {
  return XM(e) ? `"${e}"` : e;
}
const Bj = 5;
function Ps(e, t) {
  const [n, r] = t ? [e, t] : [void 0, e];
  let o = " Did you mean ";
  n && (o += n + " ");
  const i = r.map((c) => `"${c}"`);
  switch (i.length) {
    case 0:
      return "";
    case 1:
      return o + i[0] + "?";
    case 2:
      return o + i[0] + " or " + i[1] + "?";
  }
  const s = i.slice(0, Bj), l = s.pop();
  return o + s.join(", ") + ", or " + l + "?";
}
function W2(e) {
  return e;
}
function $s(e, t) {
  const n = /* @__PURE__ */ Object.create(null);
  for (const r of e)
    n[t(r)] = r;
  return n;
}
function Da(e, t, n) {
  const r = /* @__PURE__ */ Object.create(null);
  for (const o of e)
    r[t(o)] = n(o);
  return r;
}
function Ts(e, t) {
  const n = /* @__PURE__ */ Object.create(null);
  for (const r of Object.keys(e))
    n[r] = t(e[r], r);
  return n;
}
function bh(e, t) {
  let n = 0, r = 0;
  for (; n < e.length && r < t.length; ) {
    let o = e.charCodeAt(n), i = t.charCodeAt(r);
    if (sg(o) && sg(i)) {
      let s = 0;
      do
        ++n, s = s * 10 + o - Ux, o = e.charCodeAt(n);
      while (sg(o) && s > 0);
      let l = 0;
      do
        ++r, l = l * 10 + i - Ux, i = t.charCodeAt(r);
      while (sg(i) && l > 0);
      if (s < l)
        return -1;
      if (s > l)
        return 1;
    } else {
      if (o < i)
        return -1;
      if (o > i)
        return 1;
      ++n, ++r;
    }
  }
  return e.length - t.length;
}
const Ux = 48, qj = 57;
function sg(e) {
  return !isNaN(e) && Ux <= e && e <= qj;
}
function rl(e, t) {
  const n = /* @__PURE__ */ Object.create(null), r = new zj(e), o = Math.floor(e.length * 0.4) + 1;
  for (const i of t) {
    const s = r.measure(i, o);
    s !== void 0 && (n[i] = s);
  }
  return Object.keys(n).sort((i, s) => {
    const l = n[i] - n[s];
    return l !== 0 ? l : bh(i, s);
  });
}
class zj {
  constructor(t) {
    this._input = t, this._inputLowerCase = t.toLowerCase(), this._inputArray = G2(this._inputLowerCase), this._rows = [
      new Array(t.length + 1).fill(0),
      new Array(t.length + 1).fill(0),
      new Array(t.length + 1).fill(0)
    ];
  }
  measure(t, n) {
    if (this._input === t)
      return 0;
    const r = t.toLowerCase();
    if (this._inputLowerCase === r)
      return 1;
    let o = G2(r), i = this._inputArray;
    if (o.length < i.length) {
      const d = o;
      o = i, i = d;
    }
    const s = o.length, l = i.length;
    if (s - l > n)
      return;
    const c = this._rows;
    for (let d = 0; d <= l; d++)
      c[0][d] = d;
    for (let d = 1; d <= s; d++) {
      const g = c[(d - 1) % 3], m = c[d % 3];
      let v = m[0] = d;
      for (let b = 1; b <= l; b++) {
        const w = o[d - 1] === i[b - 1] ? 0 : 1;
        let _ = Math.min(
          g[b] + 1,
          // delete
          m[b - 1] + 1,
          // insert
          g[b - 1] + w
          // substitute
        );
        if (d > 1 && b > 1 && o[d - 1] === i[b - 2] && o[d - 2] === i[b - 1]) {
          const S = c[(d - 2) % 3][b - 2];
          _ = Math.min(_, S + 1);
        }
        _ < v && (v = _), m[b] = _;
      }
      if (v > n)
        return;
    }
    const f = c[s % 3][l];
    return f <= n ? f : void 0;
  }
}
function G2(e) {
  const t = e.length, n = new Array(t);
  for (let r = 0; r < t; ++r)
    n[r] = e.charCodeAt(r);
  return n;
}
function si(e) {
  if (e == null)
    return /* @__PURE__ */ Object.create(null);
  if (Object.getPrototypeOf(e) === null)
    return e;
  const t = /* @__PURE__ */ Object.create(null);
  for (const [n, r] of Object.entries(e))
    t[n] = r;
  return t;
}
function Hj(e) {
  return `"${e.replace(Wj, Gj)}"`;
}
const Wj = /[\x00-\x1f\x22\x5c\x7f-\x9f]/g;
function Gj(e) {
  return Qj[e.charCodeAt(0)];
}
const Qj = [
  "\\u0000",
  "\\u0001",
  "\\u0002",
  "\\u0003",
  "\\u0004",
  "\\u0005",
  "\\u0006",
  "\\u0007",
  "\\b",
  "\\t",
  "\\n",
  "\\u000B",
  "\\f",
  "\\r",
  "\\u000E",
  "\\u000F",
  "\\u0010",
  "\\u0011",
  "\\u0012",
  "\\u0013",
  "\\u0014",
  "\\u0015",
  "\\u0016",
  "\\u0017",
  "\\u0018",
  "\\u0019",
  "\\u001A",
  "\\u001B",
  "\\u001C",
  "\\u001D",
  "\\u001E",
  "\\u001F",
  "",
  "",
  '\\"',
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  // 2F
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  // 3F
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  // 4F
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  "\\\\",
  "",
  "",
  "",
  // 5F
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  // 6F
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  "",
  "\\u007F",
  "\\u0080",
  "\\u0081",
  "\\u0082",
  "\\u0083",
  "\\u0084",
  "\\u0085",
  "\\u0086",
  "\\u0087",
  "\\u0088",
  "\\u0089",
  "\\u008A",
  "\\u008B",
  "\\u008C",
  "\\u008D",
  "\\u008E",
  "\\u008F",
  "\\u0090",
  "\\u0091",
  "\\u0092",
  "\\u0093",
  "\\u0094",
  "\\u0095",
  "\\u0096",
  "\\u0097",
  "\\u0098",
  "\\u0099",
  "\\u009A",
  "\\u009B",
  "\\u009C",
  "\\u009D",
  "\\u009E",
  "\\u009F"
], Xl = Object.freeze({});
function pn(e, t, n = QM) {
  const r = /* @__PURE__ */ new Map();
  for (const S of Object.values(U))
    r.set(S, yf(t, S));
  let o, i = Array.isArray(e), s = [e], l = -1, c = [], f = e, d, g;
  const m = [], v = [];
  do {
    l++;
    const S = l === s.length, x = S && c.length !== 0;
    if (S) {
      if (d = v.length === 0 ? void 0 : m[m.length - 1], f = g, g = v.pop(), x)
        if (i) {
          f = f.slice();
          let E = 0;
          for (const [N, I] of c) {
            const D = N - E;
            I === null ? (f.splice(D, 1), E++) : f[D] = I;
          }
        } else {
          f = Object.defineProperties(
            {},
            Object.getOwnPropertyDescriptors(f)
          );
          for (const [E, N] of c)
            f[E] = N;
        }
      l = o.index, s = o.keys, c = o.edits, i = o.inArray, o = o.prev;
    } else if (g) {
      if (d = i ? l : s[l], f = g[d], f == null)
        continue;
      m.push(d);
    }
    let C;
    if (!Array.isArray(f)) {
      var b, w;
      Vx(f) || lt(!1, `Invalid AST Node: ${be(f)}.`);
      const E = S ? (b = r.get(f.kind)) === null || b === void 0 ? void 0 : b.leave : (w = r.get(f.kind)) === null || w === void 0 ? void 0 : w.enter;
      if (C = E == null ? void 0 : E.call(t, f, d, g, m, v), C === Xl)
        break;
      if (C === !1) {
        if (!S) {
          m.pop();
          continue;
        }
      } else if (C !== void 0 && (c.push([d, C]), !S))
        if (Vx(C))
          f = C;
        else {
          m.pop();
          continue;
        }
    }
    if (C === void 0 && x && c.push([d, f]), S)
      m.pop();
    else {
      var _;
      o = {
        inArray: i,
        index: l,
        keys: s,
        edits: c,
        prev: o
      }, i = Array.isArray(f), s = i ? f : (_ = n[f.kind]) !== null && _ !== void 0 ? _ : [], l = -1, c = [], g && v.push(g), g = f;
    }
  } while (o !== void 0);
  return c.length !== 0 ? c[c.length - 1][1] : e;
}
function sC(e) {
  const t = new Array(e.length).fill(null), n = /* @__PURE__ */ Object.create(null);
  for (const r of Object.values(U)) {
    let o = !1;
    const i = new Array(e.length).fill(void 0), s = new Array(e.length).fill(void 0);
    for (let c = 0; c < e.length; ++c) {
      const { enter: f, leave: d } = yf(e[c], r);
      o || (o = f != null || d != null), i[c] = f, s[c] = d;
    }
    if (!o)
      continue;
    const l = {
      enter(...c) {
        const f = c[0];
        for (let g = 0; g < e.length; g++)
          if (t[g] === null) {
            var d;
            const m = (d = i[g]) === null || d === void 0 ? void 0 : d.apply(e[g], c);
            if (m === !1)
              t[g] = f;
            else if (m === Xl)
              t[g] = Xl;
            else if (m !== void 0)
              return m;
          }
      },
      leave(...c) {
        const f = c[0];
        for (let g = 0; g < e.length; g++)
          if (t[g] === null) {
            var d;
            const m = (d = s[g]) === null || d === void 0 ? void 0 : d.apply(e[g], c);
            if (m === Xl)
              t[g] = Xl;
            else if (m !== void 0 && m !== !1)
              return m;
          } else
            t[g] === f && (t[g] = null);
      }
    };
    n[r] = l;
  }
  return n;
}
function yf(e, t) {
  const n = e[t];
  return typeof n == "object" ? n : typeof n == "function" ? {
    enter: n,
    leave: void 0
  } : {
    enter: e.enter,
    leave: e.leave
  };
}
function Yj(e, t, n) {
  const { enter: r, leave: o } = yf(e, t);
  return n ? o : r;
}
function pt(e) {
  return pn(e, Jj);
}
const Kj = 80, Jj = {
  Name: {
    leave: (e) => e.value
  },
  Variable: {
    leave: (e) => "$" + e.name
  },
  // Document
  Document: {
    leave: (e) => Be(e.definitions, `

`)
  },
  OperationDefinition: {
    leave(e) {
      const t = ht("(", Be(e.variableDefinitions, ", "), ")"), n = Be(
        [
          e.operation,
          Be([e.name, t]),
          Be(e.directives, " ")
        ],
        " "
      );
      return (n === "query" ? "" : n + " ") + e.selectionSet;
    }
  },
  VariableDefinition: {
    leave: ({ variable: e, type: t, defaultValue: n, directives: r }) => e + ": " + t + ht(" = ", n) + ht(" ", Be(r, " "))
  },
  SelectionSet: {
    leave: ({ selections: e }) => di(e)
  },
  Field: {
    leave({ alias: e, name: t, arguments: n, directives: r, selectionSet: o }) {
      const i = ht("", e, ": ") + t;
      let s = i + ht("(", Be(n, ", "), ")");
      return s.length > Kj && (s = i + ht(`(
`, Jg(Be(n, `
`)), `
)`)), Be([s, Be(r, " "), o], " ");
    }
  },
  Argument: {
    leave: ({ name: e, value: t }) => e + ": " + t
  },
  // Fragments
  FragmentSpread: {
    leave: ({ name: e, directives: t }) => "..." + e + ht(" ", Be(t, " "))
  },
  InlineFragment: {
    leave: ({ typeCondition: e, directives: t, selectionSet: n }) => Be(
      [
        "...",
        ht("on ", e),
        Be(t, " "),
        n
      ],
      " "
    )
  },
  FragmentDefinition: {
    leave: ({ name: e, typeCondition: t, variableDefinitions: n, directives: r, selectionSet: o }) => (
      // or removed in the future.
      `fragment ${e}${ht("(", Be(n, ", "), ")")} on ${t} ${ht("", Be(r, " "), " ")}` + o
    )
  },
  // Value
  IntValue: {
    leave: ({ value: e }) => e
  },
  FloatValue: {
    leave: ({ value: e }) => e
  },
  StringValue: {
    leave: ({ value: e, block: t }) => t ? JM(e) : Hj(e)
  },
  BooleanValue: {
    leave: ({ value: e }) => e ? "true" : "false"
  },
  NullValue: {
    leave: () => "null"
  },
  EnumValue: {
    leave: ({ value: e }) => e
  },
  ListValue: {
    leave: ({ values: e }) => "[" + Be(e, ", ") + "]"
  },
  ObjectValue: {
    leave: ({ fields: e }) => "{" + Be(e, ", ") + "}"
  },
  ObjectField: {
    leave: ({ name: e, value: t }) => e + ": " + t
  },
  // Directive
  Directive: {
    leave: ({ name: e, arguments: t }) => "@" + e + ht("(", Be(t, ", "), ")")
  },
  // Type
  NamedType: {
    leave: ({ name: e }) => e
  },
  ListType: {
    leave: ({ type: e }) => "[" + e + "]"
  },
  NonNullType: {
    leave: ({ type: e }) => e + "!"
  },
  // Type System Definitions
  SchemaDefinition: {
    leave: ({ description: e, directives: t, operationTypes: n }) => ht("", e, `
`) + Be(["schema", Be(t, " "), di(n)], " ")
  },
  OperationTypeDefinition: {
    leave: ({ operation: e, type: t }) => e + ": " + t
  },
  ScalarTypeDefinition: {
    leave: ({ description: e, name: t, directives: n }) => ht("", e, `
`) + Be(["scalar", t, Be(n, " ")], " ")
  },
  ObjectTypeDefinition: {
    leave: ({ description: e, name: t, interfaces: n, directives: r, fields: o }) => ht("", e, `
`) + Be(
      [
        "type",
        t,
        ht("implements ", Be(n, " & ")),
        Be(r, " "),
        di(o)
      ],
      " "
    )
  },
  FieldDefinition: {
    leave: ({ description: e, name: t, arguments: n, type: r, directives: o }) => ht("", e, `
`) + t + (Q2(n) ? ht(`(
`, Jg(Be(n, `
`)), `
)`) : ht("(", Be(n, ", "), ")")) + ": " + r + ht(" ", Be(o, " "))
  },
  InputValueDefinition: {
    leave: ({ description: e, name: t, type: n, defaultValue: r, directives: o }) => ht("", e, `
`) + Be(
      [t + ": " + n, ht("= ", r), Be(o, " ")],
      " "
    )
  },
  InterfaceTypeDefinition: {
    leave: ({ description: e, name: t, interfaces: n, directives: r, fields: o }) => ht("", e, `
`) + Be(
      [
        "interface",
        t,
        ht("implements ", Be(n, " & ")),
        Be(r, " "),
        di(o)
      ],
      " "
    )
  },
  UnionTypeDefinition: {
    leave: ({ description: e, name: t, directives: n, types: r }) => ht("", e, `
`) + Be(
      ["union", t, Be(n, " "), ht("= ", Be(r, " | "))],
      " "
    )
  },
  EnumTypeDefinition: {
    leave: ({ description: e, name: t, directives: n, values: r }) => ht("", e, `
`) + Be(["enum", t, Be(n, " "), di(r)], " ")
  },
  EnumValueDefinition: {
    leave: ({ description: e, name: t, directives: n }) => ht("", e, `
`) + Be([t, Be(n, " ")], " ")
  },
  InputObjectTypeDefinition: {
    leave: ({ description: e, name: t, directives: n, fields: r }) => ht("", e, `
`) + Be(["input", t, Be(n, " "), di(r)], " ")
  },
  DirectiveDefinition: {
    leave: ({ description: e, name: t, arguments: n, repeatable: r, locations: o }) => ht("", e, `
`) + "directive @" + t + (Q2(n) ? ht(`(
`, Jg(Be(n, `
`)), `
)`) : ht("(", Be(n, ", "), ")")) + (r ? " repeatable" : "") + " on " + Be(o, " | ")
  },
  SchemaExtension: {
    leave: ({ directives: e, operationTypes: t }) => Be(
      ["extend schema", Be(e, " "), di(t)],
      " "
    )
  },
  ScalarTypeExtension: {
    leave: ({ name: e, directives: t }) => Be(["extend scalar", e, Be(t, " ")], " ")
  },
  ObjectTypeExtension: {
    leave: ({ name: e, interfaces: t, directives: n, fields: r }) => Be(
      [
        "extend type",
        e,
        ht("implements ", Be(t, " & ")),
        Be(n, " "),
        di(r)
      ],
      " "
    )
  },
  InterfaceTypeExtension: {
    leave: ({ name: e, interfaces: t, directives: n, fields: r }) => Be(
      [
        "extend interface",
        e,
        ht("implements ", Be(t, " & ")),
        Be(n, " "),
        di(r)
      ],
      " "
    )
  },
  UnionTypeExtension: {
    leave: ({ name: e, directives: t, types: n }) => Be(
      [
        "extend union",
        e,
        Be(t, " "),
        ht("= ", Be(n, " | "))
      ],
      " "
    )
  },
  EnumTypeExtension: {
    leave: ({ name: e, directives: t, values: n }) => Be(["extend enum", e, Be(t, " "), di(n)], " ")
  },
  InputObjectTypeExtension: {
    leave: ({ name: e, directives: t, fields: n }) => Be(["extend input", e, Be(t, " "), di(n)], " ")
  }
};
function Be(e, t = "") {
  var n;
  return (n = e == null ? void 0 : e.filter((r) => r).join(t)) !== null && n !== void 0 ? n : "";
}
function di(e) {
  return ht(`{
`, Jg(Be(e, `
`)), `
}`);
}
function ht(e, t, n = "") {
  return t != null && t !== "" ? e + t + n : "";
}
function Jg(e) {
  return ht("  ", e.replace(/\n/g, `
  `));
}
function Q2(e) {
  var t;
  return (t = e == null ? void 0 : e.some((n) => n.includes(`
`))) !== null && t !== void 0 ? t : !1;
}
function Bv(e, t) {
  switch (e.kind) {
    case U.NULL:
      return null;
    case U.INT:
      return parseInt(e.value, 10);
    case U.FLOAT:
      return parseFloat(e.value);
    case U.STRING:
    case U.ENUM:
    case U.BOOLEAN:
      return e.value;
    case U.LIST:
      return e.values.map(
        (n) => Bv(n, t)
      );
    case U.OBJECT:
      return Da(
        e.fields,
        (n) => n.name.value,
        (n) => Bv(n.value, t)
      );
    case U.VARIABLE:
      return t == null ? void 0 : t[e.name.value];
  }
}
function Do(e) {
  if (e != null || lt(!1, "Must provide name."), typeof e == "string" || lt(!1, "Expected name to be a string."), e.length === 0)
    throw new he("Expected name to be a non-empty string.");
  for (let t = 1; t < e.length; ++t)
    if (!KM(e.charCodeAt(t)))
      throw new he(
        `Names must only contain [_a-zA-Z0-9] but "${e}" does not.`
      );
  if (!oC(e.charCodeAt(0)))
    throw new he(
      `Names must start with [_a-zA-Z] but "${e}" does not.`
    );
  return e;
}
function iP(e) {
  if (e === "true" || e === "false" || e === "null")
    throw new he(`Enum values cannot be named: ${e}`);
  return Do(e);
}
function Df(e) {
  return pr(e) || Ye(e) || Ze(e) || Zt(e) || Lt(e) || mt(e) || vt(e) || He(e);
}
function Xj(e) {
  if (!Df(e))
    throw new Error(`Expected ${be(e)} to be a GraphQL type.`);
  return e;
}
function pr(e) {
  return Di(e, Zo);
}
function Zj(e) {
  if (!pr(e))
    throw new Error(`Expected ${be(e)} to be a GraphQL Scalar type.`);
  return e;
}
function Ye(e) {
  return Di(e, zn);
}
function sP(e) {
  if (!Ye(e))
    throw new Error(`Expected ${be(e)} to be a GraphQL Object type.`);
  return e;
}
function Ze(e) {
  return Di(e, zr);
}
function aP(e) {
  if (!Ze(e))
    throw new Error(
      `Expected ${be(e)} to be a GraphQL Interface type.`
    );
  return e;
}
function Zt(e) {
  return Di(e, Ga);
}
function eU(e) {
  if (!Zt(e))
    throw new Error(`Expected ${be(e)} to be a GraphQL Union type.`);
  return e;
}
function Lt(e) {
  return Di(e, Or);
}
function tU(e) {
  if (!Lt(e))
    throw new Error(`Expected ${be(e)} to be a GraphQL Enum type.`);
  return e;
}
function mt(e) {
  return Di(e, Gr);
}
function nU(e) {
  if (!mt(e))
    throw new Error(
      `Expected ${be(e)} to be a GraphQL Input Object type.`
    );
  return e;
}
function vt(e) {
  return Di(e, Ht);
}
function rU(e) {
  if (!vt(e))
    throw new Error(`Expected ${be(e)} to be a GraphQL List type.`);
  return e;
}
function He(e) {
  return Di(e, et);
}
function oU(e) {
  if (!He(e))
    throw new Error(`Expected ${be(e)} to be a GraphQL Non-Null type.`);
  return e;
}
function lr(e) {
  return pr(e) || Lt(e) || mt(e) || Eh(e) && lr(e.ofType);
}
function iU(e) {
  if (!lr(e))
    throw new Error(`Expected ${be(e)} to be a GraphQL input type.`);
  return e;
}
function Os(e) {
  return pr(e) || Ye(e) || Ze(e) || Zt(e) || Lt(e) || Eh(e) && Os(e.ofType);
}
function sU(e) {
  if (!Os(e))
    throw new Error(`Expected ${be(e)} to be a GraphQL output type.`);
  return e;
}
function Nr(e) {
  return pr(e) || Lt(e);
}
function aU(e) {
  if (!Nr(e))
    throw new Error(`Expected ${be(e)} to be a GraphQL leaf type.`);
  return e;
}
function Jt(e) {
  return Ye(e) || Ze(e) || Zt(e);
}
function lU(e) {
  if (!Jt(e))
    throw new Error(
      `Expected ${be(e)} to be a GraphQL composite type.`
    );
  return e;
}
function qn(e) {
  return Ze(e) || Zt(e);
}
function lP(e) {
  if (!qn(e))
    throw new Error(`Expected ${be(e)} to be a GraphQL abstract type.`);
  return e;
}
class Ht {
  constructor(t) {
    Df(t) || lt(!1, `Expected ${be(t)} to be a GraphQL type.`), this.ofType = t;
  }
  get [Symbol.toStringTag]() {
    return "GraphQLList";
  }
  toString() {
    return "[" + String(this.ofType) + "]";
  }
  toJSON() {
    return this.toString();
  }
}
class et {
  constructor(t) {
    aC(t) || lt(
      !1,
      `Expected ${be(t)} to be a GraphQL nullable type.`
    ), this.ofType = t;
  }
  get [Symbol.toStringTag]() {
    return "GraphQLNonNull";
  }
  toString() {
    return String(this.ofType) + "!";
  }
  toJSON() {
    return this.toString();
  }
}
function Eh(e) {
  return vt(e) || He(e);
}
function cU(e) {
  if (!Eh(e))
    throw new Error(`Expected ${be(e)} to be a GraphQL wrapping type.`);
  return e;
}
function aC(e) {
  return Df(e) && !He(e);
}
function cP(e) {
  if (!aC(e))
    throw new Error(`Expected ${be(e)} to be a GraphQL nullable type.`);
  return e;
}
function ol(e) {
  if (e)
    return He(e) ? e.ofType : e;
}
function Ks(e) {
  return pr(e) || Ye(e) || Ze(e) || Zt(e) || Lt(e) || mt(e);
}
function uU(e) {
  if (!Ks(e))
    throw new Error(`Expected ${be(e)} to be a GraphQL named type.`);
  return e;
}
function Et(e) {
  if (e) {
    let t = e;
    for (; Eh(t); )
      t = t.ofType;
    return t;
  }
}
function lC(e) {
  return typeof e == "function" ? e() : e;
}
function cC(e) {
  return typeof e == "function" ? e() : e;
}
class Zo {
  constructor(t) {
    var n, r, o, i;
    const s = (n = t.parseValue) !== null && n !== void 0 ? n : W2;
    this.name = Do(t.name), this.description = t.description, this.specifiedByURL = t.specifiedByURL, this.serialize = (r = t.serialize) !== null && r !== void 0 ? r : W2, this.parseValue = s, this.parseLiteral = (o = t.parseLiteral) !== null && o !== void 0 ? o : (l, c) => s(Bv(l, c)), this.extensions = si(t.extensions), this.astNode = t.astNode, this.extensionASTNodes = (i = t.extensionASTNodes) !== null && i !== void 0 ? i : [], t.specifiedByURL == null || typeof t.specifiedByURL == "string" || lt(
      !1,
      `${this.name} must provide "specifiedByURL" as a string, but got: ${be(t.specifiedByURL)}.`
    ), t.serialize == null || typeof t.serialize == "function" || lt(
      !1,
      `${this.name} must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.`
    ), t.parseLiteral && (typeof t.parseValue == "function" && typeof t.parseLiteral == "function" || lt(
      !1,
      `${this.name} must provide both "parseValue" and "parseLiteral" functions.`
    ));
  }
  get [Symbol.toStringTag]() {
    return "GraphQLScalarType";
  }
  toConfig() {
    return {
      name: this.name,
      description: this.description,
      specifiedByURL: this.specifiedByURL,
      serialize: this.serialize,
      parseValue: this.parseValue,
      parseLiteral: this.parseLiteral,
      extensions: this.extensions,
      astNode: this.astNode,
      extensionASTNodes: this.extensionASTNodes
    };
  }
  toString() {
    return this.name;
  }
  toJSON() {
    return this.toString();
  }
}
class zn {
  constructor(t) {
    var n;
    this.name = Do(t.name), this.description = t.description, this.isTypeOf = t.isTypeOf, this.extensions = si(t.extensions), this.astNode = t.astNode, this.extensionASTNodes = (n = t.extensionASTNodes) !== null && n !== void 0 ? n : [], this._fields = () => fP(t), this._interfaces = () => uP(t), t.isTypeOf == null || typeof t.isTypeOf == "function" || lt(
      !1,
      `${this.name} must provide "isTypeOf" as a function, but got: ${be(t.isTypeOf)}.`
    );
  }
  get [Symbol.toStringTag]() {
    return "GraphQLObjectType";
  }
  getFields() {
    return typeof this._fields == "function" && (this._fields = this._fields()), this._fields;
  }
  getInterfaces() {
    return typeof this._interfaces == "function" && (this._interfaces = this._interfaces()), this._interfaces;
  }
  toConfig() {
    return {
      name: this.name,
      description: this.description,
      interfaces: this.getInterfaces(),
      fields: pP(this.getFields()),
      isTypeOf: this.isTypeOf,
      extensions: this.extensions,
      astNode: this.astNode,
      extensionASTNodes: this.extensionASTNodes
    };
  }
  toString() {
    return this.name;
  }
  toJSON() {
    return this.toString();
  }
}
function uP(e) {
  var t;
  const n = lC(
    (t = e.interfaces) !== null && t !== void 0 ? t : []
  );
  return Array.isArray(n) || lt(
    !1,
    `${e.name} interfaces must be an Array or a function which returns an Array.`
  ), n;
}
function fP(e) {
  const t = cC(e.fields);
  return rf(t) || lt(
    !1,
    `${e.name} fields must be an object with field names as keys or a function which returns such an object.`
  ), Ts(t, (n, r) => {
    var o;
    rf(n) || lt(
      !1,
      `${e.name}.${r} field config must be an object.`
    ), n.resolve == null || typeof n.resolve == "function" || lt(
      !1,
      `${e.name}.${r} field resolver must be a function if provided, but got: ${be(n.resolve)}.`
    );
    const i = (o = n.args) !== null && o !== void 0 ? o : {};
    return rf(i) || lt(
      !1,
      `${e.name}.${r} args must be an object with argument names as keys.`
    ), {
      name: Do(r),
      description: n.description,
      type: n.type,
      args: dP(i),
      resolve: n.resolve,
      subscribe: n.subscribe,
      deprecationReason: n.deprecationReason,
      extensions: si(n.extensions),
      astNode: n.astNode
    };
  });
}
function dP(e) {
  return Object.entries(e).map(([t, n]) => ({
    name: Do(t),
    description: n.description,
    type: n.type,
    defaultValue: n.defaultValue,
    deprecationReason: n.deprecationReason,
    extensions: si(n.extensions),
    astNode: n.astNode
  }));
}
function rf(e) {
  return Co(e) && !Array.isArray(e);
}
function pP(e) {
  return Ts(e, (t) => ({
    description: t.description,
    type: t.type,
    args: hP(t.args),
    resolve: t.resolve,
    subscribe: t.subscribe,
    deprecationReason: t.deprecationReason,
    extensions: t.extensions,
    astNode: t.astNode
  }));
}
function hP(e) {
  return Da(
    e,
    (t) => t.name,
    (t) => ({
      description: t.description,
      type: t.type,
      defaultValue: t.defaultValue,
      deprecationReason: t.deprecationReason,
      extensions: t.extensions,
      astNode: t.astNode
    })
  );
}
function il(e) {
  return He(e.type) && e.defaultValue === void 0;
}
class zr {
  constructor(t) {
    var n;
    this.name = Do(t.name), this.description = t.description, this.resolveType = t.resolveType, this.extensions = si(t.extensions), this.astNode = t.astNode, this.extensionASTNodes = (n = t.extensionASTNodes) !== null && n !== void 0 ? n : [], this._fields = fP.bind(void 0, t), this._interfaces = uP.bind(void 0, t), t.resolveType == null || typeof t.resolveType == "function" || lt(
      !1,
      `${this.name} must provide "resolveType" as a function, but got: ${be(t.resolveType)}.`
    );
  }
  get [Symbol.toStringTag]() {
    return "GraphQLInterfaceType";
  }
  getFields() {
    return typeof this._fields == "function" && (this._fields = this._fields()), this._fields;
  }
  getInterfaces() {
    return typeof this._interfaces == "function" && (this._interfaces = this._interfaces()), this._interfaces;
  }
  toConfig() {
    return {
      name: this.name,
      description: this.description,
      interfaces: this.getInterfaces(),
      fields: pP(this.getFields()),
      resolveType: this.resolveType,
      extensions: this.extensions,
      astNode: this.astNode,
      extensionASTNodes: this.extensionASTNodes
    };
  }
  toString() {
    return this.name;
  }
  toJSON() {
    return this.toString();
  }
}
class Ga {
  constructor(t) {
    var n;
    this.name = Do(t.name), this.description = t.description, this.resolveType = t.resolveType, this.extensions = si(t.extensions), this.astNode = t.astNode, this.extensionASTNodes = (n = t.extensionASTNodes) !== null && n !== void 0 ? n : [], this._types = fU.bind(void 0, t), t.resolveType == null || typeof t.resolveType == "function" || lt(
      !1,
      `${this.name} must provide "resolveType" as a function, but got: ${be(t.resolveType)}.`
    );
  }
  get [Symbol.toStringTag]() {
    return "GraphQLUnionType";
  }
  getTypes() {
    return typeof this._types == "function" && (this._types = this._types()), this._types;
  }
  toConfig() {
    return {
      name: this.name,
      description: this.description,
      types: this.getTypes(),
      resolveType: this.resolveType,
      extensions: this.extensions,
      astNode: this.astNode,
      extensionASTNodes: this.extensionASTNodes
    };
  }
  toString() {
    return this.name;
  }
  toJSON() {
    return this.toString();
  }
}
function fU(e) {
  const t = lC(e.types);
  return Array.isArray(t) || lt(
    !1,
    `Must provide Array of types or a function which returns such an array for Union ${e.name}.`
  ), t;
}
class Or {
  /* <T> */
  constructor(t) {
    var n;
    this.name = Do(t.name), this.description = t.description, this.extensions = si(t.extensions), this.astNode = t.astNode, this.extensionASTNodes = (n = t.extensionASTNodes) !== null && n !== void 0 ? n : [], this._values = dU(this.name, t.values), this._valueLookup = new Map(
      this._values.map((r) => [r.value, r])
    ), this._nameLookup = $s(this._values, (r) => r.name);
  }
  get [Symbol.toStringTag]() {
    return "GraphQLEnumType";
  }
  getValues() {
    return this._values;
  }
  getValue(t) {
    return this._nameLookup[t];
  }
  serialize(t) {
    const n = this._valueLookup.get(t);
    if (n === void 0)
      throw new he(
        `Enum "${this.name}" cannot represent value: ${be(t)}`
      );
    return n.name;
  }
  parseValue(t) {
    if (typeof t != "string") {
      const r = be(t);
      throw new he(
        `Enum "${this.name}" cannot represent non-string value: ${r}.` + ag(this, r)
      );
    }
    const n = this.getValue(t);
    if (n == null)
      throw new he(
        `Value "${t}" does not exist in "${this.name}" enum.` + ag(this, t)
      );
    return n.value;
  }
  parseLiteral(t, n) {
    if (t.kind !== U.ENUM) {
      const o = pt(t);
      throw new he(
        `Enum "${this.name}" cannot represent non-enum value: ${o}.` + ag(this, o),
        {
          nodes: t
        }
      );
    }
    const r = this.getValue(t.value);
    if (r == null) {
      const o = pt(t);
      throw new he(
        `Value "${o}" does not exist in "${this.name}" enum.` + ag(this, o),
        {
          nodes: t
        }
      );
    }
    return r.value;
  }
  toConfig() {
    const t = Da(
      this.getValues(),
      (n) => n.name,
      (n) => ({
        description: n.description,
        value: n.value,
        deprecationReason: n.deprecationReason,
        extensions: n.extensions,
        astNode: n.astNode
      })
    );
    return {
      name: this.name,
      description: this.description,
      values: t,
      extensions: this.extensions,
      astNode: this.astNode,
      extensionASTNodes: this.extensionASTNodes
    };
  }
  toString() {
    return this.name;
  }
  toJSON() {
    return this.toString();
  }
}
function ag(e, t) {
  const n = e.getValues().map((o) => o.name), r = rl(t, n);
  return Ps("the enum value", r);
}
function dU(e, t) {
  return rf(t) || lt(
    !1,
    `${e} values must be an object with value names as keys.`
  ), Object.entries(t).map(([n, r]) => (rf(r) || lt(
    !1,
    `${e}.${n} must refer to an object with a "value" key representing an internal value but got: ${be(r)}.`
  ), {
    name: iP(n),
    description: r.description,
    value: r.value !== void 0 ? r.value : n,
    deprecationReason: r.deprecationReason,
    extensions: si(r.extensions),
    astNode: r.astNode
  }));
}
class Gr {
  constructor(t) {
    var n;
    this.name = Do(t.name), this.description = t.description, this.extensions = si(t.extensions), this.astNode = t.astNode, this.extensionASTNodes = (n = t.extensionASTNodes) !== null && n !== void 0 ? n : [], this._fields = pU.bind(void 0, t);
  }
  get [Symbol.toStringTag]() {
    return "GraphQLInputObjectType";
  }
  getFields() {
    return typeof this._fields == "function" && (this._fields = this._fields()), this._fields;
  }
  toConfig() {
    const t = Ts(this.getFields(), (n) => ({
      description: n.description,
      type: n.type,
      defaultValue: n.defaultValue,
      deprecationReason: n.deprecationReason,
      extensions: n.extensions,
      astNode: n.astNode
    }));
    return {
      name: this.name,
      description: this.description,
      fields: t,
      extensions: this.extensions,
      astNode: this.astNode,
      extensionASTNodes: this.extensionASTNodes
    };
  }
  toString() {
    return this.name;
  }
  toJSON() {
    return this.toString();
  }
}
function pU(e) {
  const t = cC(e.fields);
  return rf(t) || lt(
    !1,
    `${e.name} fields must be an object with field names as keys or a function which returns such an object.`
  ), Ts(t, (n, r) => (!("resolve" in n) || lt(
    !1,
    `${e.name}.${r} field has a resolve property, but Input Types cannot define resolvers.`
  ), {
    name: Do(r),
    description: n.description,
    type: n.type,
    defaultValue: n.defaultValue,
    deprecationReason: n.deprecationReason,
    extensions: si(n.extensions),
    astNode: n.astNode
  }));
}
function py(e) {
  return He(e.type) && e.defaultValue === void 0;
}
function qv(e, t) {
  return e === t ? !0 : He(e) && He(t) || vt(e) && vt(t) ? qv(e.ofType, t.ofType) : !1;
}
function ic(e, t, n) {
  return t === n ? !0 : He(n) ? He(t) ? ic(e, t.ofType, n.ofType) : !1 : He(t) ? ic(e, t.ofType, n) : vt(n) ? vt(t) ? ic(e, t.ofType, n.ofType) : !1 : vt(t) ? !1 : qn(n) && (Ze(t) || Ye(t)) && e.isSubType(n, t);
}
function Fp(e, t, n) {
  return t === n ? !0 : qn(t) ? qn(n) ? e.getPossibleTypes(t).some((r) => e.isSubType(n, r)) : e.isSubType(t, n) : qn(n) ? e.isSubType(n, t) : !1;
}
const Xg = 2147483647, Zg = -2147483648, Mp = new Zo({
  name: "Int",
  description: "The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.",
  serialize(e) {
    const t = Sh(e);
    if (typeof t == "boolean")
      return t ? 1 : 0;
    let n = t;
    if (typeof t == "string" && t !== "" && (n = Number(t)), typeof n != "number" || !Number.isInteger(n))
      throw new he(
        `Int cannot represent non-integer value: ${be(t)}`
      );
    if (n > Xg || n < Zg)
      throw new he(
        "Int cannot represent non 32-bit signed integer value: " + be(t)
      );
    return n;
  },
  parseValue(e) {
    if (typeof e != "number" || !Number.isInteger(e))
      throw new he(
        `Int cannot represent non-integer value: ${be(e)}`
      );
    if (e > Xg || e < Zg)
      throw new he(
        `Int cannot represent non 32-bit signed integer value: ${e}`
      );
    return e;
  },
  parseLiteral(e) {
    if (e.kind !== U.INT)
      throw new he(
        `Int cannot represent non-integer value: ${pt(e)}`,
        {
          nodes: e
        }
      );
    const t = parseInt(e.value, 10);
    if (t > Xg || t < Zg)
      throw new he(
        `Int cannot represent non 32-bit signed integer value: ${e.value}`,
        {
          nodes: e
        }
      );
    return t;
  }
}), Pp = new Zo({
  name: "Float",
  description: "The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).",
  serialize(e) {
    const t = Sh(e);
    if (typeof t == "boolean")
      return t ? 1 : 0;
    let n = t;
    if (typeof t == "string" && t !== "" && (n = Number(t)), typeof n != "number" || !Number.isFinite(n))
      throw new he(
        `Float cannot represent non numeric value: ${be(t)}`
      );
    return n;
  },
  parseValue(e) {
    if (typeof e != "number" || !Number.isFinite(e))
      throw new he(
        `Float cannot represent non numeric value: ${be(e)}`
      );
    return e;
  },
  parseLiteral(e) {
    if (e.kind !== U.FLOAT && e.kind !== U.INT)
      throw new he(
        `Float cannot represent non numeric value: ${pt(e)}`,
        e
      );
    return parseFloat(e.value);
  }
}), Vt = new Zo({
  name: "String",
  description: "The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.",
  serialize(e) {
    const t = Sh(e);
    if (typeof t == "string")
      return t;
    if (typeof t == "boolean")
      return t ? "true" : "false";
    if (typeof t == "number" && Number.isFinite(t))
      return t.toString();
    throw new he(
      `String cannot represent value: ${be(e)}`
    );
  },
  parseValue(e) {
    if (typeof e != "string")
      throw new he(
        `String cannot represent a non string value: ${be(e)}`
      );
    return e;
  },
  parseLiteral(e) {
    if (e.kind !== U.STRING)
      throw new he(
        `String cannot represent a non string value: ${pt(e)}`,
        {
          nodes: e
        }
      );
    return e.value;
  }
}), Wt = new Zo({
  name: "Boolean",
  description: "The `Boolean` scalar type represents `true` or `false`.",
  serialize(e) {
    const t = Sh(e);
    if (typeof t == "boolean")
      return t;
    if (Number.isFinite(t))
      return t !== 0;
    throw new he(
      `Boolean cannot represent a non boolean value: ${be(t)}`
    );
  },
  parseValue(e) {
    if (typeof e != "boolean")
      throw new he(
        `Boolean cannot represent a non boolean value: ${be(e)}`
      );
    return e;
  },
  parseLiteral(e) {
    if (e.kind !== U.BOOLEAN)
      throw new he(
        `Boolean cannot represent a non boolean value: ${pt(e)}`,
        {
          nodes: e
        }
      );
    return e.value;
  }
}), $p = new Zo({
  name: "ID",
  description: 'The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.',
  serialize(e) {
    const t = Sh(e);
    if (typeof t == "string")
      return t;
    if (Number.isInteger(t))
      return String(t);
    throw new he(
      `ID cannot represent value: ${be(e)}`
    );
  },
  parseValue(e) {
    if (typeof e == "string")
      return e;
    if (typeof e == "number" && Number.isInteger(e))
      return e.toString();
    throw new he(`ID cannot represent value: ${be(e)}`);
  },
  parseLiteral(e) {
    if (e.kind !== U.STRING && e.kind !== U.INT)
      throw new he(
        "ID cannot represent a non-string and non-integer value: " + pt(e),
        {
          nodes: e
        }
      );
    return e.value;
  }
}), wh = Object.freeze([
  Vt,
  Mp,
  Pp,
  Wt,
  $p
]);
function xh(e) {
  return wh.some(({ name: t }) => e.name === t);
}
function Sh(e) {
  if (Co(e)) {
    if (typeof e.valueOf == "function") {
      const t = e.valueOf();
      if (!Co(t))
        return t;
    }
    if (typeof e.toJSON == "function")
      return e.toJSON();
  }
  return e;
}
function hy(e) {
  return Di(e, ko);
}
function hU(e) {
  if (!hy(e))
    throw new Error(
      `Expected ${be(e)} to be a GraphQL directive.`
    );
  return e;
}
class ko {
  constructor(t) {
    var n, r;
    this.name = Do(t.name), this.description = t.description, this.locations = t.locations, this.isRepeatable = (n = t.isRepeatable) !== null && n !== void 0 ? n : !1, this.extensions = si(t.extensions), this.astNode = t.astNode, Array.isArray(t.locations) || lt(!1, `@${t.name} locations must be an Array.`);
    const o = (r = t.args) !== null && r !== void 0 ? r : {};
    Co(o) && !Array.isArray(o) || lt(
      !1,
      `@${t.name} args must be an object with argument names as keys.`
    ), this.args = dP(o);
  }
  get [Symbol.toStringTag]() {
    return "GraphQLDirective";
  }
  toConfig() {
    return {
      name: this.name,
      description: this.description,
      locations: this.locations,
      args: hP(this.args),
      isRepeatable: this.isRepeatable,
      extensions: this.extensions,
      astNode: this.astNode
    };
  }
  toString() {
    return "@" + this.name;
  }
  toJSON() {
    return this.toString();
  }
}
const my = new ko({
  name: "include",
  description: "Directs the executor to include this field or fragment only when the `if` argument is true.",
  locations: [
    Fe.FIELD,
    Fe.FRAGMENT_SPREAD,
    Fe.INLINE_FRAGMENT
  ],
  args: {
    if: {
      type: new et(Wt),
      description: "Included when true."
    }
  }
}), gy = new ko({
  name: "skip",
  description: "Directs the executor to skip this field or fragment when the `if` argument is true.",
  locations: [
    Fe.FIELD,
    Fe.FRAGMENT_SPREAD,
    Fe.INLINE_FRAGMENT
  ],
  args: {
    if: {
      type: new et(Wt),
      description: "Skipped when true."
    }
  }
}), uC = "No longer supported", vy = new ko({
  name: "deprecated",
  description: "Marks an element of a GraphQL schema as no longer supported.",
  locations: [
    Fe.FIELD_DEFINITION,
    Fe.ARGUMENT_DEFINITION,
    Fe.INPUT_FIELD_DEFINITION,
    Fe.ENUM_VALUE
  ],
  args: {
    reason: {
      type: Vt,
      description: "Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).",
      defaultValue: uC
    }
  }
}), fC = new ko({
  name: "specifiedBy",
  description: "Exposes a URL that specifies the behavior of this scalar.",
  locations: [Fe.SCALAR],
  args: {
    url: {
      type: new et(Vt),
      description: "The URL that specifies the behavior of this scalar."
    }
  }
}), sl = Object.freeze([
  my,
  gy,
  vy,
  fC
]);
function yy(e) {
  return sl.some(({ name: t }) => t === e.name);
}
function dC(e) {
  return typeof e == "object" && typeof (e == null ? void 0 : e[Symbol.iterator]) == "function";
}
function _s(e, t) {
  if (He(t)) {
    const n = _s(e, t.ofType);
    return (n == null ? void 0 : n.kind) === U.NULL ? null : n;
  }
  if (e === null)
    return {
      kind: U.NULL
    };
  if (e === void 0)
    return null;
  if (vt(t)) {
    const n = t.ofType;
    if (dC(e)) {
      const r = [];
      for (const o of e) {
        const i = _s(o, n);
        i != null && r.push(i);
      }
      return {
        kind: U.LIST,
        values: r
      };
    }
    return _s(e, n);
  }
  if (mt(t)) {
    if (!Co(e))
      return null;
    const n = [];
    for (const r of Object.values(t.getFields())) {
      const o = _s(e[r.name], r.type);
      o && n.push({
        kind: U.OBJECT_FIELD,
        name: {
          kind: U.NAME,
          value: r.name
        },
        value: o
      });
    }
    return {
      kind: U.OBJECT,
      fields: n
    };
  }
  if (Nr(t)) {
    const n = t.serialize(e);
    if (n == null)
      return null;
    if (typeof n == "boolean")
      return {
        kind: U.BOOLEAN,
        value: n
      };
    if (typeof n == "number" && Number.isFinite(n)) {
      const r = String(n);
      return Y2.test(r) ? {
        kind: U.INT,
        value: r
      } : {
        kind: U.FLOAT,
        value: r
      };
    }
    if (typeof n == "string")
      return Lt(t) ? {
        kind: U.ENUM,
        value: n
      } : t === $p && Y2.test(n) ? {
        kind: U.INT,
        value: n
      } : {
        kind: U.STRING,
        value: n
      };
    throw new TypeError(`Cannot convert value to AST: ${be(n)}.`);
  }
  En(!1, "Unexpected input type: " + be(t));
}
const Y2 = /^-?(?:0|[1-9][0-9]*)$/, by = new zn({
  name: "__Schema",
  description: "A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.",
  fields: () => ({
    description: {
      type: Vt,
      resolve: (e) => e.description
    },
    types: {
      description: "A list of all types supported by this server.",
      type: new et(new Ht(new et(Wo))),
      resolve(e) {
        return Object.values(e.getTypeMap());
      }
    },
    queryType: {
      description: "The type that query operations will be rooted at.",
      type: new et(Wo),
      resolve: (e) => e.getQueryType()
    },
    mutationType: {
      description: "If this server supports mutation, the type that mutation operations will be rooted at.",
      type: Wo,
      resolve: (e) => e.getMutationType()
    },
    subscriptionType: {
      description: "If this server support subscription, the type that subscription operations will be rooted at.",
      type: Wo,
      resolve: (e) => e.getSubscriptionType()
    },
    directives: {
      description: "A list of all directives supported by this server.",
      type: new et(
        new Ht(new et(pC))
      ),
      resolve: (e) => e.getDirectives()
    }
  })
}), pC = new zn({
  name: "__Directive",
  description: `A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.

In some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.`,
  fields: () => ({
    name: {
      type: new et(Vt),
      resolve: (e) => e.name
    },
    description: {
      type: Vt,
      resolve: (e) => e.description
    },
    isRepeatable: {
      type: new et(Wt),
      resolve: (e) => e.isRepeatable
    },
    locations: {
      type: new et(
        new Ht(new et(hC))
      ),
      resolve: (e) => e.locations
    },
    args: {
      type: new et(
        new Ht(new et(Th))
      ),
      args: {
        includeDeprecated: {
          type: Wt,
          defaultValue: !1
        }
      },
      resolve(e, { includeDeprecated: t }) {
        return t ? e.args : e.args.filter((n) => n.deprecationReason == null);
      }
    }
  })
}), hC = new Or({
  name: "__DirectiveLocation",
  description: "A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.",
  values: {
    QUERY: {
      value: Fe.QUERY,
      description: "Location adjacent to a query operation."
    },
    MUTATION: {
      value: Fe.MUTATION,
      description: "Location adjacent to a mutation operation."
    },
    SUBSCRIPTION: {
      value: Fe.SUBSCRIPTION,
      description: "Location adjacent to a subscription operation."
    },
    FIELD: {
      value: Fe.FIELD,
      description: "Location adjacent to a field."
    },
    FRAGMENT_DEFINITION: {
      value: Fe.FRAGMENT_DEFINITION,
      description: "Location adjacent to a fragment definition."
    },
    FRAGMENT_SPREAD: {
      value: Fe.FRAGMENT_SPREAD,
      description: "Location adjacent to a fragment spread."
    },
    INLINE_FRAGMENT: {
      value: Fe.INLINE_FRAGMENT,
      description: "Location adjacent to an inline fragment."
    },
    VARIABLE_DEFINITION: {
      value: Fe.VARIABLE_DEFINITION,
      description: "Location adjacent to a variable definition."
    },
    SCHEMA: {
      value: Fe.SCHEMA,
      description: "Location adjacent to a schema definition."
    },
    SCALAR: {
      value: Fe.SCALAR,
      description: "Location adjacent to a scalar definition."
    },
    OBJECT: {
      value: Fe.OBJECT,
      description: "Location adjacent to an object type definition."
    },
    FIELD_DEFINITION: {
      value: Fe.FIELD_DEFINITION,
      description: "Location adjacent to a field definition."
    },
    ARGUMENT_DEFINITION: {
      value: Fe.ARGUMENT_DEFINITION,
      description: "Location adjacent to an argument definition."
    },
    INTERFACE: {
      value: Fe.INTERFACE,
      description: "Location adjacent to an interface definition."
    },
    UNION: {
      value: Fe.UNION,
      description: "Location adjacent to a union definition."
    },
    ENUM: {
      value: Fe.ENUM,
      description: "Location adjacent to an enum definition."
    },
    ENUM_VALUE: {
      value: Fe.ENUM_VALUE,
      description: "Location adjacent to an enum value definition."
    },
    INPUT_OBJECT: {
      value: Fe.INPUT_OBJECT,
      description: "Location adjacent to an input object type definition."
    },
    INPUT_FIELD_DEFINITION: {
      value: Fe.INPUT_FIELD_DEFINITION,
      description: "Location adjacent to an input object field definition."
    }
  }
}), Wo = new zn({
  name: "__Type",
  description: "The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByURL`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.",
  fields: () => ({
    kind: {
      type: new et(vC),
      resolve(e) {
        if (pr(e))
          return It.SCALAR;
        if (Ye(e))
          return It.OBJECT;
        if (Ze(e))
          return It.INTERFACE;
        if (Zt(e))
          return It.UNION;
        if (Lt(e))
          return It.ENUM;
        if (mt(e))
          return It.INPUT_OBJECT;
        if (vt(e))
          return It.LIST;
        if (He(e))
          return It.NON_NULL;
        En(!1, `Unexpected type: "${be(e)}".`);
      }
    },
    name: {
      type: Vt,
      resolve: (e) => "name" in e ? e.name : void 0
    },
    description: {
      type: Vt,
      resolve: (e) => (
        /* c8 ignore next */
        "description" in e ? e.description : void 0
      )
    },
    specifiedByURL: {
      type: Vt,
      resolve: (e) => "specifiedByURL" in e ? e.specifiedByURL : void 0
    },
    fields: {
      type: new Ht(new et(mC)),
      args: {
        includeDeprecated: {
          type: Wt,
          defaultValue: !1
        }
      },
      resolve(e, { includeDeprecated: t }) {
        if (Ye(e) || Ze(e)) {
          const n = Object.values(e.getFields());
          return t ? n : n.filter((r) => r.deprecationReason == null);
        }
      }
    },
    interfaces: {
      type: new Ht(new et(Wo)),
      resolve(e) {
        if (Ye(e) || Ze(e))
          return e.getInterfaces();
      }
    },
    possibleTypes: {
      type: new Ht(new et(Wo)),
      resolve(e, t, n, { schema: r }) {
        if (qn(e))
          return r.getPossibleTypes(e);
      }
    },
    enumValues: {
      type: new Ht(new et(gC)),
      args: {
        includeDeprecated: {
          type: Wt,
          defaultValue: !1
        }
      },
      resolve(e, { includeDeprecated: t }) {
        if (Lt(e)) {
          const n = e.getValues();
          return t ? n : n.filter((r) => r.deprecationReason == null);
        }
      }
    },
    inputFields: {
      type: new Ht(new et(Th)),
      args: {
        includeDeprecated: {
          type: Wt,
          defaultValue: !1
        }
      },
      resolve(e, { includeDeprecated: t }) {
        if (mt(e)) {
          const n = Object.values(e.getFields());
          return t ? n : n.filter((r) => r.deprecationReason == null);
        }
      }
    },
    ofType: {
      type: Wo,
      resolve: (e) => "ofType" in e ? e.ofType : void 0
    }
  })
}), mC = new zn({
  name: "__Field",
  description: "Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.",
  fields: () => ({
    name: {
      type: new et(Vt),
      resolve: (e) => e.name
    },
    description: {
      type: Vt,
      resolve: (e) => e.description
    },
    args: {
      type: new et(
        new Ht(new et(Th))
      ),
      args: {
        includeDeprecated: {
          type: Wt,
          defaultValue: !1
        }
      },
      resolve(e, { includeDeprecated: t }) {
        return t ? e.args : e.args.filter((n) => n.deprecationReason == null);
      }
    },
    type: {
      type: new et(Wo),
      resolve: (e) => e.type
    },
    isDeprecated: {
      type: new et(Wt),
      resolve: (e) => e.deprecationReason != null
    },
    deprecationReason: {
      type: Vt,
      resolve: (e) => e.deprecationReason
    }
  })
}), Th = new zn({
  name: "__InputValue",
  description: "Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.",
  fields: () => ({
    name: {
      type: new et(Vt),
      resolve: (e) => e.name
    },
    description: {
      type: Vt,
      resolve: (e) => e.description
    },
    type: {
      type: new et(Wo),
      resolve: (e) => e.type
    },
    defaultValue: {
      type: Vt,
      description: "A GraphQL-formatted string representing the default value for this input value.",
      resolve(e) {
        const { type: t, defaultValue: n } = e, r = _s(n, t);
        return r ? pt(r) : null;
      }
    },
    isDeprecated: {
      type: new et(Wt),
      resolve: (e) => e.deprecationReason != null
    },
    deprecationReason: {
      type: Vt,
      resolve: (e) => e.deprecationReason
    }
  })
}), gC = new zn({
  name: "__EnumValue",
  description: "One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.",
  fields: () => ({
    name: {
      type: new et(Vt),
      resolve: (e) => e.name
    },
    description: {
      type: Vt,
      resolve: (e) => e.description
    },
    isDeprecated: {
      type: new et(Wt),
      resolve: (e) => e.deprecationReason != null
    },
    deprecationReason: {
      type: Vt,
      resolve: (e) => e.deprecationReason
    }
  })
});
var It;
(function(e) {
  e.SCALAR = "SCALAR", e.OBJECT = "OBJECT", e.INTERFACE = "INTERFACE", e.UNION = "UNION", e.ENUM = "ENUM", e.INPUT_OBJECT = "INPUT_OBJECT", e.LIST = "LIST", e.NON_NULL = "NON_NULL";
})(It || (It = {}));
const vC = new Or({
  name: "__TypeKind",
  description: "An enum describing what kind of type a given `__Type` is.",
  values: {
    SCALAR: {
      value: It.SCALAR,
      description: "Indicates this type is a scalar."
    },
    OBJECT: {
      value: It.OBJECT,
      description: "Indicates this type is an object. `fields` and `interfaces` are valid fields."
    },
    INTERFACE: {
      value: It.INTERFACE,
      description: "Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."
    },
    UNION: {
      value: It.UNION,
      description: "Indicates this type is a union. `possibleTypes` is a valid field."
    },
    ENUM: {
      value: It.ENUM,
      description: "Indicates this type is an enum. `enumValues` is a valid field."
    },
    INPUT_OBJECT: {
      value: It.INPUT_OBJECT,
      description: "Indicates this type is an input object. `inputFields` is a valid field."
    },
    LIST: {
      value: It.LIST,
      description: "Indicates this type is a list. `ofType` is a valid field."
    },
    NON_NULL: {
      value: It.NON_NULL,
      description: "Indicates this type is a non-null. `ofType` is a valid field."
    }
  }
}), ei = {
  name: "__schema",
  type: new et(by),
  description: "Access the current type schema of this server.",
  args: [],
  resolve: (e, t, n, { schema: r }) => r,
  deprecationReason: void 0,
  extensions: /* @__PURE__ */ Object.create(null),
  astNode: void 0
}, ti = {
  name: "__type",
  type: Wo,
  description: "Request the type information of a single type.",
  args: [
    {
      name: "name",
      description: void 0,
      type: new et(Vt),
      defaultValue: void 0,
      deprecationReason: void 0,
      extensions: /* @__PURE__ */ Object.create(null),
      astNode: void 0
    }
  ],
  resolve: (e, { name: t }, n, { schema: r }) => r.getType(t),
  deprecationReason: void 0,
  extensions: /* @__PURE__ */ Object.create(null),
  astNode: void 0
}, _o = {
  name: "__typename",
  type: new et(Vt),
  description: "The name of the current Object type at runtime.",
  args: [],
  resolve: (e, t, n, { parentType: r }) => r.name,
  deprecationReason: void 0,
  extensions: /* @__PURE__ */ Object.create(null),
  astNode: void 0
}, Ch = Object.freeze([
  by,
  pC,
  hC,
  Wo,
  mC,
  Th,
  gC,
  vC
]);
function Ac(e) {
  return Ch.some(({ name: t }) => e.name === t);
}
function zv(e) {
  return Di(e, Dc);
}
function yC(e) {
  if (!zv(e))
    throw new Error(`Expected ${be(e)} to be a GraphQL schema.`);
  return e;
}
class Dc {
  // Used as a cache for validateSchema().
  constructor(t) {
    var n, r;
    this.__validationErrors = t.assumeValid === !0 ? [] : void 0, Co(t) || lt(!1, "Must provide configuration object."), !t.types || Array.isArray(t.types) || lt(
      !1,
      `"types" must be Array if provided but got: ${be(t.types)}.`
    ), !t.directives || Array.isArray(t.directives) || lt(
      !1,
      `"directives" must be Array if provided but got: ${be(t.directives)}.`
    ), this.description = t.description, this.extensions = si(t.extensions), this.astNode = t.astNode, this.extensionASTNodes = (n = t.extensionASTNodes) !== null && n !== void 0 ? n : [], this._queryType = t.query, this._mutationType = t.mutation, this._subscriptionType = t.subscription, this._directives = (r = t.directives) !== null && r !== void 0 ? r : sl;
    const o = new Set(t.types);
    if (t.types != null)
      for (const i of t.types)
        o.delete(i), bi(i, o);
    this._queryType != null && bi(this._queryType, o), this._mutationType != null && bi(this._mutationType, o), this._subscriptionType != null && bi(this._subscriptionType, o);
    for (const i of this._directives)
      if (hy(i))
        for (const s of i.args)
          bi(s.type, o);
    bi(by, o), this._typeMap = /* @__PURE__ */ Object.create(null), this._subTypeMap = /* @__PURE__ */ Object.create(null), this._implementationsMap = /* @__PURE__ */ Object.create(null);
    for (const i of o) {
      if (i == null)
        continue;
      const s = i.name;
      if (s || lt(
        !1,
        "One of the provided types for building the Schema is missing a name."
      ), this._typeMap[s] !== void 0)
        throw new Error(
          `Schema must contain uniquely named types but contains multiple types named "${s}".`
        );
      if (this._typeMap[s] = i, Ze(i)) {
        for (const l of i.getInterfaces())
          if (Ze(l)) {
            let c = this._implementationsMap[l.name];
            c === void 0 && (c = this._implementationsMap[l.name] = {
              objects: [],
              interfaces: []
            }), c.interfaces.push(i);
          }
      } else if (Ye(i)) {
        for (const l of i.getInterfaces())
          if (Ze(l)) {
            let c = this._implementationsMap[l.name];
            c === void 0 && (c = this._implementationsMap[l.name] = {
              objects: [],
              interfaces: []
            }), c.objects.push(i);
          }
      }
    }
  }
  get [Symbol.toStringTag]() {
    return "GraphQLSchema";
  }
  getQueryType() {
    return this._queryType;
  }
  getMutationType() {
    return this._mutationType;
  }
  getSubscriptionType() {
    return this._subscriptionType;
  }
  getRootType(t) {
    switch (t) {
      case Bn.QUERY:
        return this.getQueryType();
      case Bn.MUTATION:
        return this.getMutationType();
      case Bn.SUBSCRIPTION:
        return this.getSubscriptionType();
    }
  }
  getTypeMap() {
    return this._typeMap;
  }
  getType(t) {
    return this.getTypeMap()[t];
  }
  getPossibleTypes(t) {
    return Zt(t) ? t.getTypes() : this.getImplementations(t).objects;
  }
  getImplementations(t) {
    const n = this._implementationsMap[t.name];
    return n ?? {
      objects: [],
      interfaces: []
    };
  }
  isSubType(t, n) {
    let r = this._subTypeMap[t.name];
    if (r === void 0) {
      if (r = /* @__PURE__ */ Object.create(null), Zt(t))
        for (const o of t.getTypes())
          r[o.name] = !0;
      else {
        const o = this.getImplementations(t);
        for (const i of o.objects)
          r[i.name] = !0;
        for (const i of o.interfaces)
          r[i.name] = !0;
      }
      this._subTypeMap[t.name] = r;
    }
    return r[n.name] !== void 0;
  }
  getDirectives() {
    return this._directives;
  }
  getDirective(t) {
    return this.getDirectives().find((n) => n.name === t);
  }
  toConfig() {
    return {
      description: this.description,
      query: this.getQueryType(),
      mutation: this.getMutationType(),
      subscription: this.getSubscriptionType(),
      types: Object.values(this.getTypeMap()),
      directives: this.getDirectives(),
      extensions: this.extensions,
      astNode: this.astNode,
      extensionASTNodes: this.extensionASTNodes,
      assumeValid: this.__validationErrors !== void 0
    };
  }
}
function bi(e, t) {
  const n = Et(e);
  if (!t.has(n)) {
    if (t.add(n), Zt(n))
      for (const r of n.getTypes())
        bi(r, t);
    else if (Ye(n) || Ze(n)) {
      for (const r of n.getInterfaces())
        bi(r, t);
      for (const r of Object.values(n.getFields())) {
        bi(r.type, t);
        for (const o of r.args)
          bi(o.type, t);
      }
    } else if (mt(n))
      for (const r of Object.values(n.getFields()))
        bi(r.type, t);
  }
  return t;
}
function Ey(e) {
  if (yC(e), e.__validationErrors)
    return e.__validationErrors;
  const t = new mU(e);
  gU(t), vU(t), yU(t);
  const n = t.getErrors();
  return e.__validationErrors = n, n;
}
function wy(e) {
  const t = Ey(e);
  if (t.length !== 0)
    throw new Error(t.map((n) => n.message).join(`

`));
}
class mU {
  constructor(t) {
    this._errors = [], this.schema = t;
  }
  reportError(t, n) {
    const r = Array.isArray(n) ? n.filter(Boolean) : n;
    this._errors.push(
      new he(t, {
        nodes: r
      })
    );
  }
  getErrors() {
    return this._errors;
  }
}
function gU(e) {
  const t = e.schema, n = t.getQueryType();
  if (!n)
    e.reportError("Query root type must be provided.", t.astNode);
  else if (!Ye(n)) {
    var r;
    e.reportError(
      `Query root type must be Object type, it cannot be ${be(
        n
      )}.`,
      (r = QE(
        t,
        Bn.QUERY
      )) !== null && r !== void 0 ? r : n.astNode
    );
  }
  const o = t.getMutationType();
  if (o && !Ye(o)) {
    var i;
    e.reportError(
      `Mutation root type must be Object type if provided, it cannot be ${be(o)}.`,
      (i = QE(
        t,
        Bn.MUTATION
      )) !== null && i !== void 0 ? i : o.astNode
    );
  }
  const s = t.getSubscriptionType();
  if (s && !Ye(s)) {
    var l;
    e.reportError(
      `Subscription root type must be Object type if provided, it cannot be ${be(s)}.`,
      (l = QE(
        t,
        Bn.SUBSCRIPTION
      )) !== null && l !== void 0 ? l : s.astNode
    );
  }
}
function QE(e, t) {
  var n;
  return (n = [e.astNode, ...e.extensionASTNodes].flatMap(
    // FIXME: https://github.com/graphql/graphql-js/issues/2203
    (r) => {
      var o;
      return (
        /* c8 ignore next */
        (o = r == null ? void 0 : r.operationTypes) !== null && o !== void 0 ? o : []
      );
    }
  ).find((r) => r.operation === t)) === null || n === void 0 ? void 0 : n.type;
}
function vU(e) {
  for (const n of e.schema.getDirectives()) {
    if (!hy(n)) {
      e.reportError(
        `Expected directive but got: ${be(n)}.`,
        n == null ? void 0 : n.astNode
      );
      continue;
    }
    gc(e, n);
    for (const r of n.args)
      if (gc(e, r), lr(r.type) || e.reportError(
        `The type of @${n.name}(${r.name}:) must be Input Type but got: ${be(r.type)}.`,
        r.astNode
      ), il(r) && r.deprecationReason != null) {
        var t;
        e.reportError(
          `Required argument @${n.name}(${r.name}:) cannot be deprecated.`,
          [
            bC(r.astNode),
            (t = r.astNode) === null || t === void 0 ? void 0 : t.type
          ]
        );
      }
  }
}
function gc(e, t) {
  t.name.startsWith("__") && e.reportError(
    `Name "${t.name}" must not begin with "__", which is reserved by GraphQL introspection.`,
    t.astNode
  );
}
function yU(e) {
  const t = TU(e), n = e.schema.getTypeMap();
  for (const r of Object.values(n)) {
    if (!Ks(r)) {
      e.reportError(
        `Expected GraphQL named type but got: ${be(r)}.`,
        r.astNode
      );
      continue;
    }
    Ac(r) || gc(e, r), Ye(r) || Ze(r) ? (K2(e, r), J2(e, r)) : Zt(r) ? wU(e, r) : Lt(r) ? xU(e, r) : mt(r) && (SU(e, r), t(r));
  }
}
function K2(e, t) {
  const n = Object.values(t.getFields());
  n.length === 0 && e.reportError(`Type ${t.name} must define one or more fields.`, [
    t.astNode,
    ...t.extensionASTNodes
  ]);
  for (const s of n) {
    if (gc(e, s), !Os(s.type)) {
      var r;
      e.reportError(
        `The type of ${t.name}.${s.name} must be Output Type but got: ${be(s.type)}.`,
        (r = s.astNode) === null || r === void 0 ? void 0 : r.type
      );
    }
    for (const l of s.args) {
      const c = l.name;
      if (gc(e, l), !lr(l.type)) {
        var o;
        e.reportError(
          `The type of ${t.name}.${s.name}(${c}:) must be Input Type but got: ${be(l.type)}.`,
          (o = l.astNode) === null || o === void 0 ? void 0 : o.type
        );
      }
      if (il(l) && l.deprecationReason != null) {
        var i;
        e.reportError(
          `Required argument ${t.name}.${s.name}(${c}:) cannot be deprecated.`,
          [
            bC(l.astNode),
            (i = l.astNode) === null || i === void 0 ? void 0 : i.type
          ]
        );
      }
    }
  }
}
function J2(e, t) {
  const n = /* @__PURE__ */ Object.create(null);
  for (const r of t.getInterfaces()) {
    if (!Ze(r)) {
      e.reportError(
        `Type ${be(t)} must only implement Interface types, it cannot implement ${be(r)}.`,
        op(t, r)
      );
      continue;
    }
    if (t === r) {
      e.reportError(
        `Type ${t.name} cannot implement itself because it would create a circular reference.`,
        op(t, r)
      );
      continue;
    }
    if (n[r.name]) {
      e.reportError(
        `Type ${t.name} can only implement ${r.name} once.`,
        op(t, r)
      );
      continue;
    }
    n[r.name] = !0, EU(e, t, r), bU(e, t, r);
  }
}
function bU(e, t, n) {
  const r = t.getFields();
  for (const c of Object.values(n.getFields())) {
    const f = c.name, d = r[f];
    if (!d) {
      e.reportError(
        `Interface field ${n.name}.${f} expected but ${t.name} does not provide it.`,
        [c.astNode, t.astNode, ...t.extensionASTNodes]
      );
      continue;
    }
    if (!ic(e.schema, d.type, c.type)) {
      var o, i;
      e.reportError(
        `Interface field ${n.name}.${f} expects type ${be(c.type)} but ${t.name}.${f} is type ${be(d.type)}.`,
        [
          (o = c.astNode) === null || o === void 0 ? void 0 : o.type,
          (i = d.astNode) === null || i === void 0 ? void 0 : i.type
        ]
      );
    }
    for (const g of c.args) {
      const m = g.name, v = d.args.find((b) => b.name === m);
      if (!v) {
        e.reportError(
          `Interface field argument ${n.name}.${f}(${m}:) expected but ${t.name}.${f} does not provide it.`,
          [g.astNode, d.astNode]
        );
        continue;
      }
      if (!qv(g.type, v.type)) {
        var s, l;
        e.reportError(
          `Interface field argument ${n.name}.${f}(${m}:) expects type ${be(g.type)} but ${t.name}.${f}(${m}:) is type ${be(v.type)}.`,
          [
            (s = g.astNode) === null || s === void 0 ? void 0 : s.type,
            (l = v.astNode) === null || l === void 0 ? void 0 : l.type
          ]
        );
      }
    }
    for (const g of d.args) {
      const m = g.name;
      !c.args.find((b) => b.name === m) && il(g) && e.reportError(
        `Object field ${t.name}.${f} includes required argument ${m} that is missing from the Interface field ${n.name}.${f}.`,
        [g.astNode, c.astNode]
      );
    }
  }
}
function EU(e, t, n) {
  const r = t.getInterfaces();
  for (const o of n.getInterfaces())
    r.includes(o) || e.reportError(
      o === t ? `Type ${t.name} cannot implement ${n.name} because it would create a circular reference.` : `Type ${t.name} must implement ${o.name} because it is implemented by ${n.name}.`,
      [
        ...op(n, o),
        ...op(t, n)
      ]
    );
}
function wU(e, t) {
  const n = t.getTypes();
  n.length === 0 && e.reportError(
    `Union type ${t.name} must define one or more member types.`,
    [t.astNode, ...t.extensionASTNodes]
  );
  const r = /* @__PURE__ */ Object.create(null);
  for (const o of n) {
    if (r[o.name]) {
      e.reportError(
        `Union type ${t.name} can only include type ${o.name} once.`,
        X2(t, o.name)
      );
      continue;
    }
    r[o.name] = !0, Ye(o) || e.reportError(
      `Union type ${t.name} can only include Object types, it cannot include ${be(o)}.`,
      X2(t, String(o))
    );
  }
}
function xU(e, t) {
  const n = t.getValues();
  n.length === 0 && e.reportError(
    `Enum type ${t.name} must define one or more values.`,
    [t.astNode, ...t.extensionASTNodes]
  );
  for (const r of n)
    gc(e, r);
}
function SU(e, t) {
  const n = Object.values(t.getFields());
  n.length === 0 && e.reportError(
    `Input Object type ${t.name} must define one or more fields.`,
    [t.astNode, ...t.extensionASTNodes]
  );
  for (const i of n) {
    if (gc(e, i), !lr(i.type)) {
      var r;
      e.reportError(
        `The type of ${t.name}.${i.name} must be Input Type but got: ${be(i.type)}.`,
        (r = i.astNode) === null || r === void 0 ? void 0 : r.type
      );
    }
    if (py(i) && i.deprecationReason != null) {
      var o;
      e.reportError(
        `Required input field ${t.name}.${i.name} cannot be deprecated.`,
        [
          bC(i.astNode),
          (o = i.astNode) === null || o === void 0 ? void 0 : o.type
        ]
      );
    }
  }
}
function TU(e) {
  const t = /* @__PURE__ */ Object.create(null), n = [], r = /* @__PURE__ */ Object.create(null);
  return o;
  function o(i) {
    if (t[i.name])
      return;
    t[i.name] = !0, r[i.name] = n.length;
    const s = Object.values(i.getFields());
    for (const l of s)
      if (He(l.type) && mt(l.type.ofType)) {
        const c = l.type.ofType, f = r[c.name];
        if (n.push(l), f === void 0)
          o(c);
        else {
          const d = n.slice(f), g = d.map((m) => m.name).join(".");
          e.reportError(
            `Cannot reference Input Object "${c.name}" within itself through a series of non-null fields: "${g}".`,
            d.map((m) => m.astNode)
          );
        }
        n.pop();
      }
    r[i.name] = void 0;
  }
}
function op(e, t) {
  const { astNode: n, extensionASTNodes: r } = e;
  return (n != null ? [n, ...r] : r).flatMap((i) => {
    var s;
    return (
      /* c8 ignore next */
      (s = i.interfaces) !== null && s !== void 0 ? s : []
    );
  }).filter((i) => i.name.value === t.name);
}
function X2(e, t) {
  const { astNode: n, extensionASTNodes: r } = e;
  return (n != null ? [n, ...r] : r).flatMap((i) => {
    var s;
    return (
      /* c8 ignore next */
      (s = i.types) !== null && s !== void 0 ? s : []
    );
  }).filter((i) => i.name.value === t);
}
function bC(e) {
  var t;
  return e == null || (t = e.directives) === null || t === void 0 ? void 0 : t.find(
    (n) => n.name.value === vy.name
  );
}
function Jn(e, t) {
  switch (t.kind) {
    case U.LIST_TYPE: {
      const n = Jn(e, t.type);
      return n && new Ht(n);
    }
    case U.NON_NULL_TYPE: {
      const n = Jn(e, t.type);
      return n && new et(n);
    }
    case U.NAMED_TYPE:
      return e.getType(t.name.value);
  }
}
class Vs {
  constructor(t, n, r) {
    this._schema = t, this._typeStack = [], this._parentTypeStack = [], this._inputTypeStack = [], this._fieldDefStack = [], this._defaultValueStack = [], this._directive = null, this._argument = null, this._enumValue = null, this._getFieldDef = r ?? CU, n && (lr(n) && this._inputTypeStack.push(n), Jt(n) && this._parentTypeStack.push(n), Os(n) && this._typeStack.push(n));
  }
  get [Symbol.toStringTag]() {
    return "TypeInfo";
  }
  getType() {
    if (this._typeStack.length > 0)
      return this._typeStack[this._typeStack.length - 1];
  }
  getParentType() {
    if (this._parentTypeStack.length > 0)
      return this._parentTypeStack[this._parentTypeStack.length - 1];
  }
  getInputType() {
    if (this._inputTypeStack.length > 0)
      return this._inputTypeStack[this._inputTypeStack.length - 1];
  }
  getParentInputType() {
    if (this._inputTypeStack.length > 1)
      return this._inputTypeStack[this._inputTypeStack.length - 2];
  }
  getFieldDef() {
    if (this._fieldDefStack.length > 0)
      return this._fieldDefStack[this._fieldDefStack.length - 1];
  }
  getDefaultValue() {
    if (this._defaultValueStack.length > 0)
      return this._defaultValueStack[this._defaultValueStack.length - 1];
  }
  getDirective() {
    return this._directive;
  }
  getArgument() {
    return this._argument;
  }
  getEnumValue() {
    return this._enumValue;
  }
  enter(t) {
    const n = this._schema;
    switch (t.kind) {
      case U.SELECTION_SET: {
        const o = Et(this.getType());
        this._parentTypeStack.push(
          Jt(o) ? o : void 0
        );
        break;
      }
      case U.FIELD: {
        const o = this.getParentType();
        let i, s;
        o && (i = this._getFieldDef(n, o, t), i && (s = i.type)), this._fieldDefStack.push(i), this._typeStack.push(Os(s) ? s : void 0);
        break;
      }
      case U.DIRECTIVE:
        this._directive = n.getDirective(t.name.value);
        break;
      case U.OPERATION_DEFINITION: {
        const o = n.getRootType(t.operation);
        this._typeStack.push(Ye(o) ? o : void 0);
        break;
      }
      case U.INLINE_FRAGMENT:
      case U.FRAGMENT_DEFINITION: {
        const o = t.typeCondition, i = o ? Jn(n, o) : Et(this.getType());
        this._typeStack.push(Os(i) ? i : void 0);
        break;
      }
      case U.VARIABLE_DEFINITION: {
        const o = Jn(n, t.type);
        this._inputTypeStack.push(
          lr(o) ? o : void 0
        );
        break;
      }
      case U.ARGUMENT: {
        var r;
        let o, i;
        const s = (r = this.getDirective()) !== null && r !== void 0 ? r : this.getFieldDef();
        s && (o = s.args.find(
          (l) => l.name === t.name.value
        ), o && (i = o.type)), this._argument = o, this._defaultValueStack.push(o ? o.defaultValue : void 0), this._inputTypeStack.push(lr(i) ? i : void 0);
        break;
      }
      case U.LIST: {
        const o = ol(this.getInputType()), i = vt(o) ? o.ofType : o;
        this._defaultValueStack.push(void 0), this._inputTypeStack.push(lr(i) ? i : void 0);
        break;
      }
      case U.OBJECT_FIELD: {
        const o = Et(this.getInputType());
        let i, s;
        mt(o) && (s = o.getFields()[t.name.value], s && (i = s.type)), this._defaultValueStack.push(
          s ? s.defaultValue : void 0
        ), this._inputTypeStack.push(
          lr(i) ? i : void 0
        );
        break;
      }
      case U.ENUM: {
        const o = Et(this.getInputType());
        let i;
        Lt(o) && (i = o.getValue(t.value)), this._enumValue = i;
        break;
      }
    }
  }
  leave(t) {
    switch (t.kind) {
      case U.SELECTION_SET:
        this._parentTypeStack.pop();
        break;
      case U.FIELD:
        this._fieldDefStack.pop(), this._typeStack.pop();
        break;
      case U.DIRECTIVE:
        this._directive = null;
        break;
      case U.OPERATION_DEFINITION:
      case U.INLINE_FRAGMENT:
      case U.FRAGMENT_DEFINITION:
        this._typeStack.pop();
        break;
      case U.VARIABLE_DEFINITION:
        this._inputTypeStack.pop();
        break;
      case U.ARGUMENT:
        this._argument = null, this._defaultValueStack.pop(), this._inputTypeStack.pop();
        break;
      case U.LIST:
      case U.OBJECT_FIELD:
        this._defaultValueStack.pop(), this._inputTypeStack.pop();
        break;
      case U.ENUM:
        this._enumValue = null;
        break;
    }
  }
}
function CU(e, t, n) {
  const r = n.name.value;
  if (r === ei.name && e.getQueryType() === t)
    return ei;
  if (r === ti.name && e.getQueryType() === t)
    return ti;
  if (r === _o.name && Jt(t))
    return _o;
  if (Ye(t) || Ze(t))
    return t.getFields()[r];
}
function Ic(e, t) {
  return {
    enter(...n) {
      const r = n[0];
      e.enter(r);
      const o = yf(t, r.kind).enter;
      if (o) {
        const i = o.apply(t, n);
        return i !== void 0 && (e.leave(r), Vx(i) && e.enter(i)), i;
      }
    },
    leave(...n) {
      const r = n[0], o = yf(t, r.kind).leave;
      let i;
      return o && (i = o.apply(t, n)), e.leave(r), i;
    }
  };
}
function kU(e) {
  return EC(e) || xy(e) || wC(e);
}
function EC(e) {
  return e.kind === U.OPERATION_DEFINITION || e.kind === U.FRAGMENT_DEFINITION;
}
function _U(e) {
  return e.kind === U.FIELD || e.kind === U.FRAGMENT_SPREAD || e.kind === U.INLINE_FRAGMENT;
}
function mP(e) {
  return e.kind === U.VARIABLE || e.kind === U.INT || e.kind === U.FLOAT || e.kind === U.STRING || e.kind === U.BOOLEAN || e.kind === U.NULL || e.kind === U.ENUM || e.kind === U.LIST || e.kind === U.OBJECT;
}
function Bx(e) {
  return mP(e) && (e.kind === U.LIST ? e.values.some(Bx) : e.kind === U.OBJECT ? e.fields.some((t) => Bx(t.value)) : e.kind !== U.VARIABLE);
}
function NU(e) {
  return e.kind === U.NAMED_TYPE || e.kind === U.LIST_TYPE || e.kind === U.NON_NULL_TYPE;
}
function xy(e) {
  return e.kind === U.SCHEMA_DEFINITION || If(e) || e.kind === U.DIRECTIVE_DEFINITION;
}
function If(e) {
  return e.kind === U.SCALAR_TYPE_DEFINITION || e.kind === U.OBJECT_TYPE_DEFINITION || e.kind === U.INTERFACE_TYPE_DEFINITION || e.kind === U.UNION_TYPE_DEFINITION || e.kind === U.ENUM_TYPE_DEFINITION || e.kind === U.INPUT_OBJECT_TYPE_DEFINITION;
}
function wC(e) {
  return e.kind === U.SCHEMA_EXTENSION || Sy(e);
}
function Sy(e) {
  return e.kind === U.SCALAR_TYPE_EXTENSION || e.kind === U.OBJECT_TYPE_EXTENSION || e.kind === U.INTERFACE_TYPE_EXTENSION || e.kind === U.UNION_TYPE_EXTENSION || e.kind === U.ENUM_TYPE_EXTENSION || e.kind === U.INPUT_OBJECT_TYPE_EXTENSION;
}
function xC(e) {
  return {
    Document(t) {
      for (const n of t.definitions)
        if (!EC(n)) {
          const r = n.kind === U.SCHEMA_DEFINITION || n.kind === U.SCHEMA_EXTENSION ? "schema" : '"' + n.name.value + '"';
          e.reportError(
            new he(`The ${r} definition is not executable.`, {
              nodes: n
            })
          );
        }
      return !1;
    }
  };
}
function gP(e) {
  return {
    Field(t) {
      const n = e.getParentType();
      if (n && !e.getFieldDef()) {
        const o = e.getSchema(), i = t.name.value;
        let s = Ps(
          "to use an inline fragment on",
          OU(o, n, i)
        );
        s === "" && (s = Ps(AU(n, i))), e.reportError(
          new he(
            `Cannot query field "${i}" on type "${n.name}".` + s,
            {
              nodes: t
            }
          )
        );
      }
    }
  };
}
function OU(e, t, n) {
  if (!qn(t))
    return [];
  const r = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ Object.create(null);
  for (const s of e.getPossibleTypes(t))
    if (s.getFields()[n]) {
      r.add(s), o[s.name] = 1;
      for (const l of s.getInterfaces()) {
        var i;
        l.getFields()[n] && (r.add(l), o[l.name] = ((i = o[l.name]) !== null && i !== void 0 ? i : 0) + 1);
      }
    }
  return [...r].sort((s, l) => {
    const c = o[l.name] - o[s.name];
    return c !== 0 ? c : Ze(s) && e.isSubType(s, l) ? -1 : Ze(l) && e.isSubType(l, s) ? 1 : bh(s.name, l.name);
  }).map((s) => s.name);
}
function AU(e, t) {
  if (Ye(e) || Ze(e)) {
    const n = Object.keys(e.getFields());
    return rl(t, n);
  }
  return [];
}
function vP(e) {
  return {
    InlineFragment(t) {
      const n = t.typeCondition;
      if (n) {
        const r = Jn(e.getSchema(), n);
        if (r && !Jt(r)) {
          const o = pt(n);
          e.reportError(
            new he(
              `Fragment cannot condition on non composite type "${o}".`,
              {
                nodes: n
              }
            )
          );
        }
      }
    },
    FragmentDefinition(t) {
      const n = Jn(e.getSchema(), t.typeCondition);
      if (n && !Jt(n)) {
        const r = pt(t.typeCondition);
        e.reportError(
          new he(
            `Fragment "${t.name.value}" cannot condition on non composite type "${r}".`,
            {
              nodes: t.typeCondition
            }
          )
        );
      }
    }
  };
}
function yP(e) {
  return {
    // eslint-disable-next-line new-cap
    ...bP(e),
    Argument(t) {
      const n = e.getArgument(), r = e.getFieldDef(), o = e.getParentType();
      if (!n && r && o) {
        const i = t.name.value, s = r.args.map((c) => c.name), l = rl(i, s);
        e.reportError(
          new he(
            `Unknown argument "${i}" on field "${o.name}.${r.name}".` + Ps(l),
            {
              nodes: t
            }
          )
        );
      }
    }
  };
}
function bP(e) {
  const t = /* @__PURE__ */ Object.create(null), n = e.getSchema(), r = n ? n.getDirectives() : sl;
  for (const s of r)
    t[s.name] = s.args.map((l) => l.name);
  const o = e.getDocument().definitions;
  for (const s of o)
    if (s.kind === U.DIRECTIVE_DEFINITION) {
      var i;
      const l = (i = s.arguments) !== null && i !== void 0 ? i : [];
      t[s.name.value] = l.map((c) => c.name.value);
    }
  return {
    Directive(s) {
      const l = s.name.value, c = t[l];
      if (s.arguments && c)
        for (const f of s.arguments) {
          const d = f.name.value;
          if (!c.includes(d)) {
            const g = rl(d, c);
            e.reportError(
              new he(
                `Unknown argument "${d}" on directive "@${l}".` + Ps(g),
                {
                  nodes: f
                }
              )
            );
          }
        }
      return !1;
    }
  };
}
function Ty(e) {
  const t = /* @__PURE__ */ Object.create(null), n = e.getSchema(), r = n ? n.getDirectives() : sl;
  for (const i of r)
    t[i.name] = i.locations;
  const o = e.getDocument().definitions;
  for (const i of o)
    i.kind === U.DIRECTIVE_DEFINITION && (t[i.name.value] = i.locations.map((s) => s.value));
  return {
    Directive(i, s, l, c, f) {
      const d = i.name.value, g = t[d];
      if (!g) {
        e.reportError(
          new he(`Unknown directive "@${d}".`, {
            nodes: i
          })
        );
        return;
      }
      const m = DU(f);
      m && !g.includes(m) && e.reportError(
        new he(
          `Directive "@${d}" may not be used on ${m}.`,
          {
            nodes: i
          }
        )
      );
    }
  };
}
function DU(e) {
  const t = e[e.length - 1];
  switch ("kind" in t || En(!1), t.kind) {
    case U.OPERATION_DEFINITION:
      return IU(t.operation);
    case U.FIELD:
      return Fe.FIELD;
    case U.FRAGMENT_SPREAD:
      return Fe.FRAGMENT_SPREAD;
    case U.INLINE_FRAGMENT:
      return Fe.INLINE_FRAGMENT;
    case U.FRAGMENT_DEFINITION:
      return Fe.FRAGMENT_DEFINITION;
    case U.VARIABLE_DEFINITION:
      return Fe.VARIABLE_DEFINITION;
    case U.SCHEMA_DEFINITION:
    case U.SCHEMA_EXTENSION:
      return Fe.SCHEMA;
    case U.SCALAR_TYPE_DEFINITION:
    case U.SCALAR_TYPE_EXTENSION:
      return Fe.SCALAR;
    case U.OBJECT_TYPE_DEFINITION:
    case U.OBJECT_TYPE_EXTENSION:
      return Fe.OBJECT;
    case U.FIELD_DEFINITION:
      return Fe.FIELD_DEFINITION;
    case U.INTERFACE_TYPE_DEFINITION:
    case U.INTERFACE_TYPE_EXTENSION:
      return Fe.INTERFACE;
    case U.UNION_TYPE_DEFINITION:
    case U.UNION_TYPE_EXTENSION:
      return Fe.UNION;
    case U.ENUM_TYPE_DEFINITION:
    case U.ENUM_TYPE_EXTENSION:
      return Fe.ENUM;
    case U.ENUM_VALUE_DEFINITION:
      return Fe.ENUM_VALUE;
    case U.INPUT_OBJECT_TYPE_DEFINITION:
    case U.INPUT_OBJECT_TYPE_EXTENSION:
      return Fe.INPUT_OBJECT;
    case U.INPUT_VALUE_DEFINITION: {
      const n = e[e.length - 3];
      return "kind" in n || En(!1), n.kind === U.INPUT_OBJECT_TYPE_DEFINITION ? Fe.INPUT_FIELD_DEFINITION : Fe.ARGUMENT_DEFINITION;
    }
    default:
      En(!1, "Unexpected kind: " + be(t.kind));
  }
}
function IU(e) {
  switch (e) {
    case Bn.QUERY:
      return Fe.QUERY;
    case Bn.MUTATION:
      return Fe.MUTATION;
    case Bn.SUBSCRIPTION:
      return Fe.SUBSCRIPTION;
  }
}
function SC(e) {
  return {
    FragmentSpread(t) {
      const n = t.name.value;
      e.getFragment(n) || e.reportError(
        new he(`Unknown fragment "${n}".`, {
          nodes: t.name
        })
      );
    }
  };
}
function Cy(e) {
  const t = e.getSchema(), n = t ? t.getTypeMap() : /* @__PURE__ */ Object.create(null), r = /* @__PURE__ */ Object.create(null);
  for (const i of e.getDocument().definitions)
    If(i) && (r[i.name.value] = !0);
  const o = [
    ...Object.keys(n),
    ...Object.keys(r)
  ];
  return {
    NamedType(i, s, l, c, f) {
      const d = i.name.value;
      if (!n[d] && !r[d]) {
        var g;
        const m = (g = f[2]) !== null && g !== void 0 ? g : l, v = m != null && LU(m);
        if (v && Z2.includes(d))
          return;
        const b = rl(
          d,
          v ? Z2.concat(o) : o
        );
        e.reportError(
          new he(
            `Unknown type "${d}".` + Ps(b),
            {
              nodes: i
            }
          )
        );
      }
    }
  };
}
const Z2 = [...wh, ...Ch].map(
  (e) => e.name
);
function LU(e) {
  return "kind" in e && (xy(e) || wC(e));
}
function EP(e) {
  let t = 0;
  return {
    Document(n) {
      t = n.definitions.filter(
        (r) => r.kind === U.OPERATION_DEFINITION
      ).length;
    },
    OperationDefinition(n) {
      !n.name && t > 1 && e.reportError(
        new he(
          "This anonymous operation must be the only defined operation.",
          {
            nodes: n
          }
        )
      );
    }
  };
}
function TC(e) {
  var t, n, r;
  const o = e.getSchema(), i = (t = (n = (r = o == null ? void 0 : o.astNode) !== null && r !== void 0 ? r : o == null ? void 0 : o.getQueryType()) !== null && n !== void 0 ? n : o == null ? void 0 : o.getMutationType()) !== null && t !== void 0 ? t : o == null ? void 0 : o.getSubscriptionType();
  let s = 0;
  return {
    SchemaDefinition(l) {
      if (i) {
        e.reportError(
          new he(
            "Cannot define a new schema within a schema extension.",
            {
              nodes: l
            }
          )
        );
        return;
      }
      s > 0 && e.reportError(
        new he("Must provide only one schema definition.", {
          nodes: l
        })
      ), ++s;
    }
  };
}
function wP(e) {
  const t = /* @__PURE__ */ Object.create(null), n = [], r = /* @__PURE__ */ Object.create(null);
  return {
    OperationDefinition: () => !1,
    FragmentDefinition(i) {
      return o(i), !1;
    }
  };
  function o(i) {
    if (t[i.name.value])
      return;
    const s = i.name.value;
    t[s] = !0;
    const l = e.getFragmentSpreads(i.selectionSet);
    if (l.length !== 0) {
      r[s] = n.length;
      for (const c of l) {
        const f = c.name.value, d = r[f];
        if (n.push(c), d === void 0) {
          const g = e.getFragment(f);
          g && o(g);
        } else {
          const g = n.slice(d), m = g.slice(0, -1).map((v) => '"' + v.name.value + '"').join(", ");
          e.reportError(
            new he(
              `Cannot spread fragment "${f}" within itself` + (m !== "" ? ` via ${m}.` : "."),
              {
                nodes: g
              }
            )
          );
        }
        n.pop();
      }
      r[s] = void 0;
    }
  }
}
function xP(e) {
  let t = /* @__PURE__ */ Object.create(null);
  return {
    OperationDefinition: {
      enter() {
        t = /* @__PURE__ */ Object.create(null);
      },
      leave(n) {
        const r = e.getRecursiveVariableUsages(n);
        for (const { node: o } of r) {
          const i = o.name.value;
          t[i] !== !0 && e.reportError(
            new he(
              n.name ? `Variable "$${i}" is not defined by operation "${n.name.value}".` : `Variable "$${i}" is not defined.`,
              {
                nodes: [o, n]
              }
            )
          );
        }
      }
    },
    VariableDefinition(n) {
      t[n.variable.name.value] = !0;
    }
  };
}
function CC(e) {
  const t = [], n = [];
  return {
    OperationDefinition(r) {
      return t.push(r), !1;
    },
    FragmentDefinition(r) {
      return n.push(r), !1;
    },
    Document: {
      leave() {
        const r = /* @__PURE__ */ Object.create(null);
        for (const o of t)
          for (const i of e.getRecursivelyReferencedFragments(
            o
          ))
            r[i.name.value] = !0;
        for (const o of n) {
          const i = o.name.value;
          r[i] !== !0 && e.reportError(
            new he(`Fragment "${i}" is never used.`, {
              nodes: o
            })
          );
        }
      }
    }
  };
}
function SP(e) {
  let t = [];
  return {
    OperationDefinition: {
      enter() {
        t = [];
      },
      leave(n) {
        const r = /* @__PURE__ */ Object.create(null), o = e.getRecursiveVariableUsages(n);
        for (const { node: i } of o)
          r[i.name.value] = !0;
        for (const i of t) {
          const s = i.variable.name.value;
          r[s] !== !0 && e.reportError(
            new he(
              n.name ? `Variable "$${s}" is never used in operation "${n.name.value}".` : `Variable "$${s}" is never used.`,
              {
                nodes: i
              }
            )
          );
        }
      }
    },
    VariableDefinition(n) {
      t.push(n);
    }
  };
}
function ky(e) {
  switch (e.kind) {
    case U.OBJECT:
      return { ...e, fields: RU(e.fields) };
    case U.LIST:
      return { ...e, values: e.values.map(ky) };
    case U.INT:
    case U.FLOAT:
    case U.STRING:
    case U.BOOLEAN:
    case U.NULL:
    case U.ENUM:
    case U.VARIABLE:
      return e;
  }
}
function RU(e) {
  return e.map((t) => ({
    ...t,
    value: ky(t.value)
  })).sort(
    (t, n) => bh(t.name.value, n.name.value)
  );
}
function TP(e) {
  return Array.isArray(e) ? e.map(
    ([t, n]) => `subfields "${t}" conflict because ` + TP(n)
  ).join(" and ") : e;
}
function CP(e) {
  const t = new jU(), n = /* @__PURE__ */ new Map();
  return {
    SelectionSet(r) {
      const o = FU(
        e,
        n,
        t,
        e.getParentType(),
        r
      );
      for (const [[i, s], l, c] of o) {
        const f = TP(s);
        e.reportError(
          new he(
            `Fields "${i}" conflict because ${f}. Use different aliases on the fields to fetch both if this was intentional.`,
            {
              nodes: l.concat(c)
            }
          )
        );
      }
    }
  };
}
function FU(e, t, n, r, o) {
  const i = [], [s, l] = Gv(
    e,
    t,
    r,
    o
  );
  if (PU(
    e,
    i,
    t,
    n,
    s
  ), l.length !== 0)
    for (let c = 0; c < l.length; c++) {
      Hv(
        e,
        i,
        t,
        n,
        !1,
        s,
        l[c]
      );
      for (let f = c + 1; f < l.length; f++)
        Wv(
          e,
          i,
          t,
          n,
          !1,
          l[c],
          l[f]
        );
    }
  return i;
}
function Hv(e, t, n, r, o, i, s) {
  const l = e.getFragment(s);
  if (!l)
    return;
  const [c, f] = zx(
    e,
    n,
    l
  );
  if (i !== c) {
    kC(
      e,
      t,
      n,
      r,
      o,
      i,
      c
    );
    for (const d of f)
      r.has(
        d,
        s,
        o
      ) || (r.add(
        d,
        s,
        o
      ), Hv(
        e,
        t,
        n,
        r,
        o,
        i,
        d
      ));
  }
}
function Wv(e, t, n, r, o, i, s) {
  if (i === s || r.has(
    i,
    s,
    o
  ))
    return;
  r.add(i, s, o);
  const l = e.getFragment(i), c = e.getFragment(s);
  if (!l || !c)
    return;
  const [f, d] = zx(
    e,
    n,
    l
  ), [g, m] = zx(
    e,
    n,
    c
  );
  kC(
    e,
    t,
    n,
    r,
    o,
    f,
    g
  );
  for (const v of m)
    Wv(
      e,
      t,
      n,
      r,
      o,
      i,
      v
    );
  for (const v of d)
    Wv(
      e,
      t,
      n,
      r,
      o,
      v,
      s
    );
}
function MU(e, t, n, r, o, i, s, l) {
  const c = [], [f, d] = Gv(
    e,
    t,
    o,
    i
  ), [g, m] = Gv(
    e,
    t,
    s,
    l
  );
  kC(
    e,
    c,
    t,
    n,
    r,
    f,
    g
  );
  for (const v of m)
    Hv(
      e,
      c,
      t,
      n,
      r,
      f,
      v
    );
  for (const v of d)
    Hv(
      e,
      c,
      t,
      n,
      r,
      g,
      v
    );
  for (const v of d)
    for (const b of m)
      Wv(
        e,
        c,
        t,
        n,
        r,
        v,
        b
      );
  return c;
}
function PU(e, t, n, r, o) {
  for (const [i, s] of Object.entries(o))
    if (s.length > 1)
      for (let l = 0; l < s.length; l++)
        for (let c = l + 1; c < s.length; c++) {
          const f = kP(
            e,
            n,
            r,
            !1,
            // within one collection is never mutually exclusive
            i,
            s[l],
            s[c]
          );
          f && t.push(f);
        }
}
function kC(e, t, n, r, o, i, s) {
  for (const [l, c] of Object.entries(i)) {
    const f = s[l];
    if (f)
      for (const d of c)
        for (const g of f) {
          const m = kP(
            e,
            n,
            r,
            o,
            l,
            d,
            g
          );
          m && t.push(m);
        }
  }
}
function kP(e, t, n, r, o, i, s) {
  const [l, c, f] = i, [d, g, m] = s, v = r || l !== d && Ye(l) && Ye(d);
  if (!v) {
    const x = c.name.value, C = g.name.value;
    if (x !== C)
      return [
        [o, `"${x}" and "${C}" are different fields`],
        [c],
        [g]
      ];
    if (!$U(c, g))
      return [
        [o, "they have differing arguments"],
        [c],
        [g]
      ];
  }
  const b = f == null ? void 0 : f.type, w = m == null ? void 0 : m.type;
  if (b && w && qx(b, w))
    return [
      [
        o,
        `they return conflicting types "${be(b)}" and "${be(
          w
        )}"`
      ],
      [c],
      [g]
    ];
  const _ = c.selectionSet, S = g.selectionSet;
  if (_ && S) {
    const x = MU(
      e,
      t,
      n,
      v,
      Et(b),
      _,
      Et(w),
      S
    );
    return VU(x, o, c, g);
  }
}
function $U(e, t) {
  const n = e.arguments, r = t.arguments;
  if (n === void 0 || n.length === 0)
    return r === void 0 || r.length === 0;
  if (r === void 0 || r.length === 0 || n.length !== r.length)
    return !1;
  const o = new Map(r.map(({ name: i, value: s }) => [i.value, s]));
  return n.every((i) => {
    const s = i.value, l = o.get(i.name.value);
    return l === void 0 ? !1 : eA(s) === eA(l);
  });
}
function eA(e) {
  return pt(ky(e));
}
function qx(e, t) {
  return vt(e) ? vt(t) ? qx(e.ofType, t.ofType) : !0 : vt(t) ? !0 : He(e) ? He(t) ? qx(e.ofType, t.ofType) : !0 : He(t) ? !0 : Nr(e) || Nr(t) ? e !== t : !1;
}
function Gv(e, t, n, r) {
  const o = t.get(r);
  if (o)
    return o;
  const i = /* @__PURE__ */ Object.create(null), s = /* @__PURE__ */ Object.create(null);
  _P(
    e,
    n,
    r,
    i,
    s
  );
  const l = [i, Object.keys(s)];
  return t.set(r, l), l;
}
function zx(e, t, n) {
  const r = t.get(n.selectionSet);
  if (r)
    return r;
  const o = Jn(e.getSchema(), n.typeCondition);
  return Gv(
    e,
    t,
    o,
    n.selectionSet
  );
}
function _P(e, t, n, r, o) {
  for (const i of n.selections)
    switch (i.kind) {
      case U.FIELD: {
        const s = i.name.value;
        let l;
        (Ye(t) || Ze(t)) && (l = t.getFields()[s]);
        const c = i.alias ? i.alias.value : s;
        r[c] || (r[c] = []), r[c].push([t, i, l]);
        break;
      }
      case U.FRAGMENT_SPREAD:
        o[i.name.value] = !0;
        break;
      case U.INLINE_FRAGMENT: {
        const s = i.typeCondition, l = s ? Jn(e.getSchema(), s) : t;
        _P(
          e,
          l,
          i.selectionSet,
          r,
          o
        );
        break;
      }
    }
}
function VU(e, t, n, r) {
  if (e.length > 0)
    return [
      [t, e.map(([o]) => o)],
      [n, ...e.map(([, o]) => o).flat()],
      [r, ...e.map(([, , o]) => o).flat()]
    ];
}
class jU {
  constructor() {
    this._data = /* @__PURE__ */ new Map();
  }
  has(t, n, r) {
    var o;
    const [i, s] = t < n ? [t, n] : [n, t], l = (o = this._data.get(i)) === null || o === void 0 ? void 0 : o.get(s);
    return l === void 0 ? !1 : r ? !0 : r === l;
  }
  add(t, n, r) {
    const [o, i] = t < n ? [t, n] : [n, t], s = this._data.get(o);
    s === void 0 ? this._data.set(o, /* @__PURE__ */ new Map([[i, r]])) : s.set(i, r);
  }
}
function NP(e) {
  return {
    InlineFragment(t) {
      const n = e.getType(), r = e.getParentType();
      if (Jt(n) && Jt(r) && !Fp(e.getSchema(), n, r)) {
        const o = be(r), i = be(n);
        e.reportError(
          new he(
            `Fragment cannot be spread here as objects of type "${o}" can never be of type "${i}".`,
            {
              nodes: t
            }
          )
        );
      }
    },
    FragmentSpread(t) {
      const n = t.name.value, r = UU(e, n), o = e.getParentType();
      if (r && o && !Fp(e.getSchema(), r, o)) {
        const i = be(o), s = be(r);
        e.reportError(
          new he(
            `Fragment "${n}" cannot be spread here as objects of type "${i}" can never be of type "${s}".`,
            {
              nodes: t
            }
          )
        );
      }
    }
  };
}
function UU(e, t) {
  const n = e.getFragment(t);
  if (n) {
    const r = Jn(e.getSchema(), n.typeCondition);
    if (Jt(r))
      return r;
  }
}
function _C(e) {
  const t = e.getSchema(), n = /* @__PURE__ */ Object.create(null);
  for (const o of e.getDocument().definitions)
    If(o) && (n[o.name.value] = o);
  return {
    ScalarTypeExtension: r,
    ObjectTypeExtension: r,
    InterfaceTypeExtension: r,
    UnionTypeExtension: r,
    EnumTypeExtension: r,
    InputObjectTypeExtension: r
  };
  function r(o) {
    const i = o.name.value, s = n[i], l = t == null ? void 0 : t.getType(i);
    let c;
    if (s ? c = BU[s.kind] : l && (c = qU(l)), c) {
      if (c !== o.kind) {
        const f = zU(o.kind);
        e.reportError(
          new he(`Cannot extend non-${f} type "${i}".`, {
            nodes: s ? [s, o] : o
          })
        );
      }
    } else {
      const f = Object.keys({
        ...n,
        ...t == null ? void 0 : t.getTypeMap()
      }), d = rl(i, f);
      e.reportError(
        new he(
          `Cannot extend type "${i}" because it is not defined.` + Ps(d),
          {
            nodes: o.name
          }
        )
      );
    }
  }
}
const BU = {
  [U.SCALAR_TYPE_DEFINITION]: U.SCALAR_TYPE_EXTENSION,
  [U.OBJECT_TYPE_DEFINITION]: U.OBJECT_TYPE_EXTENSION,
  [U.INTERFACE_TYPE_DEFINITION]: U.INTERFACE_TYPE_EXTENSION,
  [U.UNION_TYPE_DEFINITION]: U.UNION_TYPE_EXTENSION,
  [U.ENUM_TYPE_DEFINITION]: U.ENUM_TYPE_EXTENSION,
  [U.INPUT_OBJECT_TYPE_DEFINITION]: U.INPUT_OBJECT_TYPE_EXTENSION
};
function qU(e) {
  if (pr(e))
    return U.SCALAR_TYPE_EXTENSION;
  if (Ye(e))
    return U.OBJECT_TYPE_EXTENSION;
  if (Ze(e))
    return U.INTERFACE_TYPE_EXTENSION;
  if (Zt(e))
    return U.UNION_TYPE_EXTENSION;
  if (Lt(e))
    return U.ENUM_TYPE_EXTENSION;
  if (mt(e))
    return U.INPUT_OBJECT_TYPE_EXTENSION;
  En(!1, "Unexpected type: " + be(e));
}
function zU(e) {
  switch (e) {
    case U.SCALAR_TYPE_EXTENSION:
      return "scalar";
    case U.OBJECT_TYPE_EXTENSION:
      return "object";
    case U.INTERFACE_TYPE_EXTENSION:
      return "interface";
    case U.UNION_TYPE_EXTENSION:
      return "union";
    case U.ENUM_TYPE_EXTENSION:
      return "enum";
    case U.INPUT_OBJECT_TYPE_EXTENSION:
      return "input object";
    default:
      En(!1, "Unexpected kind: " + be(e));
  }
}
function OP(e) {
  return {
    // eslint-disable-next-line new-cap
    ...AP(e),
    Field: {
      // Validate on leave to allow for deeper errors to appear first.
      leave(t) {
        var n;
        const r = e.getFieldDef();
        if (!r)
          return !1;
        const o = new Set(
          // FIXME: https://github.com/graphql/graphql-js/issues/2203
          /* c8 ignore next */
          (n = t.arguments) === null || n === void 0 ? void 0 : n.map((i) => i.name.value)
        );
        for (const i of r.args)
          if (!o.has(i.name) && il(i)) {
            const s = be(i.type);
            e.reportError(
              new he(
                `Field "${r.name}" argument "${i.name}" of type "${s}" is required, but it was not provided.`,
                {
                  nodes: t
                }
              )
            );
          }
      }
    }
  };
}
function AP(e) {
  var t;
  const n = /* @__PURE__ */ Object.create(null), r = e.getSchema(), o = (t = r == null ? void 0 : r.getDirectives()) !== null && t !== void 0 ? t : sl;
  for (const l of o)
    n[l.name] = $s(
      l.args.filter(il),
      (c) => c.name
    );
  const i = e.getDocument().definitions;
  for (const l of i)
    if (l.kind === U.DIRECTIVE_DEFINITION) {
      var s;
      const c = (s = l.arguments) !== null && s !== void 0 ? s : [];
      n[l.name.value] = $s(
        c.filter(HU),
        (f) => f.name.value
      );
    }
  return {
    Directive: {
      // Validate on leave to allow for deeper errors to appear first.
      leave(l) {
        const c = l.name.value, f = n[c];
        if (f) {
          var d;
          const g = (d = l.arguments) !== null && d !== void 0 ? d : [], m = new Set(g.map((v) => v.name.value));
          for (const [v, b] of Object.entries(f))
            if (!m.has(v)) {
              const w = Df(b.type) ? be(b.type) : pt(b.type);
              e.reportError(
                new he(
                  `Directive "@${c}" argument "${v}" of type "${w}" is required, but it was not provided.`,
                  {
                    nodes: l
                  }
                )
              );
            }
        }
      }
    }
  };
}
function HU(e) {
  return e.type.kind === U.NON_NULL_TYPE && e.defaultValue == null;
}
function DP(e) {
  return {
    Field(t) {
      const n = e.getType(), r = t.selectionSet;
      if (n) {
        if (Nr(Et(n))) {
          if (r) {
            const o = t.name.value, i = be(n);
            e.reportError(
              new he(
                `Field "${o}" must not have a selection since type "${i}" has no subfields.`,
                {
                  nodes: r
                }
              )
            );
          }
        } else if (!r) {
          const o = t.name.value, i = be(n);
          e.reportError(
            new he(
              `Field "${o}" of type "${i}" must have a selection of subfields. Did you mean "${o} { ... }"?`,
              {
                nodes: t
              }
            )
          );
        }
      }
    }
  };
}
function IP(e) {
  return e.map(
    (t) => typeof t == "number" ? "[" + t.toString() + "]" : "." + t
  ).join("");
}
function bf(e, t, n) {
  return {
    prev: e,
    key: t,
    typename: n
  };
}
function Br(e) {
  const t = [];
  let n = e;
  for (; n; )
    t.push(n.key), n = n.prev;
  return t.reverse();
}
function NC(e, t, n = WU) {
  return qd(e, t, n, void 0);
}
function WU(e, t, n) {
  let r = "Invalid value " + be(t);
  throw e.length > 0 && (r += ` at "value${IP(e)}"`), n.message = r + ": " + n.message, n;
}
function qd(e, t, n, r) {
  if (He(t)) {
    if (e != null)
      return qd(e, t.ofType, n, r);
    n(
      Br(r),
      e,
      new he(
        `Expected non-nullable type "${be(t)}" not to be null.`
      )
    );
    return;
  }
  if (e == null)
    return null;
  if (vt(t)) {
    const o = t.ofType;
    return dC(e) ? Array.from(e, (i, s) => {
      const l = bf(r, s, void 0);
      return qd(i, o, n, l);
    }) : [qd(e, o, n, r)];
  }
  if (mt(t)) {
    if (!Co(e)) {
      n(
        Br(r),
        e,
        new he(`Expected type "${t.name}" to be an object.`)
      );
      return;
    }
    const o = {}, i = t.getFields();
    for (const s of Object.values(i)) {
      const l = e[s.name];
      if (l === void 0) {
        if (s.defaultValue !== void 0)
          o[s.name] = s.defaultValue;
        else if (He(s.type)) {
          const c = be(s.type);
          n(
            Br(r),
            e,
            new he(
              `Field "${s.name}" of required type "${c}" was not provided.`
            )
          );
        }
        continue;
      }
      o[s.name] = qd(
        l,
        s.type,
        n,
        bf(r, s.name, t.name)
      );
    }
    for (const s of Object.keys(e))
      if (!i[s]) {
        const l = rl(
          s,
          Object.keys(t.getFields())
        );
        n(
          Br(r),
          e,
          new he(
            `Field "${s}" is not defined by type "${t.name}".` + Ps(l)
          )
        );
      }
    return o;
  }
  if (Nr(t)) {
    let o;
    try {
      o = t.parseValue(e);
    } catch (i) {
      i instanceof he ? n(Br(r), e, i) : n(
        Br(r),
        e,
        new he(`Expected type "${t.name}". ` + i.message, {
          originalError: i
        })
      );
      return;
    }
    return o === void 0 && n(
      Br(r),
      e,
      new he(`Expected type "${t.name}".`)
    ), o;
  }
  En(!1, "Unexpected input type: " + be(t));
}
function Go(e, t, n) {
  if (e) {
    if (e.kind === U.VARIABLE) {
      const r = e.name.value;
      if (n == null || n[r] === void 0)
        return;
      const o = n[r];
      return o === null && He(t) ? void 0 : o;
    }
    if (He(t))
      return e.kind === U.NULL ? void 0 : Go(e, t.ofType, n);
    if (e.kind === U.NULL)
      return null;
    if (vt(t)) {
      const r = t.ofType;
      if (e.kind === U.LIST) {
        const i = [];
        for (const s of e.values)
          if (tA(s, n)) {
            if (He(r))
              return;
            i.push(null);
          } else {
            const l = Go(s, r, n);
            if (l === void 0)
              return;
            i.push(l);
          }
        return i;
      }
      const o = Go(e, r, n);
      return o === void 0 ? void 0 : [o];
    }
    if (mt(t)) {
      if (e.kind !== U.OBJECT)
        return;
      const r = /* @__PURE__ */ Object.create(null), o = $s(e.fields, (i) => i.name.value);
      for (const i of Object.values(t.getFields())) {
        const s = o[i.name];
        if (!s || tA(s.value, n)) {
          if (i.defaultValue !== void 0)
            r[i.name] = i.defaultValue;
          else if (He(i.type))
            return;
          continue;
        }
        const l = Go(s.value, i.type, n);
        if (l === void 0)
          return;
        r[i.name] = l;
      }
      return r;
    }
    if (Nr(t)) {
      let r;
      try {
        r = t.parseLiteral(e, n);
      } catch {
        return;
      }
      return r === void 0 ? void 0 : r;
    }
    En(!1, "Unexpected input type: " + be(t));
  }
}
function tA(e, t) {
  return e.kind === U.VARIABLE && (t == null || t[e.name.value] === void 0);
}
function LP(e, t, n, r) {
  const o = [], i = r == null ? void 0 : r.maxErrors;
  try {
    const s = GU(
      e,
      t,
      n,
      (l) => {
        if (i != null && o.length >= i)
          throw new he(
            "Too many errors processing variables, error limit reached. Execution aborted."
          );
        o.push(l);
      }
    );
    if (o.length === 0)
      return {
        coerced: s
      };
  } catch (s) {
    o.push(s);
  }
  return {
    errors: o
  };
}
function GU(e, t, n, r) {
  const o = {};
  for (const i of t) {
    const s = i.variable.name.value, l = Jn(e, i.type);
    if (!lr(l)) {
      const f = pt(i.type);
      r(
        new he(
          `Variable "$${s}" expected value of type "${f}" which cannot be used as an input type.`,
          {
            nodes: i.type
          }
        )
      );
      continue;
    }
    if (!RP(n, s)) {
      if (i.defaultValue)
        o[s] = Go(i.defaultValue, l);
      else if (He(l)) {
        const f = be(l);
        r(
          new he(
            `Variable "$${s}" of required type "${f}" was not provided.`,
            {
              nodes: i
            }
          )
        );
      }
      continue;
    }
    const c = n[s];
    if (c === null && He(l)) {
      const f = be(l);
      r(
        new he(
          `Variable "$${s}" of non-null type "${f}" must not be null.`,
          {
            nodes: i
          }
        )
      );
      continue;
    }
    o[s] = NC(
      c,
      l,
      (f, d, g) => {
        let m = `Variable "$${s}" got invalid value ` + be(d);
        f.length > 0 && (m += ` at "${s}${IP(f)}"`), r(
          new he(m + "; " + g.message, {
            nodes: i,
            originalError: g
          })
        );
      }
    );
  }
  return o;
}
function _y(e, t, n) {
  var r;
  const o = {}, i = (r = t.arguments) !== null && r !== void 0 ? r : [], s = $s(i, (l) => l.name.value);
  for (const l of e.args) {
    const c = l.name, f = l.type, d = s[c];
    if (!d) {
      if (l.defaultValue !== void 0)
        o[c] = l.defaultValue;
      else if (He(f))
        throw new he(
          `Argument "${c}" of required type "${be(f)}" was not provided.`,
          {
            nodes: t
          }
        );
      continue;
    }
    const g = d.value;
    let m = g.kind === U.NULL;
    if (g.kind === U.VARIABLE) {
      const b = g.name.value;
      if (n == null || !RP(n, b)) {
        if (l.defaultValue !== void 0)
          o[c] = l.defaultValue;
        else if (He(f))
          throw new he(
            `Argument "${c}" of required type "${be(f)}" was provided the variable "$${b}" which was not provided a runtime value.`,
            {
              nodes: g
            }
          );
        continue;
      }
      m = n[b] == null;
    }
    if (m && He(f))
      throw new he(
        `Argument "${c}" of non-null type "${be(f)}" must not be null.`,
        {
          nodes: g
        }
      );
    const v = Go(g, f, n);
    if (v === void 0)
      throw new he(
        `Argument "${c}" has invalid value ${pt(g)}.`,
        {
          nodes: g
        }
      );
    o[c] = v;
  }
  return o;
}
function js(e, t, n) {
  var r;
  const o = (r = t.directives) === null || r === void 0 ? void 0 : r.find(
    (i) => i.name.value === e.name
  );
  if (o)
    return _y(e, o, n);
}
function RP(e, t) {
  return Object.prototype.hasOwnProperty.call(e, t);
}
function OC(e, t, n, r, o) {
  const i = /* @__PURE__ */ new Map();
  return Qv(
    e,
    t,
    n,
    r,
    o,
    i,
    /* @__PURE__ */ new Set()
  ), i;
}
function QU(e, t, n, r, o) {
  const i = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Set();
  for (const l of o)
    l.selectionSet && Qv(
      e,
      t,
      n,
      r,
      l.selectionSet,
      i,
      s
    );
  return i;
}
function Qv(e, t, n, r, o, i, s) {
  for (const l of o.selections)
    switch (l.kind) {
      case U.FIELD: {
        if (!YE(n, l))
          continue;
        const c = YU(l), f = i.get(c);
        f !== void 0 ? f.push(l) : i.set(c, [l]);
        break;
      }
      case U.INLINE_FRAGMENT: {
        if (!YE(n, l) || !nA(e, l, r))
          continue;
        Qv(
          e,
          t,
          n,
          r,
          l.selectionSet,
          i,
          s
        );
        break;
      }
      case U.FRAGMENT_SPREAD: {
        const c = l.name.value;
        if (s.has(c) || !YE(n, l))
          continue;
        s.add(c);
        const f = t[c];
        if (!f || !nA(e, f, r))
          continue;
        Qv(
          e,
          t,
          n,
          r,
          f.selectionSet,
          i,
          s
        );
        break;
      }
    }
}
function YE(e, t) {
  const n = js(gy, t, e);
  if ((n == null ? void 0 : n.if) === !0)
    return !1;
  const r = js(
    my,
    t,
    e
  );
  return (r == null ? void 0 : r.if) !== !1;
}
function nA(e, t, n) {
  const r = t.typeCondition;
  if (!r)
    return !0;
  const o = Jn(e, r);
  return o === n ? !0 : qn(o) ? e.isSubType(o, n) : !1;
}
function YU(e) {
  return e.alias ? e.alias.value : e.name.value;
}
function FP(e) {
  return {
    OperationDefinition(t) {
      if (t.operation === "subscription") {
        const n = e.getSchema(), r = n.getSubscriptionType();
        if (r) {
          const o = t.name ? t.name.value : null, i = /* @__PURE__ */ Object.create(null), s = e.getDocument(), l = /* @__PURE__ */ Object.create(null);
          for (const f of s.definitions)
            f.kind === U.FRAGMENT_DEFINITION && (l[f.name.value] = f);
          const c = OC(
            n,
            l,
            i,
            r,
            t.selectionSet
          );
          if (c.size > 1) {
            const g = [...c.values()].slice(1).flat();
            e.reportError(
              new he(
                o != null ? `Subscription "${o}" must select only one top level field.` : "Anonymous Subscription must select only one top level field.",
                {
                  nodes: g
                }
              )
            );
          }
          for (const f of c.values())
            f[0].name.value.startsWith("__") && e.reportError(
              new he(
                o != null ? `Subscription "${o}" must not select an introspection top level field.` : "Anonymous Subscription must not select an introspection top level field.",
                {
                  nodes: f
                }
              )
            );
        }
      }
    }
  };
}
function AC(e, t) {
  const n = /* @__PURE__ */ new Map();
  for (const r of e) {
    const o = t(r), i = n.get(o);
    i === void 0 ? n.set(o, [r]) : i.push(r);
  }
  return n;
}
function MP(e) {
  return {
    DirectiveDefinition(r) {
      var o;
      const i = (o = r.arguments) !== null && o !== void 0 ? o : [];
      return n(`@${r.name.value}`, i);
    },
    InterfaceTypeDefinition: t,
    InterfaceTypeExtension: t,
    ObjectTypeDefinition: t,
    ObjectTypeExtension: t
  };
  function t(r) {
    var o;
    const i = r.name.value, s = (o = r.fields) !== null && o !== void 0 ? o : [];
    for (const c of s) {
      var l;
      const f = c.name.value, d = (l = c.arguments) !== null && l !== void 0 ? l : [];
      n(`${i}.${f}`, d);
    }
    return !1;
  }
  function n(r, o) {
    const i = AC(o, (s) => s.name.value);
    for (const [s, l] of i)
      l.length > 1 && e.reportError(
        new he(
          `Argument "${r}(${s}:)" can only be defined once.`,
          {
            nodes: l.map((c) => c.name)
          }
        )
      );
    return !1;
  }
}
function Ny(e) {
  return {
    Field: t,
    Directive: t
  };
  function t(n) {
    var r;
    const o = (r = n.arguments) !== null && r !== void 0 ? r : [], i = AC(o, (s) => s.name.value);
    for (const [s, l] of i)
      l.length > 1 && e.reportError(
        new he(
          `There can be only one argument named "${s}".`,
          {
            nodes: l.map((c) => c.name)
          }
        )
      );
  }
}
function DC(e) {
  const t = /* @__PURE__ */ Object.create(null), n = e.getSchema();
  return {
    DirectiveDefinition(r) {
      const o = r.name.value;
      if (n != null && n.getDirective(o)) {
        e.reportError(
          new he(
            `Directive "@${o}" already exists in the schema. It cannot be redefined.`,
            {
              nodes: r.name
            }
          )
        );
        return;
      }
      return t[o] ? e.reportError(
        new he(
          `There can be only one directive named "@${o}".`,
          {
            nodes: [t[o], r.name]
          }
        )
      ) : t[o] = r.name, !1;
    }
  };
}
function Oy(e) {
  const t = /* @__PURE__ */ Object.create(null), n = e.getSchema(), r = n ? n.getDirectives() : sl;
  for (const l of r)
    t[l.name] = !l.isRepeatable;
  const o = e.getDocument().definitions;
  for (const l of o)
    l.kind === U.DIRECTIVE_DEFINITION && (t[l.name.value] = !l.repeatable);
  const i = /* @__PURE__ */ Object.create(null), s = /* @__PURE__ */ Object.create(null);
  return {
    // Many different AST nodes may contain directives. Rather than listing
    // them all, just listen for entering any node, and check to see if it
    // defines any directives.
    enter(l) {
      if (!("directives" in l) || !l.directives)
        return;
      let c;
      if (l.kind === U.SCHEMA_DEFINITION || l.kind === U.SCHEMA_EXTENSION)
        c = i;
      else if (If(l) || Sy(l)) {
        const f = l.name.value;
        c = s[f], c === void 0 && (s[f] = c = /* @__PURE__ */ Object.create(null));
      } else
        c = /* @__PURE__ */ Object.create(null);
      for (const f of l.directives) {
        const d = f.name.value;
        t[d] && (c[d] ? e.reportError(
          new he(
            `The directive "@${d}" can only be used once at this location.`,
            {
              nodes: [c[d], f]
            }
          )
        ) : c[d] = f);
      }
    }
  };
}
function IC(e) {
  const t = e.getSchema(), n = t ? t.getTypeMap() : /* @__PURE__ */ Object.create(null), r = /* @__PURE__ */ Object.create(null);
  return {
    EnumTypeDefinition: o,
    EnumTypeExtension: o
  };
  function o(i) {
    var s;
    const l = i.name.value;
    r[l] || (r[l] = /* @__PURE__ */ Object.create(null));
    const c = (s = i.values) !== null && s !== void 0 ? s : [], f = r[l];
    for (const d of c) {
      const g = d.name.value, m = n[l];
      Lt(m) && m.getValue(g) ? e.reportError(
        new he(
          `Enum value "${l}.${g}" already exists in the schema. It cannot also be defined in this type extension.`,
          {
            nodes: d.name
          }
        )
      ) : f[g] ? e.reportError(
        new he(
          `Enum value "${l}.${g}" can only be defined once.`,
          {
            nodes: [f[g], d.name]
          }
        )
      ) : f[g] = d.name;
    }
    return !1;
  }
}
function LC(e) {
  const t = e.getSchema(), n = t ? t.getTypeMap() : /* @__PURE__ */ Object.create(null), r = /* @__PURE__ */ Object.create(null);
  return {
    InputObjectTypeDefinition: o,
    InputObjectTypeExtension: o,
    InterfaceTypeDefinition: o,
    InterfaceTypeExtension: o,
    ObjectTypeDefinition: o,
    ObjectTypeExtension: o
  };
  function o(i) {
    var s;
    const l = i.name.value;
    r[l] || (r[l] = /* @__PURE__ */ Object.create(null));
    const c = (s = i.fields) !== null && s !== void 0 ? s : [], f = r[l];
    for (const d of c) {
      const g = d.name.value;
      KU(n[l], g) ? e.reportError(
        new he(
          `Field "${l}.${g}" already exists in the schema. It cannot also be defined in this type extension.`,
          {
            nodes: d.name
          }
        )
      ) : f[g] ? e.reportError(
        new he(
          `Field "${l}.${g}" can only be defined once.`,
          {
            nodes: [f[g], d.name]
          }
        )
      ) : f[g] = d.name;
    }
    return !1;
  }
}
function KU(e, t) {
  return Ye(e) || Ze(e) || mt(e) ? e.getFields()[t] != null : !1;
}
function PP(e) {
  const t = /* @__PURE__ */ Object.create(null);
  return {
    OperationDefinition: () => !1,
    FragmentDefinition(n) {
      const r = n.name.value;
      return t[r] ? e.reportError(
        new he(
          `There can be only one fragment named "${r}".`,
          {
            nodes: [t[r], n.name]
          }
        )
      ) : t[r] = n.name, !1;
    }
  };
}
function Ay(e) {
  const t = [];
  let n = /* @__PURE__ */ Object.create(null);
  return {
    ObjectValue: {
      enter() {
        t.push(n), n = /* @__PURE__ */ Object.create(null);
      },
      leave() {
        const r = t.pop();
        r || En(!1), n = r;
      }
    },
    ObjectField(r) {
      const o = r.name.value;
      n[o] ? e.reportError(
        new he(
          `There can be only one input field named "${o}".`,
          {
            nodes: [n[o], r.name]
          }
        )
      ) : n[o] = r.name;
    }
  };
}
function $P(e) {
  const t = /* @__PURE__ */ Object.create(null);
  return {
    OperationDefinition(n) {
      const r = n.name;
      return r && (t[r.value] ? e.reportError(
        new he(
          `There can be only one operation named "${r.value}".`,
          {
            nodes: [
              t[r.value],
              r
            ]
          }
        )
      ) : t[r.value] = r), !1;
    },
    FragmentDefinition: () => !1
  };
}
function RC(e) {
  const t = e.getSchema(), n = /* @__PURE__ */ Object.create(null), r = t ? {
    query: t.getQueryType(),
    mutation: t.getMutationType(),
    subscription: t.getSubscriptionType()
  } : {};
  return {
    SchemaDefinition: o,
    SchemaExtension: o
  };
  function o(i) {
    var s;
    const l = (s = i.operationTypes) !== null && s !== void 0 ? s : [];
    for (const c of l) {
      const f = c.operation, d = n[f];
      r[f] ? e.reportError(
        new he(
          `Type for ${f} already defined in the schema. It cannot be redefined.`,
          {
            nodes: c
          }
        )
      ) : d ? e.reportError(
        new he(
          `There can be only one ${f} type in schema.`,
          {
            nodes: [d, c]
          }
        )
      ) : n[f] = c;
    }
    return !1;
  }
}
function FC(e) {
  const t = /* @__PURE__ */ Object.create(null), n = e.getSchema();
  return {
    ScalarTypeDefinition: r,
    ObjectTypeDefinition: r,
    InterfaceTypeDefinition: r,
    UnionTypeDefinition: r,
    EnumTypeDefinition: r,
    InputObjectTypeDefinition: r
  };
  function r(o) {
    const i = o.name.value;
    if (n != null && n.getType(i)) {
      e.reportError(
        new he(
          `Type "${i}" already exists in the schema. It cannot also be defined in this type definition.`,
          {
            nodes: o.name
          }
        )
      );
      return;
    }
    return t[i] ? e.reportError(
      new he(`There can be only one type named "${i}".`, {
        nodes: [t[i], o.name]
      })
    ) : t[i] = o.name, !1;
  }
}
function VP(e) {
  return {
    OperationDefinition(t) {
      var n;
      const r = (n = t.variableDefinitions) !== null && n !== void 0 ? n : [], o = AC(
        r,
        (i) => i.variable.name.value
      );
      for (const [i, s] of o)
        s.length > 1 && e.reportError(
          new he(
            `There can be only one variable named "$${i}".`,
            {
              nodes: s.map((l) => l.variable.name)
            }
          )
        );
    }
  };
}
function jP(e) {
  return {
    ListValue(t) {
      const n = ol(e.getParentInputType());
      if (!vt(n))
        return $l(e, t), !1;
    },
    ObjectValue(t) {
      const n = Et(e.getInputType());
      if (!mt(n))
        return $l(e, t), !1;
      const r = $s(t.fields, (o) => o.name.value);
      for (const o of Object.values(n.getFields()))
        if (!r[o.name] && py(o)) {
          const s = be(o.type);
          e.reportError(
            new he(
              `Field "${n.name}.${o.name}" of required type "${s}" was not provided.`,
              {
                nodes: t
              }
            )
          );
        }
    },
    ObjectField(t) {
      const n = Et(e.getParentInputType());
      if (!e.getInputType() && mt(n)) {
        const o = rl(
          t.name.value,
          Object.keys(n.getFields())
        );
        e.reportError(
          new he(
            `Field "${t.name.value}" is not defined by type "${n.name}".` + Ps(o),
            {
              nodes: t
            }
          )
        );
      }
    },
    NullValue(t) {
      const n = e.getInputType();
      He(n) && e.reportError(
        new he(
          `Expected value of type "${be(n)}", found ${pt(t)}.`,
          {
            nodes: t
          }
        )
      );
    },
    EnumValue: (t) => $l(e, t),
    IntValue: (t) => $l(e, t),
    FloatValue: (t) => $l(e, t),
    StringValue: (t) => $l(e, t),
    BooleanValue: (t) => $l(e, t)
  };
}
function $l(e, t) {
  const n = e.getInputType();
  if (!n)
    return;
  const r = Et(n);
  if (!Nr(r)) {
    const o = be(n);
    e.reportError(
      new he(
        `Expected value of type "${o}", found ${pt(t)}.`,
        {
          nodes: t
        }
      )
    );
    return;
  }
  try {
    if (r.parseLiteral(
      t,
      void 0
      /* variables */
    ) === void 0) {
      const i = be(n);
      e.reportError(
        new he(
          `Expected value of type "${i}", found ${pt(t)}.`,
          {
            nodes: t
          }
        )
      );
    }
  } catch (o) {
    const i = be(n);
    o instanceof he ? e.reportError(o) : e.reportError(
      new he(
        `Expected value of type "${i}", found ${pt(t)}; ` + o.message,
        {
          nodes: t,
          originalError: o
        }
      )
    );
  }
}
function UP(e) {
  return {
    VariableDefinition(t) {
      const n = Jn(e.getSchema(), t.type);
      if (n !== void 0 && !lr(n)) {
        const r = t.variable.name.value, o = pt(t.type);
        e.reportError(
          new he(
            `Variable "$${r}" cannot be non-input type "${o}".`,
            {
              nodes: t.type
            }
          )
        );
      }
    }
  };
}
function BP(e) {
  let t = /* @__PURE__ */ Object.create(null);
  return {
    OperationDefinition: {
      enter() {
        t = /* @__PURE__ */ Object.create(null);
      },
      leave(n) {
        const r = e.getRecursiveVariableUsages(n);
        for (const { node: o, type: i, defaultValue: s } of r) {
          const l = o.name.value, c = t[l];
          if (c && i) {
            const f = e.getSchema(), d = Jn(f, c.type);
            if (d && !JU(
              f,
              d,
              c.defaultValue,
              i,
              s
            )) {
              const g = be(d), m = be(i);
              e.reportError(
                new he(
                  `Variable "$${l}" of type "${g}" used in position expecting type "${m}".`,
                  {
                    nodes: [c, o]
                  }
                )
              );
            }
          }
        }
      }
    },
    VariableDefinition(n) {
      t[n.variable.name.value] = n;
    }
  };
}
function JU(e, t, n, r, o) {
  if (He(r) && !He(t)) {
    if (!(n != null && n.kind !== U.NULL) && !(o !== void 0))
      return !1;
    const l = r.ofType;
    return ic(e, t, l);
  }
  return ic(e, t, r);
}
const MC = Object.freeze([
  xC,
  $P,
  EP,
  FP,
  Cy,
  vP,
  UP,
  DP,
  gP,
  PP,
  SC,
  CC,
  NP,
  wP,
  VP,
  xP,
  SP,
  Ty,
  Oy,
  yP,
  Ny,
  jP,
  OP,
  BP,
  CP,
  Ay
]), XU = Object.freeze([
  TC,
  RC,
  FC,
  IC,
  LC,
  MP,
  DC,
  Cy,
  Ty,
  Oy,
  _C,
  bP,
  Ny,
  Ay,
  AP
]);
class qP {
  constructor(t, n) {
    this._ast = t, this._fragments = void 0, this._fragmentSpreads = /* @__PURE__ */ new Map(), this._recursivelyReferencedFragments = /* @__PURE__ */ new Map(), this._onError = n;
  }
  get [Symbol.toStringTag]() {
    return "ASTValidationContext";
  }
  reportError(t) {
    this._onError(t);
  }
  getDocument() {
    return this._ast;
  }
  getFragment(t) {
    let n;
    if (this._fragments)
      n = this._fragments;
    else {
      n = /* @__PURE__ */ Object.create(null);
      for (const r of this.getDocument().definitions)
        r.kind === U.FRAGMENT_DEFINITION && (n[r.name.value] = r);
      this._fragments = n;
    }
    return n[t];
  }
  getFragmentSpreads(t) {
    let n = this._fragmentSpreads.get(t);
    if (!n) {
      n = [];
      const r = [t];
      let o;
      for (; o = r.pop(); )
        for (const i of o.selections)
          i.kind === U.FRAGMENT_SPREAD ? n.push(i) : i.selectionSet && r.push(i.selectionSet);
      this._fragmentSpreads.set(t, n);
    }
    return n;
  }
  getRecursivelyReferencedFragments(t) {
    let n = this._recursivelyReferencedFragments.get(t);
    if (!n) {
      n = [];
      const r = /* @__PURE__ */ Object.create(null), o = [t.selectionSet];
      let i;
      for (; i = o.pop(); )
        for (const s of this.getFragmentSpreads(i)) {
          const l = s.name.value;
          if (r[l] !== !0) {
            r[l] = !0;
            const c = this.getFragment(l);
            c && (n.push(c), o.push(c.selectionSet));
          }
        }
      this._recursivelyReferencedFragments.set(t, n);
    }
    return n;
  }
}
class ZU extends qP {
  constructor(t, n, r) {
    super(t, r), this._schema = n;
  }
  get [Symbol.toStringTag]() {
    return "SDLValidationContext";
  }
  getSchema() {
    return this._schema;
  }
}
class zP extends qP {
  constructor(t, n, r, o) {
    super(n, o), this._schema = t, this._typeInfo = r, this._variableUsages = /* @__PURE__ */ new Map(), this._recursiveVariableUsages = /* @__PURE__ */ new Map();
  }
  get [Symbol.toStringTag]() {
    return "ValidationContext";
  }
  getSchema() {
    return this._schema;
  }
  getVariableUsages(t) {
    let n = this._variableUsages.get(t);
    if (!n) {
      const r = [], o = new Vs(this._schema);
      pn(
        t,
        Ic(o, {
          VariableDefinition: () => !1,
          Variable(i) {
            r.push({
              node: i,
              type: o.getInputType(),
              defaultValue: o.getDefaultValue()
            });
          }
        })
      ), n = r, this._variableUsages.set(t, n);
    }
    return n;
  }
  getRecursiveVariableUsages(t) {
    let n = this._recursiveVariableUsages.get(t);
    if (!n) {
      n = this.getVariableUsages(t);
      for (const r of this.getRecursivelyReferencedFragments(t))
        n = n.concat(this.getVariableUsages(r));
      this._recursiveVariableUsages.set(t, n);
    }
    return n;
  }
  getType() {
    return this._typeInfo.getType();
  }
  getParentType() {
    return this._typeInfo.getParentType();
  }
  getInputType() {
    return this._typeInfo.getInputType();
  }
  getParentInputType() {
    return this._typeInfo.getParentInputType();
  }
  getFieldDef() {
    return this._typeInfo.getFieldDef();
  }
  getDirective() {
    return this._typeInfo.getDirective();
  }
  getArgument() {
    return this._typeInfo.getArgument();
  }
  getEnumValue() {
    return this._typeInfo.getEnumValue();
  }
}
function kh(e, t, n = MC, r, o = new Vs(e)) {
  var i;
  const s = (i = r == null ? void 0 : r.maxErrors) !== null && i !== void 0 ? i : 100;
  t || lt(!1, "Must provide document."), wy(e);
  const l = Object.freeze({}), c = [], f = new zP(
    e,
    t,
    o,
    (g) => {
      if (c.length >= s)
        throw c.push(
          new he(
            "Too many validation errors, error limit reached. Validation aborted."
          )
        ), l;
      c.push(g);
    }
  ), d = sC(n.map((g) => g(f)));
  try {
    pn(t, Ic(o, d));
  } catch (g) {
    if (g !== l)
      throw g;
  }
  return c;
}
function HP(e, t, n = XU) {
  const r = [], o = new ZU(
    e,
    t,
    (s) => {
      r.push(s);
    }
  ), i = n.map((s) => s(o));
  return pn(e, sC(i)), r;
}
function eB(e) {
  const t = HP(e);
  if (t.length !== 0)
    throw new Error(t.map((n) => n.message).join(`

`));
}
function tB(e, t) {
  const n = HP(e, t);
  if (n.length !== 0)
    throw new Error(n.map((r) => r.message).join(`

`));
}
function nB(e) {
  let t;
  return function(r, o, i) {
    t === void 0 && (t = /* @__PURE__ */ new WeakMap());
    let s = t.get(r);
    s === void 0 && (s = /* @__PURE__ */ new WeakMap(), t.set(r, s));
    let l = s.get(o);
    l === void 0 && (l = /* @__PURE__ */ new WeakMap(), s.set(o, l));
    let c = l.get(i);
    return c === void 0 && (c = e(r, o, i), l.set(i, c)), c;
  };
}
function rA(e) {
  return Promise.all(Object.values(e)).then((t) => {
    const n = /* @__PURE__ */ Object.create(null);
    for (const [r, o] of Object.keys(e).entries())
      n[o] = t[r];
    return n;
  });
}
function rB(e, t, n) {
  let r = n;
  for (const o of e)
    r = To(r) ? r.then((i) => t(i, o)) : t(r, o);
  return r;
}
function oB(e) {
  return e instanceof Error ? e : new iB(e);
}
class iB extends Error {
  constructor(t) {
    super("Unexpected error value: " + be(t)), this.name = "NonErrorThrown", this.thrownValue = t;
  }
}
function wn(e, t, n) {
  var r;
  const o = oB(e);
  return sB(o) ? o : new he(o.message, {
    nodes: (r = o.nodes) !== null && r !== void 0 ? r : t,
    source: o.source,
    positions: o.positions,
    path: n,
    originalError: o
  });
}
function sB(e) {
  return Array.isArray(e.path);
}
const aB = nB(
  (e, t, n) => QU(
    e.schema,
    e.fragments,
    e.variableValues,
    t,
    n
  )
);
function Dy(e) {
  arguments.length < 2 || lt(
    !1,
    "graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead."
  );
  const { schema: t, document: n, variableValues: r, rootValue: o } = e;
  GP(t, n, r);
  const i = QP(e);
  if (!("schema" in i))
    return {
      errors: i
    };
  try {
    const { operation: s } = i, l = lB(i, s, o);
    return To(l) ? l.then(
      (c) => lg(c, i.errors),
      (c) => (i.errors.push(c), lg(null, i.errors))
    ) : lg(l, i.errors);
  } catch (s) {
    return i.errors.push(s), lg(null, i.errors);
  }
}
function WP(e) {
  const t = Dy(e);
  if (To(t))
    throw new Error("GraphQL execution failed to complete synchronously.");
  return t;
}
function lg(e, t) {
  return t.length === 0 ? {
    data: e
  } : {
    errors: t,
    data: e
  };
}
function GP(e, t, n) {
  t || lt(!1, "Must provide document."), wy(e), n == null || Co(n) || lt(
    !1,
    "Variables must be provided as an Object where each property is a variable value. Perhaps look to see if an unparsed JSON string was provided."
  );
}
function QP(e) {
  var t, n;
  const {
    schema: r,
    document: o,
    rootValue: i,
    contextValue: s,
    variableValues: l,
    operationName: c,
    fieldResolver: f,
    typeResolver: d,
    subscribeFieldResolver: g
  } = e;
  let m;
  const v = /* @__PURE__ */ Object.create(null);
  for (const _ of o.definitions)
    switch (_.kind) {
      case U.OPERATION_DEFINITION:
        if (c == null) {
          if (m !== void 0)
            return [
              new he(
                "Must provide operation name if query contains multiple operations."
              )
            ];
          m = _;
        } else
          ((t = _.name) === null || t === void 0 ? void 0 : t.value) === c && (m = _);
        break;
      case U.FRAGMENT_DEFINITION:
        v[_.name.value] = _;
        break;
    }
  if (!m)
    return c != null ? [new he(`Unknown operation named "${c}".`)] : [new he("Must provide an operation.")];
  const b = (n = m.variableDefinitions) !== null && n !== void 0 ? n : [], w = LP(
    r,
    b,
    l ?? {},
    {
      maxErrors: 50
    }
  );
  return w.errors ? w.errors : {
    schema: r,
    fragments: v,
    rootValue: i,
    contextValue: s,
    operation: m,
    variableValues: w.coerced,
    fieldResolver: f ?? Jv,
    typeResolver: d ?? JP,
    subscribeFieldResolver: g ?? Jv,
    errors: []
  };
}
function lB(e, t, n) {
  const r = e.schema.getRootType(t.operation);
  if (r == null)
    throw new he(
      `Schema is not configured to execute ${t.operation} operation.`,
      {
        nodes: t
      }
    );
  const o = OC(
    e.schema,
    e.fragments,
    e.variableValues,
    r,
    t.selectionSet
  ), i = void 0;
  switch (t.operation) {
    case Bn.QUERY:
      return Yv(e, r, n, i, o);
    case Bn.MUTATION:
      return cB(
        e,
        r,
        n,
        i,
        o
      );
    case Bn.SUBSCRIPTION:
      return Yv(e, r, n, i, o);
  }
}
function cB(e, t, n, r, o) {
  return rB(
    o.entries(),
    (i, [s, l]) => {
      const c = bf(r, s, t.name), f = YP(
        e,
        t,
        n,
        l,
        c
      );
      return f === void 0 ? i : To(f) ? f.then((d) => (i[s] = d, i)) : (i[s] = f, i);
    },
    /* @__PURE__ */ Object.create(null)
  );
}
function Yv(e, t, n, r, o) {
  const i = /* @__PURE__ */ Object.create(null);
  let s = !1;
  try {
    for (const [l, c] of o.entries()) {
      const f = bf(r, l, t.name), d = YP(
        e,
        t,
        n,
        c,
        f
      );
      d !== void 0 && (i[l] = d, To(d) && (s = !0));
    }
  } catch (l) {
    if (s)
      return rA(i).finally(() => {
        throw l;
      });
    throw l;
  }
  return s ? rA(i) : i;
}
function YP(e, t, n, r, o) {
  var i;
  const s = XP(e.schema, t, r[0]);
  if (!s)
    return;
  const l = s.type, c = (i = s.resolve) !== null && i !== void 0 ? i : e.fieldResolver, f = KP(
    e,
    s,
    r,
    t,
    o
  );
  try {
    const d = _y(
      s,
      r[0],
      e.variableValues
    ), g = e.contextValue, m = c(n, d, g, f);
    let v;
    return To(m) ? v = m.then(
      (b) => Vp(e, l, r, f, o, b)
    ) : v = Vp(
      e,
      l,
      r,
      f,
      o,
      m
    ), To(v) ? v.then(void 0, (b) => {
      const w = wn(b, r, Br(o));
      return Kv(w, l, e);
    }) : v;
  } catch (d) {
    const g = wn(d, r, Br(o));
    return Kv(g, l, e);
  }
}
function KP(e, t, n, r, o) {
  return {
    fieldName: t.name,
    fieldNodes: n,
    returnType: t.type,
    parentType: r,
    path: o,
    schema: e.schema,
    fragments: e.fragments,
    rootValue: e.rootValue,
    operation: e.operation,
    variableValues: e.variableValues
  };
}
function Kv(e, t, n) {
  if (He(t))
    throw e;
  return n.errors.push(e), null;
}
function Vp(e, t, n, r, o, i) {
  if (i instanceof Error)
    throw i;
  if (He(t)) {
    const s = Vp(
      e,
      t.ofType,
      n,
      r,
      o,
      i
    );
    if (s === null)
      throw new Error(
        `Cannot return null for non-nullable field ${r.parentType.name}.${r.fieldName}.`
      );
    return s;
  }
  if (i == null)
    return null;
  if (vt(t))
    return uB(
      e,
      t,
      n,
      r,
      o,
      i
    );
  if (Nr(t))
    return fB(t, i);
  if (qn(t))
    return dB(
      e,
      t,
      n,
      r,
      o,
      i
    );
  if (Ye(t))
    return Hx(
      e,
      t,
      n,
      r,
      o,
      i
    );
  En(
    !1,
    "Cannot complete value of unexpected output type: " + be(t)
  );
}
function uB(e, t, n, r, o, i) {
  if (!dC(i))
    throw new he(
      `Expected Iterable, but did not find one for field "${r.parentType.name}.${r.fieldName}".`
    );
  const s = t.ofType;
  let l = !1;
  const c = Array.from(i, (f, d) => {
    const g = bf(o, d, void 0);
    try {
      let m;
      return To(f) ? m = f.then(
        (v) => Vp(
          e,
          s,
          n,
          r,
          g,
          v
        )
      ) : m = Vp(
        e,
        s,
        n,
        r,
        g,
        f
      ), To(m) ? (l = !0, m.then(void 0, (v) => {
        const b = wn(
          v,
          n,
          Br(g)
        );
        return Kv(b, s, e);
      })) : m;
    } catch (m) {
      const v = wn(m, n, Br(g));
      return Kv(v, s, e);
    }
  });
  return l ? Promise.all(c) : c;
}
function fB(e, t) {
  const n = e.serialize(t);
  if (n == null)
    throw new Error(
      `Expected \`${be(e)}.serialize(${be(t)})\` to return non-nullable value, returned: ${be(n)}`
    );
  return n;
}
function dB(e, t, n, r, o, i) {
  var s;
  const l = (s = t.resolveType) !== null && s !== void 0 ? s : e.typeResolver, c = e.contextValue, f = l(i, c, r, t);
  return To(f) ? f.then(
    (d) => Hx(
      e,
      oA(
        d,
        e,
        t,
        n,
        r,
        i
      ),
      n,
      r,
      o,
      i
    )
  ) : Hx(
    e,
    oA(
      f,
      e,
      t,
      n,
      r,
      i
    ),
    n,
    r,
    o,
    i
  );
}
function oA(e, t, n, r, o, i) {
  if (e == null)
    throw new he(
      `Abstract type "${n.name}" must resolve to an Object type at runtime for field "${o.parentType.name}.${o.fieldName}". Either the "${n.name}" type should provide a "resolveType" function or each possible type should provide an "isTypeOf" function.`,
      r
    );
  if (Ye(e))
    throw new he(
      "Support for returning GraphQLObjectType from resolveType was removed in graphql-js@16.0.0 please return type name instead."
    );
  if (typeof e != "string")
    throw new he(
      `Abstract type "${n.name}" must resolve to an Object type at runtime for field "${o.parentType.name}.${o.fieldName}" with value ${be(i)}, received "${be(e)}".`
    );
  const s = t.schema.getType(e);
  if (s == null)
    throw new he(
      `Abstract type "${n.name}" was resolved to a type "${e}" that does not exist inside the schema.`,
      {
        nodes: r
      }
    );
  if (!Ye(s))
    throw new he(
      `Abstract type "${n.name}" was resolved to a non-object type "${e}".`,
      {
        nodes: r
      }
    );
  if (!t.schema.isSubType(n, s))
    throw new he(
      `Runtime Object type "${s.name}" is not a possible type for "${n.name}".`,
      {
        nodes: r
      }
    );
  return s;
}
function Hx(e, t, n, r, o, i) {
  const s = aB(e, t, n);
  if (t.isTypeOf) {
    const l = t.isTypeOf(i, e.contextValue, r);
    if (To(l))
      return l.then((c) => {
        if (!c)
          throw iA(t, i, n);
        return Yv(
          e,
          t,
          i,
          o,
          s
        );
      });
    if (!l)
      throw iA(t, i, n);
  }
  return Yv(e, t, i, o, s);
}
function iA(e, t, n) {
  return new he(
    `Expected value of type "${e.name}" but got: ${be(t)}.`,
    {
      nodes: n
    }
  );
}
const JP = function(e, t, n, r) {
  if (Co(e) && typeof e.__typename == "string")
    return e.__typename;
  const o = n.schema.getPossibleTypes(r), i = [];
  for (let s = 0; s < o.length; s++) {
    const l = o[s];
    if (l.isTypeOf) {
      const c = l.isTypeOf(e, t, n);
      if (To(c))
        i[s] = c;
      else if (c)
        return l.name;
    }
  }
  if (i.length)
    return Promise.all(i).then((s) => {
      for (let l = 0; l < s.length; l++)
        if (s[l])
          return o[l].name;
    });
}, Jv = function(e, t, n, r) {
  if (Co(e) || typeof e == "function") {
    const o = e[r.fieldName];
    return typeof o == "function" ? e[r.fieldName](t, n, r) : o;
  }
};
function XP(e, t, n) {
  const r = n.name.value;
  return r === ei.name && e.getQueryType() === t ? ei : r === ti.name && e.getQueryType() === t ? ti : r === _o.name ? _o : t.getFields()[r];
}
function pB(e) {
  return new Promise((t) => t(ZP(e)));
}
function hB(e) {
  const t = ZP(e);
  if (To(t))
    throw new Error("GraphQL execution failed to complete synchronously.");
  return t;
}
function ZP(e) {
  arguments.length < 2 || lt(
    !1,
    "graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead."
  );
  const {
    schema: t,
    source: n,
    rootValue: r,
    contextValue: o,
    variableValues: i,
    operationName: s,
    fieldResolver: l,
    typeResolver: c
  } = e, f = Ey(t);
  if (f.length > 0)
    return {
      errors: f
    };
  let d;
  try {
    d = fr(n);
  } catch (m) {
    return {
      errors: [m]
    };
  }
  const g = kh(t, d);
  return g.length > 0 ? {
    errors: g
  } : Dy({
    schema: t,
    document: d,
    rootValue: r,
    contextValue: o,
    variableValues: i,
    operationName: s,
    fieldResolver: l,
    typeResolver: c
  });
}
function e3(e) {
  return typeof (e == null ? void 0 : e[Symbol.asyncIterator]) == "function";
}
function mB(e, t) {
  const n = e[Symbol.asyncIterator]();
  async function r(o) {
    if (o.done)
      return o;
    try {
      return {
        value: await t(o.value),
        done: !1
      };
    } catch (i) {
      if (typeof n.return == "function")
        try {
          await n.return();
        } catch {
        }
      throw i;
    }
  }
  return {
    async next() {
      return r(await n.next());
    },
    async return() {
      return typeof n.return == "function" ? r(await n.return()) : {
        value: void 0,
        done: !0
      };
    },
    async throw(o) {
      if (typeof n.throw == "function")
        return r(await n.throw(o));
      throw o;
    },
    [Symbol.asyncIterator]() {
      return this;
    }
  };
}
async function gB(e) {
  arguments.length < 2 || lt(
    !1,
    "graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead."
  );
  const t = await t3(e);
  return e3(t) ? mB(t, (r) => Dy({ ...e, rootValue: r })) : t;
}
function vB(e) {
  const t = e[0];
  return t && "document" in t ? t : {
    schema: t,
    // FIXME: when underlying TS bug fixed, see https://github.com/microsoft/TypeScript/issues/31613
    document: e[1],
    rootValue: e[2],
    contextValue: e[3],
    variableValues: e[4],
    operationName: e[5],
    subscribeFieldResolver: e[6]
  };
}
async function t3(...e) {
  const t = vB(e), { schema: n, document: r, variableValues: o } = t;
  GP(n, r, o);
  const i = QP(t);
  if (!("schema" in i))
    return {
      errors: i
    };
  try {
    const s = await yB(i);
    if (!e3(s))
      throw new Error(
        `Subscription field must return Async Iterable. Received: ${be(s)}.`
      );
    return s;
  } catch (s) {
    if (s instanceof he)
      return {
        errors: [s]
      };
    throw s;
  }
}
async function yB(e) {
  const { schema: t, fragments: n, operation: r, variableValues: o, rootValue: i } = e, s = t.getSubscriptionType();
  if (s == null)
    throw new he(
      "Schema is not configured to execute subscription operation.",
      {
        nodes: r
      }
    );
  const l = OC(
    t,
    n,
    o,
    s,
    r.selectionSet
  ), [c, f] = [...l.entries()][0], d = XP(t, s, f[0]);
  if (!d) {
    const b = f[0].name.value;
    throw new he(
      `The subscription field "${b}" is not defined.`,
      {
        nodes: f
      }
    );
  }
  const g = bf(void 0, c, s.name), m = KP(
    e,
    d,
    f,
    s,
    g
  );
  try {
    var v;
    const b = _y(d, f[0], o), w = e.contextValue, S = await ((v = d.subscribe) !== null && v !== void 0 ? v : e.subscribeFieldResolver)(i, b, w, m);
    if (S instanceof Error)
      throw S;
    return S;
  } catch (b) {
    throw wn(b, f, Br(g));
  }
}
function n3(e) {
  return {
    Field(t) {
      const n = e.getFieldDef(), r = n == null ? void 0 : n.deprecationReason;
      if (n && r != null) {
        const o = e.getParentType();
        o != null || En(!1), e.reportError(
          new he(
            `The field ${o.name}.${n.name} is deprecated. ${r}`,
            {
              nodes: t
            }
          )
        );
      }
    },
    Argument(t) {
      const n = e.getArgument(), r = n == null ? void 0 : n.deprecationReason;
      if (n && r != null) {
        const o = e.getDirective();
        if (o != null)
          e.reportError(
            new he(
              `Directive "@${o.name}" argument "${n.name}" is deprecated. ${r}`,
              {
                nodes: t
              }
            )
          );
        else {
          const i = e.getParentType(), s = e.getFieldDef();
          i != null && s != null || En(!1), e.reportError(
            new he(
              `Field "${i.name}.${s.name}" argument "${n.name}" is deprecated. ${r}`,
              {
                nodes: t
              }
            )
          );
        }
      }
    },
    ObjectField(t) {
      const n = Et(e.getParentInputType());
      if (mt(n)) {
        const r = n.getFields()[t.name.value], o = r == null ? void 0 : r.deprecationReason;
        o != null && e.reportError(
          new he(
            `The input field ${n.name}.${r.name} is deprecated. ${o}`,
            {
              nodes: t
            }
          )
        );
      }
    },
    EnumValue(t) {
      const n = e.getEnumValue(), r = n == null ? void 0 : n.deprecationReason;
      if (n && r != null) {
        const o = Et(e.getInputType());
        o != null || En(!1), e.reportError(
          new he(
            `The enum value "${o.name}.${n.name}" is deprecated. ${r}`,
            {
              nodes: t
            }
          )
        );
      }
    }
  };
}
function bB(e) {
  return {
    Field(t) {
      const n = Et(e.getType());
      n && Ac(n) && e.reportError(
        new he(
          `GraphQL introspection has been disabled, but the requested query contained the field "${t.name.value}".`,
          {
            nodes: t
          }
        )
      );
    }
  };
}
function Iy(e) {
  const t = {
    descriptions: !0,
    specifiedByUrl: !1,
    directiveIsRepeatable: !1,
    schemaDescription: !1,
    inputValueDeprecation: !1,
    ...e
  }, n = t.descriptions ? "description" : "", r = t.specifiedByUrl ? "specifiedByURL" : "", o = t.directiveIsRepeatable ? "isRepeatable" : "", i = t.schemaDescription ? n : "";
  function s(l) {
    return t.inputValueDeprecation ? l : "";
  }
  return `
    query IntrospectionQuery {
      __schema {
        ${i}
        queryType { name }
        mutationType { name }
        subscriptionType { name }
        types {
          ...FullType
        }
        directives {
          name
          ${n}
          ${o}
          locations
          args${s("(includeDeprecated: true)")} {
            ...InputValue
          }
        }
      }
    }

    fragment FullType on __Type {
      kind
      name
      ${n}
      ${r}
      fields(includeDeprecated: true) {
        name
        ${n}
        args${s("(includeDeprecated: true)")} {
          ...InputValue
        }
        type {
          ...TypeRef
        }
        isDeprecated
        deprecationReason
      }
      inputFields${s("(includeDeprecated: true)")} {
        ...InputValue
      }
      interfaces {
        ...TypeRef
      }
      enumValues(includeDeprecated: true) {
        name
        ${n}
        isDeprecated
        deprecationReason
      }
      possibleTypes {
        ...TypeRef
      }
    }

    fragment InputValue on __InputValue {
      name
      ${n}
      type { ...TypeRef }
      defaultValue
      ${s("isDeprecated")}
      ${s("deprecationReason")}
    }

    fragment TypeRef on __Type {
      kind
      name
      ofType {
        kind
        name
        ofType {
          kind
          name
          ofType {
            kind
            name
            ofType {
              kind
              name
              ofType {
                kind
                name
                ofType {
                  kind
                  name
                  ofType {
                    kind
                    name
                    ofType {
                      kind
                      name
                      ofType {
                        kind
                        name
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  `;
}
function PC(e, t) {
  let n = null;
  for (const o of e.definitions)
    if (o.kind === U.OPERATION_DEFINITION) {
      var r;
      if (t == null) {
        if (n)
          return null;
        n = o;
      } else if (((r = o.name) === null || r === void 0 ? void 0 : r.value) === t)
        return o;
    }
  return n;
}
function EB(e, t) {
  if (t.operation === "query") {
    const n = e.getQueryType();
    if (!n)
      throw new he(
        "Schema does not define the required query root type.",
        {
          nodes: t
        }
      );
    return n;
  }
  if (t.operation === "mutation") {
    const n = e.getMutationType();
    if (!n)
      throw new he("Schema is not configured for mutations.", {
        nodes: t
      });
    return n;
  }
  if (t.operation === "subscription") {
    const n = e.getSubscriptionType();
    if (!n)
      throw new he("Schema is not configured for subscriptions.", {
        nodes: t
      });
    return n;
  }
  throw new he(
    "Can only have query, mutation and subscription operations.",
    {
      nodes: t
    }
  );
}
function wB(e, t) {
  const n = {
    specifiedByUrl: !0,
    directiveIsRepeatable: !0,
    schemaDescription: !0,
    inputValueDeprecation: !0,
    ...t
  }, r = fr(Iy(n)), o = WP({
    schema: e,
    document: r
  });
  return !o.errors && o.data || En(!1), o.data;
}
function $C(e, t) {
  Co(e) && Co(e.__schema) || lt(
    !1,
    `Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: ${be(
      e
    )}.`
  );
  const n = e.__schema, r = Da(
    n.types,
    (F) => F.name,
    (F) => m(F)
  );
  for (const F of [...wh, ...Ch])
    r[F.name] && (r[F.name] = F);
  const o = n.queryType ? d(n.queryType) : null, i = n.mutationType ? d(n.mutationType) : null, s = n.subscriptionType ? d(n.subscriptionType) : null, l = n.directives ? n.directives.map(A) : [];
  return new Dc({
    description: n.description,
    query: o,
    mutation: i,
    subscription: s,
    types: Object.values(r),
    directives: l,
    assumeValid: t == null ? void 0 : t.assumeValid
  });
  function c(F) {
    if (F.kind === It.LIST) {
      const $ = F.ofType;
      if (!$)
        throw new Error("Decorated type deeper than introspection query.");
      return new Ht(c($));
    }
    if (F.kind === It.NON_NULL) {
      const $ = F.ofType;
      if (!$)
        throw new Error("Decorated type deeper than introspection query.");
      const q = c($);
      return new et(cP(q));
    }
    return f(F);
  }
  function f(F) {
    const $ = F.name;
    if (!$)
      throw new Error(`Unknown type reference: ${be(F)}.`);
    const q = r[$];
    if (!q)
      throw new Error(
        `Invalid or incomplete schema, unknown type: ${$}. Ensure that a full introspection query is used in order to build a client schema.`
      );
    return q;
  }
  function d(F) {
    return sP(f(F));
  }
  function g(F) {
    return aP(f(F));
  }
  function m(F) {
    if (F != null && F.name != null && F.kind != null)
      switch (F.kind) {
        case It.SCALAR:
          return v(F);
        case It.OBJECT:
          return w(F);
        case It.INTERFACE:
          return _(F);
        case It.UNION:
          return S(F);
        case It.ENUM:
          return x(F);
        case It.INPUT_OBJECT:
          return C(F);
      }
    const $ = be(F);
    throw new Error(
      `Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ${$}.`
    );
  }
  function v(F) {
    return new Zo({
      name: F.name,
      description: F.description,
      specifiedByURL: F.specifiedByURL
    });
  }
  function b(F) {
    if (F.interfaces === null && F.kind === It.INTERFACE)
      return [];
    if (!F.interfaces) {
      const $ = be(F);
      throw new Error(
        `Introspection result missing interfaces: ${$}.`
      );
    }
    return F.interfaces.map(g);
  }
  function w(F) {
    return new zn({
      name: F.name,
      description: F.description,
      interfaces: () => b(F),
      fields: () => E(F)
    });
  }
  function _(F) {
    return new zr({
      name: F.name,
      description: F.description,
      interfaces: () => b(F),
      fields: () => E(F)
    });
  }
  function S(F) {
    if (!F.possibleTypes) {
      const $ = be(F);
      throw new Error(
        `Introspection result missing possibleTypes: ${$}.`
      );
    }
    return new Ga({
      name: F.name,
      description: F.description,
      types: () => F.possibleTypes.map(d)
    });
  }
  function x(F) {
    if (!F.enumValues) {
      const $ = be(F);
      throw new Error(
        `Introspection result missing enumValues: ${$}.`
      );
    }
    return new Or({
      name: F.name,
      description: F.description,
      values: Da(
        F.enumValues,
        ($) => $.name,
        ($) => ({
          description: $.description,
          deprecationReason: $.deprecationReason
        })
      )
    });
  }
  function C(F) {
    if (!F.inputFields) {
      const $ = be(F);
      throw new Error(
        `Introspection result missing inputFields: ${$}.`
      );
    }
    return new Gr({
      name: F.name,
      description: F.description,
      fields: () => I(F.inputFields)
    });
  }
  function E(F) {
    if (!F.fields)
      throw new Error(
        `Introspection result missing fields: ${be(F)}.`
      );
    return Da(
      F.fields,
      ($) => $.name,
      N
    );
  }
  function N(F) {
    const $ = c(F.type);
    if (!Os($)) {
      const q = be($);
      throw new Error(
        `Introspection must provide output type for fields, but received: ${q}.`
      );
    }
    if (!F.args) {
      const q = be(F);
      throw new Error(
        `Introspection result missing field args: ${q}.`
      );
    }
    return {
      description: F.description,
      deprecationReason: F.deprecationReason,
      type: $,
      args: I(F.args)
    };
  }
  function I(F) {
    return Da(
      F,
      ($) => $.name,
      D
    );
  }
  function D(F) {
    const $ = c(F.type);
    if (!lr($)) {
      const H = be($);
      throw new Error(
        `Introspection must provide input type for arguments, but received: ${H}.`
      );
    }
    const q = F.defaultValue != null ? Go(rP(F.defaultValue), $) : void 0;
    return {
      description: F.description,
      type: $,
      defaultValue: q,
      deprecationReason: F.deprecationReason
    };
  }
  function A(F) {
    if (!F.args) {
      const $ = be(F);
      throw new Error(
        `Introspection result missing directive args: ${$}.`
      );
    }
    if (!F.locations) {
      const $ = be(F);
      throw new Error(
        `Introspection result missing directive locations: ${$}.`
      );
    }
    return new ko({
      name: F.name,
      description: F.description,
      isRepeatable: F.isRepeatable,
      locations: F.locations.slice(),
      args: I(F.args)
    });
  }
}
function xB(e, t, n) {
  yC(e), t != null && t.kind === U.DOCUMENT || lt(!1, "Must provide valid Document AST."), (n == null ? void 0 : n.assumeValid) !== !0 && (n == null ? void 0 : n.assumeValidSDL) !== !0 && tB(t, e);
  const r = e.toConfig(), o = r3(r, t, n);
  return r === o ? e : new Dc(o);
}
function r3(e, t, n) {
  var r, o, i, s;
  const l = [], c = /* @__PURE__ */ Object.create(null), f = [];
  let d;
  const g = [];
  for (const J of t.definitions)
    if (J.kind === U.SCHEMA_DEFINITION)
      d = J;
    else if (J.kind === U.SCHEMA_EXTENSION)
      g.push(J);
    else if (If(J))
      l.push(J);
    else if (Sy(J)) {
      const ie = J.name.value, ne = c[ie];
      c[ie] = ne ? ne.concat([J]) : [J];
    } else
      J.kind === U.DIRECTIVE_DEFINITION && f.push(J);
  if (Object.keys(c).length === 0 && l.length === 0 && f.length === 0 && g.length === 0 && d == null)
    return e;
  const m = /* @__PURE__ */ Object.create(null);
  for (const J of e.types)
    m[J.name] = x(J);
  for (const J of l) {
    var v;
    const ie = J.name.value;
    m[ie] = (v = sA[ie]) !== null && v !== void 0 ? v : re(J);
  }
  const b = {
    // Get the extended root operation types.
    query: e.query && _(e.query),
    mutation: e.mutation && _(e.mutation),
    subscription: e.subscription && _(e.subscription),
    // Then, incorporate schema definition and all schema extensions.
    ...d && q([d]),
    ...q(g)
  };
  return {
    description: (r = d) === null || r === void 0 || (o = r.description) === null || o === void 0 ? void 0 : o.value,
    ...b,
    types: Object.values(m),
    directives: [
      ...e.directives.map(S),
      ...f.map(B)
    ],
    extensions: /* @__PURE__ */ Object.create(null),
    astNode: (i = d) !== null && i !== void 0 ? i : e.astNode,
    extensionASTNodes: e.extensionASTNodes.concat(g),
    assumeValid: (s = n == null ? void 0 : n.assumeValid) !== null && s !== void 0 ? s : !1
  };
  function w(J) {
    return vt(J) ? new Ht(w(J.ofType)) : He(J) ? new et(w(J.ofType)) : _(J);
  }
  function _(J) {
    return m[J.name];
  }
  function S(J) {
    const ie = J.toConfig();
    return new ko({
      ...ie,
      args: Ts(ie.args, $)
    });
  }
  function x(J) {
    if (Ac(J) || xh(J))
      return J;
    if (pr(J))
      return N(J);
    if (Ye(J))
      return I(J);
    if (Ze(J))
      return D(J);
    if (Zt(J))
      return A(J);
    if (Lt(J))
      return E(J);
    if (mt(J))
      return C(J);
    En(!1, "Unexpected type: " + be(J));
  }
  function C(J) {
    var ie;
    const ne = J.toConfig(), ae = (ie = c[ne.name]) !== null && ie !== void 0 ? ie : [];
    return new Gr({
      ...ne,
      fields: () => ({
        ...Ts(ne.fields, (le) => ({
          ...le,
          type: w(le.type)
        })),
        ...Q(ae)
      }),
      extensionASTNodes: ne.extensionASTNodes.concat(ae)
    });
  }
  function E(J) {
    var ie;
    const ne = J.toConfig(), ae = (ie = c[J.name]) !== null && ie !== void 0 ? ie : [];
    return new Or({
      ...ne,
      values: { ...ne.values, ...Y(ae) },
      extensionASTNodes: ne.extensionASTNodes.concat(ae)
    });
  }
  function N(J) {
    var ie;
    const ne = J.toConfig(), ae = (ie = c[ne.name]) !== null && ie !== void 0 ? ie : [];
    let le = ne.specifiedByURL;
    for (const xe of ae) {
      var de;
      le = (de = aA(xe)) !== null && de !== void 0 ? de : le;
    }
    return new Zo({
      ...ne,
      specifiedByURL: le,
      extensionASTNodes: ne.extensionASTNodes.concat(ae)
    });
  }
  function I(J) {
    var ie;
    const ne = J.toConfig(), ae = (ie = c[ne.name]) !== null && ie !== void 0 ? ie : [];
    return new zn({
      ...ne,
      interfaces: () => [
        ...J.getInterfaces().map(_),
        ...K(ae)
      ],
      fields: () => ({
        ...Ts(ne.fields, F),
        ...R(ae)
      }),
      extensionASTNodes: ne.extensionASTNodes.concat(ae)
    });
  }
  function D(J) {
    var ie;
    const ne = J.toConfig(), ae = (ie = c[ne.name]) !== null && ie !== void 0 ? ie : [];
    return new zr({
      ...ne,
      interfaces: () => [
        ...J.getInterfaces().map(_),
        ...K(ae)
      ],
      fields: () => ({
        ...Ts(ne.fields, F),
        ...R(ae)
      }),
      extensionASTNodes: ne.extensionASTNodes.concat(ae)
    });
  }
  function A(J) {
    var ie;
    const ne = J.toConfig(), ae = (ie = c[ne.name]) !== null && ie !== void 0 ? ie : [];
    return new Ga({
      ...ne,
      types: () => [
        ...J.getTypes().map(_),
        ...Z(ae)
      ],
      extensionASTNodes: ne.extensionASTNodes.concat(ae)
    });
  }
  function F(J) {
    return {
      ...J,
      type: w(J.type),
      args: J.args && Ts(J.args, $)
    };
  }
  function $(J) {
    return { ...J, type: w(J.type) };
  }
  function q(J) {
    const ie = {};
    for (const ae of J) {
      var ne;
      const le = (
        /* c8 ignore next */
        (ne = ae.operationTypes) !== null && ne !== void 0 ? ne : []
      );
      for (const de of le)
        ie[de.operation] = H(de.type);
    }
    return ie;
  }
  function H(J) {
    var ie;
    const ne = J.name.value, ae = (ie = sA[ne]) !== null && ie !== void 0 ? ie : m[ne];
    if (ae === void 0)
      throw new Error(`Unknown type: "${ne}".`);
    return ae;
  }
  function z(J) {
    return J.kind === U.LIST_TYPE ? new Ht(z(J.type)) : J.kind === U.NON_NULL_TYPE ? new et(z(J.type)) : H(J);
  }
  function B(J) {
    var ie;
    return new ko({
      name: J.name.value,
      description: (ie = J.description) === null || ie === void 0 ? void 0 : ie.value,
      // @ts-expect-error
      locations: J.locations.map(({ value: ne }) => ne),
      isRepeatable: J.repeatable,
      args: te(J.arguments),
      astNode: J
    });
  }
  function R(J) {
    const ie = /* @__PURE__ */ Object.create(null);
    for (const le of J) {
      var ne;
      const de = (
        /* c8 ignore next */
        (ne = le.fields) !== null && ne !== void 0 ? ne : []
      );
      for (const xe of de) {
        var ae;
        ie[xe.name.value] = {
          // Note: While this could make assertions to get the correctly typed
          // value, that would throw immediately while type system validation
          // with validateSchema() will produce more actionable results.
          type: z(xe.type),
          description: (ae = xe.description) === null || ae === void 0 ? void 0 : ae.value,
          args: te(xe.arguments),
          deprecationReason: cg(xe),
          astNode: xe
        };
      }
    }
    return ie;
  }
  function te(J) {
    const ie = (
      /* c8 ignore next */
      J ?? []
    ), ne = /* @__PURE__ */ Object.create(null);
    for (const le of ie) {
      var ae;
      const de = z(le.type);
      ne[le.name.value] = {
        type: de,
        description: (ae = le.description) === null || ae === void 0 ? void 0 : ae.value,
        defaultValue: Go(le.defaultValue, de),
        deprecationReason: cg(le),
        astNode: le
      };
    }
    return ne;
  }
  function Q(J) {
    const ie = /* @__PURE__ */ Object.create(null);
    for (const le of J) {
      var ne;
      const de = (
        /* c8 ignore next */
        (ne = le.fields) !== null && ne !== void 0 ? ne : []
      );
      for (const xe of de) {
        var ae;
        const ge = z(xe.type);
        ie[xe.name.value] = {
          type: ge,
          description: (ae = xe.description) === null || ae === void 0 ? void 0 : ae.value,
          defaultValue: Go(xe.defaultValue, ge),
          deprecationReason: cg(xe),
          astNode: xe
        };
      }
    }
    return ie;
  }
  function Y(J) {
    const ie = /* @__PURE__ */ Object.create(null);
    for (const le of J) {
      var ne;
      const de = (
        /* c8 ignore next */
        (ne = le.values) !== null && ne !== void 0 ? ne : []
      );
      for (const xe of de) {
        var ae;
        ie[xe.name.value] = {
          description: (ae = xe.description) === null || ae === void 0 ? void 0 : ae.value,
          deprecationReason: cg(xe),
          astNode: xe
        };
      }
    }
    return ie;
  }
  function K(J) {
    return J.flatMap(
      // FIXME: https://github.com/graphql/graphql-js/issues/2203
      (ie) => {
        var ne, ae;
        return (
          /* c8 ignore next */
          (ne = (ae = ie.interfaces) === null || ae === void 0 ? void 0 : ae.map(H)) !== null && ne !== void 0 ? ne : []
        );
      }
    );
  }
  function Z(J) {
    return J.flatMap(
      // FIXME: https://github.com/graphql/graphql-js/issues/2203
      (ie) => {
        var ne, ae;
        return (
          /* c8 ignore next */
          (ne = (ae = ie.types) === null || ae === void 0 ? void 0 : ae.map(H)) !== null && ne !== void 0 ? ne : []
        );
      }
    );
  }
  function re(J) {
    var ie;
    const ne = J.name.value, ae = (ie = c[ne]) !== null && ie !== void 0 ? ie : [];
    switch (J.kind) {
      case U.OBJECT_TYPE_DEFINITION: {
        var le;
        const Oe = [J, ...ae];
        return new zn({
          name: ne,
          description: (le = J.description) === null || le === void 0 ? void 0 : le.value,
          interfaces: () => K(Oe),
          fields: () => R(Oe),
          astNode: J,
          extensionASTNodes: ae
        });
      }
      case U.INTERFACE_TYPE_DEFINITION: {
        var de;
        const Oe = [J, ...ae];
        return new zr({
          name: ne,
          description: (de = J.description) === null || de === void 0 ? void 0 : de.value,
          interfaces: () => K(Oe),
          fields: () => R(Oe),
          astNode: J,
          extensionASTNodes: ae
        });
      }
      case U.ENUM_TYPE_DEFINITION: {
        var xe;
        const Oe = [J, ...ae];
        return new Or({
          name: ne,
          description: (xe = J.description) === null || xe === void 0 ? void 0 : xe.value,
          values: Y(Oe),
          astNode: J,
          extensionASTNodes: ae
        });
      }
      case U.UNION_TYPE_DEFINITION: {
        var ge;
        const Oe = [J, ...ae];
        return new Ga({
          name: ne,
          description: (ge = J.description) === null || ge === void 0 ? void 0 : ge.value,
          types: () => Z(Oe),
          astNode: J,
          extensionASTNodes: ae
        });
      }
      case U.SCALAR_TYPE_DEFINITION: {
        var qe;
        return new Zo({
          name: ne,
          description: (qe = J.description) === null || qe === void 0 ? void 0 : qe.value,
          specifiedByURL: aA(J),
          astNode: J,
          extensionASTNodes: ae
        });
      }
      case U.INPUT_OBJECT_TYPE_DEFINITION: {
        var Ie;
        const Oe = [J, ...ae];
        return new Gr({
          name: ne,
          description: (Ie = J.description) === null || Ie === void 0 ? void 0 : Ie.value,
          fields: () => Q(Oe),
          astNode: J,
          extensionASTNodes: ae
        });
      }
    }
  }
}
const sA = $s(
  [...wh, ...Ch],
  (e) => e.name
);
function cg(e) {
  const t = js(vy, e);
  return t == null ? void 0 : t.reason;
}
function aA(e) {
  const t = js(fC, e);
  return t == null ? void 0 : t.url;
}
function Xv(e, t) {
  e != null && e.kind === U.DOCUMENT || lt(!1, "Must provide valid Document AST."), (t == null ? void 0 : t.assumeValid) !== !0 && (t == null ? void 0 : t.assumeValidSDL) !== !0 && eB(e);
  const r = r3({
    description: void 0,
    types: [],
    directives: [],
    extensions: /* @__PURE__ */ Object.create(null),
    extensionASTNodes: [],
    assumeValid: !1
  }, e, t);
  if (r.astNode == null)
    for (const i of r.types)
      switch (i.name) {
        case "Query":
          r.query = i;
          break;
        case "Mutation":
          r.mutation = i;
          break;
        case "Subscription":
          r.subscription = i;
          break;
      }
  const o = [
    ...r.directives,
    // If specified directives were not explicitly declared, add them.
    ...sl.filter(
      (i) => r.directives.every(
        (s) => s.name !== i.name
      )
    )
  ];
  return new Dc({ ...r, directives: o });
}
function Wx(e, t) {
  const n = fr(e, {
    noLocation: t == null ? void 0 : t.noLocation,
    allowLegacyFragmentVariables: t == null ? void 0 : t.allowLegacyFragmentVariables
  });
  return Xv(n, {
    assumeValidSDL: t == null ? void 0 : t.assumeValidSDL,
    assumeValid: t == null ? void 0 : t.assumeValid
  });
}
function SB(e) {
  const t = e.toConfig(), n = Da(
    KE(t.types),
    (m) => m.name,
    g
  );
  return new Dc({
    ...t,
    types: Object.values(n),
    directives: KE(t.directives).map(s),
    query: i(t.query),
    mutation: i(t.mutation),
    subscription: i(t.subscription)
  });
  function r(m) {
    return vt(m) ? new Ht(r(m.ofType)) : He(m) ? new et(r(m.ofType)) : o(m);
  }
  function o(m) {
    return n[m.name];
  }
  function i(m) {
    return m && o(m);
  }
  function s(m) {
    const v = m.toConfig();
    return new ko({
      ...v,
      locations: o3(v.locations, (b) => b),
      args: l(v.args)
    });
  }
  function l(m) {
    return ug(m, (v) => ({ ...v, type: r(v.type) }));
  }
  function c(m) {
    return ug(m, (v) => ({
      ...v,
      type: r(v.type),
      args: v.args && l(v.args)
    }));
  }
  function f(m) {
    return ug(m, (v) => ({
      ...v,
      type: r(v.type)
    }));
  }
  function d(m) {
    return KE(m).map(o);
  }
  function g(m) {
    if (pr(m) || Ac(m))
      return m;
    if (Ye(m)) {
      const v = m.toConfig();
      return new zn({
        ...v,
        interfaces: () => d(v.interfaces),
        fields: () => c(v.fields)
      });
    }
    if (Ze(m)) {
      const v = m.toConfig();
      return new zr({
        ...v,
        interfaces: () => d(v.interfaces),
        fields: () => c(v.fields)
      });
    }
    if (Zt(m)) {
      const v = m.toConfig();
      return new Ga({
        ...v,
        types: () => d(v.types)
      });
    }
    if (Lt(m)) {
      const v = m.toConfig();
      return new Or({
        ...v,
        values: ug(v.values, (b) => b)
      });
    }
    if (mt(m)) {
      const v = m.toConfig();
      return new Gr({
        ...v,
        fields: () => f(v.fields)
      });
    }
    En(!1, "Unexpected type: " + be(m));
  }
}
function ug(e, t) {
  const n = /* @__PURE__ */ Object.create(null);
  for (const r of Object.keys(e).sort(bh))
    n[r] = t(e[r]);
  return n;
}
function KE(e) {
  return o3(e, (t) => t.name);
}
function o3(e, t) {
  return e.slice().sort((n, r) => {
    const o = t(n), i = t(r);
    return bh(o, i);
  });
}
function TB(e) {
  return i3(
    e,
    (t) => !yy(t),
    kB
  );
}
function CB(e) {
  return i3(e, yy, Ac);
}
function kB(e) {
  return !xh(e) && !Ac(e);
}
function i3(e, t, n) {
  const r = e.getDirectives().filter(t), o = Object.values(e.getTypeMap()).filter(n);
  return [
    _B(e),
    ...r.map((i) => FB(i)),
    ...o.map((i) => s3(i))
  ].filter(Boolean).join(`

`);
}
function _B(e) {
  if (e.description == null && NB(e))
    return;
  const t = [], n = e.getQueryType();
  n && t.push(`  query: ${n.name}`);
  const r = e.getMutationType();
  r && t.push(`  mutation: ${r.name}`);
  const o = e.getSubscriptionType();
  return o && t.push(`  subscription: ${o.name}`), ni(e) + `schema {
${t.join(`
`)}
}`;
}
function NB(e) {
  const t = e.getQueryType();
  if (t && t.name !== "Query")
    return !1;
  const n = e.getMutationType();
  if (n && n.name !== "Mutation")
    return !1;
  const r = e.getSubscriptionType();
  return !(r && r.name !== "Subscription");
}
function s3(e) {
  if (pr(e))
    return OB(e);
  if (Ye(e))
    return AB(e);
  if (Ze(e))
    return DB(e);
  if (Zt(e))
    return IB(e);
  if (Lt(e))
    return LB(e);
  if (mt(e))
    return RB(e);
  En(!1, "Unexpected type: " + be(e));
}
function OB(e) {
  return ni(e) + `scalar ${e.name}` + MB(e);
}
function a3(e) {
  const t = e.getInterfaces();
  return t.length ? " implements " + t.map((n) => n.name).join(" & ") : "";
}
function AB(e) {
  return ni(e) + `type ${e.name}` + a3(e) + l3(e);
}
function DB(e) {
  return ni(e) + `interface ${e.name}` + a3(e) + l3(e);
}
function IB(e) {
  const t = e.getTypes(), n = t.length ? " = " + t.join(" | ") : "";
  return ni(e) + "union " + e.name + n;
}
function LB(e) {
  const t = e.getValues().map(
    (n, r) => ni(n, "  ", !r) + "  " + n.name + jC(n.deprecationReason)
  );
  return ni(e) + `enum ${e.name}` + VC(t);
}
function RB(e) {
  const t = Object.values(e.getFields()).map(
    (n, r) => ni(n, "  ", !r) + "  " + Gx(n)
  );
  return ni(e) + `input ${e.name}` + VC(t);
}
function l3(e) {
  const t = Object.values(e.getFields()).map(
    (n, r) => ni(n, "  ", !r) + "  " + n.name + c3(n.args, "  ") + ": " + String(n.type) + jC(n.deprecationReason)
  );
  return VC(t);
}
function VC(e) {
  return e.length !== 0 ? ` {
` + e.join(`
`) + `
}` : "";
}
function c3(e, t = "") {
  return e.length === 0 ? "" : e.every((n) => !n.description) ? "(" + e.map(Gx).join(", ") + ")" : `(
` + e.map(
    (n, r) => ni(n, "  " + t, !r) + "  " + t + Gx(n)
  ).join(`
`) + `
` + t + ")";
}
function Gx(e) {
  const t = _s(e.defaultValue, e.type);
  let n = e.name + ": " + String(e.type);
  return t && (n += ` = ${pt(t)}`), n + jC(e.deprecationReason);
}
function FB(e) {
  return ni(e) + "directive @" + e.name + c3(e.args) + (e.isRepeatable ? " repeatable" : "") + " on " + e.locations.join(" | ");
}
function jC(e) {
  return e == null ? "" : e !== uC ? ` @deprecated(reason: ${pt({
    kind: U.STRING,
    value: e
  })})` : " @deprecated";
}
function MB(e) {
  return e.specifiedByURL == null ? "" : ` @specifiedBy(url: ${pt({
    kind: U.STRING,
    value: e.specifiedByURL
  })})`;
}
function ni(e, t = "", n = !0) {
  const { description: r } = e;
  if (r == null)
    return "";
  const o = pt({
    kind: U.STRING,
    value: r,
    block: Tj(r)
  });
  return (t && !n ? `
` + t : t) + o.replace(/\n/g, `
` + t) + `
`;
}
function PB(e) {
  const t = [];
  for (const n of e)
    t.push(...n.definitions);
  return {
    kind: U.DOCUMENT,
    definitions: t
  };
}
function $B(e) {
  const t = [], n = /* @__PURE__ */ Object.create(null);
  for (const o of e.definitions)
    switch (o.kind) {
      case U.OPERATION_DEFINITION:
        t.push(o);
        break;
      case U.FRAGMENT_DEFINITION:
        n[o.name.value] = lA(
          o.selectionSet
        );
        break;
    }
  const r = /* @__PURE__ */ Object.create(null);
  for (const o of t) {
    const i = /* @__PURE__ */ new Set();
    for (const l of lA(o.selectionSet))
      u3(i, n, l);
    const s = o.name ? o.name.value : "";
    r[s] = {
      kind: U.DOCUMENT,
      definitions: e.definitions.filter(
        (l) => l === o || l.kind === U.FRAGMENT_DEFINITION && i.has(l.name.value)
      )
    };
  }
  return r;
}
function u3(e, t, n) {
  if (!e.has(n)) {
    e.add(n);
    const r = t[n];
    if (r !== void 0)
      for (const o of r)
        u3(e, t, o);
  }
}
function lA(e) {
  const t = [];
  return pn(e, {
    FragmentSpread(n) {
      t.push(n.name.value);
    }
  }), t;
}
function f3(e) {
  const t = nP(e) ? e : new yh(e), n = t.body, r = new iC(t);
  let o = "", i = !1;
  for (; r.advance().kind !== ve.EOF; ) {
    const s = r.token, l = s.kind, c = !XM(s.kind);
    i && (c || s.kind === ve.SPREAD) && (o += " ");
    const f = n.slice(s.start, s.end);
    l === ve.BLOCK_STRING ? o += JM(s.value, {
      minimize: !0
    }) : o += f, i = c;
  }
  return o;
}
function VB(e) {
  const t = d3(e);
  if (t)
    throw t;
  return e;
}
function d3(e) {
  if (typeof e == "string" || lt(!1, "Expected name to be a string."), e.startsWith("__"))
    return new he(
      `Name "${e}" must not begin with "__", which is reserved by GraphQL introspection.`
    );
  try {
    Do(e);
  } catch (t) {
    return t;
  }
}
var dn;
(function(e) {
  e.TYPE_REMOVED = "TYPE_REMOVED", e.TYPE_CHANGED_KIND = "TYPE_CHANGED_KIND", e.TYPE_REMOVED_FROM_UNION = "TYPE_REMOVED_FROM_UNION", e.VALUE_REMOVED_FROM_ENUM = "VALUE_REMOVED_FROM_ENUM", e.REQUIRED_INPUT_FIELD_ADDED = "REQUIRED_INPUT_FIELD_ADDED", e.IMPLEMENTED_INTERFACE_REMOVED = "IMPLEMENTED_INTERFACE_REMOVED", e.FIELD_REMOVED = "FIELD_REMOVED", e.FIELD_CHANGED_KIND = "FIELD_CHANGED_KIND", e.REQUIRED_ARG_ADDED = "REQUIRED_ARG_ADDED", e.ARG_REMOVED = "ARG_REMOVED", e.ARG_CHANGED_KIND = "ARG_CHANGED_KIND", e.DIRECTIVE_REMOVED = "DIRECTIVE_REMOVED", e.DIRECTIVE_ARG_REMOVED = "DIRECTIVE_ARG_REMOVED", e.REQUIRED_DIRECTIVE_ARG_ADDED = "REQUIRED_DIRECTIVE_ARG_ADDED", e.DIRECTIVE_REPEATABLE_REMOVED = "DIRECTIVE_REPEATABLE_REMOVED", e.DIRECTIVE_LOCATION_REMOVED = "DIRECTIVE_LOCATION_REMOVED";
})(dn || (dn = {}));
var ki;
(function(e) {
  e.VALUE_ADDED_TO_ENUM = "VALUE_ADDED_TO_ENUM", e.TYPE_ADDED_TO_UNION = "TYPE_ADDED_TO_UNION", e.OPTIONAL_INPUT_FIELD_ADDED = "OPTIONAL_INPUT_FIELD_ADDED", e.OPTIONAL_ARG_ADDED = "OPTIONAL_ARG_ADDED", e.IMPLEMENTED_INTERFACE_ADDED = "IMPLEMENTED_INTERFACE_ADDED", e.ARG_DEFAULT_VALUE_CHANGE = "ARG_DEFAULT_VALUE_CHANGE";
})(ki || (ki = {}));
function jB(e, t) {
  return p3(e, t).filter(
    (n) => n.type in dn
  );
}
function UB(e, t) {
  return p3(e, t).filter(
    (n) => n.type in ki
  );
}
function p3(e, t) {
  return [
    ...qB(e, t),
    ...BB(e, t)
  ];
}
function BB(e, t) {
  const n = [], r = Us(
    e.getDirectives(),
    t.getDirectives()
  );
  for (const o of r.removed)
    n.push({
      type: dn.DIRECTIVE_REMOVED,
      description: `${o.name} was removed.`
    });
  for (const [o, i] of r.persisted) {
    const s = Us(o.args, i.args);
    for (const l of s.added)
      il(l) && n.push({
        type: dn.REQUIRED_DIRECTIVE_ARG_ADDED,
        description: `A required arg ${l.name} on directive ${o.name} was added.`
      });
    for (const l of s.removed)
      n.push({
        type: dn.DIRECTIVE_ARG_REMOVED,
        description: `${l.name} was removed from ${o.name}.`
      });
    o.isRepeatable && !i.isRepeatable && n.push({
      type: dn.DIRECTIVE_REPEATABLE_REMOVED,
      description: `Repeatable flag was removed from ${o.name}.`
    });
    for (const l of o.locations)
      i.locations.includes(l) || n.push({
        type: dn.DIRECTIVE_LOCATION_REMOVED,
        description: `${l} was removed from ${o.name}.`
      });
  }
  return n;
}
function qB(e, t) {
  const n = [], r = Us(
    Object.values(e.getTypeMap()),
    Object.values(t.getTypeMap())
  );
  for (const o of r.removed)
    n.push({
      type: dn.TYPE_REMOVED,
      description: xh(o) ? `Standard scalar ${o.name} was removed because it is not referenced anymore.` : `${o.name} was removed.`
    });
  for (const [o, i] of r.persisted)
    Lt(o) && Lt(i) ? n.push(...WB(o, i)) : Zt(o) && Zt(i) ? n.push(...HB(o, i)) : mt(o) && mt(i) ? n.push(...zB(o, i)) : Ye(o) && Ye(i) ? n.push(
      ...uA(o, i),
      ...cA(o, i)
    ) : Ze(o) && Ze(i) ? n.push(
      ...uA(o, i),
      ...cA(o, i)
    ) : o.constructor !== i.constructor && n.push({
      type: dn.TYPE_CHANGED_KIND,
      description: `${o.name} changed from ${fA(o)} to ${fA(i)}.`
    });
  return n;
}
function zB(e, t) {
  const n = [], r = Us(
    Object.values(e.getFields()),
    Object.values(t.getFields())
  );
  for (const o of r.added)
    py(o) ? n.push({
      type: dn.REQUIRED_INPUT_FIELD_ADDED,
      description: `A required field ${o.name} on input type ${e.name} was added.`
    }) : n.push({
      type: ki.OPTIONAL_INPUT_FIELD_ADDED,
      description: `An optional field ${o.name} on input type ${e.name} was added.`
    });
  for (const o of r.removed)
    n.push({
      type: dn.FIELD_REMOVED,
      description: `${e.name}.${o.name} was removed.`
    });
  for (const [o, i] of r.persisted)
    ip(
      o.type,
      i.type
    ) || n.push({
      type: dn.FIELD_CHANGED_KIND,
      description: `${e.name}.${o.name} changed type from ${String(o.type)} to ${String(i.type)}.`
    });
  return n;
}
function HB(e, t) {
  const n = [], r = Us(e.getTypes(), t.getTypes());
  for (const o of r.added)
    n.push({
      type: ki.TYPE_ADDED_TO_UNION,
      description: `${o.name} was added to union type ${e.name}.`
    });
  for (const o of r.removed)
    n.push({
      type: dn.TYPE_REMOVED_FROM_UNION,
      description: `${o.name} was removed from union type ${e.name}.`
    });
  return n;
}
function WB(e, t) {
  const n = [], r = Us(e.getValues(), t.getValues());
  for (const o of r.added)
    n.push({
      type: ki.VALUE_ADDED_TO_ENUM,
      description: `${o.name} was added to enum type ${e.name}.`
    });
  for (const o of r.removed)
    n.push({
      type: dn.VALUE_REMOVED_FROM_ENUM,
      description: `${o.name} was removed from enum type ${e.name}.`
    });
  return n;
}
function cA(e, t) {
  const n = [], r = Us(e.getInterfaces(), t.getInterfaces());
  for (const o of r.added)
    n.push({
      type: ki.IMPLEMENTED_INTERFACE_ADDED,
      description: `${o.name} added to interfaces implemented by ${e.name}.`
    });
  for (const o of r.removed)
    n.push({
      type: dn.IMPLEMENTED_INTERFACE_REMOVED,
      description: `${e.name} no longer implements interface ${o.name}.`
    });
  return n;
}
function uA(e, t) {
  const n = [], r = Us(
    Object.values(e.getFields()),
    Object.values(t.getFields())
  );
  for (const o of r.removed)
    n.push({
      type: dn.FIELD_REMOVED,
      description: `${e.name}.${o.name} was removed.`
    });
  for (const [o, i] of r.persisted)
    n.push(...GB(e, o, i)), zd(
      o.type,
      i.type
    ) || n.push({
      type: dn.FIELD_CHANGED_KIND,
      description: `${e.name}.${o.name} changed type from ${String(o.type)} to ${String(i.type)}.`
    });
  return n;
}
function GB(e, t, n) {
  const r = [], o = Us(t.args, n.args);
  for (const i of o.removed)
    r.push({
      type: dn.ARG_REMOVED,
      description: `${e.name}.${t.name} arg ${i.name} was removed.`
    });
  for (const [i, s] of o.persisted)
    if (!ip(
      i.type,
      s.type
    ))
      r.push({
        type: dn.ARG_CHANGED_KIND,
        description: `${e.name}.${t.name} arg ${i.name} has changed type from ${String(i.type)} to ${String(s.type)}.`
      });
    else if (i.defaultValue !== void 0)
      if (s.defaultValue === void 0)
        r.push({
          type: ki.ARG_DEFAULT_VALUE_CHANGE,
          description: `${e.name}.${t.name} arg ${i.name} defaultValue was removed.`
        });
      else {
        const c = dA(i.defaultValue, i.type), f = dA(s.defaultValue, s.type);
        c !== f && r.push({
          type: ki.ARG_DEFAULT_VALUE_CHANGE,
          description: `${e.name}.${t.name} arg ${i.name} has changed defaultValue from ${c} to ${f}.`
        });
      }
  for (const i of o.added)
    il(i) ? r.push({
      type: dn.REQUIRED_ARG_ADDED,
      description: `A required arg ${i.name} on ${e.name}.${t.name} was added.`
    }) : r.push({
      type: ki.OPTIONAL_ARG_ADDED,
      description: `An optional arg ${i.name} on ${e.name}.${t.name} was added.`
    });
  return r;
}
function zd(e, t) {
  return vt(e) ? (
    // if they're both lists, make sure the underlying types are compatible
    vt(t) && zd(
      e.ofType,
      t.ofType
    ) || // moving from nullable to non-null of the same underlying type is safe
    He(t) && zd(e, t.ofType)
  ) : He(e) ? He(t) && zd(e.ofType, t.ofType) : (
    // if they're both named types, see if their names are equivalent
    Ks(t) && e.name === t.name || // moving from nullable to non-null of the same underlying type is safe
    He(t) && zd(e, t.ofType)
  );
}
function ip(e, t) {
  return vt(e) ? vt(t) && ip(e.ofType, t.ofType) : He(e) ? (
    // if they're both non-null, make sure the underlying types are
    // compatible
    He(t) && ip(
      e.ofType,
      t.ofType
    ) || // moving from non-null to nullable of the same underlying type is safe
    !He(t) && ip(e.ofType, t)
  ) : Ks(t) && e.name === t.name;
}
function fA(e) {
  if (pr(e))
    return "a Scalar type";
  if (Ye(e))
    return "an Object type";
  if (Ze(e))
    return "an Interface type";
  if (Zt(e))
    return "a Union type";
  if (Lt(e))
    return "an Enum type";
  if (mt(e))
    return "an Input type";
  En(!1, "Unexpected type: " + be(e));
}
function dA(e, t) {
  const n = _s(e, t);
  return n != null || En(!1), pt(ky(n));
}
function Us(e, t) {
  const n = [], r = [], o = [], i = $s(e, ({ name: l }) => l), s = $s(t, ({ name: l }) => l);
  for (const l of e) {
    const c = s[l.name];
    c === void 0 ? r.push(l) : o.push([l, c]);
  }
  for (const l of t)
    i[l.name] === void 0 && n.push(l);
  return {
    added: n,
    persisted: o,
    removed: r
  };
}
const QB = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  BREAK: Xl,
  get BreakingChangeType() {
    return dn;
  },
  DEFAULT_DEPRECATION_REASON: uC,
  get DangerousChangeType() {
    return ki;
  },
  get DirectiveLocation() {
    return Fe;
  },
  ExecutableDefinitionsRule: xC,
  FieldsOnCorrectTypeRule: gP,
  FragmentsOnCompositeTypesRule: vP,
  GRAPHQL_MAX_INT: Xg,
  GRAPHQL_MIN_INT: Zg,
  GraphQLBoolean: Wt,
  GraphQLDeprecatedDirective: vy,
  GraphQLDirective: ko,
  GraphQLEnumType: Or,
  GraphQLError: he,
  GraphQLFloat: Pp,
  GraphQLID: $p,
  GraphQLIncludeDirective: my,
  GraphQLInputObjectType: Gr,
  GraphQLInt: Mp,
  GraphQLInterfaceType: zr,
  GraphQLList: Ht,
  GraphQLNonNull: et,
  GraphQLObjectType: zn,
  GraphQLScalarType: Zo,
  GraphQLSchema: Dc,
  GraphQLSkipDirective: gy,
  GraphQLSpecifiedByDirective: fC,
  GraphQLString: Vt,
  GraphQLUnionType: Ga,
  get Kind() {
    return U;
  },
  KnownArgumentNamesRule: yP,
  KnownDirectivesRule: Ty,
  KnownFragmentNamesRule: SC,
  KnownTypeNamesRule: Cy,
  Lexer: iC,
  Location: GM,
  LoneAnonymousOperationRule: EP,
  LoneSchemaDefinitionRule: TC,
  NoDeprecatedCustomRule: n3,
  NoFragmentCyclesRule: wP,
  NoSchemaIntrospectionCustomRule: bB,
  NoUndefinedVariablesRule: xP,
  NoUnusedFragmentsRule: CC,
  NoUnusedVariablesRule: SP,
  get OperationTypeNode() {
    return Bn;
  },
  OverlappingFieldsCanBeMergedRule: CP,
  PossibleFragmentSpreadsRule: NP,
  PossibleTypeExtensionsRule: _C,
  ProvidedRequiredArgumentsRule: OP,
  ScalarLeafsRule: DP,
  SchemaMetaFieldDef: ei,
  SingleFieldSubscriptionsRule: FP,
  Source: yh,
  Token: rC,
  get TokenKind() {
    return ve;
  },
  TypeInfo: Vs,
  get TypeKind() {
    return It;
  },
  TypeMetaFieldDef: ti,
  TypeNameMetaFieldDef: _o,
  UniqueArgumentDefinitionNamesRule: MP,
  UniqueArgumentNamesRule: Ny,
  UniqueDirectiveNamesRule: DC,
  UniqueDirectivesPerLocationRule: Oy,
  UniqueEnumValueNamesRule: IC,
  UniqueFieldDefinitionNamesRule: LC,
  UniqueFragmentNamesRule: PP,
  UniqueInputFieldNamesRule: Ay,
  UniqueOperationNamesRule: $P,
  UniqueOperationTypesRule: RC,
  UniqueTypeNamesRule: FC,
  UniqueVariableNamesRule: VP,
  ValidationContext: zP,
  ValuesOfCorrectTypeRule: jP,
  VariablesAreInputTypesRule: UP,
  VariablesInAllowedPositionRule: BP,
  __Directive: pC,
  __DirectiveLocation: hC,
  __EnumValue: gC,
  __Field: mC,
  __InputValue: Th,
  __Schema: by,
  __Type: Wo,
  __TypeKind: vC,
  assertAbstractType: lP,
  assertCompositeType: lU,
  assertDirective: hU,
  assertEnumType: tU,
  assertEnumValueName: iP,
  assertInputObjectType: nU,
  assertInputType: iU,
  assertInterfaceType: aP,
  assertLeafType: aU,
  assertListType: rU,
  assertName: Do,
  assertNamedType: uU,
  assertNonNullType: oU,
  assertNullableType: cP,
  assertObjectType: sP,
  assertOutputType: sU,
  assertScalarType: Zj,
  assertSchema: yC,
  assertType: Xj,
  assertUnionType: eU,
  assertValidName: VB,
  assertValidSchema: wy,
  assertWrappingType: cU,
  astFromValue: _s,
  buildASTSchema: Xv,
  buildClientSchema: $C,
  buildSchema: Wx,
  coerceInputValue: NC,
  concatAST: PB,
  createSourceEventStream: t3,
  defaultFieldResolver: Jv,
  defaultTypeResolver: JP,
  doTypesOverlap: Fp,
  execute: Dy,
  executeSync: WP,
  extendSchema: xB,
  findBreakingChanges: jB,
  findDangerousChanges: UB,
  formatError: Ej,
  getArgumentValues: _y,
  getDirectiveValues: js,
  getEnterLeaveForKind: yf,
  getIntrospectionQuery: Iy,
  getLocation: Uv,
  getNamedType: Et,
  getNullableType: ol,
  getOperationAST: PC,
  getOperationRootType: EB,
  getVariableValues: LP,
  getVisitFn: Yj,
  graphql: pB,
  graphqlSync: hB,
  introspectionFromSchema: wB,
  introspectionTypes: Ch,
  isAbstractType: qn,
  isCompositeType: Jt,
  isConstValueNode: Bx,
  isDefinitionNode: kU,
  isDirective: hy,
  isEnumType: Lt,
  isEqualType: qv,
  isExecutableDefinitionNode: EC,
  isInputObjectType: mt,
  isInputType: lr,
  isInterfaceType: Ze,
  isIntrospectionType: Ac,
  isLeafType: Nr,
  isListType: vt,
  isNamedType: Ks,
  isNonNullType: He,
  isNullableType: aC,
  isObjectType: Ye,
  isOutputType: Os,
  isRequiredArgument: il,
  isRequiredInputField: py,
  isScalarType: pr,
  isSchema: zv,
  isSelectionNode: _U,
  isSpecifiedDirective: yy,
  isSpecifiedScalarType: xh,
  isType: Df,
  isTypeDefinitionNode: If,
  isTypeExtensionNode: Sy,
  isTypeNode: NU,
  isTypeSubTypeOf: ic,
  isTypeSystemDefinitionNode: xy,
  isTypeSystemExtensionNode: wC,
  isUnionType: Zt,
  isValidNameError: d3,
  isValueNode: mP,
  isWrappingType: Eh,
  lexicographicSortSchema: SB,
  locatedError: wn,
  parse: fr,
  parseConstValue: jj,
  parseType: Uj,
  parseValue: rP,
  print: pt,
  printError: bj,
  printIntrospectionSchema: CB,
  printLocation: WM,
  printSchema: TB,
  printSourceLocation: nC,
  printType: s3,
  resolveObjMapThunk: cC,
  resolveReadonlyArrayThunk: lC,
  responsePathAsArray: Br,
  separateOperations: $B,
  specifiedDirectives: sl,
  specifiedRules: MC,
  specifiedScalarTypes: wh,
  stripIgnoredCharacters: f3,
  subscribe: gB,
  syntaxError: jn,
  typeFromAST: Jn,
  validate: kh,
  validateSchema: Ey,
  valueFromAST: Go,
  valueFromASTUntyped: Bv,
  version: gj,
  versionInfo: tC,
  visit: pn,
  visitInParallel: sC,
  visitWithTypeInfo: Ic
}, Symbol.toStringTag, { value: "Module" }));
var h3 = function(e, t, n, r) {
  function o(i) {
    return i instanceof n ? i : new n(function(s) {
      s(i);
    });
  }
  return new (n || (n = Promise))(function(i, s) {
    function l(d) {
      try {
        f(r.next(d));
      } catch (g) {
        s(g);
      }
    }
    function c(d) {
      try {
        f(r.throw(d));
      } catch (g) {
        s(g);
      }
    }
    function f(d) {
      d.done ? i(d.value) : o(d.value).then(l, c);
    }
    f((r = r.apply(e, t || [])).next());
  });
};
function pA(e) {
  return typeof e == "object" && e !== null && typeof e.then == "function";
}
function YB(e) {
  return new Promise((t, n) => {
    const r = e.subscribe({
      next(o) {
        t(o), r.unsubscribe();
      },
      error: n,
      complete() {
        n(new Error("no value resolved"));
      }
    });
  });
}
function m3(e) {
  return typeof e == "object" && e !== null && "subscribe" in e && typeof e.subscribe == "function";
}
function g3(e) {
  return typeof e == "object" && e !== null && (e[Symbol.toStringTag] === "AsyncGenerator" || Symbol.asyncIterator in e);
}
function KB(e) {
  var t;
  return h3(this, void 0, void 0, function* () {
    const n = (t = ("return" in e ? e : e[Symbol.asyncIterator]()).return) === null || t === void 0 ? void 0 : t.bind(e), o = yield ("next" in e ? e : e[Symbol.asyncIterator]()).next.bind(e)();
    return n == null || n(), o.value;
  });
}
function hA(e) {
  return h3(this, void 0, void 0, function* () {
    const t = yield e;
    return g3(t) ? KB(t) : m3(t) ? YB(t) : t;
  });
}
var JB = new TextDecoder();
async function XB(e, t) {
  if (!e.ok || !e.body || e.bodyUsed)
    return e;
  const n = e.headers.get("content-type");
  if (!n || !~n.indexOf("multipart/mixed"))
    return e;
  const r = n.indexOf("boundary="), o = r + 9, i = n.indexOf(";", o);
  return async function* (s, l, c) {
    const f = s.getReader(), d = !c || !c.multiple;
    let g = l.length, m = "", v = !0, b = [];
    try {
      let w;
      e:
        for (; !(w = await f.read()).done; ) {
          const _ = JB.decode(w.value), S = _.indexOf(l);
          let x = m.length;
          for (m += _, ~S ? x += S : x = m.indexOf(l), b = []; ~x; ) {
            const C = m.substring(0, x), E = m.substring(x + g);
            if (v)
              v = !1, l = `\r
` + l, g += 2;
            else {
              const N = {}, I = C.indexOf(`\r
\r
`) + 4, D = String(m.slice(0, I)).trim().split(`\r
`);
              let A;
              for (; A = D.shift(); )
                A = A.split(": "), N[A.shift().toLowerCase()] = A.join(": ");
              const F = C.lastIndexOf(`\r
`, I);
              let $ = C.substring(I, F > -1 ? void 0 : F), q = !1;
              if (A = N["content-type"], A && ~A.indexOf("application/json"))
                try {
                  $ = JSON.parse($), q = !0;
                } catch {
                }
              if (A = { headers: N, body: $, json: q }, d ? yield A : b.push(A), E.substring(0, 2) === "--")
                break e;
            }
            m = E, x = m.indexOf(l);
          }
          b.length && (yield b);
        }
    } finally {
      b.length && (yield b), await f.cancel();
    }
  }(e.body, `--${~r ? n.substring(o, i > -1 ? i : void 0).replace(/['"]/g, "").trim() : "-"}`, t);
}
function Qx(e) {
  return JSON.stringify(e, null, 2);
}
function ZB(e) {
  return Object.assign(Object.assign({}, e), { message: e.message, stack: e.stack });
}
function mA(e) {
  return e instanceof Error ? ZB(e) : e;
}
function jp(e) {
  return Array.isArray(e) ? Qx({
    errors: e.map((t) => mA(t))
  }) : Qx({ errors: [mA(e)] });
}
function Yx(e) {
  return Qx(e);
}
function eq(e, t, n) {
  const r = [];
  if (!e || !t)
    return { insertions: r, result: t };
  let o;
  try {
    o = fr(t);
  } catch {
    return { insertions: r, result: t };
  }
  const i = n || tq, s = new Vs(e);
  return pn(o, {
    leave(l) {
      s.leave(l);
    },
    enter(l) {
      if (s.enter(l), l.kind === "Field" && !l.selectionSet) {
        const c = s.getType(), f = v3(oq(c), i);
        if (f && l.loc) {
          const d = rq(t, l.loc.start);
          r.push({
            index: l.loc.end,
            string: " " + pt(f).replaceAll(`
`, `
` + d)
          });
        }
      }
    }
  }), {
    insertions: r,
    result: nq(t, r)
  };
}
function tq(e) {
  if (!("getFields" in e))
    return [];
  const t = e.getFields();
  if (t.id)
    return ["id"];
  if (t.edges)
    return ["edges"];
  if (t.node)
    return ["node"];
  const n = [];
  for (const r of Object.keys(t))
    Nr(t[r].type) && n.push(r);
  return n;
}
function v3(e, t) {
  const n = Et(e);
  if (!e || Nr(e))
    return;
  const r = t(n);
  if (!(!Array.isArray(r) || r.length === 0 || !("getFields" in n)))
    return {
      kind: U.SELECTION_SET,
      selections: r.map((o) => {
        const i = n.getFields()[o], s = i ? i.type : null;
        return {
          kind: U.FIELD,
          name: {
            kind: U.NAME,
            value: o
          },
          selectionSet: v3(s, t)
        };
      })
    };
}
function nq(e, t) {
  if (t.length === 0)
    return e;
  let n = "", r = 0;
  for (const { index: o, string: i } of t)
    n += e.slice(r, o) + i, r = o;
  return n += e.slice(r), n;
}
function rq(e, t) {
  let n = t, r = t;
  for (; n; ) {
    const o = e.charCodeAt(n - 1);
    if (o === 10 || o === 13 || o === 8232 || o === 8233)
      break;
    n--, o !== 9 && o !== 11 && o !== 12 && o !== 32 && o !== 160 && (r = n);
  }
  return e.slice(n, r);
}
function oq(e) {
  if (e)
    return e;
}
function iq(e, t) {
  var n;
  const r = /* @__PURE__ */ new Map(), o = [];
  for (const i of e)
    if (i.kind === "Field") {
      const s = t(i), l = r.get(s);
      if (!((n = i.directives) === null || n === void 0) && n.length) {
        const c = Object.assign({}, i);
        o.push(c);
      } else if (l != null && l.selectionSet && i.selectionSet)
        l.selectionSet.selections = [
          ...l.selectionSet.selections,
          ...i.selectionSet.selections
        ];
      else if (!l) {
        const c = Object.assign({}, i);
        r.set(s, c), o.push(c);
      }
    } else
      o.push(i);
  return o;
}
function y3(e, t, n) {
  var r;
  const o = n ? Et(n).name : null, i = [], s = [];
  for (let l of t) {
    if (l.kind === "FragmentSpread") {
      const c = l.name.value;
      if (!l.directives || l.directives.length === 0) {
        if (s.includes(c))
          continue;
        s.push(c);
      }
      const f = e[l.name.value];
      if (f) {
        const { typeCondition: d, directives: g, selectionSet: m } = f;
        l = {
          kind: U.INLINE_FRAGMENT,
          typeCondition: d,
          directives: g,
          selectionSet: m
        };
      }
    }
    if (l.kind === U.INLINE_FRAGMENT && (!l.directives || ((r = l.directives) === null || r === void 0 ? void 0 : r.length) === 0)) {
      const c = l.typeCondition ? l.typeCondition.name.value : null;
      if (!c || c === o) {
        i.push(...y3(e, l.selectionSet.selections, n));
        continue;
      }
    }
    i.push(l);
  }
  return i;
}
function sq(e, t) {
  const n = t ? new Vs(t) : null, r = /* @__PURE__ */ Object.create(null);
  for (const l of e.definitions)
    l.kind === U.FRAGMENT_DEFINITION && (r[l.name.value] = l);
  const o = {
    SelectionSet(l) {
      const c = n ? n.getParentType() : null;
      let { selections: f } = l;
      return f = y3(r, f, c), Object.assign(Object.assign({}, l), { selections: f });
    },
    FragmentDefinition() {
      return null;
    }
  }, i = pn(e, n ? Ic(n, o) : o);
  return pn(i, {
    SelectionSet(l) {
      let { selections: c } = l;
      return c = iq(c, (f) => f.alias ? f.alias.value : f.name.value), Object.assign(Object.assign({}, l), { selections: c });
    },
    FragmentDefinition() {
      return null;
    }
  });
}
function aq(e, t, n) {
  if (!n || n.length < 1)
    return;
  const r = n.map((o) => {
    var i;
    return (i = o.name) === null || i === void 0 ? void 0 : i.value;
  });
  if (t && r.includes(t))
    return t;
  if (t && e) {
    const i = e.map((s) => {
      var l;
      return (l = s.name) === null || l === void 0 ? void 0 : l.value;
    }).indexOf(t);
    if (i !== -1 && i < r.length)
      return r[i];
  }
  return r[0];
}
function lq(e, t) {
  return t instanceof DOMException && (t.code === 22 || t.code === 1014 || t.name === "QuotaExceededError" || t.name === "NS_ERROR_DOM_QUOTA_REACHED") && e.length !== 0;
}
class Kx {
  constructor(t) {
    t ? this.storage = t : t === null ? this.storage = null : typeof window > "u" ? this.storage = null : this.storage = {
      getItem: window.localStorage.getItem.bind(window.localStorage),
      setItem: window.localStorage.setItem.bind(window.localStorage),
      removeItem: window.localStorage.removeItem.bind(window.localStorage),
      get length() {
        let n = 0;
        for (const r in window.localStorage)
          r.indexOf(`${fg}:`) === 0 && (n += 1);
        return n;
      },
      clear() {
        for (const n in window.localStorage)
          n.indexOf(`${fg}:`) === 0 && window.localStorage.removeItem(n);
      }
    };
  }
  get(t) {
    if (!this.storage)
      return null;
    const n = `${fg}:${t}`, r = this.storage.getItem(n);
    return r === "null" || r === "undefined" ? (this.storage.removeItem(n), null) : r || null;
  }
  set(t, n) {
    let r = !1, o = null;
    if (this.storage) {
      const i = `${fg}:${t}`;
      if (n)
        try {
          this.storage.setItem(i, n);
        } catch (s) {
          o = s instanceof Error ? s : new Error(`${s}`), r = lq(this.storage, s);
        }
      else
        this.storage.removeItem(i);
    }
    return { isQuotaError: r, error: o };
  }
  clear() {
    this.storage && this.storage.clear();
  }
}
const fg = "graphiql";
class gA {
  constructor(t, n, r = null) {
    this.key = t, this.storage = n, this.maxSize = r, this.items = this.fetchAll();
  }
  get length() {
    return this.items.length;
  }
  contains(t) {
    return this.items.some((n) => n.query === t.query && n.variables === t.variables && n.headers === t.headers && n.operationName === t.operationName);
  }
  edit(t, n) {
    if (typeof n == "number" && this.items[n]) {
      const o = this.items[n];
      if (o.query === t.query && o.variables === t.variables && o.headers === t.headers && o.operationName === t.operationName) {
        this.items.splice(n, 1, t), this.save();
        return;
      }
    }
    const r = this.items.findIndex((o) => o.query === t.query && o.variables === t.variables && o.headers === t.headers && o.operationName === t.operationName);
    r !== -1 && (this.items.splice(r, 1, t), this.save());
  }
  delete(t) {
    const n = this.items.findIndex((r) => r.query === t.query && r.variables === t.variables && r.headers === t.headers && r.operationName === t.operationName);
    n !== -1 && (this.items.splice(n, 1), this.save());
  }
  fetchRecent() {
    return this.items.at(-1);
  }
  fetchAll() {
    const t = this.storage.get(this.key);
    return t ? JSON.parse(t)[this.key] : [];
  }
  push(t) {
    const n = [...this.items, t];
    this.maxSize && n.length > this.maxSize && n.shift();
    for (let r = 0; r < 5; r++) {
      const o = this.storage.set(this.key, JSON.stringify({ [this.key]: n }));
      if (!(o != null && o.error))
        this.items = n;
      else if (o.isQuotaError && this.maxSize)
        n.shift();
      else
        return;
    }
  }
  save() {
    this.storage.set(this.key, JSON.stringify({ [this.key]: this.items }));
  }
}
const cq = 1e5;
class uq {
  constructor(t, n) {
    this.storage = t, this.maxHistoryLength = n, this.updateHistory = ({ query: r, variables: o, headers: i, operationName: s }) => {
      if (!this.shouldSaveQuery(r, o, i, this.history.fetchRecent()))
        return;
      this.history.push({
        query: r,
        variables: o,
        headers: i,
        operationName: s
      });
      const l = this.history.items, c = this.favorite.items;
      this.queries = l.concat(c);
    }, this.deleteHistory = ({ query: r, variables: o, headers: i, operationName: s, favorite: l }, c = !1) => {
      function f(d) {
        const g = d.items.find((m) => m.query === r && m.variables === o && m.headers === i && m.operationName === s);
        g && d.delete(g);
      }
      (l || c) && f(this.favorite), (!l || c) && f(this.history), this.queries = [...this.history.items, ...this.favorite.items];
    }, this.history = new gA("queries", this.storage, this.maxHistoryLength), this.favorite = new gA("favorites", this.storage, null), this.queries = [...this.history.fetchAll(), ...this.favorite.fetchAll()];
  }
  shouldSaveQuery(t, n, r, o) {
    if (!t)
      return !1;
    try {
      fr(t);
    } catch {
      return !1;
    }
    return t.length > cq ? !1 : o ? !(JSON.stringify(t) === JSON.stringify(o.query) && (JSON.stringify(n) === JSON.stringify(o.variables) && (JSON.stringify(r) === JSON.stringify(o.headers) || r && !o.headers) || n && !o.variables)) : !0;
  }
  toggleFavorite({ query: t, variables: n, headers: r, operationName: o, label: i, favorite: s }) {
    const l = {
      query: t,
      variables: n,
      headers: r,
      operationName: o,
      label: i
    };
    s ? (l.favorite = !1, this.favorite.delete(l), this.history.push(l)) : (l.favorite = !0, this.favorite.push(l), this.history.delete(l)), this.queries = [...this.history.items, ...this.favorite.items];
  }
  editLabel({ query: t, variables: n, headers: r, operationName: o, label: i, favorite: s }, l) {
    const c = {
      query: t,
      variables: n,
      headers: r,
      operationName: o,
      label: i
    };
    s ? this.favorite.edit(Object.assign(Object.assign({}, c), { favorite: s }), l) : this.history.edit(c, l), this.queries = [...this.history.items, ...this.favorite.items];
  }
}
function fq(e) {
  let t;
  return b3(e, (n) => {
    switch (n.kind) {
      case "Query":
      case "ShortQuery":
      case "Mutation":
      case "Subscription":
      case "FragmentDefinition":
        t = n;
        break;
    }
  }), t;
}
function vA(e, t, n) {
  return n === ei.name && e.getQueryType() === t ? ei : n === ti.name && e.getQueryType() === t ? ti : n === _o.name && Jt(t) ? _o : "getFields" in t ? t.getFields()[n] : null;
}
function b3(e, t) {
  const n = [];
  let r = e;
  for (; r != null && r.kind; )
    n.push(r), r = r.prevState;
  for (let o = n.length - 1; o >= 0; o--)
    t(n[o]);
}
function vc(e) {
  const t = Object.keys(e), n = t.length, r = new Array(n);
  for (let o = 0; o < n; ++o)
    r[o] = e[t[o]];
  return r;
}
function on(e, t) {
  return dq(t, E3(e.string));
}
function dq(e, t) {
  if (!t)
    return JE(e, (r) => !r.isDeprecated);
  const n = e.map((r) => ({
    proximity: pq(E3(r.label), t),
    entry: r
  }));
  return JE(JE(n, (r) => r.proximity <= 2), (r) => !r.entry.isDeprecated).sort((r, o) => (r.entry.isDeprecated ? 1 : 0) - (o.entry.isDeprecated ? 1 : 0) || r.proximity - o.proximity || r.entry.label.length - o.entry.label.length).map((r) => r.entry);
}
function JE(e, t) {
  const n = e.filter(t);
  return n.length === 0 ? e : n;
}
function E3(e) {
  return e.toLowerCase().replaceAll(/\W/g, "");
}
function pq(e, t) {
  let n = hq(t, e);
  return e.length > t.length && (n -= e.length - t.length - 1, n += e.indexOf(t) === 0 ? 0 : 0.5), n;
}
function hq(e, t) {
  let n, r;
  const o = [], i = e.length, s = t.length;
  for (n = 0; n <= i; n++)
    o[n] = [n];
  for (r = 1; r <= s; r++)
    o[0][r] = r;
  for (n = 1; n <= i; n++)
    for (r = 1; r <= s; r++) {
      const l = e[n - 1] === t[r - 1] ? 0 : 1;
      o[n][r] = Math.min(o[n - 1][r] + 1, o[n][r - 1] + 1, o[n - 1][r - 1] + l), n > 1 && r > 1 && e[n - 1] === t[r - 2] && e[n - 2] === t[r - 1] && (o[n][r] = Math.min(o[n][r], o[n - 2][r - 2] + l));
    }
  return o[i][s];
}
var yA;
(function(e) {
  function t(n) {
    return typeof n == "string";
  }
  e.is = t;
})(yA || (yA = {}));
var Jx;
(function(e) {
  function t(n) {
    return typeof n == "string";
  }
  e.is = t;
})(Jx || (Jx = {}));
var bA;
(function(e) {
  e.MIN_VALUE = -2147483648, e.MAX_VALUE = 2147483647;
  function t(n) {
    return typeof n == "number" && e.MIN_VALUE <= n && n <= e.MAX_VALUE;
  }
  e.is = t;
})(bA || (bA = {}));
var Zv;
(function(e) {
  e.MIN_VALUE = 0, e.MAX_VALUE = 2147483647;
  function t(n) {
    return typeof n == "number" && e.MIN_VALUE <= n && n <= e.MAX_VALUE;
  }
  e.is = t;
})(Zv || (Zv = {}));
var Ei;
(function(e) {
  function t(r, o) {
    return r === Number.MAX_VALUE && (r = Zv.MAX_VALUE), o === Number.MAX_VALUE && (o = Zv.MAX_VALUE), { line: r, character: o };
  }
  e.create = t;
  function n(r) {
    var o = r;
    return ue.objectLiteral(o) && ue.uinteger(o.line) && ue.uinteger(o.character);
  }
  e.is = n;
})(Ei || (Ei = {}));
var xn;
(function(e) {
  function t(r, o, i, s) {
    if (ue.uinteger(r) && ue.uinteger(o) && ue.uinteger(i) && ue.uinteger(s))
      return { start: Ei.create(r, o), end: Ei.create(i, s) };
    if (Ei.is(r) && Ei.is(o))
      return { start: r, end: o };
    throw new Error("Range#create called with invalid arguments[".concat(r, ", ").concat(o, ", ").concat(i, ", ").concat(s, "]"));
  }
  e.create = t;
  function n(r) {
    var o = r;
    return ue.objectLiteral(o) && Ei.is(o.start) && Ei.is(o.end);
  }
  e.is = n;
})(xn || (xn = {}));
var e0;
(function(e) {
  function t(r, o) {
    return { uri: r, range: o };
  }
  e.create = t;
  function n(r) {
    var o = r;
    return ue.objectLiteral(o) && xn.is(o.range) && (ue.string(o.uri) || ue.undefined(o.uri));
  }
  e.is = n;
})(e0 || (e0 = {}));
var EA;
(function(e) {
  function t(r, o, i, s) {
    return { targetUri: r, targetRange: o, targetSelectionRange: i, originSelectionRange: s };
  }
  e.create = t;
  function n(r) {
    var o = r;
    return ue.objectLiteral(o) && xn.is(o.targetRange) && ue.string(o.targetUri) && xn.is(o.targetSelectionRange) && (xn.is(o.originSelectionRange) || ue.undefined(o.originSelectionRange));
  }
  e.is = n;
})(EA || (EA = {}));
var Xx;
(function(e) {
  function t(r, o, i, s) {
    return {
      red: r,
      green: o,
      blue: i,
      alpha: s
    };
  }
  e.create = t;
  function n(r) {
    var o = r;
    return ue.objectLiteral(o) && ue.numberRange(o.red, 0, 1) && ue.numberRange(o.green, 0, 1) && ue.numberRange(o.blue, 0, 1) && ue.numberRange(o.alpha, 0, 1);
  }
  e.is = n;
})(Xx || (Xx = {}));
var wA;
(function(e) {
  function t(r, o) {
    return {
      range: r,
      color: o
    };
  }
  e.create = t;
  function n(r) {
    var o = r;
    return ue.objectLiteral(o) && xn.is(o.range) && Xx.is(o.color);
  }
  e.is = n;
})(wA || (wA = {}));
var xA;
(function(e) {
  function t(r, o, i) {
    return {
      label: r,
      textEdit: o,
      additionalTextEdits: i
    };
  }
  e.create = t;
  function n(r) {
    var o = r;
    return ue.objectLiteral(o) && ue.string(o.label) && (ue.undefined(o.textEdit) || As.is(o)) && (ue.undefined(o.additionalTextEdits) || ue.typedArray(o.additionalTextEdits, As.is));
  }
  e.is = n;
})(xA || (xA = {}));
var SA;
(function(e) {
  e.Comment = "comment", e.Imports = "imports", e.Region = "region";
})(SA || (SA = {}));
var TA;
(function(e) {
  function t(r, o, i, s, l, c) {
    var f = {
      startLine: r,
      endLine: o
    };
    return ue.defined(i) && (f.startCharacter = i), ue.defined(s) && (f.endCharacter = s), ue.defined(l) && (f.kind = l), ue.defined(c) && (f.collapsedText = c), f;
  }
  e.create = t;
  function n(r) {
    var o = r;
    return ue.objectLiteral(o) && ue.uinteger(o.startLine) && ue.uinteger(o.startLine) && (ue.undefined(o.startCharacter) || ue.uinteger(o.startCharacter)) && (ue.undefined(o.endCharacter) || ue.uinteger(o.endCharacter)) && (ue.undefined(o.kind) || ue.string(o.kind));
  }
  e.is = n;
})(TA || (TA = {}));
var Zx;
(function(e) {
  function t(r, o) {
    return {
      location: r,
      message: o
    };
  }
  e.create = t;
  function n(r) {
    var o = r;
    return ue.defined(o) && e0.is(o.location) && ue.string(o.message);
  }
  e.is = n;
})(Zx || (Zx = {}));
var CA;
(function(e) {
  e.Error = 1, e.Warning = 2, e.Information = 3, e.Hint = 4;
})(CA || (CA = {}));
var kA;
(function(e) {
  e.Unnecessary = 1, e.Deprecated = 2;
})(kA || (kA = {}));
var _A;
(function(e) {
  function t(n) {
    var r = n;
    return ue.objectLiteral(r) && ue.string(r.href);
  }
  e.is = t;
})(_A || (_A = {}));
var t0;
(function(e) {
  function t(r, o, i, s, l, c) {
    var f = { range: r, message: o };
    return ue.defined(i) && (f.severity = i), ue.defined(s) && (f.code = s), ue.defined(l) && (f.source = l), ue.defined(c) && (f.relatedInformation = c), f;
  }
  e.create = t;
  function n(r) {
    var o, i = r;
    return ue.defined(i) && xn.is(i.range) && ue.string(i.message) && (ue.number(i.severity) || ue.undefined(i.severity)) && (ue.integer(i.code) || ue.string(i.code) || ue.undefined(i.code)) && (ue.undefined(i.codeDescription) || ue.string((o = i.codeDescription) === null || o === void 0 ? void 0 : o.href)) && (ue.string(i.source) || ue.undefined(i.source)) && (ue.undefined(i.relatedInformation) || ue.typedArray(i.relatedInformation, Zx.is));
  }
  e.is = n;
})(t0 || (t0 = {}));
var Ef;
(function(e) {
  function t(r, o) {
    for (var i = [], s = 2; s < arguments.length; s++)
      i[s - 2] = arguments[s];
    var l = { title: r, command: o };
    return ue.defined(i) && i.length > 0 && (l.arguments = i), l;
  }
  e.create = t;
  function n(r) {
    var o = r;
    return ue.defined(o) && ue.string(o.title) && ue.string(o.command);
  }
  e.is = n;
})(Ef || (Ef = {}));
var As;
(function(e) {
  function t(i, s) {
    return { range: i, newText: s };
  }
  e.replace = t;
  function n(i, s) {
    return { range: { start: i, end: i }, newText: s };
  }
  e.insert = n;
  function r(i) {
    return { range: i, newText: "" };
  }
  e.del = r;
  function o(i) {
    var s = i;
    return ue.objectLiteral(s) && ue.string(s.newText) && xn.is(s.range);
  }
  e.is = o;
})(As || (As = {}));
var of;
(function(e) {
  function t(r, o, i) {
    var s = { label: r };
    return o !== void 0 && (s.needsConfirmation = o), i !== void 0 && (s.description = i), s;
  }
  e.create = t;
  function n(r) {
    var o = r;
    return ue.objectLiteral(o) && ue.string(o.label) && (ue.boolean(o.needsConfirmation) || o.needsConfirmation === void 0) && (ue.string(o.description) || o.description === void 0);
  }
  e.is = n;
})(of || (of = {}));
var Cr;
(function(e) {
  function t(n) {
    var r = n;
    return ue.string(r);
  }
  e.is = t;
})(Cr || (Cr = {}));
var Sa;
(function(e) {
  function t(i, s, l) {
    return { range: i, newText: s, annotationId: l };
  }
  e.replace = t;
  function n(i, s, l) {
    return { range: { start: i, end: i }, newText: s, annotationId: l };
  }
  e.insert = n;
  function r(i, s) {
    return { range: i, newText: "", annotationId: s };
  }
  e.del = r;
  function o(i) {
    var s = i;
    return As.is(s) && (of.is(s.annotationId) || Cr.is(s.annotationId));
  }
  e.is = o;
})(Sa || (Sa = {}));
var n0;
(function(e) {
  function t(r, o) {
    return { textDocument: r, edits: o };
  }
  e.create = t;
  function n(r) {
    var o = r;
    return ue.defined(o) && r0.is(o.textDocument) && Array.isArray(o.edits);
  }
  e.is = n;
})(n0 || (n0 = {}));
var Up;
(function(e) {
  function t(r, o, i) {
    var s = {
      kind: "create",
      uri: r
    };
    return o !== void 0 && (o.overwrite !== void 0 || o.ignoreIfExists !== void 0) && (s.options = o), i !== void 0 && (s.annotationId = i), s;
  }
  e.create = t;
  function n(r) {
    var o = r;
    return o && o.kind === "create" && ue.string(o.uri) && (o.options === void 0 || (o.options.overwrite === void 0 || ue.boolean(o.options.overwrite)) && (o.options.ignoreIfExists === void 0 || ue.boolean(o.options.ignoreIfExists))) && (o.annotationId === void 0 || Cr.is(o.annotationId));
  }
  e.is = n;
})(Up || (Up = {}));
var Bp;
(function(e) {
  function t(r, o, i, s) {
    var l = {
      kind: "rename",
      oldUri: r,
      newUri: o
    };
    return i !== void 0 && (i.overwrite !== void 0 || i.ignoreIfExists !== void 0) && (l.options = i), s !== void 0 && (l.annotationId = s), l;
  }
  e.create = t;
  function n(r) {
    var o = r;
    return o && o.kind === "rename" && ue.string(o.oldUri) && ue.string(o.newUri) && (o.options === void 0 || (o.options.overwrite === void 0 || ue.boolean(o.options.overwrite)) && (o.options.ignoreIfExists === void 0 || ue.boolean(o.options.ignoreIfExists))) && (o.annotationId === void 0 || Cr.is(o.annotationId));
  }
  e.is = n;
})(Bp || (Bp = {}));
var qp;
(function(e) {
  function t(r, o, i) {
    var s = {
      kind: "delete",
      uri: r
    };
    return o !== void 0 && (o.recursive !== void 0 || o.ignoreIfNotExists !== void 0) && (s.options = o), i !== void 0 && (s.annotationId = i), s;
  }
  e.create = t;
  function n(r) {
    var o = r;
    return o && o.kind === "delete" && ue.string(o.uri) && (o.options === void 0 || (o.options.recursive === void 0 || ue.boolean(o.options.recursive)) && (o.options.ignoreIfNotExists === void 0 || ue.boolean(o.options.ignoreIfNotExists))) && (o.annotationId === void 0 || Cr.is(o.annotationId));
  }
  e.is = n;
})(qp || (qp = {}));
var eS;
(function(e) {
  function t(n) {
    var r = n;
    return r && (r.changes !== void 0 || r.documentChanges !== void 0) && (r.documentChanges === void 0 || r.documentChanges.every(function(o) {
      return ue.string(o.kind) ? Up.is(o) || Bp.is(o) || qp.is(o) : n0.is(o);
    }));
  }
  e.is = t;
})(eS || (eS = {}));
var dg = (
  /** @class */
  function() {
    function e(t, n) {
      this.edits = t, this.changeAnnotations = n;
    }
    return e.prototype.insert = function(t, n, r) {
      var o, i;
      if (r === void 0 ? o = As.insert(t, n) : Cr.is(r) ? (i = r, o = Sa.insert(t, n, r)) : (this.assertChangeAnnotations(this.changeAnnotations), i = this.changeAnnotations.manage(r), o = Sa.insert(t, n, i)), this.edits.push(o), i !== void 0)
        return i;
    }, e.prototype.replace = function(t, n, r) {
      var o, i;
      if (r === void 0 ? o = As.replace(t, n) : Cr.is(r) ? (i = r, o = Sa.replace(t, n, r)) : (this.assertChangeAnnotations(this.changeAnnotations), i = this.changeAnnotations.manage(r), o = Sa.replace(t, n, i)), this.edits.push(o), i !== void 0)
        return i;
    }, e.prototype.delete = function(t, n) {
      var r, o;
      if (n === void 0 ? r = As.del(t) : Cr.is(n) ? (o = n, r = Sa.del(t, n)) : (this.assertChangeAnnotations(this.changeAnnotations), o = this.changeAnnotations.manage(n), r = Sa.del(t, o)), this.edits.push(r), o !== void 0)
        return o;
    }, e.prototype.add = function(t) {
      this.edits.push(t);
    }, e.prototype.all = function() {
      return this.edits;
    }, e.prototype.clear = function() {
      this.edits.splice(0, this.edits.length);
    }, e.prototype.assertChangeAnnotations = function(t) {
      if (t === void 0)
        throw new Error("Text edit change is not configured to manage change annotations.");
    }, e;
  }()
), NA = (
  /** @class */
  function() {
    function e(t) {
      this._annotations = t === void 0 ? /* @__PURE__ */ Object.create(null) : t, this._counter = 0, this._size = 0;
    }
    return e.prototype.all = function() {
      return this._annotations;
    }, Object.defineProperty(e.prototype, "size", {
      get: function() {
        return this._size;
      },
      enumerable: !1,
      configurable: !0
    }), e.prototype.manage = function(t, n) {
      var r;
      if (Cr.is(t) ? r = t : (r = this.nextId(), n = t), this._annotations[r] !== void 0)
        throw new Error("Id ".concat(r, " is already in use."));
      if (n === void 0)
        throw new Error("No annotation provided for id ".concat(r));
      return this._annotations[r] = n, this._size++, r;
    }, e.prototype.nextId = function() {
      return this._counter++, this._counter.toString();
    }, e;
  }()
);
(function() {
  function e(t) {
    var n = this;
    this._textEditChanges = /* @__PURE__ */ Object.create(null), t !== void 0 ? (this._workspaceEdit = t, t.documentChanges ? (this._changeAnnotations = new NA(t.changeAnnotations), t.changeAnnotations = this._changeAnnotations.all(), t.documentChanges.forEach(function(r) {
      if (n0.is(r)) {
        var o = new dg(r.edits, n._changeAnnotations);
        n._textEditChanges[r.textDocument.uri] = o;
      }
    })) : t.changes && Object.keys(t.changes).forEach(function(r) {
      var o = new dg(t.changes[r]);
      n._textEditChanges[r] = o;
    })) : this._workspaceEdit = {};
  }
  return Object.defineProperty(e.prototype, "edit", {
    /**
     * Returns the underlying [WorkspaceEdit](#WorkspaceEdit) literal
     * use to be returned from a workspace edit operation like rename.
     */
    get: function() {
      return this.initDocumentChanges(), this._changeAnnotations !== void 0 && (this._changeAnnotations.size === 0 ? this._workspaceEdit.changeAnnotations = void 0 : this._workspaceEdit.changeAnnotations = this._changeAnnotations.all()), this._workspaceEdit;
    },
    enumerable: !1,
    configurable: !0
  }), e.prototype.getTextEditChange = function(t) {
    if (r0.is(t)) {
      if (this.initDocumentChanges(), this._workspaceEdit.documentChanges === void 0)
        throw new Error("Workspace edit is not configured for document changes.");
      var n = { uri: t.uri, version: t.version }, r = this._textEditChanges[n.uri];
      if (!r) {
        var o = [], i = {
          textDocument: n,
          edits: o
        };
        this._workspaceEdit.documentChanges.push(i), r = new dg(o, this._changeAnnotations), this._textEditChanges[n.uri] = r;
      }
      return r;
    } else {
      if (this.initChanges(), this._workspaceEdit.changes === void 0)
        throw new Error("Workspace edit is not configured for normal text edit changes.");
      var r = this._textEditChanges[t];
      if (!r) {
        var o = [];
        this._workspaceEdit.changes[t] = o, r = new dg(o), this._textEditChanges[t] = r;
      }
      return r;
    }
  }, e.prototype.initDocumentChanges = function() {
    this._workspaceEdit.documentChanges === void 0 && this._workspaceEdit.changes === void 0 && (this._changeAnnotations = new NA(), this._workspaceEdit.documentChanges = [], this._workspaceEdit.changeAnnotations = this._changeAnnotations.all());
  }, e.prototype.initChanges = function() {
    this._workspaceEdit.documentChanges === void 0 && this._workspaceEdit.changes === void 0 && (this._workspaceEdit.changes = /* @__PURE__ */ Object.create(null));
  }, e.prototype.createFile = function(t, n, r) {
    if (this.initDocumentChanges(), this._workspaceEdit.documentChanges === void 0)
      throw new Error("Workspace edit is not configured for document changes.");
    var o;
    of.is(n) || Cr.is(n) ? o = n : r = n;
    var i, s;
    if (o === void 0 ? i = Up.create(t, r) : (s = Cr.is(o) ? o : this._changeAnnotations.manage(o), i = Up.create(t, r, s)), this._workspaceEdit.documentChanges.push(i), s !== void 0)
      return s;
  }, e.prototype.renameFile = function(t, n, r, o) {
    if (this.initDocumentChanges(), this._workspaceEdit.documentChanges === void 0)
      throw new Error("Workspace edit is not configured for document changes.");
    var i;
    of.is(r) || Cr.is(r) ? i = r : o = r;
    var s, l;
    if (i === void 0 ? s = Bp.create(t, n, o) : (l = Cr.is(i) ? i : this._changeAnnotations.manage(i), s = Bp.create(t, n, o, l)), this._workspaceEdit.documentChanges.push(s), l !== void 0)
      return l;
  }, e.prototype.deleteFile = function(t, n, r) {
    if (this.initDocumentChanges(), this._workspaceEdit.documentChanges === void 0)
      throw new Error("Workspace edit is not configured for document changes.");
    var o;
    of.is(n) || Cr.is(n) ? o = n : r = n;
    var i, s;
    if (o === void 0 ? i = qp.create(t, r) : (s = Cr.is(o) ? o : this._changeAnnotations.manage(o), i = qp.create(t, r, s)), this._workspaceEdit.documentChanges.push(i), s !== void 0)
      return s;
  }, e;
})();
var OA;
(function(e) {
  function t(r) {
    return { uri: r };
  }
  e.create = t;
  function n(r) {
    var o = r;
    return ue.defined(o) && ue.string(o.uri);
  }
  e.is = n;
})(OA || (OA = {}));
var AA;
(function(e) {
  function t(r, o) {
    return { uri: r, version: o };
  }
  e.create = t;
  function n(r) {
    var o = r;
    return ue.defined(o) && ue.string(o.uri) && ue.integer(o.version);
  }
  e.is = n;
})(AA || (AA = {}));
var r0;
(function(e) {
  function t(r, o) {
    return { uri: r, version: o };
  }
  e.create = t;
  function n(r) {
    var o = r;
    return ue.defined(o) && ue.string(o.uri) && (o.version === null || ue.integer(o.version));
  }
  e.is = n;
})(r0 || (r0 = {}));
var DA;
(function(e) {
  function t(r, o, i, s) {
    return { uri: r, languageId: o, version: i, text: s };
  }
  e.create = t;
  function n(r) {
    var o = r;
    return ue.defined(o) && ue.string(o.uri) && ue.string(o.languageId) && ue.integer(o.version) && ue.string(o.text);
  }
  e.is = n;
})(DA || (DA = {}));
var tS;
(function(e) {
  e.PlainText = "plaintext", e.Markdown = "markdown";
  function t(n) {
    var r = n;
    return r === e.PlainText || r === e.Markdown;
  }
  e.is = t;
})(tS || (tS = {}));
var zp;
(function(e) {
  function t(n) {
    var r = n;
    return ue.objectLiteral(n) && tS.is(r.kind) && ue.string(r.value);
  }
  e.is = t;
})(zp || (zp = {}));
var IA;
(function(e) {
  e.Text = 1, e.Method = 2, e.Function = 3, e.Constructor = 4, e.Field = 5, e.Variable = 6, e.Class = 7, e.Interface = 8, e.Module = 9, e.Property = 10, e.Unit = 11, e.Value = 12, e.Enum = 13, e.Keyword = 14, e.Snippet = 15, e.Color = 16, e.File = 17, e.Reference = 18, e.Folder = 19, e.EnumMember = 20, e.Constant = 21, e.Struct = 22, e.Event = 23, e.Operator = 24, e.TypeParameter = 25;
})(IA || (IA = {}));
var nS;
(function(e) {
  e.PlainText = 1, e.Snippet = 2;
})(nS || (nS = {}));
var LA;
(function(e) {
  e.Deprecated = 1;
})(LA || (LA = {}));
var RA;
(function(e) {
  function t(r, o, i) {
    return { newText: r, insert: o, replace: i };
  }
  e.create = t;
  function n(r) {
    var o = r;
    return o && ue.string(o.newText) && xn.is(o.insert) && xn.is(o.replace);
  }
  e.is = n;
})(RA || (RA = {}));
var FA;
(function(e) {
  e.asIs = 1, e.adjustIndentation = 2;
})(FA || (FA = {}));
var MA;
(function(e) {
  function t(n) {
    var r = n;
    return r && (ue.string(r.detail) || r.detail === void 0) && (ue.string(r.description) || r.description === void 0);
  }
  e.is = t;
})(MA || (MA = {}));
var PA;
(function(e) {
  function t(n) {
    return { label: n };
  }
  e.create = t;
})(PA || (PA = {}));
var $A;
(function(e) {
  function t(n, r) {
    return { items: n || [], isIncomplete: !!r };
  }
  e.create = t;
})($A || ($A = {}));
var o0;
(function(e) {
  function t(r) {
    return r.replace(/[\\`*_{}[\]()#+\-.!]/g, "\\$&");
  }
  e.fromPlainText = t;
  function n(r) {
    var o = r;
    return ue.string(o) || ue.objectLiteral(o) && ue.string(o.language) && ue.string(o.value);
  }
  e.is = n;
})(o0 || (o0 = {}));
var VA;
(function(e) {
  function t(n) {
    var r = n;
    return !!r && ue.objectLiteral(r) && (zp.is(r.contents) || o0.is(r.contents) || ue.typedArray(r.contents, o0.is)) && (n.range === void 0 || xn.is(n.range));
  }
  e.is = t;
})(VA || (VA = {}));
var jA;
(function(e) {
  function t(n, r) {
    return r ? { label: n, documentation: r } : { label: n };
  }
  e.create = t;
})(jA || (jA = {}));
var UA;
(function(e) {
  function t(n, r) {
    for (var o = [], i = 2; i < arguments.length; i++)
      o[i - 2] = arguments[i];
    var s = { label: n };
    return ue.defined(r) && (s.documentation = r), ue.defined(o) ? s.parameters = o : s.parameters = [], s;
  }
  e.create = t;
})(UA || (UA = {}));
var BA;
(function(e) {
  e.Text = 1, e.Read = 2, e.Write = 3;
})(BA || (BA = {}));
var qA;
(function(e) {
  function t(n, r) {
    var o = { range: n };
    return ue.number(r) && (o.kind = r), o;
  }
  e.create = t;
})(qA || (qA = {}));
var zA;
(function(e) {
  e.File = 1, e.Module = 2, e.Namespace = 3, e.Package = 4, e.Class = 5, e.Method = 6, e.Property = 7, e.Field = 8, e.Constructor = 9, e.Enum = 10, e.Interface = 11, e.Function = 12, e.Variable = 13, e.Constant = 14, e.String = 15, e.Number = 16, e.Boolean = 17, e.Array = 18, e.Object = 19, e.Key = 20, e.Null = 21, e.EnumMember = 22, e.Struct = 23, e.Event = 24, e.Operator = 25, e.TypeParameter = 26;
})(zA || (zA = {}));
var HA;
(function(e) {
  e.Deprecated = 1;
})(HA || (HA = {}));
var WA;
(function(e) {
  function t(n, r, o, i, s) {
    var l = {
      name: n,
      kind: r,
      location: { uri: i, range: o }
    };
    return s && (l.containerName = s), l;
  }
  e.create = t;
})(WA || (WA = {}));
var GA;
(function(e) {
  function t(n, r, o, i) {
    return i !== void 0 ? { name: n, kind: r, location: { uri: o, range: i } } : { name: n, kind: r, location: { uri: o } };
  }
  e.create = t;
})(GA || (GA = {}));
var QA;
(function(e) {
  function t(r, o, i, s, l, c) {
    var f = {
      name: r,
      detail: o,
      kind: i,
      range: s,
      selectionRange: l
    };
    return c !== void 0 && (f.children = c), f;
  }
  e.create = t;
  function n(r) {
    var o = r;
    return o && ue.string(o.name) && ue.number(o.kind) && xn.is(o.range) && xn.is(o.selectionRange) && (o.detail === void 0 || ue.string(o.detail)) && (o.deprecated === void 0 || ue.boolean(o.deprecated)) && (o.children === void 0 || Array.isArray(o.children)) && (o.tags === void 0 || Array.isArray(o.tags));
  }
  e.is = n;
})(QA || (QA = {}));
var YA;
(function(e) {
  e.Empty = "", e.QuickFix = "quickfix", e.Refactor = "refactor", e.RefactorExtract = "refactor.extract", e.RefactorInline = "refactor.inline", e.RefactorRewrite = "refactor.rewrite", e.Source = "source", e.SourceOrganizeImports = "source.organizeImports", e.SourceFixAll = "source.fixAll";
})(YA || (YA = {}));
var i0;
(function(e) {
  e.Invoked = 1, e.Automatic = 2;
})(i0 || (i0 = {}));
var KA;
(function(e) {
  function t(r, o, i) {
    var s = { diagnostics: r };
    return o != null && (s.only = o), i != null && (s.triggerKind = i), s;
  }
  e.create = t;
  function n(r) {
    var o = r;
    return ue.defined(o) && ue.typedArray(o.diagnostics, t0.is) && (o.only === void 0 || ue.typedArray(o.only, ue.string)) && (o.triggerKind === void 0 || o.triggerKind === i0.Invoked || o.triggerKind === i0.Automatic);
  }
  e.is = n;
})(KA || (KA = {}));
var JA;
(function(e) {
  function t(r, o, i) {
    var s = { title: r }, l = !0;
    return typeof o == "string" ? (l = !1, s.kind = o) : Ef.is(o) ? s.command = o : s.edit = o, l && i !== void 0 && (s.kind = i), s;
  }
  e.create = t;
  function n(r) {
    var o = r;
    return o && ue.string(o.title) && (o.diagnostics === void 0 || ue.typedArray(o.diagnostics, t0.is)) && (o.kind === void 0 || ue.string(o.kind)) && (o.edit !== void 0 || o.command !== void 0) && (o.command === void 0 || Ef.is(o.command)) && (o.isPreferred === void 0 || ue.boolean(o.isPreferred)) && (o.edit === void 0 || eS.is(o.edit));
  }
  e.is = n;
})(JA || (JA = {}));
var XA;
(function(e) {
  function t(r, o) {
    var i = { range: r };
    return ue.defined(o) && (i.data = o), i;
  }
  e.create = t;
  function n(r) {
    var o = r;
    return ue.defined(o) && xn.is(o.range) && (ue.undefined(o.command) || Ef.is(o.command));
  }
  e.is = n;
})(XA || (XA = {}));
var ZA;
(function(e) {
  function t(r, o) {
    return { tabSize: r, insertSpaces: o };
  }
  e.create = t;
  function n(r) {
    var o = r;
    return ue.defined(o) && ue.uinteger(o.tabSize) && ue.boolean(o.insertSpaces);
  }
  e.is = n;
})(ZA || (ZA = {}));
var eD;
(function(e) {
  function t(r, o, i) {
    return { range: r, target: o, data: i };
  }
  e.create = t;
  function n(r) {
    var o = r;
    return ue.defined(o) && xn.is(o.range) && (ue.undefined(o.target) || ue.string(o.target));
  }
  e.is = n;
})(eD || (eD = {}));
var tD;
(function(e) {
  function t(r, o) {
    return { range: r, parent: o };
  }
  e.create = t;
  function n(r) {
    var o = r;
    return ue.objectLiteral(o) && xn.is(o.range) && (o.parent === void 0 || e.is(o.parent));
  }
  e.is = n;
})(tD || (tD = {}));
var nD;
(function(e) {
  e.namespace = "namespace", e.type = "type", e.class = "class", e.enum = "enum", e.interface = "interface", e.struct = "struct", e.typeParameter = "typeParameter", e.parameter = "parameter", e.variable = "variable", e.property = "property", e.enumMember = "enumMember", e.event = "event", e.function = "function", e.method = "method", e.macro = "macro", e.keyword = "keyword", e.modifier = "modifier", e.comment = "comment", e.string = "string", e.number = "number", e.regexp = "regexp", e.operator = "operator", e.decorator = "decorator";
})(nD || (nD = {}));
var rD;
(function(e) {
  e.declaration = "declaration", e.definition = "definition", e.readonly = "readonly", e.static = "static", e.deprecated = "deprecated", e.abstract = "abstract", e.async = "async", e.modification = "modification", e.documentation = "documentation", e.defaultLibrary = "defaultLibrary";
})(rD || (rD = {}));
var oD;
(function(e) {
  function t(n) {
    var r = n;
    return ue.objectLiteral(r) && (r.resultId === void 0 || typeof r.resultId == "string") && Array.isArray(r.data) && (r.data.length === 0 || typeof r.data[0] == "number");
  }
  e.is = t;
})(oD || (oD = {}));
var iD;
(function(e) {
  function t(r, o) {
    return { range: r, text: o };
  }
  e.create = t;
  function n(r) {
    var o = r;
    return o != null && xn.is(o.range) && ue.string(o.text);
  }
  e.is = n;
})(iD || (iD = {}));
var sD;
(function(e) {
  function t(r, o, i) {
    return { range: r, variableName: o, caseSensitiveLookup: i };
  }
  e.create = t;
  function n(r) {
    var o = r;
    return o != null && xn.is(o.range) && ue.boolean(o.caseSensitiveLookup) && (ue.string(o.variableName) || o.variableName === void 0);
  }
  e.is = n;
})(sD || (sD = {}));
var aD;
(function(e) {
  function t(r, o) {
    return { range: r, expression: o };
  }
  e.create = t;
  function n(r) {
    var o = r;
    return o != null && xn.is(o.range) && (ue.string(o.expression) || o.expression === void 0);
  }
  e.is = n;
})(aD || (aD = {}));
var lD;
(function(e) {
  function t(r, o) {
    return { frameId: r, stoppedLocation: o };
  }
  e.create = t;
  function n(r) {
    var o = r;
    return ue.defined(o) && xn.is(r.stoppedLocation);
  }
  e.is = n;
})(lD || (lD = {}));
var rS;
(function(e) {
  e.Type = 1, e.Parameter = 2;
  function t(n) {
    return n === 1 || n === 2;
  }
  e.is = t;
})(rS || (rS = {}));
var oS;
(function(e) {
  function t(r) {
    return { value: r };
  }
  e.create = t;
  function n(r) {
    var o = r;
    return ue.objectLiteral(o) && (o.tooltip === void 0 || ue.string(o.tooltip) || zp.is(o.tooltip)) && (o.location === void 0 || e0.is(o.location)) && (o.command === void 0 || Ef.is(o.command));
  }
  e.is = n;
})(oS || (oS = {}));
var cD;
(function(e) {
  function t(r, o, i) {
    var s = { position: r, label: o };
    return i !== void 0 && (s.kind = i), s;
  }
  e.create = t;
  function n(r) {
    var o = r;
    return ue.objectLiteral(o) && Ei.is(o.position) && (ue.string(o.label) || ue.typedArray(o.label, oS.is)) && (o.kind === void 0 || rS.is(o.kind)) && o.textEdits === void 0 || ue.typedArray(o.textEdits, As.is) && (o.tooltip === void 0 || ue.string(o.tooltip) || zp.is(o.tooltip)) && (o.paddingLeft === void 0 || ue.boolean(o.paddingLeft)) && (o.paddingRight === void 0 || ue.boolean(o.paddingRight));
  }
  e.is = n;
})(cD || (cD = {}));
var uD;
(function(e) {
  function t(n) {
    var r = n;
    return ue.objectLiteral(r) && Jx.is(r.uri) && ue.string(r.name);
  }
  e.is = t;
})(uD || (uD = {}));
var fD;
(function(e) {
  function t(i, s, l, c) {
    return new mq(i, s, l, c);
  }
  e.create = t;
  function n(i) {
    var s = i;
    return !!(ue.defined(s) && ue.string(s.uri) && (ue.undefined(s.languageId) || ue.string(s.languageId)) && ue.uinteger(s.lineCount) && ue.func(s.getText) && ue.func(s.positionAt) && ue.func(s.offsetAt));
  }
  e.is = n;
  function r(i, s) {
    for (var l = i.getText(), c = o(s, function(b, w) {
      var _ = b.range.start.line - w.range.start.line;
      return _ === 0 ? b.range.start.character - w.range.start.character : _;
    }), f = l.length, d = c.length - 1; d >= 0; d--) {
      var g = c[d], m = i.offsetAt(g.range.start), v = i.offsetAt(g.range.end);
      if (v <= f)
        l = l.substring(0, m) + g.newText + l.substring(v, l.length);
      else
        throw new Error("Overlapping edit");
      f = m;
    }
    return l;
  }
  e.applyEdits = r;
  function o(i, s) {
    if (i.length <= 1)
      return i;
    var l = i.length / 2 | 0, c = i.slice(0, l), f = i.slice(l);
    o(c, s), o(f, s);
    for (var d = 0, g = 0, m = 0; d < c.length && g < f.length; ) {
      var v = s(c[d], f[g]);
      v <= 0 ? i[m++] = c[d++] : i[m++] = f[g++];
    }
    for (; d < c.length; )
      i[m++] = c[d++];
    for (; g < f.length; )
      i[m++] = f[g++];
    return i;
  }
})(fD || (fD = {}));
var mq = (
  /** @class */
  function() {
    function e(t, n, r, o) {
      this._uri = t, this._languageId = n, this._version = r, this._content = o, this._lineOffsets = void 0;
    }
    return Object.defineProperty(e.prototype, "uri", {
      get: function() {
        return this._uri;
      },
      enumerable: !1,
      configurable: !0
    }), Object.defineProperty(e.prototype, "languageId", {
      get: function() {
        return this._languageId;
      },
      enumerable: !1,
      configurable: !0
    }), Object.defineProperty(e.prototype, "version", {
      get: function() {
        return this._version;
      },
      enumerable: !1,
      configurable: !0
    }), e.prototype.getText = function(t) {
      if (t) {
        var n = this.offsetAt(t.start), r = this.offsetAt(t.end);
        return this._content.substring(n, r);
      }
      return this._content;
    }, e.prototype.update = function(t, n) {
      this._content = t.text, this._version = n, this._lineOffsets = void 0;
    }, e.prototype.getLineOffsets = function() {
      if (this._lineOffsets === void 0) {
        for (var t = [], n = this._content, r = !0, o = 0; o < n.length; o++) {
          r && (t.push(o), r = !1);
          var i = n.charAt(o);
          r = i === "\r" || i === `
`, i === "\r" && o + 1 < n.length && n.charAt(o + 1) === `
` && o++;
        }
        r && n.length > 0 && t.push(n.length), this._lineOffsets = t;
      }
      return this._lineOffsets;
    }, e.prototype.positionAt = function(t) {
      t = Math.max(Math.min(t, this._content.length), 0);
      var n = this.getLineOffsets(), r = 0, o = n.length;
      if (o === 0)
        return Ei.create(0, t);
      for (; r < o; ) {
        var i = Math.floor((r + o) / 2);
        n[i] > t ? o = i : r = i + 1;
      }
      var s = r - 1;
      return Ei.create(s, t - n[s]);
    }, e.prototype.offsetAt = function(t) {
      var n = this.getLineOffsets();
      if (t.line >= n.length)
        return this._content.length;
      if (t.line < 0)
        return 0;
      var r = n[t.line], o = t.line + 1 < n.length ? n[t.line + 1] : this._content.length;
      return Math.max(Math.min(r + t.character, o), r);
    }, Object.defineProperty(e.prototype, "lineCount", {
      get: function() {
        return this.getLineOffsets().length;
      },
      enumerable: !1,
      configurable: !0
    }), e;
  }()
), ue;
(function(e) {
  var t = Object.prototype.toString;
  function n(v) {
    return typeof v < "u";
  }
  e.defined = n;
  function r(v) {
    return typeof v > "u";
  }
  e.undefined = r;
  function o(v) {
    return v === !0 || v === !1;
  }
  e.boolean = o;
  function i(v) {
    return t.call(v) === "[object String]";
  }
  e.string = i;
  function s(v) {
    return t.call(v) === "[object Number]";
  }
  e.number = s;
  function l(v, b, w) {
    return t.call(v) === "[object Number]" && b <= v && v <= w;
  }
  e.numberRange = l;
  function c(v) {
    return t.call(v) === "[object Number]" && -2147483648 <= v && v <= 2147483647;
  }
  e.integer = c;
  function f(v) {
    return t.call(v) === "[object Number]" && 0 <= v && v <= 2147483647;
  }
  e.uinteger = f;
  function d(v) {
    return t.call(v) === "[object Function]";
  }
  e.func = d;
  function g(v) {
    return v !== null && typeof v == "object";
  }
  e.objectLiteral = g;
  function m(v, b) {
    return Array.isArray(v) && v.every(b);
  }
  e.typedArray = m;
})(ue || (ue = {}));
var at;
(function(e) {
  e.Text = 1, e.Method = 2, e.Function = 3, e.Constructor = 4, e.Field = 5, e.Variable = 6, e.Class = 7, e.Interface = 8, e.Module = 9, e.Property = 10, e.Unit = 11, e.Value = 12, e.Enum = 13, e.Keyword = 14, e.Snippet = 15, e.Color = 16, e.File = 17, e.Reference = 18, e.Folder = 19, e.EnumMember = 20, e.Constant = 21, e.Struct = 22, e.Event = 23, e.Operator = 24, e.TypeParameter = 25;
})(at || (at = {}));
class iS {
  constructor(t) {
    this._start = 0, this._pos = 0, this.getStartOfToken = () => this._start, this.getCurrentPosition = () => this._pos, this.eol = () => this._sourceText.length === this._pos, this.sol = () => this._pos === 0, this.peek = () => this._sourceText.charAt(this._pos) || null, this.next = () => {
      const n = this._sourceText.charAt(this._pos);
      return this._pos++, n;
    }, this.eat = (n) => {
      if (this._testNextCharacter(n))
        return this._start = this._pos, this._pos++, this._sourceText.charAt(this._pos - 1);
    }, this.eatWhile = (n) => {
      let r = this._testNextCharacter(n), o = !1;
      for (r && (o = r, this._start = this._pos); r; )
        this._pos++, r = this._testNextCharacter(n), o = !0;
      return o;
    }, this.eatSpace = () => this.eatWhile(/[\s\u00a0]/), this.skipToEnd = () => {
      this._pos = this._sourceText.length;
    }, this.skipTo = (n) => {
      this._pos = n;
    }, this.match = (n, r = !0, o = !1) => {
      let i = null, s = null;
      return typeof n == "string" ? (s = new RegExp(n, o ? "i" : "g").test(this._sourceText.slice(this._pos, this._pos + n.length)), i = n) : n instanceof RegExp && (s = this._sourceText.slice(this._pos).match(n), i = s == null ? void 0 : s[0]), s != null && (typeof n == "string" || s instanceof Array && this._sourceText.startsWith(s[0], this._pos)) ? (r && (this._start = this._pos, i && i.length && (this._pos += i.length)), s) : !1;
    }, this.backUp = (n) => {
      this._pos -= n;
    }, this.column = () => this._pos, this.indentation = () => {
      const n = this._sourceText.match(/\s*/);
      let r = 0;
      if (n && n.length !== 0) {
        const o = n[0];
        let i = 0;
        for (; o.length > i; )
          o.charCodeAt(i) === 9 ? r += 2 : r++, i++;
      }
      return r;
    }, this.current = () => this._sourceText.slice(this._start, this._pos), this._sourceText = t;
  }
  _testNextCharacter(t) {
    const n = this._sourceText.charAt(this._pos);
    let r = !1;
    return typeof t == "string" ? r = n === t : r = t instanceof RegExp ? t.test(n) : t(n), r;
  }
}
function Yt(e) {
  return { ofRule: e };
}
function ct(e, t) {
  return { ofRule: e, isList: !0, separator: t };
}
function gq(e, t) {
  const n = e.match;
  return e.match = (r) => {
    let o = !1;
    return n && (o = n(r)), o && t.every((i) => i.match && !i.match(r));
  }, e;
}
function yo(e, t) {
  return { style: t, match: (n) => n.kind === e };
}
function je(e, t) {
  return {
    style: t || "punctuation",
    match: (n) => n.kind === "Punctuation" && n.value === e
  };
}
const w3 = (e) => e === " " || e === "	" || e === "," || e === `
` || e === "\r" || e === "\uFEFF" || e === " ", x3 = {
  Name: /^[_A-Za-z][_0-9A-Za-z]*/,
  Punctuation: /^(?:!|\$|\(|\)|\.\.\.|:|=|&|@|\[|]|\{|\||\})/,
  Number: /^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,
  String: /^(?:"""(?:\\"""|[^"]|"[^"]|""[^"])*(?:""")?|"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?)/,
  Comment: /^#.*/
}, S3 = {
  Document: [ct("Definition")],
  Definition(e) {
    switch (e.value) {
      case "{":
        return "ShortQuery";
      case "query":
        return "Query";
      case "mutation":
        return "Mutation";
      case "subscription":
        return "Subscription";
      case "fragment":
        return U.FRAGMENT_DEFINITION;
      case "schema":
        return "SchemaDef";
      case "scalar":
        return "ScalarDef";
      case "type":
        return "ObjectTypeDef";
      case "interface":
        return "InterfaceDef";
      case "union":
        return "UnionDef";
      case "enum":
        return "EnumDef";
      case "input":
        return "InputDef";
      case "extend":
        return "ExtendDef";
      case "directive":
        return "DirectiveDef";
    }
  },
  ShortQuery: ["SelectionSet"],
  Query: [
    or("query"),
    Yt(Mt("def")),
    Yt("VariableDefinitions"),
    ct("Directive"),
    "SelectionSet"
  ],
  Mutation: [
    or("mutation"),
    Yt(Mt("def")),
    Yt("VariableDefinitions"),
    ct("Directive"),
    "SelectionSet"
  ],
  Subscription: [
    or("subscription"),
    Yt(Mt("def")),
    Yt("VariableDefinitions"),
    ct("Directive"),
    "SelectionSet"
  ],
  VariableDefinitions: [je("("), ct("VariableDefinition"), je(")")],
  VariableDefinition: ["Variable", je(":"), "Type", Yt("DefaultValue")],
  Variable: [je("$", "variable"), Mt("variable")],
  DefaultValue: [je("="), "Value"],
  SelectionSet: [je("{"), ct("Selection"), je("}")],
  Selection(e, t) {
    return e.value === "..." ? t.match(/[\s\u00a0,]*(on\b|@|{)/, !1) ? "InlineFragment" : "FragmentSpread" : t.match(/[\s\u00a0,]*:/, !1) ? "AliasedField" : "Field";
  },
  AliasedField: [
    Mt("property"),
    je(":"),
    Mt("qualifier"),
    Yt("Arguments"),
    ct("Directive"),
    Yt("SelectionSet")
  ],
  Field: [
    Mt("property"),
    Yt("Arguments"),
    ct("Directive"),
    Yt("SelectionSet")
  ],
  Arguments: [je("("), ct("Argument"), je(")")],
  Argument: [Mt("attribute"), je(":"), "Value"],
  FragmentSpread: [je("..."), Mt("def"), ct("Directive")],
  InlineFragment: [
    je("..."),
    Yt("TypeCondition"),
    ct("Directive"),
    "SelectionSet"
  ],
  FragmentDefinition: [
    or("fragment"),
    Yt(gq(Mt("def"), [or("on")])),
    "TypeCondition",
    ct("Directive"),
    "SelectionSet"
  ],
  TypeCondition: [or("on"), "NamedType"],
  Value(e) {
    switch (e.kind) {
      case "Number":
        return "NumberValue";
      case "String":
        return "StringValue";
      case "Punctuation":
        switch (e.value) {
          case "[":
            return "ListValue";
          case "{":
            return "ObjectValue";
          case "$":
            return "Variable";
          case "&":
            return "NamedType";
        }
        return null;
      case "Name":
        switch (e.value) {
          case "true":
          case "false":
            return "BooleanValue";
        }
        return e.value === "null" ? "NullValue" : "EnumValue";
    }
  },
  NumberValue: [yo("Number", "number")],
  StringValue: [
    {
      style: "string",
      match: (e) => e.kind === "String",
      update(e, t) {
        t.value.startsWith('"""') && (e.inBlockstring = !t.value.slice(3).endsWith('"""'));
      }
    }
  ],
  BooleanValue: [yo("Name", "builtin")],
  NullValue: [yo("Name", "keyword")],
  EnumValue: [Mt("string-2")],
  ListValue: [je("["), ct("Value"), je("]")],
  ObjectValue: [je("{"), ct("ObjectField"), je("}")],
  ObjectField: [Mt("attribute"), je(":"), "Value"],
  Type(e) {
    return e.value === "[" ? "ListType" : "NonNullType";
  },
  ListType: [je("["), "Type", je("]"), Yt(je("!"))],
  NonNullType: ["NamedType", Yt(je("!"))],
  NamedType: [vq("atom")],
  Directive: [je("@", "meta"), Mt("meta"), Yt("Arguments")],
  DirectiveDef: [
    or("directive"),
    je("@", "meta"),
    Mt("meta"),
    Yt("ArgumentsDef"),
    or("on"),
    ct("DirectiveLocation", je("|"))
  ],
  InterfaceDef: [
    or("interface"),
    Mt("atom"),
    Yt("Implements"),
    ct("Directive"),
    je("{"),
    ct("FieldDef"),
    je("}")
  ],
  Implements: [or("implements"), ct("NamedType", je("&"))],
  DirectiveLocation: [Mt("string-2")],
  SchemaDef: [
    or("schema"),
    ct("Directive"),
    je("{"),
    ct("OperationTypeDef"),
    je("}")
  ],
  OperationTypeDef: [Mt("keyword"), je(":"), Mt("atom")],
  ScalarDef: [or("scalar"), Mt("atom"), ct("Directive")],
  ObjectTypeDef: [
    or("type"),
    Mt("atom"),
    Yt("Implements"),
    ct("Directive"),
    je("{"),
    ct("FieldDef"),
    je("}")
  ],
  FieldDef: [
    Mt("property"),
    Yt("ArgumentsDef"),
    je(":"),
    "Type",
    ct("Directive")
  ],
  ArgumentsDef: [je("("), ct("InputValueDef"), je(")")],
  InputValueDef: [
    Mt("attribute"),
    je(":"),
    "Type",
    Yt("DefaultValue"),
    ct("Directive")
  ],
  UnionDef: [
    or("union"),
    Mt("atom"),
    ct("Directive"),
    je("="),
    ct("UnionMember", je("|"))
  ],
  UnionMember: ["NamedType"],
  EnumDef: [
    or("enum"),
    Mt("atom"),
    ct("Directive"),
    je("{"),
    ct("EnumValueDef"),
    je("}")
  ],
  EnumValueDef: [Mt("string-2"), ct("Directive")],
  InputDef: [
    or("input"),
    Mt("atom"),
    ct("Directive"),
    je("{"),
    ct("InputValueDef"),
    je("}")
  ],
  ExtendDef: [or("extend"), "ExtensionDefinition"],
  ExtensionDefinition(e) {
    switch (e.value) {
      case "schema":
        return U.SCHEMA_EXTENSION;
      case "scalar":
        return U.SCALAR_TYPE_EXTENSION;
      case "type":
        return U.OBJECT_TYPE_EXTENSION;
      case "interface":
        return U.INTERFACE_TYPE_EXTENSION;
      case "union":
        return U.UNION_TYPE_EXTENSION;
      case "enum":
        return U.ENUM_TYPE_EXTENSION;
      case "input":
        return U.INPUT_OBJECT_TYPE_EXTENSION;
    }
  },
  [U.SCHEMA_EXTENSION]: ["SchemaDef"],
  [U.SCALAR_TYPE_EXTENSION]: ["ScalarDef"],
  [U.OBJECT_TYPE_EXTENSION]: ["ObjectTypeDef"],
  [U.INTERFACE_TYPE_EXTENSION]: ["InterfaceDef"],
  [U.UNION_TYPE_EXTENSION]: ["UnionDef"],
  [U.ENUM_TYPE_EXTENSION]: ["EnumDef"],
  [U.INPUT_OBJECT_TYPE_EXTENSION]: ["InputDef"]
};
function or(e) {
  return {
    style: "keyword",
    match: (t) => t.kind === "Name" && t.value === e
  };
}
function Mt(e) {
  return {
    style: e,
    match: (t) => t.kind === "Name",
    update(t, n) {
      t.name = n.value;
    }
  };
}
function vq(e) {
  return {
    style: e,
    match: (t) => t.kind === "Name",
    update(t, n) {
      var r;
      !((r = t.prevState) === null || r === void 0) && r.prevState && (t.name = n.value, t.prevState.prevState.type = n.value);
    }
  };
}
function _h(e = {
  eatWhitespace: (t) => t.eatWhile(w3),
  lexRules: x3,
  parseRules: S3,
  editorConfig: {}
}) {
  return {
    startState() {
      const t = {
        level: 0,
        step: 0,
        name: null,
        kind: null,
        type: null,
        rule: null,
        needsSeparator: !1,
        prevState: null
      };
      return Hd(e.parseRules, t, U.DOCUMENT), t;
    },
    token(t, n) {
      return yq(t, n, e);
    }
  };
}
function yq(e, t, n) {
  var r;
  if (t.inBlockstring)
    return e.match(/.*"""/) ? (t.inBlockstring = !1, "string") : (e.skipToEnd(), "string");
  const { lexRules: o, parseRules: i, eatWhitespace: s, editorConfig: l } = n;
  if (t.rule && t.rule.length === 0 ? UC(t) : t.needsAdvance && (t.needsAdvance = !1, sS(t, !0)), e.sol()) {
    const d = (l == null ? void 0 : l.tabSize) || 2;
    t.indentLevel = Math.floor(e.indentation() / d);
  }
  if (s(e))
    return "ws";
  const c = Eq(o, e);
  if (!c)
    return e.match(/\S+/) || e.match(/\s/), Hd(XE, t, "Invalid"), "invalidchar";
  if (c.kind === "Comment")
    return Hd(XE, t, "Comment"), "comment";
  const f = dD({}, t);
  if (c.kind === "Punctuation") {
    if (/^[{([]/.test(c.value))
      t.indentLevel !== void 0 && (t.levels = (t.levels || []).concat(t.indentLevel + 1));
    else if (/^[})\]]/.test(c.value)) {
      const d = t.levels = (t.levels || []).slice(0, -1);
      t.indentLevel && d.length > 0 && d.at(-1) < t.indentLevel && (t.indentLevel = d.at(-1));
    }
  }
  for (; t.rule; ) {
    let d = typeof t.rule == "function" ? t.step === 0 ? t.rule(c, e) : null : t.rule[t.step];
    if (t.needsSeparator && (d = d == null ? void 0 : d.separator), d) {
      if (d.ofRule && (d = d.ofRule), typeof d == "string") {
        Hd(i, t, d);
        continue;
      }
      if (!((r = d.match) === null || r === void 0) && r.call(d, c))
        return d.update && d.update(t, c), c.kind === "Punctuation" ? sS(t, !0) : t.needsAdvance = !0, d.style;
    }
    bq(t);
  }
  return dD(t, f), Hd(XE, t, "Invalid"), "invalidchar";
}
function dD(e, t) {
  const n = Object.keys(t);
  for (let r = 0; r < n.length; r++)
    e[n[r]] = t[n[r]];
  return e;
}
const XE = {
  Invalid: [],
  Comment: []
};
function Hd(e, t, n) {
  if (!e[n])
    throw new TypeError("Unknown rule: " + n);
  t.prevState = Object.assign({}, t), t.kind = n, t.name = null, t.type = null, t.rule = e[n], t.step = 0, t.needsSeparator = !1;
}
function UC(e) {
  e.prevState && (e.kind = e.prevState.kind, e.name = e.prevState.name, e.type = e.prevState.type, e.rule = e.prevState.rule, e.step = e.prevState.step, e.needsSeparator = e.prevState.needsSeparator, e.prevState = e.prevState.prevState);
}
function sS(e, t) {
  var n;
  if (pD(e) && e.rule) {
    const r = e.rule[e.step];
    if (r.separator) {
      const { separator: o } = r;
      if (e.needsSeparator = !e.needsSeparator, !e.needsSeparator && o.ofRule)
        return;
    }
    if (t)
      return;
  }
  for (e.needsSeparator = !1, e.step++; e.rule && !(Array.isArray(e.rule) && e.step < e.rule.length); )
    UC(e), e.rule && (pD(e) ? !((n = e.rule) === null || n === void 0) && n[e.step].separator && (e.needsSeparator = !e.needsSeparator) : (e.needsSeparator = !1, e.step++));
}
function pD(e) {
  const t = Array.isArray(e.rule) && typeof e.rule[e.step] != "string" && e.rule[e.step];
  return t && t.isList;
}
function bq(e) {
  for (; e.rule && !(Array.isArray(e.rule) && e.rule[e.step].ofRule); )
    UC(e);
  e.rule && sS(e, !1);
}
function Eq(e, t) {
  const n = Object.keys(e);
  for (let r = 0; r < n.length; r++) {
    const o = t.match(e[n[r]]);
    if (o && o instanceof Array)
      return { kind: n[r], value: o[0] };
  }
}
const wq = {
  ALIASED_FIELD: "AliasedField",
  ARGUMENTS: "Arguments",
  SHORT_QUERY: "ShortQuery",
  QUERY: "Query",
  MUTATION: "Mutation",
  SUBSCRIPTION: "Subscription",
  TYPE_CONDITION: "TypeCondition",
  INVALID: "Invalid",
  COMMENT: "Comment",
  SCHEMA_DEF: "SchemaDef",
  SCALAR_DEF: "ScalarDef",
  OBJECT_TYPE_DEF: "ObjectTypeDef",
  OBJECT_VALUE: "ObjectValue",
  LIST_VALUE: "ListValue",
  INTERFACE_DEF: "InterfaceDef",
  UNION_DEF: "UnionDef",
  ENUM_DEF: "EnumDef",
  ENUM_VALUE: "EnumValue",
  FIELD_DEF: "FieldDef",
  INPUT_DEF: "InputDef",
  INPUT_VALUE_DEF: "InputValueDef",
  ARGUMENTS_DEF: "ArgumentsDef",
  EXTEND_DEF: "ExtendDef",
  EXTENSION_DEFINITION: "ExtensionDefinition",
  DIRECTIVE_DEF: "DirectiveDef",
  IMPLEMENTS: "Implements",
  VARIABLE_DEFINITIONS: "VariableDefinitions",
  TYPE: "Type"
}, Ne = Object.assign(Object.assign({}, U), wq), T3 = {
  command: "editor.action.triggerSuggest",
  title: "Suggestions"
}, xq = (e) => {
  const t = [];
  if (e)
    try {
      pn(fr(e), {
        FragmentDefinition(n) {
          t.push(n);
        }
      });
    } catch {
      return [];
    }
  return t;
}, Sq = [
  U.SCHEMA_DEFINITION,
  U.OPERATION_TYPE_DEFINITION,
  U.SCALAR_TYPE_DEFINITION,
  U.OBJECT_TYPE_DEFINITION,
  U.INTERFACE_TYPE_DEFINITION,
  U.UNION_TYPE_DEFINITION,
  U.ENUM_TYPE_DEFINITION,
  U.INPUT_OBJECT_TYPE_DEFINITION,
  U.DIRECTIVE_DEFINITION,
  U.SCHEMA_EXTENSION,
  U.SCALAR_TYPE_EXTENSION,
  U.OBJECT_TYPE_EXTENSION,
  U.INTERFACE_TYPE_EXTENSION,
  U.UNION_TYPE_EXTENSION,
  U.ENUM_TYPE_EXTENSION,
  U.INPUT_OBJECT_TYPE_EXTENSION
], Tq = (e) => {
  let t = !1;
  if (e)
    try {
      pn(fr(e), {
        enter(n) {
          if (n.kind !== "Document")
            return Sq.includes(n.kind) ? (t = !0, Xl) : !1;
        }
      });
    } catch {
      return t;
    }
  return t;
};
function Cq(e, t, n, r, o, i) {
  var s;
  const l = Object.assign(Object.assign({}, i), { schema: e }), c = r || Vq(t, n, 1), f = c.state.kind === "Invalid" ? c.state.prevState : c.state, d = (i == null ? void 0 : i.mode) || Bq(t, i == null ? void 0 : i.uri);
  if (!f)
    return [];
  const { kind: g, step: m, prevState: v } = f, b = Uq(e, c.state);
  if (g === Ne.DOCUMENT)
    return d === sc.TYPE_SYSTEM ? _q(c) : Nq(c);
  if (g === Ne.EXTEND_DEF)
    return Oq(c);
  if (((s = v == null ? void 0 : v.prevState) === null || s === void 0 ? void 0 : s.kind) === Ne.EXTENSION_DEFINITION && f.name)
    return on(c, []);
  if ((v == null ? void 0 : v.kind) === U.SCALAR_TYPE_EXTENSION)
    return on(c, Object.values(e.getTypeMap()).filter(pr).map((_) => ({
      label: _.name,
      kind: at.Function
    })));
  if ((v == null ? void 0 : v.kind) === U.OBJECT_TYPE_EXTENSION)
    return on(c, Object.values(e.getTypeMap()).filter((_) => Ye(_) && !_.name.startsWith("__")).map((_) => ({
      label: _.name,
      kind: at.Function
    })));
  if ((v == null ? void 0 : v.kind) === U.INTERFACE_TYPE_EXTENSION)
    return on(c, Object.values(e.getTypeMap()).filter(Ze).map((_) => ({
      label: _.name,
      kind: at.Function
    })));
  if ((v == null ? void 0 : v.kind) === U.UNION_TYPE_EXTENSION)
    return on(c, Object.values(e.getTypeMap()).filter(Zt).map((_) => ({
      label: _.name,
      kind: at.Function
    })));
  if ((v == null ? void 0 : v.kind) === U.ENUM_TYPE_EXTENSION)
    return on(c, Object.values(e.getTypeMap()).filter((_) => Lt(_) && !_.name.startsWith("__")).map((_) => ({
      label: _.name,
      kind: at.Function
    })));
  if ((v == null ? void 0 : v.kind) === U.INPUT_OBJECT_TYPE_EXTENSION)
    return on(c, Object.values(e.getTypeMap()).filter(mt).map((_) => ({
      label: _.name,
      kind: at.Function
    })));
  if (g === Ne.IMPLEMENTS || g === Ne.NAMED_TYPE && (v == null ? void 0 : v.kind) === Ne.IMPLEMENTS)
    return Iq(c, f, e, t, b);
  if (g === Ne.SELECTION_SET || g === Ne.FIELD || g === Ne.ALIASED_FIELD)
    return Aq(c, b, l);
  if (g === Ne.ARGUMENTS || g === Ne.ARGUMENT && m === 0) {
    const { argDefs: _ } = b;
    if (_)
      return on(c, _.map((S) => {
        var x;
        return {
          label: S.name,
          insertText: S.name + ": ",
          command: T3,
          detail: String(S.type),
          documentation: (x = S.description) !== null && x !== void 0 ? x : void 0,
          kind: at.Variable,
          type: S.type
        };
      }));
  }
  if ((g === Ne.OBJECT_VALUE || g === Ne.OBJECT_FIELD && m === 0) && b.objectFieldDefs) {
    const _ = vc(b.objectFieldDefs), S = g === Ne.OBJECT_VALUE ? at.Value : at.Field;
    return on(c, _.map((x) => {
      var C;
      return {
        label: x.name,
        detail: String(x.type),
        documentation: (C = x.description) !== null && C !== void 0 ? C : void 0,
        kind: S,
        type: x.type
      };
    }));
  }
  if (g === Ne.ENUM_VALUE || g === Ne.LIST_VALUE && m === 1 || g === Ne.OBJECT_FIELD && m === 2 || g === Ne.ARGUMENT && m === 2)
    return Dq(c, b, t, e);
  if (g === Ne.VARIABLE && m === 1) {
    const _ = Et(b.inputType), S = C3(t, e, c);
    return on(c, S.filter((x) => x.detail === (_ == null ? void 0 : _.name)));
  }
  if (g === Ne.TYPE_CONDITION && m === 1 || g === Ne.NAMED_TYPE && v != null && v.kind === Ne.TYPE_CONDITION)
    return Lq(c, b, e);
  if (g === Ne.FRAGMENT_SPREAD && m === 1)
    return Rq(c, b, e, t, Array.isArray(o) ? o : xq(o));
  const w = k3(f);
  if (d === sc.TYPE_SYSTEM && !w.needsAdvance && g === Ne.NAMED_TYPE || g === Ne.LIST_TYPE) {
    if (w.kind === Ne.FIELD_DEF)
      return on(c, Object.values(e.getTypeMap()).filter((_) => Os(_) && !_.name.startsWith("__")).map((_) => ({
        label: _.name,
        kind: at.Function
      })));
    if (w.kind === Ne.INPUT_VALUE_DEF)
      return on(c, Object.values(e.getTypeMap()).filter((_) => lr(_) && !_.name.startsWith("__")).map((_) => ({
        label: _.name,
        kind: at.Function
      })));
  }
  return g === Ne.VARIABLE_DEFINITION && m === 2 || g === Ne.LIST_TYPE && m === 1 || g === Ne.NAMED_TYPE && v && (v.kind === Ne.VARIABLE_DEFINITION || v.kind === Ne.LIST_TYPE || v.kind === Ne.NON_NULL_TYPE) ? Pq(c, e) : g === Ne.DIRECTIVE ? $q(c, f, e) : [];
}
const pg = ` {
  $1
}`, kq = (e) => {
  const { type: t } = e;
  return Jt(t) || vt(t) && Jt(t.ofType) || He(t) && (Jt(t.ofType) || vt(t.ofType) && Jt(t.ofType.ofType)) ? pg : null;
};
function _q(e) {
  return on(e, [
    { label: "extend", kind: at.Function },
    { label: "type", kind: at.Function },
    { label: "interface", kind: at.Function },
    { label: "union", kind: at.Function },
    { label: "input", kind: at.Function },
    { label: "scalar", kind: at.Function },
    { label: "schema", kind: at.Function }
  ]);
}
function Nq(e) {
  return on(e, [
    { label: "query", kind: at.Function },
    { label: "mutation", kind: at.Function },
    { label: "subscription", kind: at.Function },
    { label: "fragment", kind: at.Function },
    { label: "{", kind: at.Constructor }
  ]);
}
function Oq(e) {
  return on(e, [
    { label: "type", kind: at.Function },
    { label: "interface", kind: at.Function },
    { label: "union", kind: at.Function },
    { label: "input", kind: at.Function },
    { label: "scalar", kind: at.Function },
    { label: "schema", kind: at.Function }
  ]);
}
function Aq(e, t, n) {
  var r;
  if (t.parentType) {
    const { parentType: o } = t;
    let i = [];
    return "getFields" in o && (i = vc(o.getFields())), Jt(o) && i.push(_o), o === ((r = n == null ? void 0 : n.schema) === null || r === void 0 ? void 0 : r.getQueryType()) && i.push(ei, ti), on(e, i.map((s, l) => {
      var c;
      const f = {
        sortText: String(l) + s.name,
        label: s.name,
        detail: String(s.type),
        documentation: (c = s.description) !== null && c !== void 0 ? c : void 0,
        deprecated: !!s.deprecationReason,
        isDeprecated: !!s.deprecationReason,
        deprecationReason: s.deprecationReason,
        kind: at.Field,
        type: s.type
      };
      if (n != null && n.fillLeafsOnComplete) {
        const d = kq(s);
        d && (f.insertText = s.name + d, f.insertTextFormat = nS.Snippet, f.command = T3);
      }
      return f;
    }));
  }
  return [];
}
function Dq(e, t, n, r) {
  const o = Et(t.inputType), i = C3(n, r, e).filter((s) => s.detail === o.name);
  if (o instanceof Or) {
    const s = o.getValues();
    return on(e, s.map((l) => {
      var c;
      return {
        label: l.name,
        detail: String(o),
        documentation: (c = l.description) !== null && c !== void 0 ? c : void 0,
        deprecated: !!l.deprecationReason,
        isDeprecated: !!l.deprecationReason,
        deprecationReason: l.deprecationReason,
        kind: at.EnumMember,
        type: o
      };
    }).concat(i));
  }
  return o === Wt ? on(e, i.concat([
    {
      label: "true",
      detail: String(Wt),
      documentation: "Not false.",
      kind: at.Variable,
      type: Wt
    },
    {
      label: "false",
      detail: String(Wt),
      documentation: "Not true.",
      kind: at.Variable,
      type: Wt
    }
  ])) : i;
}
function Iq(e, t, n, r, o) {
  if (t.needsSeparator)
    return [];
  const i = n.getTypeMap(), s = vc(i).filter(Ze), l = s.map(({ name: v }) => v), c = /* @__PURE__ */ new Set();
  Ly(r, (v, b) => {
    var w, _, S, x, C;
    if (b.name && (b.kind === Ne.INTERFACE_DEF && !l.includes(b.name) && c.add(b.name), b.kind === Ne.NAMED_TYPE && ((w = b.prevState) === null || w === void 0 ? void 0 : w.kind) === Ne.IMPLEMENTS)) {
      if (o.interfaceDef) {
        if ((_ = o.interfaceDef) === null || _ === void 0 ? void 0 : _.getInterfaces().find(({ name: D }) => D === b.name))
          return;
        const N = n.getType(b.name), I = (S = o.interfaceDef) === null || S === void 0 ? void 0 : S.toConfig();
        o.interfaceDef = new zr(Object.assign(Object.assign({}, I), { interfaces: [
          ...I.interfaces,
          N || new zr({ name: b.name, fields: {} })
        ] }));
      } else if (o.objectTypeDef) {
        if ((x = o.objectTypeDef) === null || x === void 0 ? void 0 : x.getInterfaces().find(({ name: D }) => D === b.name))
          return;
        const N = n.getType(b.name), I = (C = o.objectTypeDef) === null || C === void 0 ? void 0 : C.toConfig();
        o.objectTypeDef = new zn(Object.assign(Object.assign({}, I), { interfaces: [
          ...I.interfaces,
          N || new zr({ name: b.name, fields: {} })
        ] }));
      }
    }
  });
  const f = o.interfaceDef || o.objectTypeDef, g = ((f == null ? void 0 : f.getInterfaces()) || []).map(({ name: v }) => v), m = s.concat([...c].map((v) => ({ name: v }))).filter(({ name: v }) => v !== (f == null ? void 0 : f.name) && !g.includes(v));
  return on(e, m.map((v) => {
    const b = {
      label: v.name,
      kind: at.Interface,
      type: v
    };
    return v != null && v.description && (b.documentation = v.description), b;
  }));
}
function Lq(e, t, n, r) {
  let o;
  if (t.parentType)
    if (qn(t.parentType)) {
      const i = lP(t.parentType), s = n.getPossibleTypes(i), l = /* @__PURE__ */ Object.create(null);
      for (const c of s)
        for (const f of c.getInterfaces())
          l[f.name] = f;
      o = s.concat(vc(l));
    } else
      o = [t.parentType];
  else {
    const i = n.getTypeMap();
    o = vc(i).filter((s) => Jt(s) && !s.name.startsWith("__"));
  }
  return on(e, o.map((i) => {
    const s = Et(i);
    return {
      label: String(i),
      documentation: (s == null ? void 0 : s.description) || "",
      kind: at.Field
    };
  }));
}
function Rq(e, t, n, r, o) {
  if (!r)
    return [];
  const i = n.getTypeMap(), s = fq(e.state), l = Mq(r);
  o && o.length > 0 && l.push(...o);
  const c = l.filter((f) => i[f.typeCondition.name.value] && !(s && s.kind === Ne.FRAGMENT_DEFINITION && s.name === f.name.value) && Jt(t.parentType) && Jt(i[f.typeCondition.name.value]) && Fp(n, t.parentType, i[f.typeCondition.name.value]));
  return on(e, c.map((f) => ({
    label: f.name.value,
    detail: String(i[f.typeCondition.name.value]),
    documentation: `fragment ${f.name.value} on ${f.typeCondition.name.value}`,
    kind: at.Field,
    type: i[f.typeCondition.name.value]
  })));
}
const Fq = (e, t) => {
  var n, r, o, i, s, l, c, f, d, g;
  if (((n = e.prevState) === null || n === void 0 ? void 0 : n.kind) === t)
    return e.prevState;
  if (((o = (r = e.prevState) === null || r === void 0 ? void 0 : r.prevState) === null || o === void 0 ? void 0 : o.kind) === t)
    return e.prevState.prevState;
  if (((l = (s = (i = e.prevState) === null || i === void 0 ? void 0 : i.prevState) === null || s === void 0 ? void 0 : s.prevState) === null || l === void 0 ? void 0 : l.kind) === t)
    return e.prevState.prevState.prevState;
  if (((g = (d = (f = (c = e.prevState) === null || c === void 0 ? void 0 : c.prevState) === null || f === void 0 ? void 0 : f.prevState) === null || d === void 0 ? void 0 : d.prevState) === null || g === void 0 ? void 0 : g.kind) === t)
    return e.prevState.prevState.prevState.prevState;
};
function C3(e, t, n) {
  let r = null, o;
  const i = /* @__PURE__ */ Object.create({});
  return Ly(e, (s, l) => {
    if ((l == null ? void 0 : l.kind) === Ne.VARIABLE && l.name && (r = l.name), (l == null ? void 0 : l.kind) === Ne.NAMED_TYPE && r) {
      const c = Fq(l, Ne.TYPE);
      c != null && c.type && (o = t.getType(c == null ? void 0 : c.type));
    }
    r && o && !i[r] && (i[r] = {
      detail: o.toString(),
      insertText: n.string === "$" ? r : "$" + r,
      label: r,
      type: o,
      kind: at.Variable
    }, r = null, o = null);
  }), vc(i);
}
function Mq(e) {
  const t = [];
  return Ly(e, (n, r) => {
    r.kind === Ne.FRAGMENT_DEFINITION && r.name && r.type && t.push({
      kind: Ne.FRAGMENT_DEFINITION,
      name: {
        kind: U.NAME,
        value: r.name
      },
      selectionSet: {
        kind: Ne.SELECTION_SET,
        selections: []
      },
      typeCondition: {
        kind: Ne.NAMED_TYPE,
        name: {
          kind: U.NAME,
          value: r.type
        }
      }
    });
  }), t;
}
function Pq(e, t, n) {
  const r = t.getTypeMap(), o = vc(r).filter(lr);
  return on(e, o.map((i) => ({
    label: i.name,
    documentation: i.description,
    kind: at.Variable
  })));
}
function $q(e, t, n, r) {
  var o;
  if (!((o = t.prevState) === null || o === void 0) && o.kind) {
    const i = n.getDirectives().filter((s) => jq(t.prevState, s));
    return on(e, i.map((s) => ({
      label: s.name,
      documentation: s.description || "",
      kind: at.Function
    })));
  }
  return [];
}
function Vq(e, t, n = 0) {
  let r = null, o = null, i = null;
  const s = Ly(e, (l, c, f, d) => {
    if (!(d !== t.line || l.getCurrentPosition() + n < t.character + 1))
      return r = f, o = Object.assign({}, c), i = l.current(), "BREAK";
  });
  return {
    start: s.start,
    end: s.end,
    string: i || s.string,
    state: o || s.state,
    style: r || s.style
  };
}
function Ly(e, t) {
  const n = e.split(`
`), r = _h();
  let o = r.startState(), i = "", s = new iS("");
  for (let l = 0; l < n.length; l++) {
    for (s = new iS(n[l]); !s.eol() && (i = r.token(s, o), t(s, o, i, l) !== "BREAK"); )
      ;
    t(s, o, i, l), o.kind || (o = r.startState());
  }
  return {
    start: s.getStartOfToken(),
    end: s.getCurrentPosition(),
    string: s.current(),
    state: o,
    style: i
  };
}
function jq(e, t) {
  if (!(e != null && e.kind))
    return !1;
  const { kind: n, prevState: r } = e, { locations: o } = t;
  switch (n) {
    case Ne.QUERY:
      return o.includes(Fe.QUERY);
    case Ne.MUTATION:
      return o.includes(Fe.MUTATION);
    case Ne.SUBSCRIPTION:
      return o.includes(Fe.SUBSCRIPTION);
    case Ne.FIELD:
    case Ne.ALIASED_FIELD:
      return o.includes(Fe.FIELD);
    case Ne.FRAGMENT_DEFINITION:
      return o.includes(Fe.FRAGMENT_DEFINITION);
    case Ne.FRAGMENT_SPREAD:
      return o.includes(Fe.FRAGMENT_SPREAD);
    case Ne.INLINE_FRAGMENT:
      return o.includes(Fe.INLINE_FRAGMENT);
    case Ne.SCHEMA_DEF:
      return o.includes(Fe.SCHEMA);
    case Ne.SCALAR_DEF:
      return o.includes(Fe.SCALAR);
    case Ne.OBJECT_TYPE_DEF:
      return o.includes(Fe.OBJECT);
    case Ne.FIELD_DEF:
      return o.includes(Fe.FIELD_DEFINITION);
    case Ne.INTERFACE_DEF:
      return o.includes(Fe.INTERFACE);
    case Ne.UNION_DEF:
      return o.includes(Fe.UNION);
    case Ne.ENUM_DEF:
      return o.includes(Fe.ENUM);
    case Ne.ENUM_VALUE:
      return o.includes(Fe.ENUM_VALUE);
    case Ne.INPUT_DEF:
      return o.includes(Fe.INPUT_OBJECT);
    case Ne.INPUT_VALUE_DEF:
      switch (r == null ? void 0 : r.kind) {
        case Ne.ARGUMENTS_DEF:
          return o.includes(Fe.ARGUMENT_DEFINITION);
        case Ne.INPUT_DEF:
          return o.includes(Fe.INPUT_FIELD_DEFINITION);
      }
  }
  return !1;
}
function Uq(e, t) {
  let n, r, o, i, s, l, c, f, d, g, m;
  return b3(t, (v) => {
    var b;
    switch (v.kind) {
      case Ne.QUERY:
      case "ShortQuery":
        g = e.getQueryType();
        break;
      case Ne.MUTATION:
        g = e.getMutationType();
        break;
      case Ne.SUBSCRIPTION:
        g = e.getSubscriptionType();
        break;
      case Ne.INLINE_FRAGMENT:
      case Ne.FRAGMENT_DEFINITION:
        v.type && (g = e.getType(v.type));
        break;
      case Ne.FIELD:
      case Ne.ALIASED_FIELD: {
        !g || !v.name ? s = null : (s = d ? vA(e, d, v.name) : null, g = s ? s.type : null);
        break;
      }
      case Ne.SELECTION_SET:
        d = Et(g);
        break;
      case Ne.DIRECTIVE:
        o = v.name ? e.getDirective(v.name) : null;
        break;
      case Ne.INTERFACE_DEF:
        v.name && (c = null, m = new zr({
          name: v.name,
          interfaces: [],
          fields: {}
        }));
        break;
      case Ne.OBJECT_TYPE_DEF:
        v.name && (m = null, c = new zn({
          name: v.name,
          interfaces: [],
          fields: {}
        }));
        break;
      case Ne.ARGUMENTS: {
        if (v.prevState)
          switch (v.prevState.kind) {
            case Ne.FIELD:
              r = s && s.args;
              break;
            case Ne.DIRECTIVE:
              r = o && o.args;
              break;
            case Ne.ALIASED_FIELD: {
              const C = (b = v.prevState) === null || b === void 0 ? void 0 : b.name;
              if (!C) {
                r = null;
                break;
              }
              const E = d ? vA(e, d, C) : null;
              if (!E) {
                r = null;
                break;
              }
              r = E.args;
              break;
            }
            default:
              r = null;
              break;
          }
        else
          r = null;
        break;
      }
      case Ne.ARGUMENT:
        if (r) {
          for (let C = 0; C < r.length; C++)
            if (r[C].name === v.name) {
              n = r[C];
              break;
            }
        }
        l = n == null ? void 0 : n.type;
        break;
      case Ne.ENUM_VALUE:
        const w = Et(l);
        i = w instanceof Or ? w.getValues().find((C) => C.value === v.name) : null;
        break;
      case Ne.LIST_VALUE:
        const _ = ol(l);
        l = _ instanceof Ht ? _.ofType : null;
        break;
      case Ne.OBJECT_VALUE:
        const S = Et(l);
        f = S instanceof Gr ? S.getFields() : null;
        break;
      case Ne.OBJECT_FIELD:
        const x = v.name && f ? f[v.name] : null;
        l = x == null ? void 0 : x.type;
        break;
      case Ne.NAMED_TYPE:
        v.name && (g = e.getType(v.name));
        break;
    }
  }), {
    argDef: n,
    argDefs: r,
    directiveDef: o,
    enumValue: i,
    fieldDef: s,
    inputType: l,
    objectFieldDefs: f,
    parentType: d,
    type: g,
    interfaceDef: m,
    objectTypeDef: c
  };
}
var sc;
(function(e) {
  e.TYPE_SYSTEM = "TYPE_SYSTEM", e.EXECUTABLE = "EXECUTABLE";
})(sc || (sc = {}));
function Bq(e, t) {
  return t != null && t.endsWith(".graphqls") || Tq(e) ? sc.TYPE_SYSTEM : sc.EXECUTABLE;
}
function k3(e) {
  return e.prevState && e.kind && [
    Ne.NAMED_TYPE,
    Ne.LIST_TYPE,
    Ne.TYPE,
    Ne.NON_NULL_TYPE
  ].includes(e.kind) ? k3(e.prevState) : e;
}
var Ry = { exports: {} };
function _3(e, t) {
  if (e != null)
    return e;
  var n = new Error(t !== void 0 ? t : "Got unexpected " + e);
  throw n.framesToPop = 1, n;
}
Ry.exports = _3;
Ry.exports.default = _3;
Object.defineProperty(Ry.exports, "__esModule", { value: !0 });
var qq = Ry.exports;
const hD = /* @__PURE__ */ is(qq), zq = (e, t) => {
  if (!t)
    return [];
  const n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Set();
  pn(e, {
    FragmentDefinition(s) {
      n.set(s.name.value, !0);
    },
    FragmentSpread(s) {
      r.has(s.name.value) || r.add(s.name.value);
    }
  });
  const o = /* @__PURE__ */ new Set();
  for (const s of r)
    !n.has(s) && t.has(s) && o.add(hD(t.get(s)));
  const i = [];
  for (const s of o)
    pn(s, {
      FragmentSpread(l) {
        !r.has(l.name.value) && t.get(l.name.value) && (o.add(hD(t.get(l.name.value))), r.add(l.name.value));
      }
    }), n.has(s.name.value) || i.push(s);
  return i;
};
class N3 {
  constructor(t, n) {
    this.containsPosition = (r) => this.start.line === r.line ? this.start.character <= r.character : this.end.line === r.line ? this.end.character >= r.character : this.start.line <= r.line && this.end.line >= r.line, this.start = t, this.end = n;
  }
  setStart(t, n) {
    this.start = new yc(t, n);
  }
  setEnd(t, n) {
    this.end = new yc(t, n);
  }
}
class yc {
  constructor(t, n) {
    this.lessThanOrEqualTo = (r) => this.line < r.line || this.line === r.line && this.character <= r.character, this.line = t, this.character = n;
  }
  setLine(t) {
    this.line = t;
  }
  setCharacter(t) {
    this.character = t;
  }
}
const Hq = [
  TC,
  RC,
  FC,
  IC,
  LC,
  DC,
  Cy,
  Ty,
  Oy,
  _C,
  Ny,
  Ay
];
function Wq(e, t, n, r, o) {
  const i = MC.filter((l) => !(l === CC || l === xC || r && l === SC));
  return n && Array.prototype.push.apply(i, n), o && Array.prototype.push.apply(i, Hq), kh(e, t, i).filter((l) => {
    if (l.message.includes("Unknown directive") && l.nodes) {
      const c = l.nodes[0];
      if (c && c.kind === U.DIRECTIVE) {
        const f = c.name.value;
        if (f === "arguments" || f === "argumentDefinitions")
          return !1;
      }
    }
    return !0;
  });
}
function Gq(e, t) {
  const n = /* @__PURE__ */ Object.create(null);
  for (const r of t.definitions)
    if (r.kind === "OperationDefinition") {
      const { variableDefinitions: o } = r;
      if (o)
        for (const { variable: i, type: s } of o) {
          const l = Jn(e, s);
          l ? n[i.name.value] = l : s.kind === U.NAMED_TYPE && s.name.value === "Float" && (n[i.name.value] = Pp);
        }
    }
  return n;
}
function Qq(e, t) {
  const n = t ? Gq(t, e) : void 0, r = [];
  return pn(e, {
    OperationDefinition(o) {
      r.push(o);
    }
  }), { variableToType: n, operations: r };
}
function Yq(e, t) {
  if (t)
    try {
      const n = fr(t);
      return Object.assign(Object.assign({}, Qq(n, e)), { documentAST: n });
    } catch {
      return;
    }
}
const hg = {
  Error: "Error",
  Warning: "Warning",
  Information: "Information",
  Hint: "Hint"
}, aS = {
  [hg.Error]: 1,
  [hg.Warning]: 2,
  [hg.Information]: 3,
  [hg.Hint]: 4
}, s0 = (e, t) => {
  if (!e)
    throw new Error(t);
};
function Kq(e, t = null, n, r, o) {
  var i, s;
  let l = null, c = "";
  o && (c = typeof o == "string" ? o : o.reduce((d, g) => d + pt(g) + `

`, ""));
  const f = c ? `${e}

${c}` : e;
  try {
    l = fr(f);
  } catch (d) {
    if (d instanceof he) {
      const g = Xq((s = (i = d.locations) === null || i === void 0 ? void 0 : i[0]) !== null && s !== void 0 ? s : { line: 0, column: 0 }, f);
      return [
        {
          severity: aS.Error,
          message: d.message,
          source: "GraphQL: Syntax",
          range: g
        }
      ];
    }
    throw d;
  }
  return Jq(l, t, n, r);
}
function Jq(e, t = null, n, r) {
  if (!t)
    return [];
  const o = Wq(t, e, n, r).flatMap((s) => mD(s, aS.Error, "Validation")), i = kh(t, e, [
    n3
  ]).flatMap((s) => mD(s, aS.Warning, "Deprecation"));
  return o.concat(i);
}
function mD(e, t, n) {
  if (!e.nodes)
    return [];
  const r = [];
  for (const [o, i] of e.nodes.entries()) {
    const s = i.kind !== "Variable" && "name" in i && i.name !== void 0 ? i.name : "variable" in i && i.variable !== void 0 ? i.variable : i;
    if (s) {
      s0(e.locations, "GraphQL validation error requires locations.");
      const l = e.locations[o], c = Zq(s), f = l.column + (c.end - c.start);
      r.push({
        source: `GraphQL: ${n}`,
        message: e.message,
        severity: t,
        range: new N3(new yc(l.line - 1, l.column - 1), new yc(l.line - 1, f))
      });
    }
  }
  return r;
}
function Xq(e, t) {
  const n = _h(), r = n.startState(), o = t.split(`
`);
  s0(o.length >= e.line, "Query text must have more lines than where the error happened");
  let i = null;
  for (let f = 0; f < e.line; f++)
    for (i = new iS(o[f]); !i.eol() && n.token(i, r) !== "invalidchar"; )
      ;
  s0(i, "Expected Parser stream to be available.");
  const s = e.line - 1, l = i.getStartOfToken(), c = i.getCurrentPosition();
  return new N3(new yc(s, l), new yc(s, c));
}
function Zq(e) {
  const n = e.loc;
  return s0(n, "Expected ASTNode to have a location."), n;
}
/*!
 * is-primitive <https://github.com/jonschlinkert/is-primitive>
 *
 * Copyright (c) 2014-present, Jon Schlinkert.
 * Released under the MIT License.
 */
var ez = function(t) {
  return typeof t == "object" ? t === null : typeof t != "function";
};
/*!
 * isobject <https://github.com/jonschlinkert/isobject>
 *
 * Copyright (c) 2014-2017, Jon Schlinkert.
 * Released under the MIT License.
 */
var tz = function(t) {
  return t != null && typeof t == "object" && Array.isArray(t) === !1;
};
/*!
 * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
 *
 * Copyright (c) 2014-2017, Jon Schlinkert.
 * Released under the MIT License.
 */
var nz = tz;
function gD(e) {
  return nz(e) === !0 && Object.prototype.toString.call(e) === "[object Object]";
}
var rz = function(t) {
  var n, r;
  return !(gD(t) === !1 || (n = t.constructor, typeof n != "function") || (r = n.prototype, gD(r) === !1) || r.hasOwnProperty("isPrototypeOf") === !1);
};
/*!
 * set-value <https://github.com/jonschlinkert/set-value>
 *
 * Copyright (c) Jon Schlinkert (https://github.com/jonschlinkert).
 * Released under the MIT License.
 */
const { deleteProperty: oz } = Reflect, iz = ez, vD = rz, yD = (e) => typeof e == "object" && e !== null || typeof e == "function", sz = (e) => e === "__proto__" || e === "constructor" || e === "prototype", BC = (e) => {
  if (!iz(e))
    throw new TypeError("Object keys must be strings or symbols");
  if (sz(e))
    throw new Error(`Cannot set unsafe key: "${e}"`);
}, az = (e) => Array.isArray(e) ? e.flat().map(String).join(",") : e, lz = (e, t) => {
  if (typeof e != "string" || !t)
    return e;
  let n = e + ";";
  return t.arrays !== void 0 && (n += `arrays=${t.arrays};`), t.separator !== void 0 && (n += `separator=${t.separator};`), t.split !== void 0 && (n += `split=${t.split};`), t.merge !== void 0 && (n += `merge=${t.merge};`), t.preservePaths !== void 0 && (n += `preservePaths=${t.preservePaths};`), n;
}, cz = (e, t, n) => {
  const r = az(t ? lz(e, t) : e);
  BC(r);
  const o = bc.cache.get(r) || n();
  return bc.cache.set(r, o), o;
}, uz = (e, t = {}) => {
  const n = t.separator || ".", r = n === "/" ? !1 : t.preservePaths;
  if (typeof e == "string" && r !== !1 && /\//.test(e))
    return [e];
  const o = [];
  let i = "";
  const s = (l) => {
    let c;
    l.trim() !== "" && Number.isInteger(c = Number(l)) ? o.push(c) : o.push(l);
  };
  for (let l = 0; l < e.length; l++) {
    const c = e[l];
    if (c === "\\") {
      i += e[++l];
      continue;
    }
    if (c === n) {
      s(i), i = "";
      continue;
    }
    i += c;
  }
  return i && s(i), o;
}, O3 = (e, t) => t && typeof t.split == "function" ? t.split(e) : typeof e == "symbol" ? [e] : Array.isArray(e) ? e : cz(e, t, () => uz(e, t)), fz = (e, t, n, r) => {
  if (BC(t), n === void 0)
    oz(e, t);
  else if (r && r.merge) {
    const o = r.merge === "function" ? r.merge : Object.assign;
    o && vD(e[t]) && vD(n) ? e[t] = o(e[t], n) : e[t] = n;
  } else
    e[t] = n;
  return e;
}, bc = (e, t, n, r) => {
  if (!t || !yD(e))
    return e;
  const o = O3(t, r);
  let i = e;
  for (let s = 0; s < o.length; s++) {
    const l = o[s], c = o[s + 1];
    if (BC(l), c === void 0) {
      fz(i, l, n, r);
      break;
    }
    if (typeof c == "number" && !Array.isArray(i[l])) {
      i = i[l] = [];
      continue;
    }
    yD(i[l]) || (i[l] = {}), i = i[l];
  }
  return e;
};
bc.split = O3;
bc.cache = /* @__PURE__ */ new Map();
bc.clear = () => {
  bc.cache = /* @__PURE__ */ new Map();
};
var dz = bc;
const pz = /* @__PURE__ */ is(dz);
var hz = function() {
  var e = document.getSelection();
  if (!e.rangeCount)
    return function() {
    };
  for (var t = document.activeElement, n = [], r = 0; r < e.rangeCount; r++)
    n.push(e.getRangeAt(r));
  switch (t.tagName.toUpperCase()) {
    case "INPUT":
    case "TEXTAREA":
      t.blur();
      break;
    default:
      t = null;
      break;
  }
  return e.removeAllRanges(), function() {
    e.type === "Caret" && e.removeAllRanges(), e.rangeCount || n.forEach(function(o) {
      e.addRange(o);
    }), t && t.focus();
  };
}, mz = hz, bD = {
  "text/plain": "Text",
  "text/html": "Url",
  default: "Text"
}, gz = "Copy to clipboard: #{key}, Enter";
function vz(e) {
  var t = (/mac os x/i.test(navigator.userAgent) ? "⌘" : "Ctrl") + "+C";
  return e.replace(/#{\s*key\s*}/g, t);
}
function yz(e, t) {
  var n, r, o, i, s, l, c = !1;
  t || (t = {}), n = t.debug || !1;
  try {
    o = mz(), i = document.createRange(), s = document.getSelection(), l = document.createElement("span"), l.textContent = e, l.ariaHidden = "true", l.style.all = "unset", l.style.position = "fixed", l.style.top = 0, l.style.clip = "rect(0, 0, 0, 0)", l.style.whiteSpace = "pre", l.style.webkitUserSelect = "text", l.style.MozUserSelect = "text", l.style.msUserSelect = "text", l.style.userSelect = "text", l.addEventListener("copy", function(d) {
      if (d.stopPropagation(), t.format)
        if (d.preventDefault(), typeof d.clipboardData > "u") {
          n && console.warn("unable to use e.clipboardData"), n && console.warn("trying IE specific stuff"), window.clipboardData.clearData();
          var g = bD[t.format] || bD.default;
          window.clipboardData.setData(g, e);
        } else
          d.clipboardData.clearData(), d.clipboardData.setData(t.format, e);
      t.onCopy && (d.preventDefault(), t.onCopy(d.clipboardData));
    }), document.body.appendChild(l), i.selectNodeContents(l), s.addRange(i);
    var f = document.execCommand("copy");
    if (!f)
      throw new Error("copy command was unsuccessful");
    c = !0;
  } catch (d) {
    n && console.error("unable to copy using execCommand: ", d), n && console.warn("trying IE specific stuff");
    try {
      window.clipboardData.setData(t.format || "text", e), t.onCopy && t.onCopy(window.clipboardData), c = !0;
    } catch (g) {
      n && console.error("unable to copy using clipboardData: ", g), n && console.error("falling back to prompt"), r = vz("message" in t ? t.message : gz), window.prompt(r, e);
    }
  } finally {
    s && (typeof s.removeRange == "function" ? s.removeRange(i) : s.removeAllRanges()), l && document.body.removeChild(l), o();
  }
  return c;
}
var bz = yz;
const Ez = /* @__PURE__ */ is(bz);
function nt() {
  return nt = 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;
  }, nt.apply(this, arguments);
}
function dt(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
  return function(o) {
    if (e == null || e(o), n === !1 || !o.defaultPrevented)
      return t == null ? void 0 : t(o);
  };
}
function wz(e, t) {
  typeof e == "function" ? e(t) : e != null && (e.current = t);
}
function qC(...e) {
  return (t) => e.forEach(
    (n) => wz(n, t)
  );
}
function dr(...e) {
  return k.useCallback(qC(...e), e);
}
function Lc(e, t = []) {
  let n = [];
  function r(i, s) {
    const l = /* @__PURE__ */ k.createContext(s), c = n.length;
    n = [
      ...n,
      s
    ];
    function f(g) {
      const { scope: m, children: v, ...b } = g, w = (m == null ? void 0 : m[e][c]) || l, _ = k.useMemo(
        () => b,
        Object.values(b)
      );
      return /* @__PURE__ */ k.createElement(w.Provider, {
        value: _
      }, v);
    }
    function d(g, m) {
      const v = (m == null ? void 0 : m[e][c]) || l, b = k.useContext(v);
      if (b)
        return b;
      if (s !== void 0)
        return s;
      throw new Error(`\`${g}\` must be used within \`${i}\``);
    }
    return f.displayName = i + "Provider", [
      f,
      d
    ];
  }
  const o = () => {
    const i = n.map((s) => /* @__PURE__ */ k.createContext(s));
    return function(l) {
      const c = (l == null ? void 0 : l[e]) || i;
      return k.useMemo(
        () => ({
          [`__scope${e}`]: {
            ...l,
            [e]: c
          }
        }),
        [
          l,
          c
        ]
      );
    };
  };
  return o.scopeName = e, [
    r,
    xz(o, ...t)
  ];
}
function xz(...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(i) {
      const s = r.reduce((l, { useScope: c, scopeName: f }) => {
        const g = c(i)[`__scope${f}`];
        return {
          ...l,
          ...g
        };
      }, {});
      return k.useMemo(
        () => ({
          [`__scope${t.scopeName}`]: s
        }),
        [
          s
        ]
      );
    };
  };
  return n.scopeName = t.scopeName, n;
}
const wf = globalThis != null && globalThis.document ? k.useLayoutEffect : () => {
}, Sz = Ww.useId || (() => {
});
let Tz = 0;
function ac(e) {
  const [t, n] = k.useState(Sz());
  return wf(() => {
    e || n(
      (r) => r ?? String(Tz++)
    );
  }, [
    e
  ]), e || (t ? `radix-${t}` : "");
}
function ts(e) {
  const t = k.useRef(e);
  return k.useEffect(() => {
    t.current = e;
  }), k.useMemo(
    () => (...n) => {
      var r;
      return (r = t.current) === null || r === void 0 ? void 0 : r.call(t, ...n);
    },
    []
  );
}
function Fy({ prop: e, defaultProp: t, onChange: n = () => {
} }) {
  const [r, o] = Cz({
    defaultProp: t,
    onChange: n
  }), i = e !== void 0, s = i ? e : r, l = ts(n), c = k.useCallback((f) => {
    if (i) {
      const g = typeof f == "function" ? f(e) : f;
      g !== e && l(g);
    } else
      o(f);
  }, [
    i,
    e,
    o,
    l
  ]);
  return [
    s,
    c
  ];
}
function Cz({ defaultProp: e, onChange: t }) {
  const n = k.useState(e), [r] = n, o = k.useRef(r), i = ts(t);
  return k.useEffect(() => {
    o.current !== r && (i(r), o.current = r);
  }, [
    r,
    o,
    i
  ]), n;
}
const xf = /* @__PURE__ */ k.forwardRef((e, t) => {
  const { children: n, ...r } = e, o = k.Children.toArray(n), i = o.find(kz);
  if (i) {
    const s = i.props.children, l = o.map((c) => c === i ? k.Children.count(s) > 1 ? k.Children.only(null) : /* @__PURE__ */ k.isValidElement(s) ? s.props.children : null : c);
    return /* @__PURE__ */ k.createElement(lS, nt({}, r, {
      ref: t
    }), /* @__PURE__ */ k.isValidElement(s) ? /* @__PURE__ */ k.cloneElement(s, void 0, l) : null);
  }
  return /* @__PURE__ */ k.createElement(lS, nt({}, r, {
    ref: t
  }), n);
});
xf.displayName = "Slot";
const lS = /* @__PURE__ */ k.forwardRef((e, t) => {
  const { children: n, ...r } = e;
  return /* @__PURE__ */ k.isValidElement(n) ? /* @__PURE__ */ k.cloneElement(n, {
    ..._z(r, n.props),
    ref: t ? qC(t, n.ref) : n.ref
  }) : k.Children.count(n) > 1 ? k.Children.only(null) : null;
});
lS.displayName = "SlotClone";
const A3 = ({ children: e }) => /* @__PURE__ */ k.createElement(k.Fragment, null, e);
function kz(e) {
  return /* @__PURE__ */ k.isValidElement(e) && e.type === A3;
}
function _z(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] = (...l) => {
      i(...l), o(...l);
    } : o && (n[r] = o) : r === "style" ? n[r] = {
      ...o,
      ...i
    } : r === "className" && (n[r] = [
      o,
      i
    ].filter(Boolean).join(" "));
  }
  return {
    ...e,
    ...n
  };
}
const Nz = [
  "a",
  "button",
  "div",
  "form",
  "h2",
  "h3",
  "img",
  "input",
  "label",
  "li",
  "nav",
  "ol",
  "p",
  "span",
  "svg",
  "ul"
], Ar = Nz.reduce((e, t) => {
  const n = /* @__PURE__ */ k.forwardRef((r, o) => {
    const { asChild: i, ...s } = r, l = i ? xf : t;
    return k.useEffect(() => {
      window[Symbol.for("radix-ui")] = !0;
    }, []), /* @__PURE__ */ k.createElement(l, nt({}, s, {
      ref: o
    }));
  });
  return n.displayName = `Primitive.${t}`, {
    ...e,
    [t]: n
  };
}, {});
function D3(e, t) {
  e && vh.flushSync(
    () => e.dispatchEvent(t)
  );
}
function Oz(e, t = globalThis == null ? void 0 : globalThis.document) {
  const n = ts(e);
  k.useEffect(() => {
    const r = (o) => {
      o.key === "Escape" && n(o);
    };
    return t.addEventListener("keydown", r), () => t.removeEventListener("keydown", r);
  }, [
    n,
    t
  ]);
}
const cS = "dismissableLayer.update", Az = "dismissableLayer.pointerDownOutside", Dz = "dismissableLayer.focusOutside";
let ED;
const Iz = /* @__PURE__ */ k.createContext({
  layers: /* @__PURE__ */ new Set(),
  layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
  branches: /* @__PURE__ */ new Set()
}), zC = /* @__PURE__ */ k.forwardRef((e, t) => {
  var n;
  const { disableOutsidePointerEvents: r = !1, onEscapeKeyDown: o, onPointerDownOutside: i, onFocusOutside: s, onInteractOutside: l, onDismiss: c, ...f } = e, d = k.useContext(Iz), [g, m] = k.useState(null), v = (n = g == null ? void 0 : g.ownerDocument) !== null && n !== void 0 ? n : globalThis == null ? void 0 : globalThis.document, [, b] = k.useState({}), w = dr(
    t,
    (A) => m(A)
  ), _ = Array.from(d.layers), [S] = [
    ...d.layersWithOutsidePointerEventsDisabled
  ].slice(-1), x = _.indexOf(S), C = g ? _.indexOf(g) : -1, E = d.layersWithOutsidePointerEventsDisabled.size > 0, N = C >= x, I = Lz((A) => {
    const F = A.target, $ = [
      ...d.branches
    ].some(
      (q) => q.contains(F)
    );
    !N || $ || (i == null || i(A), l == null || l(A), A.defaultPrevented || c == null || c());
  }, v), D = Rz((A) => {
    const F = A.target;
    [
      ...d.branches
    ].some(
      (q) => q.contains(F)
    ) || (s == null || s(A), l == null || l(A), A.defaultPrevented || c == null || c());
  }, v);
  return Oz((A) => {
    C === d.layers.size - 1 && (o == null || o(A), !A.defaultPrevented && c && (A.preventDefault(), c()));
  }, v), k.useEffect(() => {
    if (g)
      return r && (d.layersWithOutsidePointerEventsDisabled.size === 0 && (ED = v.body.style.pointerEvents, v.body.style.pointerEvents = "none"), d.layersWithOutsidePointerEventsDisabled.add(g)), d.layers.add(g), wD(), () => {
        r && d.layersWithOutsidePointerEventsDisabled.size === 1 && (v.body.style.pointerEvents = ED);
      };
  }, [
    g,
    v,
    r,
    d
  ]), k.useEffect(() => () => {
    g && (d.layers.delete(g), d.layersWithOutsidePointerEventsDisabled.delete(g), wD());
  }, [
    g,
    d
  ]), k.useEffect(() => {
    const A = () => b({});
    return document.addEventListener(cS, A), () => document.removeEventListener(cS, A);
  }, []), /* @__PURE__ */ k.createElement(Ar.div, nt({}, f, {
    ref: w,
    style: {
      pointerEvents: E ? N ? "auto" : "none" : void 0,
      ...e.style
    },
    onFocusCapture: dt(e.onFocusCapture, D.onFocusCapture),
    onBlurCapture: dt(e.onBlurCapture, D.onBlurCapture),
    onPointerDownCapture: dt(e.onPointerDownCapture, I.onPointerDownCapture)
  }));
});
function Lz(e, t = globalThis == null ? void 0 : globalThis.document) {
  const n = ts(e), r = k.useRef(!1), o = k.useRef(() => {
  });
  return k.useEffect(() => {
    const i = (l) => {
      if (l.target && !r.current) {
        let f = function() {
          I3(Az, n, c, {
            discrete: !0
          });
        };
        const c = {
          originalEvent: l
        };
        l.pointerType === "touch" ? (t.removeEventListener("click", o.current), o.current = f, t.addEventListener("click", o.current, {
          once: !0
        })) : f();
      } else
        t.removeEventListener("click", o.current);
      r.current = !1;
    }, s = window.setTimeout(() => {
      t.addEventListener("pointerdown", i);
    }, 0);
    return () => {
      window.clearTimeout(s), t.removeEventListener("pointerdown", i), t.removeEventListener("click", o.current);
    };
  }, [
    t,
    n
  ]), {
    // ensures we check React component tree (not just DOM tree)
    onPointerDownCapture: () => r.current = !0
  };
}
function Rz(e, t = globalThis == null ? void 0 : globalThis.document) {
  const n = ts(e), r = k.useRef(!1);
  return k.useEffect(() => {
    const o = (i) => {
      i.target && !r.current && I3(Dz, n, {
        originalEvent: i
      }, {
        discrete: !1
      });
    };
    return t.addEventListener("focusin", o), () => t.removeEventListener("focusin", o);
  }, [
    t,
    n
  ]), {
    onFocusCapture: () => r.current = !0,
    onBlurCapture: () => r.current = !1
  };
}
function wD() {
  const e = new CustomEvent(cS);
  document.dispatchEvent(e);
}
function I3(e, t, n, { discrete: r }) {
  const o = n.originalEvent.target, i = new CustomEvent(e, {
    bubbles: !1,
    cancelable: !0,
    detail: n
  });
  t && o.addEventListener(e, t, {
    once: !0
  }), r ? D3(o, i) : o.dispatchEvent(i);
}
const ZE = "focusScope.autoFocusOnMount", ew = "focusScope.autoFocusOnUnmount", xD = {
  bubbles: !1,
  cancelable: !0
}, L3 = /* @__PURE__ */ k.forwardRef((e, t) => {
  const { loop: n = !1, trapped: r = !1, onMountAutoFocus: o, onUnmountAutoFocus: i, ...s } = e, [l, c] = k.useState(null), f = ts(o), d = ts(i), g = k.useRef(null), m = dr(
    t,
    (w) => c(w)
  ), v = k.useRef({
    paused: !1,
    pause() {
      this.paused = !0;
    },
    resume() {
      this.paused = !1;
    }
  }).current;
  k.useEffect(() => {
    if (r) {
      let w = function(C) {
        if (v.paused || !l)
          return;
        const E = C.target;
        l.contains(E) ? g.current = E : va(g.current, {
          select: !0
        });
      }, _ = function(C) {
        if (v.paused || !l)
          return;
        const E = C.relatedTarget;
        E !== null && (l.contains(E) || va(g.current, {
          select: !0
        }));
      }, S = function(C) {
        if (document.activeElement === document.body)
          for (const N of C)
            N.removedNodes.length > 0 && va(l);
      };
      document.addEventListener("focusin", w), document.addEventListener("focusout", _);
      const x = new MutationObserver(S);
      return l && x.observe(l, {
        childList: !0,
        subtree: !0
      }), () => {
        document.removeEventListener("focusin", w), document.removeEventListener("focusout", _), x.disconnect();
      };
    }
  }, [
    r,
    l,
    v.paused
  ]), k.useEffect(() => {
    if (l) {
      TD.add(v);
      const w = document.activeElement;
      if (!l.contains(w)) {
        const S = new CustomEvent(ZE, xD);
        l.addEventListener(ZE, f), l.dispatchEvent(S), S.defaultPrevented || (Fz(jz(R3(l)), {
          select: !0
        }), document.activeElement === w && va(l));
      }
      return () => {
        l.removeEventListener(ZE, f), setTimeout(() => {
          const S = new CustomEvent(ew, xD);
          l.addEventListener(ew, d), l.dispatchEvent(S), S.defaultPrevented || va(w ?? document.body, {
            select: !0
          }), l.removeEventListener(ew, d), TD.remove(v);
        }, 0);
      };
    }
  }, [
    l,
    f,
    d,
    v
  ]);
  const b = k.useCallback((w) => {
    if (!n && !r || v.paused)
      return;
    const _ = w.key === "Tab" && !w.altKey && !w.ctrlKey && !w.metaKey, S = document.activeElement;
    if (_ && S) {
      const x = w.currentTarget, [C, E] = Mz(x);
      C && E ? !w.shiftKey && S === E ? (w.preventDefault(), n && va(C, {
        select: !0
      })) : w.shiftKey && S === C && (w.preventDefault(), n && va(E, {
        select: !0
      })) : S === x && w.preventDefault();
    }
  }, [
    n,
    r,
    v.paused
  ]);
  return /* @__PURE__ */ k.createElement(Ar.div, nt({
    tabIndex: -1
  }, s, {
    ref: m,
    onKeyDown: b
  }));
});
function Fz(e, { select: t = !1 } = {}) {
  const n = document.activeElement;
  for (const r of e)
    if (va(r, {
      select: t
    }), document.activeElement !== n)
      return;
}
function Mz(e) {
  const t = R3(e), n = SD(t, e), r = SD(t.reverse(), e);
  return [
    n,
    r
  ];
}
function R3(e) {
  const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
    acceptNode: (r) => {
      const o = r.tagName === "INPUT" && r.type === "hidden";
      return r.disabled || r.hidden || o ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
    }
  });
  for (; n.nextNode(); )
    t.push(n.currentNode);
  return t;
}
function SD(e, t) {
  for (const n of e)
    if (!Pz(n, {
      upTo: t
    }))
      return n;
}
function Pz(e, { upTo: t }) {
  if (getComputedStyle(e).visibility === "hidden")
    return !0;
  for (; e; ) {
    if (t !== void 0 && e === t)
      return !1;
    if (getComputedStyle(e).display === "none")
      return !0;
    e = e.parentElement;
  }
  return !1;
}
function $z(e) {
  return e instanceof HTMLInputElement && "select" in e;
}
function va(e, { select: t = !1 } = {}) {
  if (e && e.focus) {
    const n = document.activeElement;
    e.focus({
      preventScroll: !0
    }), e !== n && $z(e) && t && e.select();
  }
}
const TD = Vz();
function Vz() {
  let e = [];
  return {
    add(t) {
      const n = e[0];
      t !== n && (n == null || n.pause()), e = CD(e, t), e.unshift(t);
    },
    remove(t) {
      var n;
      e = CD(e, t), (n = e[0]) === null || n === void 0 || n.resume();
    }
  };
}
function CD(e, t) {
  const n = [
    ...e
  ], r = n.indexOf(t);
  return r !== -1 && n.splice(r, 1), n;
}
function jz(e) {
  return e.filter(
    (t) => t.tagName !== "A"
  );
}
const HC = /* @__PURE__ */ k.forwardRef((e, t) => {
  var n;
  const { container: r = globalThis == null || (n = globalThis.document) === null || n === void 0 ? void 0 : n.body, ...o } = e;
  return r ? /* @__PURE__ */ jv.createPortal(/* @__PURE__ */ k.createElement(Ar.div, nt({}, o, {
    ref: t
  })), r) : null;
});
function Uz(e, t) {
  return k.useReducer((n, r) => {
    const o = t[n][r];
    return o ?? n;
  }, e);
}
const al = (e) => {
  const { present: t, children: n } = e, r = Bz(t), o = typeof n == "function" ? n({
    present: r.isPresent
  }) : k.Children.only(n), i = dr(r.ref, o.ref);
  return typeof n == "function" || r.isPresent ? /* @__PURE__ */ k.cloneElement(o, {
    ref: i
  }) : null;
};
al.displayName = "Presence";
function Bz(e) {
  const [t, n] = k.useState(), r = k.useRef({}), o = k.useRef(e), i = k.useRef("none"), s = e ? "mounted" : "unmounted", [l, c] = Uz(s, {
    mounted: {
      UNMOUNT: "unmounted",
      ANIMATION_OUT: "unmountSuspended"
    },
    unmountSuspended: {
      MOUNT: "mounted",
      ANIMATION_END: "unmounted"
    },
    unmounted: {
      MOUNT: "mounted"
    }
  });
  return k.useEffect(() => {
    const f = mg(r.current);
    i.current = l === "mounted" ? f : "none";
  }, [
    l
  ]), wf(() => {
    const f = r.current, d = o.current;
    if (d !== e) {
      const m = i.current, v = mg(f);
      e ? c("MOUNT") : v === "none" || (f == null ? void 0 : f.display) === "none" ? c("UNMOUNT") : c(d && m !== v ? "ANIMATION_OUT" : "UNMOUNT"), o.current = e;
    }
  }, [
    e,
    c
  ]), wf(() => {
    if (t) {
      const f = (g) => {
        const v = mg(r.current).includes(g.animationName);
        g.target === t && v && vh.flushSync(
          () => c("ANIMATION_END")
        );
      }, d = (g) => {
        g.target === t && (i.current = mg(r.current));
      };
      return t.addEventListener("animationstart", d), t.addEventListener("animationcancel", f), t.addEventListener("animationend", f), () => {
        t.removeEventListener("animationstart", d), t.removeEventListener("animationcancel", f), t.removeEventListener("animationend", f);
      };
    } else
      c("ANIMATION_END");
  }, [
    t,
    c
  ]), {
    isPresent: [
      "mounted",
      "unmountSuspended"
    ].includes(l),
    ref: k.useCallback((f) => {
      f && (r.current = getComputedStyle(f)), n(f);
    }, [])
  };
}
function mg(e) {
  return (e == null ? void 0 : e.animationName) || "none";
}
let tw = 0;
function F3() {
  k.useEffect(() => {
    var e, t;
    const n = document.querySelectorAll("[data-radix-focus-guard]");
    return document.body.insertAdjacentElement("afterbegin", (e = n[0]) !== null && e !== void 0 ? e : kD()), document.body.insertAdjacentElement("beforeend", (t = n[1]) !== null && t !== void 0 ? t : kD()), tw++, () => {
      tw === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach(
        (r) => r.remove()
      ), tw--;
    };
  }, []);
}
function kD() {
  const e = document.createElement("span");
  return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.cssText = "outline: none; opacity: 0; position: fixed; pointer-events: none", e;
}
var uS = function(e, t) {
  return uS = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, r) {
    n.__proto__ = r;
  } || function(n, r) {
    for (var o in r)
      Object.prototype.hasOwnProperty.call(r, o) && (n[o] = r[o]);
  }, uS(e, t);
};
function M3(e, t) {
  if (typeof t != "function" && t !== null)
    throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
  uS(e, t);
  function n() {
    this.constructor = e;
  }
  e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n());
}
var Te = function() {
  return Te = Object.assign || function(t) {
    for (var n, r = 1, o = arguments.length; r < o; r++) {
      n = arguments[r];
      for (var i in n)
        Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]);
    }
    return t;
  }, Te.apply(this, arguments);
};
function Dr(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 en(e, t) {
  var n = typeof Symbol == "function" && e[Symbol.iterator];
  if (!n)
    return e;
  var r = n.call(e), o, i = [], s;
  try {
    for (; (t === void 0 || t-- > 0) && !(o = r.next()).done; )
      i.push(o.value);
  } catch (l) {
    s = { error: l };
  } finally {
    try {
      o && !o.done && (n = r.return) && n.call(r);
    } finally {
      if (s)
        throw s.error;
    }
  }
  return i;
}
function _i(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 ev = "right-scroll-bar-position", tv = "width-before-scroll-bar", qz = "with-scroll-bars-hidden", zz = "--removed-body-scroll-bar-size";
function Hz(e, t) {
  return typeof e == "function" ? e(t) : e && (e.current = t), e;
}
function Wz(e, t) {
  var n = k.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;
}
function Gz(e, t) {
  return Wz(t || null, function(n) {
    return e.forEach(function(r) {
      return Hz(r, n);
    });
  });
}
function Qz(e) {
  return e;
}
function Yz(e, t) {
  t === void 0 && (t = Qz);
  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 s = t(i, r);
      return n.push(s), function() {
        n = n.filter(function(l) {
          return l !== s;
        });
      };
    },
    assignSyncMedium: function(i) {
      for (r = !0; n.length; ) {
        var s = n;
        n = [], s.forEach(i);
      }
      n = {
        push: function(l) {
          return i(l);
        },
        filter: function() {
          return n;
        }
      };
    },
    assignMedium: function(i) {
      r = !0;
      var s = [];
      if (n.length) {
        var l = n;
        n = [], l.forEach(i), s = n;
      }
      var c = function() {
        var d = s;
        s = [], d.forEach(i);
      }, f = function() {
        return Promise.resolve().then(c);
      };
      f(), n = {
        push: function(d) {
          s.push(d), f();
        },
        filter: function(d) {
          return s = s.filter(d), n;
        }
      };
    }
  };
  return o;
}
function Kz(e) {
  e === void 0 && (e = {});
  var t = Yz(null);
  return t.options = Te({ async: !0, ssr: !1 }, e), t;
}
var P3 = function(e) {
  var t = e.sideCar, n = Dr(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 k.createElement(r, Te({}, n));
};
P3.isSideCarExport = !0;
function Jz(e, t) {
  return e.useMedium(t), P3;
}
var $3 = Kz(), nw = function() {
}, My = k.forwardRef(function(e, t) {
  var n = k.useRef(null), r = k.useState({
    onScrollCapture: nw,
    onWheelCapture: nw,
    onTouchMoveCapture: nw
  }), o = r[0], i = r[1], s = e.forwardProps, l = e.children, c = e.className, f = e.removeScrollBar, d = e.enabled, g = e.shards, m = e.sideCar, v = e.noIsolation, b = e.inert, w = e.allowPinchZoom, _ = e.as, S = _ === void 0 ? "div" : _, x = Dr(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as"]), C = m, E = Gz([n, t]), N = Te(Te({}, x), o);
  return k.createElement(
    k.Fragment,
    null,
    d && k.createElement(C, { sideCar: $3, removeScrollBar: f, shards: g, noIsolation: v, inert: b, setCallbacks: i, allowPinchZoom: !!w, lockRef: n }),
    s ? k.cloneElement(k.Children.only(l), Te(Te({}, N), { ref: E })) : k.createElement(S, Te({}, N, { className: c, ref: E }), l)
  );
});
My.defaultProps = {
  enabled: !0,
  removeScrollBar: !0,
  inert: !1
};
My.classNames = {
  fullWidth: tv,
  zeroRight: ev
};
var Xz = function() {
  if (typeof __webpack_nonce__ < "u")
    return __webpack_nonce__;
};
function Zz() {
  if (!document)
    return null;
  var e = document.createElement("style");
  e.type = "text/css";
  var t = Xz();
  return t && e.setAttribute("nonce", t), e;
}
function eH(e, t) {
  e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
}
function tH(e) {
  var t = document.head || document.getElementsByTagName("head")[0];
  t.appendChild(e);
}
var nH = function() {
  var e = 0, t = null;
  return {
    add: function(n) {
      e == 0 && (t = Zz()) && (eH(t, n), tH(t)), e++;
    },
    remove: function() {
      e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
    }
  };
}, rH = function() {
  var e = nH();
  return function(t, n) {
    k.useEffect(function() {
      return e.add(t), function() {
        e.remove();
      };
    }, [t && n]);
  };
}, V3 = function() {
  var e = rH(), t = function(n) {
    var r = n.styles, o = n.dynamic;
    return e(r, o), null;
  };
  return t;
}, oH = {
  left: 0,
  top: 0,
  right: 0,
  gap: 0
}, rw = function(e) {
  return parseInt(e || "", 10) || 0;
}, iH = 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 [rw(n), rw(r), rw(o)];
}, sH = function(e) {
  if (e === void 0 && (e = "margin"), typeof window > "u")
    return oH;
  var t = iH(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])
  };
}, aH = V3(), lH = function(e, t, n, r) {
  var o = e.left, i = e.top, s = e.right, l = e.gap;
  return n === void 0 && (n = "margin"), `
  .`.concat(qz, ` {
   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(s, `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(ev, ` {
    right: `).concat(l, "px ").concat(r, `;
  }
  
  .`).concat(tv, ` {
    margin-right: `).concat(l, "px ").concat(r, `;
  }
  
  .`).concat(ev, " .").concat(ev, ` {
    right: 0 `).concat(r, `;
  }
  
  .`).concat(tv, " .").concat(tv, ` {
    margin-right: 0 `).concat(r, `;
  }
  
  body {
    `).concat(zz, ": ").concat(l, `px;
  }
`);
}, cH = function(e) {
  var t = e.noRelative, n = e.noImportant, r = e.gapMode, o = r === void 0 ? "margin" : r, i = k.useMemo(function() {
    return sH(o);
  }, [o]);
  return k.createElement(aH, { styles: lH(i, !t, o, n ? "" : "!important") });
}, fS = !1;
if (typeof window < "u")
  try {
    var gg = Object.defineProperty({}, "passive", {
      get: function() {
        return fS = !0, !0;
      }
    });
    window.addEventListener("test", gg, gg), window.removeEventListener("test", gg, gg);
  } catch {
    fS = !1;
  }
var bu = fS ? { passive: !1 } : !1, uH = function(e) {
  return e.tagName === "TEXTAREA";
}, j3 = function(e, t) {
  var n = window.getComputedStyle(e);
  return (
    // not-not-scrollable
    n[t] !== "hidden" && // contains scroll inside self
    !(n.overflowY === n.overflowX && !uH(e) && n[t] === "visible")
  );
}, fH = function(e) {
  return j3(e, "overflowY");
}, dH = function(e) {
  return j3(e, "overflowX");
}, _D = function(e, t) {
  var n = t;
  do {
    typeof ShadowRoot < "u" && n instanceof ShadowRoot && (n = n.host);
    var r = U3(e, n);
    if (r) {
      var o = B3(e, n), i = o[1], s = o[2];
      if (i > s)
        return !0;
    }
    n = n.parentNode;
  } while (n && n !== document.body);
  return !1;
}, pH = function(e) {
  var t = e.scrollTop, n = e.scrollHeight, r = e.clientHeight;
  return [
    t,
    n,
    r
  ];
}, hH = function(e) {
  var t = e.scrollLeft, n = e.scrollWidth, r = e.clientWidth;
  return [
    t,
    n,
    r
  ];
}, U3 = function(e, t) {
  return e === "v" ? fH(t) : dH(t);
}, B3 = function(e, t) {
  return e === "v" ? pH(t) : hH(t);
}, mH = function(e, t) {
  return e === "h" && t === "rtl" ? -1 : 1;
}, gH = function(e, t, n, r, o) {
  var i = mH(e, window.getComputedStyle(t).direction), s = i * r, l = n.target, c = t.contains(l), f = !1, d = s > 0, g = 0, m = 0;
  do {
    var v = B3(e, l), b = v[0], w = v[1], _ = v[2], S = w - _ - i * b;
    (b || S) && U3(e, l) && (g += S, m += b), l = l.parentNode;
  } while (
    // portaled content
    !c && l !== document.body || // self content
    c && (t.contains(l) || t === l)
  );
  return (d && (o && g === 0 || !o && s > g) || !d && (o && m === 0 || !o && -s > m)) && (f = !0), f;
}, vg = function(e) {
  return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
}, ND = function(e) {
  return [e.deltaX, e.deltaY];
}, OD = function(e) {
  return e && "current" in e ? e.current : e;
}, vH = function(e, t) {
  return e[0] === t[0] && e[1] === t[1];
}, yH = function(e) {
  return `
  .block-interactivity-`.concat(e, ` {pointer-events: none;}
  .allow-interactivity-`).concat(e, ` {pointer-events: all;}
`);
}, bH = 0, Eu = [];
function EH(e) {
  var t = k.useRef([]), n = k.useRef([0, 0]), r = k.useRef(), o = k.useState(bH++)[0], i = k.useState(function() {
    return V3();
  })[0], s = k.useRef(e);
  k.useEffect(function() {
    s.current = e;
  }, [e]), k.useEffect(function() {
    if (e.inert) {
      document.body.classList.add("block-interactivity-".concat(o));
      var w = _i([e.lockRef.current], (e.shards || []).map(OD), !0).filter(Boolean);
      return w.forEach(function(_) {
        return _.classList.add("allow-interactivity-".concat(o));
      }), function() {
        document.body.classList.remove("block-interactivity-".concat(o)), w.forEach(function(_) {
          return _.classList.remove("allow-interactivity-".concat(o));
        });
      };
    }
  }, [e.inert, e.lockRef.current, e.shards]);
  var l = k.useCallback(function(w, _) {
    if ("touches" in w && w.touches.length === 2)
      return !s.current.allowPinchZoom;
    var S = vg(w), x = n.current, C = "deltaX" in w ? w.deltaX : x[0] - S[0], E = "deltaY" in w ? w.deltaY : x[1] - S[1], N, I = w.target, D = Math.abs(C) > Math.abs(E) ? "h" : "v";
    if ("touches" in w && D === "h" && I.type === "range")
      return !1;
    var A = _D(D, I);
    if (!A)
      return !0;
    if (A ? N = D : (N = D === "v" ? "h" : "v", A = _D(D, I)), !A)
      return !1;
    if (!r.current && "changedTouches" in w && (C || E) && (r.current = N), !N)
      return !0;
    var F = r.current || N;
    return gH(F, _, w, F === "h" ? C : E, !0);
  }, []), c = k.useCallback(function(w) {
    var _ = w;
    if (!(!Eu.length || Eu[Eu.length - 1] !== i)) {
      var S = "deltaY" in _ ? ND(_) : vg(_), x = t.current.filter(function(N) {
        return N.name === _.type && N.target === _.target && vH(N.delta, S);
      })[0];
      if (x && x.should) {
        _.cancelable && _.preventDefault();
        return;
      }
      if (!x) {
        var C = (s.current.shards || []).map(OD).filter(Boolean).filter(function(N) {
          return N.contains(_.target);
        }), E = C.length > 0 ? l(_, C[0]) : !s.current.noIsolation;
        E && _.cancelable && _.preventDefault();
      }
    }
  }, []), f = k.useCallback(function(w, _, S, x) {
    var C = { name: w, delta: _, target: S, should: x };
    t.current.push(C), setTimeout(function() {
      t.current = t.current.filter(function(E) {
        return E !== C;
      });
    }, 1);
  }, []), d = k.useCallback(function(w) {
    n.current = vg(w), r.current = void 0;
  }, []), g = k.useCallback(function(w) {
    f(w.type, ND(w), w.target, l(w, e.lockRef.current));
  }, []), m = k.useCallback(function(w) {
    f(w.type, vg(w), w.target, l(w, e.lockRef.current));
  }, []);
  k.useEffect(function() {
    return Eu.push(i), e.setCallbacks({
      onScrollCapture: g,
      onWheelCapture: g,
      onTouchMoveCapture: m
    }), document.addEventListener("wheel", c, bu), document.addEventListener("touchmove", c, bu), document.addEventListener("touchstart", d, bu), function() {
      Eu = Eu.filter(function(w) {
        return w !== i;
      }), document.removeEventListener("wheel", c, bu), document.removeEventListener("touchmove", c, bu), document.removeEventListener("touchstart", d, bu);
    };
  }, []);
  var v = e.removeScrollBar, b = e.inert;
  return k.createElement(
    k.Fragment,
    null,
    b ? k.createElement(i, { styles: yH(o) }) : null,
    v ? k.createElement(cH, { gapMode: "margin" }) : null
  );
}
const wH = Jz($3, EH);
var q3 = k.forwardRef(function(e, t) {
  return k.createElement(My, Te({}, e, { ref: t, sideCar: wH }));
});
q3.classNames = My.classNames;
const z3 = q3;
var xH = function(e) {
  if (typeof document > "u")
    return null;
  var t = Array.isArray(e) ? e[0] : e;
  return t.ownerDocument.body;
}, wu = /* @__PURE__ */ new WeakMap(), yg = /* @__PURE__ */ new WeakMap(), bg = {}, ow = 0, H3 = function(e) {
  return e && (e.host || H3(e.parentNode));
}, SH = function(e, t) {
  return t.map(function(n) {
    if (e.contains(n))
      return n;
    var r = H3(n);
    return r && e.contains(r) ? r : (console.error("aria-hidden", n, "in not contained inside", e, ". Doing nothing"), null);
  }).filter(function(n) {
    return !!n;
  });
}, TH = function(e, t, n, r) {
  var o = SH(t, Array.isArray(e) ? e : [e]);
  bg[n] || (bg[n] = /* @__PURE__ */ new WeakMap());
  var i = bg[n], s = [], l = /* @__PURE__ */ new Set(), c = new Set(o), f = function(g) {
    !g || l.has(g) || (l.add(g), f(g.parentNode));
  };
  o.forEach(f);
  var d = function(g) {
    !g || c.has(g) || Array.prototype.forEach.call(g.children, function(m) {
      if (l.has(m))
        d(m);
      else
        try {
          var v = m.getAttribute(r), b = v !== null && v !== "false", w = (wu.get(m) || 0) + 1, _ = (i.get(m) || 0) + 1;
          wu.set(m, w), i.set(m, _), s.push(m), w === 1 && b && yg.set(m, !0), _ === 1 && m.setAttribute(n, "true"), b || m.setAttribute(r, "true");
        } catch (S) {
          console.error("aria-hidden: cannot operate on ", m, S);
        }
    });
  };
  return d(t), l.clear(), ow++, function() {
    s.forEach(function(g) {
      var m = wu.get(g) - 1, v = i.get(g) - 1;
      wu.set(g, m), i.set(g, v), m || (yg.has(g) || g.removeAttribute(r), yg.delete(g)), v || g.removeAttribute(n);
    }), ow--, ow || (wu = /* @__PURE__ */ new WeakMap(), wu = /* @__PURE__ */ new WeakMap(), yg = /* @__PURE__ */ new WeakMap(), bg = {});
  };
}, W3 = function(e, t, n) {
  n === void 0 && (n = "data-aria-hidden");
  var r = Array.from(Array.isArray(e) ? e : [e]), o = t || xH(e);
  return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live]"))), TH(r, o, n, "aria-hidden")) : function() {
    return null;
  };
};
const G3 = "Dialog", [Q3, gje] = Lc(G3), [CH, Ii] = Q3(G3), kH = (e) => {
  const { __scopeDialog: t, children: n, open: r, defaultOpen: o, onOpenChange: i, modal: s = !0 } = e, l = k.useRef(null), c = k.useRef(null), [f = !1, d] = Fy({
    prop: r,
    defaultProp: o,
    onChange: i
  });
  return /* @__PURE__ */ k.createElement(CH, {
    scope: t,
    triggerRef: l,
    contentRef: c,
    contentId: ac(),
    titleId: ac(),
    descriptionId: ac(),
    open: f,
    onOpenChange: d,
    onOpenToggle: k.useCallback(
      () => d(
        (g) => !g
      ),
      [
        d
      ]
    ),
    modal: s
  }, n);
}, _H = "DialogTrigger", NH = /* @__PURE__ */ k.forwardRef((e, t) => {
  const { __scopeDialog: n, ...r } = e, o = Ii(_H, n), i = dr(t, o.triggerRef);
  return /* @__PURE__ */ k.createElement(Ar.button, nt({
    type: "button",
    "aria-haspopup": "dialog",
    "aria-expanded": o.open,
    "aria-controls": o.contentId,
    "data-state": WC(o.open)
  }, r, {
    ref: i,
    onClick: dt(e.onClick, o.onOpenToggle)
  }));
}), Y3 = "DialogPortal", [OH, K3] = Q3(Y3, {
  forceMount: void 0
}), AH = (e) => {
  const { __scopeDialog: t, forceMount: n, children: r, container: o } = e, i = Ii(Y3, t);
  return /* @__PURE__ */ k.createElement(OH, {
    scope: t,
    forceMount: n
  }, k.Children.map(
    r,
    (s) => /* @__PURE__ */ k.createElement(al, {
      present: n || i.open
    }, /* @__PURE__ */ k.createElement(HC, {
      asChild: !0,
      container: o
    }, s))
  ));
}, dS = "DialogOverlay", DH = /* @__PURE__ */ k.forwardRef((e, t) => {
  const n = K3(dS, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, i = Ii(dS, e.__scopeDialog);
  return i.modal ? /* @__PURE__ */ k.createElement(al, {
    present: r || i.open
  }, /* @__PURE__ */ k.createElement(IH, nt({}, o, {
    ref: t
  }))) : null;
}), IH = /* @__PURE__ */ k.forwardRef((e, t) => {
  const { __scopeDialog: n, ...r } = e, o = Ii(dS, n);
  return (
    // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
    // ie. when `Overlay` and `Content` are siblings
    /* @__PURE__ */ k.createElement(z3, {
      as: xf,
      allowPinchZoom: !0,
      shards: [
        o.contentRef
      ]
    }, /* @__PURE__ */ k.createElement(Ar.div, nt({
      "data-state": WC(o.open)
    }, r, {
      ref: t,
      style: {
        pointerEvents: "auto",
        ...r.style
      }
    })))
  );
}), Hp = "DialogContent", LH = /* @__PURE__ */ k.forwardRef((e, t) => {
  const n = K3(Hp, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, i = Ii(Hp, e.__scopeDialog);
  return /* @__PURE__ */ k.createElement(al, {
    present: r || i.open
  }, i.modal ? /* @__PURE__ */ k.createElement(RH, nt({}, o, {
    ref: t
  })) : /* @__PURE__ */ k.createElement(FH, nt({}, o, {
    ref: t
  })));
}), RH = /* @__PURE__ */ k.forwardRef((e, t) => {
  const n = Ii(Hp, e.__scopeDialog), r = k.useRef(null), o = dr(t, n.contentRef, r);
  return k.useEffect(() => {
    const i = r.current;
    if (i)
      return W3(i);
  }, []), /* @__PURE__ */ k.createElement(J3, nt({}, e, {
    ref: o,
    trapFocus: n.open,
    disableOutsidePointerEvents: !0,
    onCloseAutoFocus: dt(e.onCloseAutoFocus, (i) => {
      var s;
      i.preventDefault(), (s = n.triggerRef.current) === null || s === void 0 || s.focus();
    }),
    onPointerDownOutside: dt(e.onPointerDownOutside, (i) => {
      const s = i.detail.originalEvent, l = s.button === 0 && s.ctrlKey === !0;
      (s.button === 2 || l) && i.preventDefault();
    }),
    onFocusOutside: dt(
      e.onFocusOutside,
      (i) => i.preventDefault()
    )
  }));
}), FH = /* @__PURE__ */ k.forwardRef((e, t) => {
  const n = Ii(Hp, e.__scopeDialog), r = k.useRef(!1), o = k.useRef(!1);
  return /* @__PURE__ */ k.createElement(J3, nt({}, e, {
    ref: t,
    trapFocus: !1,
    disableOutsidePointerEvents: !1,
    onCloseAutoFocus: (i) => {
      var s;
      if ((s = e.onCloseAutoFocus) === null || s === void 0 || s.call(e, i), !i.defaultPrevented) {
        var l;
        r.current || (l = n.triggerRef.current) === null || l === void 0 || l.focus(), i.preventDefault();
      }
      r.current = !1, o.current = !1;
    },
    onInteractOutside: (i) => {
      var s, l;
      (s = e.onInteractOutside) === null || s === void 0 || s.call(e, i), i.defaultPrevented || (r.current = !0, i.detail.originalEvent.type === "pointerdown" && (o.current = !0));
      const c = i.target;
      ((l = n.triggerRef.current) === null || l === void 0 ? void 0 : l.contains(c)) && i.preventDefault(), i.detail.originalEvent.type === "focusin" && o.current && i.preventDefault();
    }
  }));
}), J3 = /* @__PURE__ */ k.forwardRef((e, t) => {
  const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: i, ...s } = e, l = Ii(Hp, n), c = k.useRef(null), f = dr(t, c);
  return F3(), /* @__PURE__ */ k.createElement(k.Fragment, null, /* @__PURE__ */ k.createElement(L3, {
    asChild: !0,
    loop: !0,
    trapped: r,
    onMountAutoFocus: o,
    onUnmountAutoFocus: i
  }, /* @__PURE__ */ k.createElement(zC, nt({
    role: "dialog",
    id: l.contentId,
    "aria-describedby": l.descriptionId,
    "aria-labelledby": l.titleId,
    "data-state": WC(l.open)
  }, s, {
    ref: f,
    onDismiss: () => l.onOpenChange(!1)
  }))), !1);
}), MH = "DialogTitle", PH = /* @__PURE__ */ k.forwardRef((e, t) => {
  const { __scopeDialog: n, ...r } = e, o = Ii(MH, n);
  return /* @__PURE__ */ k.createElement(Ar.h2, nt({
    id: o.titleId
  }, r, {
    ref: t
  }));
}), $H = "DialogDescription", VH = /* @__PURE__ */ k.forwardRef((e, t) => {
  const { __scopeDialog: n, ...r } = e, o = Ii($H, n);
  return /* @__PURE__ */ k.createElement(Ar.p, nt({
    id: o.descriptionId
  }, r, {
    ref: t
  }));
}), jH = "DialogClose", UH = /* @__PURE__ */ k.forwardRef((e, t) => {
  const { __scopeDialog: n, ...r } = e, o = Ii(jH, n);
  return /* @__PURE__ */ k.createElement(Ar.button, nt({
    type: "button"
  }, r, {
    ref: t,
    onClick: dt(
      e.onClick,
      () => o.onOpenChange(!1)
    )
  }));
});
function WC(e) {
  return e ? "open" : "closed";
}
const BH = kH, qH = NH, zH = AH, HH = DH, WH = LH, GH = PH, QH = VH, YH = UH, KH = /* @__PURE__ */ k.forwardRef((e, t) => /* @__PURE__ */ k.createElement(Ar.span, nt({}, e, {
  ref: t,
  style: {
    // See: https://github.com/twbs/bootstrap/blob/master/scss/mixins/_screen-reader.scss
    position: "absolute",
    border: 0,
    width: 1,
    height: 1,
    padding: 0,
    margin: -1,
    overflow: "hidden",
    clip: "rect(0, 0, 0, 0)",
    whiteSpace: "nowrap",
    wordWrap: "normal",
    ...e.style
  }
}))), X3 = KH;
function Z3(e) {
  const t = e + "CollectionProvider", [n, r] = Lc(t), [o, i] = n(t, {
    collectionRef: {
      current: null
    },
    itemMap: /* @__PURE__ */ new Map()
  }), s = (v) => {
    const { scope: b, children: w } = v, _ = ce.useRef(null), S = ce.useRef(/* @__PURE__ */ new Map()).current;
    return /* @__PURE__ */ ce.createElement(o, {
      scope: b,
      itemMap: S,
      collectionRef: _
    }, w);
  }, l = e + "CollectionSlot", c = /* @__PURE__ */ ce.forwardRef((v, b) => {
    const { scope: w, children: _ } = v, S = i(l, w), x = dr(b, S.collectionRef);
    return /* @__PURE__ */ ce.createElement(xf, {
      ref: x
    }, _);
  }), f = e + "CollectionItemSlot", d = "data-radix-collection-item", g = /* @__PURE__ */ ce.forwardRef((v, b) => {
    const { scope: w, children: _, ...S } = v, x = ce.useRef(null), C = dr(b, x), E = i(f, w);
    return ce.useEffect(() => (E.itemMap.set(x, {
      ref: x,
      ...S
    }), () => void E.itemMap.delete(x))), /* @__PURE__ */ ce.createElement(xf, {
      [d]: "",
      ref: C
    }, _);
  });
  function m(v) {
    const b = i(e + "CollectionConsumer", v);
    return ce.useCallback(() => {
      const _ = b.collectionRef.current;
      if (!_)
        return [];
      const S = Array.from(_.querySelectorAll(`[${d}]`));
      return Array.from(b.itemMap.values()).sort(
        (E, N) => S.indexOf(E.ref.current) - S.indexOf(N.ref.current)
      );
    }, [
      b.collectionRef,
      b.itemMap
    ]);
  }
  return [
    {
      Provider: s,
      Slot: c,
      ItemSlot: g
    },
    m,
    r
  ];
}
const JH = /* @__PURE__ */ k.createContext(void 0);
function e5(e) {
  const t = k.useContext(JH);
  return e || t || "ltr";
}
const XH = ["top", "right", "bottom", "left"], Qa = Math.min, bo = Math.max, a0 = Math.round, Eg = Math.floor, Ya = (e) => ({
  x: e,
  y: e
}), ZH = {
  left: "right",
  right: "left",
  bottom: "top",
  top: "bottom"
}, eW = {
  start: "end",
  end: "start"
};
function pS(e, t, n) {
  return bo(e, Qa(t, n));
}
function Bs(e, t) {
  return typeof e == "function" ? e(t) : e;
}
function qs(e) {
  return e.split("-")[0];
}
function Lf(e) {
  return e.split("-")[1];
}
function GC(e) {
  return e === "x" ? "y" : "x";
}
function QC(e) {
  return e === "y" ? "height" : "width";
}
function Rf(e) {
  return ["top", "bottom"].includes(qs(e)) ? "y" : "x";
}
function YC(e) {
  return GC(Rf(e));
}
function tW(e, t, n) {
  n === void 0 && (n = !1);
  const r = Lf(e), o = YC(e), i = QC(o);
  let s = o === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
  return t.reference[i] > t.floating[i] && (s = l0(s)), [s, l0(s)];
}
function nW(e) {
  const t = l0(e);
  return [hS(e), t, hS(t)];
}
function hS(e) {
  return e.replace(/start|end/g, (t) => eW[t]);
}
function rW(e, t, n) {
  const r = ["left", "right"], o = ["right", "left"], i = ["top", "bottom"], s = ["bottom", "top"];
  switch (e) {
    case "top":
    case "bottom":
      return n ? t ? o : r : t ? r : o;
    case "left":
    case "right":
      return t ? i : s;
    default:
      return [];
  }
}
function oW(e, t, n, r) {
  const o = Lf(e);
  let i = rW(qs(e), n === "start", r);
  return o && (i = i.map((s) => s + "-" + o), t && (i = i.concat(i.map(hS)))), i;
}
function l0(e) {
  return e.replace(/left|right|bottom|top/g, (t) => ZH[t]);
}
function iW(e) {
  return {
    top: 0,
    right: 0,
    bottom: 0,
    left: 0,
    ...e
  };
}
function t5(e) {
  return typeof e != "number" ? iW(e) : {
    top: e,
    right: e,
    bottom: e,
    left: e
  };
}
function c0(e) {
  return {
    ...e,
    top: e.y,
    left: e.x,
    right: e.x + e.width,
    bottom: e.y + e.height
  };
}
function AD(e, t, n) {
  let {
    reference: r,
    floating: o
  } = e;
  const i = Rf(t), s = YC(t), l = QC(s), c = qs(t), f = i === "y", d = r.x + r.width / 2 - o.width / 2, g = r.y + r.height / 2 - o.height / 2, m = r[l] / 2 - o[l] / 2;
  let v;
  switch (c) {
    case "top":
      v = {
        x: d,
        y: r.y - o.height
      };
      break;
    case "bottom":
      v = {
        x: d,
        y: r.y + r.height
      };
      break;
    case "right":
      v = {
        x: r.x + r.width,
        y: g
      };
      break;
    case "left":
      v = {
        x: r.x - o.width,
        y: g
      };
      break;
    default:
      v = {
        x: r.x,
        y: r.y
      };
  }
  switch (Lf(t)) {
    case "start":
      v[s] -= m * (n && f ? -1 : 1);
      break;
    case "end":
      v[s] += m * (n && f ? -1 : 1);
      break;
  }
  return v;
}
const sW = async (e, t, n) => {
  const {
    placement: r = "bottom",
    strategy: o = "absolute",
    middleware: i = [],
    platform: s
  } = n, l = i.filter(Boolean), c = await (s.isRTL == null ? void 0 : s.isRTL(t));
  let f = await s.getElementRects({
    reference: e,
    floating: t,
    strategy: o
  }), {
    x: d,
    y: g
  } = AD(f, r, c), m = r, v = {}, b = 0;
  for (let w = 0; w < l.length; w++) {
    const {
      name: _,
      fn: S
    } = l[w], {
      x,
      y: C,
      data: E,
      reset: N
    } = await S({
      x: d,
      y: g,
      initialPlacement: r,
      placement: m,
      strategy: o,
      middlewareData: v,
      rects: f,
      platform: s,
      elements: {
        reference: e,
        floating: t
      }
    });
    d = x ?? d, g = C ?? g, v = {
      ...v,
      [_]: {
        ...v[_],
        ...E
      }
    }, N && b <= 50 && (b++, typeof N == "object" && (N.placement && (m = N.placement), N.rects && (f = N.rects === !0 ? await s.getElementRects({
      reference: e,
      floating: t,
      strategy: o
    }) : N.rects), {
      x: d,
      y: g
    } = AD(f, m, c)), w = -1);
  }
  return {
    x: d,
    y: g,
    placement: m,
    strategy: o,
    middlewareData: v
  };
};
async function Wp(e, t) {
  var n;
  t === void 0 && (t = {});
  const {
    x: r,
    y: o,
    platform: i,
    rects: s,
    elements: l,
    strategy: c
  } = e, {
    boundary: f = "clippingAncestors",
    rootBoundary: d = "viewport",
    elementContext: g = "floating",
    altBoundary: m = !1,
    padding: v = 0
  } = Bs(t, e), b = t5(v), _ = l[m ? g === "floating" ? "reference" : "floating" : g], S = c0(await i.getClippingRect({
    element: (n = await (i.isElement == null ? void 0 : i.isElement(_))) == null || n ? _ : _.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(l.floating)),
    boundary: f,
    rootBoundary: d,
    strategy: c
  })), x = g === "floating" ? {
    ...s.floating,
    x: r,
    y: o
  } : s.reference, C = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(l.floating)), E = await (i.isElement == null ? void 0 : i.isElement(C)) ? await (i.getScale == null ? void 0 : i.getScale(C)) || {
    x: 1,
    y: 1
  } : {
    x: 1,
    y: 1
  }, N = c0(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
    elements: l,
    rect: x,
    offsetParent: C,
    strategy: c
  }) : x);
  return {
    top: (S.top - N.top + b.top) / E.y,
    bottom: (N.bottom - S.bottom + b.bottom) / E.y,
    left: (S.left - N.left + b.left) / E.x,
    right: (N.right - S.right + b.right) / E.x
  };
}
const aW = (e) => ({
  name: "arrow",
  options: e,
  async fn(t) {
    const {
      x: n,
      y: r,
      placement: o,
      rects: i,
      platform: s,
      elements: l,
      middlewareData: c
    } = t, {
      element: f,
      padding: d = 0
    } = Bs(e, t) || {};
    if (f == null)
      return {};
    const g = t5(d), m = {
      x: n,
      y: r
    }, v = YC(o), b = QC(v), w = await s.getDimensions(f), _ = v === "y", S = _ ? "top" : "left", x = _ ? "bottom" : "right", C = _ ? "clientHeight" : "clientWidth", E = i.reference[b] + i.reference[v] - m[v] - i.floating[b], N = m[v] - i.reference[v], I = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(f));
    let D = I ? I[C] : 0;
    (!D || !await (s.isElement == null ? void 0 : s.isElement(I))) && (D = l.floating[C] || i.floating[b]);
    const A = E / 2 - N / 2, F = D / 2 - w[b] / 2 - 1, $ = Qa(g[S], F), q = Qa(g[x], F), H = $, z = D - w[b] - q, B = D / 2 - w[b] / 2 + A, R = pS(H, B, z), te = !c.arrow && Lf(o) != null && B !== R && i.reference[b] / 2 - (B < H ? $ : q) - w[b] / 2 < 0, Q = te ? B < H ? B - H : B - z : 0;
    return {
      [v]: m[v] + Q,
      data: {
        [v]: R,
        centerOffset: B - R - Q,
        ...te && {
          alignmentOffset: Q
        }
      },
      reset: te
    };
  }
}), lW = function(e) {
  return e === void 0 && (e = {}), {
    name: "flip",
    options: e,
    async fn(t) {
      var n, r;
      const {
        placement: o,
        middlewareData: i,
        rects: s,
        initialPlacement: l,
        platform: c,
        elements: f
      } = t, {
        mainAxis: d = !0,
        crossAxis: g = !0,
        fallbackPlacements: m,
        fallbackStrategy: v = "bestFit",
        fallbackAxisSideDirection: b = "none",
        flipAlignment: w = !0,
        ..._
      } = Bs(e, t);
      if ((n = i.arrow) != null && n.alignmentOffset)
        return {};
      const S = qs(o), x = qs(l) === l, C = await (c.isRTL == null ? void 0 : c.isRTL(f.floating)), E = m || (x || !w ? [l0(l)] : nW(l));
      !m && b !== "none" && E.push(...oW(l, w, b, C));
      const N = [l, ...E], I = await Wp(t, _), D = [];
      let A = ((r = i.flip) == null ? void 0 : r.overflows) || [];
      if (d && D.push(I[S]), g) {
        const H = tW(o, s, C);
        D.push(I[H[0]], I[H[1]]);
      }
      if (A = [...A, {
        placement: o,
        overflows: D
      }], !D.every((H) => H <= 0)) {
        var F, $;
        const H = (((F = i.flip) == null ? void 0 : F.index) || 0) + 1, z = N[H];
        if (z)
          return {
            data: {
              index: H,
              overflows: A
            },
            reset: {
              placement: z
            }
          };
        let B = ($ = A.filter((R) => R.overflows[0] <= 0).sort((R, te) => R.overflows[1] - te.overflows[1])[0]) == null ? void 0 : $.placement;
        if (!B)
          switch (v) {
            case "bestFit": {
              var q;
              const R = (q = A.map((te) => [te.placement, te.overflows.filter((Q) => Q > 0).reduce((Q, Y) => Q + Y, 0)]).sort((te, Q) => te[1] - Q[1])[0]) == null ? void 0 : q[0];
              R && (B = R);
              break;
            }
            case "initialPlacement":
              B = l;
              break;
          }
        if (o !== B)
          return {
            reset: {
              placement: B
            }
          };
      }
      return {};
    }
  };
};
function DD(e, t) {
  return {
    top: e.top - t.height,
    right: e.right - t.width,
    bottom: e.bottom - t.height,
    left: e.left - t.width
  };
}
function ID(e) {
  return XH.some((t) => e[t] >= 0);
}
const cW = function(e) {
  return e === void 0 && (e = {}), {
    name: "hide",
    options: e,
    async fn(t) {
      const {
        rects: n
      } = t, {
        strategy: r = "referenceHidden",
        ...o
      } = Bs(e, t);
      switch (r) {
        case "referenceHidden": {
          const i = await Wp(t, {
            ...o,
            elementContext: "reference"
          }), s = DD(i, n.reference);
          return {
            data: {
              referenceHiddenOffsets: s,
              referenceHidden: ID(s)
            }
          };
        }
        case "escaped": {
          const i = await Wp(t, {
            ...o,
            altBoundary: !0
          }), s = DD(i, n.floating);
          return {
            data: {
              escapedOffsets: s,
              escaped: ID(s)
            }
          };
        }
        default:
          return {};
      }
    }
  };
};
async function uW(e, t) {
  const {
    placement: n,
    platform: r,
    elements: o
  } = e, i = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), s = qs(n), l = Lf(n), c = Rf(n) === "y", f = ["left", "top"].includes(s) ? -1 : 1, d = i && c ? -1 : 1, g = Bs(t, e);
  let {
    mainAxis: m,
    crossAxis: v,
    alignmentAxis: b
  } = typeof g == "number" ? {
    mainAxis: g,
    crossAxis: 0,
    alignmentAxis: null
  } : {
    mainAxis: 0,
    crossAxis: 0,
    alignmentAxis: null,
    ...g
  };
  return l && typeof b == "number" && (v = l === "end" ? b * -1 : b), c ? {
    x: v * d,
    y: m * f
  } : {
    x: m * f,
    y: v * d
  };
}
const fW = function(e) {
  return e === void 0 && (e = 0), {
    name: "offset",
    options: e,
    async fn(t) {
      var n, r;
      const {
        x: o,
        y: i,
        placement: s,
        middlewareData: l
      } = t, c = await uW(t, e);
      return s === ((n = l.offset) == null ? void 0 : n.placement) && (r = l.arrow) != null && r.alignmentOffset ? {} : {
        x: o + c.x,
        y: i + c.y,
        data: {
          ...c,
          placement: s
        }
      };
    }
  };
}, dW = 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: s = !1,
        limiter: l = {
          fn: (_) => {
            let {
              x: S,
              y: x
            } = _;
            return {
              x: S,
              y: x
            };
          }
        },
        ...c
      } = Bs(e, t), f = {
        x: n,
        y: r
      }, d = await Wp(t, c), g = Rf(qs(o)), m = GC(g);
      let v = f[m], b = f[g];
      if (i) {
        const _ = m === "y" ? "top" : "left", S = m === "y" ? "bottom" : "right", x = v + d[_], C = v - d[S];
        v = pS(x, v, C);
      }
      if (s) {
        const _ = g === "y" ? "top" : "left", S = g === "y" ? "bottom" : "right", x = b + d[_], C = b - d[S];
        b = pS(x, b, C);
      }
      const w = l.fn({
        ...t,
        [m]: v,
        [g]: b
      });
      return {
        ...w,
        data: {
          x: w.x - n,
          y: w.y - r
        }
      };
    }
  };
}, pW = function(e) {
  return e === void 0 && (e = {}), {
    options: e,
    fn(t) {
      const {
        x: n,
        y: r,
        placement: o,
        rects: i,
        middlewareData: s
      } = t, {
        offset: l = 0,
        mainAxis: c = !0,
        crossAxis: f = !0
      } = Bs(e, t), d = {
        x: n,
        y: r
      }, g = Rf(o), m = GC(g);
      let v = d[m], b = d[g];
      const w = Bs(l, t), _ = typeof w == "number" ? {
        mainAxis: w,
        crossAxis: 0
      } : {
        mainAxis: 0,
        crossAxis: 0,
        ...w
      };
      if (c) {
        const C = m === "y" ? "height" : "width", E = i.reference[m] - i.floating[C] + _.mainAxis, N = i.reference[m] + i.reference[C] - _.mainAxis;
        v < E ? v = E : v > N && (v = N);
      }
      if (f) {
        var S, x;
        const C = m === "y" ? "width" : "height", E = ["top", "left"].includes(qs(o)), N = i.reference[g] - i.floating[C] + (E && ((S = s.offset) == null ? void 0 : S[g]) || 0) + (E ? 0 : _.crossAxis), I = i.reference[g] + i.reference[C] + (E ? 0 : ((x = s.offset) == null ? void 0 : x[g]) || 0) - (E ? _.crossAxis : 0);
        b < N ? b = N : b > I && (b = I);
      }
      return {
        [m]: v,
        [g]: b
      };
    }
  };
}, hW = 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: s = () => {
        },
        ...l
      } = Bs(e, t), c = await Wp(t, l), f = qs(n), d = Lf(n), g = Rf(n) === "y", {
        width: m,
        height: v
      } = r.floating;
      let b, w;
      f === "top" || f === "bottom" ? (b = f, w = d === (await (o.isRTL == null ? void 0 : o.isRTL(i.floating)) ? "start" : "end") ? "left" : "right") : (w = f, b = d === "end" ? "top" : "bottom");
      const _ = v - c[b], S = m - c[w], x = !t.middlewareData.shift;
      let C = _, E = S;
      if (g) {
        const I = m - c.left - c.right;
        E = d || x ? Qa(S, I) : I;
      } else {
        const I = v - c.top - c.bottom;
        C = d || x ? Qa(_, I) : I;
      }
      if (x && !d) {
        const I = bo(c.left, 0), D = bo(c.right, 0), A = bo(c.top, 0), F = bo(c.bottom, 0);
        g ? E = m - 2 * (I !== 0 || D !== 0 ? I + D : bo(c.left, c.right)) : C = v - 2 * (A !== 0 || F !== 0 ? A + F : bo(c.top, c.bottom));
      }
      await s({
        ...t,
        availableWidth: E,
        availableHeight: C
      });
      const N = await o.getDimensions(i.floating);
      return m !== N.width || v !== N.height ? {
        reset: {
          rects: !0
        }
      } : {};
    }
  };
};
function Ka(e) {
  return n5(e) ? (e.nodeName || "").toLowerCase() : "#document";
}
function xo(e) {
  var t;
  return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
}
function Js(e) {
  var t;
  return (t = (n5(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
}
function n5(e) {
  return e instanceof Node || e instanceof xo(e).Node;
}
function zs(e) {
  return e instanceof Element || e instanceof xo(e).Element;
}
function ns(e) {
  return e instanceof HTMLElement || e instanceof xo(e).HTMLElement;
}
function LD(e) {
  return typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof xo(e).ShadowRoot;
}
function Nh(e) {
  const {
    overflow: t,
    overflowX: n,
    overflowY: r,
    display: o
  } = ri(e);
  return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !["inline", "contents"].includes(o);
}
function mW(e) {
  return ["table", "td", "th"].includes(Ka(e));
}
function KC(e) {
  const t = JC(), n = ri(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 gW(e) {
  let t = Sf(e);
  for (; ns(t) && !Py(t); ) {
    if (KC(t))
      return t;
    t = Sf(t);
  }
  return null;
}
function JC() {
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
}
function Py(e) {
  return ["html", "body", "#document"].includes(Ka(e));
}
function ri(e) {
  return xo(e).getComputedStyle(e);
}
function $y(e) {
  return zs(e) ? {
    scrollLeft: e.scrollLeft,
    scrollTop: e.scrollTop
  } : {
    scrollLeft: e.pageXOffset,
    scrollTop: e.pageYOffset
  };
}
function Sf(e) {
  if (Ka(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.
    LD(e) && e.host || // Fallback.
    Js(e)
  );
  return LD(t) ? t.host : t;
}
function r5(e) {
  const t = Sf(e);
  return Py(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : ns(t) && Nh(t) ? t : r5(t);
}
function Gp(e, t, n) {
  var r;
  t === void 0 && (t = []), n === void 0 && (n = !0);
  const o = r5(e), i = o === ((r = e.ownerDocument) == null ? void 0 : r.body), s = xo(o);
  return i ? t.concat(s, s.visualViewport || [], Nh(o) ? o : [], s.frameElement && n ? Gp(s.frameElement) : []) : t.concat(o, Gp(o, [], n));
}
function o5(e) {
  const t = ri(e);
  let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0;
  const o = ns(e), i = o ? e.offsetWidth : n, s = o ? e.offsetHeight : r, l = a0(n) !== i || a0(r) !== s;
  return l && (n = i, r = s), {
    width: n,
    height: r,
    $: l
  };
}
function XC(e) {
  return zs(e) ? e : e.contextElement;
}
function sf(e) {
  const t = XC(e);
  if (!ns(t))
    return Ya(1);
  const n = t.getBoundingClientRect(), {
    width: r,
    height: o,
    $: i
  } = o5(t);
  let s = (i ? a0(n.width) : n.width) / r, l = (i ? a0(n.height) : n.height) / o;
  return (!s || !Number.isFinite(s)) && (s = 1), (!l || !Number.isFinite(l)) && (l = 1), {
    x: s,
    y: l
  };
}
const vW = /* @__PURE__ */ Ya(0);
function i5(e) {
  const t = xo(e);
  return !JC() || !t.visualViewport ? vW : {
    x: t.visualViewport.offsetLeft,
    y: t.visualViewport.offsetTop
  };
}
function yW(e, t, n) {
  return t === void 0 && (t = !1), !n || t && n !== xo(e) ? !1 : t;
}
function Ec(e, t, n, r) {
  t === void 0 && (t = !1), n === void 0 && (n = !1);
  const o = e.getBoundingClientRect(), i = XC(e);
  let s = Ya(1);
  t && (r ? zs(r) && (s = sf(r)) : s = sf(e));
  const l = yW(i, n, r) ? i5(i) : Ya(0);
  let c = (o.left + l.x) / s.x, f = (o.top + l.y) / s.y, d = o.width / s.x, g = o.height / s.y;
  if (i) {
    const m = xo(i), v = r && zs(r) ? xo(r) : r;
    let b = m, w = b.frameElement;
    for (; w && r && v !== b; ) {
      const _ = sf(w), S = w.getBoundingClientRect(), x = ri(w), C = S.left + (w.clientLeft + parseFloat(x.paddingLeft)) * _.x, E = S.top + (w.clientTop + parseFloat(x.paddingTop)) * _.y;
      c *= _.x, f *= _.y, d *= _.x, g *= _.y, c += C, f += E, b = xo(w), w = b.frameElement;
    }
  }
  return c0({
    width: d,
    height: g,
    x: c,
    y: f
  });
}
const bW = [":popover-open", ":modal"];
function s5(e) {
  return bW.some((t) => {
    try {
      return e.matches(t);
    } catch {
      return !1;
    }
  });
}
function EW(e) {
  let {
    elements: t,
    rect: n,
    offsetParent: r,
    strategy: o
  } = e;
  const i = o === "fixed", s = Js(r), l = t ? s5(t.floating) : !1;
  if (r === s || l && i)
    return n;
  let c = {
    scrollLeft: 0,
    scrollTop: 0
  }, f = Ya(1);
  const d = Ya(0), g = ns(r);
  if ((g || !g && !i) && ((Ka(r) !== "body" || Nh(s)) && (c = $y(r)), ns(r))) {
    const m = Ec(r);
    f = sf(r), d.x = m.x + r.clientLeft, d.y = m.y + r.clientTop;
  }
  return {
    width: n.width * f.x,
    height: n.height * f.y,
    x: n.x * f.x - c.scrollLeft * f.x + d.x,
    y: n.y * f.y - c.scrollTop * f.y + d.y
  };
}
function wW(e) {
  return Array.from(e.getClientRects());
}
function a5(e) {
  return Ec(Js(e)).left + $y(e).scrollLeft;
}
function xW(e) {
  const t = Js(e), n = $y(e), r = e.ownerDocument.body, o = bo(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), i = bo(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight);
  let s = -n.scrollLeft + a5(e);
  const l = -n.scrollTop;
  return ri(r).direction === "rtl" && (s += bo(t.clientWidth, r.clientWidth) - o), {
    width: o,
    height: i,
    x: s,
    y: l
  };
}
function SW(e, t) {
  const n = xo(e), r = Js(e), o = n.visualViewport;
  let i = r.clientWidth, s = r.clientHeight, l = 0, c = 0;
  if (o) {
    i = o.width, s = o.height;
    const f = JC();
    (!f || f && t === "fixed") && (l = o.offsetLeft, c = o.offsetTop);
  }
  return {
    width: i,
    height: s,
    x: l,
    y: c
  };
}
function TW(e, t) {
  const n = Ec(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, i = ns(e) ? sf(e) : Ya(1), s = e.clientWidth * i.x, l = e.clientHeight * i.y, c = o * i.x, f = r * i.y;
  return {
    width: s,
    height: l,
    x: c,
    y: f
  };
}
function RD(e, t, n) {
  let r;
  if (t === "viewport")
    r = SW(e, n);
  else if (t === "document")
    r = xW(Js(e));
  else if (zs(t))
    r = TW(t, n);
  else {
    const o = i5(e);
    r = {
      ...t,
      x: t.x - o.x,
      y: t.y - o.y
    };
  }
  return c0(r);
}
function l5(e, t) {
  const n = Sf(e);
  return n === t || !zs(n) || Py(n) ? !1 : ri(n).position === "fixed" || l5(n, t);
}
function CW(e, t) {
  const n = t.get(e);
  if (n)
    return n;
  let r = Gp(e, [], !1).filter((l) => zs(l) && Ka(l) !== "body"), o = null;
  const i = ri(e).position === "fixed";
  let s = i ? Sf(e) : e;
  for (; zs(s) && !Py(s); ) {
    const l = ri(s), c = KC(s);
    !c && l.position === "fixed" && (o = null), (i ? !c && !o : !c && l.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || Nh(s) && !c && l5(e, s)) ? r = r.filter((d) => d !== s) : o = l, s = Sf(s);
  }
  return t.set(e, r), r;
}
function kW(e) {
  let {
    element: t,
    boundary: n,
    rootBoundary: r,
    strategy: o
  } = e;
  const s = [...n === "clippingAncestors" ? CW(t, this._c) : [].concat(n), r], l = s[0], c = s.reduce((f, d) => {
    const g = RD(t, d, o);
    return f.top = bo(g.top, f.top), f.right = Qa(g.right, f.right), f.bottom = Qa(g.bottom, f.bottom), f.left = bo(g.left, f.left), f;
  }, RD(t, l, o));
  return {
    width: c.right - c.left,
    height: c.bottom - c.top,
    x: c.left,
    y: c.top
  };
}
function _W(e) {
  const {
    width: t,
    height: n
  } = o5(e);
  return {
    width: t,
    height: n
  };
}
function NW(e, t, n) {
  const r = ns(t), o = Js(t), i = n === "fixed", s = Ec(e, !0, i, t);
  let l = {
    scrollLeft: 0,
    scrollTop: 0
  };
  const c = Ya(0);
  if (r || !r && !i)
    if ((Ka(t) !== "body" || Nh(o)) && (l = $y(t)), r) {
      const g = Ec(t, !0, i, t);
      c.x = g.x + t.clientLeft, c.y = g.y + t.clientTop;
    } else
      o && (c.x = a5(o));
  const f = s.left + l.scrollLeft - c.x, d = s.top + l.scrollTop - c.y;
  return {
    x: f,
    y: d,
    width: s.width,
    height: s.height
  };
}
function FD(e, t) {
  return !ns(e) || ri(e).position === "fixed" ? null : t ? t(e) : e.offsetParent;
}
function c5(e, t) {
  const n = xo(e);
  if (!ns(e) || s5(e))
    return n;
  let r = FD(e, t);
  for (; r && mW(r) && ri(r).position === "static"; )
    r = FD(r, t);
  return r && (Ka(r) === "html" || Ka(r) === "body" && ri(r).position === "static" && !KC(r)) ? n : r || gW(e) || n;
}
const OW = async function(e) {
  const t = this.getOffsetParent || c5, n = this.getDimensions;
  return {
    reference: NW(e.reference, await t(e.floating), e.strategy),
    floating: {
      x: 0,
      y: 0,
      ...await n(e.floating)
    }
  };
};
function AW(e) {
  return ri(e).direction === "rtl";
}
const DW = {
  convertOffsetParentRelativeRectToViewportRelativeRect: EW,
  getDocumentElement: Js,
  getClippingRect: kW,
  getOffsetParent: c5,
  getElementRects: OW,
  getClientRects: wW,
  getDimensions: _W,
  getScale: sf,
  isElement: zs,
  isRTL: AW
};
function IW(e, t) {
  let n = null, r;
  const o = Js(e);
  function i() {
    var l;
    clearTimeout(r), (l = n) == null || l.disconnect(), n = null;
  }
  function s(l, c) {
    l === void 0 && (l = !1), c === void 0 && (c = 1), i();
    const {
      left: f,
      top: d,
      width: g,
      height: m
    } = e.getBoundingClientRect();
    if (l || t(), !g || !m)
      return;
    const v = Eg(d), b = Eg(o.clientWidth - (f + g)), w = Eg(o.clientHeight - (d + m)), _ = Eg(f), x = {
      rootMargin: -v + "px " + -b + "px " + -w + "px " + -_ + "px",
      threshold: bo(0, Qa(1, c)) || 1
    };
    let C = !0;
    function E(N) {
      const I = N[0].intersectionRatio;
      if (I !== c) {
        if (!C)
          return s();
        I ? s(!1, I) : r = setTimeout(() => {
          s(!1, 1e-7);
        }, 100);
      }
      C = !1;
    }
    try {
      n = new IntersectionObserver(E, {
        ...x,
        // Handle <iframe>s
        root: o.ownerDocument
      });
    } catch {
      n = new IntersectionObserver(E, x);
    }
    n.observe(e);
  }
  return s(!0), i;
}
function LW(e, t, n, r) {
  r === void 0 && (r = {});
  const {
    ancestorScroll: o = !0,
    ancestorResize: i = !0,
    elementResize: s = typeof ResizeObserver == "function",
    layoutShift: l = typeof IntersectionObserver == "function",
    animationFrame: c = !1
  } = r, f = XC(e), d = o || i ? [...f ? Gp(f) : [], ...Gp(t)] : [];
  d.forEach((S) => {
    o && S.addEventListener("scroll", n, {
      passive: !0
    }), i && S.addEventListener("resize", n);
  });
  const g = f && l ? IW(f, n) : null;
  let m = -1, v = null;
  s && (v = new ResizeObserver((S) => {
    let [x] = S;
    x && x.target === f && v && (v.unobserve(t), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
      var C;
      (C = v) == null || C.observe(t);
    })), n();
  }), f && !c && v.observe(f), v.observe(t));
  let b, w = c ? Ec(e) : null;
  c && _();
  function _() {
    const S = Ec(e);
    w && (S.x !== w.x || S.y !== w.y || S.width !== w.width || S.height !== w.height) && n(), w = S, b = requestAnimationFrame(_);
  }
  return n(), () => {
    var S;
    d.forEach((x) => {
      o && x.removeEventListener("scroll", n), i && x.removeEventListener("resize", n);
    }), g == null || g(), (S = v) == null || S.disconnect(), v = null, c && cancelAnimationFrame(b);
  };
}
const RW = dW, FW = lW, MW = hW, PW = cW, MD = aW, $W = pW, VW = (e, t, n) => {
  const r = /* @__PURE__ */ new Map(), o = {
    platform: DW,
    ...n
  }, i = {
    ...o.platform,
    _c: r
  };
  return sW(e, t, {
    ...o,
    platform: i
  });
}, jW = (e) => {
  function t(n) {
    return {}.hasOwnProperty.call(n, "current");
  }
  return {
    name: "arrow",
    options: e,
    fn(n) {
      const {
        element: r,
        padding: o
      } = typeof e == "function" ? e(n) : e;
      return r && t(r) ? r.current != null ? MD({
        element: r.current,
        padding: o
      }).fn(n) : {} : r ? MD({
        element: r,
        padding: o
      }).fn(n) : {};
    }
  };
};
var nv = typeof document < "u" ? k.useLayoutEffect : k.useEffect;
function u0(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 (!u0(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 (!{}.hasOwnProperty.call(t, o[r]))
        return !1;
    for (r = n; r-- !== 0; ) {
      const i = o[r];
      if (!(i === "_owner" && e.$$typeof) && !u0(e[i], t[i]))
        return !1;
    }
    return !0;
  }
  return e !== e && t !== t;
}
function u5(e) {
  return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
}
function PD(e, t) {
  const n = u5(e);
  return Math.round(t * n) / n;
}
function $D(e) {
  const t = k.useRef(e);
  return nv(() => {
    t.current = e;
  }), t;
}
function UW(e) {
  e === void 0 && (e = {});
  const {
    placement: t = "bottom",
    strategy: n = "absolute",
    middleware: r = [],
    platform: o,
    elements: {
      reference: i,
      floating: s
    } = {},
    transform: l = !0,
    whileElementsMounted: c,
    open: f
  } = e, [d, g] = k.useState({
    x: 0,
    y: 0,
    strategy: n,
    placement: t,
    middlewareData: {},
    isPositioned: !1
  }), [m, v] = k.useState(r);
  u0(m, r) || v(r);
  const [b, w] = k.useState(null), [_, S] = k.useState(null), x = k.useCallback((Q) => {
    Q !== I.current && (I.current = Q, w(Q));
  }, []), C = k.useCallback((Q) => {
    Q !== D.current && (D.current = Q, S(Q));
  }, []), E = i || b, N = s || _, I = k.useRef(null), D = k.useRef(null), A = k.useRef(d), F = c != null, $ = $D(c), q = $D(o), H = k.useCallback(() => {
    if (!I.current || !D.current)
      return;
    const Q = {
      placement: t,
      strategy: n,
      middleware: m
    };
    q.current && (Q.platform = q.current), VW(I.current, D.current, Q).then((Y) => {
      const K = {
        ...Y,
        isPositioned: !0
      };
      z.current && !u0(A.current, K) && (A.current = K, vh.flushSync(() => {
        g(K);
      }));
    });
  }, [m, t, n, q]);
  nv(() => {
    f === !1 && A.current.isPositioned && (A.current.isPositioned = !1, g((Q) => ({
      ...Q,
      isPositioned: !1
    })));
  }, [f]);
  const z = k.useRef(!1);
  nv(() => (z.current = !0, () => {
    z.current = !1;
  }), []), nv(() => {
    if (E && (I.current = E), N && (D.current = N), E && N) {
      if ($.current)
        return $.current(E, N, H);
      H();
    }
  }, [E, N, H, $, F]);
  const B = k.useMemo(() => ({
    reference: I,
    floating: D,
    setReference: x,
    setFloating: C
  }), [x, C]), R = k.useMemo(() => ({
    reference: E,
    floating: N
  }), [E, N]), te = k.useMemo(() => {
    const Q = {
      position: n,
      left: 0,
      top: 0
    };
    if (!R.floating)
      return Q;
    const Y = PD(R.floating, d.x), K = PD(R.floating, d.y);
    return l ? {
      ...Q,
      transform: "translate(" + Y + "px, " + K + "px)",
      ...u5(R.floating) >= 1.5 && {
        willChange: "transform"
      }
    } : {
      position: n,
      left: Y,
      top: K
    };
  }, [n, l, R.floating, d.x, d.y]);
  return k.useMemo(() => ({
    ...d,
    update: H,
    refs: B,
    elements: R,
    floatingStyles: te
  }), [d, H, B, R, te]);
}
function BW(e) {
  const [t, n] = k.useState(void 0);
  return wf(() => {
    if (e) {
      n({
        width: e.offsetWidth,
        height: e.offsetHeight
      });
      const r = new ResizeObserver((o) => {
        if (!Array.isArray(o) || !o.length)
          return;
        const i = o[0];
        let s, l;
        if ("borderBoxSize" in i) {
          const c = i.borderBoxSize, f = Array.isArray(c) ? c[0] : c;
          s = f.inlineSize, l = f.blockSize;
        } else
          s = e.offsetWidth, l = e.offsetHeight;
        n({
          width: s,
          height: l
        });
      });
      return r.observe(e, {
        box: "border-box"
      }), () => r.unobserve(e);
    } else
      n(void 0);
  }, [
    e
  ]), t;
}
const f5 = "Popper", [d5, Vy] = Lc(f5), [qW, p5] = d5(f5), zW = (e) => {
  const { __scopePopper: t, children: n } = e, [r, o] = k.useState(null);
  return /* @__PURE__ */ k.createElement(qW, {
    scope: t,
    anchor: r,
    onAnchorChange: o
  }, n);
}, HW = "PopperAnchor", WW = /* @__PURE__ */ k.forwardRef((e, t) => {
  const { __scopePopper: n, virtualRef: r, ...o } = e, i = p5(HW, n), s = k.useRef(null), l = dr(t, s);
  return k.useEffect(() => {
    i.onAnchorChange((r == null ? void 0 : r.current) || s.current);
  }), r ? null : /* @__PURE__ */ k.createElement(Ar.div, nt({}, o, {
    ref: l
  }));
}), h5 = "PopperContent", [GW, vje] = d5(h5), QW = /* @__PURE__ */ k.forwardRef((e, t) => {
  var n, r, o, i, s, l, c, f;
  const { __scopePopper: d, side: g = "bottom", sideOffset: m = 0, align: v = "center", alignOffset: b = 0, arrowPadding: w = 0, avoidCollisions: _ = !0, collisionBoundary: S = [], collisionPadding: x = 0, sticky: C = "partial", hideWhenDetached: E = !1, updatePositionStrategy: N = "optimized", onPlaced: I, ...D } = e, A = p5(h5, d), [F, $] = k.useState(null), q = dr(
    t,
    (Ve) => $(Ve)
  ), [H, z] = k.useState(null), B = BW(H), R = (n = B == null ? void 0 : B.width) !== null && n !== void 0 ? n : 0, te = (r = B == null ? void 0 : B.height) !== null && r !== void 0 ? r : 0, Q = g + (v !== "center" ? "-" + v : ""), Y = typeof x == "number" ? x : {
    top: 0,
    right: 0,
    bottom: 0,
    left: 0,
    ...x
  }, K = Array.isArray(S) ? S : [
    S
  ], Z = K.length > 0, re = {
    padding: Y,
    boundary: K.filter(YW),
    // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
    altBoundary: Z
  }, { refs: J, floatingStyles: ie, placement: ne, isPositioned: ae, middlewareData: le } = UW({
    // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
    strategy: "fixed",
    placement: Q,
    whileElementsMounted: (...Ve) => LW(...Ve, {
      animationFrame: N === "always"
    }),
    elements: {
      reference: A.anchor
    },
    middleware: [
      fW({
        mainAxis: m + te,
        alignmentAxis: b
      }),
      _ && RW({
        mainAxis: !0,
        crossAxis: !1,
        limiter: C === "partial" ? $W() : void 0,
        ...re
      }),
      _ && FW({
        ...re
      }),
      MW({
        ...re,
        apply: ({ elements: Ve, rects: At, availableWidth: hr, availableHeight: Rt }) => {
          const { width: hn, height: $i } = At.reference, er = Ve.floating.style;
          er.setProperty("--radix-popper-available-width", `${hr}px`), er.setProperty("--radix-popper-available-height", `${Rt}px`), er.setProperty("--radix-popper-anchor-width", `${hn}px`), er.setProperty("--radix-popper-anchor-height", `${$i}px`);
        }
      }),
      H && jW({
        element: H,
        padding: w
      }),
      KW({
        arrowWidth: R,
        arrowHeight: te
      }),
      E && PW({
        strategy: "referenceHidden",
        ...re
      })
    ]
  }), [de, xe] = m5(ne), ge = ts(I);
  wf(() => {
    ae && (ge == null || ge());
  }, [
    ae,
    ge
  ]);
  const qe = (o = le.arrow) === null || o === void 0 ? void 0 : o.x, Ie = (i = le.arrow) === null || i === void 0 ? void 0 : i.y, Oe = ((s = le.arrow) === null || s === void 0 ? void 0 : s.centerOffset) !== 0, [ot, Nt] = k.useState();
  return wf(() => {
    F && Nt(window.getComputedStyle(F).zIndex);
  }, [
    F
  ]), /* @__PURE__ */ k.createElement("div", {
    ref: J.setFloating,
    "data-radix-popper-content-wrapper": "",
    style: {
      ...ie,
      transform: ae ? ie.transform : "translate(0, -200%)",
      // keep off the page when measuring
      minWidth: "max-content",
      zIndex: ot,
      "--radix-popper-transform-origin": [
        (l = le.transformOrigin) === null || l === void 0 ? void 0 : l.x,
        (c = le.transformOrigin) === null || c === void 0 ? void 0 : c.y
      ].join(" ")
    },
    dir: e.dir
  }, /* @__PURE__ */ k.createElement(GW, {
    scope: d,
    placedSide: de,
    onArrowChange: z,
    arrowX: qe,
    arrowY: Ie,
    shouldHideArrow: Oe
  }, /* @__PURE__ */ k.createElement(Ar.div, nt({
    "data-side": de,
    "data-align": xe
  }, D, {
    ref: q,
    style: {
      ...D.style,
      // if the PopperContent hasn't been placed yet (not all measurements done)
      // we prevent animations so that users's animation don't kick in too early referring wrong sides
      animation: ae ? void 0 : "none",
      // hide the content if using the hide middleware and should be hidden
      opacity: (f = le.hide) !== null && f !== void 0 && f.referenceHidden ? 0 : void 0
    }
  }))));
});
function YW(e) {
  return e !== null;
}
const KW = (e) => ({
  name: "transformOrigin",
  options: e,
  fn(t) {
    var n, r, o, i, s;
    const { placement: l, rects: c, middlewareData: f } = t, g = ((n = f.arrow) === null || n === void 0 ? void 0 : n.centerOffset) !== 0, m = g ? 0 : e.arrowWidth, v = g ? 0 : e.arrowHeight, [b, w] = m5(l), _ = {
      start: "0%",
      center: "50%",
      end: "100%"
    }[w], S = ((r = (o = f.arrow) === null || o === void 0 ? void 0 : o.x) !== null && r !== void 0 ? r : 0) + m / 2, x = ((i = (s = f.arrow) === null || s === void 0 ? void 0 : s.y) !== null && i !== void 0 ? i : 0) + v / 2;
    let C = "", E = "";
    return b === "bottom" ? (C = g ? _ : `${S}px`, E = `${-v}px`) : b === "top" ? (C = g ? _ : `${S}px`, E = `${c.floating.height + v}px`) : b === "right" ? (C = `${-v}px`, E = g ? _ : `${x}px`) : b === "left" && (C = `${c.floating.width + v}px`, E = g ? _ : `${x}px`), {
      data: {
        x: C,
        y: E
      }
    };
  }
});
function m5(e) {
  const [t, n = "center"] = e.split("-");
  return [
    t,
    n
  ];
}
const g5 = zW, v5 = WW, y5 = QW, iw = "rovingFocusGroup.onEntryFocus", JW = {
  bubbles: !1,
  cancelable: !0
}, ZC = "RovingFocusGroup", [mS, b5, XW] = Z3(ZC), [ZW, E5] = Lc(ZC, [
  XW
]), [eG, tG] = ZW(ZC), nG = /* @__PURE__ */ k.forwardRef((e, t) => /* @__PURE__ */ k.createElement(mS.Provider, {
  scope: e.__scopeRovingFocusGroup
}, /* @__PURE__ */ k.createElement(mS.Slot, {
  scope: e.__scopeRovingFocusGroup
}, /* @__PURE__ */ k.createElement(rG, nt({}, e, {
  ref: t
}))))), rG = /* @__PURE__ */ k.forwardRef((e, t) => {
  const { __scopeRovingFocusGroup: n, orientation: r, loop: o = !1, dir: i, currentTabStopId: s, defaultCurrentTabStopId: l, onCurrentTabStopIdChange: c, onEntryFocus: f, ...d } = e, g = k.useRef(null), m = dr(t, g), v = e5(i), [b = null, w] = Fy({
    prop: s,
    defaultProp: l,
    onChange: c
  }), [_, S] = k.useState(!1), x = ts(f), C = b5(n), E = k.useRef(!1), [N, I] = k.useState(0);
  return k.useEffect(() => {
    const D = g.current;
    if (D)
      return D.addEventListener(iw, x), () => D.removeEventListener(iw, x);
  }, [
    x
  ]), /* @__PURE__ */ k.createElement(eG, {
    scope: n,
    orientation: r,
    dir: v,
    loop: o,
    currentTabStopId: b,
    onItemFocus: k.useCallback(
      (D) => w(D),
      [
        w
      ]
    ),
    onItemShiftTab: k.useCallback(
      () => S(!0),
      []
    ),
    onFocusableItemAdd: k.useCallback(
      () => I(
        (D) => D + 1
      ),
      []
    ),
    onFocusableItemRemove: k.useCallback(
      () => I(
        (D) => D - 1
      ),
      []
    )
  }, /* @__PURE__ */ k.createElement(Ar.div, nt({
    tabIndex: _ || N === 0 ? -1 : 0,
    "data-orientation": r
  }, d, {
    ref: m,
    style: {
      outline: "none",
      ...e.style
    },
    onMouseDown: dt(e.onMouseDown, () => {
      E.current = !0;
    }),
    onFocus: dt(e.onFocus, (D) => {
      const A = !E.current;
      if (D.target === D.currentTarget && A && !_) {
        const F = new CustomEvent(iw, JW);
        if (D.currentTarget.dispatchEvent(F), !F.defaultPrevented) {
          const $ = C().filter(
            (R) => R.focusable
          ), q = $.find(
            (R) => R.active
          ), H = $.find(
            (R) => R.id === b
          ), B = [
            q,
            H,
            ...$
          ].filter(Boolean).map(
            (R) => R.ref.current
          );
          w5(B);
        }
      }
      E.current = !1;
    }),
    onBlur: dt(
      e.onBlur,
      () => S(!1)
    )
  })));
}), oG = "RovingFocusGroupItem", iG = /* @__PURE__ */ k.forwardRef((e, t) => {
  const { __scopeRovingFocusGroup: n, focusable: r = !0, active: o = !1, tabStopId: i, ...s } = e, l = ac(), c = i || l, f = tG(oG, n), d = f.currentTabStopId === c, g = b5(n), { onFocusableItemAdd: m, onFocusableItemRemove: v } = f;
  return k.useEffect(() => {
    if (r)
      return m(), () => v();
  }, [
    r,
    m,
    v
  ]), /* @__PURE__ */ k.createElement(mS.ItemSlot, {
    scope: n,
    id: c,
    focusable: r,
    active: o
  }, /* @__PURE__ */ k.createElement(Ar.span, nt({
    tabIndex: d ? 0 : -1,
    "data-orientation": f.orientation
  }, s, {
    ref: t,
    onMouseDown: dt(e.onMouseDown, (b) => {
      r ? f.onItemFocus(c) : b.preventDefault();
    }),
    onFocus: dt(
      e.onFocus,
      () => f.onItemFocus(c)
    ),
    onKeyDown: dt(e.onKeyDown, (b) => {
      if (b.key === "Tab" && b.shiftKey) {
        f.onItemShiftTab();
        return;
      }
      if (b.target !== b.currentTarget)
        return;
      const w = lG(b, f.orientation, f.dir);
      if (w !== void 0) {
        b.preventDefault();
        let S = g().filter(
          (x) => x.focusable
        ).map(
          (x) => x.ref.current
        );
        if (w === "last")
          S.reverse();
        else if (w === "prev" || w === "next") {
          w === "prev" && S.reverse();
          const x = S.indexOf(b.currentTarget);
          S = f.loop ? cG(S, x + 1) : S.slice(x + 1);
        }
        setTimeout(
          () => w5(S)
        );
      }
    })
  })));
}), sG = {
  ArrowLeft: "prev",
  ArrowUp: "prev",
  ArrowRight: "next",
  ArrowDown: "next",
  PageUp: "first",
  Home: "first",
  PageDown: "last",
  End: "last"
};
function aG(e, t) {
  return t !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
}
function lG(e, t, n) {
  const r = aG(e.key, n);
  if (!(t === "vertical" && [
    "ArrowLeft",
    "ArrowRight"
  ].includes(r)) && !(t === "horizontal" && [
    "ArrowUp",
    "ArrowDown"
  ].includes(r)))
    return sG[r];
}
function w5(e) {
  const t = document.activeElement;
  for (const n of e)
    if (n === t || (n.focus(), document.activeElement !== t))
      return;
}
function cG(e, t) {
  return e.map(
    (n, r) => e[(t + r) % e.length]
  );
}
const uG = nG, fG = iG, dG = [
  "Enter",
  " "
], pG = [
  "ArrowDown",
  "PageUp",
  "Home"
], x5 = [
  "ArrowUp",
  "PageDown",
  "End"
], hG = [
  ...pG,
  ...x5
], jy = "Menu", [gS, mG, gG] = Z3(jy), [Rc, S5] = Lc(jy, [
  gG,
  Vy,
  E5
]), ek = Vy(), T5 = E5(), [vG, Oh] = Rc(jy), [yG, tk] = Rc(jy), bG = (e) => {
  const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: i, modal: s = !0 } = e, l = ek(t), [c, f] = k.useState(null), d = k.useRef(!1), g = ts(i), m = e5(o);
  return k.useEffect(() => {
    const v = () => {
      d.current = !0, document.addEventListener("pointerdown", b, {
        capture: !0,
        once: !0
      }), document.addEventListener("pointermove", b, {
        capture: !0,
        once: !0
      });
    }, b = () => d.current = !1;
    return document.addEventListener("keydown", v, {
      capture: !0
    }), () => {
      document.removeEventListener("keydown", v, {
        capture: !0
      }), document.removeEventListener("pointerdown", b, {
        capture: !0
      }), document.removeEventListener("pointermove", b, {
        capture: !0
      });
    };
  }, []), /* @__PURE__ */ k.createElement(g5, l, /* @__PURE__ */ k.createElement(vG, {
    scope: t,
    open: n,
    onOpenChange: g,
    content: c,
    onContentChange: f
  }, /* @__PURE__ */ k.createElement(yG, {
    scope: t,
    onClose: k.useCallback(
      () => g(!1),
      [
        g
      ]
    ),
    isUsingKeyboardRef: d,
    dir: m,
    modal: s
  }, r)));
}, EG = /* @__PURE__ */ k.forwardRef((e, t) => {
  const { __scopeMenu: n, ...r } = e, o = ek(n);
  return /* @__PURE__ */ k.createElement(v5, nt({}, o, r, {
    ref: t
  }));
}), C5 = "MenuPortal", [wG, xG] = Rc(C5, {
  forceMount: void 0
}), SG = (e) => {
  const { __scopeMenu: t, forceMount: n, children: r, container: o } = e, i = Oh(C5, t);
  return /* @__PURE__ */ k.createElement(wG, {
    scope: t,
    forceMount: n
  }, /* @__PURE__ */ k.createElement(al, {
    present: n || i.open
  }, /* @__PURE__ */ k.createElement(HC, {
    asChild: !0,
    container: o
  }, r)));
}, za = "MenuContent", [TG, k5] = Rc(za), CG = /* @__PURE__ */ k.forwardRef((e, t) => {
  const n = xG(za, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, i = Oh(za, e.__scopeMenu), s = tk(za, e.__scopeMenu);
  return /* @__PURE__ */ k.createElement(gS.Provider, {
    scope: e.__scopeMenu
  }, /* @__PURE__ */ k.createElement(al, {
    present: r || i.open
  }, /* @__PURE__ */ k.createElement(gS.Slot, {
    scope: e.__scopeMenu
  }, s.modal ? /* @__PURE__ */ k.createElement(kG, nt({}, o, {
    ref: t
  })) : /* @__PURE__ */ k.createElement(_G, nt({}, o, {
    ref: t
  })))));
}), kG = /* @__PURE__ */ k.forwardRef((e, t) => {
  const n = Oh(za, e.__scopeMenu), r = k.useRef(null), o = dr(t, r);
  return k.useEffect(() => {
    const i = r.current;
    if (i)
      return W3(i);
  }, []), /* @__PURE__ */ k.createElement(_5, nt({}, e, {
    ref: o,
    trapFocus: n.open,
    disableOutsidePointerEvents: n.open,
    disableOutsideScroll: !0,
    onFocusOutside: dt(
      e.onFocusOutside,
      (i) => i.preventDefault(),
      {
        checkForDefaultPrevented: !1
      }
    ),
    onDismiss: () => n.onOpenChange(!1)
  }));
}), _G = /* @__PURE__ */ k.forwardRef((e, t) => {
  const n = Oh(za, e.__scopeMenu);
  return /* @__PURE__ */ k.createElement(_5, nt({}, e, {
    ref: t,
    trapFocus: !1,
    disableOutsidePointerEvents: !1,
    disableOutsideScroll: !1,
    onDismiss: () => n.onOpenChange(!1)
  }));
}), _5 = /* @__PURE__ */ k.forwardRef((e, t) => {
  const { __scopeMenu: n, loop: r = !1, trapFocus: o, onOpenAutoFocus: i, onCloseAutoFocus: s, disableOutsidePointerEvents: l, onEntryFocus: c, onEscapeKeyDown: f, onPointerDownOutside: d, onFocusOutside: g, onInteractOutside: m, onDismiss: v, disableOutsideScroll: b, ...w } = e, _ = Oh(za, n), S = tk(za, n), x = ek(n), C = T5(n), E = mG(n), [N, I] = k.useState(null), D = k.useRef(null), A = dr(t, D, _.onContentChange), F = k.useRef(0), $ = k.useRef(""), q = k.useRef(0), H = k.useRef(null), z = k.useRef("right"), B = k.useRef(0), R = b ? z3 : k.Fragment, te = b ? {
    as: xf,
    allowPinchZoom: !0
  } : void 0, Q = (K) => {
    var Z, re;
    const J = $.current + K, ie = E().filter(
      (ge) => !ge.disabled
    ), ne = document.activeElement, ae = (Z = ie.find(
      (ge) => ge.ref.current === ne
    )) === null || Z === void 0 ? void 0 : Z.textValue, le = ie.map(
      (ge) => ge.textValue
    ), de = MG(le, J, ae), xe = (re = ie.find(
      (ge) => ge.textValue === de
    )) === null || re === void 0 ? void 0 : re.ref.current;
    (function ge(qe) {
      $.current = qe, window.clearTimeout(F.current), qe !== "" && (F.current = window.setTimeout(
        () => ge(""),
        1e3
      ));
    })(J), xe && setTimeout(
      () => xe.focus()
    );
  };
  k.useEffect(() => () => window.clearTimeout(F.current), []), F3();
  const Y = k.useCallback((K) => {
    var Z, re;
    return z.current === ((Z = H.current) === null || Z === void 0 ? void 0 : Z.side) && $G(K, (re = H.current) === null || re === void 0 ? void 0 : re.area);
  }, []);
  return /* @__PURE__ */ k.createElement(TG, {
    scope: n,
    searchRef: $,
    onItemEnter: k.useCallback((K) => {
      Y(K) && K.preventDefault();
    }, [
      Y
    ]),
    onItemLeave: k.useCallback((K) => {
      var Z;
      Y(K) || ((Z = D.current) === null || Z === void 0 || Z.focus(), I(null));
    }, [
      Y
    ]),
    onTriggerLeave: k.useCallback((K) => {
      Y(K) && K.preventDefault();
    }, [
      Y
    ]),
    pointerGraceTimerRef: q,
    onPointerGraceIntentChange: k.useCallback((K) => {
      H.current = K;
    }, [])
  }, /* @__PURE__ */ k.createElement(R, te, /* @__PURE__ */ k.createElement(L3, {
    asChild: !0,
    trapped: o,
    onMountAutoFocus: dt(i, (K) => {
      var Z;
      K.preventDefault(), (Z = D.current) === null || Z === void 0 || Z.focus();
    }),
    onUnmountAutoFocus: s
  }, /* @__PURE__ */ k.createElement(zC, {
    asChild: !0,
    disableOutsidePointerEvents: l,
    onEscapeKeyDown: f,
    onPointerDownOutside: d,
    onFocusOutside: g,
    onInteractOutside: m,
    onDismiss: v
  }, /* @__PURE__ */ k.createElement(uG, nt({
    asChild: !0
  }, C, {
    dir: S.dir,
    orientation: "vertical",
    loop: r,
    currentTabStopId: N,
    onCurrentTabStopIdChange: I,
    onEntryFocus: dt(c, (K) => {
      S.isUsingKeyboardRef.current || K.preventDefault();
    })
  }), /* @__PURE__ */ k.createElement(y5, nt({
    role: "menu",
    "aria-orientation": "vertical",
    "data-state": LG(_.open),
    "data-radix-menu-content": "",
    dir: S.dir
  }, x, w, {
    ref: A,
    style: {
      outline: "none",
      ...w.style
    },
    onKeyDown: dt(w.onKeyDown, (K) => {
      const re = K.target.closest("[data-radix-menu-content]") === K.currentTarget, J = K.ctrlKey || K.altKey || K.metaKey, ie = K.key.length === 1;
      re && (K.key === "Tab" && K.preventDefault(), !J && ie && Q(K.key));
      const ne = D.current;
      if (K.target !== ne || !hG.includes(K.key))
        return;
      K.preventDefault();
      const le = E().filter(
        (de) => !de.disabled
      ).map(
        (de) => de.ref.current
      );
      x5.includes(K.key) && le.reverse(), RG(le);
    }),
    onBlur: dt(e.onBlur, (K) => {
      K.currentTarget.contains(K.target) || (window.clearTimeout(F.current), $.current = "");
    }),
    onPointerMove: dt(e.onPointerMove, yS((K) => {
      const Z = K.target, re = B.current !== K.clientX;
      if (K.currentTarget.contains(Z) && re) {
        const J = K.clientX > B.current ? "right" : "left";
        z.current = J, B.current = K.clientX;
      }
    }))
  })))))));
}), vS = "MenuItem", VD = "menu.itemSelect", NG = /* @__PURE__ */ k.forwardRef((e, t) => {
  const { disabled: n = !1, onSelect: r, ...o } = e, i = k.useRef(null), s = tk(vS, e.__scopeMenu), l = k5(vS, e.__scopeMenu), c = dr(t, i), f = k.useRef(!1), d = () => {
    const g = i.current;
    if (!n && g) {
      const m = new CustomEvent(VD, {
        bubbles: !0,
        cancelable: !0
      });
      g.addEventListener(
        VD,
        (v) => r == null ? void 0 : r(v),
        {
          once: !0
        }
      ), D3(g, m), m.defaultPrevented ? f.current = !1 : s.onClose();
    }
  };
  return /* @__PURE__ */ k.createElement(OG, nt({}, o, {
    ref: c,
    disabled: n,
    onClick: dt(e.onClick, d),
    onPointerDown: (g) => {
      var m;
      (m = e.onPointerDown) === null || m === void 0 || m.call(e, g), f.current = !0;
    },
    onPointerUp: dt(e.onPointerUp, (g) => {
      var m;
      f.current || (m = g.currentTarget) === null || m === void 0 || m.click();
    }),
    onKeyDown: dt(e.onKeyDown, (g) => {
      const m = l.searchRef.current !== "";
      n || m && g.key === " " || dG.includes(g.key) && (g.currentTarget.click(), g.preventDefault());
    })
  }));
}), OG = /* @__PURE__ */ k.forwardRef((e, t) => {
  const { __scopeMenu: n, disabled: r = !1, textValue: o, ...i } = e, s = k5(vS, n), l = T5(n), c = k.useRef(null), f = dr(t, c), [d, g] = k.useState(!1), [m, v] = k.useState("");
  return k.useEffect(() => {
    const b = c.current;
    if (b) {
      var w;
      v(((w = b.textContent) !== null && w !== void 0 ? w : "").trim());
    }
  }, [
    i.children
  ]), /* @__PURE__ */ k.createElement(gS.ItemSlot, {
    scope: n,
    disabled: r,
    textValue: o ?? m
  }, /* @__PURE__ */ k.createElement(fG, nt({
    asChild: !0
  }, l, {
    focusable: !r
  }), /* @__PURE__ */ k.createElement(Ar.div, nt({
    role: "menuitem",
    "data-highlighted": d ? "" : void 0,
    "aria-disabled": r || void 0,
    "data-disabled": r ? "" : void 0
  }, i, {
    ref: f,
    onPointerMove: dt(e.onPointerMove, yS((b) => {
      r ? s.onItemLeave(b) : (s.onItemEnter(b), b.defaultPrevented || b.currentTarget.focus());
    })),
    onPointerLeave: dt(e.onPointerLeave, yS(
      (b) => s.onItemLeave(b)
    )),
    onFocus: dt(
      e.onFocus,
      () => g(!0)
    ),
    onBlur: dt(
      e.onBlur,
      () => g(!1)
    )
  }))));
}), AG = "MenuRadioGroup";
Rc(AG, {
  value: void 0,
  onValueChange: () => {
  }
});
const DG = "MenuItemIndicator";
Rc(DG, {
  checked: !1
});
const IG = "MenuSub";
Rc(IG);
function LG(e) {
  return e ? "open" : "closed";
}
function RG(e) {
  const t = document.activeElement;
  for (const n of e)
    if (n === t || (n.focus(), document.activeElement !== t))
      return;
}
function FG(e, t) {
  return e.map(
    (n, r) => e[(t + r) % e.length]
  );
}
function MG(e, t, n) {
  const o = t.length > 1 && Array.from(t).every(
    (f) => f === t[0]
  ) ? t[0] : t, i = n ? e.indexOf(n) : -1;
  let s = FG(e, Math.max(i, 0));
  o.length === 1 && (s = s.filter(
    (f) => f !== n
  ));
  const c = s.find(
    (f) => f.toLowerCase().startsWith(o.toLowerCase())
  );
  return c !== n ? c : void 0;
}
function PG(e, t) {
  const { x: n, y: r } = e;
  let o = !1;
  for (let i = 0, s = t.length - 1; i < t.length; s = i++) {
    const l = t[i].x, c = t[i].y, f = t[s].x, d = t[s].y;
    c > r != d > r && n < (f - l) * (r - c) / (d - c) + l && (o = !o);
  }
  return o;
}
function $G(e, t) {
  if (!t)
    return !1;
  const n = {
    x: e.clientX,
    y: e.clientY
  };
  return PG(n, t);
}
function yS(e) {
  return (t) => t.pointerType === "mouse" ? e(t) : void 0;
}
const VG = bG, jG = EG, UG = SG, BG = CG, qG = NG, N5 = "DropdownMenu", [zG, yje] = Lc(N5, [
  S5
]), Ah = S5(), [HG, O5] = zG(N5), WG = (e) => {
  const { __scopeDropdownMenu: t, children: n, dir: r, open: o, defaultOpen: i, onOpenChange: s, modal: l = !0 } = e, c = Ah(t), f = k.useRef(null), [d = !1, g] = Fy({
    prop: o,
    defaultProp: i,
    onChange: s
  });
  return /* @__PURE__ */ k.createElement(HG, {
    scope: t,
    triggerId: ac(),
    triggerRef: f,
    contentId: ac(),
    open: d,
    onOpenChange: g,
    onOpenToggle: k.useCallback(
      () => g(
        (m) => !m
      ),
      [
        g
      ]
    ),
    modal: l
  }, /* @__PURE__ */ k.createElement(VG, nt({}, c, {
    open: d,
    onOpenChange: g,
    dir: r,
    modal: l
  }), n));
}, GG = "DropdownMenuTrigger", QG = /* @__PURE__ */ k.forwardRef((e, t) => {
  const { __scopeDropdownMenu: n, disabled: r = !1, ...o } = e, i = O5(GG, n), s = Ah(n);
  return /* @__PURE__ */ k.createElement(jG, nt({
    asChild: !0
  }, s), /* @__PURE__ */ k.createElement(Ar.button, nt({
    type: "button",
    id: i.triggerId,
    "aria-haspopup": "menu",
    "aria-expanded": i.open,
    "aria-controls": i.open ? i.contentId : void 0,
    "data-state": i.open ? "open" : "closed",
    "data-disabled": r ? "" : void 0,
    disabled: r
  }, o, {
    ref: qC(t, i.triggerRef),
    onPointerDown: dt(e.onPointerDown, (l) => {
      !r && l.button === 0 && l.ctrlKey === !1 && (i.onOpenToggle(), i.open || l.preventDefault());
    }),
    onKeyDown: dt(e.onKeyDown, (l) => {
      r || ([
        "Enter",
        " "
      ].includes(l.key) && i.onOpenToggle(), l.key === "ArrowDown" && i.onOpenChange(!0), [
        "Enter",
        " ",
        "ArrowDown"
      ].includes(l.key) && l.preventDefault());
    })
  })));
}), YG = (e) => {
  const { __scopeDropdownMenu: t, ...n } = e, r = Ah(t);
  return /* @__PURE__ */ k.createElement(UG, nt({}, r, n));
}, KG = "DropdownMenuContent", JG = /* @__PURE__ */ k.forwardRef((e, t) => {
  const { __scopeDropdownMenu: n, ...r } = e, o = O5(KG, n), i = Ah(n), s = k.useRef(!1);
  return /* @__PURE__ */ k.createElement(BG, nt({
    id: o.contentId,
    "aria-labelledby": o.triggerId
  }, i, r, {
    ref: t,
    onCloseAutoFocus: dt(e.onCloseAutoFocus, (l) => {
      var c;
      s.current || (c = o.triggerRef.current) === null || c === void 0 || c.focus(), s.current = !1, l.preventDefault();
    }),
    onInteractOutside: dt(e.onInteractOutside, (l) => {
      const c = l.detail.originalEvent, f = c.button === 0 && c.ctrlKey === !0, d = c.button === 2 || f;
      (!o.modal || d) && (s.current = !0);
    }),
    style: {
      ...e.style,
      "--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
      "--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
      "--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
      "--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
      "--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
    }
  }));
}), XG = /* @__PURE__ */ k.forwardRef((e, t) => {
  const { __scopeDropdownMenu: n, ...r } = e, o = Ah(n);
  return /* @__PURE__ */ k.createElement(qG, nt({}, o, r, {
    ref: t
  }));
}), ZG = WG, eQ = QG, tQ = YG, nQ = JG, rQ = XG;
var Ct = {};
const oQ = "Á", iQ = "á", sQ = "Ă", aQ = "ă", lQ = "∾", cQ = "∿", uQ = "∾̳", fQ = "Â", dQ = "â", pQ = "´", hQ = "А", mQ = "а", gQ = "Æ", vQ = "æ", yQ = "⁡", bQ = "𝔄", EQ = "𝔞", wQ = "À", xQ = "à", SQ = "ℵ", TQ = "ℵ", CQ = "Α", kQ = "α", _Q = "Ā", NQ = "ā", OQ = "⨿", AQ = "&", DQ = "&", IQ = "⩕", LQ = "⩓", RQ = "∧", FQ = "⩜", MQ = "⩘", PQ = "⩚", $Q = "∠", VQ = "⦤", jQ = "∠", UQ = "⦨", BQ = "⦩", qQ = "⦪", zQ = "⦫", HQ = "⦬", WQ = "⦭", GQ = "⦮", QQ = "⦯", YQ = "∡", KQ = "∟", JQ = "⊾", XQ = "⦝", ZQ = "∢", eY = "Å", tY = "⍼", nY = "Ą", rY = "ą", oY = "𝔸", iY = "𝕒", sY = "⩯", aY = "≈", lY = "⩰", cY = "≊", uY = "≋", fY = "'", dY = "⁡", pY = "≈", hY = "≊", mY = "Å", gY = "å", vY = "𝒜", yY = "𝒶", bY = "≔", EY = "*", wY = "≈", xY = "≍", SY = "Ã", TY = "ã", CY = "Ä", kY = "ä", _Y = "∳", NY = "⨑", OY = "≌", AY = "϶", DY = "‵", IY = "∽", LY = "⋍", RY = "∖", FY = "⫧", MY = "⊽", PY = "⌅", $Y = "⌆", VY = "⌅", jY = "⎵", UY = "⎶", BY = "≌", qY = "Б", zY = "б", HY = "„", WY = "∵", GY = "∵", QY = "∵", YY = "⦰", KY = "϶", JY = "ℬ", XY = "ℬ", ZY = "Β", eK = "β", tK = "ℶ", nK = "≬", rK = "𝔅", oK = "𝔟", iK = "⋂", sK = "◯", aK = "⋃", lK = "⨀", cK = "⨁", uK = "⨂", fK = "⨆", dK = "★", pK = "▽", hK = "△", mK = "⨄", gK = "⋁", vK = "⋀", yK = "⤍", bK = "⧫", EK = "▪", wK = "▴", xK = "▾", SK = "◂", TK = "▸", CK = "␣", kK = "▒", _K = "░", NK = "▓", OK = "█", AK = "=⃥", DK = "≡⃥", IK = "⫭", LK = "⌐", RK = "𝔹", FK = "𝕓", MK = "⊥", PK = "⊥", $K = "⋈", VK = "⧉", jK = "┐", UK = "╕", BK = "╖", qK = "╗", zK = "┌", HK = "╒", WK = "╓", GK = "╔", QK = "─", YK = "═", KK = "┬", JK = "╤", XK = "╥", ZK = "╦", eJ = "┴", tJ = "╧", nJ = "╨", rJ = "╩", oJ = "⊟", iJ = "⊞", sJ = "⊠", aJ = "┘", lJ = "╛", cJ = "╜", uJ = "╝", fJ = "└", dJ = "╘", pJ = "╙", hJ = "╚", mJ = "│", gJ = "║", vJ = "┼", yJ = "╪", bJ = "╫", EJ = "╬", wJ = "┤", xJ = "╡", SJ = "╢", TJ = "╣", CJ = "├", kJ = "╞", _J = "╟", NJ = "╠", OJ = "‵", AJ = "˘", DJ = "˘", IJ = "¦", LJ = "𝒷", RJ = "ℬ", FJ = "⁏", MJ = "∽", PJ = "⋍", $J = "⧅", VJ = "\\", jJ = "⟈", UJ = "•", BJ = "•", qJ = "≎", zJ = "⪮", HJ = "≏", WJ = "≎", GJ = "≏", QJ = "Ć", YJ = "ć", KJ = "⩄", JJ = "⩉", XJ = "⩋", ZJ = "∩", eX = "⋒", tX = "⩇", nX = "⩀", rX = "ⅅ", oX = "∩︀", iX = "⁁", sX = "ˇ", aX = "ℭ", lX = "⩍", cX = "Č", uX = "č", fX = "Ç", dX = "ç", pX = "Ĉ", hX = "ĉ", mX = "∰", gX = "⩌", vX = "⩐", yX = "Ċ", bX = "ċ", EX = "¸", wX = "¸", xX = "⦲", SX = "¢", TX = "·", CX = "·", kX = "𝔠", _X = "ℭ", NX = "Ч", OX = "ч", AX = "✓", DX = "✓", IX = "Χ", LX = "χ", RX = "ˆ", FX = "≗", MX = "↺", PX = "↻", $X = "⊛", VX = "⊚", jX = "⊝", UX = "⊙", BX = "®", qX = "Ⓢ", zX = "⊖", HX = "⊕", WX = "⊗", GX = "○", QX = "⧃", YX = "≗", KX = "⨐", JX = "⫯", XX = "⧂", ZX = "∲", eZ = "”", tZ = "’", nZ = "♣", rZ = "♣", oZ = ":", iZ = "∷", sZ = "⩴", aZ = "≔", lZ = "≔", cZ = ",", uZ = "@", fZ = "∁", dZ = "∘", pZ = "∁", hZ = "ℂ", mZ = "≅", gZ = "⩭", vZ = "≡", yZ = "∮", bZ = "∯", EZ = "∮", wZ = "𝕔", xZ = "ℂ", SZ = "∐", TZ = "∐", CZ = "©", kZ = "©", _Z = "℗", NZ = "∳", OZ = "↵", AZ = "✗", DZ = "⨯", IZ = "𝒞", LZ = "𝒸", RZ = "⫏", FZ = "⫑", MZ = "⫐", PZ = "⫒", $Z = "⋯", VZ = "⤸", jZ = "⤵", UZ = "⋞", BZ = "⋟", qZ = "↶", zZ = "⤽", HZ = "⩈", WZ = "⩆", GZ = "≍", QZ = "∪", YZ = "⋓", KZ = "⩊", JZ = "⊍", XZ = "⩅", ZZ = "∪︀", eee = "↷", tee = "⤼", nee = "⋞", ree = "⋟", oee = "⋎", iee = "⋏", see = "¤", aee = "↶", lee = "↷", cee = "⋎", uee = "⋏", fee = "∲", dee = "∱", pee = "⌭", hee = "†", mee = "‡", gee = "ℸ", vee = "↓", yee = "↡", bee = "⇓", Eee = "‐", wee = "⫤", xee = "⊣", See = "⤏", Tee = "˝", Cee = "Ď", kee = "ď", _ee = "Д", Nee = "д", Oee = "‡", Aee = "⇊", Dee = "ⅅ", Iee = "ⅆ", Lee = "⤑", Ree = "⩷", Fee = "°", Mee = "∇", Pee = "Δ", $ee = "δ", Vee = "⦱", jee = "⥿", Uee = "𝔇", Bee = "𝔡", qee = "⥥", zee = "⇃", Hee = "⇂", Wee = "´", Gee = "˙", Qee = "˝", Yee = "`", Kee = "˜", Jee = "⋄", Xee = "⋄", Zee = "⋄", ete = "♦", tte = "♦", nte = "¨", rte = "ⅆ", ote = "ϝ", ite = "⋲", ste = "÷", ate = "÷", lte = "⋇", cte = "⋇", ute = "Ђ", fte = "ђ", dte = "⌞", pte = "⌍", hte = "$", mte = "𝔻", gte = "𝕕", vte = "¨", yte = "˙", bte = "⃜", Ete = "≐", wte = "≑", xte = "≐", Ste = "∸", Tte = "∔", Cte = "⊡", kte = "⌆", _te = "∯", Nte = "¨", Ote = "⇓", Ate = "⇐", Dte = "⇔", Ite = "⫤", Lte = "⟸", Rte = "⟺", Fte = "⟹", Mte = "⇒", Pte = "⊨", $te = "⇑", Vte = "⇕", jte = "∥", Ute = "⤓", Bte = "↓", qte = "↓", zte = "⇓", Hte = "⇵", Wte = "̑", Gte = "⇊", Qte = "⇃", Yte = "⇂", Kte = "⥐", Jte = "⥞", Xte = "⥖", Zte = "↽", ene = "⥟", tne = "⥗", nne = "⇁", rne = "↧", one = "⊤", ine = "⤐", sne = "⌟", ane = "⌌", lne = "𝒟", cne = "𝒹", une = "Ѕ", fne = "ѕ", dne = "⧶", pne = "Đ", hne = "đ", mne = "⋱", gne = "▿", vne = "▾", yne = "⇵", bne = "⥯", Ene = "⦦", wne = "Џ", xne = "џ", Sne = "⟿", Tne = "É", Cne = "é", kne = "⩮", _ne = "Ě", Nne = "ě", One = "Ê", Ane = "ê", Dne = "≖", Ine = "≕", Lne = "Э", Rne = "э", Fne = "⩷", Mne = "Ė", Pne = "ė", $ne = "≑", Vne = "ⅇ", jne = "≒", Une = "𝔈", Bne = "𝔢", qne = "⪚", zne = "È", Hne = "è", Wne = "⪖", Gne = "⪘", Qne = "⪙", Yne = "∈", Kne = "⏧", Jne = "ℓ", Xne = "⪕", Zne = "⪗", ere = "Ē", tre = "ē", nre = "∅", rre = "∅", ore = "◻", ire = "∅", sre = "▫", are = " ", lre = " ", cre = " ", ure = "Ŋ", fre = "ŋ", dre = " ", pre = "Ę", hre = "ę", mre = "𝔼", gre = "𝕖", vre = "⋕", yre = "⧣", bre = "⩱", Ere = "ε", wre = "Ε", xre = "ε", Sre = "ϵ", Tre = "≖", Cre = "≕", kre = "≂", _re = "⪖", Nre = "⪕", Ore = "⩵", Are = "=", Dre = "≂", Ire = "≟", Lre = "⇌", Rre = "≡", Fre = "⩸", Mre = "⧥", Pre = "⥱", $re = "≓", Vre = "ℯ", jre = "ℰ", Ure = "≐", Bre = "⩳", qre = "≂", zre = "Η", Hre = "η", Wre = "Ð", Gre = "ð", Qre = "Ë", Yre = "ë", Kre = "€", Jre = "!", Xre = "∃", Zre = "∃", eoe = "ℰ", toe = "ⅇ", noe = "ⅇ", roe = "≒", ooe = "Ф", ioe = "ф", soe = "♀", aoe = "ffi", loe = "ff", coe = "ffl", uoe = "𝔉", foe = "𝔣", doe = "fi", poe = "◼", hoe = "▪", moe = "fj", goe = "♭", voe = "fl", yoe = "▱", boe = "ƒ", Eoe = "𝔽", woe = "𝕗", xoe = "∀", Soe = "∀", Toe = "⋔", Coe = "⫙", koe = "ℱ", _oe = "⨍", Noe = "½", Ooe = "⅓", Aoe = "¼", Doe = "⅕", Ioe = "⅙", Loe = "⅛", Roe = "⅔", Foe = "⅖", Moe = "¾", Poe = "⅗", $oe = "⅜", Voe = "⅘", joe = "⅚", Uoe = "⅝", Boe = "⅞", qoe = "⁄", zoe = "⌢", Hoe = "𝒻", Woe = "ℱ", Goe = "ǵ", Qoe = "Γ", Yoe = "γ", Koe = "Ϝ", Joe = "ϝ", Xoe = "⪆", Zoe = "Ğ", eie = "ğ", tie = "Ģ", nie = "Ĝ", rie = "ĝ", oie = "Г", iie = "г", sie = "Ġ", aie = "ġ", lie = "≥", cie = "≧", uie = "⪌", fie = "⋛", die = "≥", pie = "≧", hie = "⩾", mie = "⪩", gie = "⩾", vie = "⪀", yie = "⪂", bie = "⪄", Eie = "⋛︀", wie = "⪔", xie = "𝔊", Sie = "𝔤", Tie = "≫", Cie = "⋙", kie = "⋙", _ie = "ℷ", Nie = "Ѓ", Oie = "ѓ", Aie = "⪥", Die = "≷", Iie = "⪒", Lie = "⪤", Rie = "⪊", Fie = "⪊", Mie = "⪈", Pie = "≩", $ie = "⪈", Vie = "≩", jie = "⋧", Uie = "𝔾", Bie = "𝕘", qie = "`", zie = "≥", Hie = "⋛", Wie = "≧", Gie = "⪢", Qie = "≷", Yie = "⩾", Kie = "≳", Jie = "𝒢", Xie = "ℊ", Zie = "≳", ese = "⪎", tse = "⪐", nse = "⪧", rse = "⩺", ose = ">", ise = ">", sse = "≫", ase = "⋗", lse = "⦕", cse = "⩼", use = "⪆", fse = "⥸", dse = "⋗", pse = "⋛", hse = "⪌", mse = "≷", gse = "≳", vse = "≩︀", yse = "≩︀", bse = "ˇ", Ese = " ", wse = "½", xse = "ℋ", Sse = "Ъ", Tse = "ъ", Cse = "⥈", kse = "↔", _se = "⇔", Nse = "↭", Ose = "^", Ase = "ℏ", Dse = "Ĥ", Ise = "ĥ", Lse = "♥", Rse = "♥", Fse = "…", Mse = "⊹", Pse = "𝔥", $se = "ℌ", Vse = "ℋ", jse = "⤥", Use = "⤦", Bse = "⇿", qse = "∻", zse = "↩", Hse = "↪", Wse = "𝕙", Gse = "ℍ", Qse = "―", Yse = "─", Kse = "𝒽", Jse = "ℋ", Xse = "ℏ", Zse = "Ħ", eae = "ħ", tae = "≎", nae = "≏", rae = "⁃", oae = "‐", iae = "Í", sae = "í", aae = "⁣", lae = "Î", cae = "î", uae = "И", fae = "и", dae = "İ", pae = "Е", hae = "е", mae = "¡", gae = "⇔", vae = "𝔦", yae = "ℑ", bae = "Ì", Eae = "ì", wae = "ⅈ", xae = "⨌", Sae = "∭", Tae = "⧜", Cae = "℩", kae = "IJ", _ae = "ij", Nae = "Ī", Oae = "ī", Aae = "ℑ", Dae = "ⅈ", Iae = "ℐ", Lae = "ℑ", Rae = "ı", Fae = "ℑ", Mae = "⊷", Pae = "Ƶ", $ae = "⇒", Vae = "℅", jae = "∞", Uae = "⧝", Bae = "ı", qae = "⊺", zae = "∫", Hae = "∬", Wae = "ℤ", Gae = "∫", Qae = "⊺", Yae = "⋂", Kae = "⨗", Jae = "⨼", Xae = "⁣", Zae = "⁢", ele = "Ё", tle = "ё", nle = "Į", rle = "į", ole = "𝕀", ile = "𝕚", sle = "Ι", ale = "ι", lle = "⨼", cle = "¿", ule = "𝒾", fle = "ℐ", dle = "∈", ple = "⋵", hle = "⋹", mle = "⋴", gle = "⋳", vle = "∈", yle = "⁢", ble = "Ĩ", Ele = "ĩ", wle = "І", xle = "і", Sle = "Ï", Tle = "ï", Cle = "Ĵ", kle = "ĵ", _le = "Й", Nle = "й", Ole = "𝔍", Ale = "𝔧", Dle = "ȷ", Ile = "𝕁", Lle = "𝕛", Rle = "𝒥", Fle = "𝒿", Mle = "Ј", Ple = "ј", $le = "Є", Vle = "є", jle = "Κ", Ule = "κ", Ble = "ϰ", qle = "Ķ", zle = "ķ", Hle = "К", Wle = "к", Gle = "𝔎", Qle = "𝔨", Yle = "ĸ", Kle = "Х", Jle = "х", Xle = "Ќ", Zle = "ќ", ece = "𝕂", tce = "𝕜", nce = "𝒦", rce = "𝓀", oce = "⇚", ice = "Ĺ", sce = "ĺ", ace = "⦴", lce = "ℒ", cce = "Λ", uce = "λ", fce = "⟨", dce = "⟪", pce = "⦑", hce = "⟨", mce = "⪅", gce = "ℒ", vce = "«", yce = "⇤", bce = "⤟", Ece = "←", wce = "↞", xce = "⇐", Sce = "⤝", Tce = "↩", Cce = "↫", kce = "⤹", _ce = "⥳", Nce = "↢", Oce = "⤙", Ace = "⤛", Dce = "⪫", Ice = "⪭", Lce = "⪭︀", Rce = "⤌", Fce = "⤎", Mce = "❲", Pce = "{", $ce = "[", Vce = "⦋", jce = "⦏", Uce = "⦍", Bce = "Ľ", qce = "ľ", zce = "Ļ", Hce = "ļ", Wce = "⌈", Gce = "{", Qce = "Л", Yce = "л", Kce = "⤶", Jce = "“", Xce = "„", Zce = "⥧", eue = "⥋", tue = "↲", nue = "≤", rue = "≦", oue = "⟨", iue = "⇤", sue = "←", aue = "←", lue = "⇐", cue = "⇆", uue = "↢", fue = "⌈", due = "⟦", pue = "⥡", hue = "⥙", mue = "⇃", gue = "⌊", vue = "↽", yue = "↼", bue = "⇇", Eue = "↔", wue = "↔", xue = "⇔", Sue = "⇆", Tue = "⇋", Cue = "↭", kue = "⥎", _ue = "↤", Nue = "⊣", Oue = "⥚", Aue = "⋋", Due = "⧏", Iue = "⊲", Lue = "⊴", Rue = "⥑", Fue = "⥠", Mue = "⥘", Pue = "↿", $ue = "⥒", Vue = "↼", jue = "⪋", Uue = "⋚", Bue = "≤", que = "≦", zue = "⩽", Hue = "⪨", Wue = "⩽", Gue = "⩿", Que = "⪁", Yue = "⪃", Kue = "⋚︀", Jue = "⪓", Xue = "⪅", Zue = "⋖", efe = "⋚", tfe = "⪋", nfe = "⋚", rfe = "≦", ofe = "≶", ife = "≶", sfe = "⪡", afe = "≲", lfe = "⩽", cfe = "≲", ufe = "⥼", ffe = "⌊", dfe = "𝔏", pfe = "𝔩", hfe = "≶", mfe = "⪑", gfe = "⥢", vfe = "↽", yfe = "↼", bfe = "⥪", Efe = "▄", wfe = "Љ", xfe = "љ", Sfe = "⇇", Tfe = "≪", Cfe = "⋘", kfe = "⌞", _fe = "⇚", Nfe = "⥫", Ofe = "◺", Afe = "Ŀ", Dfe = "ŀ", Ife = "⎰", Lfe = "⎰", Rfe = "⪉", Ffe = "⪉", Mfe = "⪇", Pfe = "≨", $fe = "⪇", Vfe = "≨", jfe = "⋦", Ufe = "⟬", Bfe = "⇽", qfe = "⟦", zfe = "⟵", Hfe = "⟵", Wfe = "⟸", Gfe = "⟷", Qfe = "⟷", Yfe = "⟺", Kfe = "⟼", Jfe = "⟶", Xfe = "⟶", Zfe = "⟹", ede = "↫", tde = "↬", nde = "⦅", rde = "𝕃", ode = "𝕝", ide = "⨭", sde = "⨴", ade = "∗", lde = "_", cde = "↙", ude = "↘", fde = "◊", dde = "◊", pde = "⧫", hde = "(", mde = "⦓", gde = "⇆", vde = "⌟", yde = "⇋", bde = "⥭", Ede = "‎", wde = "⊿", xde = "‹", Sde = "𝓁", Tde = "ℒ", Cde = "↰", kde = "↰", _de = "≲", Nde = "⪍", Ode = "⪏", Ade = "[", Dde = "‘", Ide = "‚", Lde = "Ł", Rde = "ł", Fde = "⪦", Mde = "⩹", Pde = "<", $de = "<", Vde = "≪", jde = "⋖", Ude = "⋋", Bde = "⋉", qde = "⥶", zde = "⩻", Hde = "◃", Wde = "⊴", Gde = "◂", Qde = "⦖", Yde = "⥊", Kde = "⥦", Jde = "≨︀", Xde = "≨︀", Zde = "¯", epe = "♂", tpe = "✠", npe = "✠", rpe = "↦", ope = "↦", ipe = "↧", spe = "↤", ape = "↥", lpe = "▮", cpe = "⨩", upe = "М", fpe = "м", dpe = "—", ppe = "∺", hpe = "∡", mpe = " ", gpe = "ℳ", vpe = "𝔐", ype = "𝔪", bpe = "℧", Epe = "µ", wpe = "*", xpe = "⫰", Spe = "∣", Tpe = "·", Cpe = "⊟", kpe = "−", _pe = "∸", Npe = "⨪", Ope = "∓", Ape = "⫛", Dpe = "…", Ipe = "∓", Lpe = "⊧", Rpe = "𝕄", Fpe = "𝕞", Mpe = "∓", Ppe = "𝓂", $pe = "ℳ", Vpe = "∾", jpe = "Μ", Upe = "μ", Bpe = "⊸", qpe = "⊸", zpe = "∇", Hpe = "Ń", Wpe = "ń", Gpe = "∠⃒", Qpe = "≉", Ype = "⩰̸", Kpe = "≋̸", Jpe = "ʼn", Xpe = "≉", Zpe = "♮", ehe = "ℕ", the = "♮", nhe = " ", rhe = "≎̸", ohe = "≏̸", ihe = "⩃", she = "Ň", ahe = "ň", lhe = "Ņ", che = "ņ", uhe = "≇", fhe = "⩭̸", dhe = "⩂", phe = "Н", hhe = "н", mhe = "–", ghe = "⤤", vhe = "↗", yhe = "⇗", bhe = "↗", Ehe = "≠", whe = "≐̸", xhe = "​", She = "​", The = "​", Che = "​", khe = "≢", _he = "⤨", Nhe = "≂̸", Ohe = "≫", Ahe = "≪", Dhe = `
`, Ihe = "∄", Lhe = "∄", Rhe = "𝔑", Fhe = "𝔫", Mhe = "≧̸", Phe = "≱", $he = "≱", Vhe = "≧̸", jhe = "⩾̸", Uhe = "⩾̸", Bhe = "⋙̸", qhe = "≵", zhe = "≫⃒", Hhe = "≯", Whe = "≯", Ghe = "≫̸", Qhe = "↮", Yhe = "⇎", Khe = "⫲", Jhe = "∋", Xhe = "⋼", Zhe = "⋺", eme = "∋", tme = "Њ", nme = "њ", rme = "↚", ome = "⇍", ime = "‥", sme = "≦̸", ame = "≰", lme = "↚", cme = "⇍", ume = "↮", fme = "⇎", dme = "≰", pme = "≦̸", hme = "⩽̸", mme = "⩽̸", gme = "≮", vme = "⋘̸", yme = "≴", bme = "≪⃒", Eme = "≮", wme = "⋪", xme = "⋬", Sme = "≪̸", Tme = "∤", Cme = "⁠", kme = " ", _me = "𝕟", Nme = "ℕ", Ome = "⫬", Ame = "¬", Dme = "≢", Ime = "≭", Lme = "∦", Rme = "∉", Fme = "≠", Mme = "≂̸", Pme = "∄", $me = "≯", Vme = "≱", jme = "≧̸", Ume = "≫̸", Bme = "≹", qme = "⩾̸", zme = "≵", Hme = "≎̸", Wme = "≏̸", Gme = "∉", Qme = "⋵̸", Yme = "⋹̸", Kme = "∉", Jme = "⋷", Xme = "⋶", Zme = "⧏̸", ege = "⋪", tge = "⋬", nge = "≮", rge = "≰", oge = "≸", ige = "≪̸", sge = "⩽̸", age = "≴", lge = "⪢̸", cge = "⪡̸", uge = "∌", fge = "∌", dge = "⋾", pge = "⋽", hge = "⊀", mge = "⪯̸", gge = "⋠", vge = "∌", yge = "⧐̸", bge = "⋫", Ege = "⋭", wge = "⊏̸", xge = "⋢", Sge = "⊐̸", Tge = "⋣", Cge = "⊂⃒", kge = "⊈", _ge = "⊁", Nge = "⪰̸", Oge = "⋡", Age = "≿̸", Dge = "⊃⃒", Ige = "⊉", Lge = "≁", Rge = "≄", Fge = "≇", Mge = "≉", Pge = "∤", $ge = "∦", Vge = "∦", jge = "⫽⃥", Uge = "∂̸", Bge = "⨔", qge = "⊀", zge = "⋠", Hge = "⊀", Wge = "⪯̸", Gge = "⪯̸", Qge = "⤳̸", Yge = "↛", Kge = "⇏", Jge = "↝̸", Xge = "↛", Zge = "⇏", eve = "⋫", tve = "⋭", nve = "⊁", rve = "⋡", ove = "⪰̸", ive = "𝒩", sve = "𝓃", ave = "∤", lve = "∦", cve = "≁", uve = "≄", fve = "≄", dve = "∤", pve = "∦", hve = "⋢", mve = "⋣", gve = "⊄", vve = "⫅̸", yve = "⊈", bve = "⊂⃒", Eve = "⊈", wve = "⫅̸", xve = "⊁", Sve = "⪰̸", Tve = "⊅", Cve = "⫆̸", kve = "⊉", _ve = "⊃⃒", Nve = "⊉", Ove = "⫆̸", Ave = "≹", Dve = "Ñ", Ive = "ñ", Lve = "≸", Rve = "⋪", Fve = "⋬", Mve = "⋫", Pve = "⋭", $ve = "Ν", Vve = "ν", jve = "#", Uve = "№", Bve = " ", qve = "≍⃒", zve = "⊬", Hve = "⊭", Wve = "⊮", Gve = "⊯", Qve = "≥⃒", Yve = ">⃒", Kve = "⤄", Jve = "⧞", Xve = "⤂", Zve = "≤⃒", e0e = "<⃒", t0e = "⊴⃒", n0e = "⤃", r0e = "⊵⃒", o0e = "∼⃒", i0e = "⤣", s0e = "↖", a0e = "⇖", l0e = "↖", c0e = "⤧", u0e = "Ó", f0e = "ó", d0e = "⊛", p0e = "Ô", h0e = "ô", m0e = "⊚", g0e = "О", v0e = "о", y0e = "⊝", b0e = "Ő", E0e = "ő", w0e = "⨸", x0e = "⊙", S0e = "⦼", T0e = "Œ", C0e = "œ", k0e = "⦿", _0e = "𝔒", N0e = "𝔬", O0e = "˛", A0e = "Ò", D0e = "ò", I0e = "⧁", L0e = "⦵", R0e = "Ω", F0e = "∮", M0e = "↺", P0e = "⦾", $0e = "⦻", V0e = "‾", j0e = "⧀", U0e = "Ō", B0e = "ō", q0e = "Ω", z0e = "ω", H0e = "Ο", W0e = "ο", G0e = "⦶", Q0e = "⊖", Y0e = "𝕆", K0e = "𝕠", J0e = "⦷", X0e = "“", Z0e = "‘", eye = "⦹", tye = "⊕", nye = "↻", rye = "⩔", oye = "∨", iye = "⩝", sye = "ℴ", aye = "ℴ", lye = "ª", cye = "º", uye = "⊶", fye = "⩖", dye = "⩗", pye = "⩛", hye = "Ⓢ", mye = "𝒪", gye = "ℴ", vye = "Ø", yye = "ø", bye = "⊘", Eye = "Õ", wye = "õ", xye = "⨶", Sye = "⨷", Tye = "⊗", Cye = "Ö", kye = "ö", _ye = "⌽", Nye = "‾", Oye = "⏞", Aye = "⎴", Dye = "⏜", Iye = "¶", Lye = "∥", Rye = "∥", Fye = "⫳", Mye = "⫽", Pye = "∂", $ye = "∂", Vye = "П", jye = "п", Uye = "%", Bye = ".", qye = "‰", zye = "⊥", Hye = "‱", Wye = "𝔓", Gye = "𝔭", Qye = "Φ", Yye = "φ", Kye = "ϕ", Jye = "ℳ", Xye = "☎", Zye = "Π", e1e = "π", t1e = "⋔", n1e = "ϖ", r1e = "ℏ", o1e = "ℎ", i1e = "ℏ", s1e = "⨣", a1e = "⊞", l1e = "⨢", c1e = "+", u1e = "∔", f1e = "⨥", d1e = "⩲", p1e = "±", h1e = "±", m1e = "⨦", g1e = "⨧", v1e = "±", y1e = "ℌ", b1e = "⨕", E1e = "𝕡", w1e = "ℙ", x1e = "£", S1e = "⪷", T1e = "⪻", C1e = "≺", k1e = "≼", _1e = "⪷", N1e = "≺", O1e = "≼", A1e = "≺", D1e = "⪯", I1e = "≼", L1e = "≾", R1e = "⪯", F1e = "⪹", M1e = "⪵", P1e = "⋨", $1e = "⪯", V1e = "⪳", j1e = "≾", U1e = "′", B1e = "″", q1e = "ℙ", z1e = "⪹", H1e = "⪵", W1e = "⋨", G1e = "∏", Q1e = "∏", Y1e = "⌮", K1e = "⌒", J1e = "⌓", X1e = "∝", Z1e = "∝", ebe = "∷", tbe = "∝", nbe = "≾", rbe = "⊰", obe = "𝒫", ibe = "𝓅", sbe = "Ψ", abe = "ψ", lbe = " ", cbe = "𝔔", ube = "𝔮", fbe = "⨌", dbe = "𝕢", pbe = "ℚ", hbe = "⁗", mbe = "𝒬", gbe = "𝓆", vbe = "ℍ", ybe = "⨖", bbe = "?", Ebe = "≟", wbe = '"', xbe = '"', Sbe = "⇛", Tbe = "∽̱", Cbe = "Ŕ", kbe = "ŕ", _be = "√", Nbe = "⦳", Obe = "⟩", Abe = "⟫", Dbe = "⦒", Ibe = "⦥", Lbe = "⟩", Rbe = "»", Fbe = "⥵", Mbe = "⇥", Pbe = "⤠", $be = "⤳", Vbe = "→", jbe = "↠", Ube = "⇒", Bbe = "⤞", qbe = "↪", zbe = "↬", Hbe = "⥅", Wbe = "⥴", Gbe = "⤖", Qbe = "↣", Ybe = "↝", Kbe = "⤚", Jbe = "⤜", Xbe = "∶", Zbe = "ℚ", eEe = "⤍", tEe = "⤏", nEe = "⤐", rEe = "❳", oEe = "}", iEe = "]", sEe = "⦌", aEe = "⦎", lEe = "⦐", cEe = "Ř", uEe = "ř", fEe = "Ŗ", dEe = "ŗ", pEe = "⌉", hEe = "}", mEe = "Р", gEe = "р", vEe = "⤷", yEe = "⥩", bEe = "”", EEe = "”", wEe = "↳", xEe = "ℜ", SEe = "ℛ", TEe = "ℜ", CEe = "ℝ", kEe = "ℜ", _Ee = "▭", NEe = "®", OEe = "®", AEe = "∋", DEe = "⇋", IEe = "⥯", LEe = "⥽", REe = "⌋", FEe = "𝔯", MEe = "ℜ", PEe = "⥤", $Ee = "⇁", VEe = "⇀", jEe = "⥬", UEe = "Ρ", BEe = "ρ", qEe = "ϱ", zEe = "⟩", HEe = "⇥", WEe = "→", GEe = "→", QEe = "⇒", YEe = "⇄", KEe = "↣", JEe = "⌉", XEe = "⟧", ZEe = "⥝", ewe = "⥕", twe = "⇂", nwe = "⌋", rwe = "⇁", owe = "⇀", iwe = "⇄", swe = "⇌", awe = "⇉", lwe = "↝", cwe = "↦", uwe = "⊢", fwe = "⥛", dwe = "⋌", pwe = "⧐", hwe = "⊳", mwe = "⊵", gwe = "⥏", vwe = "⥜", ywe = "⥔", bwe = "↾", Ewe = "⥓", wwe = "⇀", xwe = "˚", Swe = "≓", Twe = "⇄", Cwe = "⇌", kwe = "‏", _we = "⎱", Nwe = "⎱", Owe = "⫮", Awe = "⟭", Dwe = "⇾", Iwe = "⟧", Lwe = "⦆", Rwe = "𝕣", Fwe = "ℝ", Mwe = "⨮", Pwe = "⨵", $we = "⥰", Vwe = ")", jwe = "⦔", Uwe = "⨒", Bwe = "⇉", qwe = "⇛", zwe = "›", Hwe = "𝓇", Wwe = "ℛ", Gwe = "↱", Qwe = "↱", Ywe = "]", Kwe = "’", Jwe = "’", Xwe = "⋌", Zwe = "⋊", exe = "▹", txe = "⊵", nxe = "▸", rxe = "⧎", oxe = "⧴", ixe = "⥨", sxe = "℞", axe = "Ś", lxe = "ś", cxe = "‚", uxe = "⪸", fxe = "Š", dxe = "š", pxe = "⪼", hxe = "≻", mxe = "≽", gxe = "⪰", vxe = "⪴", yxe = "Ş", bxe = "ş", Exe = "Ŝ", wxe = "ŝ", xxe = "⪺", Sxe = "⪶", Txe = "⋩", Cxe = "⨓", kxe = "≿", _xe = "С", Nxe = "с", Oxe = "⊡", Axe = "⋅", Dxe = "⩦", Ixe = "⤥", Lxe = "↘", Rxe = "⇘", Fxe = "↘", Mxe = "§", Pxe = ";", $xe = "⤩", Vxe = "∖", jxe = "∖", Uxe = "✶", Bxe = "𝔖", qxe = "𝔰", zxe = "⌢", Hxe = "♯", Wxe = "Щ", Gxe = "щ", Qxe = "Ш", Yxe = "ш", Kxe = "↓", Jxe = "←", Xxe = "∣", Zxe = "∥", eSe = "→", tSe = "↑", nSe = "­", rSe = "Σ", oSe = "σ", iSe = "ς", sSe = "ς", aSe = "∼", lSe = "⩪", cSe = "≃", uSe = "≃", fSe = "⪞", dSe = "⪠", pSe = "⪝", hSe = "⪟", mSe = "≆", gSe = "⨤", vSe = "⥲", ySe = "←", bSe = "∘", ESe = "∖", wSe = "⨳", xSe = "⧤", SSe = "∣", TSe = "⌣", CSe = "⪪", kSe = "⪬", _Se = "⪬︀", NSe = "Ь", OSe = "ь", ASe = "⌿", DSe = "⧄", ISe = "/", LSe = "𝕊", RSe = "𝕤", FSe = "♠", MSe = "♠", PSe = "∥", $Se = "⊓", VSe = "⊓︀", jSe = "⊔", USe = "⊔︀", BSe = "√", qSe = "⊏", zSe = "⊑", HSe = "⊏", WSe = "⊑", GSe = "⊐", QSe = "⊒", YSe = "⊐", KSe = "⊒", JSe = "□", XSe = "□", ZSe = "⊓", eTe = "⊏", tTe = "⊑", nTe = "⊐", rTe = "⊒", oTe = "⊔", iTe = "▪", sTe = "□", aTe = "▪", lTe = "→", cTe = "𝒮", uTe = "𝓈", fTe = "∖", dTe = "⌣", pTe = "⋆", hTe = "⋆", mTe = "☆", gTe = "★", vTe = "ϵ", yTe = "ϕ", bTe = "¯", ETe = "⊂", wTe = "⋐", xTe = "⪽", STe = "⫅", TTe = "⊆", CTe = "⫃", kTe = "⫁", _Te = "⫋", NTe = "⊊", OTe = "⪿", ATe = "⥹", DTe = "⊂", ITe = "⋐", LTe = "⊆", RTe = "⫅", FTe = "⊆", MTe = "⊊", PTe = "⫋", $Te = "⫇", VTe = "⫕", jTe = "⫓", UTe = "⪸", BTe = "≻", qTe = "≽", zTe = "≻", HTe = "⪰", WTe = "≽", GTe = "≿", QTe = "⪰", YTe = "⪺", KTe = "⪶", JTe = "⋩", XTe = "≿", ZTe = "∋", eCe = "∑", tCe = "∑", nCe = "♪", rCe = "¹", oCe = "²", iCe = "³", sCe = "⊃", aCe = "⋑", lCe = "⪾", cCe = "⫘", uCe = "⫆", fCe = "⊇", dCe = "⫄", pCe = "⊃", hCe = "⊇", mCe = "⟉", gCe = "⫗", vCe = "⥻", yCe = "⫂", bCe = "⫌", ECe = "⊋", wCe = "⫀", xCe = "⊃", SCe = "⋑", TCe = "⊇", CCe = "⫆", kCe = "⊋", _Ce = "⫌", NCe = "⫈", OCe = "⫔", ACe = "⫖", DCe = "⤦", ICe = "↙", LCe = "⇙", RCe = "↙", FCe = "⤪", MCe = "ß", PCe = "	", $Ce = "⌖", VCe = "Τ", jCe = "τ", UCe = "⎴", BCe = "Ť", qCe = "ť", zCe = "Ţ", HCe = "ţ", WCe = "Т", GCe = "т", QCe = "⃛", YCe = "⌕", KCe = "𝔗", JCe = "𝔱", XCe = "∴", ZCe = "∴", eke = "∴", tke = "Θ", nke = "θ", rke = "ϑ", oke = "ϑ", ike = "≈", ske = "∼", ake = "  ", lke = " ", cke = " ", uke = "≈", fke = "∼", dke = "Þ", pke = "þ", hke = "˜", mke = "∼", gke = "≃", vke = "≅", yke = "≈", bke = "⨱", Eke = "⊠", wke = "×", xke = "⨰", Ske = "∭", Tke = "⤨", Cke = "⌶", kke = "⫱", _ke = "⊤", Nke = "𝕋", Oke = "𝕥", Ake = "⫚", Dke = "⤩", Ike = "‴", Lke = "™", Rke = "™", Fke = "▵", Mke = "▿", Pke = "◃", $ke = "⊴", Vke = "≜", jke = "▹", Uke = "⊵", Bke = "◬", qke = "≜", zke = "⨺", Hke = "⃛", Wke = "⨹", Gke = "⧍", Qke = "⨻", Yke = "⏢", Kke = "𝒯", Jke = "𝓉", Xke = "Ц", Zke = "ц", e_e = "Ћ", t_e = "ћ", n_e = "Ŧ", r_e = "ŧ", o_e = "≬", i_e = "↞", s_e = "↠", a_e = "Ú", l_e = "ú", c_e = "↑", u_e = "↟", f_e = "⇑", d_e = "⥉", p_e = "Ў", h_e = "ў", m_e = "Ŭ", g_e = "ŭ", v_e = "Û", y_e = "û", b_e = "У", E_e = "у", w_e = "⇅", x_e = "Ű", S_e = "ű", T_e = "⥮", C_e = "⥾", k_e = "𝔘", __e = "𝔲", N_e = "Ù", O_e = "ù", A_e = "⥣", D_e = "↿", I_e = "↾", L_e = "▀", R_e = "⌜", F_e = "⌜", M_e = "⌏", P_e = "◸", $_e = "Ū", V_e = "ū", j_e = "¨", U_e = "_", B_e = "⏟", q_e = "⎵", z_e = "⏝", H_e = "⋃", W_e = "⊎", G_e = "Ų", Q_e = "ų", Y_e = "𝕌", K_e = "𝕦", J_e = "⤒", X_e = "↑", Z_e = "↑", eNe = "⇑", tNe = "⇅", nNe = "↕", rNe = "↕", oNe = "⇕", iNe = "⥮", sNe = "↿", aNe = "↾", lNe = "⊎", cNe = "↖", uNe = "↗", fNe = "υ", dNe = "ϒ", pNe = "ϒ", hNe = "Υ", mNe = "υ", gNe = "↥", vNe = "⊥", yNe = "⇈", bNe = "⌝", ENe = "⌝", wNe = "⌎", xNe = "Ů", SNe = "ů", TNe = "◹", CNe = "𝒰", kNe = "𝓊", _Ne = "⋰", NNe = "Ũ", ONe = "ũ", ANe = "▵", DNe = "▴", INe = "⇈", LNe = "Ü", RNe = "ü", FNe = "⦧", MNe = "⦜", PNe = "ϵ", $Ne = "ϰ", VNe = "∅", jNe = "ϕ", UNe = "ϖ", BNe = "∝", qNe = "↕", zNe = "⇕", HNe = "ϱ", WNe = "ς", GNe = "⊊︀", QNe = "⫋︀", YNe = "⊋︀", KNe = "⫌︀", JNe = "ϑ", XNe = "⊲", ZNe = "⊳", eOe = "⫨", tOe = "⫫", nOe = "⫩", rOe = "В", oOe = "в", iOe = "⊢", sOe = "⊨", aOe = "⊩", lOe = "⊫", cOe = "⫦", uOe = "⊻", fOe = "∨", dOe = "⋁", pOe = "≚", hOe = "⋮", mOe = "|", gOe = "‖", vOe = "|", yOe = "‖", bOe = "∣", EOe = "|", wOe = "❘", xOe = "≀", SOe = " ", TOe = "𝔙", COe = "𝔳", kOe = "⊲", _Oe = "⊂⃒", NOe = "⊃⃒", OOe = "𝕍", AOe = "𝕧", DOe = "∝", IOe = "⊳", LOe = "𝒱", ROe = "𝓋", FOe = "⫋︀", MOe = "⊊︀", POe = "⫌︀", $Oe = "⊋︀", VOe = "⊪", jOe = "⦚", UOe = "Ŵ", BOe = "ŵ", qOe = "⩟", zOe = "∧", HOe = "⋀", WOe = "≙", GOe = "℘", QOe = "𝔚", YOe = "𝔴", KOe = "𝕎", JOe = "𝕨", XOe = "℘", ZOe = "≀", e2e = "≀", t2e = "𝒲", n2e = "𝓌", r2e = "⋂", o2e = "◯", i2e = "⋃", s2e = "▽", a2e = "𝔛", l2e = "𝔵", c2e = "⟷", u2e = "⟺", f2e = "Ξ", d2e = "ξ", p2e = "⟵", h2e = "⟸", m2e = "⟼", g2e = "⋻", v2e = "⨀", y2e = "𝕏", b2e = "𝕩", E2e = "⨁", w2e = "⨂", x2e = "⟶", S2e = "⟹", T2e = "𝒳", C2e = "𝓍", k2e = "⨆", _2e = "⨄", N2e = "△", O2e = "⋁", A2e = "⋀", D2e = "Ý", I2e = "ý", L2e = "Я", R2e = "я", F2e = "Ŷ", M2e = "ŷ", P2e = "Ы", $2e = "ы", V2e = "¥", j2e = "𝔜", U2e = "𝔶", B2e = "Ї", q2e = "ї", z2e = "𝕐", H2e = "𝕪", W2e = "𝒴", G2e = "𝓎", Q2e = "Ю", Y2e = "ю", K2e = "ÿ", J2e = "Ÿ", X2e = "Ź", Z2e = "ź", eAe = "Ž", tAe = "ž", nAe = "З", rAe = "з", oAe = "Ż", iAe = "ż", sAe = "ℨ", aAe = "​", lAe = "Ζ", cAe = "ζ", uAe = "𝔷", fAe = "ℨ", dAe = "Ж", pAe = "ж", hAe = "⇝", mAe = "𝕫", gAe = "ℤ", vAe = "𝒵", yAe = "𝓏", bAe = "‍", EAe = "‌", wAe = {
  Aacute: oQ,
  aacute: iQ,
  Abreve: sQ,
  abreve: aQ,
  ac: lQ,
  acd: cQ,
  acE: uQ,
  Acirc: fQ,
  acirc: dQ,
  acute: pQ,
  Acy: hQ,
  acy: mQ,
  AElig: gQ,
  aelig: vQ,
  af: yQ,
  Afr: bQ,
  afr: EQ,
  Agrave: wQ,
  agrave: xQ,
  alefsym: SQ,
  aleph: TQ,
  Alpha: CQ,
  alpha: kQ,
  Amacr: _Q,
  amacr: NQ,
  amalg: OQ,
  amp: AQ,
  AMP: DQ,
  andand: IQ,
  And: LQ,
  and: RQ,
  andd: FQ,
  andslope: MQ,
  andv: PQ,
  ang: $Q,
  ange: VQ,
  angle: jQ,
  angmsdaa: UQ,
  angmsdab: BQ,
  angmsdac: qQ,
  angmsdad: zQ,
  angmsdae: HQ,
  angmsdaf: WQ,
  angmsdag: GQ,
  angmsdah: QQ,
  angmsd: YQ,
  angrt: KQ,
  angrtvb: JQ,
  angrtvbd: XQ,
  angsph: ZQ,
  angst: eY,
  angzarr: tY,
  Aogon: nY,
  aogon: rY,
  Aopf: oY,
  aopf: iY,
  apacir: sY,
  ap: aY,
  apE: lY,
  ape: cY,
  apid: uY,
  apos: fY,
  ApplyFunction: dY,
  approx: pY,
  approxeq: hY,
  Aring: mY,
  aring: gY,
  Ascr: vY,
  ascr: yY,
  Assign: bY,
  ast: EY,
  asymp: wY,
  asympeq: xY,
  Atilde: SY,
  atilde: TY,
  Auml: CY,
  auml: kY,
  awconint: _Y,
  awint: NY,
  backcong: OY,
  backepsilon: AY,
  backprime: DY,
  backsim: IY,
  backsimeq: LY,
  Backslash: RY,
  Barv: FY,
  barvee: MY,
  barwed: PY,
  Barwed: $Y,
  barwedge: VY,
  bbrk: jY,
  bbrktbrk: UY,
  bcong: BY,
  Bcy: qY,
  bcy: zY,
  bdquo: HY,
  becaus: WY,
  because: GY,
  Because: QY,
  bemptyv: YY,
  bepsi: KY,
  bernou: JY,
  Bernoullis: XY,
  Beta: ZY,
  beta: eK,
  beth: tK,
  between: nK,
  Bfr: rK,
  bfr: oK,
  bigcap: iK,
  bigcirc: sK,
  bigcup: aK,
  bigodot: lK,
  bigoplus: cK,
  bigotimes: uK,
  bigsqcup: fK,
  bigstar: dK,
  bigtriangledown: pK,
  bigtriangleup: hK,
  biguplus: mK,
  bigvee: gK,
  bigwedge: vK,
  bkarow: yK,
  blacklozenge: bK,
  blacksquare: EK,
  blacktriangle: wK,
  blacktriangledown: xK,
  blacktriangleleft: SK,
  blacktriangleright: TK,
  blank: CK,
  blk12: kK,
  blk14: _K,
  blk34: NK,
  block: OK,
  bne: AK,
  bnequiv: DK,
  bNot: IK,
  bnot: LK,
  Bopf: RK,
  bopf: FK,
  bot: MK,
  bottom: PK,
  bowtie: $K,
  boxbox: VK,
  boxdl: jK,
  boxdL: UK,
  boxDl: BK,
  boxDL: qK,
  boxdr: zK,
  boxdR: HK,
  boxDr: WK,
  boxDR: GK,
  boxh: QK,
  boxH: YK,
  boxhd: KK,
  boxHd: JK,
  boxhD: XK,
  boxHD: ZK,
  boxhu: eJ,
  boxHu: tJ,
  boxhU: nJ,
  boxHU: rJ,
  boxminus: oJ,
  boxplus: iJ,
  boxtimes: sJ,
  boxul: aJ,
  boxuL: lJ,
  boxUl: cJ,
  boxUL: uJ,
  boxur: fJ,
  boxuR: dJ,
  boxUr: pJ,
  boxUR: hJ,
  boxv: mJ,
  boxV: gJ,
  boxvh: vJ,
  boxvH: yJ,
  boxVh: bJ,
  boxVH: EJ,
  boxvl: wJ,
  boxvL: xJ,
  boxVl: SJ,
  boxVL: TJ,
  boxvr: CJ,
  boxvR: kJ,
  boxVr: _J,
  boxVR: NJ,
  bprime: OJ,
  breve: AJ,
  Breve: DJ,
  brvbar: IJ,
  bscr: LJ,
  Bscr: RJ,
  bsemi: FJ,
  bsim: MJ,
  bsime: PJ,
  bsolb: $J,
  bsol: VJ,
  bsolhsub: jJ,
  bull: UJ,
  bullet: BJ,
  bump: qJ,
  bumpE: zJ,
  bumpe: HJ,
  Bumpeq: WJ,
  bumpeq: GJ,
  Cacute: QJ,
  cacute: YJ,
  capand: KJ,
  capbrcup: JJ,
  capcap: XJ,
  cap: ZJ,
  Cap: eX,
  capcup: tX,
  capdot: nX,
  CapitalDifferentialD: rX,
  caps: oX,
  caret: iX,
  caron: sX,
  Cayleys: aX,
  ccaps: lX,
  Ccaron: cX,
  ccaron: uX,
  Ccedil: fX,
  ccedil: dX,
  Ccirc: pX,
  ccirc: hX,
  Cconint: mX,
  ccups: gX,
  ccupssm: vX,
  Cdot: yX,
  cdot: bX,
  cedil: EX,
  Cedilla: wX,
  cemptyv: xX,
  cent: SX,
  centerdot: TX,
  CenterDot: CX,
  cfr: kX,
  Cfr: _X,
  CHcy: NX,
  chcy: OX,
  check: AX,
  checkmark: DX,
  Chi: IX,
  chi: LX,
  circ: RX,
  circeq: FX,
  circlearrowleft: MX,
  circlearrowright: PX,
  circledast: $X,
  circledcirc: VX,
  circleddash: jX,
  CircleDot: UX,
  circledR: BX,
  circledS: qX,
  CircleMinus: zX,
  CirclePlus: HX,
  CircleTimes: WX,
  cir: GX,
  cirE: QX,
  cire: YX,
  cirfnint: KX,
  cirmid: JX,
  cirscir: XX,
  ClockwiseContourIntegral: ZX,
  CloseCurlyDoubleQuote: eZ,
  CloseCurlyQuote: tZ,
  clubs: nZ,
  clubsuit: rZ,
  colon: oZ,
  Colon: iZ,
  Colone: sZ,
  colone: aZ,
  coloneq: lZ,
  comma: cZ,
  commat: uZ,
  comp: fZ,
  compfn: dZ,
  complement: pZ,
  complexes: hZ,
  cong: mZ,
  congdot: gZ,
  Congruent: vZ,
  conint: yZ,
  Conint: bZ,
  ContourIntegral: EZ,
  copf: wZ,
  Copf: xZ,
  coprod: SZ,
  Coproduct: TZ,
  copy: CZ,
  COPY: kZ,
  copysr: _Z,
  CounterClockwiseContourIntegral: NZ,
  crarr: OZ,
  cross: AZ,
  Cross: DZ,
  Cscr: IZ,
  cscr: LZ,
  csub: RZ,
  csube: FZ,
  csup: MZ,
  csupe: PZ,
  ctdot: $Z,
  cudarrl: VZ,
  cudarrr: jZ,
  cuepr: UZ,
  cuesc: BZ,
  cularr: qZ,
  cularrp: zZ,
  cupbrcap: HZ,
  cupcap: WZ,
  CupCap: GZ,
  cup: QZ,
  Cup: YZ,
  cupcup: KZ,
  cupdot: JZ,
  cupor: XZ,
  cups: ZZ,
  curarr: eee,
  curarrm: tee,
  curlyeqprec: nee,
  curlyeqsucc: ree,
  curlyvee: oee,
  curlywedge: iee,
  curren: see,
  curvearrowleft: aee,
  curvearrowright: lee,
  cuvee: cee,
  cuwed: uee,
  cwconint: fee,
  cwint: dee,
  cylcty: pee,
  dagger: hee,
  Dagger: mee,
  daleth: gee,
  darr: vee,
  Darr: yee,
  dArr: bee,
  dash: Eee,
  Dashv: wee,
  dashv: xee,
  dbkarow: See,
  dblac: Tee,
  Dcaron: Cee,
  dcaron: kee,
  Dcy: _ee,
  dcy: Nee,
  ddagger: Oee,
  ddarr: Aee,
  DD: Dee,
  dd: Iee,
  DDotrahd: Lee,
  ddotseq: Ree,
  deg: Fee,
  Del: Mee,
  Delta: Pee,
  delta: $ee,
  demptyv: Vee,
  dfisht: jee,
  Dfr: Uee,
  dfr: Bee,
  dHar: qee,
  dharl: zee,
  dharr: Hee,
  DiacriticalAcute: Wee,
  DiacriticalDot: Gee,
  DiacriticalDoubleAcute: Qee,
  DiacriticalGrave: Yee,
  DiacriticalTilde: Kee,
  diam: Jee,
  diamond: Xee,
  Diamond: Zee,
  diamondsuit: ete,
  diams: tte,
  die: nte,
  DifferentialD: rte,
  digamma: ote,
  disin: ite,
  div: ste,
  divide: ate,
  divideontimes: lte,
  divonx: cte,
  DJcy: ute,
  djcy: fte,
  dlcorn: dte,
  dlcrop: pte,
  dollar: hte,
  Dopf: mte,
  dopf: gte,
  Dot: vte,
  dot: yte,
  DotDot: bte,
  doteq: Ete,
  doteqdot: wte,
  DotEqual: xte,
  dotminus: Ste,
  dotplus: Tte,
  dotsquare: Cte,
  doublebarwedge: kte,
  DoubleContourIntegral: _te,
  DoubleDot: Nte,
  DoubleDownArrow: Ote,
  DoubleLeftArrow: Ate,
  DoubleLeftRightArrow: Dte,
  DoubleLeftTee: Ite,
  DoubleLongLeftArrow: Lte,
  DoubleLongLeftRightArrow: Rte,
  DoubleLongRightArrow: Fte,
  DoubleRightArrow: Mte,
  DoubleRightTee: Pte,
  DoubleUpArrow: $te,
  DoubleUpDownArrow: Vte,
  DoubleVerticalBar: jte,
  DownArrowBar: Ute,
  downarrow: Bte,
  DownArrow: qte,
  Downarrow: zte,
  DownArrowUpArrow: Hte,
  DownBreve: Wte,
  downdownarrows: Gte,
  downharpoonleft: Qte,
  downharpoonright: Yte,
  DownLeftRightVector: Kte,
  DownLeftTeeVector: Jte,
  DownLeftVectorBar: Xte,
  DownLeftVector: Zte,
  DownRightTeeVector: ene,
  DownRightVectorBar: tne,
  DownRightVector: nne,
  DownTeeArrow: rne,
  DownTee: one,
  drbkarow: ine,
  drcorn: sne,
  drcrop: ane,
  Dscr: lne,
  dscr: cne,
  DScy: une,
  dscy: fne,
  dsol: dne,
  Dstrok: pne,
  dstrok: hne,
  dtdot: mne,
  dtri: gne,
  dtrif: vne,
  duarr: yne,
  duhar: bne,
  dwangle: Ene,
  DZcy: wne,
  dzcy: xne,
  dzigrarr: Sne,
  Eacute: Tne,
  eacute: Cne,
  easter: kne,
  Ecaron: _ne,
  ecaron: Nne,
  Ecirc: One,
  ecirc: Ane,
  ecir: Dne,
  ecolon: Ine,
  Ecy: Lne,
  ecy: Rne,
  eDDot: Fne,
  Edot: Mne,
  edot: Pne,
  eDot: $ne,
  ee: Vne,
  efDot: jne,
  Efr: Une,
  efr: Bne,
  eg: qne,
  Egrave: zne,
  egrave: Hne,
  egs: Wne,
  egsdot: Gne,
  el: Qne,
  Element: Yne,
  elinters: Kne,
  ell: Jne,
  els: Xne,
  elsdot: Zne,
  Emacr: ere,
  emacr: tre,
  empty: nre,
  emptyset: rre,
  EmptySmallSquare: ore,
  emptyv: ire,
  EmptyVerySmallSquare: sre,
  emsp13: are,
  emsp14: lre,
  emsp: cre,
  ENG: ure,
  eng: fre,
  ensp: dre,
  Eogon: pre,
  eogon: hre,
  Eopf: mre,
  eopf: gre,
  epar: vre,
  eparsl: yre,
  eplus: bre,
  epsi: Ere,
  Epsilon: wre,
  epsilon: xre,
  epsiv: Sre,
  eqcirc: Tre,
  eqcolon: Cre,
  eqsim: kre,
  eqslantgtr: _re,
  eqslantless: Nre,
  Equal: Ore,
  equals: Are,
  EqualTilde: Dre,
  equest: Ire,
  Equilibrium: Lre,
  equiv: Rre,
  equivDD: Fre,
  eqvparsl: Mre,
  erarr: Pre,
  erDot: $re,
  escr: Vre,
  Escr: jre,
  esdot: Ure,
  Esim: Bre,
  esim: qre,
  Eta: zre,
  eta: Hre,
  ETH: Wre,
  eth: Gre,
  Euml: Qre,
  euml: Yre,
  euro: Kre,
  excl: Jre,
  exist: Xre,
  Exists: Zre,
  expectation: eoe,
  exponentiale: toe,
  ExponentialE: noe,
  fallingdotseq: roe,
  Fcy: ooe,
  fcy: ioe,
  female: soe,
  ffilig: aoe,
  fflig: loe,
  ffllig: coe,
  Ffr: uoe,
  ffr: foe,
  filig: doe,
  FilledSmallSquare: poe,
  FilledVerySmallSquare: hoe,
  fjlig: moe,
  flat: goe,
  fllig: voe,
  fltns: yoe,
  fnof: boe,
  Fopf: Eoe,
  fopf: woe,
  forall: xoe,
  ForAll: Soe,
  fork: Toe,
  forkv: Coe,
  Fouriertrf: koe,
  fpartint: _oe,
  frac12: Noe,
  frac13: Ooe,
  frac14: Aoe,
  frac15: Doe,
  frac16: Ioe,
  frac18: Loe,
  frac23: Roe,
  frac25: Foe,
  frac34: Moe,
  frac35: Poe,
  frac38: $oe,
  frac45: Voe,
  frac56: joe,
  frac58: Uoe,
  frac78: Boe,
  frasl: qoe,
  frown: zoe,
  fscr: Hoe,
  Fscr: Woe,
  gacute: Goe,
  Gamma: Qoe,
  gamma: Yoe,
  Gammad: Koe,
  gammad: Joe,
  gap: Xoe,
  Gbreve: Zoe,
  gbreve: eie,
  Gcedil: tie,
  Gcirc: nie,
  gcirc: rie,
  Gcy: oie,
  gcy: iie,
  Gdot: sie,
  gdot: aie,
  ge: lie,
  gE: cie,
  gEl: uie,
  gel: fie,
  geq: die,
  geqq: pie,
  geqslant: hie,
  gescc: mie,
  ges: gie,
  gesdot: vie,
  gesdoto: yie,
  gesdotol: bie,
  gesl: Eie,
  gesles: wie,
  Gfr: xie,
  gfr: Sie,
  gg: Tie,
  Gg: Cie,
  ggg: kie,
  gimel: _ie,
  GJcy: Nie,
  gjcy: Oie,
  gla: Aie,
  gl: Die,
  glE: Iie,
  glj: Lie,
  gnap: Rie,
  gnapprox: Fie,
  gne: Mie,
  gnE: Pie,
  gneq: $ie,
  gneqq: Vie,
  gnsim: jie,
  Gopf: Uie,
  gopf: Bie,
  grave: qie,
  GreaterEqual: zie,
  GreaterEqualLess: Hie,
  GreaterFullEqual: Wie,
  GreaterGreater: Gie,
  GreaterLess: Qie,
  GreaterSlantEqual: Yie,
  GreaterTilde: Kie,
  Gscr: Jie,
  gscr: Xie,
  gsim: Zie,
  gsime: ese,
  gsiml: tse,
  gtcc: nse,
  gtcir: rse,
  gt: ose,
  GT: ise,
  Gt: sse,
  gtdot: ase,
  gtlPar: lse,
  gtquest: cse,
  gtrapprox: use,
  gtrarr: fse,
  gtrdot: dse,
  gtreqless: pse,
  gtreqqless: hse,
  gtrless: mse,
  gtrsim: gse,
  gvertneqq: vse,
  gvnE: yse,
  Hacek: bse,
  hairsp: Ese,
  half: wse,
  hamilt: xse,
  HARDcy: Sse,
  hardcy: Tse,
  harrcir: Cse,
  harr: kse,
  hArr: _se,
  harrw: Nse,
  Hat: Ose,
  hbar: Ase,
  Hcirc: Dse,
  hcirc: Ise,
  hearts: Lse,
  heartsuit: Rse,
  hellip: Fse,
  hercon: Mse,
  hfr: Pse,
  Hfr: $se,
  HilbertSpace: Vse,
  hksearow: jse,
  hkswarow: Use,
  hoarr: Bse,
  homtht: qse,
  hookleftarrow: zse,
  hookrightarrow: Hse,
  hopf: Wse,
  Hopf: Gse,
  horbar: Qse,
  HorizontalLine: Yse,
  hscr: Kse,
  Hscr: Jse,
  hslash: Xse,
  Hstrok: Zse,
  hstrok: eae,
  HumpDownHump: tae,
  HumpEqual: nae,
  hybull: rae,
  hyphen: oae,
  Iacute: iae,
  iacute: sae,
  ic: aae,
  Icirc: lae,
  icirc: cae,
  Icy: uae,
  icy: fae,
  Idot: dae,
  IEcy: pae,
  iecy: hae,
  iexcl: mae,
  iff: gae,
  ifr: vae,
  Ifr: yae,
  Igrave: bae,
  igrave: Eae,
  ii: wae,
  iiiint: xae,
  iiint: Sae,
  iinfin: Tae,
  iiota: Cae,
  IJlig: kae,
  ijlig: _ae,
  Imacr: Nae,
  imacr: Oae,
  image: Aae,
  ImaginaryI: Dae,
  imagline: Iae,
  imagpart: Lae,
  imath: Rae,
  Im: Fae,
  imof: Mae,
  imped: Pae,
  Implies: $ae,
  incare: Vae,
  in: "∈",
  infin: jae,
  infintie: Uae,
  inodot: Bae,
  intcal: qae,
  int: zae,
  Int: Hae,
  integers: Wae,
  Integral: Gae,
  intercal: Qae,
  Intersection: Yae,
  intlarhk: Kae,
  intprod: Jae,
  InvisibleComma: Xae,
  InvisibleTimes: Zae,
  IOcy: ele,
  iocy: tle,
  Iogon: nle,
  iogon: rle,
  Iopf: ole,
  iopf: ile,
  Iota: sle,
  iota: ale,
  iprod: lle,
  iquest: cle,
  iscr: ule,
  Iscr: fle,
  isin: dle,
  isindot: ple,
  isinE: hle,
  isins: mle,
  isinsv: gle,
  isinv: vle,
  it: yle,
  Itilde: ble,
  itilde: Ele,
  Iukcy: wle,
  iukcy: xle,
  Iuml: Sle,
  iuml: Tle,
  Jcirc: Cle,
  jcirc: kle,
  Jcy: _le,
  jcy: Nle,
  Jfr: Ole,
  jfr: Ale,
  jmath: Dle,
  Jopf: Ile,
  jopf: Lle,
  Jscr: Rle,
  jscr: Fle,
  Jsercy: Mle,
  jsercy: Ple,
  Jukcy: $le,
  jukcy: Vle,
  Kappa: jle,
  kappa: Ule,
  kappav: Ble,
  Kcedil: qle,
  kcedil: zle,
  Kcy: Hle,
  kcy: Wle,
  Kfr: Gle,
  kfr: Qle,
  kgreen: Yle,
  KHcy: Kle,
  khcy: Jle,
  KJcy: Xle,
  kjcy: Zle,
  Kopf: ece,
  kopf: tce,
  Kscr: nce,
  kscr: rce,
  lAarr: oce,
  Lacute: ice,
  lacute: sce,
  laemptyv: ace,
  lagran: lce,
  Lambda: cce,
  lambda: uce,
  lang: fce,
  Lang: dce,
  langd: pce,
  langle: hce,
  lap: mce,
  Laplacetrf: gce,
  laquo: vce,
  larrb: yce,
  larrbfs: bce,
  larr: Ece,
  Larr: wce,
  lArr: xce,
  larrfs: Sce,
  larrhk: Tce,
  larrlp: Cce,
  larrpl: kce,
  larrsim: _ce,
  larrtl: Nce,
  latail: Oce,
  lAtail: Ace,
  lat: Dce,
  late: Ice,
  lates: Lce,
  lbarr: Rce,
  lBarr: Fce,
  lbbrk: Mce,
  lbrace: Pce,
  lbrack: $ce,
  lbrke: Vce,
  lbrksld: jce,
  lbrkslu: Uce,
  Lcaron: Bce,
  lcaron: qce,
  Lcedil: zce,
  lcedil: Hce,
  lceil: Wce,
  lcub: Gce,
  Lcy: Qce,
  lcy: Yce,
  ldca: Kce,
  ldquo: Jce,
  ldquor: Xce,
  ldrdhar: Zce,
  ldrushar: eue,
  ldsh: tue,
  le: nue,
  lE: rue,
  LeftAngleBracket: oue,
  LeftArrowBar: iue,
  leftarrow: sue,
  LeftArrow: aue,
  Leftarrow: lue,
  LeftArrowRightArrow: cue,
  leftarrowtail: uue,
  LeftCeiling: fue,
  LeftDoubleBracket: due,
  LeftDownTeeVector: pue,
  LeftDownVectorBar: hue,
  LeftDownVector: mue,
  LeftFloor: gue,
  leftharpoondown: vue,
  leftharpoonup: yue,
  leftleftarrows: bue,
  leftrightarrow: Eue,
  LeftRightArrow: wue,
  Leftrightarrow: xue,
  leftrightarrows: Sue,
  leftrightharpoons: Tue,
  leftrightsquigarrow: Cue,
  LeftRightVector: kue,
  LeftTeeArrow: _ue,
  LeftTee: Nue,
  LeftTeeVector: Oue,
  leftthreetimes: Aue,
  LeftTriangleBar: Due,
  LeftTriangle: Iue,
  LeftTriangleEqual: Lue,
  LeftUpDownVector: Rue,
  LeftUpTeeVector: Fue,
  LeftUpVectorBar: Mue,
  LeftUpVector: Pue,
  LeftVectorBar: $ue,
  LeftVector: Vue,
  lEg: jue,
  leg: Uue,
  leq: Bue,
  leqq: que,
  leqslant: zue,
  lescc: Hue,
  les: Wue,
  lesdot: Gue,
  lesdoto: Que,
  lesdotor: Yue,
  lesg: Kue,
  lesges: Jue,
  lessapprox: Xue,
  lessdot: Zue,
  lesseqgtr: efe,
  lesseqqgtr: tfe,
  LessEqualGreater: nfe,
  LessFullEqual: rfe,
  LessGreater: ofe,
  lessgtr: ife,
  LessLess: sfe,
  lesssim: afe,
  LessSlantEqual: lfe,
  LessTilde: cfe,
  lfisht: ufe,
  lfloor: ffe,
  Lfr: dfe,
  lfr: pfe,
  lg: hfe,
  lgE: mfe,
  lHar: gfe,
  lhard: vfe,
  lharu: yfe,
  lharul: bfe,
  lhblk: Efe,
  LJcy: wfe,
  ljcy: xfe,
  llarr: Sfe,
  ll: Tfe,
  Ll: Cfe,
  llcorner: kfe,
  Lleftarrow: _fe,
  llhard: Nfe,
  lltri: Ofe,
  Lmidot: Afe,
  lmidot: Dfe,
  lmoustache: Ife,
  lmoust: Lfe,
  lnap: Rfe,
  lnapprox: Ffe,
  lne: Mfe,
  lnE: Pfe,
  lneq: $fe,
  lneqq: Vfe,
  lnsim: jfe,
  loang: Ufe,
  loarr: Bfe,
  lobrk: qfe,
  longleftarrow: zfe,
  LongLeftArrow: Hfe,
  Longleftarrow: Wfe,
  longleftrightarrow: Gfe,
  LongLeftRightArrow: Qfe,
  Longleftrightarrow: Yfe,
  longmapsto: Kfe,
  longrightarrow: Jfe,
  LongRightArrow: Xfe,
  Longrightarrow: Zfe,
  looparrowleft: ede,
  looparrowright: tde,
  lopar: nde,
  Lopf: rde,
  lopf: ode,
  loplus: ide,
  lotimes: sde,
  lowast: ade,
  lowbar: lde,
  LowerLeftArrow: cde,
  LowerRightArrow: ude,
  loz: fde,
  lozenge: dde,
  lozf: pde,
  lpar: hde,
  lparlt: mde,
  lrarr: gde,
  lrcorner: vde,
  lrhar: yde,
  lrhard: bde,
  lrm: Ede,
  lrtri: wde,
  lsaquo: xde,
  lscr: Sde,
  Lscr: Tde,
  lsh: Cde,
  Lsh: kde,
  lsim: _de,
  lsime: Nde,
  lsimg: Ode,
  lsqb: Ade,
  lsquo: Dde,
  lsquor: Ide,
  Lstrok: Lde,
  lstrok: Rde,
  ltcc: Fde,
  ltcir: Mde,
  lt: Pde,
  LT: $de,
  Lt: Vde,
  ltdot: jde,
  lthree: Ude,
  ltimes: Bde,
  ltlarr: qde,
  ltquest: zde,
  ltri: Hde,
  ltrie: Wde,
  ltrif: Gde,
  ltrPar: Qde,
  lurdshar: Yde,
  luruhar: Kde,
  lvertneqq: Jde,
  lvnE: Xde,
  macr: Zde,
  male: epe,
  malt: tpe,
  maltese: npe,
  Map: "⤅",
  map: rpe,
  mapsto: ope,
  mapstodown: ipe,
  mapstoleft: spe,
  mapstoup: ape,
  marker: lpe,
  mcomma: cpe,
  Mcy: upe,
  mcy: fpe,
  mdash: dpe,
  mDDot: ppe,
  measuredangle: hpe,
  MediumSpace: mpe,
  Mellintrf: gpe,
  Mfr: vpe,
  mfr: ype,
  mho: bpe,
  micro: Epe,
  midast: wpe,
  midcir: xpe,
  mid: Spe,
  middot: Tpe,
  minusb: Cpe,
  minus: kpe,
  minusd: _pe,
  minusdu: Npe,
  MinusPlus: Ope,
  mlcp: Ape,
  mldr: Dpe,
  mnplus: Ipe,
  models: Lpe,
  Mopf: Rpe,
  mopf: Fpe,
  mp: Mpe,
  mscr: Ppe,
  Mscr: $pe,
  mstpos: Vpe,
  Mu: jpe,
  mu: Upe,
  multimap: Bpe,
  mumap: qpe,
  nabla: zpe,
  Nacute: Hpe,
  nacute: Wpe,
  nang: Gpe,
  nap: Qpe,
  napE: Ype,
  napid: Kpe,
  napos: Jpe,
  napprox: Xpe,
  natural: Zpe,
  naturals: ehe,
  natur: the,
  nbsp: nhe,
  nbump: rhe,
  nbumpe: ohe,
  ncap: ihe,
  Ncaron: she,
  ncaron: ahe,
  Ncedil: lhe,
  ncedil: che,
  ncong: uhe,
  ncongdot: fhe,
  ncup: dhe,
  Ncy: phe,
  ncy: hhe,
  ndash: mhe,
  nearhk: ghe,
  nearr: vhe,
  neArr: yhe,
  nearrow: bhe,
  ne: Ehe,
  nedot: whe,
  NegativeMediumSpace: xhe,
  NegativeThickSpace: She,
  NegativeThinSpace: The,
  NegativeVeryThinSpace: Che,
  nequiv: khe,
  nesear: _he,
  nesim: Nhe,
  NestedGreaterGreater: Ohe,
  NestedLessLess: Ahe,
  NewLine: Dhe,
  nexist: Ihe,
  nexists: Lhe,
  Nfr: Rhe,
  nfr: Fhe,
  ngE: Mhe,
  nge: Phe,
  ngeq: $he,
  ngeqq: Vhe,
  ngeqslant: jhe,
  nges: Uhe,
  nGg: Bhe,
  ngsim: qhe,
  nGt: zhe,
  ngt: Hhe,
  ngtr: Whe,
  nGtv: Ghe,
  nharr: Qhe,
  nhArr: Yhe,
  nhpar: Khe,
  ni: Jhe,
  nis: Xhe,
  nisd: Zhe,
  niv: eme,
  NJcy: tme,
  njcy: nme,
  nlarr: rme,
  nlArr: ome,
  nldr: ime,
  nlE: sme,
  nle: ame,
  nleftarrow: lme,
  nLeftarrow: cme,
  nleftrightarrow: ume,
  nLeftrightarrow: fme,
  nleq: dme,
  nleqq: pme,
  nleqslant: hme,
  nles: mme,
  nless: gme,
  nLl: vme,
  nlsim: yme,
  nLt: bme,
  nlt: Eme,
  nltri: wme,
  nltrie: xme,
  nLtv: Sme,
  nmid: Tme,
  NoBreak: Cme,
  NonBreakingSpace: kme,
  nopf: _me,
  Nopf: Nme,
  Not: Ome,
  not: Ame,
  NotCongruent: Dme,
  NotCupCap: Ime,
  NotDoubleVerticalBar: Lme,
  NotElement: Rme,
  NotEqual: Fme,
  NotEqualTilde: Mme,
  NotExists: Pme,
  NotGreater: $me,
  NotGreaterEqual: Vme,
  NotGreaterFullEqual: jme,
  NotGreaterGreater: Ume,
  NotGreaterLess: Bme,
  NotGreaterSlantEqual: qme,
  NotGreaterTilde: zme,
  NotHumpDownHump: Hme,
  NotHumpEqual: Wme,
  notin: Gme,
  notindot: Qme,
  notinE: Yme,
  notinva: Kme,
  notinvb: Jme,
  notinvc: Xme,
  NotLeftTriangleBar: Zme,
  NotLeftTriangle: ege,
  NotLeftTriangleEqual: tge,
  NotLess: nge,
  NotLessEqual: rge,
  NotLessGreater: oge,
  NotLessLess: ige,
  NotLessSlantEqual: sge,
  NotLessTilde: age,
  NotNestedGreaterGreater: lge,
  NotNestedLessLess: cge,
  notni: uge,
  notniva: fge,
  notnivb: dge,
  notnivc: pge,
  NotPrecedes: hge,
  NotPrecedesEqual: mge,
  NotPrecedesSlantEqual: gge,
  NotReverseElement: vge,
  NotRightTriangleBar: yge,
  NotRightTriangle: bge,
  NotRightTriangleEqual: Ege,
  NotSquareSubset: wge,
  NotSquareSubsetEqual: xge,
  NotSquareSuperset: Sge,
  NotSquareSupersetEqual: Tge,
  NotSubset: Cge,
  NotSubsetEqual: kge,
  NotSucceeds: _ge,
  NotSucceedsEqual: Nge,
  NotSucceedsSlantEqual: Oge,
  NotSucceedsTilde: Age,
  NotSuperset: Dge,
  NotSupersetEqual: Ige,
  NotTilde: Lge,
  NotTildeEqual: Rge,
  NotTildeFullEqual: Fge,
  NotTildeTilde: Mge,
  NotVerticalBar: Pge,
  nparallel: $ge,
  npar: Vge,
  nparsl: jge,
  npart: Uge,
  npolint: Bge,
  npr: qge,
  nprcue: zge,
  nprec: Hge,
  npreceq: Wge,
  npre: Gge,
  nrarrc: Qge,
  nrarr: Yge,
  nrArr: Kge,
  nrarrw: Jge,
  nrightarrow: Xge,
  nRightarrow: Zge,
  nrtri: eve,
  nrtrie: tve,
  nsc: nve,
  nsccue: rve,
  nsce: ove,
  Nscr: ive,
  nscr: sve,
  nshortmid: ave,
  nshortparallel: lve,
  nsim: cve,
  nsime: uve,
  nsimeq: fve,
  nsmid: dve,
  nspar: pve,
  nsqsube: hve,
  nsqsupe: mve,
  nsub: gve,
  nsubE: vve,
  nsube: yve,
  nsubset: bve,
  nsubseteq: Eve,
  nsubseteqq: wve,
  nsucc: xve,
  nsucceq: Sve,
  nsup: Tve,
  nsupE: Cve,
  nsupe: kve,
  nsupset: _ve,
  nsupseteq: Nve,
  nsupseteqq: Ove,
  ntgl: Ave,
  Ntilde: Dve,
  ntilde: Ive,
  ntlg: Lve,
  ntriangleleft: Rve,
  ntrianglelefteq: Fve,
  ntriangleright: Mve,
  ntrianglerighteq: Pve,
  Nu: $ve,
  nu: Vve,
  num: jve,
  numero: Uve,
  numsp: Bve,
  nvap: qve,
  nvdash: zve,
  nvDash: Hve,
  nVdash: Wve,
  nVDash: Gve,
  nvge: Qve,
  nvgt: Yve,
  nvHarr: Kve,
  nvinfin: Jve,
  nvlArr: Xve,
  nvle: Zve,
  nvlt: e0e,
  nvltrie: t0e,
  nvrArr: n0e,
  nvrtrie: r0e,
  nvsim: o0e,
  nwarhk: i0e,
  nwarr: s0e,
  nwArr: a0e,
  nwarrow: l0e,
  nwnear: c0e,
  Oacute: u0e,
  oacute: f0e,
  oast: d0e,
  Ocirc: p0e,
  ocirc: h0e,
  ocir: m0e,
  Ocy: g0e,
  ocy: v0e,
  odash: y0e,
  Odblac: b0e,
  odblac: E0e,
  odiv: w0e,
  odot: x0e,
  odsold: S0e,
  OElig: T0e,
  oelig: C0e,
  ofcir: k0e,
  Ofr: _0e,
  ofr: N0e,
  ogon: O0e,
  Ograve: A0e,
  ograve: D0e,
  ogt: I0e,
  ohbar: L0e,
  ohm: R0e,
  oint: F0e,
  olarr: M0e,
  olcir: P0e,
  olcross: $0e,
  oline: V0e,
  olt: j0e,
  Omacr: U0e,
  omacr: B0e,
  Omega: q0e,
  omega: z0e,
  Omicron: H0e,
  omicron: W0e,
  omid: G0e,
  ominus: Q0e,
  Oopf: Y0e,
  oopf: K0e,
  opar: J0e,
  OpenCurlyDoubleQuote: X0e,
  OpenCurlyQuote: Z0e,
  operp: eye,
  oplus: tye,
  orarr: nye,
  Or: rye,
  or: oye,
  ord: iye,
  order: sye,
  orderof: aye,
  ordf: lye,
  ordm: cye,
  origof: uye,
  oror: fye,
  orslope: dye,
  orv: pye,
  oS: hye,
  Oscr: mye,
  oscr: gye,
  Oslash: vye,
  oslash: yye,
  osol: bye,
  Otilde: Eye,
  otilde: wye,
  otimesas: xye,
  Otimes: Sye,
  otimes: Tye,
  Ouml: Cye,
  ouml: kye,
  ovbar: _ye,
  OverBar: Nye,
  OverBrace: Oye,
  OverBracket: Aye,
  OverParenthesis: Dye,
  para: Iye,
  parallel: Lye,
  par: Rye,
  parsim: Fye,
  parsl: Mye,
  part: Pye,
  PartialD: $ye,
  Pcy: Vye,
  pcy: jye,
  percnt: Uye,
  period: Bye,
  permil: qye,
  perp: zye,
  pertenk: Hye,
  Pfr: Wye,
  pfr: Gye,
  Phi: Qye,
  phi: Yye,
  phiv: Kye,
  phmmat: Jye,
  phone: Xye,
  Pi: Zye,
  pi: e1e,
  pitchfork: t1e,
  piv: n1e,
  planck: r1e,
  planckh: o1e,
  plankv: i1e,
  plusacir: s1e,
  plusb: a1e,
  pluscir: l1e,
  plus: c1e,
  plusdo: u1e,
  plusdu: f1e,
  pluse: d1e,
  PlusMinus: p1e,
  plusmn: h1e,
  plussim: m1e,
  plustwo: g1e,
  pm: v1e,
  Poincareplane: y1e,
  pointint: b1e,
  popf: E1e,
  Popf: w1e,
  pound: x1e,
  prap: S1e,
  Pr: T1e,
  pr: C1e,
  prcue: k1e,
  precapprox: _1e,
  prec: N1e,
  preccurlyeq: O1e,
  Precedes: A1e,
  PrecedesEqual: D1e,
  PrecedesSlantEqual: I1e,
  PrecedesTilde: L1e,
  preceq: R1e,
  precnapprox: F1e,
  precneqq: M1e,
  precnsim: P1e,
  pre: $1e,
  prE: V1e,
  precsim: j1e,
  prime: U1e,
  Prime: B1e,
  primes: q1e,
  prnap: z1e,
  prnE: H1e,
  prnsim: W1e,
  prod: G1e,
  Product: Q1e,
  profalar: Y1e,
  profline: K1e,
  profsurf: J1e,
  prop: X1e,
  Proportional: Z1e,
  Proportion: ebe,
  propto: tbe,
  prsim: nbe,
  prurel: rbe,
  Pscr: obe,
  pscr: ibe,
  Psi: sbe,
  psi: abe,
  puncsp: lbe,
  Qfr: cbe,
  qfr: ube,
  qint: fbe,
  qopf: dbe,
  Qopf: pbe,
  qprime: hbe,
  Qscr: mbe,
  qscr: gbe,
  quaternions: vbe,
  quatint: ybe,
  quest: bbe,
  questeq: Ebe,
  quot: wbe,
  QUOT: xbe,
  rAarr: Sbe,
  race: Tbe,
  Racute: Cbe,
  racute: kbe,
  radic: _be,
  raemptyv: Nbe,
  rang: Obe,
  Rang: Abe,
  rangd: Dbe,
  range: Ibe,
  rangle: Lbe,
  raquo: Rbe,
  rarrap: Fbe,
  rarrb: Mbe,
  rarrbfs: Pbe,
  rarrc: $be,
  rarr: Vbe,
  Rarr: jbe,
  rArr: Ube,
  rarrfs: Bbe,
  rarrhk: qbe,
  rarrlp: zbe,
  rarrpl: Hbe,
  rarrsim: Wbe,
  Rarrtl: Gbe,
  rarrtl: Qbe,
  rarrw: Ybe,
  ratail: Kbe,
  rAtail: Jbe,
  ratio: Xbe,
  rationals: Zbe,
  rbarr: eEe,
  rBarr: tEe,
  RBarr: nEe,
  rbbrk: rEe,
  rbrace: oEe,
  rbrack: iEe,
  rbrke: sEe,
  rbrksld: aEe,
  rbrkslu: lEe,
  Rcaron: cEe,
  rcaron: uEe,
  Rcedil: fEe,
  rcedil: dEe,
  rceil: pEe,
  rcub: hEe,
  Rcy: mEe,
  rcy: gEe,
  rdca: vEe,
  rdldhar: yEe,
  rdquo: bEe,
  rdquor: EEe,
  rdsh: wEe,
  real: xEe,
  realine: SEe,
  realpart: TEe,
  reals: CEe,
  Re: kEe,
  rect: _Ee,
  reg: NEe,
  REG: OEe,
  ReverseElement: AEe,
  ReverseEquilibrium: DEe,
  ReverseUpEquilibrium: IEe,
  rfisht: LEe,
  rfloor: REe,
  rfr: FEe,
  Rfr: MEe,
  rHar: PEe,
  rhard: $Ee,
  rharu: VEe,
  rharul: jEe,
  Rho: UEe,
  rho: BEe,
  rhov: qEe,
  RightAngleBracket: zEe,
  RightArrowBar: HEe,
  rightarrow: WEe,
  RightArrow: GEe,
  Rightarrow: QEe,
  RightArrowLeftArrow: YEe,
  rightarrowtail: KEe,
  RightCeiling: JEe,
  RightDoubleBracket: XEe,
  RightDownTeeVector: ZEe,
  RightDownVectorBar: ewe,
  RightDownVector: twe,
  RightFloor: nwe,
  rightharpoondown: rwe,
  rightharpoonup: owe,
  rightleftarrows: iwe,
  rightleftharpoons: swe,
  rightrightarrows: awe,
  rightsquigarrow: lwe,
  RightTeeArrow: cwe,
  RightTee: uwe,
  RightTeeVector: fwe,
  rightthreetimes: dwe,
  RightTriangleBar: pwe,
  RightTriangle: hwe,
  RightTriangleEqual: mwe,
  RightUpDownVector: gwe,
  RightUpTeeVector: vwe,
  RightUpVectorBar: ywe,
  RightUpVector: bwe,
  RightVectorBar: Ewe,
  RightVector: wwe,
  ring: xwe,
  risingdotseq: Swe,
  rlarr: Twe,
  rlhar: Cwe,
  rlm: kwe,
  rmoustache: _we,
  rmoust: Nwe,
  rnmid: Owe,
  roang: Awe,
  roarr: Dwe,
  robrk: Iwe,
  ropar: Lwe,
  ropf: Rwe,
  Ropf: Fwe,
  roplus: Mwe,
  rotimes: Pwe,
  RoundImplies: $we,
  rpar: Vwe,
  rpargt: jwe,
  rppolint: Uwe,
  rrarr: Bwe,
  Rrightarrow: qwe,
  rsaquo: zwe,
  rscr: Hwe,
  Rscr: Wwe,
  rsh: Gwe,
  Rsh: Qwe,
  rsqb: Ywe,
  rsquo: Kwe,
  rsquor: Jwe,
  rthree: Xwe,
  rtimes: Zwe,
  rtri: exe,
  rtrie: txe,
  rtrif: nxe,
  rtriltri: rxe,
  RuleDelayed: oxe,
  ruluhar: ixe,
  rx: sxe,
  Sacute: axe,
  sacute: lxe,
  sbquo: cxe,
  scap: uxe,
  Scaron: fxe,
  scaron: dxe,
  Sc: pxe,
  sc: hxe,
  sccue: mxe,
  sce: gxe,
  scE: vxe,
  Scedil: yxe,
  scedil: bxe,
  Scirc: Exe,
  scirc: wxe,
  scnap: xxe,
  scnE: Sxe,
  scnsim: Txe,
  scpolint: Cxe,
  scsim: kxe,
  Scy: _xe,
  scy: Nxe,
  sdotb: Oxe,
  sdot: Axe,
  sdote: Dxe,
  searhk: Ixe,
  searr: Lxe,
  seArr: Rxe,
  searrow: Fxe,
  sect: Mxe,
  semi: Pxe,
  seswar: $xe,
  setminus: Vxe,
  setmn: jxe,
  sext: Uxe,
  Sfr: Bxe,
  sfr: qxe,
  sfrown: zxe,
  sharp: Hxe,
  SHCHcy: Wxe,
  shchcy: Gxe,
  SHcy: Qxe,
  shcy: Yxe,
  ShortDownArrow: Kxe,
  ShortLeftArrow: Jxe,
  shortmid: Xxe,
  shortparallel: Zxe,
  ShortRightArrow: eSe,
  ShortUpArrow: tSe,
  shy: nSe,
  Sigma: rSe,
  sigma: oSe,
  sigmaf: iSe,
  sigmav: sSe,
  sim: aSe,
  simdot: lSe,
  sime: cSe,
  simeq: uSe,
  simg: fSe,
  simgE: dSe,
  siml: pSe,
  simlE: hSe,
  simne: mSe,
  simplus: gSe,
  simrarr: vSe,
  slarr: ySe,
  SmallCircle: bSe,
  smallsetminus: ESe,
  smashp: wSe,
  smeparsl: xSe,
  smid: SSe,
  smile: TSe,
  smt: CSe,
  smte: kSe,
  smtes: _Se,
  SOFTcy: NSe,
  softcy: OSe,
  solbar: ASe,
  solb: DSe,
  sol: ISe,
  Sopf: LSe,
  sopf: RSe,
  spades: FSe,
  spadesuit: MSe,
  spar: PSe,
  sqcap: $Se,
  sqcaps: VSe,
  sqcup: jSe,
  sqcups: USe,
  Sqrt: BSe,
  sqsub: qSe,
  sqsube: zSe,
  sqsubset: HSe,
  sqsubseteq: WSe,
  sqsup: GSe,
  sqsupe: QSe,
  sqsupset: YSe,
  sqsupseteq: KSe,
  square: JSe,
  Square: XSe,
  SquareIntersection: ZSe,
  SquareSubset: eTe,
  SquareSubsetEqual: tTe,
  SquareSuperset: nTe,
  SquareSupersetEqual: rTe,
  SquareUnion: oTe,
  squarf: iTe,
  squ: sTe,
  squf: aTe,
  srarr: lTe,
  Sscr: cTe,
  sscr: uTe,
  ssetmn: fTe,
  ssmile: dTe,
  sstarf: pTe,
  Star: hTe,
  star: mTe,
  starf: gTe,
  straightepsilon: vTe,
  straightphi: yTe,
  strns: bTe,
  sub: ETe,
  Sub: wTe,
  subdot: xTe,
  subE: STe,
  sube: TTe,
  subedot: CTe,
  submult: kTe,
  subnE: _Te,
  subne: NTe,
  subplus: OTe,
  subrarr: ATe,
  subset: DTe,
  Subset: ITe,
  subseteq: LTe,
  subseteqq: RTe,
  SubsetEqual: FTe,
  subsetneq: MTe,
  subsetneqq: PTe,
  subsim: $Te,
  subsub: VTe,
  subsup: jTe,
  succapprox: UTe,
  succ: BTe,
  succcurlyeq: qTe,
  Succeeds: zTe,
  SucceedsEqual: HTe,
  SucceedsSlantEqual: WTe,
  SucceedsTilde: GTe,
  succeq: QTe,
  succnapprox: YTe,
  succneqq: KTe,
  succnsim: JTe,
  succsim: XTe,
  SuchThat: ZTe,
  sum: eCe,
  Sum: tCe,
  sung: nCe,
  sup1: rCe,
  sup2: oCe,
  sup3: iCe,
  sup: sCe,
  Sup: aCe,
  supdot: lCe,
  supdsub: cCe,
  supE: uCe,
  supe: fCe,
  supedot: dCe,
  Superset: pCe,
  SupersetEqual: hCe,
  suphsol: mCe,
  suphsub: gCe,
  suplarr: vCe,
  supmult: yCe,
  supnE: bCe,
  supne: ECe,
  supplus: wCe,
  supset: xCe,
  Supset: SCe,
  supseteq: TCe,
  supseteqq: CCe,
  supsetneq: kCe,
  supsetneqq: _Ce,
  supsim: NCe,
  supsub: OCe,
  supsup: ACe,
  swarhk: DCe,
  swarr: ICe,
  swArr: LCe,
  swarrow: RCe,
  swnwar: FCe,
  szlig: MCe,
  Tab: PCe,
  target: $Ce,
  Tau: VCe,
  tau: jCe,
  tbrk: UCe,
  Tcaron: BCe,
  tcaron: qCe,
  Tcedil: zCe,
  tcedil: HCe,
  Tcy: WCe,
  tcy: GCe,
  tdot: QCe,
  telrec: YCe,
  Tfr: KCe,
  tfr: JCe,
  there4: XCe,
  therefore: ZCe,
  Therefore: eke,
  Theta: tke,
  theta: nke,
  thetasym: rke,
  thetav: oke,
  thickapprox: ike,
  thicksim: ske,
  ThickSpace: ake,
  ThinSpace: lke,
  thinsp: cke,
  thkap: uke,
  thksim: fke,
  THORN: dke,
  thorn: pke,
  tilde: hke,
  Tilde: mke,
  TildeEqual: gke,
  TildeFullEqual: vke,
  TildeTilde: yke,
  timesbar: bke,
  timesb: Eke,
  times: wke,
  timesd: xke,
  tint: Ske,
  toea: Tke,
  topbot: Cke,
  topcir: kke,
  top: _ke,
  Topf: Nke,
  topf: Oke,
  topfork: Ake,
  tosa: Dke,
  tprime: Ike,
  trade: Lke,
  TRADE: Rke,
  triangle: Fke,
  triangledown: Mke,
  triangleleft: Pke,
  trianglelefteq: $ke,
  triangleq: Vke,
  triangleright: jke,
  trianglerighteq: Uke,
  tridot: Bke,
  trie: qke,
  triminus: zke,
  TripleDot: Hke,
  triplus: Wke,
  trisb: Gke,
  tritime: Qke,
  trpezium: Yke,
  Tscr: Kke,
  tscr: Jke,
  TScy: Xke,
  tscy: Zke,
  TSHcy: e_e,
  tshcy: t_e,
  Tstrok: n_e,
  tstrok: r_e,
  twixt: o_e,
  twoheadleftarrow: i_e,
  twoheadrightarrow: s_e,
  Uacute: a_e,
  uacute: l_e,
  uarr: c_e,
  Uarr: u_e,
  uArr: f_e,
  Uarrocir: d_e,
  Ubrcy: p_e,
  ubrcy: h_e,
  Ubreve: m_e,
  ubreve: g_e,
  Ucirc: v_e,
  ucirc: y_e,
  Ucy: b_e,
  ucy: E_e,
  udarr: w_e,
  Udblac: x_e,
  udblac: S_e,
  udhar: T_e,
  ufisht: C_e,
  Ufr: k_e,
  ufr: __e,
  Ugrave: N_e,
  ugrave: O_e,
  uHar: A_e,
  uharl: D_e,
  uharr: I_e,
  uhblk: L_e,
  ulcorn: R_e,
  ulcorner: F_e,
  ulcrop: M_e,
  ultri: P_e,
  Umacr: $_e,
  umacr: V_e,
  uml: j_e,
  UnderBar: U_e,
  UnderBrace: B_e,
  UnderBracket: q_e,
  UnderParenthesis: z_e,
  Union: H_e,
  UnionPlus: W_e,
  Uogon: G_e,
  uogon: Q_e,
  Uopf: Y_e,
  uopf: K_e,
  UpArrowBar: J_e,
  uparrow: X_e,
  UpArrow: Z_e,
  Uparrow: eNe,
  UpArrowDownArrow: tNe,
  updownarrow: nNe,
  UpDownArrow: rNe,
  Updownarrow: oNe,
  UpEquilibrium: iNe,
  upharpoonleft: sNe,
  upharpoonright: aNe,
  uplus: lNe,
  UpperLeftArrow: cNe,
  UpperRightArrow: uNe,
  upsi: fNe,
  Upsi: dNe,
  upsih: pNe,
  Upsilon: hNe,
  upsilon: mNe,
  UpTeeArrow: gNe,
  UpTee: vNe,
  upuparrows: yNe,
  urcorn: bNe,
  urcorner: ENe,
  urcrop: wNe,
  Uring: xNe,
  uring: SNe,
  urtri: TNe,
  Uscr: CNe,
  uscr: kNe,
  utdot: _Ne,
  Utilde: NNe,
  utilde: ONe,
  utri: ANe,
  utrif: DNe,
  uuarr: INe,
  Uuml: LNe,
  uuml: RNe,
  uwangle: FNe,
  vangrt: MNe,
  varepsilon: PNe,
  varkappa: $Ne,
  varnothing: VNe,
  varphi: jNe,
  varpi: UNe,
  varpropto: BNe,
  varr: qNe,
  vArr: zNe,
  varrho: HNe,
  varsigma: WNe,
  varsubsetneq: GNe,
  varsubsetneqq: QNe,
  varsupsetneq: YNe,
  varsupsetneqq: KNe,
  vartheta: JNe,
  vartriangleleft: XNe,
  vartriangleright: ZNe,
  vBar: eOe,
  Vbar: tOe,
  vBarv: nOe,
  Vcy: rOe,
  vcy: oOe,
  vdash: iOe,
  vDash: sOe,
  Vdash: aOe,
  VDash: lOe,
  Vdashl: cOe,
  veebar: uOe,
  vee: fOe,
  Vee: dOe,
  veeeq: pOe,
  vellip: hOe,
  verbar: mOe,
  Verbar: gOe,
  vert: vOe,
  Vert: yOe,
  VerticalBar: bOe,
  VerticalLine: EOe,
  VerticalSeparator: wOe,
  VerticalTilde: xOe,
  VeryThinSpace: SOe,
  Vfr: TOe,
  vfr: COe,
  vltri: kOe,
  vnsub: _Oe,
  vnsup: NOe,
  Vopf: OOe,
  vopf: AOe,
  vprop: DOe,
  vrtri: IOe,
  Vscr: LOe,
  vscr: ROe,
  vsubnE: FOe,
  vsubne: MOe,
  vsupnE: POe,
  vsupne: $Oe,
  Vvdash: VOe,
  vzigzag: jOe,
  Wcirc: UOe,
  wcirc: BOe,
  wedbar: qOe,
  wedge: zOe,
  Wedge: HOe,
  wedgeq: WOe,
  weierp: GOe,
  Wfr: QOe,
  wfr: YOe,
  Wopf: KOe,
  wopf: JOe,
  wp: XOe,
  wr: ZOe,
  wreath: e2e,
  Wscr: t2e,
  wscr: n2e,
  xcap: r2e,
  xcirc: o2e,
  xcup: i2e,
  xdtri: s2e,
  Xfr: a2e,
  xfr: l2e,
  xharr: c2e,
  xhArr: u2e,
  Xi: f2e,
  xi: d2e,
  xlarr: p2e,
  xlArr: h2e,
  xmap: m2e,
  xnis: g2e,
  xodot: v2e,
  Xopf: y2e,
  xopf: b2e,
  xoplus: E2e,
  xotime: w2e,
  xrarr: x2e,
  xrArr: S2e,
  Xscr: T2e,
  xscr: C2e,
  xsqcup: k2e,
  xuplus: _2e,
  xutri: N2e,
  xvee: O2e,
  xwedge: A2e,
  Yacute: D2e,
  yacute: I2e,
  YAcy: L2e,
  yacy: R2e,
  Ycirc: F2e,
  ycirc: M2e,
  Ycy: P2e,
  ycy: $2e,
  yen: V2e,
  Yfr: j2e,
  yfr: U2e,
  YIcy: B2e,
  yicy: q2e,
  Yopf: z2e,
  yopf: H2e,
  Yscr: W2e,
  yscr: G2e,
  YUcy: Q2e,
  yucy: Y2e,
  yuml: K2e,
  Yuml: J2e,
  Zacute: X2e,
  zacute: Z2e,
  Zcaron: eAe,
  zcaron: tAe,
  Zcy: nAe,
  zcy: rAe,
  Zdot: oAe,
  zdot: iAe,
  zeetrf: sAe,
  ZeroWidthSpace: aAe,
  Zeta: lAe,
  zeta: cAe,
  zfr: uAe,
  Zfr: fAe,
  ZHcy: dAe,
  zhcy: pAe,
  zigrarr: hAe,
  zopf: mAe,
  Zopf: gAe,
  Zscr: vAe,
  zscr: yAe,
  zwj: bAe,
  zwnj: EAe
};
var A5 = wAe, nk = /[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\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-\u2E4E\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]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/, Ff = {}, jD = {};
function xAe(e) {
  var t, n, r = jD[e];
  if (r)
    return r;
  for (r = jD[e] = [], t = 0; t < 128; t++)
    n = String.fromCharCode(t), /^[0-9a-z]$/i.test(n) ? r.push(n) : r.push("%" + ("0" + t.toString(16).toUpperCase()).slice(-2));
  for (t = 0; t < e.length; t++)
    r[e.charCodeAt(t)] = e[t];
  return r;
}
function Uy(e, t, n) {
  var r, o, i, s, l, c = "";
  for (typeof t != "string" && (n = t, t = Uy.defaultChars), typeof n > "u" && (n = !0), l = xAe(t), r = 0, o = e.length; r < o; r++) {
    if (i = e.charCodeAt(r), n && i === 37 && r + 2 < o && /^[0-9a-f]{2}$/i.test(e.slice(r + 1, r + 3))) {
      c += e.slice(r, r + 3), r += 2;
      continue;
    }
    if (i < 128) {
      c += l[i];
      continue;
    }
    if (i >= 55296 && i <= 57343) {
      if (i >= 55296 && i <= 56319 && r + 1 < o && (s = e.charCodeAt(r + 1), s >= 56320 && s <= 57343)) {
        c += encodeURIComponent(e[r] + e[r + 1]), r++;
        continue;
      }
      c += "%EF%BF%BD";
      continue;
    }
    c += encodeURIComponent(e[r]);
  }
  return c;
}
Uy.defaultChars = ";/?:@&=+$,-_.!~*'()#";
Uy.componentChars = "-_.!~*'()";
var SAe = Uy, UD = {};
function TAe(e) {
  var t, n, r = UD[e];
  if (r)
    return r;
  for (r = UD[e] = [], t = 0; t < 128; t++)
    n = String.fromCharCode(t), r.push(n);
  for (t = 0; t < e.length; t++)
    n = e.charCodeAt(t), r[n] = "%" + ("0" + n.toString(16).toUpperCase()).slice(-2);
  return r;
}
function By(e, t) {
  var n;
  return typeof t != "string" && (t = By.defaultChars), n = TAe(t), e.replace(/(%[a-f0-9]{2})+/gi, function(r) {
    var o, i, s, l, c, f, d, g = "";
    for (o = 0, i = r.length; o < i; o += 3) {
      if (s = parseInt(r.slice(o + 1, o + 3), 16), s < 128) {
        g += n[s];
        continue;
      }
      if ((s & 224) === 192 && o + 3 < i && (l = parseInt(r.slice(o + 4, o + 6), 16), (l & 192) === 128)) {
        d = s << 6 & 1984 | l & 63, d < 128 ? g += "��" : g += String.fromCharCode(d), o += 3;
        continue;
      }
      if ((s & 240) === 224 && o + 6 < i && (l = parseInt(r.slice(o + 4, o + 6), 16), c = parseInt(r.slice(o + 7, o + 9), 16), (l & 192) === 128 && (c & 192) === 128)) {
        d = s << 12 & 61440 | l << 6 & 4032 | c & 63, d < 2048 || d >= 55296 && d <= 57343 ? g += "���" : g += String.fromCharCode(d), o += 6;
        continue;
      }
      if ((s & 248) === 240 && o + 9 < i && (l = parseInt(r.slice(o + 4, o + 6), 16), c = parseInt(r.slice(o + 7, o + 9), 16), f = parseInt(r.slice(o + 10, o + 12), 16), (l & 192) === 128 && (c & 192) === 128 && (f & 192) === 128)) {
        d = s << 18 & 1835008 | l << 12 & 258048 | c << 6 & 4032 | f & 63, d < 65536 || d > 1114111 ? g += "����" : (d -= 65536, g += String.fromCharCode(55296 + (d >> 10), 56320 + (d & 1023))), o += 9;
        continue;
      }
      g += "�";
    }
    return g;
  });
}
By.defaultChars = ";/?:@&=+$,#";
By.componentChars = "";
var CAe = By, kAe = function(t) {
  var n = "";
  return n += t.protocol || "", n += t.slashes ? "//" : "", n += t.auth ? t.auth + "@" : "", t.hostname && t.hostname.indexOf(":") !== -1 ? n += "[" + t.hostname + "]" : n += t.hostname || "", n += t.port ? ":" + t.port : "", n += t.pathname || "", n += t.search || "", n += t.hash || "", n;
};
function f0() {
  this.protocol = null, this.slashes = null, this.auth = null, this.port = null, this.hostname = null, this.hash = null, this.search = null, this.pathname = null;
}
var _Ae = /^([a-z0-9.+-]+:)/i, NAe = /:[0-9]*$/, OAe = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/, AAe = ["<", ">", '"', "`", " ", "\r", `
`, "	"], DAe = ["{", "}", "|", "\\", "^", "`"].concat(AAe), IAe = ["'"].concat(DAe), BD = ["%", "/", "?", ";", "#"].concat(IAe), qD = ["/", "?", "#"], LAe = 255, zD = /^[+a-z0-9A-Z_-]{0,63}$/, RAe = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, HD = {
  javascript: !0,
  "javascript:": !0
}, WD = {
  http: !0,
  https: !0,
  ftp: !0,
  gopher: !0,
  file: !0,
  "http:": !0,
  "https:": !0,
  "ftp:": !0,
  "gopher:": !0,
  "file:": !0
};
function FAe(e, t) {
  if (e && e instanceof f0)
    return e;
  var n = new f0();
  return n.parse(e, t), n;
}
f0.prototype.parse = function(e, t) {
  var n, r, o, i, s, l = e;
  if (l = l.trim(), !t && e.split("#").length === 1) {
    var c = OAe.exec(l);
    if (c)
      return this.pathname = c[1], c[2] && (this.search = c[2]), this;
  }
  var f = _Ae.exec(l);
  if (f && (f = f[0], o = f.toLowerCase(), this.protocol = f, l = l.substr(f.length)), (t || f || l.match(/^\/\/[^@\/]+@[^@\/]+/)) && (s = l.substr(0, 2) === "//", s && !(f && HD[f]) && (l = l.substr(2), this.slashes = !0)), !HD[f] && (s || f && !WD[f])) {
    var d = -1;
    for (n = 0; n < qD.length; n++)
      i = l.indexOf(qD[n]), i !== -1 && (d === -1 || i < d) && (d = i);
    var g, m;
    for (d === -1 ? m = l.lastIndexOf("@") : m = l.lastIndexOf("@", d), m !== -1 && (g = l.slice(0, m), l = l.slice(m + 1), this.auth = g), d = -1, n = 0; n < BD.length; n++)
      i = l.indexOf(BD[n]), i !== -1 && (d === -1 || i < d) && (d = i);
    d === -1 && (d = l.length), l[d - 1] === ":" && d--;
    var v = l.slice(0, d);
    l = l.slice(d), this.parseHost(v), this.hostname = this.hostname || "";
    var b = this.hostname[0] === "[" && this.hostname[this.hostname.length - 1] === "]";
    if (!b) {
      var w = this.hostname.split(/\./);
      for (n = 0, r = w.length; n < r; n++) {
        var _ = w[n];
        if (_ && !_.match(zD)) {
          for (var S = "", x = 0, C = _.length; x < C; x++)
            _.charCodeAt(x) > 127 ? S += "x" : S += _[x];
          if (!S.match(zD)) {
            var E = w.slice(0, n), N = w.slice(n + 1), I = _.match(RAe);
            I && (E.push(I[1]), N.unshift(I[2])), N.length && (l = N.join(".") + l), this.hostname = E.join(".");
            break;
          }
        }
      }
    }
    this.hostname.length > LAe && (this.hostname = ""), b && (this.hostname = this.hostname.substr(1, this.hostname.length - 2));
  }
  var D = l.indexOf("#");
  D !== -1 && (this.hash = l.substr(D), l = l.slice(0, D));
  var A = l.indexOf("?");
  return A !== -1 && (this.search = l.substr(A), l = l.slice(0, A)), l && (this.pathname = l), WD[o] && this.hostname && !this.pathname && (this.pathname = ""), this;
};
f0.prototype.parseHost = function(e) {
  var t = NAe.exec(e);
  t && (t = t[0], t !== ":" && (this.port = t.substr(1)), e = e.substr(0, e.length - t.length)), e && (this.hostname = e);
};
var MAe = FAe;
Ff.encode = SAe;
Ff.decode = CAe;
Ff.format = kAe;
Ff.parse = MAe;
var Vl = {}, sw, GD;
function D5() {
  return GD || (GD = 1, sw = /[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/), sw;
}
var aw, QD;
function I5() {
  return QD || (QD = 1, aw = /[\0-\x1F\x7F-\x9F]/), aw;
}
var lw, YD;
function PAe() {
  return YD || (YD = 1, lw = /[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/), lw;
}
var cw, KD;
function L5() {
  return KD || (KD = 1, cw = /[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/), cw;
}
var JD;
function $Ae() {
  return JD || (JD = 1, Vl.Any = D5(), Vl.Cc = I5(), Vl.Cf = PAe(), Vl.P = nk, Vl.Z = L5()), Vl;
}
(function(e) {
  function t(B) {
    return Object.prototype.toString.call(B);
  }
  function n(B) {
    return t(B) === "[object String]";
  }
  var r = Object.prototype.hasOwnProperty;
  function o(B, R) {
    return r.call(B, R);
  }
  function i(B) {
    var R = Array.prototype.slice.call(arguments, 1);
    return R.forEach(function(te) {
      if (te) {
        if (typeof te != "object")
          throw new TypeError(te + "must be object");
        Object.keys(te).forEach(function(Q) {
          B[Q] = te[Q];
        });
      }
    }), B;
  }
  function s(B, R, te) {
    return [].concat(B.slice(0, R), te, B.slice(R + 1));
  }
  function l(B) {
    return !(B >= 55296 && B <= 57343 || B >= 64976 && B <= 65007 || (B & 65535) === 65535 || (B & 65535) === 65534 || B >= 0 && B <= 8 || B === 11 || B >= 14 && B <= 31 || B >= 127 && B <= 159 || B > 1114111);
  }
  function c(B) {
    if (B > 65535) {
      B -= 65536;
      var R = 55296 + (B >> 10), te = 56320 + (B & 1023);
      return String.fromCharCode(R, te);
    }
    return String.fromCharCode(B);
  }
  var f = /\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g, d = /&([a-z#][a-z0-9]{1,31});/gi, g = new RegExp(f.source + "|" + d.source, "gi"), m = /^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i, v = A5;
  function b(B, R) {
    var te = 0;
    return o(v, R) ? v[R] : R.charCodeAt(0) === 35 && m.test(R) && (te = R[1].toLowerCase() === "x" ? parseInt(R.slice(2), 16) : parseInt(R.slice(1), 10), l(te)) ? c(te) : B;
  }
  function w(B) {
    return B.indexOf("\\") < 0 ? B : B.replace(f, "$1");
  }
  function _(B) {
    return B.indexOf("\\") < 0 && B.indexOf("&") < 0 ? B : B.replace(g, function(R, te, Q) {
      return te || b(R, Q);
    });
  }
  var S = /[&<>"]/, x = /[&<>"]/g, C = {
    "&": "&amp;",
    "<": "&lt;",
    ">": "&gt;",
    '"': "&quot;"
  };
  function E(B) {
    return C[B];
  }
  function N(B) {
    return S.test(B) ? B.replace(x, E) : B;
  }
  var I = /[.?*+^$[\]\\(){}|-]/g;
  function D(B) {
    return B.replace(I, "\\$&");
  }
  function A(B) {
    switch (B) {
      case 9:
      case 32:
        return !0;
    }
    return !1;
  }
  function F(B) {
    if (B >= 8192 && B <= 8202)
      return !0;
    switch (B) {
      case 9:
      case 10:
      case 11:
      case 12:
      case 13:
      case 32:
      case 160:
      case 5760:
      case 8239:
      case 8287:
      case 12288:
        return !0;
    }
    return !1;
  }
  var $ = nk;
  function q(B) {
    return $.test(B);
  }
  function H(B) {
    switch (B) {
      case 33:
      case 34:
      case 35:
      case 36:
      case 37:
      case 38:
      case 39:
      case 40:
      case 41:
      case 42:
      case 43:
      case 44:
      case 45:
      case 46:
      case 47:
      case 58:
      case 59:
      case 60:
      case 61:
      case 62:
      case 63:
      case 64:
      case 91:
      case 92:
      case 93:
      case 94:
      case 95:
      case 96:
      case 123:
      case 124:
      case 125:
      case 126:
        return !0;
      default:
        return !1;
    }
  }
  function z(B) {
    return B = B.trim().replace(/\s+/g, " "), "ẞ".toLowerCase() === "Ṿ" && (B = B.replace(/ẞ/g, "ß")), B.toLowerCase().toUpperCase();
  }
  e.lib = {}, e.lib.mdurl = Ff, e.lib.ucmicro = $Ae(), e.assign = i, e.isString = n, e.has = o, e.unescapeMd = w, e.unescapeAll = _, e.isValidEntityCode = l, e.fromCodePoint = c, e.escapeHtml = N, e.arrayReplaceAt = s, e.isSpace = A, e.isWhiteSpace = F, e.isMdAsciiPunct = H, e.isPunctChar = q, e.escapeRE = D, e.normalizeReference = z;
})(Ct);
var qy = {}, VAe = function(t, n, r) {
  var o, i, s, l, c = -1, f = t.posMax, d = t.pos;
  for (t.pos = n + 1, o = 1; t.pos < f; ) {
    if (s = t.src.charCodeAt(t.pos), s === 93 && (o--, o === 0)) {
      i = !0;
      break;
    }
    if (l = t.pos, t.md.inline.skipToken(t), s === 91) {
      if (l === t.pos - 1)
        o++;
      else if (r)
        return t.pos = d, -1;
    }
  }
  return i && (c = t.pos), t.pos = d, c;
}, XD = Ct.unescapeAll, jAe = function(t, n, r) {
  var o, i, s = 0, l = n, c = {
    ok: !1,
    pos: 0,
    lines: 0,
    str: ""
  };
  if (t.charCodeAt(n) === 60) {
    for (n++; n < r; ) {
      if (o = t.charCodeAt(n), o === 10 || o === 60)
        return c;
      if (o === 62)
        return c.pos = n + 1, c.str = XD(t.slice(l + 1, n)), c.ok = !0, c;
      if (o === 92 && n + 1 < r) {
        n += 2;
        continue;
      }
      n++;
    }
    return c;
  }
  for (i = 0; n < r && (o = t.charCodeAt(n), !(o === 32 || o < 32 || o === 127)); ) {
    if (o === 92 && n + 1 < r) {
      if (t.charCodeAt(n + 1) === 32)
        break;
      n += 2;
      continue;
    }
    if (o === 40 && (i++, i > 32))
      return c;
    if (o === 41) {
      if (i === 0)
        break;
      i--;
    }
    n++;
  }
  return l === n || i !== 0 || (c.str = XD(t.slice(l, n)), c.lines = s, c.pos = n, c.ok = !0), c;
}, UAe = Ct.unescapeAll, BAe = function(t, n, r) {
  var o, i, s = 0, l = n, c = {
    ok: !1,
    pos: 0,
    lines: 0,
    str: ""
  };
  if (n >= r || (i = t.charCodeAt(n), i !== 34 && i !== 39 && i !== 40))
    return c;
  for (n++, i === 40 && (i = 41); n < r; ) {
    if (o = t.charCodeAt(n), o === i)
      return c.pos = n + 1, c.lines = s, c.str = UAe(t.slice(l + 1, n)), c.ok = !0, c;
    if (o === 40 && i === 41)
      return c;
    o === 10 ? s++ : o === 92 && n + 1 < r && (n++, t.charCodeAt(n) === 10 && s++), n++;
  }
  return c;
};
qy.parseLinkLabel = VAe;
qy.parseLinkDestination = jAe;
qy.parseLinkTitle = BAe;
var qAe = Ct.assign, zAe = Ct.unescapeAll, wc = Ct.escapeHtml, ss = {};
ss.code_inline = function(e, t, n, r, o) {
  var i = e[t];
  return "<code" + o.renderAttrs(i) + ">" + wc(e[t].content) + "</code>";
};
ss.code_block = function(e, t, n, r, o) {
  var i = e[t];
  return "<pre" + o.renderAttrs(i) + "><code>" + wc(e[t].content) + `</code></pre>
`;
};
ss.fence = function(e, t, n, r, o) {
  var i = e[t], s = i.info ? zAe(i.info).trim() : "", l = "", c = "", f, d, g, m, v;
  return s && (g = s.split(/(\s+)/g), l = g[0], c = g.slice(2).join("")), n.highlight ? f = n.highlight(i.content, l, c) || wc(i.content) : f = wc(i.content), f.indexOf("<pre") === 0 ? f + `
` : s ? (d = i.attrIndex("class"), m = i.attrs ? i.attrs.slice() : [], d < 0 ? m.push(["class", n.langPrefix + l]) : (m[d] = m[d].slice(), m[d][1] += " " + n.langPrefix + l), v = {
    attrs: m
  }, "<pre><code" + o.renderAttrs(v) + ">" + f + `</code></pre>
`) : "<pre><code" + o.renderAttrs(i) + ">" + f + `</code></pre>
`;
};
ss.image = function(e, t, n, r, o) {
  var i = e[t];
  return i.attrs[i.attrIndex("alt")][1] = o.renderInlineAsText(i.children, n, r), o.renderToken(e, t, n);
};
ss.hardbreak = function(e, t, n) {
  return n.xhtmlOut ? `<br />
` : `<br>
`;
};
ss.softbreak = function(e, t, n) {
  return n.breaks ? n.xhtmlOut ? `<br />
` : `<br>
` : `
`;
};
ss.text = function(e, t) {
  return wc(e[t].content);
};
ss.html_block = function(e, t) {
  return e[t].content;
};
ss.html_inline = function(e, t) {
  return e[t].content;
};
function Mf() {
  this.rules = qAe({}, ss);
}
Mf.prototype.renderAttrs = function(t) {
  var n, r, o;
  if (!t.attrs)
    return "";
  for (o = "", n = 0, r = t.attrs.length; n < r; n++)
    o += " " + wc(t.attrs[n][0]) + '="' + wc(t.attrs[n][1]) + '"';
  return o;
};
Mf.prototype.renderToken = function(t, n, r) {
  var o, i = "", s = !1, l = t[n];
  return l.hidden ? "" : (l.block && l.nesting !== -1 && n && t[n - 1].hidden && (i += `
`), i += (l.nesting === -1 ? "</" : "<") + l.tag, i += this.renderAttrs(l), l.nesting === 0 && r.xhtmlOut && (i += " /"), l.block && (s = !0, l.nesting === 1 && n + 1 < t.length && (o = t[n + 1], (o.type === "inline" || o.hidden || o.nesting === -1 && o.tag === l.tag) && (s = !1))), i += s ? `>
` : ">", i);
};
Mf.prototype.renderInline = function(e, t, n) {
  for (var r, o = "", i = this.rules, s = 0, l = e.length; s < l; s++)
    r = e[s].type, typeof i[r] < "u" ? o += i[r](e, s, t, n, this) : o += this.renderToken(e, s, t);
  return o;
};
Mf.prototype.renderInlineAsText = function(e, t, n) {
  for (var r = "", o = 0, i = e.length; o < i; o++)
    e[o].type === "text" ? r += e[o].content : e[o].type === "image" ? r += this.renderInlineAsText(e[o].children, t, n) : e[o].type === "softbreak" && (r += `
`);
  return r;
};
Mf.prototype.render = function(e, t, n) {
  var r, o, i, s = "", l = this.rules;
  for (r = 0, o = e.length; r < o; r++)
    i = e[r].type, i === "inline" ? s += this.renderInline(e[r].children, t, n) : typeof l[i] < "u" ? s += l[e[r].type](e, r, t, n, this) : s += this.renderToken(e, r, t, n);
  return s;
};
var HAe = Mf;
function Li() {
  this.__rules__ = [], this.__cache__ = null;
}
Li.prototype.__find__ = function(e) {
  for (var t = 0; t < this.__rules__.length; t++)
    if (this.__rules__[t].name === e)
      return t;
  return -1;
};
Li.prototype.__compile__ = function() {
  var e = this, t = [""];
  e.__rules__.forEach(function(n) {
    n.enabled && n.alt.forEach(function(r) {
      t.indexOf(r) < 0 && t.push(r);
    });
  }), e.__cache__ = {}, t.forEach(function(n) {
    e.__cache__[n] = [], e.__rules__.forEach(function(r) {
      r.enabled && (n && r.alt.indexOf(n) < 0 || e.__cache__[n].push(r.fn));
    });
  });
};
Li.prototype.at = function(e, t, n) {
  var r = this.__find__(e), o = n || {};
  if (r === -1)
    throw new Error("Parser rule not found: " + e);
  this.__rules__[r].fn = t, this.__rules__[r].alt = o.alt || [], this.__cache__ = null;
};
Li.prototype.before = function(e, t, n, r) {
  var o = this.__find__(e), i = r || {};
  if (o === -1)
    throw new Error("Parser rule not found: " + e);
  this.__rules__.splice(o, 0, {
    name: t,
    enabled: !0,
    fn: n,
    alt: i.alt || []
  }), this.__cache__ = null;
};
Li.prototype.after = function(e, t, n, r) {
  var o = this.__find__(e), i = r || {};
  if (o === -1)
    throw new Error("Parser rule not found: " + e);
  this.__rules__.splice(o + 1, 0, {
    name: t,
    enabled: !0,
    fn: n,
    alt: i.alt || []
  }), this.__cache__ = null;
};
Li.prototype.push = function(e, t, n) {
  var r = n || {};
  this.__rules__.push({
    name: e,
    enabled: !0,
    fn: t,
    alt: r.alt || []
  }), this.__cache__ = null;
};
Li.prototype.enable = function(e, t) {
  Array.isArray(e) || (e = [e]);
  var n = [];
  return e.forEach(function(r) {
    var o = this.__find__(r);
    if (o < 0) {
      if (t)
        return;
      throw new Error("Rules manager: invalid rule name " + r);
    }
    this.__rules__[o].enabled = !0, n.push(r);
  }, this), this.__cache__ = null, n;
};
Li.prototype.enableOnly = function(e, t) {
  Array.isArray(e) || (e = [e]), this.__rules__.forEach(function(n) {
    n.enabled = !1;
  }), this.enable(e, t);
};
Li.prototype.disable = function(e, t) {
  Array.isArray(e) || (e = [e]);
  var n = [];
  return e.forEach(function(r) {
    var o = this.__find__(r);
    if (o < 0) {
      if (t)
        return;
      throw new Error("Rules manager: invalid rule name " + r);
    }
    this.__rules__[o].enabled = !1, n.push(r);
  }, this), this.__cache__ = null, n;
};
Li.prototype.getRules = function(e) {
  return this.__cache__ === null && this.__compile__(), this.__cache__[e] || [];
};
var rk = Li, WAe = /\r\n?|\n/g, GAe = /\0/g, QAe = function(t) {
  var n;
  n = t.src.replace(WAe, `
`), n = n.replace(GAe, "�"), t.src = n;
}, YAe = function(t) {
  var n;
  t.inlineMode ? (n = new t.Token("inline", "", 0), n.content = t.src, n.map = [0, 1], n.children = [], t.tokens.push(n)) : t.md.block.parse(t.src, t.md, t.env, t.tokens);
}, KAe = function(t) {
  var n = t.tokens, r, o, i;
  for (o = 0, i = n.length; o < i; o++)
    r = n[o], r.type === "inline" && t.md.inline.parse(r.content, t.md, t.env, r.children);
}, JAe = Ct.arrayReplaceAt;
function XAe(e) {
  return /^<a[>\s]/i.test(e);
}
function ZAe(e) {
  return /^<\/a\s*>/i.test(e);
}
var eDe = function(t) {
  var n, r, o, i, s, l, c, f, d, g, m, v, b, w, _, S, x = t.tokens, C;
  if (t.md.options.linkify) {
    for (r = 0, o = x.length; r < o; r++)
      if (!(x[r].type !== "inline" || !t.md.linkify.pretest(x[r].content)))
        for (i = x[r].children, b = 0, n = i.length - 1; n >= 0; n--) {
          if (l = i[n], l.type === "link_close") {
            for (n--; i[n].level !== l.level && i[n].type !== "link_open"; )
              n--;
            continue;
          }
          if (l.type === "html_inline" && (XAe(l.content) && b > 0 && b--, ZAe(l.content) && b++), !(b > 0) && l.type === "text" && t.md.linkify.test(l.content)) {
            for (d = l.content, C = t.md.linkify.match(d), c = [], v = l.level, m = 0, f = 0; f < C.length; f++)
              w = C[f].url, _ = t.md.normalizeLink(w), t.md.validateLink(_) && (S = C[f].text, C[f].schema ? C[f].schema === "mailto:" && !/^mailto:/i.test(S) ? S = t.md.normalizeLinkText("mailto:" + S).replace(/^mailto:/, "") : S = t.md.normalizeLinkText(S) : S = t.md.normalizeLinkText("http://" + S).replace(/^http:\/\//, ""), g = C[f].index, g > m && (s = new t.Token("text", "", 0), s.content = d.slice(m, g), s.level = v, c.push(s)), s = new t.Token("link_open", "a", 1), s.attrs = [["href", _]], s.level = v++, s.markup = "linkify", s.info = "auto", c.push(s), s = new t.Token("text", "", 0), s.content = S, s.level = v, c.push(s), s = new t.Token("link_close", "a", -1), s.level = --v, s.markup = "linkify", s.info = "auto", c.push(s), m = C[f].lastIndex);
            m < d.length && (s = new t.Token("text", "", 0), s.content = d.slice(m), s.level = v, c.push(s)), x[r].children = i = JAe(i, n, c);
          }
        }
  }
}, R5 = /\+-|\.\.|\?\?\?\?|!!!!|,,|--/, tDe = /\((c|tm|r|p)\)/i, nDe = /\((c|tm|r|p)\)/ig, rDe = {
  c: "©",
  r: "®",
  p: "§",
  tm: "™"
};
function oDe(e, t) {
  return rDe[t.toLowerCase()];
}
function iDe(e) {
  var t, n, r = 0;
  for (t = e.length - 1; t >= 0; t--)
    n = e[t], n.type === "text" && !r && (n.content = n.content.replace(nDe, oDe)), n.type === "link_open" && n.info === "auto" && r--, n.type === "link_close" && n.info === "auto" && r++;
}
function sDe(e) {
  var t, n, r = 0;
  for (t = e.length - 1; t >= 0; t--)
    n = e[t], n.type === "text" && !r && R5.test(n.content) && (n.content = n.content.replace(/\+-/g, "±").replace(/\.{2,}/g, "…").replace(/([?!])…/g, "$1..").replace(/([?!]){4,}/g, "$1$1$1").replace(/,{2,}/g, ",").replace(/(^|[^-])---(?=[^-]|$)/mg, "$1—").replace(/(^|\s)--(?=\s|$)/mg, "$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg, "$1–")), n.type === "link_open" && n.info === "auto" && r--, n.type === "link_close" && n.info === "auto" && r++;
}
var aDe = function(t) {
  var n;
  if (t.md.options.typographer)
    for (n = t.tokens.length - 1; n >= 0; n--)
      t.tokens[n].type === "inline" && (tDe.test(t.tokens[n].content) && iDe(t.tokens[n].children), R5.test(t.tokens[n].content) && sDe(t.tokens[n].children));
}, ZD = Ct.isWhiteSpace, eI = Ct.isPunctChar, tI = Ct.isMdAsciiPunct, lDe = /['"]/, nI = /['"]/g, rI = "’";
function wg(e, t, n) {
  return e.substr(0, t) + n + e.substr(t + 1);
}
function cDe(e, t) {
  var n, r, o, i, s, l, c, f, d, g, m, v, b, w, _, S, x, C, E, N, I;
  for (E = [], n = 0; n < e.length; n++) {
    for (r = e[n], c = e[n].level, x = E.length - 1; x >= 0 && !(E[x].level <= c); x--)
      ;
    if (E.length = x + 1, r.type === "text") {
      o = r.content, s = 0, l = o.length;
      e:
        for (; s < l && (nI.lastIndex = s, i = nI.exec(o), !!i); ) {
          if (_ = S = !0, s = i.index + 1, C = i[0] === "'", d = 32, i.index - 1 >= 0)
            d = o.charCodeAt(i.index - 1);
          else
            for (x = n - 1; x >= 0 && !(e[x].type === "softbreak" || e[x].type === "hardbreak"); x--)
              if (e[x].content) {
                d = e[x].content.charCodeAt(e[x].content.length - 1);
                break;
              }
          if (g = 32, s < l)
            g = o.charCodeAt(s);
          else
            for (x = n + 1; x < e.length && !(e[x].type === "softbreak" || e[x].type === "hardbreak"); x++)
              if (e[x].content) {
                g = e[x].content.charCodeAt(0);
                break;
              }
          if (m = tI(d) || eI(String.fromCharCode(d)), v = tI(g) || eI(String.fromCharCode(g)), b = ZD(d), w = ZD(g), w ? _ = !1 : v && (b || m || (_ = !1)), b ? S = !1 : m && (w || v || (S = !1)), g === 34 && i[0] === '"' && d >= 48 && d <= 57 && (S = _ = !1), _ && S && (_ = m, S = v), !_ && !S) {
            C && (r.content = wg(r.content, i.index, rI));
            continue;
          }
          if (S) {
            for (x = E.length - 1; x >= 0 && (f = E[x], !(E[x].level < c)); x--)
              if (f.single === C && E[x].level === c) {
                f = E[x], C ? (N = t.md.options.quotes[2], I = t.md.options.quotes[3]) : (N = t.md.options.quotes[0], I = t.md.options.quotes[1]), r.content = wg(r.content, i.index, I), e[f.token].content = wg(
                  e[f.token].content,
                  f.pos,
                  N
                ), s += I.length - 1, f.token === n && (s += N.length - 1), o = r.content, l = o.length, E.length = x;
                continue e;
              }
          }
          _ ? E.push({
            token: n,
            pos: i.index,
            single: C,
            level: c
          }) : S && C && (r.content = wg(r.content, i.index, rI));
        }
    }
  }
}
var uDe = function(t) {
  var n;
  if (t.md.options.typographer)
    for (n = t.tokens.length - 1; n >= 0; n--)
      t.tokens[n].type !== "inline" || !lDe.test(t.tokens[n].content) || cDe(t.tokens[n].children, t);
};
function Pf(e, t, n) {
  this.type = e, this.tag = t, this.attrs = null, this.map = null, this.nesting = n, this.level = 0, this.children = null, this.content = "", this.markup = "", this.info = "", this.meta = null, this.block = !1, this.hidden = !1;
}
Pf.prototype.attrIndex = function(t) {
  var n, r, o;
  if (!this.attrs)
    return -1;
  for (n = this.attrs, r = 0, o = n.length; r < o; r++)
    if (n[r][0] === t)
      return r;
  return -1;
};
Pf.prototype.attrPush = function(t) {
  this.attrs ? this.attrs.push(t) : this.attrs = [t];
};
Pf.prototype.attrSet = function(t, n) {
  var r = this.attrIndex(t), o = [t, n];
  r < 0 ? this.attrPush(o) : this.attrs[r] = o;
};
Pf.prototype.attrGet = function(t) {
  var n = this.attrIndex(t), r = null;
  return n >= 0 && (r = this.attrs[n][1]), r;
};
Pf.prototype.attrJoin = function(t, n) {
  var r = this.attrIndex(t);
  r < 0 ? this.attrPush([t, n]) : this.attrs[r][1] = this.attrs[r][1] + " " + n;
};
var ok = Pf, fDe = ok;
function F5(e, t, n) {
  this.src = e, this.env = n, this.tokens = [], this.inlineMode = !1, this.md = t;
}
F5.prototype.Token = fDe;
var dDe = F5, pDe = rk, uw = [
  ["normalize", QAe],
  ["block", YAe],
  ["inline", KAe],
  ["linkify", eDe],
  ["replacements", aDe],
  ["smartquotes", uDe]
];
function ik() {
  this.ruler = new pDe();
  for (var e = 0; e < uw.length; e++)
    this.ruler.push(uw[e][0], uw[e][1]);
}
ik.prototype.process = function(e) {
  var t, n, r;
  for (r = this.ruler.getRules(""), t = 0, n = r.length; t < n; t++)
    r[t](e);
};
ik.prototype.State = dDe;
var hDe = ik, fw = Ct.isSpace;
function dw(e, t) {
  var n = e.bMarks[t] + e.tShift[t], r = e.eMarks[t];
  return e.src.substr(n, r - n);
}
function oI(e) {
  var t = [], n = 0, r = e.length, o, i = !1, s = 0, l = "";
  for (o = e.charCodeAt(n); n < r; )
    o === 124 && (i ? (l += e.substring(s, n - 1), s = n) : (t.push(l + e.substring(s, n)), l = "", s = n + 1)), i = o === 92, n++, o = e.charCodeAt(n);
  return t.push(l + e.substring(s)), t;
}
var mDe = function(t, n, r, o) {
  var i, s, l, c, f, d, g, m, v, b, w, _, S, x, C, E, N, I;
  if (n + 2 > r || (d = n + 1, t.sCount[d] < t.blkIndent) || t.sCount[d] - t.blkIndent >= 4 || (l = t.bMarks[d] + t.tShift[d], l >= t.eMarks[d]) || (N = t.src.charCodeAt(l++), N !== 124 && N !== 45 && N !== 58) || l >= t.eMarks[d] || (I = t.src.charCodeAt(l++), I !== 124 && I !== 45 && I !== 58 && !fw(I)) || N === 45 && fw(I))
    return !1;
  for (; l < t.eMarks[d]; ) {
    if (i = t.src.charCodeAt(l), i !== 124 && i !== 45 && i !== 58 && !fw(i))
      return !1;
    l++;
  }
  for (s = dw(t, n + 1), g = s.split("|"), b = [], c = 0; c < g.length; c++) {
    if (w = g[c].trim(), !w) {
      if (c === 0 || c === g.length - 1)
        continue;
      return !1;
    }
    if (!/^:?-+:?$/.test(w))
      return !1;
    w.charCodeAt(w.length - 1) === 58 ? b.push(w.charCodeAt(0) === 58 ? "center" : "right") : w.charCodeAt(0) === 58 ? b.push("left") : b.push("");
  }
  if (s = dw(t, n).trim(), s.indexOf("|") === -1 || t.sCount[n] - t.blkIndent >= 4 || (g = oI(s), g.length && g[0] === "" && g.shift(), g.length && g[g.length - 1] === "" && g.pop(), m = g.length, m === 0 || m !== b.length))
    return !1;
  if (o)
    return !0;
  for (x = t.parentType, t.parentType = "table", E = t.md.block.ruler.getRules("blockquote"), v = t.push("table_open", "table", 1), v.map = _ = [n, 0], v = t.push("thead_open", "thead", 1), v.map = [n, n + 1], v = t.push("tr_open", "tr", 1), v.map = [n, n + 1], c = 0; c < g.length; c++)
    v = t.push("th_open", "th", 1), b[c] && (v.attrs = [["style", "text-align:" + b[c]]]), v = t.push("inline", "", 0), v.content = g[c].trim(), v.children = [], v = t.push("th_close", "th", -1);
  for (v = t.push("tr_close", "tr", -1), v = t.push("thead_close", "thead", -1), d = n + 2; d < r && !(t.sCount[d] < t.blkIndent); d++) {
    for (C = !1, c = 0, f = E.length; c < f; c++)
      if (E[c](t, d, r, !0)) {
        C = !0;
        break;
      }
    if (C || (s = dw(t, d).trim(), !s) || t.sCount[d] - t.blkIndent >= 4)
      break;
    for (g = oI(s), g.length && g[0] === "" && g.shift(), g.length && g[g.length - 1] === "" && g.pop(), d === n + 2 && (v = t.push("tbody_open", "tbody", 1), v.map = S = [n + 2, 0]), v = t.push("tr_open", "tr", 1), v.map = [d, d + 1], c = 0; c < m; c++)
      v = t.push("td_open", "td", 1), b[c] && (v.attrs = [["style", "text-align:" + b[c]]]), v = t.push("inline", "", 0), v.content = g[c] ? g[c].trim() : "", v.children = [], v = t.push("td_close", "td", -1);
    v = t.push("tr_close", "tr", -1);
  }
  return S && (v = t.push("tbody_close", "tbody", -1), S[1] = d), v = t.push("table_close", "table", -1), _[1] = d, t.parentType = x, t.line = d, !0;
}, gDe = function(t, n, r) {
  var o, i, s;
  if (t.sCount[n] - t.blkIndent < 4)
    return !1;
  for (i = o = n + 1; o < r; ) {
    if (t.isEmpty(o)) {
      o++;
      continue;
    }
    if (t.sCount[o] - t.blkIndent >= 4) {
      o++, i = o;
      continue;
    }
    break;
  }
  return t.line = i, s = t.push("code_block", "code", 0), s.content = t.getLines(n, i, 4 + t.blkIndent, !1) + `
`, s.map = [n, t.line], !0;
}, vDe = function(t, n, r, o) {
  var i, s, l, c, f, d, g, m = !1, v = t.bMarks[n] + t.tShift[n], b = t.eMarks[n];
  if (t.sCount[n] - t.blkIndent >= 4 || v + 3 > b || (i = t.src.charCodeAt(v), i !== 126 && i !== 96) || (f = v, v = t.skipChars(v, i), s = v - f, s < 3) || (g = t.src.slice(f, v), l = t.src.slice(v, b), i === 96 && l.indexOf(String.fromCharCode(i)) >= 0))
    return !1;
  if (o)
    return !0;
  for (c = n; c++, !(c >= r || (v = f = t.bMarks[c] + t.tShift[c], b = t.eMarks[c], v < b && t.sCount[c] < t.blkIndent)); )
    if (t.src.charCodeAt(v) === i && !(t.sCount[c] - t.blkIndent >= 4) && (v = t.skipChars(v, i), !(v - f < s) && (v = t.skipSpaces(v), !(v < b)))) {
      m = !0;
      break;
    }
  return s = t.sCount[n], t.line = c + (m ? 1 : 0), d = t.push("fence", "code", 0), d.info = l, d.content = t.getLines(n + 1, c, s, !0), d.markup = g, d.map = [n, t.line], !0;
}, iI = Ct.isSpace, yDe = function(t, n, r, o) {
  var i, s, l, c, f, d, g, m, v, b, w, _, S, x, C, E, N, I, D, A, F = t.lineMax, $ = t.bMarks[n] + t.tShift[n], q = t.eMarks[n];
  if (t.sCount[n] - t.blkIndent >= 4 || t.src.charCodeAt($++) !== 62)
    return !1;
  if (o)
    return !0;
  for (c = v = t.sCount[n] + 1, t.src.charCodeAt($) === 32 ? ($++, c++, v++, i = !1, E = !0) : t.src.charCodeAt($) === 9 ? (E = !0, (t.bsCount[n] + v) % 4 === 3 ? ($++, c++, v++, i = !1) : i = !0) : E = !1, b = [t.bMarks[n]], t.bMarks[n] = $; $ < q && (s = t.src.charCodeAt($), iI(s)); ) {
    s === 9 ? v += 4 - (v + t.bsCount[n] + (i ? 1 : 0)) % 4 : v++;
    $++;
  }
  for (w = [t.bsCount[n]], t.bsCount[n] = t.sCount[n] + 1 + (E ? 1 : 0), d = $ >= q, x = [t.sCount[n]], t.sCount[n] = v - c, C = [t.tShift[n]], t.tShift[n] = $ - t.bMarks[n], I = t.md.block.ruler.getRules("blockquote"), S = t.parentType, t.parentType = "blockquote", m = n + 1; m < r && (A = t.sCount[m] < t.blkIndent, $ = t.bMarks[m] + t.tShift[m], q = t.eMarks[m], !($ >= q)); m++) {
    if (t.src.charCodeAt($++) === 62 && !A) {
      for (c = v = t.sCount[m] + 1, t.src.charCodeAt($) === 32 ? ($++, c++, v++, i = !1, E = !0) : t.src.charCodeAt($) === 9 ? (E = !0, (t.bsCount[m] + v) % 4 === 3 ? ($++, c++, v++, i = !1) : i = !0) : E = !1, b.push(t.bMarks[m]), t.bMarks[m] = $; $ < q && (s = t.src.charCodeAt($), iI(s)); ) {
        s === 9 ? v += 4 - (v + t.bsCount[m] + (i ? 1 : 0)) % 4 : v++;
        $++;
      }
      d = $ >= q, w.push(t.bsCount[m]), t.bsCount[m] = t.sCount[m] + 1 + (E ? 1 : 0), x.push(t.sCount[m]), t.sCount[m] = v - c, C.push(t.tShift[m]), t.tShift[m] = $ - t.bMarks[m];
      continue;
    }
    if (d)
      break;
    for (N = !1, l = 0, f = I.length; l < f; l++)
      if (I[l](t, m, r, !0)) {
        N = !0;
        break;
      }
    if (N) {
      t.lineMax = m, t.blkIndent !== 0 && (b.push(t.bMarks[m]), w.push(t.bsCount[m]), C.push(t.tShift[m]), x.push(t.sCount[m]), t.sCount[m] -= t.blkIndent);
      break;
    }
    b.push(t.bMarks[m]), w.push(t.bsCount[m]), C.push(t.tShift[m]), x.push(t.sCount[m]), t.sCount[m] = -1;
  }
  for (_ = t.blkIndent, t.blkIndent = 0, D = t.push("blockquote_open", "blockquote", 1), D.markup = ">", D.map = g = [n, 0], t.md.block.tokenize(t, n, m), D = t.push("blockquote_close", "blockquote", -1), D.markup = ">", t.lineMax = F, t.parentType = S, g[1] = t.line, l = 0; l < C.length; l++)
    t.bMarks[l + n] = b[l], t.tShift[l + n] = C[l], t.sCount[l + n] = x[l], t.bsCount[l + n] = w[l];
  return t.blkIndent = _, !0;
}, bDe = Ct.isSpace, EDe = function(t, n, r, o) {
  var i, s, l, c, f = t.bMarks[n] + t.tShift[n], d = t.eMarks[n];
  if (t.sCount[n] - t.blkIndent >= 4 || (i = t.src.charCodeAt(f++), i !== 42 && i !== 45 && i !== 95))
    return !1;
  for (s = 1; f < d; ) {
    if (l = t.src.charCodeAt(f++), l !== i && !bDe(l))
      return !1;
    l === i && s++;
  }
  return s < 3 ? !1 : (o || (t.line = n + 1, c = t.push("hr", "hr", 0), c.map = [n, t.line], c.markup = Array(s + 1).join(String.fromCharCode(i))), !0);
}, M5 = Ct.isSpace;
function sI(e, t) {
  var n, r, o, i;
  return r = e.bMarks[t] + e.tShift[t], o = e.eMarks[t], n = e.src.charCodeAt(r++), n !== 42 && n !== 45 && n !== 43 || r < o && (i = e.src.charCodeAt(r), !M5(i)) ? -1 : r;
}
function aI(e, t) {
  var n, r = e.bMarks[t] + e.tShift[t], o = r, i = e.eMarks[t];
  if (o + 1 >= i || (n = e.src.charCodeAt(o++), n < 48 || n > 57))
    return -1;
  for (; ; ) {
    if (o >= i)
      return -1;
    if (n = e.src.charCodeAt(o++), n >= 48 && n <= 57) {
      if (o - r >= 10)
        return -1;
      continue;
    }
    if (n === 41 || n === 46)
      break;
    return -1;
  }
  return o < i && (n = e.src.charCodeAt(o), !M5(n)) ? -1 : o;
}
function wDe(e, t) {
  var n, r, o = e.level + 2;
  for (n = t + 2, r = e.tokens.length - 2; n < r; n++)
    e.tokens[n].level === o && e.tokens[n].type === "paragraph_open" && (e.tokens[n + 2].hidden = !0, e.tokens[n].hidden = !0, n += 2);
}
var xDe = function(t, n, r, o) {
  var i, s, l, c, f, d, g, m, v, b, w, _, S, x, C, E, N, I, D, A, F, $, q, H, z, B, R, te, Q = !1, Y = !0;
  if (t.sCount[n] - t.blkIndent >= 4 || t.listIndent >= 0 && t.sCount[n] - t.listIndent >= 4 && t.sCount[n] < t.blkIndent)
    return !1;
  if (o && t.parentType === "paragraph" && t.sCount[n] >= t.blkIndent && (Q = !0), (q = aI(t, n)) >= 0) {
    if (g = !0, z = t.bMarks[n] + t.tShift[n], S = Number(t.src.slice(z, q - 1)), Q && S !== 1)
      return !1;
  } else if ((q = sI(t, n)) >= 0)
    g = !1;
  else
    return !1;
  if (Q && t.skipSpaces(q) >= t.eMarks[n])
    return !1;
  if (_ = t.src.charCodeAt(q - 1), o)
    return !0;
  for (w = t.tokens.length, g ? (te = t.push("ordered_list_open", "ol", 1), S !== 1 && (te.attrs = [["start", S]])) : te = t.push("bullet_list_open", "ul", 1), te.map = b = [n, 0], te.markup = String.fromCharCode(_), C = n, H = !1, R = t.md.block.ruler.getRules("list"), I = t.parentType, t.parentType = "list"; C < r; ) {
    for ($ = q, x = t.eMarks[C], d = E = t.sCount[C] + q - (t.bMarks[n] + t.tShift[n]); $ < x; ) {
      if (i = t.src.charCodeAt($), i === 9)
        E += 4 - (E + t.bsCount[C]) % 4;
      else if (i === 32)
        E++;
      else
        break;
      $++;
    }
    if (s = $, s >= x ? f = 1 : f = E - d, f > 4 && (f = 1), c = d + f, te = t.push("list_item_open", "li", 1), te.markup = String.fromCharCode(_), te.map = m = [n, 0], g && (te.info = t.src.slice(z, q - 1)), F = t.tight, A = t.tShift[n], D = t.sCount[n], N = t.listIndent, t.listIndent = t.blkIndent, t.blkIndent = c, t.tight = !0, t.tShift[n] = s - t.bMarks[n], t.sCount[n] = E, s >= x && t.isEmpty(n + 1) ? t.line = Math.min(t.line + 2, r) : t.md.block.tokenize(t, n, r, !0), (!t.tight || H) && (Y = !1), H = t.line - n > 1 && t.isEmpty(t.line - 1), t.blkIndent = t.listIndent, t.listIndent = N, t.tShift[n] = A, t.sCount[n] = D, t.tight = F, te = t.push("list_item_close", "li", -1), te.markup = String.fromCharCode(_), C = n = t.line, m[1] = C, s = t.bMarks[n], C >= r || t.sCount[C] < t.blkIndent || t.sCount[n] - t.blkIndent >= 4)
      break;
    for (B = !1, l = 0, v = R.length; l < v; l++)
      if (R[l](t, C, r, !0)) {
        B = !0;
        break;
      }
    if (B)
      break;
    if (g) {
      if (q = aI(t, C), q < 0)
        break;
      z = t.bMarks[C] + t.tShift[C];
    } else if (q = sI(t, C), q < 0)
      break;
    if (_ !== t.src.charCodeAt(q - 1))
      break;
  }
  return g ? te = t.push("ordered_list_close", "ol", -1) : te = t.push("bullet_list_close", "ul", -1), te.markup = String.fromCharCode(_), b[1] = C, t.line = C, t.parentType = I, Y && wDe(t, w), !0;
}, SDe = Ct.normalizeReference, xg = Ct.isSpace, TDe = function(t, n, r, o) {
  var i, s, l, c, f, d, g, m, v, b, w, _, S, x, C, E, N = 0, I = t.bMarks[n] + t.tShift[n], D = t.eMarks[n], A = n + 1;
  if (t.sCount[n] - t.blkIndent >= 4 || t.src.charCodeAt(I) !== 91)
    return !1;
  for (; ++I < D; )
    if (t.src.charCodeAt(I) === 93 && t.src.charCodeAt(I - 1) !== 92) {
      if (I + 1 === D || t.src.charCodeAt(I + 1) !== 58)
        return !1;
      break;
    }
  for (c = t.lineMax, C = t.md.block.ruler.getRules("reference"), b = t.parentType, t.parentType = "reference"; A < c && !t.isEmpty(A); A++)
    if (!(t.sCount[A] - t.blkIndent > 3) && !(t.sCount[A] < 0)) {
      for (x = !1, d = 0, g = C.length; d < g; d++)
        if (C[d](t, A, c, !0)) {
          x = !0;
          break;
        }
      if (x)
        break;
    }
  for (S = t.getLines(n, A, t.blkIndent, !1).trim(), D = S.length, I = 1; I < D; I++) {
    if (i = S.charCodeAt(I), i === 91)
      return !1;
    if (i === 93) {
      v = I;
      break;
    } else
      i === 10 ? N++ : i === 92 && (I++, I < D && S.charCodeAt(I) === 10 && N++);
  }
  if (v < 0 || S.charCodeAt(v + 1) !== 58)
    return !1;
  for (I = v + 2; I < D; I++)
    if (i = S.charCodeAt(I), i === 10)
      N++;
    else if (!xg(i))
      break;
  if (w = t.md.helpers.parseLinkDestination(S, I, D), !w.ok || (f = t.md.normalizeLink(w.str), !t.md.validateLink(f)))
    return !1;
  for (I = w.pos, N += w.lines, s = I, l = N, _ = I; I < D; I++)
    if (i = S.charCodeAt(I), i === 10)
      N++;
    else if (!xg(i))
      break;
  for (w = t.md.helpers.parseLinkTitle(S, I, D), I < D && _ !== I && w.ok ? (E = w.str, I = w.pos, N += w.lines) : (E = "", I = s, N = l); I < D && (i = S.charCodeAt(I), !!xg(i)); )
    I++;
  if (I < D && S.charCodeAt(I) !== 10 && E)
    for (E = "", I = s, N = l; I < D && (i = S.charCodeAt(I), !!xg(i)); )
      I++;
  return I < D && S.charCodeAt(I) !== 10 || (m = SDe(S.slice(1, v)), !m) ? !1 : (o || (typeof t.env.references > "u" && (t.env.references = {}), typeof t.env.references[m] > "u" && (t.env.references[m] = { title: E, href: f }), t.parentType = b, t.line = n + N + 1), !0);
}, CDe = [
  "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",
  "section",
  "source",
  "summary",
  "table",
  "tbody",
  "td",
  "tfoot",
  "th",
  "thead",
  "title",
  "tr",
  "track",
  "ul"
], zy = {}, kDe = "[a-zA-Z_:][a-zA-Z0-9:._-]*", _De = "[^\"'=<>`\\x00-\\x20]+", NDe = "'[^']*'", ODe = '"[^"]*"', ADe = "(?:" + _De + "|" + NDe + "|" + ODe + ")", DDe = "(?:\\s+" + kDe + "(?:\\s*=\\s*" + ADe + ")?)", P5 = "<[A-Za-z][A-Za-z0-9\\-]*" + DDe + "*\\s*\\/?>", $5 = "<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>", IDe = "<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->", LDe = "<[?][\\s\\S]*?[?]>", RDe = "<![A-Z]+\\s+[^>]*>", FDe = "<!\\[CDATA\\[[\\s\\S]*?\\]\\]>", MDe = new RegExp("^(?:" + P5 + "|" + $5 + "|" + IDe + "|" + LDe + "|" + RDe + "|" + FDe + ")"), PDe = new RegExp("^(?:" + P5 + "|" + $5 + ")");
zy.HTML_TAG_RE = MDe;
zy.HTML_OPEN_CLOSE_TAG_RE = PDe;
var $De = CDe, VDe = zy.HTML_OPEN_CLOSE_TAG_RE, xu = [
  [/^<(script|pre|style|textarea)(?=(\s|>|$))/i, /<\/(script|pre|style|textarea)>/i, !0],
  [/^<!--/, /-->/, !0],
  [/^<\?/, /\?>/, !0],
  [/^<![A-Z]/, />/, !0],
  [/^<!\[CDATA\[/, /\]\]>/, !0],
  [new RegExp("^</?(" + $De.join("|") + ")(?=(\\s|/?>|$))", "i"), /^$/, !0],
  [new RegExp(VDe.source + "\\s*$"), /^$/, !1]
], jDe = function(t, n, r, o) {
  var i, s, l, c, f = t.bMarks[n] + t.tShift[n], d = t.eMarks[n];
  if (t.sCount[n] - t.blkIndent >= 4 || !t.md.options.html || t.src.charCodeAt(f) !== 60)
    return !1;
  for (c = t.src.slice(f, d), i = 0; i < xu.length && !xu[i][0].test(c); i++)
    ;
  if (i === xu.length)
    return !1;
  if (o)
    return xu[i][2];
  if (s = n + 1, !xu[i][1].test(c)) {
    for (; s < r && !(t.sCount[s] < t.blkIndent); s++)
      if (f = t.bMarks[s] + t.tShift[s], d = t.eMarks[s], c = t.src.slice(f, d), xu[i][1].test(c)) {
        c.length !== 0 && s++;
        break;
      }
  }
  return t.line = s, l = t.push("html_block", "", 0), l.map = [n, s], l.content = t.getLines(n, s, t.blkIndent, !0), !0;
}, lI = Ct.isSpace, UDe = function(t, n, r, o) {
  var i, s, l, c, f = t.bMarks[n] + t.tShift[n], d = t.eMarks[n];
  if (t.sCount[n] - t.blkIndent >= 4 || (i = t.src.charCodeAt(f), i !== 35 || f >= d))
    return !1;
  for (s = 1, i = t.src.charCodeAt(++f); i === 35 && f < d && s <= 6; )
    s++, i = t.src.charCodeAt(++f);
  return s > 6 || f < d && !lI(i) ? !1 : (o || (d = t.skipSpacesBack(d, f), l = t.skipCharsBack(d, 35, f), l > f && lI(t.src.charCodeAt(l - 1)) && (d = l), t.line = n + 1, c = t.push("heading_open", "h" + String(s), 1), c.markup = "########".slice(0, s), c.map = [n, t.line], c = t.push("inline", "", 0), c.content = t.src.slice(f, d).trim(), c.map = [n, t.line], c.children = [], c = t.push("heading_close", "h" + String(s), -1), c.markup = "########".slice(0, s)), !0);
}, BDe = function(t, n, r) {
  var o, i, s, l, c, f, d, g, m, v = n + 1, b, w = t.md.block.ruler.getRules("paragraph");
  if (t.sCount[n] - t.blkIndent >= 4)
    return !1;
  for (b = t.parentType, t.parentType = "paragraph"; v < r && !t.isEmpty(v); v++)
    if (!(t.sCount[v] - t.blkIndent > 3)) {
      if (t.sCount[v] >= t.blkIndent && (f = t.bMarks[v] + t.tShift[v], d = t.eMarks[v], f < d && (m = t.src.charCodeAt(f), (m === 45 || m === 61) && (f = t.skipChars(f, m), f = t.skipSpaces(f), f >= d)))) {
        g = m === 61 ? 1 : 2;
        break;
      }
      if (!(t.sCount[v] < 0)) {
        for (i = !1, s = 0, l = w.length; s < l; s++)
          if (w[s](t, v, r, !0)) {
            i = !0;
            break;
          }
        if (i)
          break;
      }
    }
  return g ? (o = t.getLines(n, v, t.blkIndent, !1).trim(), t.line = v + 1, c = t.push("heading_open", "h" + String(g), 1), c.markup = String.fromCharCode(m), c.map = [n, t.line], c = t.push("inline", "", 0), c.content = o, c.map = [n, t.line - 1], c.children = [], c = t.push("heading_close", "h" + String(g), -1), c.markup = String.fromCharCode(m), t.parentType = b, !0) : !1;
}, qDe = function(t, n) {
  var r, o, i, s, l, c, f = n + 1, d = t.md.block.ruler.getRules("paragraph"), g = t.lineMax;
  for (c = t.parentType, t.parentType = "paragraph"; f < g && !t.isEmpty(f); f++)
    if (!(t.sCount[f] - t.blkIndent > 3) && !(t.sCount[f] < 0)) {
      for (o = !1, i = 0, s = d.length; i < s; i++)
        if (d[i](t, f, g, !0)) {
          o = !0;
          break;
        }
      if (o)
        break;
    }
  return r = t.getLines(n, f, t.blkIndent, !1).trim(), t.line = f, l = t.push("paragraph_open", "p", 1), l.map = [n, t.line], l = t.push("inline", "", 0), l.content = r, l.map = [n, t.line], l.children = [], l = t.push("paragraph_close", "p", -1), t.parentType = c, !0;
}, V5 = ok, Hy = Ct.isSpace;
function as(e, t, n, r) {
  var o, i, s, l, c, f, d, g;
  for (this.src = e, this.md = t, this.env = n, this.tokens = r, this.bMarks = [], this.eMarks = [], this.tShift = [], this.sCount = [], this.bsCount = [], this.blkIndent = 0, this.line = 0, this.lineMax = 0, this.tight = !1, this.ddIndent = -1, this.listIndent = -1, this.parentType = "root", this.level = 0, this.result = "", i = this.src, g = !1, s = l = f = d = 0, c = i.length; l < c; l++) {
    if (o = i.charCodeAt(l), !g)
      if (Hy(o)) {
        f++, o === 9 ? d += 4 - d % 4 : d++;
        continue;
      } else
        g = !0;
    (o === 10 || l === c - 1) && (o !== 10 && l++, this.bMarks.push(s), this.eMarks.push(l), this.tShift.push(f), this.sCount.push(d), this.bsCount.push(0), g = !1, f = 0, d = 0, s = l + 1);
  }
  this.bMarks.push(i.length), this.eMarks.push(i.length), this.tShift.push(0), this.sCount.push(0), this.bsCount.push(0), this.lineMax = this.bMarks.length - 1;
}
as.prototype.push = function(e, t, n) {
  var r = new V5(e, t, n);
  return r.block = !0, n < 0 && this.level--, r.level = this.level, n > 0 && this.level++, this.tokens.push(r), r;
};
as.prototype.isEmpty = function(t) {
  return this.bMarks[t] + this.tShift[t] >= this.eMarks[t];
};
as.prototype.skipEmptyLines = function(t) {
  for (var n = this.lineMax; t < n && !(this.bMarks[t] + this.tShift[t] < this.eMarks[t]); t++)
    ;
  return t;
};
as.prototype.skipSpaces = function(t) {
  for (var n, r = this.src.length; t < r && (n = this.src.charCodeAt(t), !!Hy(n)); t++)
    ;
  return t;
};
as.prototype.skipSpacesBack = function(t, n) {
  if (t <= n)
    return t;
  for (; t > n; )
    if (!Hy(this.src.charCodeAt(--t)))
      return t + 1;
  return t;
};
as.prototype.skipChars = function(t, n) {
  for (var r = this.src.length; t < r && this.src.charCodeAt(t) === n; t++)
    ;
  return t;
};
as.prototype.skipCharsBack = function(t, n, r) {
  if (t <= r)
    return t;
  for (; t > r; )
    if (n !== this.src.charCodeAt(--t))
      return t + 1;
  return t;
};
as.prototype.getLines = function(t, n, r, o) {
  var i, s, l, c, f, d, g, m = t;
  if (t >= n)
    return "";
  for (d = new Array(n - t), i = 0; m < n; m++, i++) {
    for (s = 0, g = c = this.bMarks[m], m + 1 < n || o ? f = this.eMarks[m] + 1 : f = this.eMarks[m]; c < f && s < r; ) {
      if (l = this.src.charCodeAt(c), Hy(l))
        l === 9 ? s += 4 - (s + this.bsCount[m]) % 4 : s++;
      else if (c - g < this.tShift[m])
        s++;
      else
        break;
      c++;
    }
    s > r ? d[i] = new Array(s - r + 1).join(" ") + this.src.slice(c, f) : d[i] = this.src.slice(c, f);
  }
  return d.join("");
};
as.prototype.Token = V5;
var zDe = as, HDe = rk, Sg = [
  // First 2 params - rule name & source. Secondary array - list of rules,
  // which can be terminated by this one.
  ["table", mDe, ["paragraph", "reference"]],
  ["code", gDe],
  ["fence", vDe, ["paragraph", "reference", "blockquote", "list"]],
  ["blockquote", yDe, ["paragraph", "reference", "blockquote", "list"]],
  ["hr", EDe, ["paragraph", "reference", "blockquote", "list"]],
  ["list", xDe, ["paragraph", "reference", "blockquote"]],
  ["reference", TDe],
  ["html_block", jDe, ["paragraph", "reference", "blockquote"]],
  ["heading", UDe, ["paragraph", "reference", "blockquote"]],
  ["lheading", BDe],
  ["paragraph", qDe]
];
function Wy() {
  this.ruler = new HDe();
  for (var e = 0; e < Sg.length; e++)
    this.ruler.push(Sg[e][0], Sg[e][1], { alt: (Sg[e][2] || []).slice() });
}
Wy.prototype.tokenize = function(e, t, n) {
  for (var r, o, i = this.ruler.getRules(""), s = i.length, l = t, c = !1, f = e.md.options.maxNesting; l < n && (e.line = l = e.skipEmptyLines(l), !(l >= n || e.sCount[l] < e.blkIndent)); ) {
    if (e.level >= f) {
      e.line = n;
      break;
    }
    for (o = 0; o < s && (r = i[o](e, l, n, !1), !r); o++)
      ;
    e.tight = !c, e.isEmpty(e.line - 1) && (c = !0), l = e.line, l < n && e.isEmpty(l) && (c = !0, l++, e.line = l);
  }
};
Wy.prototype.parse = function(e, t, n, r) {
  var o;
  e && (o = new this.State(e, t, n, r), this.tokenize(o, o.line, o.lineMax));
};
Wy.prototype.State = zDe;
var WDe = Wy;
function GDe(e) {
  switch (e) {
    case 10:
    case 33:
    case 35:
    case 36:
    case 37:
    case 38:
    case 42:
    case 43:
    case 45:
    case 58:
    case 60:
    case 61:
    case 62:
    case 64:
    case 91:
    case 92:
    case 93:
    case 94:
    case 95:
    case 96:
    case 123:
    case 125:
    case 126:
      return !0;
    default:
      return !1;
  }
}
var QDe = function(t, n) {
  for (var r = t.pos; r < t.posMax && !GDe(t.src.charCodeAt(r)); )
    r++;
  return r === t.pos ? !1 : (n || (t.pending += t.src.slice(t.pos, r)), t.pos = r, !0);
}, YDe = Ct.isSpace, KDe = function(t, n) {
  var r, o, i, s = t.pos;
  if (t.src.charCodeAt(s) !== 10)
    return !1;
  if (r = t.pending.length - 1, o = t.posMax, !n)
    if (r >= 0 && t.pending.charCodeAt(r) === 32)
      if (r >= 1 && t.pending.charCodeAt(r - 1) === 32) {
        for (i = r - 1; i >= 1 && t.pending.charCodeAt(i - 1) === 32; )
          i--;
        t.pending = t.pending.slice(0, i), t.push("hardbreak", "br", 0);
      } else
        t.pending = t.pending.slice(0, -1), t.push("softbreak", "br", 0);
    else
      t.push("softbreak", "br", 0);
  for (s++; s < o && YDe(t.src.charCodeAt(s)); )
    s++;
  return t.pos = s, !0;
}, JDe = Ct.isSpace, sk = [];
for (var cI = 0; cI < 256; cI++)
  sk.push(0);
"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e) {
  sk[e.charCodeAt(0)] = 1;
});
var XDe = function(t, n) {
  var r, o = t.pos, i = t.posMax;
  if (t.src.charCodeAt(o) !== 92)
    return !1;
  if (o++, o < i) {
    if (r = t.src.charCodeAt(o), r < 256 && sk[r] !== 0)
      return n || (t.pending += t.src[o]), t.pos += 2, !0;
    if (r === 10) {
      for (n || t.push("hardbreak", "br", 0), o++; o < i && (r = t.src.charCodeAt(o), !!JDe(r)); )
        o++;
      return t.pos = o, !0;
    }
  }
  return n || (t.pending += "\\"), t.pos++, !0;
}, ZDe = function(t, n) {
  var r, o, i, s, l, c, f, d, g = t.pos, m = t.src.charCodeAt(g);
  if (m !== 96)
    return !1;
  for (r = g, g++, o = t.posMax; g < o && t.src.charCodeAt(g) === 96; )
    g++;
  if (i = t.src.slice(r, g), f = i.length, t.backticksScanned && (t.backticks[f] || 0) <= r)
    return n || (t.pending += i), t.pos += f, !0;
  for (l = c = g; (l = t.src.indexOf("`", c)) !== -1; ) {
    for (c = l + 1; c < o && t.src.charCodeAt(c) === 96; )
      c++;
    if (d = c - l, d === f)
      return n || (s = t.push("code_inline", "code", 0), s.markup = i, s.content = t.src.slice(g, l).replace(/\n/g, " ").replace(/^ (.+) $/, "$1")), t.pos = c, !0;
    t.backticks[d] = l;
  }
  return t.backticksScanned = !0, n || (t.pending += i), t.pos += f, !0;
}, Gy = {};
Gy.tokenize = function(t, n) {
  var r, o, i, s, l, c = t.pos, f = t.src.charCodeAt(c);
  if (n || f !== 126 || (o = t.scanDelims(t.pos, !0), s = o.length, l = String.fromCharCode(f), s < 2))
    return !1;
  for (s % 2 && (i = t.push("text", "", 0), i.content = l, s--), r = 0; r < s; r += 2)
    i = t.push("text", "", 0), i.content = l + l, t.delimiters.push({
      marker: f,
      length: 0,
      // disable "rule of 3" length checks meant for emphasis
      token: t.tokens.length - 1,
      end: -1,
      open: o.can_open,
      close: o.can_close
    });
  return t.pos += o.length, !0;
};
function uI(e, t) {
  var n, r, o, i, s, l = [], c = t.length;
  for (n = 0; n < c; n++)
    o = t[n], o.marker === 126 && o.end !== -1 && (i = t[o.end], s = e.tokens[o.token], s.type = "s_open", s.tag = "s", s.nesting = 1, s.markup = "~~", s.content = "", s = e.tokens[i.token], s.type = "s_close", s.tag = "s", s.nesting = -1, s.markup = "~~", s.content = "", e.tokens[i.token - 1].type === "text" && e.tokens[i.token - 1].content === "~" && l.push(i.token - 1));
  for (; l.length; ) {
    for (n = l.pop(), r = n + 1; r < e.tokens.length && e.tokens[r].type === "s_close"; )
      r++;
    r--, n !== r && (s = e.tokens[r], e.tokens[r] = e.tokens[n], e.tokens[n] = s);
  }
}
Gy.postProcess = function(t) {
  var n, r = t.tokens_meta, o = t.tokens_meta.length;
  for (uI(t, t.delimiters), n = 0; n < o; n++)
    r[n] && r[n].delimiters && uI(t, r[n].delimiters);
};
var Qy = {};
Qy.tokenize = function(t, n) {
  var r, o, i, s = t.pos, l = t.src.charCodeAt(s);
  if (n || l !== 95 && l !== 42)
    return !1;
  for (o = t.scanDelims(t.pos, l === 42), r = 0; r < o.length; r++)
    i = t.push("text", "", 0), i.content = String.fromCharCode(l), t.delimiters.push({
      // Char code of the starting marker (number).
      //
      marker: l,
      // Total length of these series of delimiters.
      //
      length: o.length,
      // A position of the token this delimiter corresponds to.
      //
      token: t.tokens.length - 1,
      // If this delimiter is matched as a valid opener, `end` will be
      // equal to its position, otherwise it's `-1`.
      //
      end: -1,
      // Boolean flags that determine if this delimiter could open or close
      // an emphasis.
      //
      open: o.can_open,
      close: o.can_close
    });
  return t.pos += o.length, !0;
};
function fI(e, t) {
  var n, r, o, i, s, l, c = t.length;
  for (n = c - 1; n >= 0; n--)
    r = t[n], !(r.marker !== 95 && r.marker !== 42) && r.end !== -1 && (o = t[r.end], l = n > 0 && t[n - 1].end === r.end + 1 && // check that first two markers match and adjacent
    t[n - 1].marker === r.marker && t[n - 1].token === r.token - 1 && // check that last two markers are adjacent (we can safely assume they match)
    t[r.end + 1].token === o.token + 1, s = String.fromCharCode(r.marker), i = e.tokens[r.token], i.type = l ? "strong_open" : "em_open", i.tag = l ? "strong" : "em", i.nesting = 1, i.markup = l ? s + s : s, i.content = "", i = e.tokens[o.token], i.type = l ? "strong_close" : "em_close", i.tag = l ? "strong" : "em", i.nesting = -1, i.markup = l ? s + s : s, i.content = "", l && (e.tokens[t[n - 1].token].content = "", e.tokens[t[r.end + 1].token].content = "", n--));
}
Qy.postProcess = function(t) {
  var n, r = t.tokens_meta, o = t.tokens_meta.length;
  for (fI(t, t.delimiters), n = 0; n < o; n++)
    r[n] && r[n].delimiters && fI(t, r[n].delimiters);
};
var eIe = Ct.normalizeReference, pw = Ct.isSpace, tIe = function(t, n) {
  var r, o, i, s, l, c, f, d, g, m = "", v = "", b = t.pos, w = t.posMax, _ = t.pos, S = !0;
  if (t.src.charCodeAt(t.pos) !== 91 || (l = t.pos + 1, s = t.md.helpers.parseLinkLabel(t, t.pos, !0), s < 0))
    return !1;
  if (c = s + 1, c < w && t.src.charCodeAt(c) === 40) {
    for (S = !1, c++; c < w && (o = t.src.charCodeAt(c), !(!pw(o) && o !== 10)); c++)
      ;
    if (c >= w)
      return !1;
    if (_ = c, f = t.md.helpers.parseLinkDestination(t.src, c, t.posMax), f.ok) {
      for (m = t.md.normalizeLink(f.str), t.md.validateLink(m) ? c = f.pos : m = "", _ = c; c < w && (o = t.src.charCodeAt(c), !(!pw(o) && o !== 10)); c++)
        ;
      if (f = t.md.helpers.parseLinkTitle(t.src, c, t.posMax), c < w && _ !== c && f.ok)
        for (v = f.str, c = f.pos; c < w && (o = t.src.charCodeAt(c), !(!pw(o) && o !== 10)); c++)
          ;
    }
    (c >= w || t.src.charCodeAt(c) !== 41) && (S = !0), c++;
  }
  if (S) {
    if (typeof t.env.references > "u")
      return !1;
    if (c < w && t.src.charCodeAt(c) === 91 ? (_ = c + 1, c = t.md.helpers.parseLinkLabel(t, c), c >= 0 ? i = t.src.slice(_, c++) : c = s + 1) : c = s + 1, i || (i = t.src.slice(l, s)), d = t.env.references[eIe(i)], !d)
      return t.pos = b, !1;
    m = d.href, v = d.title;
  }
  return n || (t.pos = l, t.posMax = s, g = t.push("link_open", "a", 1), g.attrs = r = [["href", m]], v && r.push(["title", v]), t.md.inline.tokenize(t), g = t.push("link_close", "a", -1)), t.pos = c, t.posMax = w, !0;
}, nIe = Ct.normalizeReference, hw = Ct.isSpace, rIe = function(t, n) {
  var r, o, i, s, l, c, f, d, g, m, v, b, w, _ = "", S = t.pos, x = t.posMax;
  if (t.src.charCodeAt(t.pos) !== 33 || t.src.charCodeAt(t.pos + 1) !== 91 || (c = t.pos + 2, l = t.md.helpers.parseLinkLabel(t, t.pos + 1, !1), l < 0))
    return !1;
  if (f = l + 1, f < x && t.src.charCodeAt(f) === 40) {
    for (f++; f < x && (o = t.src.charCodeAt(f), !(!hw(o) && o !== 10)); f++)
      ;
    if (f >= x)
      return !1;
    for (w = f, g = t.md.helpers.parseLinkDestination(t.src, f, t.posMax), g.ok && (_ = t.md.normalizeLink(g.str), t.md.validateLink(_) ? f = g.pos : _ = ""), w = f; f < x && (o = t.src.charCodeAt(f), !(!hw(o) && o !== 10)); f++)
      ;
    if (g = t.md.helpers.parseLinkTitle(t.src, f, t.posMax), f < x && w !== f && g.ok)
      for (m = g.str, f = g.pos; f < x && (o = t.src.charCodeAt(f), !(!hw(o) && o !== 10)); f++)
        ;
    else
      m = "";
    if (f >= x || t.src.charCodeAt(f) !== 41)
      return t.pos = S, !1;
    f++;
  } else {
    if (typeof t.env.references > "u")
      return !1;
    if (f < x && t.src.charCodeAt(f) === 91 ? (w = f + 1, f = t.md.helpers.parseLinkLabel(t, f), f >= 0 ? s = t.src.slice(w, f++) : f = l + 1) : f = l + 1, s || (s = t.src.slice(c, l)), d = t.env.references[nIe(s)], !d)
      return t.pos = S, !1;
    _ = d.href, m = d.title;
  }
  return n || (i = t.src.slice(c, l), t.md.inline.parse(
    i,
    t.md,
    t.env,
    b = []
  ), v = t.push("image", "img", 0), v.attrs = r = [["src", _], ["alt", ""]], v.children = b, v.content = i, m && r.push(["title", m])), t.pos = f, t.posMax = x, !0;
}, oIe = /^([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/, iIe = /^([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)$/, sIe = function(t, n) {
  var r, o, i, s, l, c, f = t.pos;
  if (t.src.charCodeAt(f) !== 60)
    return !1;
  for (l = t.pos, c = t.posMax; ; ) {
    if (++f >= c || (s = t.src.charCodeAt(f), s === 60))
      return !1;
    if (s === 62)
      break;
  }
  return r = t.src.slice(l + 1, f), iIe.test(r) ? (o = t.md.normalizeLink(r), t.md.validateLink(o) ? (n || (i = t.push("link_open", "a", 1), i.attrs = [["href", o]], i.markup = "autolink", i.info = "auto", i = t.push("text", "", 0), i.content = t.md.normalizeLinkText(r), i = t.push("link_close", "a", -1), i.markup = "autolink", i.info = "auto"), t.pos += r.length + 2, !0) : !1) : oIe.test(r) ? (o = t.md.normalizeLink("mailto:" + r), t.md.validateLink(o) ? (n || (i = t.push("link_open", "a", 1), i.attrs = [["href", o]], i.markup = "autolink", i.info = "auto", i = t.push("text", "", 0), i.content = t.md.normalizeLinkText(r), i = t.push("link_close", "a", -1), i.markup = "autolink", i.info = "auto"), t.pos += r.length + 2, !0) : !1) : !1;
}, aIe = zy.HTML_TAG_RE;
function lIe(e) {
  var t = e | 32;
  return t >= 97 && t <= 122;
}
var cIe = function(t, n) {
  var r, o, i, s, l = t.pos;
  return !t.md.options.html || (i = t.posMax, t.src.charCodeAt(l) !== 60 || l + 2 >= i) || (r = t.src.charCodeAt(l + 1), r !== 33 && r !== 63 && r !== 47 && !lIe(r)) || (o = t.src.slice(l).match(aIe), !o) ? !1 : (n || (s = t.push("html_inline", "", 0), s.content = t.src.slice(l, l + o[0].length)), t.pos += o[0].length, !0);
}, dI = A5, uIe = Ct.has, fIe = Ct.isValidEntityCode, pI = Ct.fromCodePoint, dIe = /^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i, pIe = /^&([a-z][a-z0-9]{1,31});/i, hIe = function(t, n) {
  var r, o, i, s = t.pos, l = t.posMax;
  if (t.src.charCodeAt(s) !== 38)
    return !1;
  if (s + 1 < l) {
    if (r = t.src.charCodeAt(s + 1), r === 35) {
      if (i = t.src.slice(s).match(dIe), i)
        return n || (o = i[1][0].toLowerCase() === "x" ? parseInt(i[1].slice(1), 16) : parseInt(i[1], 10), t.pending += fIe(o) ? pI(o) : pI(65533)), t.pos += i[0].length, !0;
    } else if (i = t.src.slice(s).match(pIe), i && uIe(dI, i[1]))
      return n || (t.pending += dI[i[1]]), t.pos += i[0].length, !0;
  }
  return n || (t.pending += "&"), t.pos++, !0;
};
function hI(e, t) {
  var n, r, o, i, s, l, c, f, d = {}, g = t.length;
  if (g) {
    var m = 0, v = -2, b = [];
    for (n = 0; n < g; n++)
      if (o = t[n], b.push(0), (t[m].marker !== o.marker || v !== o.token - 1) && (m = n), v = o.token, o.length = o.length || 0, !!o.close) {
        for (d.hasOwnProperty(o.marker) || (d[o.marker] = [-1, -1, -1, -1, -1, -1]), s = d[o.marker][(o.open ? 3 : 0) + o.length % 3], r = m - b[m] - 1, l = r; r > s; r -= b[r] + 1)
          if (i = t[r], i.marker === o.marker && i.open && i.end < 0 && (c = !1, (i.close || o.open) && (i.length + o.length) % 3 === 0 && (i.length % 3 !== 0 || o.length % 3 !== 0) && (c = !0), !c)) {
            f = r > 0 && !t[r - 1].open ? b[r - 1] + 1 : 0, b[n] = n - r + f, b[r] = f, o.open = !1, i.end = n, i.close = !1, l = -1, v = -2;
            break;
          }
        l !== -1 && (d[o.marker][(o.open ? 3 : 0) + (o.length || 0) % 3] = l);
      }
  }
}
var mIe = function(t) {
  var n, r = t.tokens_meta, o = t.tokens_meta.length;
  for (hI(t, t.delimiters), n = 0; n < o; n++)
    r[n] && r[n].delimiters && hI(t, r[n].delimiters);
}, gIe = function(t) {
  var n, r, o = 0, i = t.tokens, s = t.tokens.length;
  for (n = r = 0; n < s; n++)
    i[n].nesting < 0 && o--, i[n].level = o, i[n].nesting > 0 && o++, i[n].type === "text" && n + 1 < s && i[n + 1].type === "text" ? i[n + 1].content = i[n].content + i[n + 1].content : (n !== r && (i[r] = i[n]), r++);
  n !== r && (i.length = r);
}, ak = ok, mI = Ct.isWhiteSpace, gI = Ct.isPunctChar, vI = Ct.isMdAsciiPunct;
function Dh(e, t, n, r) {
  this.src = e, this.env = n, this.md = t, this.tokens = r, this.tokens_meta = Array(r.length), this.pos = 0, this.posMax = this.src.length, this.level = 0, this.pending = "", this.pendingLevel = 0, this.cache = {}, this.delimiters = [], this._prev_delimiters = [], this.backticks = {}, this.backticksScanned = !1;
}
Dh.prototype.pushPending = function() {
  var e = new ak("text", "", 0);
  return e.content = this.pending, e.level = this.pendingLevel, this.tokens.push(e), this.pending = "", e;
};
Dh.prototype.push = function(e, t, n) {
  this.pending && this.pushPending();
  var r = new ak(e, t, n), o = null;
  return n < 0 && (this.level--, this.delimiters = this._prev_delimiters.pop()), r.level = this.level, n > 0 && (this.level++, this._prev_delimiters.push(this.delimiters), this.delimiters = [], o = { delimiters: this.delimiters }), this.pendingLevel = this.level, this.tokens.push(r), this.tokens_meta.push(o), r;
};
Dh.prototype.scanDelims = function(e, t) {
  var n = e, r, o, i, s, l, c, f, d, g, m = !0, v = !0, b = this.posMax, w = this.src.charCodeAt(e);
  for (r = e > 0 ? this.src.charCodeAt(e - 1) : 32; n < b && this.src.charCodeAt(n) === w; )
    n++;
  return i = n - e, o = n < b ? this.src.charCodeAt(n) : 32, f = vI(r) || gI(String.fromCharCode(r)), g = vI(o) || gI(String.fromCharCode(o)), c = mI(r), d = mI(o), d ? m = !1 : g && (c || f || (m = !1)), c ? v = !1 : f && (d || g || (v = !1)), t ? (s = m, l = v) : (s = m && (!v || f), l = v && (!m || g)), {
    can_open: s,
    can_close: l,
    length: i
  };
};
Dh.prototype.Token = ak;
var vIe = Dh, yI = rk, mw = [
  ["text", QDe],
  ["newline", KDe],
  ["escape", XDe],
  ["backticks", ZDe],
  ["strikethrough", Gy.tokenize],
  ["emphasis", Qy.tokenize],
  ["link", tIe],
  ["image", rIe],
  ["autolink", sIe],
  ["html_inline", cIe],
  ["entity", hIe]
], gw = [
  ["balance_pairs", mIe],
  ["strikethrough", Gy.postProcess],
  ["emphasis", Qy.postProcess],
  ["text_collapse", gIe]
];
function Ih() {
  var e;
  for (this.ruler = new yI(), e = 0; e < mw.length; e++)
    this.ruler.push(mw[e][0], mw[e][1]);
  for (this.ruler2 = new yI(), e = 0; e < gw.length; e++)
    this.ruler2.push(gw[e][0], gw[e][1]);
}
Ih.prototype.skipToken = function(e) {
  var t, n, r = e.pos, o = this.ruler.getRules(""), i = o.length, s = e.md.options.maxNesting, l = e.cache;
  if (typeof l[r] < "u") {
    e.pos = l[r];
    return;
  }
  if (e.level < s)
    for (n = 0; n < i && (e.level++, t = o[n](e, !0), e.level--, !t); n++)
      ;
  else
    e.pos = e.posMax;
  t || e.pos++, l[r] = e.pos;
};
Ih.prototype.tokenize = function(e) {
  for (var t, n, r = this.ruler.getRules(""), o = r.length, i = e.posMax, s = e.md.options.maxNesting; e.pos < i; ) {
    if (e.level < s)
      for (n = 0; n < o && (t = r[n](e, !1), !t); n++)
        ;
    if (t) {
      if (e.pos >= i)
        break;
      continue;
    }
    e.pending += e.src[e.pos++];
  }
  e.pending && e.pushPending();
};
Ih.prototype.parse = function(e, t, n, r) {
  var o, i, s, l = new this.State(e, t, n, r);
  for (this.tokenize(l), i = this.ruler2.getRules(""), s = i.length, o = 0; o < s; o++)
    i[o](l);
};
Ih.prototype.State = vIe;
var yIe = Ih, vw, bI;
function bIe() {
  return bI || (bI = 1, vw = function(e) {
    var t = {};
    t.src_Any = D5().source, t.src_Cc = I5().source, t.src_Z = L5().source, t.src_P = nk.source, t.src_ZPCc = [t.src_Z, t.src_P, t.src_Cc].join("|"), t.src_ZCc = [t.src_Z, t.src_Cc].join("|");
    var n = "[><|]";
    return t.src_pseudo_letter = "(?:(?!" + n + "|" + t.src_ZPCc + ")" + t.src_Any + ")", t.src_ip4 = "(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)", t.src_auth = "(?:(?:(?!" + t.src_ZCc + "|[@/\\[\\]()]).)+@)?", t.src_port = "(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?", t.src_host_terminator = "(?=$|" + n + "|" + t.src_ZPCc + ")(?!-|_|:\\d|\\.-|\\.(?!$|" + t.src_ZPCc + "))", t.src_path = "(?:[/?#](?:(?!" + t.src_ZCc + "|" + n + `|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!` + t.src_ZCc + "|\\]).)*\\]|\\((?:(?!" + t.src_ZCc + "|[)]).)*\\)|\\{(?:(?!" + t.src_ZCc + '|[}]).)*\\}|\\"(?:(?!' + t.src_ZCc + `|["]).)+\\"|\\'(?:(?!` + t.src_ZCc + "|[']).)+\\'|\\'(?=" + t.src_pseudo_letter + "|[-]).|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!" + t.src_ZCc + "|[.]).|" + (e && e["---"] ? "\\-(?!--(?:[^-]|$))(?:-*)|" : "\\-+|") + ",(?!" + t.src_ZCc + ").|;(?!" + t.src_ZCc + ").|\\!+(?!" + t.src_ZCc + "|[!]).|\\?(?!" + t.src_ZCc + "|[?]).)+|\\/)?", t.src_email_name = '[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*', t.src_xn = "xn--[a-z0-9\\-]{1,59}", t.src_domain_root = // Allow letters & digits (http://test1)
    "(?:" + t.src_xn + "|" + t.src_pseudo_letter + "{1,63})", t.src_domain = "(?:" + t.src_xn + "|(?:" + t.src_pseudo_letter + ")|(?:" + t.src_pseudo_letter + "(?:-|" + t.src_pseudo_letter + "){0,61}" + t.src_pseudo_letter + "))", t.src_host = "(?:(?:(?:(?:" + t.src_domain + ")\\.)*" + t.src_domain + "))", t.tpl_host_fuzzy = "(?:" + t.src_ip4 + "|(?:(?:(?:" + t.src_domain + ")\\.)+(?:%TLDS%)))", t.tpl_host_no_ip_fuzzy = "(?:(?:(?:" + t.src_domain + ")\\.)+(?:%TLDS%))", t.src_host_strict = t.src_host + t.src_host_terminator, t.tpl_host_fuzzy_strict = t.tpl_host_fuzzy + t.src_host_terminator, t.src_host_port_strict = t.src_host + t.src_port + t.src_host_terminator, t.tpl_host_port_fuzzy_strict = t.tpl_host_fuzzy + t.src_port + t.src_host_terminator, t.tpl_host_port_no_ip_fuzzy_strict = t.tpl_host_no_ip_fuzzy + t.src_port + t.src_host_terminator, t.tpl_host_fuzzy_test = "localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:" + t.src_ZPCc + "|>|$))", t.tpl_email_fuzzy = "(^|" + n + '|"|\\(|' + t.src_ZCc + ")(" + t.src_email_name + "@" + t.tpl_host_fuzzy_strict + ")", t.tpl_link_fuzzy = // Fuzzy link can't be prepended with .:/\- and non punctuation.
    // but can start with > (markdown blockquote)
    "(^|(?![.:/\\-_@])(?:[$+<=>^`||]|" + t.src_ZPCc + "))((?![$+<=>^`||])" + t.tpl_host_port_fuzzy_strict + t.src_path + ")", t.tpl_link_no_ip_fuzzy = // Fuzzy link can't be prepended with .:/\- and non punctuation.
    // but can start with > (markdown blockquote)
    "(^|(?![.:/\\-_@])(?:[$+<=>^`||]|" + t.src_ZPCc + "))((?![$+<=>^`||])" + t.tpl_host_port_no_ip_fuzzy_strict + t.src_path + ")", t;
  }), vw;
}
function bS(e) {
  var t = Array.prototype.slice.call(arguments, 1);
  return t.forEach(function(n) {
    n && Object.keys(n).forEach(function(r) {
      e[r] = n[r];
    });
  }), e;
}
function Yy(e) {
  return Object.prototype.toString.call(e);
}
function EIe(e) {
  return Yy(e) === "[object String]";
}
function wIe(e) {
  return Yy(e) === "[object Object]";
}
function xIe(e) {
  return Yy(e) === "[object RegExp]";
}
function EI(e) {
  return Yy(e) === "[object Function]";
}
function SIe(e) {
  return e.replace(/[.?*+^$[\]\\(){}|-]/g, "\\$&");
}
var j5 = {
  fuzzyLink: !0,
  fuzzyEmail: !0,
  fuzzyIP: !1
};
function TIe(e) {
  return Object.keys(e || {}).reduce(function(t, n) {
    return t || j5.hasOwnProperty(n);
  }, !1);
}
var CIe = {
  "http:": {
    validate: function(e, t, n) {
      var r = e.slice(t);
      return n.re.http || (n.re.http = new RegExp(
        "^\\/\\/" + n.re.src_auth + n.re.src_host_port_strict + n.re.src_path,
        "i"
      )), n.re.http.test(r) ? r.match(n.re.http)[0].length : 0;
    }
  },
  "https:": "http:",
  "ftp:": "http:",
  "//": {
    validate: function(e, t, n) {
      var r = e.slice(t);
      return n.re.no_http || (n.re.no_http = new RegExp(
        "^" + n.re.src_auth + // Don't allow single-level domains, because of false positives like '//test'
        // with code comments
        "(?:localhost|(?:(?:" + n.re.src_domain + ")\\.)+" + n.re.src_domain_root + ")" + n.re.src_port + n.re.src_host_terminator + n.re.src_path,
        "i"
      )), n.re.no_http.test(r) ? t >= 3 && e[t - 3] === ":" || t >= 3 && e[t - 3] === "/" ? 0 : r.match(n.re.no_http)[0].length : 0;
    }
  },
  "mailto:": {
    validate: function(e, t, n) {
      var r = e.slice(t);
      return n.re.mailto || (n.re.mailto = new RegExp(
        "^" + n.re.src_email_name + "@" + n.re.src_host_strict,
        "i"
      )), n.re.mailto.test(r) ? r.match(n.re.mailto)[0].length : 0;
    }
  }
}, kIe = "a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]", _Ie = "biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");
function NIe(e) {
  e.__index__ = -1, e.__text_cache__ = "";
}
function OIe(e) {
  return function(t, n) {
    var r = t.slice(n);
    return e.test(r) ? r.match(e)[0].length : 0;
  };
}
function wI() {
  return function(e, t) {
    t.normalize(e);
  };
}
function d0(e) {
  var t = e.re = bIe()(e.__opts__), n = e.__tlds__.slice();
  e.onCompile(), e.__tlds_replaced__ || n.push(kIe), n.push(t.src_xn), t.src_tlds = n.join("|");
  function r(l) {
    return l.replace("%TLDS%", t.src_tlds);
  }
  t.email_fuzzy = RegExp(r(t.tpl_email_fuzzy), "i"), t.link_fuzzy = RegExp(r(t.tpl_link_fuzzy), "i"), t.link_no_ip_fuzzy = RegExp(r(t.tpl_link_no_ip_fuzzy), "i"), t.host_fuzzy_test = RegExp(r(t.tpl_host_fuzzy_test), "i");
  var o = [];
  e.__compiled__ = {};
  function i(l, c) {
    throw new Error('(LinkifyIt) Invalid schema "' + l + '": ' + c);
  }
  Object.keys(e.__schemas__).forEach(function(l) {
    var c = e.__schemas__[l];
    if (c !== null) {
      var f = { validate: null, link: null };
      if (e.__compiled__[l] = f, wIe(c)) {
        xIe(c.validate) ? f.validate = OIe(c.validate) : EI(c.validate) ? f.validate = c.validate : i(l, c), EI(c.normalize) ? f.normalize = c.normalize : c.normalize ? i(l, c) : f.normalize = wI();
        return;
      }
      if (EIe(c)) {
        o.push(l);
        return;
      }
      i(l, c);
    }
  }), o.forEach(function(l) {
    e.__compiled__[e.__schemas__[l]] && (e.__compiled__[l].validate = e.__compiled__[e.__schemas__[l]].validate, e.__compiled__[l].normalize = e.__compiled__[e.__schemas__[l]].normalize);
  }), e.__compiled__[""] = { validate: null, normalize: wI() };
  var s = Object.keys(e.__compiled__).filter(function(l) {
    return l.length > 0 && e.__compiled__[l];
  }).map(SIe).join("|");
  e.re.schema_test = RegExp("(^|(?!_)(?:[><|]|" + t.src_ZPCc + "))(" + s + ")", "i"), e.re.schema_search = RegExp("(^|(?!_)(?:[><|]|" + t.src_ZPCc + "))(" + s + ")", "ig"), e.re.pretest = RegExp(
    "(" + e.re.schema_test.source + ")|(" + e.re.host_fuzzy_test.source + ")|@",
    "i"
  ), NIe(e);
}
function AIe(e, t) {
  var n = e.__index__, r = e.__last_index__, o = e.__text_cache__.slice(n, r);
  this.schema = e.__schema__.toLowerCase(), this.index = n + t, this.lastIndex = r + t, this.raw = o, this.text = o, this.url = o;
}
function xI(e, t) {
  var n = new AIe(e, t);
  return e.__compiled__[n.schema].normalize(n, e), n;
}
function oi(e, t) {
  if (!(this instanceof oi))
    return new oi(e, t);
  t || TIe(e) && (t = e, e = {}), this.__opts__ = bS({}, j5, t), this.__index__ = -1, this.__last_index__ = -1, this.__schema__ = "", this.__text_cache__ = "", this.__schemas__ = bS({}, CIe, e), this.__compiled__ = {}, this.__tlds__ = _Ie, this.__tlds_replaced__ = !1, this.re = {}, d0(this);
}
oi.prototype.add = function(t, n) {
  return this.__schemas__[t] = n, d0(this), this;
};
oi.prototype.set = function(t) {
  return this.__opts__ = bS(this.__opts__, t), this;
};
oi.prototype.test = function(t) {
  if (this.__text_cache__ = t, this.__index__ = -1, !t.length)
    return !1;
  var n, r, o, i, s, l, c, f, d;
  if (this.re.schema_test.test(t)) {
    for (c = this.re.schema_search, c.lastIndex = 0; (n = c.exec(t)) !== null; )
      if (i = this.testSchemaAt(t, n[2], c.lastIndex), i) {
        this.__schema__ = n[2], this.__index__ = n.index + n[1].length, this.__last_index__ = n.index + n[0].length + i;
        break;
      }
  }
  return this.__opts__.fuzzyLink && this.__compiled__["http:"] && (f = t.search(this.re.host_fuzzy_test), f >= 0 && (this.__index__ < 0 || f < this.__index__) && (r = t.match(this.__opts__.fuzzyIP ? this.re.link_fuzzy : this.re.link_no_ip_fuzzy)) !== null && (s = r.index + r[1].length, (this.__index__ < 0 || s < this.__index__) && (this.__schema__ = "", this.__index__ = s, this.__last_index__ = r.index + r[0].length))), this.__opts__.fuzzyEmail && this.__compiled__["mailto:"] && (d = t.indexOf("@"), d >= 0 && (o = t.match(this.re.email_fuzzy)) !== null && (s = o.index + o[1].length, l = o.index + o[0].length, (this.__index__ < 0 || s < this.__index__ || s === this.__index__ && l > this.__last_index__) && (this.__schema__ = "mailto:", this.__index__ = s, this.__last_index__ = l))), this.__index__ >= 0;
};
oi.prototype.pretest = function(t) {
  return this.re.pretest.test(t);
};
oi.prototype.testSchemaAt = function(t, n, r) {
  return this.__compiled__[n.toLowerCase()] ? this.__compiled__[n.toLowerCase()].validate(t, r, this) : 0;
};
oi.prototype.match = function(t) {
  var n = 0, r = [];
  this.__index__ >= 0 && this.__text_cache__ === t && (r.push(xI(this, n)), n = this.__last_index__);
  for (var o = n ? t.slice(n) : t; this.test(o); )
    r.push(xI(this, n)), o = o.slice(this.__last_index__), n += this.__last_index__;
  return r.length ? r : null;
};
oi.prototype.tlds = function(t, n) {
  return t = Array.isArray(t) ? t : [t], n ? (this.__tlds__ = this.__tlds__.concat(t).sort().filter(function(r, o, i) {
    return r !== i[o - 1];
  }).reverse(), d0(this), this) : (this.__tlds__ = t.slice(), this.__tlds_replaced__ = !0, d0(this), this);
};
oi.prototype.normalize = function(t) {
  t.schema || (t.url = "http://" + t.url), t.schema === "mailto:" && !/^mailto:/i.test(t.url) && (t.url = "mailto:" + t.url);
};
oi.prototype.onCompile = function() {
};
var DIe = oi, p0 = { exports: {} };
/*! https://mths.be/punycode v1.3.2 by @mathias */
p0.exports;
(function(e, t) {
  (function(n) {
    var r = t && !t.nodeType && t, o = e && !e.nodeType && e, i = typeof Qd == "object" && Qd;
    (i.global === i || i.window === i || i.self === i) && (n = i);
    var s, l = 2147483647, c = 36, f = 1, d = 26, g = 38, m = 700, v = 72, b = 128, w = "-", _ = /^xn--/, S = /[^\x20-\x7E]/, x = /[\x2E\u3002\uFF0E\uFF61]/g, C = {
      overflow: "Overflow: input needs wider integers to process",
      "not-basic": "Illegal input >= 0x80 (not a basic code point)",
      "invalid-input": "Invalid input"
    }, E = c - f, N = Math.floor, I = String.fromCharCode, D;
    function A(Z) {
      throw RangeError(C[Z]);
    }
    function F(Z, re) {
      for (var J = Z.length, ie = []; J--; )
        ie[J] = re(Z[J]);
      return ie;
    }
    function $(Z, re) {
      var J = Z.split("@"), ie = "";
      J.length > 1 && (ie = J[0] + "@", Z = J[1]), Z = Z.replace(x, ".");
      var ne = Z.split("."), ae = F(ne, re).join(".");
      return ie + ae;
    }
    function q(Z) {
      for (var re = [], J = 0, ie = Z.length, ne, ae; J < ie; )
        ne = Z.charCodeAt(J++), ne >= 55296 && ne <= 56319 && J < ie ? (ae = Z.charCodeAt(J++), (ae & 64512) == 56320 ? re.push(((ne & 1023) << 10) + (ae & 1023) + 65536) : (re.push(ne), J--)) : re.push(ne);
      return re;
    }
    function H(Z) {
      return F(Z, function(re) {
        var J = "";
        return re > 65535 && (re -= 65536, J += I(re >>> 10 & 1023 | 55296), re = 56320 | re & 1023), J += I(re), J;
      }).join("");
    }
    function z(Z) {
      return Z - 48 < 10 ? Z - 22 : Z - 65 < 26 ? Z - 65 : Z - 97 < 26 ? Z - 97 : c;
    }
    function B(Z, re) {
      return Z + 22 + 75 * (Z < 26) - ((re != 0) << 5);
    }
    function R(Z, re, J) {
      var ie = 0;
      for (Z = J ? N(Z / m) : Z >> 1, Z += N(Z / re); Z > E * d >> 1; ie += c)
        Z = N(Z / E);
      return N(ie + (E + 1) * Z / (Z + g));
    }
    function te(Z) {
      var re = [], J = Z.length, ie, ne = 0, ae = b, le = v, de, xe, ge, qe, Ie, Oe, ot, Nt, Ve;
      for (de = Z.lastIndexOf(w), de < 0 && (de = 0), xe = 0; xe < de; ++xe)
        Z.charCodeAt(xe) >= 128 && A("not-basic"), re.push(Z.charCodeAt(xe));
      for (ge = de > 0 ? de + 1 : 0; ge < J; ) {
        for (qe = ne, Ie = 1, Oe = c; ge >= J && A("invalid-input"), ot = z(Z.charCodeAt(ge++)), (ot >= c || ot > N((l - ne) / Ie)) && A("overflow"), ne += ot * Ie, Nt = Oe <= le ? f : Oe >= le + d ? d : Oe - le, !(ot < Nt); Oe += c)
          Ve = c - Nt, Ie > N(l / Ve) && A("overflow"), Ie *= Ve;
        ie = re.length + 1, le = R(ne - qe, ie, qe == 0), N(ne / ie) > l - ae && A("overflow"), ae += N(ne / ie), ne %= ie, re.splice(ne++, 0, ae);
      }
      return H(re);
    }
    function Q(Z) {
      var re, J, ie, ne, ae, le, de, xe, ge, qe, Ie, Oe = [], ot, Nt, Ve, At;
      for (Z = q(Z), ot = Z.length, re = b, J = 0, ae = v, le = 0; le < ot; ++le)
        Ie = Z[le], Ie < 128 && Oe.push(I(Ie));
      for (ie = ne = Oe.length, ne && Oe.push(w); ie < ot; ) {
        for (de = l, le = 0; le < ot; ++le)
          Ie = Z[le], Ie >= re && Ie < de && (de = Ie);
        for (Nt = ie + 1, de - re > N((l - J) / Nt) && A("overflow"), J += (de - re) * Nt, re = de, le = 0; le < ot; ++le)
          if (Ie = Z[le], Ie < re && ++J > l && A("overflow"), Ie == re) {
            for (xe = J, ge = c; qe = ge <= ae ? f : ge >= ae + d ? d : ge - ae, !(xe < qe); ge += c)
              At = xe - qe, Ve = c - qe, Oe.push(
                I(B(qe + At % Ve, 0))
              ), xe = N(At / Ve);
            Oe.push(I(B(xe, 0))), ae = R(J, Nt, ie == ne), J = 0, ++ie;
          }
        ++J, ++re;
      }
      return Oe.join("");
    }
    function Y(Z) {
      return $(Z, function(re) {
        return _.test(re) ? te(re.slice(4).toLowerCase()) : re;
      });
    }
    function K(Z) {
      return $(Z, function(re) {
        return S.test(re) ? "xn--" + Q(re) : re;
      });
    }
    if (s = {
      /**
       * A string representing the current Punycode.js version number.
       * @memberOf punycode
       * @type String
       */
      version: "1.3.2",
      /**
       * An object of methods to convert from JavaScript's internal character
       * representation (UCS-2) to Unicode code points, and back.
       * @see <https://mathiasbynens.be/notes/javascript-encoding>
       * @memberOf punycode
       * @type Object
       */
      ucs2: {
        decode: q,
        encode: H
      },
      decode: te,
      encode: Q,
      toASCII: K,
      toUnicode: Y
    }, r && o)
      if (e.exports == r)
        o.exports = s;
      else
        for (D in s)
          s.hasOwnProperty(D) && (r[D] = s[D]);
    else
      n.punycode = s;
  })(Qd);
})(p0, p0.exports);
var IIe = p0.exports, LIe = {
  options: {
    html: !1,
    // Enable HTML tags in source
    xhtmlOut: !1,
    // Use '/' to close single tags (<br />)
    breaks: !1,
    // Convert '\n' in paragraphs into <br>
    langPrefix: "language-",
    // CSS language prefix for fenced blocks
    linkify: !1,
    // autoconvert URL-like texts to links
    // Enable some language-neutral replacements + quotes beautification
    typographer: !1,
    // Double + single quotes replacement pairs, when typographer enabled,
    // and smartquotes on. Could be either a String or an Array.
    //
    // For example, you can use '«»„“' for Russian, '„“‚‘' for German,
    // and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp).
    quotes: "“”‘’",
    /* “”‘’ */
    // Highlighter function. Should return escaped HTML,
    // or '' if the source string is not changed and should be escaped externaly.
    // If result starts with <pre... internal wrapper is skipped.
    //
    // function (/*str, lang*/) { return ''; }
    //
    highlight: null,
    maxNesting: 100
    // Internal protection, recursion limit
  },
  components: {
    core: {},
    block: {},
    inline: {}
  }
}, RIe = {
  options: {
    html: !1,
    // Enable HTML tags in source
    xhtmlOut: !1,
    // Use '/' to close single tags (<br />)
    breaks: !1,
    // Convert '\n' in paragraphs into <br>
    langPrefix: "language-",
    // CSS language prefix for fenced blocks
    linkify: !1,
    // autoconvert URL-like texts to links
    // Enable some language-neutral replacements + quotes beautification
    typographer: !1,
    // Double + single quotes replacement pairs, when typographer enabled,
    // and smartquotes on. Could be either a String or an Array.
    //
    // For example, you can use '«»„“' for Russian, '„“‚‘' for German,
    // and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp).
    quotes: "“”‘’",
    /* “”‘’ */
    // Highlighter function. Should return escaped HTML,
    // or '' if the source string is not changed and should be escaped externaly.
    // If result starts with <pre... internal wrapper is skipped.
    //
    // function (/*str, lang*/) { return ''; }
    //
    highlight: null,
    maxNesting: 20
    // Internal protection, recursion limit
  },
  components: {
    core: {
      rules: [
        "normalize",
        "block",
        "inline"
      ]
    },
    block: {
      rules: [
        "paragraph"
      ]
    },
    inline: {
      rules: [
        "text"
      ],
      rules2: [
        "balance_pairs",
        "text_collapse"
      ]
    }
  }
}, FIe = {
  options: {
    html: !0,
    // Enable HTML tags in source
    xhtmlOut: !0,
    // Use '/' to close single tags (<br />)
    breaks: !1,
    // Convert '\n' in paragraphs into <br>
    langPrefix: "language-",
    // CSS language prefix for fenced blocks
    linkify: !1,
    // autoconvert URL-like texts to links
    // Enable some language-neutral replacements + quotes beautification
    typographer: !1,
    // Double + single quotes replacement pairs, when typographer enabled,
    // and smartquotes on. Could be either a String or an Array.
    //
    // For example, you can use '«»„“' for Russian, '„“‚‘' for German,
    // and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp).
    quotes: "“”‘’",
    /* “”‘’ */
    // Highlighter function. Should return escaped HTML,
    // or '' if the source string is not changed and should be escaped externaly.
    // If result starts with <pre... internal wrapper is skipped.
    //
    // function (/*str, lang*/) { return ''; }
    //
    highlight: null,
    maxNesting: 20
    // Internal protection, recursion limit
  },
  components: {
    core: {
      rules: [
        "normalize",
        "block",
        "inline"
      ]
    },
    block: {
      rules: [
        "blockquote",
        "code",
        "fence",
        "heading",
        "hr",
        "html_block",
        "lheading",
        "list",
        "reference",
        "paragraph"
      ]
    },
    inline: {
      rules: [
        "autolink",
        "backticks",
        "emphasis",
        "entity",
        "escape",
        "html_inline",
        "image",
        "link",
        "newline",
        "text"
      ],
      rules2: [
        "balance_pairs",
        "emphasis",
        "text_collapse"
      ]
    }
  }
}, sp = Ct, MIe = qy, PIe = HAe, $Ie = hDe, VIe = WDe, jIe = yIe, UIe = DIe, Zl = Ff, U5 = IIe, BIe = {
  default: LIe,
  zero: RIe,
  commonmark: FIe
}, qIe = /^(vbscript|javascript|file|data):/, zIe = /^data:image\/(gif|png|jpeg|webp);/;
function HIe(e) {
  var t = e.trim().toLowerCase();
  return qIe.test(t) ? !!zIe.test(t) : !0;
}
var B5 = ["http:", "https:", "mailto:"];
function WIe(e) {
  var t = Zl.parse(e, !0);
  if (t.hostname && (!t.protocol || B5.indexOf(t.protocol) >= 0))
    try {
      t.hostname = U5.toASCII(t.hostname);
    } catch {
    }
  return Zl.encode(Zl.format(t));
}
function GIe(e) {
  var t = Zl.parse(e, !0);
  if (t.hostname && (!t.protocol || B5.indexOf(t.protocol) >= 0))
    try {
      t.hostname = U5.toUnicode(t.hostname);
    } catch {
    }
  return Zl.decode(Zl.format(t), Zl.decode.defaultChars + "%");
}
function ii(e, t) {
  if (!(this instanceof ii))
    return new ii(e, t);
  t || sp.isString(e) || (t = e || {}, e = "default"), this.inline = new jIe(), this.block = new VIe(), this.core = new $Ie(), this.renderer = new PIe(), this.linkify = new UIe(), this.validateLink = HIe, this.normalizeLink = WIe, this.normalizeLinkText = GIe, this.utils = sp, this.helpers = sp.assign({}, MIe), this.options = {}, this.configure(e), t && this.set(t);
}
ii.prototype.set = function(e) {
  return sp.assign(this.options, e), this;
};
ii.prototype.configure = function(e) {
  var t = this, n;
  if (sp.isString(e) && (n = e, e = BIe[n], !e))
    throw new Error('Wrong `markdown-it` preset "' + n + '", check name');
  if (!e)
    throw new Error("Wrong `markdown-it` preset, can't be empty");
  return e.options && t.set(e.options), e.components && Object.keys(e.components).forEach(function(r) {
    e.components[r].rules && t[r].ruler.enableOnly(e.components[r].rules), e.components[r].rules2 && t[r].ruler2.enableOnly(e.components[r].rules2);
  }), this;
};
ii.prototype.enable = function(e, t) {
  var n = [];
  Array.isArray(e) || (e = [e]), ["core", "block", "inline"].forEach(function(o) {
    n = n.concat(this[o].ruler.enable(e, !0));
  }, this), n = n.concat(this.inline.ruler2.enable(e, !0));
  var r = e.filter(function(o) {
    return n.indexOf(o) < 0;
  });
  if (r.length && !t)
    throw new Error("MarkdownIt. Failed to enable unknown rule(s): " + r);
  return this;
};
ii.prototype.disable = function(e, t) {
  var n = [];
  Array.isArray(e) || (e = [e]), ["core", "block", "inline"].forEach(function(o) {
    n = n.concat(this[o].ruler.disable(e, !0));
  }, this), n = n.concat(this.inline.ruler2.disable(e, !0));
  var r = e.filter(function(o) {
    return n.indexOf(o) < 0;
  });
  if (r.length && !t)
    throw new Error("MarkdownIt. Failed to disable unknown rule(s): " + r);
  return this;
};
ii.prototype.use = function(e) {
  var t = [this].concat(Array.prototype.slice.call(arguments, 1));
  return e.apply(e, t), this;
};
ii.prototype.parse = function(e, t) {
  if (typeof e != "string")
    throw new Error("Input data should be a String");
  var n = new this.core.State(e, this, t);
  return this.core.process(n), n.tokens;
};
ii.prototype.render = function(e, t) {
  return t = t || {}, this.renderer.render(this.parse(e, t), this.options, t);
};
ii.prototype.parseInline = function(e, t) {
  var n = new this.core.State(e, this, t);
  return n.inlineMode = !0, this.core.process(n), n.tokens;
};
ii.prototype.renderInline = function(e, t) {
  return t = t || {}, this.renderer.render(this.parseInline(e, t), this.options, t);
};
var QIe = ii, YIe = QIe;
const KIe = /* @__PURE__ */ is(YIe);
var JIe = "production", q5 = typeof process > "u" || process.env === void 0 ? JIe : "production", ws = function(e) {
  return {
    isEnabled: function(t) {
      return e.some(function(n) {
        return !!t[n];
      });
    }
  };
}, Qp = {
  measureLayout: ws(["layout", "layoutId", "drag"]),
  animation: ws([
    "animate",
    "exit",
    "variants",
    "whileHover",
    "whileTap",
    "whileFocus",
    "whileDrag",
    "whileInView"
  ]),
  exit: ws(["exit"]),
  drag: ws(["drag", "dragControls"]),
  focus: ws(["whileFocus"]),
  hover: ws(["whileHover", "onHoverStart", "onHoverEnd"]),
  tap: ws(["whileTap", "onTap", "onTapStart", "onTapCancel"]),
  pan: ws([
    "onPan",
    "onPanStart",
    "onPanSessionStart",
    "onPanEnd"
  ]),
  inView: ws([
    "whileInView",
    "onViewportEnter",
    "onViewportLeave"
  ])
};
function XIe(e) {
  for (var t in e)
    e[t] !== null && (t === "projectionNodeConstructor" ? Qp.projectionNodeConstructor = e[t] : Qp[t].Component = e[t]);
}
var h0 = function() {
}, z5 = k.createContext({ strict: !1 }), H5 = Object.keys(Qp), ZIe = H5.length;
function eLe(e, t, n) {
  var r = [], o = k.useContext(z5);
  if (!t)
    return null;
  q5 !== "production" && n && o.strict;
  for (var i = 0; i < ZIe; i++) {
    var s = H5[i], l = Qp[s], c = l.isEnabled, f = l.Component;
    c(e) && f && r.push(k.createElement(f, Te({ key: s }, e, { visualElement: t })));
  }
  return r;
}
var Ky = k.createContext({
  transformPagePoint: function(e) {
    return e;
  },
  isStatic: !1,
  reducedMotion: "never"
}), Jy = k.createContext({});
function tLe() {
  return k.useContext(Jy).visualElement;
}
var Xy = k.createContext(null), $f = typeof document < "u", ES = $f ? k.useLayoutEffect : k.useEffect, wS = { current: null }, W5 = !1;
function nLe() {
  if (W5 = !0, !!$f)
    if (window.matchMedia) {
      var e = window.matchMedia("(prefers-reduced-motion)"), t = function() {
        return wS.current = e.matches;
      };
      e.addListener(t), t();
    } else
      wS.current = !1;
}
function rLe() {
  !W5 && nLe();
  var e = en(k.useState(wS.current), 1), t = e[0];
  return t;
}
function oLe() {
  var e = rLe(), t = k.useContext(Ky).reducedMotion;
  return t === "never" ? !1 : t === "always" ? !0 : e;
}
function iLe(e, t, n, r) {
  var o = k.useContext(z5), i = tLe(), s = k.useContext(Xy), l = oLe(), c = k.useRef(void 0);
  r || (r = o.renderer), !c.current && r && (c.current = r(e, {
    visualState: t,
    parent: i,
    props: n,
    presenceId: s == null ? void 0 : s.id,
    blockInitialAnimation: (s == null ? void 0 : s.initial) === !1,
    shouldReduceMotion: l
  }));
  var f = c.current;
  return ES(function() {
    f == null || f.syncRender();
  }), k.useEffect(function() {
    var d;
    (d = f == null ? void 0 : f.animationState) === null || d === void 0 || d.animateChanges();
  }), ES(function() {
    return function() {
      return f == null ? void 0 : f.notifyUnmount();
    };
  }, []), f;
}
function Wu(e) {
  return typeof e == "object" && Object.prototype.hasOwnProperty.call(e, "current");
}
function sLe(e, t, n) {
  return k.useCallback(
    function(r) {
      var o;
      r && ((o = e.mount) === null || o === void 0 || o.call(e, r)), t && (r ? t.mount(r) : t.unmount()), n && (typeof n == "function" ? n(r) : Wu(n) && (n.current = r));
    },
    /**
     * Only pass a new ref callback to React if we've received a visual element
     * factory. Otherwise we'll be mounting/remounting every time externalRef
     * or other dependencies change.
     */
    [t]
  );
}
function G5(e) {
  return Array.isArray(e);
}
function vi(e) {
  return typeof e == "string" || G5(e);
}
function aLe(e) {
  var t = {};
  return e.forEachValue(function(n, r) {
    return t[r] = n.get();
  }), t;
}
function lLe(e) {
  var t = {};
  return e.forEachValue(function(n, r) {
    return t[r] = n.getVelocity();
  }), t;
}
function Q5(e, t, n, r, o) {
  var i;
  return r === void 0 && (r = {}), o === void 0 && (o = {}), typeof t == "function" && (t = t(n ?? e.custom, r, o)), typeof t == "string" && (t = (i = e.variants) === null || i === void 0 ? void 0 : i[t]), typeof t == "function" && (t = t(n ?? e.custom, r, o)), t;
}
function Zy(e, t, n) {
  var r = e.getProps();
  return Q5(r, t, n ?? r.custom, aLe(e), lLe(e));
}
function e1(e) {
  var t;
  return typeof ((t = e.animate) === null || t === void 0 ? void 0 : t.start) == "function" || vi(e.initial) || vi(e.animate) || vi(e.whileHover) || vi(e.whileDrag) || vi(e.whileTap) || vi(e.whileFocus) || vi(e.exit);
}
function Y5(e) {
  return !!(e1(e) || e.variants);
}
function cLe(e, t) {
  if (e1(e)) {
    var n = e.initial, r = e.animate;
    return {
      initial: n === !1 || vi(n) ? n : void 0,
      animate: vi(r) ? r : void 0
    };
  }
  return e.inherit !== !1 ? t : {};
}
function uLe(e) {
  var t = cLe(e, k.useContext(Jy)), n = t.initial, r = t.animate;
  return k.useMemo(function() {
    return { initial: n, animate: r };
  }, [SI(n), SI(r)]);
}
function SI(e) {
  return Array.isArray(e) ? e.join(" ") : e;
}
function ll(e) {
  var t = k.useRef(null);
  return t.current === null && (t.current = e()), t.current;
}
var ap = {
  /**
   * Global flag as to whether the tree has animated since the last time
   * we resized the window
   */
  hasAnimatedSinceResize: !0,
  /**
   * We set this to true once, on the first update. Any nodes added to the tree beyond that
   * update will be given a `data-projection-id` attribute.
   */
  hasEverUpdated: !1
}, fLe = 1;
function dLe() {
  return ll(function() {
    if (ap.hasEverUpdated)
      return fLe++;
  });
}
var K5 = k.createContext({}), J5 = k.createContext({});
function pLe(e, t, n, r) {
  var o, i = t.layoutId, s = t.layout, l = t.drag, c = t.dragConstraints, f = t.layoutScroll, d = k.useContext(J5);
  !r || !n || n != null && n.projection || (n.projection = new r(e, n.getLatestValues(), (o = n.parent) === null || o === void 0 ? void 0 : o.projection), n.projection.setOptions({
    layoutId: i,
    layout: s,
    alwaysMeasureLayout: !!l || c && Wu(c),
    visualElement: n,
    scheduleRender: function() {
      return n.scheduleRender();
    },
    /**
     * TODO: Update options in an effect. This could be tricky as it'll be too late
     * to update by the time layout animations run.
     * We also need to fix this safeToRemove by linking it up to the one returned by usePresence,
     * ensuring it gets called if there's no potential layout animations.
     *
     */
    animationType: typeof s == "string" ? s : "both",
    initialPromotionConfig: d,
    layoutScroll: f
  }));
}
var hLe = (
  /** @class */
  function(e) {
    M3(t, e);
    function t() {
      return e !== null && e.apply(this, arguments) || this;
    }
    return t.prototype.getSnapshotBeforeUpdate = function() {
      return this.updateProps(), null;
    }, t.prototype.componentDidUpdate = function() {
    }, t.prototype.updateProps = function() {
      var n = this.props, r = n.visualElement, o = n.props;
      r && r.setProps(o);
    }, t.prototype.render = function() {
      return this.props.children;
    }, t;
  }(ce.Component)
);
function mLe(e) {
  var t = e.preloadedFeatures, n = e.createVisualElement, r = e.projectionNodeConstructor, o = e.useRender, i = e.useVisualState, s = e.Component;
  t && XIe(t);
  function l(c, f) {
    var d = gLe(c);
    c = Te(Te({}, c), { layoutId: d });
    var g = k.useContext(Ky), m = null, v = uLe(c), b = g.isStatic ? void 0 : dLe(), w = i(c, g.isStatic);
    return !g.isStatic && $f && (v.visualElement = iLe(s, w, Te(Te({}, g), c), n), pLe(b, c, v.visualElement, r || Qp.projectionNodeConstructor), m = eLe(c, v.visualElement, t)), k.createElement(
      hLe,
      { visualElement: v.visualElement, props: Te(Te({}, g), c) },
      m,
      k.createElement(Jy.Provider, { value: v }, o(s, c, b, sLe(w, v.visualElement, f), w, g.isStatic, v.visualElement))
    );
  }
  return k.forwardRef(l);
}
function gLe(e) {
  var t, n = e.layoutId, r = (t = k.useContext(K5)) === null || t === void 0 ? void 0 : t.id;
  return r && n !== void 0 ? r + "-" + n : n;
}
function vLe(e) {
  function t(r, o) {
    return o === void 0 && (o = {}), mLe(e(r, o));
  }
  if (typeof Proxy > "u")
    return t;
  var n = /* @__PURE__ */ new Map();
  return new Proxy(t, {
    /**
     * Called when `motion` is referenced with a prop: `motion.div`, `motion.input` etc.
     * The prop name is passed through as `key` and we can use that to generate a `motion`
     * DOM component with that name.
     */
    get: function(r, o) {
      return n.has(o) || n.set(o, t(o)), n.get(o);
    }
  });
}
var yLe = [
  "animate",
  "circle",
  "defs",
  "desc",
  "ellipse",
  "g",
  "image",
  "line",
  "filter",
  "marker",
  "mask",
  "metadata",
  "path",
  "pattern",
  "polygon",
  "polyline",
  "rect",
  "stop",
  "svg",
  "switch",
  "symbol",
  "text",
  "tspan",
  "use",
  "view"
];
function lk(e) {
  return (
    /**
     * If it's not a string, it's a custom React component. Currently we only support
     * HTML custom React components.
     */
    typeof e != "string" || /**
     * If it contains a dash, the element is a custom HTML webcomponent.
     */
    e.includes("-") ? !1 : (
      /**
       * If it's in our list of lowercase SVG tags, it's an SVG component
       */
      !!(yLe.indexOf(e) > -1 || /**
       * If it contains a capital letter, it's an SVG component
       */
      /[A-Z]/.test(e))
    )
  );
}
var m0 = {};
function bLe(e) {
  Object.assign(m0, e);
}
var xS = ["", "X", "Y", "Z"], ELe = ["translate", "scale", "rotate", "skew"], Yp = ["transformPerspective", "x", "y", "z"];
ELe.forEach(function(e) {
  return xS.forEach(function(t) {
    return Yp.push(e + t);
  });
});
function wLe(e, t) {
  return Yp.indexOf(e) - Yp.indexOf(t);
}
var xLe = new Set(Yp);
function Lh(e) {
  return xLe.has(e);
}
var SLe = /* @__PURE__ */ new Set(["originX", "originY", "originZ"]);
function X5(e) {
  return SLe.has(e);
}
function Z5(e, t) {
  var n = t.layout, r = t.layoutId;
  return Lh(e) || X5(e) || (n || r !== void 0) && (!!m0[e] || e === "opacity");
}
var rs = function(e) {
  return !!(e !== null && typeof e == "object" && e.getVelocity);
}, TLe = {
  x: "translateX",
  y: "translateY",
  z: "translateZ",
  transformPerspective: "perspective"
};
function CLe(e, t, n, r) {
  var o = e.transform, i = e.transformKeys, s = t.enableHardwareAcceleration, l = s === void 0 ? !0 : s, c = t.allowTransformNone, f = c === void 0 ? !0 : c, d = "";
  i.sort(wLe);
  for (var g = !1, m = i.length, v = 0; v < m; v++) {
    var b = i[v];
    d += "".concat(TLe[b] || b, "(").concat(o[b], ") "), b === "z" && (g = !0);
  }
  return !g && l ? d += "translateZ(0)" : d = d.trim(), r ? d = r(o, n ? "" : d) : f && n && (d = "none"), d;
}
function kLe(e) {
  var t = e.originX, n = t === void 0 ? "50%" : t, r = e.originY, o = r === void 0 ? "50%" : r, i = e.originZ, s = i === void 0 ? 0 : i;
  return "".concat(n, " ").concat(o, " ").concat(s);
}
function e$(e) {
  return e.startsWith("--");
}
var _Le = function(e, t) {
  return t && typeof e == "number" ? t.transform(e) : e;
};
const t$ = (e, t) => (n) => Math.max(Math.min(n, t), e), lp = (e) => e % 1 ? Number(e.toFixed(5)) : e, Kp = /(-)?([\d]*\.?[\d])+/g, SS = /(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi, NLe = /^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;
function Rh(e) {
  return typeof e == "string";
}
const Fc = {
  test: (e) => typeof e == "number",
  parse: parseFloat,
  transform: (e) => e
}, cp = Object.assign(Object.assign({}, Fc), { transform: t$(0, 1) }), Tg = Object.assign(Object.assign({}, Fc), { default: 1 }), Fh = (e) => ({
  test: (t) => Rh(t) && t.endsWith(e) && t.split(" ").length === 1,
  parse: parseFloat,
  transform: (t) => `${t}${e}`
}), ya = Fh("deg"), Zi = Fh("%"), Xe = Fh("px"), OLe = Fh("vh"), ALe = Fh("vw"), TI = Object.assign(Object.assign({}, Zi), { parse: (e) => Zi.parse(e) / 100, transform: (e) => Zi.transform(e * 100) }), ck = (e, t) => (n) => !!(Rh(n) && NLe.test(n) && n.startsWith(e) || t && Object.prototype.hasOwnProperty.call(n, t)), n$ = (e, t, n) => (r) => {
  if (!Rh(r))
    return r;
  const [o, i, s, l] = r.match(Kp);
  return {
    [e]: parseFloat(o),
    [t]: parseFloat(i),
    [n]: parseFloat(s),
    alpha: l !== void 0 ? parseFloat(l) : 1
  };
}, ec = {
  test: ck("hsl", "hue"),
  parse: n$("hue", "saturation", "lightness"),
  transform: ({ hue: e, saturation: t, lightness: n, alpha: r = 1 }) => "hsla(" + Math.round(e) + ", " + Zi.transform(lp(t)) + ", " + Zi.transform(lp(n)) + ", " + lp(cp.transform(r)) + ")"
}, DLe = t$(0, 255), yw = Object.assign(Object.assign({}, Fc), { transform: (e) => Math.round(DLe(e)) }), Ia = {
  test: ck("rgb", "red"),
  parse: n$("red", "green", "blue"),
  transform: ({ red: e, green: t, blue: n, alpha: r = 1 }) => "rgba(" + yw.transform(e) + ", " + yw.transform(t) + ", " + yw.transform(n) + ", " + lp(cp.transform(r)) + ")"
};
function ILe(e) {
  let t = "", n = "", r = "", o = "";
  return e.length > 5 ? (t = e.substr(1, 2), n = e.substr(3, 2), r = e.substr(5, 2), o = e.substr(7, 2)) : (t = e.substr(1, 1), n = e.substr(2, 1), r = e.substr(3, 1), o = e.substr(4, 1), t += t, n += n, r += r, o += o), {
    red: parseInt(t, 16),
    green: parseInt(n, 16),
    blue: parseInt(r, 16),
    alpha: o ? parseInt(o, 16) / 255 : 1
  };
}
const TS = {
  test: ck("#"),
  parse: ILe,
  transform: Ia.transform
}, jr = {
  test: (e) => Ia.test(e) || TS.test(e) || ec.test(e),
  parse: (e) => Ia.test(e) ? Ia.parse(e) : ec.test(e) ? ec.parse(e) : TS.parse(e),
  transform: (e) => Rh(e) ? e : e.hasOwnProperty("red") ? Ia.transform(e) : ec.transform(e)
}, r$ = "${c}", o$ = "${n}";
function LLe(e) {
  var t, n, r, o;
  return isNaN(e) && Rh(e) && ((n = (t = e.match(Kp)) === null || t === void 0 ? void 0 : t.length) !== null && n !== void 0 ? n : 0) + ((o = (r = e.match(SS)) === null || r === void 0 ? void 0 : r.length) !== null && o !== void 0 ? o : 0) > 0;
}
function i$(e) {
  typeof e == "number" && (e = `${e}`);
  const t = [];
  let n = 0;
  const r = e.match(SS);
  r && (n = r.length, e = e.replace(SS, r$), t.push(...r.map(jr.parse)));
  const o = e.match(Kp);
  return o && (e = e.replace(Kp, o$), t.push(...o.map(Fc.parse))), { values: t, numColors: n, tokenised: e };
}
function s$(e) {
  return i$(e).values;
}
function a$(e) {
  const { values: t, numColors: n, tokenised: r } = i$(e), o = t.length;
  return (i) => {
    let s = r;
    for (let l = 0; l < o; l++)
      s = s.replace(l < n ? r$ : o$, l < n ? jr.transform(i[l]) : lp(i[l]));
    return s;
  };
}
const RLe = (e) => typeof e == "number" ? 0 : e;
function FLe(e) {
  const t = s$(e);
  return a$(e)(t.map(RLe));
}
const Hs = { test: LLe, parse: s$, createTransformer: a$, getAnimatableNone: FLe }, MLe = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
function PLe(e) {
  let [t, n] = e.slice(0, -1).split("(");
  if (t === "drop-shadow")
    return e;
  const [r] = n.match(Kp) || [];
  if (!r)
    return e;
  const o = n.replace(r, "");
  let i = MLe.has(t) ? 1 : 0;
  return r !== n && (i *= 100), t + "(" + i + o + ")";
}
const $Le = /([a-z-]*)\(.*?\)/g, CS = Object.assign(Object.assign({}, Hs), { getAnimatableNone: (e) => {
  const t = e.match($Le);
  return t ? t.map(PLe).join(" ") : e;
} });
var CI = Te(Te({}, Fc), { transform: Math.round }), l$ = {
  // Border props
  borderWidth: Xe,
  borderTopWidth: Xe,
  borderRightWidth: Xe,
  borderBottomWidth: Xe,
  borderLeftWidth: Xe,
  borderRadius: Xe,
  radius: Xe,
  borderTopLeftRadius: Xe,
  borderTopRightRadius: Xe,
  borderBottomRightRadius: Xe,
  borderBottomLeftRadius: Xe,
  // Positioning props
  width: Xe,
  maxWidth: Xe,
  height: Xe,
  maxHeight: Xe,
  size: Xe,
  top: Xe,
  right: Xe,
  bottom: Xe,
  left: Xe,
  // Spacing props
  padding: Xe,
  paddingTop: Xe,
  paddingRight: Xe,
  paddingBottom: Xe,
  paddingLeft: Xe,
  margin: Xe,
  marginTop: Xe,
  marginRight: Xe,
  marginBottom: Xe,
  marginLeft: Xe,
  // Transform props
  rotate: ya,
  rotateX: ya,
  rotateY: ya,
  rotateZ: ya,
  scale: Tg,
  scaleX: Tg,
  scaleY: Tg,
  scaleZ: Tg,
  skew: ya,
  skewX: ya,
  skewY: ya,
  distance: Xe,
  translateX: Xe,
  translateY: Xe,
  translateZ: Xe,
  x: Xe,
  y: Xe,
  z: Xe,
  perspective: Xe,
  transformPerspective: Xe,
  opacity: cp,
  originX: TI,
  originY: TI,
  originZ: Xe,
  // Misc
  zIndex: CI,
  // SVG
  fillOpacity: cp,
  strokeOpacity: cp,
  numOctaves: CI
};
function uk(e, t, n, r) {
  var o, i = e.style, s = e.vars, l = e.transform, c = e.transformKeys, f = e.transformOrigin;
  c.length = 0;
  var d = !1, g = !1, m = !0;
  for (var v in t) {
    var b = t[v];
    if (e$(v)) {
      s[v] = b;
      continue;
    }
    var w = l$[v], _ = _Le(b, w);
    if (Lh(v)) {
      if (d = !0, l[v] = _, c.push(v), !m)
        continue;
      b !== ((o = w.default) !== null && o !== void 0 ? o : 0) && (m = !1);
    } else
      X5(v) ? (f[v] = _, g = !0) : i[v] = _;
  }
  d ? i.transform = CLe(e, n, m, r) : r ? i.transform = r({}, "") : !t.transform && i.transform && (i.transform = "none"), g && (i.transformOrigin = kLe(f));
}
var fk = function() {
  return {
    style: {},
    transform: {},
    transformKeys: [],
    transformOrigin: {},
    vars: {}
  };
};
function c$(e, t, n) {
  for (var r in t)
    !rs(t[r]) && !Z5(r, n) && (e[r] = t[r]);
}
function VLe(e, t, n) {
  var r = e.transformTemplate;
  return k.useMemo(function() {
    var o = fk();
    uk(o, t, { enableHardwareAcceleration: !n }, r);
    var i = o.vars, s = o.style;
    return Te(Te({}, i), s);
  }, [t]);
}
function jLe(e, t, n) {
  var r = e.style || {}, o = {};
  return c$(o, r, e), Object.assign(o, VLe(e, t, n)), e.transformValues && (o = e.transformValues(o)), o;
}
function ULe(e, t, n) {
  var r = {}, o = jLe(e, t, n);
  return e.drag && e.dragListener !== !1 && (r.draggable = !1, o.userSelect = o.WebkitUserSelect = o.WebkitTouchCallout = "none", o.touchAction = e.drag === !0 ? "none" : "pan-".concat(e.drag === "x" ? "y" : "x")), r.style = o, r;
}
var BLe = /* @__PURE__ */ new Set([
  "initial",
  "animate",
  "exit",
  "style",
  "variants",
  "transition",
  "transformTemplate",
  "transformValues",
  "custom",
  "inherit",
  "layout",
  "layoutId",
  "layoutDependency",
  "onLayoutAnimationStart",
  "onLayoutAnimationComplete",
  "onLayoutMeasure",
  "onBeforeLayoutMeasure",
  "onAnimationStart",
  "onAnimationComplete",
  "onUpdate",
  "onDragStart",
  "onDrag",
  "onDragEnd",
  "onMeasureDragConstraints",
  "onDirectionLock",
  "onDragTransitionEnd",
  "drag",
  "dragControls",
  "dragListener",
  "dragConstraints",
  "dragDirectionLock",
  "dragSnapToOrigin",
  "_dragX",
  "_dragY",
  "dragElastic",
  "dragMomentum",
  "dragPropagation",
  "dragTransition",
  "whileDrag",
  "onPan",
  "onPanStart",
  "onPanEnd",
  "onPanSessionStart",
  "onTap",
  "onTapStart",
  "onTapCancel",
  "onHoverStart",
  "onHoverEnd",
  "whileFocus",
  "whileTap",
  "whileHover",
  "whileInView",
  "onViewportEnter",
  "onViewportLeave",
  "viewport",
  "layoutScroll"
]);
function g0(e) {
  return BLe.has(e);
}
var u$ = function(e) {
  return !g0(e);
};
function qLe(e) {
  e && (u$ = function(t) {
    return t.startsWith("on") ? !g0(t) : e(t);
  });
}
try {
  qLe(require("@emotion/is-prop-valid").default);
} catch {
}
function zLe(e, t, n) {
  var r = {};
  for (var o in e)
    (u$(o) || n === !0 && g0(o) || !t && !g0(o) || // If trying to use native HTML drag events, forward drag listeners
    e.draggable && o.startsWith("onDrag")) && (r[o] = e[o]);
  return r;
}
function kI(e, t, n) {
  return typeof e == "string" ? e : Xe.transform(t + n * e);
}
function HLe(e, t, n) {
  var r = kI(t, e.x, e.width), o = kI(n, e.y, e.height);
  return "".concat(r, " ").concat(o);
}
var WLe = {
  offset: "stroke-dashoffset",
  array: "stroke-dasharray"
}, GLe = {
  offset: "strokeDashoffset",
  array: "strokeDasharray"
};
function QLe(e, t, n, r, o) {
  n === void 0 && (n = 1), r === void 0 && (r = 0), o === void 0 && (o = !0), e.pathLength = 1;
  var i = o ? WLe : GLe;
  e[i.offset] = Xe.transform(-r);
  var s = Xe.transform(t), l = Xe.transform(n);
  e[i.array] = "".concat(s, " ").concat(l);
}
function dk(e, t, n, r) {
  var o = t.attrX, i = t.attrY, s = t.originX, l = t.originY, c = t.pathLength, f = t.pathSpacing, d = f === void 0 ? 1 : f, g = t.pathOffset, m = g === void 0 ? 0 : g, v = Dr(t, ["attrX", "attrY", "originX", "originY", "pathLength", "pathSpacing", "pathOffset"]);
  uk(e, v, n, r), e.attrs = e.style, e.style = {};
  var b = e.attrs, w = e.style, _ = e.dimensions;
  b.transform && (_ && (w.transform = b.transform), delete b.transform), _ && (s !== void 0 || l !== void 0 || w.transform) && (w.transformOrigin = HLe(_, s !== void 0 ? s : 0.5, l !== void 0 ? l : 0.5)), o !== void 0 && (b.x = o), i !== void 0 && (b.y = i), c !== void 0 && QLe(b, c, d, m, !1);
}
var f$ = function() {
  return Te(Te({}, fk()), { attrs: {} });
};
function YLe(e, t) {
  var n = k.useMemo(function() {
    var o = f$();
    return dk(o, t, { enableHardwareAcceleration: !1 }, e.transformTemplate), Te(Te({}, o.attrs), { style: Te({}, o.style) });
  }, [t]);
  if (e.style) {
    var r = {};
    c$(r, e.style, e), n.style = Te(Te({}, r), n.style);
  }
  return n;
}
function KLe(e) {
  e === void 0 && (e = !1);
  var t = function(n, r, o, i, s, l) {
    var c = s.latestValues, f = lk(n) ? YLe : ULe, d = f(r, c, l), g = zLe(r, typeof n == "string", e), m = Te(Te(Te({}, g), d), { ref: i });
    return o && (m["data-projection-id"] = o), k.createElement(n, m);
  };
  return t;
}
var JLe = /([a-z])([A-Z])/g, XLe = "$1-$2", d$ = function(e) {
  return e.replace(JLe, XLe).toLowerCase();
};
function p$(e, t, n, r) {
  var o = t.style, i = t.vars;
  Object.assign(e.style, o, r && r.getProjectionStyles(n));
  for (var s in i)
    e.style.setProperty(s, i[s]);
}
var h$ = /* @__PURE__ */ new Set([
  "baseFrequency",
  "diffuseConstant",
  "kernelMatrix",
  "kernelUnitLength",
  "keySplines",
  "keyTimes",
  "limitingConeAngle",
  "markerHeight",
  "markerWidth",
  "numOctaves",
  "targetX",
  "targetY",
  "surfaceScale",
  "specularConstant",
  "specularExponent",
  "stdDeviation",
  "tableValues",
  "viewBox",
  "gradientTransform",
  "pathLength"
]);
function m$(e, t, n, r) {
  p$(e, t, void 0, r);
  for (var o in t.attrs)
    e.setAttribute(h$.has(o) ? o : d$(o), t.attrs[o]);
}
function pk(e) {
  var t = e.style, n = {};
  for (var r in t)
    (rs(t[r]) || Z5(r, e)) && (n[r] = t[r]);
  return n;
}
function g$(e) {
  var t = pk(e);
  for (var n in e)
    if (rs(e[n])) {
      var r = n === "x" || n === "y" ? "attr" + n.toUpperCase() : n;
      t[r] = e[n];
    }
  return t;
}
function hk(e) {
  return typeof e == "object" && typeof e.start == "function";
}
var Jp = function(e) {
  return Array.isArray(e);
}, ZLe = function(e) {
  return !!(e && typeof e == "object" && e.mix && e.toValue);
}, v$ = function(e) {
  return Jp(e) ? e[e.length - 1] || 0 : e;
};
function rv(e) {
  var t = rs(e) ? e.get() : e;
  return ZLe(t) ? t.toValue() : t;
}
function _I(e, t, n, r) {
  var o = e.scrapeMotionValuesFromProps, i = e.createRenderState, s = e.onMount, l = {
    latestValues: eRe(t, n, r, o),
    renderState: i()
  };
  return s && (l.mount = function(c) {
    return s(t, c, l);
  }), l;
}
var y$ = function(e) {
  return function(t, n) {
    var r = k.useContext(Jy), o = k.useContext(Xy);
    return n ? _I(e, t, r, o) : ll(function() {
      return _I(e, t, r, o);
    });
  };
};
function eRe(e, t, n, r) {
  var o = {}, i = (n == null ? void 0 : n.initial) === !1, s = r(e);
  for (var l in s)
    o[l] = rv(s[l]);
  var c = e.initial, f = e.animate, d = e1(e), g = Y5(e);
  t && g && !d && e.inherit !== !1 && (c ?? (c = t.initial), f ?? (f = t.animate));
  var m = i || c === !1, v = m ? f : c;
  if (v && typeof v != "boolean" && !hk(v)) {
    var b = Array.isArray(v) ? v : [v];
    b.forEach(function(w) {
      var _ = Q5(e, w);
      if (_) {
        var S = _.transitionEnd;
        _.transition;
        var x = Dr(_, ["transitionEnd", "transition"]);
        for (var C in x) {
          var E = x[C];
          if (Array.isArray(E)) {
            var N = m ? E.length - 1 : 0;
            E = E[N];
          }
          E !== null && (o[C] = E);
        }
        for (var C in S)
          o[C] = S[C];
      }
    });
  }
  return o;
}
var tRe = {
  useVisualState: y$({
    scrapeMotionValuesFromProps: g$,
    createRenderState: f$,
    onMount: function(e, t, n) {
      var r = n.renderState, o = n.latestValues;
      try {
        r.dimensions = typeof t.getBBox == "function" ? t.getBBox() : t.getBoundingClientRect();
      } catch {
        r.dimensions = {
          x: 0,
          y: 0,
          width: 0,
          height: 0
        };
      }
      dk(r, o, { enableHardwareAcceleration: !1 }, e.transformTemplate), m$(t, r);
    }
  })
}, nRe = {
  useVisualState: y$({
    scrapeMotionValuesFromProps: pk,
    createRenderState: fk
  })
};
function rRe(e, t, n, r, o) {
  var i = t.forwardMotionProps, s = i === void 0 ? !1 : i, l = lk(e) ? tRe : nRe;
  return Te(Te({}, l), { preloadedFeatures: n, useRender: KLe(s), createVisualElement: r, projectionNodeConstructor: o, Component: e });
}
var Pt;
(function(e) {
  e.Animate = "animate", e.Hover = "whileHover", e.Tap = "whileTap", e.Drag = "whileDrag", e.Focus = "whileFocus", e.InView = "whileInView", e.Exit = "exit";
})(Pt || (Pt = {}));
function t1(e, t, n, r) {
  return r === void 0 && (r = { passive: !0 }), e.addEventListener(t, n, r), function() {
    return e.removeEventListener(t, n);
  };
}
function kS(e, t, n, r) {
  k.useEffect(function() {
    var o = e.current;
    if (n && o)
      return t1(o, t, n, r);
  }, [e, t, n, r]);
}
function oRe(e) {
  var t = e.whileFocus, n = e.visualElement, r = function() {
    var i;
    (i = n.animationState) === null || i === void 0 || i.setActive(Pt.Focus, !0);
  }, o = function() {
    var i;
    (i = n.animationState) === null || i === void 0 || i.setActive(Pt.Focus, !1);
  };
  kS(n, "focus", t ? r : void 0), kS(n, "blur", t ? o : void 0);
}
function b$(e) {
  return typeof PointerEvent < "u" && e instanceof PointerEvent ? e.pointerType === "mouse" : e instanceof MouseEvent;
}
function E$(e) {
  var t = !!e.touches;
  return t;
}
function iRe(e) {
  return function(t) {
    var n = t instanceof MouseEvent, r = !n || n && t.button === 0;
    r && e(t);
  };
}
var sRe = { pageX: 0, pageY: 0 };
function aRe(e, t) {
  t === void 0 && (t = "page");
  var n = e.touches[0] || e.changedTouches[0], r = n || sRe;
  return {
    x: r[t + "X"],
    y: r[t + "Y"]
  };
}
function lRe(e, t) {
  return t === void 0 && (t = "page"), {
    x: e[t + "X"],
    y: e[t + "Y"]
  };
}
function mk(e, t) {
  return t === void 0 && (t = "page"), {
    point: E$(e) ? aRe(e, t) : lRe(e, t)
  };
}
var w$ = function(e, t) {
  t === void 0 && (t = !1);
  var n = function(r) {
    return e(r, mk(r));
  };
  return t ? iRe(n) : n;
}, cRe = function() {
  return $f && window.onpointerdown === null;
}, uRe = function() {
  return $f && window.ontouchstart === null;
}, fRe = function() {
  return $f && window.onmousedown === null;
}, dRe = {
  pointerdown: "mousedown",
  pointermove: "mousemove",
  pointerup: "mouseup",
  pointercancel: "mousecancel",
  pointerover: "mouseover",
  pointerout: "mouseout",
  pointerenter: "mouseenter",
  pointerleave: "mouseleave"
}, pRe = {
  pointerdown: "touchstart",
  pointermove: "touchmove",
  pointerup: "touchend",
  pointercancel: "touchcancel"
};
function x$(e) {
  return cRe() ? e : uRe() ? pRe[e] : fRe() ? dRe[e] : e;
}
function af(e, t, n, r) {
  return t1(e, x$(t), w$(n, t === "pointerdown"), r);
}
function v0(e, t, n, r) {
  return kS(e, x$(t), n && w$(n, t === "pointerdown"), r);
}
function S$(e) {
  var t = null;
  return function() {
    var n = function() {
      t = null;
    };
    return t === null ? (t = e, n) : !1;
  };
}
var NI = S$("dragHorizontal"), OI = S$("dragVertical");
function T$(e) {
  var t = !1;
  if (e === "y")
    t = OI();
  else if (e === "x")
    t = NI();
  else {
    var n = NI(), r = OI();
    n && r ? t = function() {
      n(), r();
    } : (n && n(), r && r());
  }
  return t;
}
function C$() {
  var e = T$(!0);
  return e ? (e(), !1) : !0;
}
function AI(e, t, n) {
  return function(r, o) {
    var i;
    !b$(r) || C$() || ((i = e.animationState) === null || i === void 0 || i.setActive(Pt.Hover, t), n == null || n(r, o));
  };
}
function hRe(e) {
  var t = e.onHoverStart, n = e.onHoverEnd, r = e.whileHover, o = e.visualElement;
  v0(o, "pointerenter", t || r ? AI(o, !0, t) : void 0, { passive: !t }), v0(o, "pointerleave", n || r ? AI(o, !1, n) : void 0, { passive: !n });
}
var k$ = function(e, t) {
  return t ? e === t ? !0 : k$(e, t.parentElement) : !1;
};
function _$(e) {
  return k.useEffect(function() {
    return function() {
      return e();
    };
  }, []);
}
const y0 = (e, t, n) => Math.min(Math.max(n, e), t), bw = 1e-3, mRe = 0.01, gRe = 10, vRe = 0.05, yRe = 1;
function bRe({ duration: e = 800, bounce: t = 0.25, velocity: n = 0, mass: r = 1 }) {
  let o, i, s = 1 - t;
  s = y0(vRe, yRe, s), e = y0(mRe, gRe, e / 1e3), s < 1 ? (o = (f) => {
    const d = f * s, g = d * e, m = d - n, v = _S(f, s), b = Math.exp(-g);
    return bw - m / v * b;
  }, i = (f) => {
    const g = f * s * e, m = g * n + n, v = Math.pow(s, 2) * Math.pow(f, 2) * e, b = Math.exp(-g), w = _S(Math.pow(f, 2), s);
    return (-o(f) + bw > 0 ? -1 : 1) * ((m - v) * b) / w;
  }) : (o = (f) => {
    const d = Math.exp(-f * e), g = (f - n) * e + 1;
    return -bw + d * g;
  }, i = (f) => {
    const d = Math.exp(-f * e), g = (n - f) * (e * e);
    return d * g;
  });
  const l = 5 / e, c = wRe(o, i, l);
  if (e = e * 1e3, isNaN(c))
    return {
      stiffness: 100,
      damping: 10,
      duration: e
    };
  {
    const f = Math.pow(c, 2) * r;
    return {
      stiffness: f,
      damping: s * 2 * Math.sqrt(r * f),
      duration: e
    };
  }
}
const ERe = 12;
function wRe(e, t, n) {
  let r = n;
  for (let o = 1; o < ERe; o++)
    r = r - e(r) / t(r);
  return r;
}
function _S(e, t) {
  return e * Math.sqrt(1 - t * t);
}
const xRe = ["duration", "bounce"], SRe = ["stiffness", "damping", "mass"];
function DI(e, t) {
  return t.some((n) => e[n] !== void 0);
}
function TRe(e) {
  let t = Object.assign({ velocity: 0, stiffness: 100, damping: 10, mass: 1, isResolvedFromDuration: !1 }, e);
  if (!DI(e, SRe) && DI(e, xRe)) {
    const n = bRe(e);
    t = Object.assign(Object.assign(Object.assign({}, t), n), { velocity: 0, mass: 1 }), t.isResolvedFromDuration = !0;
  }
  return t;
}
function gk(e) {
  var { from: t = 0, to: n = 1, restSpeed: r = 2, restDelta: o } = e, i = Dr(e, ["from", "to", "restSpeed", "restDelta"]);
  const s = { done: !1, value: t };
  let { stiffness: l, damping: c, mass: f, velocity: d, duration: g, isResolvedFromDuration: m } = TRe(i), v = II, b = II;
  function w() {
    const _ = d ? -(d / 1e3) : 0, S = n - t, x = c / (2 * Math.sqrt(l * f)), C = Math.sqrt(l / f) / 1e3;
    if (o === void 0 && (o = Math.min(Math.abs(n - t) / 100, 0.4)), x < 1) {
      const E = _S(C, x);
      v = (N) => {
        const I = Math.exp(-x * C * N);
        return n - I * ((_ + x * C * S) / E * Math.sin(E * N) + S * Math.cos(E * N));
      }, b = (N) => {
        const I = Math.exp(-x * C * N);
        return x * C * I * (Math.sin(E * N) * (_ + x * C * S) / E + S * Math.cos(E * N)) - I * (Math.cos(E * N) * (_ + x * C * S) - E * S * Math.sin(E * N));
      };
    } else if (x === 1)
      v = (E) => n - Math.exp(-C * E) * (S + (_ + C * S) * E);
    else {
      const E = C * Math.sqrt(x * x - 1);
      v = (N) => {
        const I = Math.exp(-x * C * N), D = Math.min(E * N, 300);
        return n - I * ((_ + x * C * S) * Math.sinh(D) + E * S * Math.cosh(D)) / E;
      };
    }
  }
  return w(), {
    next: (_) => {
      const S = v(_);
      if (m)
        s.done = _ >= g;
      else {
        const x = b(_) * 1e3, C = Math.abs(x) <= r, E = Math.abs(n - S) <= o;
        s.done = C && E;
      }
      return s.value = s.done ? n : S, s;
    },
    flipTarget: () => {
      d = -d, [t, n] = [n, t], w();
    }
  };
}
gk.needsInterpolation = (e, t) => typeof e == "string" || typeof t == "string";
const II = (e) => 0, Xp = (e, t, n) => {
  const r = t - e;
  return r === 0 ? 1 : (n - e) / r;
}, an = (e, t, n) => -n * e + n * t + e;
function Ew(e, t, n) {
  return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? e + (t - e) * 6 * n : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e;
}
function LI({ hue: e, saturation: t, lightness: n, alpha: r }) {
  e /= 360, t /= 100, n /= 100;
  let o = 0, i = 0, s = 0;
  if (!t)
    o = i = s = n;
  else {
    const l = n < 0.5 ? n * (1 + t) : n + t - n * t, c = 2 * n - l;
    o = Ew(c, l, e + 1 / 3), i = Ew(c, l, e), s = Ew(c, l, e - 1 / 3);
  }
  return {
    red: Math.round(o * 255),
    green: Math.round(i * 255),
    blue: Math.round(s * 255),
    alpha: r
  };
}
const CRe = (e, t, n) => {
  const r = e * e, o = t * t;
  return Math.sqrt(Math.max(0, n * (o - r) + r));
}, kRe = [TS, Ia, ec], RI = (e) => kRe.find((t) => t.test(e)), N$ = (e, t) => {
  let n = RI(e), r = RI(t), o = n.parse(e), i = r.parse(t);
  n === ec && (o = LI(o), n = Ia), r === ec && (i = LI(i), r = Ia);
  const s = Object.assign({}, o);
  return (l) => {
    for (const c in s)
      c !== "alpha" && (s[c] = CRe(o[c], i[c], l));
    return s.alpha = an(o.alpha, i.alpha, l), n.transform(s);
  };
}, NS = (e) => typeof e == "number", _Re = (e, t) => (n) => t(e(n)), n1 = (...e) => e.reduce(_Re);
function O$(e, t) {
  return NS(e) ? (n) => an(e, t, n) : jr.test(e) ? N$(e, t) : D$(e, t);
}
const A$ = (e, t) => {
  const n = [...e], r = n.length, o = e.map((i, s) => O$(i, t[s]));
  return (i) => {
    for (let s = 0; s < r; s++)
      n[s] = o[s](i);
    return n;
  };
}, NRe = (e, t) => {
  const n = Object.assign(Object.assign({}, e), t), r = {};
  for (const o in n)
    e[o] !== void 0 && t[o] !== void 0 && (r[o] = O$(e[o], t[o]));
  return (o) => {
    for (const i in r)
      n[i] = r[i](o);
    return n;
  };
};
function FI(e) {
  const t = Hs.parse(e), n = t.length;
  let r = 0, o = 0, i = 0;
  for (let s = 0; s < n; s++)
    r || typeof t[s] == "number" ? r++ : t[s].hue !== void 0 ? i++ : o++;
  return { parsed: t, numNumbers: r, numRGB: o, numHSL: i };
}
const D$ = (e, t) => {
  const n = Hs.createTransformer(t), r = FI(e), o = FI(t);
  return r.numHSL === o.numHSL && r.numRGB === o.numRGB && r.numNumbers >= o.numNumbers ? n1(A$(r.parsed, o.parsed), n) : (s) => `${s > 0 ? t : e}`;
}, ORe = (e, t) => (n) => an(e, t, n);
function ARe(e) {
  if (typeof e == "number")
    return ORe;
  if (typeof e == "string")
    return jr.test(e) ? N$ : D$;
  if (Array.isArray(e))
    return A$;
  if (typeof e == "object")
    return NRe;
}
function DRe(e, t, n) {
  const r = [], o = n || ARe(e[0]), i = e.length - 1;
  for (let s = 0; s < i; s++) {
    let l = o(e[s], e[s + 1]);
    if (t) {
      const c = Array.isArray(t) ? t[s] : t;
      l = n1(c, l);
    }
    r.push(l);
  }
  return r;
}
function IRe([e, t], [n]) {
  return (r) => n(Xp(e, t, r));
}
function LRe(e, t) {
  const n = e.length, r = n - 1;
  return (o) => {
    let i = 0, s = !1;
    if (o <= e[0] ? s = !0 : o >= e[r] && (i = r - 1, s = !0), !s) {
      let c = 1;
      for (; c < n && !(e[c] > o || c === r); c++)
        ;
      i = c - 1;
    }
    const l = Xp(e[i], e[i + 1], o);
    return t[i](l);
  };
}
function vk(e, t, { clamp: n = !0, ease: r, mixer: o } = {}) {
  const i = e.length;
  h0(i === t.length), h0(!r || !Array.isArray(r) || r.length === i - 1), e[0] > e[i - 1] && (e = [].concat(e), t = [].concat(t), e.reverse(), t.reverse());
  const s = DRe(t, r, o), l = i === 2 ? IRe(e, s) : LRe(e, s);
  return n ? (c) => l(y0(e[0], e[i - 1], c)) : l;
}
const r1 = (e) => (t) => 1 - e(1 - t), yk = (e) => (t) => t <= 0.5 ? e(2 * t) / 2 : (2 - e(2 * (1 - t))) / 2, RRe = (e) => (t) => Math.pow(t, e), I$ = (e) => (t) => t * t * ((e + 1) * t - e), FRe = (e) => {
  const t = I$(e);
  return (n) => (n *= 2) < 1 ? 0.5 * t(n) : 0.5 * (2 - Math.pow(2, -10 * (n - 1)));
}, L$ = 1.525, MRe = 4 / 11, PRe = 8 / 11, $Re = 9 / 10, bk = (e) => e, Ek = RRe(2), VRe = r1(Ek), R$ = yk(Ek), F$ = (e) => 1 - Math.sin(Math.acos(e)), wk = r1(F$), jRe = yk(wk), xk = I$(L$), URe = r1(xk), BRe = yk(xk), qRe = FRe(L$), zRe = 4356 / 361, HRe = 35442 / 1805, WRe = 16061 / 1805, b0 = (e) => {
  if (e === 1 || e === 0)
    return e;
  const t = e * e;
  return e < MRe ? 7.5625 * t : e < PRe ? 9.075 * t - 9.9 * e + 3.4 : e < $Re ? zRe * t - HRe * e + WRe : 10.8 * e * e - 20.52 * e + 10.72;
}, GRe = r1(b0), QRe = (e) => e < 0.5 ? 0.5 * (1 - b0(1 - e * 2)) : 0.5 * b0(e * 2 - 1) + 0.5;
function YRe(e, t) {
  return e.map(() => t || R$).splice(0, e.length - 1);
}
function KRe(e) {
  const t = e.length;
  return e.map((n, r) => r !== 0 ? r / (t - 1) : 0);
}
function JRe(e, t) {
  return e.map((n) => n * t);
}
function ov({ from: e = 0, to: t = 1, ease: n, offset: r, duration: o = 300 }) {
  const i = { done: !1, value: e }, s = Array.isArray(t) ? t : [e, t], l = JRe(r && r.length === s.length ? r : KRe(s), o);
  function c() {
    return vk(l, s, {
      ease: Array.isArray(n) ? n : YRe(s, n)
    });
  }
  let f = c();
  return {
    next: (d) => (i.value = f(d), i.done = d >= o, i),
    flipTarget: () => {
      s.reverse(), f = c();
    }
  };
}
function XRe({ velocity: e = 0, from: t = 0, power: n = 0.8, timeConstant: r = 350, restDelta: o = 0.5, modifyTarget: i }) {
  const s = { done: !1, value: t };
  let l = n * e;
  const c = t + l, f = i === void 0 ? c : i(c);
  return f !== c && (l = f - t), {
    next: (d) => {
      const g = -l * Math.exp(-d / r);
      return s.done = !(g > o || g < -o), s.value = s.done ? f : f + g, s;
    },
    flipTarget: () => {
    }
  };
}
const MI = { keyframes: ov, spring: gk, decay: XRe };
function ZRe(e) {
  if (Array.isArray(e.to))
    return ov;
  if (MI[e.type])
    return MI[e.type];
  const t = new Set(Object.keys(e));
  return t.has("ease") || t.has("duration") && !t.has("dampingRatio") ? ov : t.has("dampingRatio") || t.has("stiffness") || t.has("mass") || t.has("damping") || t.has("restSpeed") || t.has("restDelta") ? gk : ov;
}
const M$ = 1 / 60 * 1e3, eFe = typeof performance < "u" ? () => performance.now() : () => Date.now(), P$ = typeof window < "u" ? (e) => window.requestAnimationFrame(e) : (e) => setTimeout(() => e(eFe()), M$);
function tFe(e) {
  let t = [], n = [], r = 0, o = !1, i = !1;
  const s = /* @__PURE__ */ new WeakSet(), l = {
    schedule: (c, f = !1, d = !1) => {
      const g = d && o, m = g ? t : n;
      return f && s.add(c), m.indexOf(c) === -1 && (m.push(c), g && o && (r = t.length)), c;
    },
    cancel: (c) => {
      const f = n.indexOf(c);
      f !== -1 && n.splice(f, 1), s.delete(c);
    },
    process: (c) => {
      if (o) {
        i = !0;
        return;
      }
      if (o = !0, [t, n] = [n, t], n.length = 0, r = t.length, r)
        for (let f = 0; f < r; f++) {
          const d = t[f];
          d(c), s.has(d) && (l.schedule(d), e());
        }
      o = !1, i && (i = !1, l.process(c));
    }
  };
  return l;
}
const nFe = 40;
let OS = !0, Zp = !1, AS = !1;
const lf = {
  delta: 0,
  timestamp: 0
}, Mh = [
  "read",
  "update",
  "preRender",
  "render",
  "postRender"
], o1 = Mh.reduce((e, t) => (e[t] = tFe(() => Zp = !0), e), {}), Ni = Mh.reduce((e, t) => {
  const n = o1[t];
  return e[t] = (r, o = !1, i = !1) => (Zp || oFe(), n.schedule(r, o, i)), e;
}, {}), Tf = Mh.reduce((e, t) => (e[t] = o1[t].cancel, e), {}), ww = Mh.reduce((e, t) => (e[t] = () => o1[t].process(lf), e), {}), rFe = (e) => o1[e].process(lf), $$ = (e) => {
  Zp = !1, lf.delta = OS ? M$ : Math.max(Math.min(e - lf.timestamp, nFe), 1), lf.timestamp = e, AS = !0, Mh.forEach(rFe), AS = !1, Zp && (OS = !1, P$($$));
}, oFe = () => {
  Zp = !0, OS = !0, AS || P$($$);
}, E0 = () => lf;
function V$(e, t, n = 0) {
  return e - t - n;
}
function iFe(e, t, n = 0, r = !0) {
  return r ? V$(t + -e, t, n) : t - (e - t) + n;
}
function sFe(e, t, n, r) {
  return r ? e >= t + n : e <= -n;
}
const aFe = (e) => {
  const t = ({ delta: n }) => e(n);
  return {
    start: () => Ni.update(t, !0),
    stop: () => Tf.update(t)
  };
};
function j$(e) {
  var t, n, { from: r, autoplay: o = !0, driver: i = aFe, elapsed: s = 0, repeat: l = 0, repeatType: c = "loop", repeatDelay: f = 0, onPlay: d, onStop: g, onComplete: m, onRepeat: v, onUpdate: b } = e, w = Dr(e, ["from", "autoplay", "driver", "elapsed", "repeat", "repeatType", "repeatDelay", "onPlay", "onStop", "onComplete", "onRepeat", "onUpdate"]);
  let { to: _ } = w, S, x = 0, C = w.duration, E, N = !1, I = !0, D;
  const A = ZRe(w);
  !((n = (t = A).needsInterpolation) === null || n === void 0) && n.call(t, r, _) && (D = vk([0, 100], [r, _], {
    clamp: !1
  }), r = 0, _ = 100);
  const F = A(Object.assign(Object.assign({}, w), { from: r, to: _ }));
  function $() {
    x++, c === "reverse" ? (I = x % 2 === 0, s = iFe(s, C, f, I)) : (s = V$(s, C, f), c === "mirror" && F.flipTarget()), N = !1, v && v();
  }
  function q() {
    S.stop(), m && m();
  }
  function H(B) {
    if (I || (B = -B), s += B, !N) {
      const R = F.next(Math.max(0, s));
      E = R.value, D && (E = D(E)), N = I ? R.done : s <= 0;
    }
    b == null || b(E), N && (x === 0 && (C ?? (C = s)), x < l ? sFe(s, C, f, I) && $() : q());
  }
  function z() {
    d == null || d(), S = i(H), S.start();
  }
  return o && z(), {
    stop: () => {
      g == null || g(), S.stop();
    }
  };
}
function U$(e, t) {
  return t ? e * (1e3 / t) : 0;
}
function lFe({ from: e = 0, velocity: t = 0, min: n, max: r, power: o = 0.8, timeConstant: i = 750, bounceStiffness: s = 500, bounceDamping: l = 10, restDelta: c = 1, modifyTarget: f, driver: d, onUpdate: g, onComplete: m, onStop: v }) {
  let b;
  function w(C) {
    return n !== void 0 && C < n || r !== void 0 && C > r;
  }
  function _(C) {
    return n === void 0 ? r : r === void 0 || Math.abs(n - C) < Math.abs(r - C) ? n : r;
  }
  function S(C) {
    b == null || b.stop(), b = j$(Object.assign(Object.assign({}, C), {
      driver: d,
      onUpdate: (E) => {
        var N;
        g == null || g(E), (N = C.onUpdate) === null || N === void 0 || N.call(C, E);
      },
      onComplete: m,
      onStop: v
    }));
  }
  function x(C) {
    S(Object.assign({ type: "spring", stiffness: s, damping: l, restDelta: c }, C));
  }
  if (w(e))
    x({ from: e, velocity: t, to: _(e) });
  else {
    let C = o * t + e;
    typeof f < "u" && (C = f(C));
    const E = _(C), N = E === n ? -1 : 1;
    let I, D;
    const A = (F) => {
      I = D, D = F, t = U$(F - I, E0().delta), (N === 1 && F > E || N === -1 && F < E) && x({ from: F, to: E, velocity: t });
    };
    S({
      type: "decay",
      from: e,
      velocity: t,
      timeConstant: i,
      power: o,
      restDelta: c,
      modifyTarget: f,
      onUpdate: w(C) ? A : void 0
    });
  }
  return {
    stop: () => b == null ? void 0 : b.stop()
  };
}
const DS = (e) => e.hasOwnProperty("x") && e.hasOwnProperty("y"), PI = (e) => DS(e) && e.hasOwnProperty("z"), Cg = (e, t) => Math.abs(e - t);
function B$(e, t) {
  if (NS(e) && NS(t))
    return Cg(e, t);
  if (DS(e) && DS(t)) {
    const n = Cg(e.x, t.x), r = Cg(e.y, t.y), o = PI(e) && PI(t) ? Cg(e.z, t.z) : 0;
    return Math.sqrt(Math.pow(n, 2) + Math.pow(r, 2) + Math.pow(o, 2));
  }
}
const q$ = (e, t) => 1 - 3 * t + 3 * e, z$ = (e, t) => 3 * t - 6 * e, H$ = (e) => 3 * e, w0 = (e, t, n) => ((q$(t, n) * e + z$(t, n)) * e + H$(t)) * e, W$ = (e, t, n) => 3 * q$(t, n) * e * e + 2 * z$(t, n) * e + H$(t), cFe = 1e-7, uFe = 10;
function fFe(e, t, n, r, o) {
  let i, s, l = 0;
  do
    s = t + (n - t) / 2, i = w0(s, r, o) - e, i > 0 ? n = s : t = s;
  while (Math.abs(i) > cFe && ++l < uFe);
  return s;
}
const dFe = 8, pFe = 1e-3;
function hFe(e, t, n, r) {
  for (let o = 0; o < dFe; ++o) {
    const i = W$(t, n, r);
    if (i === 0)
      return t;
    const s = w0(t, n, r) - e;
    t -= s / i;
  }
  return t;
}
const iv = 11, kg = 1 / (iv - 1);
function mFe(e, t, n, r) {
  if (e === t && n === r)
    return bk;
  const o = new Float32Array(iv);
  for (let s = 0; s < iv; ++s)
    o[s] = w0(s * kg, e, n);
  function i(s) {
    let l = 0, c = 1;
    const f = iv - 1;
    for (; c !== f && o[c] <= s; ++c)
      l += kg;
    --c;
    const d = (s - o[c]) / (o[c + 1] - o[c]), g = l + d * kg, m = W$(g, e, n);
    return m >= pFe ? hFe(s, g, e, n) : m === 0 ? g : fFe(s, l, l + kg, e, n);
  }
  return (s) => s === 0 || s === 1 ? s : w0(i(s), t, r);
}
function gFe(e) {
  var t = e.onTap, n = e.onTapStart, r = e.onTapCancel, o = e.whileTap, i = e.visualElement, s = t || n || r || o, l = k.useRef(!1), c = k.useRef(null), f = {
    passive: !(n || t || r || b)
  };
  function d() {
    var w;
    (w = c.current) === null || w === void 0 || w.call(c), c.current = null;
  }
  function g() {
    var w;
    return d(), l.current = !1, (w = i.animationState) === null || w === void 0 || w.setActive(Pt.Tap, !1), !C$();
  }
  function m(w, _) {
    g() && (k$(i.getInstance(), w.target) ? t == null || t(w, _) : r == null || r(w, _));
  }
  function v(w, _) {
    g() && (r == null || r(w, _));
  }
  function b(w, _) {
    var S;
    d(), !l.current && (l.current = !0, c.current = n1(af(window, "pointerup", m, f), af(window, "pointercancel", v, f)), (S = i.animationState) === null || S === void 0 || S.setActive(Pt.Tap, !0), n == null || n(w, _));
  }
  v0(i, "pointerdown", s ? b : void 0, f), _$(d);
}
var $I = /* @__PURE__ */ new Set();
function vFe(e, t, n) {
  e || $I.has(t) || (console.warn(t), n && console.warn(n), $I.add(t));
}
var IS = /* @__PURE__ */ new WeakMap(), xw = /* @__PURE__ */ new WeakMap(), yFe = function(e) {
  var t;
  (t = IS.get(e.target)) === null || t === void 0 || t(e);
}, bFe = function(e) {
  e.forEach(yFe);
};
function EFe(e) {
  var t = e.root, n = Dr(e, ["root"]), r = t || document;
  xw.has(r) || xw.set(r, {});
  var o = xw.get(r), i = JSON.stringify(n);
  return o[i] || (o[i] = new IntersectionObserver(bFe, Te({ root: t }, n))), o[i];
}
function wFe(e, t, n) {
  var r = EFe(t);
  return IS.set(e, n), r.observe(e), function() {
    IS.delete(e), r.unobserve(e);
  };
}
function xFe(e) {
  var t = e.visualElement, n = e.whileInView, r = e.onViewportEnter, o = e.onViewportLeave, i = e.viewport, s = i === void 0 ? {} : i, l = k.useRef({
    hasEnteredView: !1,
    isInView: !1
  }), c = !!(n || r || o);
  s.once && l.current.hasEnteredView && (c = !1);
  var f = typeof IntersectionObserver > "u" ? CFe : TFe;
  f(c, l.current, t, s);
}
var SFe = {
  some: 0,
  all: 1
};
function TFe(e, t, n, r) {
  var o = r.root, i = r.margin, s = r.amount, l = s === void 0 ? "some" : s, c = r.once;
  k.useEffect(function() {
    if (e) {
      var f = {
        root: o == null ? void 0 : o.current,
        rootMargin: i,
        threshold: typeof l == "number" ? l : SFe[l]
      }, d = function(g) {
        var m, v = g.isIntersecting;
        if (t.isInView !== v && (t.isInView = v, !(c && !v && t.hasEnteredView))) {
          v && (t.hasEnteredView = !0), (m = n.animationState) === null || m === void 0 || m.setActive(Pt.InView, v);
          var b = n.getProps(), w = v ? b.onViewportEnter : b.onViewportLeave;
          w == null || w(g);
        }
      };
      return wFe(n.getInstance(), f, d);
    }
  }, [e, o, i, l]);
}
function CFe(e, t, n, r) {
  var o = r.fallback, i = o === void 0 ? !0 : o;
  k.useEffect(function() {
    !e || !i || (q5 !== "production" && vFe(!1, "IntersectionObserver not available on this device. whileInView animations will trigger on mount."), requestAnimationFrame(function() {
      var s;
      t.hasEnteredView = !0;
      var l = n.getProps().onViewportEnter;
      l == null || l(null), (s = n.animationState) === null || s === void 0 || s.setActive(Pt.InView, !0);
    }));
  }, [e]);
}
var La = function(e) {
  return function(t) {
    return e(t), null;
  };
}, kFe = {
  inView: La(xFe),
  tap: La(gFe),
  focus: La(oRe),
  hover: La(hRe)
}, _Fe = 0, NFe = function() {
  return _Fe++;
}, OFe = function() {
  return ll(NFe);
};
function G$() {
  var e = k.useContext(Xy);
  if (e === null)
    return [!0, null];
  var t = e.isPresent, n = e.onExitComplete, r = e.register, o = OFe();
  k.useEffect(function() {
    return r(o);
  }, []);
  var i = function() {
    return n == null ? void 0 : n(o);
  };
  return !t && n ? [!1, i] : [!0];
}
function Q$(e, t) {
  if (!Array.isArray(t))
    return !1;
  var n = t.length;
  if (n !== e.length)
    return !1;
  for (var r = 0; r < n; r++)
    if (t[r] !== e[r])
      return !1;
  return !0;
}
var x0 = function(e) {
  return e * 1e3;
}, AFe = {
  linear: bk,
  easeIn: Ek,
  easeInOut: R$,
  easeOut: VRe,
  circIn: F$,
  circInOut: jRe,
  circOut: wk,
  backIn: xk,
  backInOut: BRe,
  backOut: URe,
  anticipate: qRe,
  bounceIn: GRe,
  bounceInOut: QRe,
  bounceOut: b0
}, VI = function(e) {
  if (Array.isArray(e)) {
    h0(e.length === 4);
    var t = en(e, 4), n = t[0], r = t[1], o = t[2], i = t[3];
    return mFe(n, r, o, i);
  } else if (typeof e == "string")
    return AFe[e];
  return e;
}, DFe = function(e) {
  return Array.isArray(e) && typeof e[0] != "number";
}, jI = function(e, t) {
  return e === "zIndex" ? !1 : !!(typeof t == "number" || Array.isArray(t) || typeof t == "string" && // It's animatable if we have a string
  Hs.test(t) && // And it contains numbers and/or colors
  !t.startsWith("url("));
}, jl = function() {
  return {
    type: "spring",
    stiffness: 500,
    damping: 25,
    restSpeed: 10
  };
}, _g = function(e) {
  return {
    type: "spring",
    stiffness: 550,
    damping: e === 0 ? 2 * Math.sqrt(550) : 30,
    restSpeed: 10
  };
}, Sw = function() {
  return {
    type: "keyframes",
    ease: "linear",
    duration: 0.3
  };
}, IFe = function(e) {
  return {
    type: "keyframes",
    duration: 0.8,
    values: e
  };
}, UI = {
  x: jl,
  y: jl,
  z: jl,
  rotate: jl,
  rotateX: jl,
  rotateY: jl,
  rotateZ: jl,
  scaleX: _g,
  scaleY: _g,
  scale: _g,
  opacity: Sw,
  backgroundColor: Sw,
  color: Sw,
  default: _g
}, LFe = function(e, t) {
  var n;
  return Jp(t) ? n = IFe : n = UI[e] || UI.default, Te({ to: t }, n(t));
}, RFe = Te(Te({}, l$), {
  // Color props
  color: jr,
  backgroundColor: jr,
  outlineColor: jr,
  fill: jr,
  stroke: jr,
  // Border props
  borderColor: jr,
  borderTopColor: jr,
  borderRightColor: jr,
  borderBottomColor: jr,
  borderLeftColor: jr,
  filter: CS,
  WebkitFilter: CS
}), Sk = function(e) {
  return RFe[e];
};
function Tk(e, t) {
  var n, r = Sk(e);
  return r !== CS && (r = Hs), (n = r.getAnimatableNone) === null || n === void 0 ? void 0 : n.call(r, t);
}
function FFe(e) {
  e.when, e.delay, e.delayChildren, e.staggerChildren, e.staggerDirection, e.repeat, e.repeatType, e.repeatDelay, e.from;
  var t = Dr(e, ["when", "delay", "delayChildren", "staggerChildren", "staggerDirection", "repeat", "repeatType", "repeatDelay", "from"]);
  return !!Object.keys(t).length;
}
function MFe(e) {
  var t = e.ease, n = e.times, r = e.yoyo, o = e.flip, i = e.loop, s = Dr(e, ["ease", "times", "yoyo", "flip", "loop"]), l = Te({}, s);
  return n && (l.offset = n), s.duration && (l.duration = x0(s.duration)), s.repeatDelay && (l.repeatDelay = x0(s.repeatDelay)), t && (l.ease = DFe(t) ? t.map(VI) : VI(t)), s.type === "tween" && (l.type = "keyframes"), (r || i || o) && (r ? l.repeatType = "reverse" : i ? l.repeatType = "loop" : o && (l.repeatType = "mirror"), l.repeat = i || r || o || s.repeat), s.type !== "spring" && (l.type = "keyframes"), l;
}
function PFe(e, t) {
  var n, r, o = Ck(e, t) || {};
  return (r = (n = o.delay) !== null && n !== void 0 ? n : e.delay) !== null && r !== void 0 ? r : 0;
}
function $Fe(e) {
  return Array.isArray(e.to) && e.to[0] === null && (e.to = _i([], en(e.to), !1), e.to[0] = e.from), e;
}
function VFe(e, t, n) {
  var r;
  return Array.isArray(t.to) && ((r = e.duration) !== null && r !== void 0 || (e.duration = 0.8)), $Fe(t), FFe(e) || (e = Te(Te({}, e), LFe(n, t.to))), Te(Te({}, t), MFe(e));
}
function jFe(e, t, n, r, o) {
  var i, s = Ck(r, e), l = (i = s.from) !== null && i !== void 0 ? i : t.get(), c = jI(e, n);
  l === "none" && c && typeof n == "string" ? l = Tk(e, n) : BI(l) && typeof n == "string" ? l = qI(n) : !Array.isArray(n) && BI(n) && typeof l == "string" && (n = qI(l));
  var f = jI(e, l);
  function d() {
    var m = {
      from: l,
      to: n,
      velocity: t.getVelocity(),
      onComplete: o,
      onUpdate: function(v) {
        return t.set(v);
      }
    };
    return s.type === "inertia" || s.type === "decay" ? lFe(Te(Te({}, m), s)) : j$(Te(Te({}, VFe(s, m, e)), { onUpdate: function(v) {
      var b;
      m.onUpdate(v), (b = s.onUpdate) === null || b === void 0 || b.call(s, v);
    }, onComplete: function() {
      var v;
      m.onComplete(), (v = s.onComplete) === null || v === void 0 || v.call(s);
    } }));
  }
  function g() {
    var m, v, b = v$(n);
    return t.set(b), o(), (m = s == null ? void 0 : s.onUpdate) === null || m === void 0 || m.call(s, b), (v = s == null ? void 0 : s.onComplete) === null || v === void 0 || v.call(s), { stop: function() {
    } };
  }
  return !f || !c || s.type === !1 ? g : d;
}
function BI(e) {
  return e === 0 || typeof e == "string" && parseFloat(e) === 0 && e.indexOf(" ") === -1;
}
function qI(e) {
  return typeof e == "number" ? 0 : Tk("", e);
}
function Ck(e, t) {
  return e[t] || e.default || e;
}
function kk(e, t, n, r) {
  return r === void 0 && (r = {}), t.start(function(o) {
    var i, s, l = jFe(e, t, n, r, o), c = PFe(r, e), f = function() {
      return s = l();
    };
    return c ? i = window.setTimeout(f, x0(c)) : f(), function() {
      clearTimeout(i), s == null || s.stop();
    };
  });
}
var UFe = function(e) {
  return /^\-?\d*\.?\d+$/.test(e);
}, BFe = function(e) {
  return /^0[^.\s]+$/.test(e);
};
function _k(e, t) {
  e.indexOf(t) === -1 && e.push(t);
}
function Nk(e, t) {
  var n = e.indexOf(t);
  n > -1 && e.splice(n, 1);
}
function qFe(e, t, n) {
  var r = en(e), o = r.slice(0), i = t < 0 ? o.length + t : t;
  if (i >= 0 && i < o.length) {
    var s = n < 0 ? o.length + n : n, l = en(o.splice(t, 1), 1), c = l[0];
    o.splice(s, 0, c);
  }
  return o;
}
var up = (
  /** @class */
  function() {
    function e() {
      this.subscriptions = [];
    }
    return e.prototype.add = function(t) {
      var n = this;
      return _k(this.subscriptions, t), function() {
        return Nk(n.subscriptions, t);
      };
    }, e.prototype.notify = function(t, n, r) {
      var o = this.subscriptions.length;
      if (o)
        if (o === 1)
          this.subscriptions[0](t, n, r);
        else
          for (var i = 0; i < o; i++) {
            var s = this.subscriptions[i];
            s && s(t, n, r);
          }
    }, e.prototype.getSize = function() {
      return this.subscriptions.length;
    }, e.prototype.clear = function() {
      this.subscriptions.length = 0;
    }, e;
  }()
), zFe = function(e) {
  return !isNaN(parseFloat(e));
}, HFe = (
  /** @class */
  function() {
    function e(t) {
      var n = this;
      this.version = "6.5.1", this.timeDelta = 0, this.lastUpdated = 0, this.updateSubscribers = new up(), this.velocityUpdateSubscribers = new up(), this.renderSubscribers = new up(), this.canTrackVelocity = !1, this.updateAndNotify = function(r, o) {
        o === void 0 && (o = !0), n.prev = n.current, n.current = r;
        var i = E0(), s = i.delta, l = i.timestamp;
        n.lastUpdated !== l && (n.timeDelta = s, n.lastUpdated = l, Ni.postRender(n.scheduleVelocityCheck)), n.prev !== n.current && n.updateSubscribers.notify(n.current), n.velocityUpdateSubscribers.getSize() && n.velocityUpdateSubscribers.notify(n.getVelocity()), o && n.renderSubscribers.notify(n.current);
      }, this.scheduleVelocityCheck = function() {
        return Ni.postRender(n.velocityCheck);
      }, this.velocityCheck = function(r) {
        var o = r.timestamp;
        o !== n.lastUpdated && (n.prev = n.current, n.velocityUpdateSubscribers.notify(n.getVelocity()));
      }, this.hasAnimated = !1, this.prev = this.current = t, this.canTrackVelocity = zFe(this.current);
    }
    return e.prototype.onChange = function(t) {
      return this.updateSubscribers.add(t);
    }, e.prototype.clearListeners = function() {
      this.updateSubscribers.clear();
    }, e.prototype.onRenderRequest = function(t) {
      return t(this.get()), this.renderSubscribers.add(t);
    }, e.prototype.attach = function(t) {
      this.passiveEffect = t;
    }, e.prototype.set = function(t, n) {
      n === void 0 && (n = !0), !n || !this.passiveEffect ? this.updateAndNotify(t, n) : this.passiveEffect(t, this.updateAndNotify);
    }, e.prototype.get = function() {
      return this.current;
    }, e.prototype.getPrevious = function() {
      return this.prev;
    }, e.prototype.getVelocity = function() {
      return this.canTrackVelocity ? (
        // These casts could be avoided if parseFloat would be typed better
        U$(parseFloat(this.current) - parseFloat(this.prev), this.timeDelta)
      ) : 0;
    }, e.prototype.start = function(t) {
      var n = this;
      return this.stop(), new Promise(function(r) {
        n.hasAnimated = !0, n.stopAnimation = t(r);
      }).then(function() {
        return n.clearAnimation();
      });
    }, e.prototype.stop = function() {
      this.stopAnimation && this.stopAnimation(), this.clearAnimation();
    }, e.prototype.isAnimating = function() {
      return !!this.stopAnimation;
    }, e.prototype.clearAnimation = function() {
      this.stopAnimation = null;
    }, e.prototype.destroy = function() {
      this.updateSubscribers.clear(), this.renderSubscribers.clear(), this.stop();
    }, e;
  }()
);
function xc(e) {
  return new HFe(e);
}
var Y$ = function(e) {
  return function(t) {
    return t.test(e);
  };
}, WFe = {
  test: function(e) {
    return e === "auto";
  },
  parse: function(e) {
    return e;
  }
}, K$ = [Fc, Xe, Zi, ya, ALe, OLe, WFe], Rd = function(e) {
  return K$.find(Y$(e));
}, GFe = _i(_i([], en(K$), !1), [jr, Hs], !1), QFe = function(e) {
  return GFe.find(Y$(e));
};
function YFe(e, t, n) {
  e.hasValue(t) ? e.getValue(t).set(n) : e.addValue(t, xc(n));
}
function KFe(e, t) {
  var n = Zy(e, t), r = n ? e.makeTargetAnimatable(n, !1) : {}, o = r.transitionEnd, i = o === void 0 ? {} : o;
  r.transition;
  var s = Dr(r, ["transitionEnd", "transition"]);
  s = Te(Te({}, s), i);
  for (var l in s) {
    var c = v$(s[l]);
    YFe(e, l, c);
  }
}
function JFe(e, t, n) {
  var r, o, i, s, l = Object.keys(t).filter(function(v) {
    return !e.hasValue(v);
  }), c = l.length;
  if (c)
    for (var f = 0; f < c; f++) {
      var d = l[f], g = t[d], m = null;
      Array.isArray(g) && (m = g[0]), m === null && (m = (o = (r = n[d]) !== null && r !== void 0 ? r : e.readValue(d)) !== null && o !== void 0 ? o : t[d]), m != null && (typeof m == "string" && (UFe(m) || BFe(m)) ? m = parseFloat(m) : !QFe(m) && Hs.test(g) && (m = Tk(d, g)), e.addValue(d, xc(m)), (i = (s = n)[d]) !== null && i !== void 0 || (s[d] = m), e.setBaseTarget(d, m));
    }
}
function XFe(e, t) {
  if (t) {
    var n = t[e] || t.default || t;
    return n.from;
  }
}
function ZFe(e, t, n) {
  var r, o, i = {};
  for (var s in e)
    i[s] = (r = XFe(s, t)) !== null && r !== void 0 ? r : (o = n.getValue(s)) === null || o === void 0 ? void 0 : o.get();
  return i;
}
function eMe(e, t, n) {
  n === void 0 && (n = {}), e.notifyAnimationStart(t);
  var r;
  if (Array.isArray(t)) {
    var o = t.map(function(s) {
      return LS(e, s, n);
    });
    r = Promise.all(o);
  } else if (typeof t == "string")
    r = LS(e, t, n);
  else {
    var i = typeof t == "function" ? Zy(e, t, n.custom) : t;
    r = J$(e, i, n);
  }
  return r.then(function() {
    return e.notifyAnimationComplete(t);
  });
}
function LS(e, t, n) {
  var r;
  n === void 0 && (n = {});
  var o = Zy(e, t, n.custom), i = (o || {}).transition, s = i === void 0 ? e.getDefaultTransition() || {} : i;
  n.transitionOverride && (s = n.transitionOverride);
  var l = o ? function() {
    return J$(e, o, n);
  } : function() {
    return Promise.resolve();
  }, c = !((r = e.variantChildren) === null || r === void 0) && r.size ? function(v) {
    v === void 0 && (v = 0);
    var b = s.delayChildren, w = b === void 0 ? 0 : b, _ = s.staggerChildren, S = s.staggerDirection;
    return tMe(e, t, w + v, _, S, n);
  } : function() {
    return Promise.resolve();
  }, f = s.when;
  if (f) {
    var d = en(f === "beforeChildren" ? [l, c] : [c, l], 2), g = d[0], m = d[1];
    return g().then(m);
  } else
    return Promise.all([l(), c(n.delay)]);
}
function J$(e, t, n) {
  var r, o = n === void 0 ? {} : n, i = o.delay, s = i === void 0 ? 0 : i, l = o.transitionOverride, c = o.type, f = e.makeTargetAnimatable(t), d = f.transition, g = d === void 0 ? e.getDefaultTransition() : d, m = f.transitionEnd, v = Dr(f, ["transition", "transitionEnd"]);
  l && (g = l);
  var b = [], w = c && ((r = e.animationState) === null || r === void 0 ? void 0 : r.getState()[c]);
  for (var _ in v) {
    var S = e.getValue(_), x = v[_];
    if (!(!S || x === void 0 || w && rMe(w, _))) {
      var C = Te({ delay: s }, g);
      e.shouldReduceMotion && Lh(_) && (C = Te(Te({}, C), { type: !1, delay: 0 }));
      var E = kk(_, S, x, C);
      b.push(E);
    }
  }
  return Promise.all(b).then(function() {
    m && KFe(e, m);
  });
}
function tMe(e, t, n, r, o, i) {
  n === void 0 && (n = 0), r === void 0 && (r = 0), o === void 0 && (o = 1);
  var s = [], l = (e.variantChildren.size - 1) * r, c = o === 1 ? function(f) {
    return f === void 0 && (f = 0), f * r;
  } : function(f) {
    return f === void 0 && (f = 0), l - f * r;
  };
  return Array.from(e.variantChildren).sort(nMe).forEach(function(f, d) {
    s.push(LS(f, t, Te(Te({}, i), { delay: n + c(d) })).then(function() {
      return f.notifyAnimationComplete(t);
    }));
  }), Promise.all(s);
}
function nMe(e, t) {
  return e.sortNodePosition(t);
}
function rMe(e, t) {
  var n = e.protectedKeys, r = e.needsAnimating, o = n.hasOwnProperty(t) && r[t] !== !0;
  return r[t] = !1, o;
}
var Ok = [
  Pt.Animate,
  Pt.InView,
  Pt.Focus,
  Pt.Hover,
  Pt.Tap,
  Pt.Drag,
  Pt.Exit
], oMe = _i([], en(Ok), !1).reverse(), iMe = Ok.length;
function sMe(e) {
  return function(t) {
    return Promise.all(t.map(function(n) {
      var r = n.animation, o = n.options;
      return eMe(e, r, o);
    }));
  };
}
function aMe(e) {
  var t = sMe(e), n = cMe(), r = {}, o = !0, i = function(d, g) {
    var m = Zy(e, g);
    if (m) {
      m.transition;
      var v = m.transitionEnd, b = Dr(m, ["transition", "transitionEnd"]);
      d = Te(Te(Te({}, d), b), v);
    }
    return d;
  };
  function s(d) {
    return r[d] !== void 0;
  }
  function l(d) {
    t = d(e);
  }
  function c(d, g) {
    for (var m, v = e.getProps(), b = e.getVariantContext(!0) || {}, w = [], _ = /* @__PURE__ */ new Set(), S = {}, x = 1 / 0, C = function(D) {
      var A = oMe[D], F = n[A], $ = (m = v[A]) !== null && m !== void 0 ? m : b[A], q = vi($), H = A === g ? F.isActive : null;
      H === !1 && (x = D);
      var z = $ === b[A] && $ !== v[A] && q;
      if (z && o && e.manuallyAnimateOnMount && (z = !1), F.protectedKeys = Te({}, S), // If it isn't active and hasn't *just* been set as inactive
      !F.isActive && H === null || // If we didn't and don't have any defined prop for this animation type
      !$ && !F.prevProp || // Or if the prop doesn't define an animation
      hk($) || typeof $ == "boolean")
        return "continue";
      var B = lMe(F.prevProp, $), R = B || // If we're making this variant active, we want to always make it active
      A === g && F.isActive && !z && q || // If we removed a higher-priority variant (i is in reverse order)
      D > x && q, te = Array.isArray($) ? $ : [$], Q = te.reduce(i, {});
      H === !1 && (Q = {});
      var Y = F.prevResolvedValues, K = Y === void 0 ? {} : Y, Z = Te(Te({}, K), Q), re = function(ae) {
        R = !0, _.delete(ae), F.needsAnimating[ae] = !0;
      };
      for (var J in Z) {
        var ie = Q[J], ne = K[J];
        S.hasOwnProperty(J) || (ie !== ne ? Jp(ie) && Jp(ne) ? !Q$(ie, ne) || B ? re(J) : F.protectedKeys[J] = !0 : ie !== void 0 ? re(J) : _.add(J) : ie !== void 0 && _.has(J) ? re(J) : F.protectedKeys[J] = !0);
      }
      F.prevProp = $, F.prevResolvedValues = Q, F.isActive && (S = Te(Te({}, S), Q)), o && e.blockInitialAnimation && (R = !1), R && !z && w.push.apply(w, _i([], en(te.map(function(ae) {
        return {
          animation: ae,
          options: Te({ type: A }, d)
        };
      })), !1));
    }, E = 0; E < iMe; E++)
      C(E);
    if (r = Te({}, S), _.size) {
      var N = {};
      _.forEach(function(D) {
        var A = e.getBaseTarget(D);
        A !== void 0 && (N[D] = A);
      }), w.push({ animation: N });
    }
    var I = !!w.length;
    return o && v.initial === !1 && !e.manuallyAnimateOnMount && (I = !1), o = !1, I ? t(w) : Promise.resolve();
  }
  function f(d, g, m) {
    var v;
    if (n[d].isActive === g)
      return Promise.resolve();
    (v = e.variantChildren) === null || v === void 0 || v.forEach(function(_) {
      var S;
      return (S = _.animationState) === null || S === void 0 ? void 0 : S.setActive(d, g);
    }), n[d].isActive = g;
    var b = c(m, d);
    for (var w in n)
      n[w].protectedKeys = {};
    return b;
  }
  return {
    isAnimated: s,
    animateChanges: c,
    setActive: f,
    setAnimateFunction: l,
    getState: function() {
      return n;
    }
  };
}
function lMe(e, t) {
  return typeof t == "string" ? t !== e : G5(t) ? !Q$(t, e) : !1;
}
function Ul(e) {
  return e === void 0 && (e = !1), {
    isActive: e,
    protectedKeys: {},
    needsAnimating: {},
    prevResolvedValues: {}
  };
}
function cMe() {
  var e;
  return e = {}, e[Pt.Animate] = Ul(!0), e[Pt.InView] = Ul(), e[Pt.Hover] = Ul(), e[Pt.Tap] = Ul(), e[Pt.Drag] = Ul(), e[Pt.Focus] = Ul(), e[Pt.Exit] = Ul(), e;
}
var uMe = {
  animation: La(function(e) {
    var t = e.visualElement, n = e.animate;
    t.animationState || (t.animationState = aMe(t)), hk(n) && k.useEffect(function() {
      return n.subscribe(t);
    }, [n]);
  }),
  exit: La(function(e) {
    var t = e.custom, n = e.visualElement, r = en(G$(), 2), o = r[0], i = r[1], s = k.useContext(Xy);
    k.useEffect(function() {
      var l, c;
      n.isPresent = o;
      var f = (l = n.animationState) === null || l === void 0 ? void 0 : l.setActive(Pt.Exit, !o, { custom: (c = s == null ? void 0 : s.custom) !== null && c !== void 0 ? c : t });
      !o && (f == null || f.then(i));
    }, [o]);
  })
}, X$ = (
  /** @class */
  function() {
    function e(t, n, r) {
      var o = this, i = r === void 0 ? {} : r, s = i.transformPagePoint;
      if (this.startEvent = null, this.lastMoveEvent = null, this.lastMoveEventInfo = null, this.handlers = {}, this.updatePoint = function() {
        if (o.lastMoveEvent && o.lastMoveEventInfo) {
          var m = Cw(o.lastMoveEventInfo, o.history), v = o.startEvent !== null, b = B$(m.offset, { x: 0, y: 0 }) >= 3;
          if (!(!v && !b)) {
            var w = m.point, _ = E0().timestamp;
            o.history.push(Te(Te({}, w), { timestamp: _ }));
            var S = o.handlers, x = S.onStart, C = S.onMove;
            v || (x && x(o.lastMoveEvent, m), o.startEvent = o.lastMoveEvent), C && C(o.lastMoveEvent, m);
          }
        }
      }, this.handlePointerMove = function(m, v) {
        if (o.lastMoveEvent = m, o.lastMoveEventInfo = Tw(v, o.transformPagePoint), b$(m) && m.buttons === 0) {
          o.handlePointerUp(m, v);
          return;
        }
        Ni.update(o.updatePoint, !0);
      }, this.handlePointerUp = function(m, v) {
        o.end();
        var b = o.handlers, w = b.onEnd, _ = b.onSessionEnd, S = Cw(Tw(v, o.transformPagePoint), o.history);
        o.startEvent && w && w(m, S), _ && _(m, S);
      }, !(E$(t) && t.touches.length > 1)) {
        this.handlers = n, this.transformPagePoint = s;
        var l = mk(t), c = Tw(l, this.transformPagePoint), f = c.point, d = E0().timestamp;
        this.history = [Te(Te({}, f), { timestamp: d })];
        var g = n.onSessionStart;
        g && g(t, Cw(c, this.history)), this.removeListeners = n1(af(window, "pointermove", this.handlePointerMove), af(window, "pointerup", this.handlePointerUp), af(window, "pointercancel", this.handlePointerUp));
      }
    }
    return e.prototype.updateHandlers = function(t) {
      this.handlers = t;
    }, e.prototype.end = function() {
      this.removeListeners && this.removeListeners(), Tf.update(this.updatePoint);
    }, e;
  }()
);
function Tw(e, t) {
  return t ? { point: t(e.point) } : e;
}
function zI(e, t) {
  return { x: e.x - t.x, y: e.y - t.y };
}
function Cw(e, t) {
  var n = e.point;
  return {
    point: n,
    delta: zI(n, Z$(t)),
    offset: zI(n, fMe(t)),
    velocity: dMe(t, 0.1)
  };
}
function fMe(e) {
  return e[0];
}
function Z$(e) {
  return e[e.length - 1];
}
function dMe(e, t) {
  if (e.length < 2)
    return { x: 0, y: 0 };
  for (var n = e.length - 1, r = null, o = Z$(e); n >= 0 && (r = e[n], !(o.timestamp - r.timestamp > x0(t))); )
    n--;
  if (!r)
    return { x: 0, y: 0 };
  var i = (o.timestamp - r.timestamp) / 1e3;
  if (i === 0)
    return { x: 0, y: 0 };
  var s = {
    x: (o.x - r.x) / i,
    y: (o.y - r.y) / i
  };
  return s.x === 1 / 0 && (s.x = 0), s.y === 1 / 0 && (s.y = 0), s;
}
function Ws(e) {
  return e.max - e.min;
}
function HI(e, t, n) {
  return t === void 0 && (t = 0), n === void 0 && (n = 0.01), B$(e, t) < n;
}
function WI(e, t, n, r) {
  r === void 0 && (r = 0.5), e.origin = r, e.originPoint = an(t.min, t.max, e.origin), e.scale = Ws(n) / Ws(t), (HI(e.scale, 1, 1e-4) || isNaN(e.scale)) && (e.scale = 1), e.translate = an(n.min, n.max, e.origin) - e.originPoint, (HI(e.translate) || isNaN(e.translate)) && (e.translate = 0);
}
function fp(e, t, n, r) {
  WI(e.x, t.x, n.x, r == null ? void 0 : r.originX), WI(e.y, t.y, n.y, r == null ? void 0 : r.originY);
}
function GI(e, t, n) {
  e.min = n.min + t.min, e.max = e.min + Ws(t);
}
function pMe(e, t, n) {
  GI(e.x, t.x, n.x), GI(e.y, t.y, n.y);
}
function QI(e, t, n) {
  e.min = t.min - n.min, e.max = e.min + Ws(t);
}
function dp(e, t, n) {
  QI(e.x, t.x, n.x), QI(e.y, t.y, n.y);
}
function hMe(e, t, n) {
  var r = t.min, o = t.max;
  return r !== void 0 && e < r ? e = n ? an(r, e, n.min) : Math.max(e, r) : o !== void 0 && e > o && (e = n ? an(o, e, n.max) : Math.min(e, o)), e;
}
function YI(e, t, n) {
  return {
    min: t !== void 0 ? e.min + t : void 0,
    max: n !== void 0 ? e.max + n - (e.max - e.min) : void 0
  };
}
function mMe(e, t) {
  var n = t.top, r = t.left, o = t.bottom, i = t.right;
  return {
    x: YI(e.x, r, i),
    y: YI(e.y, n, o)
  };
}
function KI(e, t) {
  var n, r = t.min - e.min, o = t.max - e.max;
  return t.max - t.min < e.max - e.min && (n = en([o, r], 2), r = n[0], o = n[1]), { min: r, max: o };
}
function gMe(e, t) {
  return {
    x: KI(e.x, t.x),
    y: KI(e.y, t.y)
  };
}
function vMe(e, t) {
  var n = 0.5, r = Ws(e), o = Ws(t);
  return o > r ? n = Xp(t.min, t.max - r, e.min) : r > o && (n = Xp(e.min, e.max - o, t.min)), y0(0, 1, n);
}
function yMe(e, t) {
  var n = {};
  return t.min !== void 0 && (n.min = t.min - e.min), t.max !== void 0 && (n.max = t.max - e.min), n;
}
var RS = 0.35;
function bMe(e) {
  return e === void 0 && (e = RS), e === !1 ? e = 0 : e === !0 && (e = RS), {
    x: JI(e, "left", "right"),
    y: JI(e, "top", "bottom")
  };
}
function JI(e, t, n) {
  return {
    min: XI(e, t),
    max: XI(e, n)
  };
}
function XI(e, t) {
  var n;
  return typeof e == "number" ? e : (n = e[t]) !== null && n !== void 0 ? n : 0;
}
var ZI = function() {
  return {
    translate: 0,
    scale: 1,
    origin: 0,
    originPoint: 0
  };
}, pp = function() {
  return {
    x: ZI(),
    y: ZI()
  };
}, eL = function() {
  return { min: 0, max: 0 };
}, xr = function() {
  return {
    x: eL(),
    y: eL()
  };
};
function Qi(e) {
  return [e("x"), e("y")];
}
function e4(e) {
  var t = e.top, n = e.left, r = e.right, o = e.bottom;
  return {
    x: { min: n, max: r },
    y: { min: t, max: o }
  };
}
function EMe(e) {
  var t = e.x, n = e.y;
  return { top: n.min, right: t.max, bottom: n.max, left: t.min };
}
function wMe(e, t) {
  if (!t)
    return e;
  var n = t({ x: e.left, y: e.top }), r = t({ x: e.right, y: e.bottom });
  return {
    top: n.y,
    left: n.x,
    bottom: r.y,
    right: r.x
  };
}
function kw(e) {
  return e === void 0 || e === 1;
}
function t4(e) {
  var t = e.scale, n = e.scaleX, r = e.scaleY;
  return !kw(t) || !kw(n) || !kw(r);
}
function ba(e) {
  return t4(e) || tL(e.x) || tL(e.y) || e.z || e.rotate || e.rotateX || e.rotateY;
}
function tL(e) {
  return e && e !== "0%";
}
function S0(e, t, n) {
  var r = e - n, o = t * r;
  return n + o;
}
function nL(e, t, n, r, o) {
  return o !== void 0 && (e = S0(e, o, r)), S0(e, n, r) + t;
}
function FS(e, t, n, r, o) {
  t === void 0 && (t = 0), n === void 0 && (n = 1), e.min = nL(e.min, t, n, r, o), e.max = nL(e.max, t, n, r, o);
}
function n4(e, t) {
  var n = t.x, r = t.y;
  FS(e.x, n.translate, n.scale, n.originPoint), FS(e.y, r.translate, r.scale, r.originPoint);
}
function xMe(e, t, n, r) {
  var o, i;
  r === void 0 && (r = !1);
  var s = n.length;
  if (s) {
    t.x = t.y = 1;
    for (var l, c, f = 0; f < s; f++)
      l = n[f], c = l.projectionDelta, ((i = (o = l.instance) === null || o === void 0 ? void 0 : o.style) === null || i === void 0 ? void 0 : i.display) !== "contents" && (r && l.options.layoutScroll && l.scroll && l !== l.root && Gu(e, { x: -l.scroll.x, y: -l.scroll.y }), c && (t.x *= c.x.scale, t.y *= c.y.scale, n4(e, c)), r && ba(l.latestValues) && Gu(e, l.latestValues));
  }
}
function Ta(e, t) {
  e.min = e.min + t, e.max = e.max + t;
}
function rL(e, t, n) {
  var r = en(n, 3), o = r[0], i = r[1], s = r[2], l = t[s] !== void 0 ? t[s] : 0.5, c = an(e.min, e.max, l);
  FS(e, t[o], t[i], c, t.scale);
}
var SMe = ["x", "scaleX", "originX"], TMe = ["y", "scaleY", "originY"];
function Gu(e, t) {
  rL(e.x, t, SMe), rL(e.y, t, TMe);
}
function r4(e, t) {
  return e4(wMe(e.getBoundingClientRect(), t));
}
function CMe(e, t, n) {
  var r = r4(e, n), o = t.scroll;
  return o && (Ta(r.x, o.x), Ta(r.y, o.y)), r;
}
var kMe = /* @__PURE__ */ new WeakMap(), _Me = (
  /** @class */
  function() {
    function e(t) {
      this.openGlobalLock = null, this.isDragging = !1, this.currentDirection = null, this.originPoint = { x: 0, y: 0 }, this.constraints = !1, this.hasMutatedConstraints = !1, this.elastic = xr(), this.visualElement = t;
    }
    return e.prototype.start = function(t, n) {
      var r = this, o = n === void 0 ? {} : n, i = o.snapToCursor, s = i === void 0 ? !1 : i;
      if (this.visualElement.isPresent !== !1) {
        var l = function(g) {
          r.stopAnimation(), s && r.snapToCursor(mk(g, "page").point);
        }, c = function(g, m) {
          var v, b = r.getProps(), w = b.drag, _ = b.dragPropagation, S = b.onDragStart;
          w && !_ && (r.openGlobalLock && r.openGlobalLock(), r.openGlobalLock = T$(w), !r.openGlobalLock) || (r.isDragging = !0, r.currentDirection = null, r.resolveConstraints(), r.visualElement.projection && (r.visualElement.projection.isAnimationBlocked = !0, r.visualElement.projection.target = void 0), Qi(function(x) {
            var C, E, N = r.getAxisMotionValue(x).get() || 0;
            if (Zi.test(N)) {
              var I = (E = (C = r.visualElement.projection) === null || C === void 0 ? void 0 : C.layout) === null || E === void 0 ? void 0 : E.actual[x];
              if (I) {
                var D = Ws(I);
                N = D * (parseFloat(N) / 100);
              }
            }
            r.originPoint[x] = N;
          }), S == null || S(g, m), (v = r.visualElement.animationState) === null || v === void 0 || v.setActive(Pt.Drag, !0));
        }, f = function(g, m) {
          var v = r.getProps(), b = v.dragPropagation, w = v.dragDirectionLock, _ = v.onDirectionLock, S = v.onDrag;
          if (!(!b && !r.openGlobalLock)) {
            var x = m.offset;
            if (w && r.currentDirection === null) {
              r.currentDirection = NMe(x), r.currentDirection !== null && (_ == null || _(r.currentDirection));
              return;
            }
            r.updateAxis("x", m.point, x), r.updateAxis("y", m.point, x), r.visualElement.syncRender(), S == null || S(g, m);
          }
        }, d = function(g, m) {
          return r.stop(g, m);
        };
        this.panSession = new X$(t, {
          onSessionStart: l,
          onStart: c,
          onMove: f,
          onSessionEnd: d
        }, { transformPagePoint: this.visualElement.getTransformPagePoint() });
      }
    }, e.prototype.stop = function(t, n) {
      var r = this.isDragging;
      if (this.cancel(), !!r) {
        var o = n.velocity;
        this.startAnimation(o);
        var i = this.getProps().onDragEnd;
        i == null || i(t, n);
      }
    }, e.prototype.cancel = function() {
      var t, n;
      this.isDragging = !1, this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !1), (t = this.panSession) === null || t === void 0 || t.end(), this.panSession = void 0;
      var r = this.getProps().dragPropagation;
      !r && this.openGlobalLock && (this.openGlobalLock(), this.openGlobalLock = null), (n = this.visualElement.animationState) === null || n === void 0 || n.setActive(Pt.Drag, !1);
    }, e.prototype.updateAxis = function(t, n, r) {
      var o = this.getProps().drag;
      if (!(!r || !Ng(t, o, this.currentDirection))) {
        var i = this.getAxisMotionValue(t), s = this.originPoint[t] + r[t];
        this.constraints && this.constraints[t] && (s = hMe(s, this.constraints[t], this.elastic[t])), i.set(s);
      }
    }, e.prototype.resolveConstraints = function() {
      var t = this, n = this.getProps(), r = n.dragConstraints, o = n.dragElastic, i = (this.visualElement.projection || {}).layout, s = this.constraints;
      r && Wu(r) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : r && i ? this.constraints = mMe(i.actual, r) : this.constraints = !1, this.elastic = bMe(o), s !== this.constraints && i && this.constraints && !this.hasMutatedConstraints && Qi(function(l) {
        t.getAxisMotionValue(l) && (t.constraints[l] = yMe(i.actual[l], t.constraints[l]));
      });
    }, e.prototype.resolveRefConstraints = function() {
      var t = this.getProps(), n = t.dragConstraints, r = t.onMeasureDragConstraints;
      if (!n || !Wu(n))
        return !1;
      var o = n.current, i = this.visualElement.projection;
      if (!i || !i.layout)
        return !1;
      var s = CMe(o, i.root, this.visualElement.getTransformPagePoint()), l = gMe(i.layout.actual, s);
      if (r) {
        var c = r(EMe(l));
        this.hasMutatedConstraints = !!c, c && (l = e4(c));
      }
      return l;
    }, e.prototype.startAnimation = function(t) {
      var n = this, r = this.getProps(), o = r.drag, i = r.dragMomentum, s = r.dragElastic, l = r.dragTransition, c = r.dragSnapToOrigin, f = r.onDragTransitionEnd, d = this.constraints || {}, g = Qi(function(m) {
        var v;
        if (Ng(m, o, n.currentDirection)) {
          var b = (v = d == null ? void 0 : d[m]) !== null && v !== void 0 ? v : {};
          c && (b = { min: 0, max: 0 });
          var w = s ? 200 : 1e6, _ = s ? 40 : 1e7, S = Te(Te({ type: "inertia", velocity: i ? t[m] : 0, bounceStiffness: w, bounceDamping: _, timeConstant: 750, restDelta: 1, restSpeed: 10 }, l), b);
          return n.startAxisValueAnimation(m, S);
        }
      });
      return Promise.all(g).then(f);
    }, e.prototype.startAxisValueAnimation = function(t, n) {
      var r = this.getAxisMotionValue(t);
      return kk(t, r, 0, n);
    }, e.prototype.stopAnimation = function() {
      var t = this;
      Qi(function(n) {
        return t.getAxisMotionValue(n).stop();
      });
    }, e.prototype.getAxisMotionValue = function(t) {
      var n, r, o = "_drag" + t.toUpperCase(), i = this.visualElement.getProps()[o];
      return i || this.visualElement.getValue(t, (r = (n = this.visualElement.getProps().initial) === null || n === void 0 ? void 0 : n[t]) !== null && r !== void 0 ? r : 0);
    }, e.prototype.snapToCursor = function(t) {
      var n = this;
      Qi(function(r) {
        var o = n.getProps().drag;
        if (Ng(r, o, n.currentDirection)) {
          var i = n.visualElement.projection, s = n.getAxisMotionValue(r);
          if (i && i.layout) {
            var l = i.layout.actual[r], c = l.min, f = l.max;
            s.set(t[r] - an(c, f, 0.5));
          }
        }
      });
    }, e.prototype.scalePositionWithinConstraints = function() {
      var t = this, n, r = this.getProps(), o = r.drag, i = r.dragConstraints, s = this.visualElement.projection;
      if (!(!Wu(i) || !s || !this.constraints)) {
        this.stopAnimation();
        var l = { x: 0, y: 0 };
        Qi(function(f) {
          var d = t.getAxisMotionValue(f);
          if (d) {
            var g = d.get();
            l[f] = vMe({ min: g, max: g }, t.constraints[f]);
          }
        });
        var c = this.visualElement.getProps().transformTemplate;
        this.visualElement.getInstance().style.transform = c ? c({}, "") : "none", (n = s.root) === null || n === void 0 || n.updateScroll(), s.updateLayout(), this.resolveConstraints(), Qi(function(f) {
          if (Ng(f, o, null)) {
            var d = t.getAxisMotionValue(f), g = t.constraints[f], m = g.min, v = g.max;
            d.set(an(m, v, l[f]));
          }
        });
      }
    }, e.prototype.addListeners = function() {
      var t = this, n;
      kMe.set(this.visualElement, this);
      var r = this.visualElement.getInstance(), o = af(r, "pointerdown", function(f) {
        var d = t.getProps(), g = d.drag, m = d.dragListener, v = m === void 0 ? !0 : m;
        g && v && t.start(f);
      }), i = function() {
        var f = t.getProps().dragConstraints;
        Wu(f) && (t.constraints = t.resolveRefConstraints());
      }, s = this.visualElement.projection, l = s.addEventListener("measure", i);
      s && !s.layout && ((n = s.root) === null || n === void 0 || n.updateScroll(), s.updateLayout()), i();
      var c = t1(window, "resize", function() {
        return t.scalePositionWithinConstraints();
      });
      return s.addEventListener("didUpdate", function(f) {
        var d = f.delta, g = f.hasLayoutChanged;
        t.isDragging && g && (Qi(function(m) {
          var v = t.getAxisMotionValue(m);
          v && (t.originPoint[m] += d[m].translate, v.set(v.get() + d[m].translate));
        }), t.visualElement.syncRender());
      }), function() {
        c(), o(), l();
      };
    }, e.prototype.getProps = function() {
      var t = this.visualElement.getProps(), n = t.drag, r = n === void 0 ? !1 : n, o = t.dragDirectionLock, i = o === void 0 ? !1 : o, s = t.dragPropagation, l = s === void 0 ? !1 : s, c = t.dragConstraints, f = c === void 0 ? !1 : c, d = t.dragElastic, g = d === void 0 ? RS : d, m = t.dragMomentum, v = m === void 0 ? !0 : m;
      return Te(Te({}, t), { drag: r, dragDirectionLock: i, dragPropagation: l, dragConstraints: f, dragElastic: g, dragMomentum: v });
    }, e;
  }()
);
function Ng(e, t, n) {
  return (t === !0 || t === e) && (n === null || n === e);
}
function NMe(e, t) {
  t === void 0 && (t = 10);
  var n = null;
  return Math.abs(e.y) > t ? n = "y" : Math.abs(e.x) > t && (n = "x"), n;
}
function OMe(e) {
  var t = e.dragControls, n = e.visualElement, r = ll(function() {
    return new _Me(n);
  });
  k.useEffect(function() {
    return t && t.subscribe(r);
  }, [r, t]), k.useEffect(function() {
    return r.addListeners();
  }, [r]);
}
function AMe(e) {
  var t = e.onPan, n = e.onPanStart, r = e.onPanEnd, o = e.onPanSessionStart, i = e.visualElement, s = t || n || r || o, l = k.useRef(null), c = k.useContext(Ky).transformPagePoint, f = {
    onSessionStart: o,
    onStart: n,
    onMove: t,
    onEnd: function(g, m) {
      l.current = null, r && r(g, m);
    }
  };
  k.useEffect(function() {
    l.current !== null && l.current.updateHandlers(f);
  });
  function d(g) {
    l.current = new X$(g, f, {
      transformPagePoint: c
    });
  }
  v0(i, "pointerdown", s && d), _$(function() {
    return l.current && l.current.end();
  });
}
var DMe = {
  pan: La(AMe),
  drag: La(OMe)
}, Og = [
  "LayoutMeasure",
  "BeforeLayoutMeasure",
  "LayoutUpdate",
  "ViewportBoxUpdate",
  "Update",
  "Render",
  "AnimationComplete",
  "LayoutAnimationComplete",
  "AnimationStart",
  "LayoutAnimationStart",
  "SetAxisTarget",
  "Unmount"
];
function IMe() {
  var e = Og.map(function() {
    return new up();
  }), t = {}, n = {
    clearAllListeners: function() {
      return e.forEach(function(r) {
        return r.clear();
      });
    },
    updatePropListeners: function(r) {
      Og.forEach(function(o) {
        var i, s = "on" + o, l = r[s];
        (i = t[o]) === null || i === void 0 || i.call(t), l && (t[o] = n[s](l));
      });
    }
  };
  return e.forEach(function(r, o) {
    n["on" + Og[o]] = function(i) {
      return r.add(i);
    }, n["notify" + Og[o]] = function() {
      for (var i = [], s = 0; s < arguments.length; s++)
        i[s] = arguments[s];
      return r.notify.apply(r, _i([], en(i), !1));
    };
  }), n;
}
function LMe(e, t, n) {
  var r;
  for (var o in t) {
    var i = t[o], s = n[o];
    if (rs(i))
      e.addValue(o, i);
    else if (rs(s))
      e.addValue(o, xc(i));
    else if (s !== i)
      if (e.hasValue(o)) {
        var l = e.getValue(o);
        !l.hasAnimated && l.set(i);
      } else
        e.addValue(o, xc((r = e.getStaticValue(o)) !== null && r !== void 0 ? r : i));
  }
  for (var o in n)
    t[o] === void 0 && e.removeValue(o);
  return t;
}
var o4 = function(e) {
  var t = e.treeType, n = t === void 0 ? "" : t, r = e.build, o = e.getBaseTarget, i = e.makeTargetAnimatable, s = e.measureViewportBox, l = e.render, c = e.readValueFromInstance, f = e.removeValueFromRenderState, d = e.sortNodePosition, g = e.scrapeMotionValuesFromProps;
  return function(m, v) {
    var b = m.parent, w = m.props, _ = m.presenceId, S = m.blockInitialAnimation, x = m.visualState, C = m.shouldReduceMotion;
    v === void 0 && (v = {});
    var E = !1, N = x.latestValues, I = x.renderState, D, A = IMe(), F = /* @__PURE__ */ new Map(), $ = /* @__PURE__ */ new Map(), q = {}, H = Te({}, N), z;
    function B() {
      !D || !E || (R(), l(D, I, w.style, ie.projection));
    }
    function R() {
      r(ie, I, N, v, w);
    }
    function te() {
      A.notifyUpdate(N);
    }
    function Q(ne, ae) {
      var le = ae.onChange(function(xe) {
        N[ne] = xe, w.onUpdate && Ni.update(te, !1, !0);
      }), de = ae.onRenderRequest(ie.scheduleRender);
      $.set(ne, function() {
        le(), de();
      });
    }
    var Y = g(w);
    for (var K in Y) {
      var Z = Y[K];
      N[K] !== void 0 && rs(Z) && Z.set(N[K], !1);
    }
    var re = e1(w), J = Y5(w), ie = Te(Te({
      treeType: n,
      /**
       * This is a mirror of the internal instance prop, which keeps
       * VisualElement type-compatible with React's RefObject.
       */
      current: null,
      /**
       * The depth of this visual element within the visual element tree.
       */
      depth: b ? b.depth + 1 : 0,
      parent: b,
      children: /* @__PURE__ */ new Set(),
      /**
       *
       */
      presenceId: _,
      shouldReduceMotion: C,
      /**
       * If this component is part of the variant tree, it should track
       * any children that are also part of the tree. This is essentially
       * a shadow tree to simplify logic around how to stagger over children.
       */
      variantChildren: J ? /* @__PURE__ */ new Set() : void 0,
      /**
       * Whether this instance is visible. This can be changed imperatively
       * by the projection tree, is analogous to CSS's visibility in that
       * hidden elements should take up layout, and needs enacting by the configured
       * render function.
       */
      isVisible: void 0,
      /**
       * Normally, if a component is controlled by a parent's variants, it can
       * rely on that ancestor to trigger animations further down the tree.
       * However, if a component is created after its parent is mounted, the parent
       * won't trigger that mount animation so the child needs to.
       *
       * TODO: This might be better replaced with a method isParentMounted
       */
      manuallyAnimateOnMount: !!(b != null && b.isMounted()),
      /**
       * This can be set by AnimatePresence to force components that mount
       * at the same time as it to mount as if they have initial={false} set.
       */
      blockInitialAnimation: S,
      /**
       * Determine whether this component has mounted yet. This is mostly used
       * by variant children to determine whether they need to trigger their
       * own animations on mount.
       */
      isMounted: function() {
        return !!D;
      },
      mount: function(ne) {
        E = !0, D = ie.current = ne, ie.projection && ie.projection.mount(ne), J && b && !re && (z = b == null ? void 0 : b.addVariantChild(ie)), F.forEach(function(ae, le) {
          return Q(le, ae);
        }), b == null || b.children.add(ie), ie.setProps(w);
      },
      /**
       *
       */
      unmount: function() {
        var ne;
        (ne = ie.projection) === null || ne === void 0 || ne.unmount(), Tf.update(te), Tf.render(B), $.forEach(function(ae) {
          return ae();
        }), z == null || z(), b == null || b.children.delete(ie), A.clearAllListeners(), D = void 0, E = !1;
      },
      /**
       * Add a child visual element to our set of children.
       */
      addVariantChild: function(ne) {
        var ae, le = ie.getClosestVariantNode();
        if (le)
          return (ae = le.variantChildren) === null || ae === void 0 || ae.add(ne), function() {
            return le.variantChildren.delete(ne);
          };
      },
      sortNodePosition: function(ne) {
        return !d || n !== ne.treeType ? 0 : d(ie.getInstance(), ne.getInstance());
      },
      /**
       * Returns the closest variant node in the tree starting from
       * this visual element.
       */
      getClosestVariantNode: function() {
        return J ? ie : b == null ? void 0 : b.getClosestVariantNode();
      },
      /**
       * Expose the latest layoutId prop.
       */
      getLayoutId: function() {
        return w.layoutId;
      },
      /**
       * Returns the current instance.
       */
      getInstance: function() {
        return D;
      },
      /**
       * Get/set the latest static values.
       */
      getStaticValue: function(ne) {
        return N[ne];
      },
      setStaticValue: function(ne, ae) {
        return N[ne] = ae;
      },
      /**
       * Returns the latest motion value state. Currently only used to take
       * a snapshot of the visual element - perhaps this can return the whole
       * visual state
       */
      getLatestValues: function() {
        return N;
      },
      /**
       * Set the visiblity of the visual element. If it's changed, schedule
       * a render to reflect these changes.
       */
      setVisibility: function(ne) {
        ie.isVisible !== ne && (ie.isVisible = ne, ie.scheduleRender());
      },
      /**
       * Make a target animatable by Popmotion. For instance, if we're
       * trying to animate width from 100px to 100vw we need to measure 100vw
       * in pixels to determine what we really need to animate to. This is also
       * pluggable to support Framer's custom value types like Color,
       * and CSS variables.
       */
      makeTargetAnimatable: function(ne, ae) {
        return ae === void 0 && (ae = !0), i(ie, ne, w, ae);
      },
      /**
       * Measure the current viewport box with or without transforms.
       * Only measures axis-aligned boxes, rotate and skew must be manually
       * removed with a re-render to work.
       */
      measureViewportBox: function() {
        return s(D, w);
      },
      // Motion values ========================
      /**
       * Add a motion value and bind it to this visual element.
       */
      addValue: function(ne, ae) {
        ie.hasValue(ne) && ie.removeValue(ne), F.set(ne, ae), N[ne] = ae.get(), Q(ne, ae);
      },
      /**
       * Remove a motion value and unbind any active subscriptions.
       */
      removeValue: function(ne) {
        var ae;
        F.delete(ne), (ae = $.get(ne)) === null || ae === void 0 || ae(), $.delete(ne), delete N[ne], f(ne, I);
      },
      /**
       * Check whether we have a motion value for this key
       */
      hasValue: function(ne) {
        return F.has(ne);
      },
      /**
       * Get a motion value for this key. If called with a default
       * value, we'll create one if none exists.
       */
      getValue: function(ne, ae) {
        var le = F.get(ne);
        return le === void 0 && ae !== void 0 && (le = xc(ae), ie.addValue(ne, le)), le;
      },
      /**
       * Iterate over our motion values.
       */
      forEachValue: function(ne) {
        return F.forEach(ne);
      },
      /**
       * If we're trying to animate to a previously unencountered value,
       * we need to check for it in our state and as a last resort read it
       * directly from the instance (which might have performance implications).
       */
      readValue: function(ne) {
        var ae;
        return (ae = N[ne]) !== null && ae !== void 0 ? ae : c(D, ne, v);
      },
      /**
       * Set the base target to later animate back to. This is currently
       * only hydrated on creation and when we first read a value.
       */
      setBaseTarget: function(ne, ae) {
        H[ne] = ae;
      },
      /**
       * Find the base target for a value thats been removed from all animation
       * props.
       */
      getBaseTarget: function(ne) {
        if (o) {
          var ae = o(w, ne);
          if (ae !== void 0 && !rs(ae))
            return ae;
        }
        return H[ne];
      }
    }, A), {
      /**
       * Build the renderer state based on the latest visual state.
       */
      build: function() {
        return R(), I;
      },
      /**
       * Schedule a render on the next animation frame.
       */
      scheduleRender: function() {
        Ni.render(B, !1, !0);
      },
      /**
       * Synchronously fire render. It's prefered that we batch renders but
       * in many circumstances, like layout measurement, we need to run this
       * synchronously. However in those instances other measures should be taken
       * to batch reads/writes.
       */
      syncRender: B,
      /**
       * Update the provided props. Ensure any newly-added motion values are
       * added to our map, old ones removed, and listeners updated.
       */
      setProps: function(ne) {
        (ne.transformTemplate || w.transformTemplate) && ie.scheduleRender(), w = ne, A.updatePropListeners(ne), q = LMe(ie, g(w), q);
      },
      getProps: function() {
        return w;
      },
      // Variants ==============================
      /**
       * Returns the variant definition with a given name.
       */
      getVariant: function(ne) {
        var ae;
        return (ae = w.variants) === null || ae === void 0 ? void 0 : ae[ne];
      },
      /**
       * Returns the defined default transition on this component.
       */
      getDefaultTransition: function() {
        return w.transition;
      },
      getTransformPagePoint: function() {
        return w.transformPagePoint;
      },
      /**
       * Used by child variant nodes to get the closest ancestor variant props.
       */
      getVariantContext: function(ne) {
        if (ne === void 0 && (ne = !1), ne)
          return b == null ? void 0 : b.getVariantContext();
        if (!re) {
          var ae = (b == null ? void 0 : b.getVariantContext()) || {};
          return w.initial !== void 0 && (ae.initial = w.initial), ae;
        }
        for (var le = {}, de = 0; de < RMe; de++) {
          var xe = i4[de], ge = w[xe];
          (vi(ge) || ge === !1) && (le[xe] = ge);
        }
        return le;
      }
    });
    return ie;
  };
}, i4 = _i(["initial"], en(Ok), !1), RMe = i4.length;
function MS(e) {
  return typeof e == "string" && e.startsWith("var(--");
}
var s4 = /var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;
function FMe(e) {
  var t = s4.exec(e);
  if (!t)
    return [,];
  var n = en(t, 3), r = n[1], o = n[2];
  return [r, o];
}
function PS(e, t, n) {
  var r = en(FMe(e), 2), o = r[0], i = r[1];
  if (o) {
    var s = window.getComputedStyle(t).getPropertyValue(o);
    return s ? s.trim() : MS(i) ? PS(i, t) : i;
  }
}
function MMe(e, t, n) {
  var r, o = Dr(t, []), i = e.getInstance();
  if (!(i instanceof Element))
    return { target: o, transitionEnd: n };
  n && (n = Te({}, n)), e.forEachValue(function(f) {
    var d = f.get();
    if (MS(d)) {
      var g = PS(d, i);
      g && f.set(g);
    }
  });
  for (var s in o) {
    var l = o[s];
    if (MS(l)) {
      var c = PS(l, i);
      c && (o[s] = c, n && ((r = n[s]) !== null && r !== void 0 || (n[s] = l)));
    }
  }
  return { target: o, transitionEnd: n };
}
var PMe = /* @__PURE__ */ new Set([
  "width",
  "height",
  "top",
  "left",
  "right",
  "bottom",
  "x",
  "y"
]), a4 = function(e) {
  return PMe.has(e);
}, $Me = function(e) {
  return Object.keys(e).some(a4);
}, l4 = function(e, t) {
  e.set(t, !1), e.set(t);
}, oL = function(e) {
  return e === Fc || e === Xe;
}, iL;
(function(e) {
  e.width = "width", e.height = "height", e.left = "left", e.right = "right", e.top = "top", e.bottom = "bottom";
})(iL || (iL = {}));
var sL = function(e, t) {
  return parseFloat(e.split(", ")[t]);
}, aL = function(e, t) {
  return function(n, r) {
    var o = r.transform;
    if (o === "none" || !o)
      return 0;
    var i = o.match(/^matrix3d\((.+)\)$/);
    if (i)
      return sL(i[1], t);
    var s = o.match(/^matrix\((.+)\)$/);
    return s ? sL(s[1], e) : 0;
  };
}, VMe = /* @__PURE__ */ new Set(["x", "y", "z"]), jMe = Yp.filter(function(e) {
  return !VMe.has(e);
});
function UMe(e) {
  var t = [];
  return jMe.forEach(function(n) {
    var r = e.getValue(n);
    r !== void 0 && (t.push([n, r.get()]), r.set(n.startsWith("scale") ? 1 : 0));
  }), t.length && e.syncRender(), t;
}
var lL = {
  // Dimensions
  width: function(e, t) {
    var n = e.x, r = t.paddingLeft, o = r === void 0 ? "0" : r, i = t.paddingRight, s = i === void 0 ? "0" : i;
    return n.max - n.min - parseFloat(o) - parseFloat(s);
  },
  height: function(e, t) {
    var n = e.y, r = t.paddingTop, o = r === void 0 ? "0" : r, i = t.paddingBottom, s = i === void 0 ? "0" : i;
    return n.max - n.min - parseFloat(o) - parseFloat(s);
  },
  top: function(e, t) {
    var n = t.top;
    return parseFloat(n);
  },
  left: function(e, t) {
    var n = t.left;
    return parseFloat(n);
  },
  bottom: function(e, t) {
    var n = e.y, r = t.top;
    return parseFloat(r) + (n.max - n.min);
  },
  right: function(e, t) {
    var n = e.x, r = t.left;
    return parseFloat(r) + (n.max - n.min);
  },
  // Transform
  x: aL(4, 13),
  y: aL(5, 14)
}, BMe = function(e, t, n) {
  var r = t.measureViewportBox(), o = t.getInstance(), i = getComputedStyle(o), s = i.display, l = {};
  s === "none" && t.setStaticValue("display", e.display || "block"), n.forEach(function(f) {
    l[f] = lL[f](r, i);
  }), t.syncRender();
  var c = t.measureViewportBox();
  return n.forEach(function(f) {
    var d = t.getValue(f);
    l4(d, l[f]), e[f] = lL[f](c, i);
  }), e;
}, qMe = function(e, t, n, r) {
  n === void 0 && (n = {}), r === void 0 && (r = {}), t = Te({}, t), r = Te({}, r);
  var o = Object.keys(t).filter(a4), i = [], s = !1, l = [];
  if (o.forEach(function(d) {
    var g = e.getValue(d);
    if (e.hasValue(d)) {
      var m = n[d], v = Rd(m), b = t[d], w;
      if (Jp(b)) {
        var _ = b.length, S = b[0] === null ? 1 : 0;
        m = b[S], v = Rd(m);
        for (var x = S; x < _; x++)
          w ? h0(Rd(b[x]) === w) : w = Rd(b[x]);
      } else
        w = Rd(b);
      if (v !== w)
        if (oL(v) && oL(w)) {
          var C = g.get();
          typeof C == "string" && g.set(parseFloat(C)), typeof b == "string" ? t[d] = parseFloat(b) : Array.isArray(b) && w === Xe && (t[d] = b.map(parseFloat));
        } else
          v != null && v.transform && (w != null && w.transform) && (m === 0 || b === 0) ? m === 0 ? g.set(w.transform(m)) : t[d] = v.transform(b) : (s || (i = UMe(e), s = !0), l.push(d), r[d] = r[d] !== void 0 ? r[d] : t[d], l4(g, b));
    }
  }), l.length) {
    var c = l.indexOf("height") >= 0 ? window.pageYOffset : null, f = BMe(t, e, l);
    return i.length && i.forEach(function(d) {
      var g = en(d, 2), m = g[0], v = g[1];
      e.getValue(m).set(v);
    }), e.syncRender(), c !== null && window.scrollTo({ top: c }), { target: f, transitionEnd: r };
  } else
    return { target: t, transitionEnd: r };
};
function zMe(e, t, n, r) {
  return $Me(t) ? qMe(e, t, n, r) : { target: t, transitionEnd: r };
}
var HMe = function(e, t, n, r) {
  var o = MMe(e, t, r);
  return t = o.target, r = o.transitionEnd, zMe(e, t, n, r);
};
function WMe(e) {
  return window.getComputedStyle(e);
}
var c4 = {
  treeType: "dom",
  readValueFromInstance: function(e, t) {
    if (Lh(t)) {
      var n = Sk(t);
      return n && n.default || 0;
    } else {
      var r = WMe(e);
      return (e$(t) ? r.getPropertyValue(t) : r[t]) || 0;
    }
  },
  sortNodePosition: function(e, t) {
    return e.compareDocumentPosition(t) & 2 ? 1 : -1;
  },
  getBaseTarget: function(e, t) {
    var n;
    return (n = e.style) === null || n === void 0 ? void 0 : n[t];
  },
  measureViewportBox: function(e, t) {
    var n = t.transformPagePoint;
    return r4(e, n);
  },
  /**
   * Reset the transform on the current Element. This is called as part
   * of a batched process across the entire layout tree. To remove this write
   * cycle it'd be interesting to see if it's possible to "undo" all the current
   * layout transforms up the tree in the same way this.getBoundingBoxWithoutTransforms
   * works
   */
  resetTransform: function(e, t, n) {
    var r = n.transformTemplate;
    t.style.transform = r ? r({}, "") : "none", e.scheduleRender();
  },
  restoreTransform: function(e, t) {
    e.style.transform = t.style.transform;
  },
  removeValueFromRenderState: function(e, t) {
    var n = t.vars, r = t.style;
    delete n[e], delete r[e];
  },
  /**
   * Ensure that HTML and Framer-specific value types like `px`->`%` and `Color`
   * can be animated by Motion.
   */
  makeTargetAnimatable: function(e, t, n, r) {
    var o = n.transformValues;
    r === void 0 && (r = !0);
    var i = t.transition, s = t.transitionEnd, l = Dr(t, ["transition", "transitionEnd"]), c = ZFe(l, i || {}, e);
    if (o && (s && (s = o(s)), l && (l = o(l)), c && (c = o(c))), r) {
      JFe(e, l, c);
      var f = HMe(e, l, c, s);
      s = f.transitionEnd, l = f.target;
    }
    return Te({ transition: i, transitionEnd: s }, l);
  },
  scrapeMotionValuesFromProps: pk,
  build: function(e, t, n, r, o) {
    e.isVisible !== void 0 && (t.style.visibility = e.isVisible ? "visible" : "hidden"), uk(t, n, r, o.transformTemplate);
  },
  render: p$
}, GMe = o4(c4), QMe = o4(Te(Te({}, c4), { getBaseTarget: function(e, t) {
  return e[t];
}, readValueFromInstance: function(e, t) {
  var n;
  return Lh(t) ? ((n = Sk(t)) === null || n === void 0 ? void 0 : n.default) || 0 : (t = h$.has(t) ? t : d$(t), e.getAttribute(t));
}, scrapeMotionValuesFromProps: g$, build: function(e, t, n, r, o) {
  dk(t, n, r, o.transformTemplate);
}, render: m$ })), YMe = function(e, t) {
  return lk(e) ? QMe(t, { enableHardwareAcceleration: !1 }) : GMe(t, { enableHardwareAcceleration: !0 });
};
function cL(e, t) {
  return t.max === t.min ? 0 : e / (t.max - t.min) * 100;
}
var Fd = {
  correct: function(e, t) {
    if (!t.target)
      return e;
    if (typeof e == "string")
      if (Xe.test(e))
        e = parseFloat(e);
      else
        return e;
    var n = cL(e, t.target.x), r = cL(e, t.target.y);
    return "".concat(n, "% ").concat(r, "%");
  }
}, uL = "_$css", KMe = {
  correct: function(e, t) {
    var n = t.treeScale, r = t.projectionDelta, o = e, i = e.includes("var("), s = [];
    i && (e = e.replace(s4, function(w) {
      return s.push(w), uL;
    }));
    var l = Hs.parse(e);
    if (l.length > 5)
      return o;
    var c = Hs.createTransformer(e), f = typeof l[0] != "number" ? 1 : 0, d = r.x.scale * n.x, g = r.y.scale * n.y;
    l[0 + f] /= d, l[1 + f] /= g;
    var m = an(d, g, 0.5);
    typeof l[2 + f] == "number" && (l[2 + f] /= m), typeof l[3 + f] == "number" && (l[3 + f] /= m);
    var v = c(l);
    if (i) {
      var b = 0;
      v = v.replace(uL, function() {
        var w = s[b];
        return b++, w;
      });
    }
    return v;
  }
}, JMe = (
  /** @class */
  function(e) {
    M3(t, e);
    function t() {
      return e !== null && e.apply(this, arguments) || this;
    }
    return t.prototype.componentDidMount = function() {
      var n = this, r = this.props, o = r.visualElement, i = r.layoutGroup, s = r.switchLayoutGroup, l = r.layoutId, c = o.projection;
      bLe(ZMe), c && (i != null && i.group && i.group.add(c), s != null && s.register && l && s.register(c), c.root.didUpdate(), c.addEventListener("animationComplete", function() {
        n.safeToRemove();
      }), c.setOptions(Te(Te({}, c.options), { onExitComplete: function() {
        return n.safeToRemove();
      } }))), ap.hasEverUpdated = !0;
    }, t.prototype.getSnapshotBeforeUpdate = function(n) {
      var r = this, o = this.props, i = o.layoutDependency, s = o.visualElement, l = o.drag, c = o.isPresent, f = s.projection;
      return f && (f.isPresent = c, l || n.layoutDependency !== i || i === void 0 ? f.willUpdate() : this.safeToRemove(), n.isPresent !== c && (c ? f.promote() : f.relegate() || Ni.postRender(function() {
        var d;
        !((d = f.getStack()) === null || d === void 0) && d.members.length || r.safeToRemove();
      }))), null;
    }, t.prototype.componentDidUpdate = function() {
      var n = this.props.visualElement.projection;
      n && (n.root.didUpdate(), !n.currentAnimation && n.isLead() && this.safeToRemove());
    }, t.prototype.componentWillUnmount = function() {
      var n = this.props, r = n.visualElement, o = n.layoutGroup, i = n.switchLayoutGroup, s = r.projection;
      s && (s.scheduleCheckAfterUnmount(), o != null && o.group && o.group.remove(s), i != null && i.deregister && i.deregister(s));
    }, t.prototype.safeToRemove = function() {
      var n = this.props.safeToRemove;
      n == null || n();
    }, t.prototype.render = function() {
      return null;
    }, t;
  }(ce.Component)
);
function XMe(e) {
  var t = en(G$(), 2), n = t[0], r = t[1], o = k.useContext(K5);
  return ce.createElement(JMe, Te({}, e, { layoutGroup: o, switchLayoutGroup: k.useContext(J5), isPresent: n, safeToRemove: r }));
}
var ZMe = {
  borderRadius: Te(Te({}, Fd), { applyTo: [
    "borderTopLeftRadius",
    "borderTopRightRadius",
    "borderBottomLeftRadius",
    "borderBottomRightRadius"
  ] }),
  borderTopLeftRadius: Fd,
  borderTopRightRadius: Fd,
  borderBottomLeftRadius: Fd,
  borderBottomRightRadius: Fd,
  boxShadow: KMe
}, ePe = {
  measureLayout: XMe
};
function tPe(e, t, n) {
  n === void 0 && (n = {});
  var r = rs(e) ? e : xc(e);
  return kk("", r, t, n), {
    stop: function() {
      return r.stop();
    },
    isAnimating: function() {
      return r.isAnimating();
    }
  };
}
var u4 = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"], nPe = u4.length, fL = function(e) {
  return typeof e == "string" ? parseFloat(e) : e;
}, dL = function(e) {
  return typeof e == "number" || Xe.test(e);
};
function rPe(e, t, n, r, o, i) {
  var s, l, c, f;
  o ? (e.opacity = an(
    0,
    // (follow?.opacity as number) ?? 0,
    // TODO Reinstate this if only child
    (s = n.opacity) !== null && s !== void 0 ? s : 1,
    oPe(r)
  ), e.opacityExit = an((l = t.opacity) !== null && l !== void 0 ? l : 1, 0, iPe(r))) : i && (e.opacity = an((c = t.opacity) !== null && c !== void 0 ? c : 1, (f = n.opacity) !== null && f !== void 0 ? f : 1, r));
  for (var d = 0; d < nPe; d++) {
    var g = "border".concat(u4[d], "Radius"), m = pL(t, g), v = pL(n, g);
    if (!(m === void 0 && v === void 0)) {
      m || (m = 0), v || (v = 0);
      var b = m === 0 || v === 0 || dL(m) === dL(v);
      b ? (e[g] = Math.max(an(fL(m), fL(v), r), 0), (Zi.test(v) || Zi.test(m)) && (e[g] += "%")) : e[g] = v;
    }
  }
  (t.rotate || n.rotate) && (e.rotate = an(t.rotate || 0, n.rotate || 0, r));
}
function pL(e, t) {
  var n;
  return (n = e[t]) !== null && n !== void 0 ? n : e.borderRadius;
}
var oPe = f4(0, 0.5, wk), iPe = f4(0.5, 0.95, bk);
function f4(e, t, n) {
  return function(r) {
    return r < e ? 0 : r > t ? 1 : n(Xp(e, t, r));
  };
}
function hL(e, t) {
  e.min = t.min, e.max = t.max;
}
function pi(e, t) {
  hL(e.x, t.x), hL(e.y, t.y);
}
function mL(e, t, n, r, o) {
  return e -= t, e = S0(e, 1 / n, r), o !== void 0 && (e = S0(e, 1 / o, r)), e;
}
function sPe(e, t, n, r, o, i, s) {
  if (t === void 0 && (t = 0), n === void 0 && (n = 1), r === void 0 && (r = 0.5), i === void 0 && (i = e), s === void 0 && (s = e), Zi.test(t)) {
    t = parseFloat(t);
    var l = an(s.min, s.max, t / 100);
    t = l - s.min;
  }
  if (typeof t == "number") {
    var c = an(i.min, i.max, r);
    e === i && (c -= t), e.min = mL(e.min, t, n, c, o), e.max = mL(e.max, t, n, c, o);
  }
}
function gL(e, t, n, r, o) {
  var i = en(n, 3), s = i[0], l = i[1], c = i[2];
  sPe(e, t[s], t[l], t[c], t.scale, r, o);
}
var aPe = ["x", "scaleX", "originX"], lPe = ["y", "scaleY", "originY"];
function vL(e, t, n, r) {
  gL(e.x, t, aPe, n == null ? void 0 : n.x, r == null ? void 0 : r.x), gL(e.y, t, lPe, n == null ? void 0 : n.y, r == null ? void 0 : r.y);
}
function yL(e) {
  return e.translate === 0 && e.scale === 1;
}
function d4(e) {
  return yL(e.x) && yL(e.y);
}
function p4(e, t) {
  return e.x.min === t.x.min && e.x.max === t.x.max && e.y.min === t.y.min && e.y.max === t.y.max;
}
var cPe = (
  /** @class */
  function() {
    function e() {
      this.members = [];
    }
    return e.prototype.add = function(t) {
      _k(this.members, t), t.scheduleRender();
    }, e.prototype.remove = function(t) {
      if (Nk(this.members, t), t === this.prevLead && (this.prevLead = void 0), t === this.lead) {
        var n = this.members[this.members.length - 1];
        n && this.promote(n);
      }
    }, e.prototype.relegate = function(t) {
      var n = this.members.findIndex(function(s) {
        return t === s;
      });
      if (n === 0)
        return !1;
      for (var r, o = n; o >= 0; o--) {
        var i = this.members[o];
        if (i.isPresent !== !1) {
          r = i;
          break;
        }
      }
      return r ? (this.promote(r), !0) : !1;
    }, e.prototype.promote = function(t, n) {
      var r, o = this.lead;
      if (t !== o && (this.prevLead = o, this.lead = t, t.show(), o)) {
        o.instance && o.scheduleRender(), t.scheduleRender(), t.resumeFrom = o, n && (t.resumeFrom.preserveOpacity = !0), o.snapshot && (t.snapshot = o.snapshot, t.snapshot.latestValues = o.animationValues || o.latestValues, t.snapshot.isShared = !0), !((r = t.root) === null || r === void 0) && r.isUpdating && (t.isLayoutDirty = !0);
        var i = t.options.crossfade;
        i === !1 && o.hide();
      }
    }, e.prototype.exitAnimationComplete = function() {
      this.members.forEach(function(t) {
        var n, r, o, i, s;
        (r = (n = t.options).onExitComplete) === null || r === void 0 || r.call(n), (s = (o = t.resumingFrom) === null || o === void 0 ? void 0 : (i = o.options).onExitComplete) === null || s === void 0 || s.call(i);
      });
    }, e.prototype.scheduleRender = function() {
      this.members.forEach(function(t) {
        t.instance && t.scheduleRender(!1);
      });
    }, e.prototype.removeLeadSnapshot = function() {
      this.lead && this.lead.snapshot && (this.lead.snapshot = void 0);
    }, e;
  }()
), uPe = "translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";
function bL(e, t, n) {
  var r = e.x.translate / t.x, o = e.y.translate / t.y, i = "translate3d(".concat(r, "px, ").concat(o, "px, 0) ");
  if (i += "scale(".concat(1 / t.x, ", ").concat(1 / t.y, ") "), n) {
    var s = n.rotate, l = n.rotateX, c = n.rotateY;
    s && (i += "rotate(".concat(s, "deg) ")), l && (i += "rotateX(".concat(l, "deg) ")), c && (i += "rotateY(".concat(c, "deg) "));
  }
  var f = e.x.scale * t.x, d = e.y.scale * t.y;
  return i += "scale(".concat(f, ", ").concat(d, ")"), i === uPe ? "none" : i;
}
var fPe = function(e, t) {
  return e.depth - t.depth;
}, dPe = (
  /** @class */
  function() {
    function e() {
      this.children = [], this.isDirty = !1;
    }
    return e.prototype.add = function(t) {
      _k(this.children, t), this.isDirty = !0;
    }, e.prototype.remove = function(t) {
      Nk(this.children, t), this.isDirty = !0;
    }, e.prototype.forEach = function(t) {
      this.isDirty && this.children.sort(fPe), this.isDirty = !1, this.children.forEach(t);
    }, e;
  }()
), EL = 1e3;
function h4(e) {
  var t = e.attachResizeListener, n = e.defaultParent, r = e.measureScroll, o = e.checkIsScrollRoot, i = e.resetTransform;
  return (
    /** @class */
    function() {
      function s(l, c, f) {
        var d = this;
        c === void 0 && (c = {}), f === void 0 && (f = n == null ? void 0 : n()), this.children = /* @__PURE__ */ new Set(), this.options = {}, this.isTreeAnimating = !1, this.isAnimationBlocked = !1, this.isLayoutDirty = !1, this.updateManuallyBlocked = !1, this.updateBlockedByResize = !1, this.isUpdating = !1, this.isSVG = !1, this.needsReset = !1, this.shouldResetTransform = !1, this.treeScale = { x: 1, y: 1 }, this.eventHandlers = /* @__PURE__ */ new Map(), this.potentialNodes = /* @__PURE__ */ new Map(), this.checkUpdateFailed = function() {
          d.isUpdating && (d.isUpdating = !1, d.clearAllSnapshots());
        }, this.updateProjection = function() {
          d.nodes.forEach(yPe), d.nodes.forEach(bPe);
        }, this.hasProjected = !1, this.isVisible = !0, this.animationProgress = 0, this.sharedNodes = /* @__PURE__ */ new Map(), this.id = l, this.latestValues = c, this.root = f ? f.root || f : this, this.path = f ? _i(_i([], en(f.path), !1), [f], !1) : [], this.parent = f, this.depth = f ? f.depth + 1 : 0, l && this.root.registerPotentialNode(l, this);
        for (var g = 0; g < this.path.length; g++)
          this.path[g].shouldResetTransform = !0;
        this.root === this && (this.nodes = new dPe());
      }
      return s.prototype.addEventListener = function(l, c) {
        return this.eventHandlers.has(l) || this.eventHandlers.set(l, new up()), this.eventHandlers.get(l).add(c);
      }, s.prototype.notifyListeners = function(l) {
        for (var c = [], f = 1; f < arguments.length; f++)
          c[f - 1] = arguments[f];
        var d = this.eventHandlers.get(l);
        d == null || d.notify.apply(d, _i([], en(c), !1));
      }, s.prototype.hasListeners = function(l) {
        return this.eventHandlers.has(l);
      }, s.prototype.registerPotentialNode = function(l, c) {
        this.potentialNodes.set(l, c);
      }, s.prototype.mount = function(l, c) {
        var f = this, d;
        if (c === void 0 && (c = !1), !this.instance) {
          this.isSVG = l instanceof SVGElement && l.tagName !== "svg", this.instance = l;
          var g = this.options, m = g.layoutId, v = g.layout, b = g.visualElement;
          if (b && !b.getInstance() && b.mount(l), this.root.nodes.add(this), (d = this.parent) === null || d === void 0 || d.children.add(this), this.id && this.root.potentialNodes.delete(this.id), c && (v || m) && (this.isLayoutDirty = !0), t) {
            var w, _ = function() {
              return f.root.updateBlockedByResize = !1;
            };
            t(l, function() {
              f.root.updateBlockedByResize = !0, clearTimeout(w), w = window.setTimeout(_, 250), ap.hasAnimatedSinceResize && (ap.hasAnimatedSinceResize = !1, f.nodes.forEach(vPe));
            });
          }
          m && this.root.registerSharedNode(m, this), this.options.animate !== !1 && b && (m || v) && this.addEventListener("didUpdate", function(S) {
            var x, C, E, N, I, D = S.delta, A = S.hasLayoutChanged, F = S.hasRelativeTargetChanged, $ = S.layout;
            if (f.isTreeAnimationBlocked()) {
              f.target = void 0, f.relativeTarget = void 0;
              return;
            }
            var q = (C = (x = f.options.transition) !== null && x !== void 0 ? x : b.getDefaultTransition()) !== null && C !== void 0 ? C : TPe, H = b.getProps(), z = H.onLayoutAnimationStart, B = H.onLayoutAnimationComplete, R = !f.targetLayout || !p4(f.targetLayout, $) || F, te = !A && F;
            if (!((E = f.resumeFrom) === null || E === void 0) && E.instance || te || A && (R || !f.currentAnimation)) {
              f.resumeFrom && (f.resumingFrom = f.resumeFrom, f.resumingFrom.resumingFrom = void 0), f.setAnimationOrigin(D, te);
              var Q = Te(Te({}, Ck(q, "layout")), { onPlay: z, onComplete: B });
              b.shouldReduceMotion && (Q.delay = 0, Q.type = !1), f.startAnimation(Q);
            } else
              !A && f.animationProgress === 0 && f.finishAnimation(), f.isLead() && ((I = (N = f.options).onExitComplete) === null || I === void 0 || I.call(N));
            f.targetLayout = $;
          });
        }
      }, s.prototype.unmount = function() {
        var l, c;
        this.options.layoutId && this.willUpdate(), this.root.nodes.remove(this), (l = this.getStack()) === null || l === void 0 || l.remove(this), (c = this.parent) === null || c === void 0 || c.children.delete(this), this.instance = void 0, Tf.preRender(this.updateProjection);
      }, s.prototype.blockUpdate = function() {
        this.updateManuallyBlocked = !0;
      }, s.prototype.unblockUpdate = function() {
        this.updateManuallyBlocked = !1;
      }, s.prototype.isUpdateBlocked = function() {
        return this.updateManuallyBlocked || this.updateBlockedByResize;
      }, s.prototype.isTreeAnimationBlocked = function() {
        var l;
        return this.isAnimationBlocked || ((l = this.parent) === null || l === void 0 ? void 0 : l.isTreeAnimationBlocked()) || !1;
      }, s.prototype.startUpdate = function() {
        var l;
        this.isUpdateBlocked() || (this.isUpdating = !0, (l = this.nodes) === null || l === void 0 || l.forEach(EPe));
      }, s.prototype.willUpdate = function(l) {
        var c, f, d;
        if (l === void 0 && (l = !0), this.root.isUpdateBlocked()) {
          (f = (c = this.options).onExitComplete) === null || f === void 0 || f.call(c);
          return;
        }
        if (!this.root.isUpdating && this.root.startUpdate(), !this.isLayoutDirty) {
          this.isLayoutDirty = !0;
          for (var g = 0; g < this.path.length; g++) {
            var m = this.path[g];
            m.shouldResetTransform = !0, m.updateScroll();
          }
          var v = this.options, b = v.layoutId, w = v.layout;
          if (!(b === void 0 && !w)) {
            var _ = (d = this.options.visualElement) === null || d === void 0 ? void 0 : d.getProps().transformTemplate;
            this.prevTransformTemplateValue = _ == null ? void 0 : _(this.latestValues, ""), this.updateSnapshot(), l && this.notifyListeners("willUpdate");
          }
        }
      }, s.prototype.didUpdate = function() {
        var l = this.isUpdateBlocked();
        if (l) {
          this.unblockUpdate(), this.clearAllSnapshots(), this.nodes.forEach(wL);
          return;
        }
        this.isUpdating && (this.isUpdating = !1, this.potentialNodes.size && (this.potentialNodes.forEach(CPe), this.potentialNodes.clear()), this.nodes.forEach(gPe), this.nodes.forEach(pPe), this.nodes.forEach(hPe), this.clearAllSnapshots(), ww.update(), ww.preRender(), ww.render());
      }, s.prototype.clearAllSnapshots = function() {
        this.nodes.forEach(mPe), this.sharedNodes.forEach(wPe);
      }, s.prototype.scheduleUpdateProjection = function() {
        Ni.preRender(this.updateProjection, !1, !0);
      }, s.prototype.scheduleCheckAfterUnmount = function() {
        var l = this;
        Ni.postRender(function() {
          l.isLayoutDirty ? l.root.didUpdate() : l.root.checkUpdateFailed();
        });
      }, s.prototype.updateSnapshot = function() {
        if (!(this.snapshot || !this.instance)) {
          var l = this.measure(), c = this.removeTransform(this.removeElementScroll(l));
          CL(c), this.snapshot = {
            measured: l,
            layout: c,
            latestValues: {}
          };
        }
      }, s.prototype.updateLayout = function() {
        var l;
        if (this.instance && (this.updateScroll(), !(!(this.options.alwaysMeasureLayout && this.isLead()) && !this.isLayoutDirty))) {
          if (this.resumeFrom && !this.resumeFrom.instance)
            for (var c = 0; c < this.path.length; c++) {
              var f = this.path[c];
              f.updateScroll();
            }
          var d = this.measure();
          CL(d);
          var g = this.layout;
          this.layout = {
            measured: d,
            actual: this.removeElementScroll(d)
          }, this.layoutCorrected = xr(), this.isLayoutDirty = !1, this.projectionDelta = void 0, this.notifyListeners("measure", this.layout.actual), (l = this.options.visualElement) === null || l === void 0 || l.notifyLayoutMeasure(this.layout.actual, g == null ? void 0 : g.actual);
        }
      }, s.prototype.updateScroll = function() {
        this.options.layoutScroll && this.instance && (this.isScrollRoot = o(this.instance), this.scroll = r(this.instance));
      }, s.prototype.resetTransform = function() {
        var l;
        if (i) {
          var c = this.isLayoutDirty || this.shouldResetTransform, f = this.projectionDelta && !d4(this.projectionDelta), d = (l = this.options.visualElement) === null || l === void 0 ? void 0 : l.getProps().transformTemplate, g = d == null ? void 0 : d(this.latestValues, ""), m = g !== this.prevTransformTemplateValue;
          c && (f || ba(this.latestValues) || m) && (i(this.instance, g), this.shouldResetTransform = !1, this.scheduleRender());
        }
      }, s.prototype.measure = function() {
        var l = this.options.visualElement;
        if (!l)
          return xr();
        var c = l.measureViewportBox(), f = this.root.scroll;
        return f && (Ta(c.x, f.x), Ta(c.y, f.y)), c;
      }, s.prototype.removeElementScroll = function(l) {
        var c = xr();
        pi(c, l);
        for (var f = 0; f < this.path.length; f++) {
          var d = this.path[f], g = d.scroll, m = d.options, v = d.isScrollRoot;
          if (d !== this.root && g && m.layoutScroll) {
            if (v) {
              pi(c, l);
              var b = this.root.scroll;
              b && (Ta(c.x, -b.x), Ta(c.y, -b.y));
            }
            Ta(c.x, g.x), Ta(c.y, g.y);
          }
        }
        return c;
      }, s.prototype.applyTransform = function(l, c) {
        c === void 0 && (c = !1);
        var f = xr();
        pi(f, l);
        for (var d = 0; d < this.path.length; d++) {
          var g = this.path[d];
          !c && g.options.layoutScroll && g.scroll && g !== g.root && Gu(f, {
            x: -g.scroll.x,
            y: -g.scroll.y
          }), ba(g.latestValues) && Gu(f, g.latestValues);
        }
        return ba(this.latestValues) && Gu(f, this.latestValues), f;
      }, s.prototype.removeTransform = function(l) {
        var c, f = xr();
        pi(f, l);
        for (var d = 0; d < this.path.length; d++) {
          var g = this.path[d];
          if (g.instance && ba(g.latestValues)) {
            t4(g.latestValues) && g.updateSnapshot();
            var m = xr(), v = g.measure();
            pi(m, v), vL(f, g.latestValues, (c = g.snapshot) === null || c === void 0 ? void 0 : c.layout, m);
          }
        }
        return ba(this.latestValues) && vL(f, this.latestValues), f;
      }, s.prototype.setTargetDelta = function(l) {
        this.targetDelta = l, this.root.scheduleUpdateProjection();
      }, s.prototype.setOptions = function(l) {
        var c;
        this.options = Te(Te(Te({}, this.options), l), { crossfade: (c = l.crossfade) !== null && c !== void 0 ? c : !0 });
      }, s.prototype.clearMeasurements = function() {
        this.scroll = void 0, this.layout = void 0, this.snapshot = void 0, this.prevTransformTemplateValue = void 0, this.targetDelta = void 0, this.target = void 0, this.isLayoutDirty = !1;
      }, s.prototype.resolveTargetDelta = function() {
        var l, c = this.options, f = c.layout, d = c.layoutId;
        !this.layout || !(f || d) || (!this.targetDelta && !this.relativeTarget && (this.relativeParent = this.getClosestProjectingParent(), this.relativeParent && this.relativeParent.layout && (this.relativeTarget = xr(), this.relativeTargetOrigin = xr(), dp(this.relativeTargetOrigin, this.layout.actual, this.relativeParent.layout.actual), pi(this.relativeTarget, this.relativeTargetOrigin))), !(!this.relativeTarget && !this.targetDelta) && (this.target || (this.target = xr(), this.targetWithTransforms = xr()), this.relativeTarget && this.relativeTargetOrigin && (!((l = this.relativeParent) === null || l === void 0) && l.target) ? pMe(this.target, this.relativeTarget, this.relativeParent.target) : this.targetDelta ? (this.resumingFrom ? this.target = this.applyTransform(this.layout.actual) : pi(this.target, this.layout.actual), n4(this.target, this.targetDelta)) : pi(this.target, this.layout.actual), this.attemptToResolveRelativeTarget && (this.attemptToResolveRelativeTarget = !1, this.relativeParent = this.getClosestProjectingParent(), this.relativeParent && !!this.relativeParent.resumingFrom == !!this.resumingFrom && !this.relativeParent.options.layoutScroll && this.relativeParent.target && (this.relativeTarget = xr(), this.relativeTargetOrigin = xr(), dp(this.relativeTargetOrigin, this.target, this.relativeParent.target), pi(this.relativeTarget, this.relativeTargetOrigin)))));
      }, s.prototype.getClosestProjectingParent = function() {
        if (!(!this.parent || ba(this.parent.latestValues)))
          return (this.parent.relativeTarget || this.parent.targetDelta) && this.parent.layout ? this.parent : this.parent.getClosestProjectingParent();
      }, s.prototype.calcProjection = function() {
        var l, c = this.options, f = c.layout, d = c.layoutId;
        if (this.isTreeAnimating = !!(!((l = this.parent) === null || l === void 0) && l.isTreeAnimating || this.currentAnimation || this.pendingAnimation), this.isTreeAnimating || (this.targetDelta = this.relativeTarget = void 0), !(!this.layout || !(f || d))) {
          var g = this.getLead();
          pi(this.layoutCorrected, this.layout.actual), xMe(this.layoutCorrected, this.treeScale, this.path, !!this.resumingFrom || this !== g);
          var m = g.target;
          if (m) {
            this.projectionDelta || (this.projectionDelta = pp(), this.projectionDeltaWithTransform = pp());
            var v = this.treeScale.x, b = this.treeScale.y, w = this.projectionTransform;
            fp(this.projectionDelta, this.layoutCorrected, m, this.latestValues), this.projectionTransform = bL(this.projectionDelta, this.treeScale), (this.projectionTransform !== w || this.treeScale.x !== v || this.treeScale.y !== b) && (this.hasProjected = !0, this.scheduleRender(), this.notifyListeners("projectionUpdate", m));
          }
        }
      }, s.prototype.hide = function() {
        this.isVisible = !1;
      }, s.prototype.show = function() {
        this.isVisible = !0;
      }, s.prototype.scheduleRender = function(l) {
        var c, f, d;
        l === void 0 && (l = !0), (f = (c = this.options).scheduleRender) === null || f === void 0 || f.call(c), l && ((d = this.getStack()) === null || d === void 0 || d.scheduleRender()), this.resumingFrom && !this.resumingFrom.instance && (this.resumingFrom = void 0);
      }, s.prototype.setAnimationOrigin = function(l, c) {
        var f = this, d;
        c === void 0 && (c = !1);
        var g = this.snapshot, m = (g == null ? void 0 : g.latestValues) || {}, v = Te({}, this.latestValues), b = pp();
        this.relativeTarget = this.relativeTargetOrigin = void 0, this.attemptToResolveRelativeTarget = !c;
        var w = xr(), _ = g == null ? void 0 : g.isShared, S = (((d = this.getStack()) === null || d === void 0 ? void 0 : d.members.length) || 0) <= 1, x = !!(_ && !S && this.options.crossfade === !0 && !this.path.some(SPe));
        this.animationProgress = 0, this.mixTargetDelta = function(C) {
          var E, N = C / 1e3;
          xL(b.x, l.x, N), xL(b.y, l.y, N), f.setTargetDelta(b), f.relativeTarget && f.relativeTargetOrigin && f.layout && (!((E = f.relativeParent) === null || E === void 0) && E.layout) && (dp(w, f.layout.actual, f.relativeParent.layout.actual), xPe(f.relativeTarget, f.relativeTargetOrigin, w, N)), _ && (f.animationValues = v, rPe(v, m, f.latestValues, N, x, S)), f.root.scheduleUpdateProjection(), f.scheduleRender(), f.animationProgress = N;
        }, this.mixTargetDelta(0);
      }, s.prototype.startAnimation = function(l) {
        var c = this, f, d;
        this.notifyListeners("animationStart"), (f = this.currentAnimation) === null || f === void 0 || f.stop(), this.resumingFrom && ((d = this.resumingFrom.currentAnimation) === null || d === void 0 || d.stop()), this.pendingAnimation && (Tf.update(this.pendingAnimation), this.pendingAnimation = void 0), this.pendingAnimation = Ni.update(function() {
          ap.hasAnimatedSinceResize = !0, c.currentAnimation = tPe(0, EL, Te(Te({}, l), { onUpdate: function(g) {
            var m;
            c.mixTargetDelta(g), (m = l.onUpdate) === null || m === void 0 || m.call(l, g);
          }, onComplete: function() {
            var g;
            (g = l.onComplete) === null || g === void 0 || g.call(l), c.completeAnimation();
          } })), c.resumingFrom && (c.resumingFrom.currentAnimation = c.currentAnimation), c.pendingAnimation = void 0;
        });
      }, s.prototype.completeAnimation = function() {
        var l;
        this.resumingFrom && (this.resumingFrom.currentAnimation = void 0, this.resumingFrom.preserveOpacity = void 0), (l = this.getStack()) === null || l === void 0 || l.exitAnimationComplete(), this.resumingFrom = this.currentAnimation = this.animationValues = void 0, this.notifyListeners("animationComplete");
      }, s.prototype.finishAnimation = function() {
        var l;
        this.currentAnimation && ((l = this.mixTargetDelta) === null || l === void 0 || l.call(this, EL), this.currentAnimation.stop()), this.completeAnimation();
      }, s.prototype.applyTransformsToTarget = function() {
        var l = this.getLead(), c = l.targetWithTransforms, f = l.target, d = l.layout, g = l.latestValues;
        !c || !f || !d || (pi(c, f), Gu(c, g), fp(this.projectionDeltaWithTransform, this.layoutCorrected, c, g));
      }, s.prototype.registerSharedNode = function(l, c) {
        var f, d, g;
        this.sharedNodes.has(l) || this.sharedNodes.set(l, new cPe());
        var m = this.sharedNodes.get(l);
        m.add(c), c.promote({
          transition: (f = c.options.initialPromotionConfig) === null || f === void 0 ? void 0 : f.transition,
          preserveFollowOpacity: (g = (d = c.options.initialPromotionConfig) === null || d === void 0 ? void 0 : d.shouldPreserveFollowOpacity) === null || g === void 0 ? void 0 : g.call(d, c)
        });
      }, s.prototype.isLead = function() {
        var l = this.getStack();
        return l ? l.lead === this : !0;
      }, s.prototype.getLead = function() {
        var l, c = this.options.layoutId;
        return c ? ((l = this.getStack()) === null || l === void 0 ? void 0 : l.lead) || this : this;
      }, s.prototype.getPrevLead = function() {
        var l, c = this.options.layoutId;
        return c ? (l = this.getStack()) === null || l === void 0 ? void 0 : l.prevLead : void 0;
      }, s.prototype.getStack = function() {
        var l = this.options.layoutId;
        if (l)
          return this.root.sharedNodes.get(l);
      }, s.prototype.promote = function(l) {
        var c = l === void 0 ? {} : l, f = c.needsReset, d = c.transition, g = c.preserveFollowOpacity, m = this.getStack();
        m && m.promote(this, g), f && (this.projectionDelta = void 0, this.needsReset = !0), d && this.setOptions({ transition: d });
      }, s.prototype.relegate = function() {
        var l = this.getStack();
        return l ? l.relegate(this) : !1;
      }, s.prototype.resetRotation = function() {
        var l = this.options.visualElement;
        if (l) {
          for (var c = !1, f = {}, d = 0; d < xS.length; d++) {
            var g = xS[d], m = "rotate" + g;
            l.getStaticValue(m) && (c = !0, f[m] = l.getStaticValue(m), l.setStaticValue(m, 0));
          }
          if (c) {
            l == null || l.syncRender();
            for (var m in f)
              l.setStaticValue(m, f[m]);
            l.scheduleRender();
          }
        }
      }, s.prototype.getProjectionStyles = function(l) {
        var c, f, d, g, m, v;
        l === void 0 && (l = {});
        var b = {};
        if (!this.instance || this.isSVG)
          return b;
        if (this.isVisible)
          b.visibility = "";
        else
          return { visibility: "hidden" };
        var w = (c = this.options.visualElement) === null || c === void 0 ? void 0 : c.getProps().transformTemplate;
        if (this.needsReset)
          return this.needsReset = !1, b.opacity = "", b.pointerEvents = rv(l.pointerEvents) || "", b.transform = w ? w(this.latestValues, "") : "none", b;
        var _ = this.getLead();
        if (!this.projectionDelta || !this.layout || !_.target) {
          var S = {};
          return this.options.layoutId && (S.opacity = (f = this.latestValues.opacity) !== null && f !== void 0 ? f : 1, S.pointerEvents = rv(l.pointerEvents) || ""), this.hasProjected && !ba(this.latestValues) && (S.transform = w ? w({}, "") : "none", this.hasProjected = !1), S;
        }
        var x = _.animationValues || _.latestValues;
        this.applyTransformsToTarget(), b.transform = bL(this.projectionDeltaWithTransform, this.treeScale, x), w && (b.transform = w(x, b.transform));
        var C = this.projectionDelta, E = C.x, N = C.y;
        b.transformOrigin = "".concat(E.origin * 100, "% ").concat(N.origin * 100, "% 0"), _.animationValues ? b.opacity = _ === this ? (g = (d = x.opacity) !== null && d !== void 0 ? d : this.latestValues.opacity) !== null && g !== void 0 ? g : 1 : this.preserveOpacity ? this.latestValues.opacity : x.opacityExit : b.opacity = _ === this ? (m = x.opacity) !== null && m !== void 0 ? m : "" : (v = x.opacityExit) !== null && v !== void 0 ? v : 0;
        for (var I in m0)
          if (x[I] !== void 0) {
            var D = m0[I], A = D.correct, F = D.applyTo, $ = A(x[I], _);
            if (F)
              for (var q = F.length, H = 0; H < q; H++)
                b[F[H]] = $;
            else
              b[I] = $;
          }
        return this.options.layoutId && (b.pointerEvents = _ === this ? rv(l.pointerEvents) || "" : "none"), b;
      }, s.prototype.clearSnapshot = function() {
        this.resumeFrom = this.snapshot = void 0;
      }, s.prototype.resetTree = function() {
        this.root.nodes.forEach(function(l) {
          var c;
          return (c = l.currentAnimation) === null || c === void 0 ? void 0 : c.stop();
        }), this.root.nodes.forEach(wL), this.root.sharedNodes.clear();
      }, s;
    }()
  );
}
function pPe(e) {
  e.updateLayout();
}
function hPe(e) {
  var t, n, r, o, i = (n = (t = e.resumeFrom) === null || t === void 0 ? void 0 : t.snapshot) !== null && n !== void 0 ? n : e.snapshot;
  if (e.isLead() && e.layout && i && e.hasListeners("didUpdate")) {
    var s = e.layout, l = s.actual, c = s.measured;
    e.options.animationType === "size" ? Qi(function(x) {
      var C = i.isShared ? i.measured[x] : i.layout[x], E = Ws(C);
      C.min = l[x].min, C.max = C.min + E;
    }) : e.options.animationType === "position" && Qi(function(x) {
      var C = i.isShared ? i.measured[x] : i.layout[x], E = Ws(l[x]);
      C.max = C.min + E;
    });
    var f = pp();
    fp(f, l, i.layout);
    var d = pp();
    i.isShared ? fp(d, e.applyTransform(c, !0), i.measured) : fp(d, l, i.layout);
    var g = !d4(f), m = !1;
    if (!e.resumeFrom && (e.relativeParent = e.getClosestProjectingParent(), e.relativeParent && !e.relativeParent.resumeFrom)) {
      var v = e.relativeParent, b = v.snapshot, w = v.layout;
      if (b && w) {
        var _ = xr();
        dp(_, i.layout, b.layout);
        var S = xr();
        dp(S, l, w.actual), p4(_, S) || (m = !0);
      }
    }
    e.notifyListeners("didUpdate", {
      layout: l,
      snapshot: i,
      delta: d,
      layoutDelta: f,
      hasLayoutChanged: g,
      hasRelativeTargetChanged: m
    });
  } else
    e.isLead() && ((o = (r = e.options).onExitComplete) === null || o === void 0 || o.call(r));
  e.options.transition = void 0;
}
function mPe(e) {
  e.clearSnapshot();
}
function wL(e) {
  e.clearMeasurements();
}
function gPe(e) {
  var t = e.options.visualElement;
  t != null && t.getProps().onBeforeLayoutMeasure && t.notifyBeforeLayoutMeasure(), e.resetTransform();
}
function vPe(e) {
  e.finishAnimation(), e.targetDelta = e.relativeTarget = e.target = void 0;
}
function yPe(e) {
  e.resolveTargetDelta();
}
function bPe(e) {
  e.calcProjection();
}
function EPe(e) {
  e.resetRotation();
}
function wPe(e) {
  e.removeLeadSnapshot();
}
function xL(e, t, n) {
  e.translate = an(t.translate, 0, n), e.scale = an(t.scale, 1, n), e.origin = t.origin, e.originPoint = t.originPoint;
}
function SL(e, t, n, r) {
  e.min = an(t.min, n.min, r), e.max = an(t.max, n.max, r);
}
function xPe(e, t, n, r) {
  SL(e.x, t.x, n.x, r), SL(e.y, t.y, n.y, r);
}
function SPe(e) {
  return e.animationValues && e.animationValues.opacityExit !== void 0;
}
var TPe = {
  duration: 0.45,
  ease: [0.4, 0, 0.1, 1]
};
function CPe(e, t) {
  for (var n = e.root, r = e.path.length - 1; r >= 0; r--)
    if (e.path[r].instance) {
      n = e.path[r];
      break;
    }
  var o = n && n !== e.root ? n.instance : document, i = o.querySelector('[data-projection-id="'.concat(t, '"]'));
  i && e.mount(i, !0);
}
function TL(e) {
  e.min = Math.round(e.min), e.max = Math.round(e.max);
}
function CL(e) {
  TL(e.x), TL(e.y);
}
var kPe = h4({
  attachResizeListener: function(e, t) {
    return t1(e, "resize", t);
  },
  measureScroll: function() {
    return {
      x: document.documentElement.scrollLeft || document.body.scrollLeft,
      y: document.documentElement.scrollTop || document.body.scrollTop
    };
  },
  checkIsScrollRoot: function() {
    return !0;
  }
}), _w = {
  current: void 0
}, _Pe = h4({
  measureScroll: function(e) {
    return {
      x: e.scrollLeft,
      y: e.scrollTop
    };
  },
  defaultParent: function() {
    if (!_w.current) {
      var e = new kPe(0, {});
      e.mount(window), e.setOptions({ layoutScroll: !0 }), _w.current = e;
    }
    return _w.current;
  },
  resetTransform: function(e, t) {
    e.style.transform = t ?? "none";
  },
  checkIsScrollRoot: function(e) {
    return window.getComputedStyle(e).position === "fixed";
  }
}), NPe = Te(Te(Te(Te({}, uMe), kFe), DMe), ePe), m4 = /* @__PURE__ */ vLe(function(e, t) {
  return rRe(e, t, NPe, YMe, _Pe);
}), g4 = k.createContext(null);
function OPe(e, t, n, r) {
  if (!r)
    return e;
  var o = e.findIndex(function(d) {
    return d.value === t;
  });
  if (o === -1)
    return e;
  var i = r > 0 ? 1 : -1, s = e[o + i];
  if (!s)
    return e;
  var l = e[o], c = s.layout, f = an(c.min, c.max, 0.5);
  return i === 1 && l.layout.max + n > f || i === -1 && l.layout.min + n < f ? qFe(e, o, o + i) : e;
}
function APe(e, t) {
  var n = e.children, r = e.as, o = r === void 0 ? "ul" : r, i = e.axis, s = i === void 0 ? "y" : i, l = e.onReorder, c = e.values, f = Dr(e, ["children", "as", "axis", "onReorder", "values"]), d = ll(function() {
    return m4(o);
  }), g = [], m = k.useRef(!1), v = {
    axis: s,
    registerItem: function(b, w) {
      w && g.findIndex(function(_) {
        return b === _.value;
      }) === -1 && (g.push({ value: b, layout: w[s] }), g.sort(LPe));
    },
    updateOrder: function(b, w, _) {
      if (!m.current) {
        var S = OPe(g, b, w, _);
        g !== S && (m.current = !0, l(S.map(IPe).filter(function(x) {
          return c.indexOf(x) !== -1;
        })));
      }
    }
  };
  return k.useEffect(function() {
    m.current = !1;
  }), k.createElement(
    d,
    Te({}, f, { ref: t }),
    k.createElement(g4.Provider, { value: v }, n)
  );
}
var DPe = k.forwardRef(APe);
function IPe(e) {
  return e.value;
}
function LPe(e, t) {
  return e.layout.min - t.layout.min;
}
function v4(e) {
  var t = ll(function() {
    return xc(e);
  }), n = k.useContext(Ky).isStatic;
  if (n) {
    var r = en(k.useState(e), 2), o = r[1];
    k.useEffect(function() {
      return t.onChange(o);
    }, []);
  }
  return t;
}
var RPe = function(e) {
  return typeof e == "object" && e.mix;
}, FPe = function(e) {
  return RPe(e) ? e.mix : void 0;
};
function MPe() {
  for (var e = [], t = 0; t < arguments.length; t++)
    e[t] = arguments[t];
  var n = !Array.isArray(e[0]), r = n ? 0 : -1, o = e[0 + r], i = e[1 + r], s = e[2 + r], l = e[3 + r], c = vk(i, s, Te({ mixer: FPe(s[0]) }, l));
  return n ? c(o) : c;
}
function PPe(e, t) {
  ES(function() {
    var n = e.map(function(r) {
      return r.onChange(t);
    });
    return function() {
      return n.forEach(function(r) {
        return r();
      });
    };
  });
}
function $Pe(e, t) {
  var n = v4(t()), r = function() {
    return n.set(t());
  };
  return r(), PPe(e, function() {
    return Ni.update(r, !1, !0);
  }), n;
}
function VPe(e, t, n, r) {
  var o = typeof t == "function" ? t : MPe(t, n, r);
  return Array.isArray(e) ? kL(e, o) : kL([e], function(i) {
    var s = en(i, 1), l = s[0];
    return o(l);
  });
}
function kL(e, t) {
  var n = ll(function() {
    return [];
  });
  return $Pe(e, function() {
    n.length = 0;
    for (var r = e.length, o = 0; o < r; o++)
      n[o] = e[o].get();
    return t(n);
  });
}
function _L(e, t) {
  return t === void 0 && (t = 0), rs(e) ? e : v4(t);
}
function jPe(e, t) {
  var n = e.children, r = e.style, o = e.value, i = e.as, s = i === void 0 ? "li" : i, l = e.onDrag, c = e.layout, f = c === void 0 ? !0 : c, d = Dr(e, ["children", "style", "value", "as", "onDrag", "layout"]), g = ll(function() {
    return m4(s);
  }), m = k.useContext(g4), v = {
    x: _L(r == null ? void 0 : r.x),
    y: _L(r == null ? void 0 : r.y)
  }, b = VPe([v.x, v.y], function(E) {
    var N = en(E, 2), I = N[0], D = N[1];
    return I || D ? 1 : "unset";
  }), w = k.useRef(null), _ = m, S = _.axis, x = _.registerItem, C = _.updateOrder;
  return k.useEffect(function() {
    x(o, w.current);
  }, [m]), k.createElement(g, Te({ drag: S }, d, { dragSnapToOrigin: !0, style: Te(Te({}, r), { x: v.x, y: v.y, zIndex: b }), layout: f, onDrag: function(E, N) {
    var I = N.velocity;
    I[S] && C(o, v[S].get(), I[S]), l == null || l(E, N);
  }, onLayoutMeasure: function(E) {
    w.current = E;
  }, ref: t }), n);
}
var UPe = k.forwardRef(jPe), y4 = {
  Group: DPe,
  Item: UPe
};
const [i1, bje] = Lc("Tooltip", [
  Vy
]), Ak = Vy(), BPe = "TooltipProvider", qPe = 700, $S = "tooltip.open", [zPe, Dk] = i1(BPe), HPe = (e) => {
  const { __scopeTooltip: t, delayDuration: n = qPe, skipDelayDuration: r = 300, disableHoverableContent: o = !1, children: i } = e, [s, l] = k.useState(!0), c = k.useRef(!1), f = k.useRef(0);
  return k.useEffect(() => {
    const d = f.current;
    return () => window.clearTimeout(d);
  }, []), /* @__PURE__ */ k.createElement(zPe, {
    scope: t,
    isOpenDelayed: s,
    delayDuration: n,
    onOpen: k.useCallback(() => {
      window.clearTimeout(f.current), l(!1);
    }, []),
    onClose: k.useCallback(() => {
      window.clearTimeout(f.current), f.current = window.setTimeout(
        () => l(!0),
        r
      );
    }, [
      r
    ]),
    isPointerInTransitRef: c,
    onPointerInTransitChange: k.useCallback((d) => {
      c.current = d;
    }, []),
    disableHoverableContent: o
  }, i);
}, Ik = "Tooltip", [WPe, Ph] = i1(Ik), GPe = (e) => {
  const { __scopeTooltip: t, children: n, open: r, defaultOpen: o = !1, onOpenChange: i, disableHoverableContent: s, delayDuration: l } = e, c = Dk(Ik, e.__scopeTooltip), f = Ak(t), [d, g] = k.useState(null), m = ac(), v = k.useRef(0), b = s ?? c.disableHoverableContent, w = l ?? c.delayDuration, _ = k.useRef(!1), [S = !1, x] = Fy({
    prop: r,
    defaultProp: o,
    onChange: (D) => {
      D ? (c.onOpen(), document.dispatchEvent(new CustomEvent($S))) : c.onClose(), i == null || i(D);
    }
  }), C = k.useMemo(() => S ? _.current ? "delayed-open" : "instant-open" : "closed", [
    S
  ]), E = k.useCallback(() => {
    window.clearTimeout(v.current), _.current = !1, x(!0);
  }, [
    x
  ]), N = k.useCallback(() => {
    window.clearTimeout(v.current), x(!1);
  }, [
    x
  ]), I = k.useCallback(() => {
    window.clearTimeout(v.current), v.current = window.setTimeout(() => {
      _.current = !0, x(!0);
    }, w);
  }, [
    w,
    x
  ]);
  return k.useEffect(() => () => window.clearTimeout(v.current), []), /* @__PURE__ */ k.createElement(g5, f, /* @__PURE__ */ k.createElement(WPe, {
    scope: t,
    contentId: m,
    open: S,
    stateAttribute: C,
    trigger: d,
    onTriggerChange: g,
    onTriggerEnter: k.useCallback(() => {
      c.isOpenDelayed ? I() : E();
    }, [
      c.isOpenDelayed,
      I,
      E
    ]),
    onTriggerLeave: k.useCallback(() => {
      b ? N() : window.clearTimeout(v.current);
    }, [
      N,
      b
    ]),
    onOpen: E,
    onClose: N,
    disableHoverableContent: b
  }, n));
}, NL = "TooltipTrigger", QPe = /* @__PURE__ */ k.forwardRef((e, t) => {
  const { __scopeTooltip: n, ...r } = e, o = Ph(NL, n), i = Dk(NL, n), s = Ak(n), l = k.useRef(null), c = dr(t, l, o.onTriggerChange), f = k.useRef(!1), d = k.useRef(!1), g = k.useCallback(
    () => f.current = !1,
    []
  );
  return k.useEffect(() => () => document.removeEventListener("pointerup", g), [
    g
  ]), /* @__PURE__ */ k.createElement(v5, nt({
    asChild: !0
  }, s), /* @__PURE__ */ k.createElement(Ar.button, nt({
    // We purposefully avoid adding `type=button` here because tooltip triggers are also
    // commonly anchors and the anchor `type` attribute signifies MIME type.
    "aria-describedby": o.open ? o.contentId : void 0,
    "data-state": o.stateAttribute
  }, r, {
    ref: c,
    onPointerMove: dt(e.onPointerMove, (m) => {
      m.pointerType !== "touch" && !d.current && !i.isPointerInTransitRef.current && (o.onTriggerEnter(), d.current = !0);
    }),
    onPointerLeave: dt(e.onPointerLeave, () => {
      o.onTriggerLeave(), d.current = !1;
    }),
    onPointerDown: dt(e.onPointerDown, () => {
      f.current = !0, document.addEventListener("pointerup", g, {
        once: !0
      });
    }),
    onFocus: dt(e.onFocus, () => {
      f.current || o.onOpen();
    }),
    onBlur: dt(e.onBlur, o.onClose),
    onClick: dt(e.onClick, o.onClose)
  })));
}), b4 = "TooltipPortal", [YPe, KPe] = i1(b4, {
  forceMount: void 0
}), JPe = (e) => {
  const { __scopeTooltip: t, forceMount: n, children: r, container: o } = e, i = Ph(b4, t);
  return /* @__PURE__ */ k.createElement(YPe, {
    scope: t,
    forceMount: n
  }, /* @__PURE__ */ k.createElement(al, {
    present: n || i.open
  }, /* @__PURE__ */ k.createElement(HC, {
    asChild: !0,
    container: o
  }, r)));
}, eh = "TooltipContent", XPe = /* @__PURE__ */ k.forwardRef((e, t) => {
  const n = KPe(eh, e.__scopeTooltip), { forceMount: r = n.forceMount, side: o = "top", ...i } = e, s = Ph(eh, e.__scopeTooltip);
  return /* @__PURE__ */ k.createElement(al, {
    present: r || s.open
  }, s.disableHoverableContent ? /* @__PURE__ */ k.createElement(E4, nt({
    side: o
  }, i, {
    ref: t
  })) : /* @__PURE__ */ k.createElement(ZPe, nt({
    side: o
  }, i, {
    ref: t
  })));
}), ZPe = /* @__PURE__ */ k.forwardRef((e, t) => {
  const n = Ph(eh, e.__scopeTooltip), r = Dk(eh, e.__scopeTooltip), o = k.useRef(null), i = dr(t, o), [s, l] = k.useState(null), { trigger: c, onClose: f } = n, d = o.current, { onPointerInTransitChange: g } = r, m = k.useCallback(() => {
    l(null), g(!1);
  }, [
    g
  ]), v = k.useCallback((b, w) => {
    const _ = b.currentTarget, S = {
      x: b.clientX,
      y: b.clientY
    }, x = t3e(S, _.getBoundingClientRect()), C = n3e(S, x), E = r3e(w.getBoundingClientRect()), N = i3e([
      ...C,
      ...E
    ]);
    l(N), g(!0);
  }, [
    g
  ]);
  return k.useEffect(() => () => m(), [
    m
  ]), k.useEffect(() => {
    if (c && d) {
      const b = (_) => v(_, d), w = (_) => v(_, c);
      return c.addEventListener("pointerleave", b), d.addEventListener("pointerleave", w), () => {
        c.removeEventListener("pointerleave", b), d.removeEventListener("pointerleave", w);
      };
    }
  }, [
    c,
    d,
    v,
    m
  ]), k.useEffect(() => {
    if (s) {
      const b = (w) => {
        const _ = w.target, S = {
          x: w.clientX,
          y: w.clientY
        }, x = (c == null ? void 0 : c.contains(_)) || (d == null ? void 0 : d.contains(_)), C = !o3e(S, s);
        x ? m() : C && (m(), f());
      };
      return document.addEventListener("pointermove", b), () => document.removeEventListener("pointermove", b);
    }
  }, [
    c,
    d,
    s,
    f,
    m
  ]), /* @__PURE__ */ k.createElement(E4, nt({}, e, {
    ref: i
  }));
}), [e3e, Eje] = i1(Ik, {
  isInside: !1
}), E4 = /* @__PURE__ */ k.forwardRef((e, t) => {
  const { __scopeTooltip: n, children: r, "aria-label": o, onEscapeKeyDown: i, onPointerDownOutside: s, ...l } = e, c = Ph(eh, n), f = Ak(n), { onClose: d } = c;
  return k.useEffect(() => (document.addEventListener($S, d), () => document.removeEventListener($S, d)), [
    d
  ]), k.useEffect(() => {
    if (c.trigger) {
      const g = (m) => {
        const v = m.target;
        v != null && v.contains(c.trigger) && d();
      };
      return window.addEventListener("scroll", g, {
        capture: !0
      }), () => window.removeEventListener("scroll", g, {
        capture: !0
      });
    }
  }, [
    c.trigger,
    d
  ]), /* @__PURE__ */ k.createElement(zC, {
    asChild: !0,
    disableOutsidePointerEvents: !1,
    onEscapeKeyDown: i,
    onPointerDownOutside: s,
    onFocusOutside: (g) => g.preventDefault(),
    onDismiss: d
  }, /* @__PURE__ */ k.createElement(y5, nt({
    "data-state": c.stateAttribute
  }, f, l, {
    ref: t,
    style: {
      ...l.style,
      "--radix-tooltip-content-transform-origin": "var(--radix-popper-transform-origin)",
      "--radix-tooltip-content-available-width": "var(--radix-popper-available-width)",
      "--radix-tooltip-content-available-height": "var(--radix-popper-available-height)",
      "--radix-tooltip-trigger-width": "var(--radix-popper-anchor-width)",
      "--radix-tooltip-trigger-height": "var(--radix-popper-anchor-height)"
    }
  }), /* @__PURE__ */ k.createElement(A3, null, r), /* @__PURE__ */ k.createElement(e3e, {
    scope: n,
    isInside: !0
  }, /* @__PURE__ */ k.createElement(X3, {
    id: c.contentId,
    role: "tooltip"
  }, o || r))));
});
function t3e(e, t) {
  const n = Math.abs(t.top - e.y), r = Math.abs(t.bottom - e.y), o = Math.abs(t.right - e.x), i = Math.abs(t.left - e.x);
  switch (Math.min(n, r, o, i)) {
    case i:
      return "left";
    case o:
      return "right";
    case n:
      return "top";
    case r:
      return "bottom";
    default:
      throw new Error("unreachable");
  }
}
function n3e(e, t, n = 5) {
  const r = [];
  switch (t) {
    case "top":
      r.push({
        x: e.x - n,
        y: e.y + n
      }, {
        x: e.x + n,
        y: e.y + n
      });
      break;
    case "bottom":
      r.push({
        x: e.x - n,
        y: e.y - n
      }, {
        x: e.x + n,
        y: e.y - n
      });
      break;
    case "left":
      r.push({
        x: e.x + n,
        y: e.y - n
      }, {
        x: e.x + n,
        y: e.y + n
      });
      break;
    case "right":
      r.push({
        x: e.x - n,
        y: e.y - n
      }, {
        x: e.x - n,
        y: e.y + n
      });
      break;
  }
  return r;
}
function r3e(e) {
  const { top: t, right: n, bottom: r, left: o } = e;
  return [
    {
      x: o,
      y: t
    },
    {
      x: n,
      y: t
    },
    {
      x: n,
      y: r
    },
    {
      x: o,
      y: r
    }
  ];
}
function o3e(e, t) {
  const { x: n, y: r } = e;
  let o = !1;
  for (let i = 0, s = t.length - 1; i < t.length; s = i++) {
    const l = t[i].x, c = t[i].y, f = t[s].x, d = t[s].y;
    c > r != d > r && n < (f - l) * (r - c) / (d - c) + l && (o = !o);
  }
  return o;
}
function i3e(e) {
  const t = e.slice();
  return t.sort((n, r) => n.x < r.x ? -1 : n.x > r.x ? 1 : n.y < r.y ? -1 : n.y > r.y ? 1 : 0), s3e(t);
}
function s3e(e) {
  if (e.length <= 1)
    return e.slice();
  const t = [];
  for (let r = 0; r < e.length; r++) {
    const o = e[r];
    for (; t.length >= 2; ) {
      const i = t[t.length - 1], s = t[t.length - 2];
      if ((i.x - s.x) * (o.y - s.y) >= (i.y - s.y) * (o.x - s.x))
        t.pop();
      else
        break;
    }
    t.push(o);
  }
  t.pop();
  const n = [];
  for (let r = e.length - 1; r >= 0; r--) {
    const o = e[r];
    for (; n.length >= 2; ) {
      const i = n[n.length - 1], s = n[n.length - 2];
      if ((i.x - s.x) * (o.y - s.y) >= (i.y - s.y) * (o.x - s.x))
        n.pop();
      else
        break;
    }
    n.push(o);
  }
  return n.pop(), t.length === 1 && n.length === 1 && t[0].x === n[0].x && t[0].y === n[0].y ? t : t.concat(n);
}
const a3e = HPe, l3e = GPe, c3e = QPe, u3e = JPe, f3e = XPe;
function Su(e, t, n) {
  let r = n.initialDeps ?? [], o;
  return () => {
    var i, s, l, c;
    let f;
    n.key && ((i = n.debug) != null && i.call(n)) && (f = Date.now());
    const d = e();
    if (!(d.length !== r.length || d.some((v, b) => r[b] !== v)))
      return o;
    r = d;
    let m;
    if (n.key && ((s = n.debug) != null && s.call(n)) && (m = Date.now()), o = t(...d), n.key && ((l = n.debug) != null && l.call(n))) {
      const v = Math.round((Date.now() - f) * 100) / 100, b = Math.round((Date.now() - m) * 100) / 100, w = b / 16, _ = (S, x) => {
        for (S = String(S); S.length < x; )
          S = " " + S;
        return S;
      };
      console.info(
        `%c⏱ ${_(b, 5)} /${_(v, 5)} ms`,
        `
            font-size: .6rem;
            font-weight: bold;
            color: hsl(${Math.max(
          0,
          Math.min(120 - 120 * w, 120)
        )}deg 100% 31%);`,
        n == null ? void 0 : n.key
      );
    }
    return (c = n == null ? void 0 : n.onChange) == null || c.call(n, o), o;
  };
}
function Nw(e, t) {
  if (e === void 0)
    throw new Error(`Unexpected undefined${t ? `: ${t}` : ""}`);
  return e;
}
const d3e = (e, t) => Math.abs(e - t) < 1, p3e = (e) => e, h3e = (e) => {
  const t = Math.max(e.startIndex - e.overscan, 0), n = Math.min(e.endIndex + e.overscan, e.count - 1), r = [];
  for (let o = t; o <= n; o++)
    r.push(o);
  return r;
}, m3e = (e, t) => {
  const n = e.scrollElement;
  if (!n)
    return;
  const r = (i) => {
    const { width: s, height: l } = i;
    t({ width: Math.round(s), height: Math.round(l) });
  };
  if (r(n.getBoundingClientRect()), typeof ResizeObserver > "u")
    return () => {
    };
  const o = new ResizeObserver((i) => {
    const s = i[0];
    if (s != null && s.borderBoxSize) {
      const l = s.borderBoxSize[0];
      if (l) {
        r({ width: l.inlineSize, height: l.blockSize });
        return;
      }
    }
    r(n.getBoundingClientRect());
  });
  return o.observe(n, { box: "border-box" }), () => {
    o.unobserve(n);
  };
}, g3e = (e, t) => {
  const n = e.scrollElement;
  if (!n)
    return;
  const r = () => {
    t(n[e.options.horizontal ? "scrollLeft" : "scrollTop"]);
  };
  return r(), n.addEventListener("scroll", r, {
    passive: !0
  }), () => {
    n.removeEventListener("scroll", r);
  };
}, v3e = (e, t, n) => {
  if (t != null && t.borderBoxSize) {
    const r = t.borderBoxSize[0];
    if (r)
      return Math.round(
        r[n.options.horizontal ? "inlineSize" : "blockSize"]
      );
  }
  return Math.round(
    e.getBoundingClientRect()[n.options.horizontal ? "width" : "height"]
  );
}, y3e = (e, {
  adjustments: t = 0,
  behavior: n
}, r) => {
  var o, i;
  const s = e + t;
  (i = (o = r.scrollElement) == null ? void 0 : o.scrollTo) == null || i.call(o, {
    [r.options.horizontal ? "left" : "top"]: s,
    behavior: n
  });
};
class b3e {
  constructor(t) {
    this.unsubs = [], this.scrollElement = null, this.isScrolling = !1, this.isScrollingTimeoutId = null, this.scrollToIndexTimeoutId = null, this.measurementsCache = [], this.itemSizeCache = /* @__PURE__ */ new Map(), this.pendingMeasuredCacheIndexes = [], this.scrollDirection = null, this.scrollAdjustments = 0, this.measureElementCache = /* @__PURE__ */ new Map(), this.observer = /* @__PURE__ */ (() => {
      let n = null;
      const r = () => n || (typeof ResizeObserver < "u" ? n = new ResizeObserver((o) => {
        o.forEach((i) => {
          this._measureElement(i.target, i);
        });
      }) : null);
      return {
        disconnect: () => {
          var o;
          return (o = r()) == null ? void 0 : o.disconnect();
        },
        observe: (o) => {
          var i;
          return (i = r()) == null ? void 0 : i.observe(o, { box: "border-box" });
        },
        unobserve: (o) => {
          var i;
          return (i = r()) == null ? void 0 : i.unobserve(o);
        }
      };
    })(), this.range = null, this.setOptions = (n) => {
      Object.entries(n).forEach(([r, o]) => {
        typeof o > "u" && delete n[r];
      }), this.options = {
        debug: !1,
        initialOffset: 0,
        overscan: 1,
        paddingStart: 0,
        paddingEnd: 0,
        scrollPaddingStart: 0,
        scrollPaddingEnd: 0,
        horizontal: !1,
        getItemKey: p3e,
        rangeExtractor: h3e,
        onChange: () => {
        },
        measureElement: v3e,
        initialRect: { width: 0, height: 0 },
        scrollMargin: 0,
        gap: 0,
        scrollingDelay: 150,
        indexAttribute: "data-index",
        initialMeasurementsCache: [],
        lanes: 1,
        ...n
      };
    }, this.notify = (n) => {
      var r, o;
      (o = (r = this.options).onChange) == null || o.call(r, this, n);
    }, this.maybeNotify = Su(
      () => (this.calculateRange(), [
        this.isScrolling,
        this.range ? this.range.startIndex : null,
        this.range ? this.range.endIndex : null
      ]),
      (n) => {
        this.notify(n);
      },
      {
        key: !1,
        debug: () => this.options.debug,
        initialDeps: [
          this.isScrolling,
          this.range ? this.range.startIndex : null,
          this.range ? this.range.endIndex : null
        ]
      }
    ), this.cleanup = () => {
      this.unsubs.filter(Boolean).forEach((n) => n()), this.unsubs = [], this.scrollElement = null;
    }, this._didMount = () => (this.measureElementCache.forEach(this.observer.observe), () => {
      this.observer.disconnect(), this.cleanup();
    }), this._willUpdate = () => {
      const n = this.options.getScrollElement();
      this.scrollElement !== n && (this.cleanup(), this.scrollElement = n, this._scrollToOffset(this.scrollOffset, {
        adjustments: void 0,
        behavior: void 0
      }), this.unsubs.push(
        this.options.observeElementRect(this, (r) => {
          this.scrollRect = r, this.maybeNotify();
        })
      ), this.unsubs.push(
        this.options.observeElementOffset(this, (r) => {
          this.scrollAdjustments = 0, this.scrollOffset !== r && (this.isScrollingTimeoutId !== null && (clearTimeout(this.isScrollingTimeoutId), this.isScrollingTimeoutId = null), this.isScrolling = !0, this.scrollDirection = this.scrollOffset < r ? "forward" : "backward", this.scrollOffset = r, this.maybeNotify(), this.isScrollingTimeoutId = setTimeout(() => {
            this.isScrollingTimeoutId = null, this.isScrolling = !1, this.scrollDirection = null, this.maybeNotify();
          }, this.options.scrollingDelay));
        })
      ));
    }, this.getSize = () => this.scrollRect[this.options.horizontal ? "width" : "height"], this.memoOptions = Su(
      () => [
        this.options.count,
        this.options.paddingStart,
        this.options.scrollMargin,
        this.options.getItemKey
      ],
      (n, r, o, i) => (this.pendingMeasuredCacheIndexes = [], {
        count: n,
        paddingStart: r,
        scrollMargin: o,
        getItemKey: i
      }),
      {
        key: !1
      }
    ), this.getFurthestMeasurement = (n, r) => {
      const o = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
      for (let s = r - 1; s >= 0; s--) {
        const l = n[s];
        if (o.has(l.lane))
          continue;
        const c = i.get(
          l.lane
        );
        if (c == null || l.end > c.end ? i.set(l.lane, l) : l.end < c.end && o.set(l.lane, !0), o.size === this.options.lanes)
          break;
      }
      return i.size === this.options.lanes ? Array.from(i.values()).sort((s, l) => s.end === l.end ? s.index - l.index : s.end - l.end)[0] : void 0;
    }, this.getMeasurements = Su(
      () => [this.memoOptions(), this.itemSizeCache],
      ({ count: n, paddingStart: r, scrollMargin: o, getItemKey: i }, s) => {
        const l = this.pendingMeasuredCacheIndexes.length > 0 ? Math.min(...this.pendingMeasuredCacheIndexes) : 0;
        this.pendingMeasuredCacheIndexes = [];
        const c = this.measurementsCache.slice(0, l);
        for (let f = l; f < n; f++) {
          const d = i(f), g = this.options.lanes === 1 ? c[f - 1] : this.getFurthestMeasurement(c, f), m = g ? g.end + this.options.gap : r + o, v = s.get(d), b = typeof v == "number" ? v : this.options.estimateSize(f), w = m + b, _ = g ? g.lane : f % this.options.lanes;
          c[f] = {
            index: f,
            start: m,
            size: b,
            end: w,
            key: d,
            lane: _
          };
        }
        return this.measurementsCache = c, c;
      },
      {
        key: !1,
        debug: () => this.options.debug
      }
    ), this.calculateRange = Su(
      () => [this.getMeasurements(), this.getSize(), this.scrollOffset],
      (n, r, o) => this.range = n.length > 0 && r > 0 ? E3e({
        measurements: n,
        outerSize: r,
        scrollOffset: o
      }) : null,
      {
        key: !1,
        debug: () => this.options.debug
      }
    ), this.getIndexes = Su(
      () => [
        this.options.rangeExtractor,
        this.calculateRange(),
        this.options.overscan,
        this.options.count
      ],
      (n, r, o, i) => r === null ? [] : n({
        ...r,
        overscan: o,
        count: i
      }),
      {
        key: !1,
        debug: () => this.options.debug
      }
    ), this.indexFromElement = (n) => {
      const r = this.options.indexAttribute, o = n.getAttribute(r);
      return o ? parseInt(o, 10) : (console.warn(
        `Missing attribute name '${r}={index}' on measured element.`
      ), -1);
    }, this._measureElement = (n, r) => {
      const o = this.measurementsCache[this.indexFromElement(n)];
      if (!o || !n.isConnected) {
        this.measureElementCache.forEach((l, c) => {
          l === n && (this.observer.unobserve(n), this.measureElementCache.delete(c));
        });
        return;
      }
      const i = this.measureElementCache.get(o.key);
      i !== n && (i && this.observer.unobserve(i), this.observer.observe(n), this.measureElementCache.set(o.key, n));
      const s = this.options.measureElement(n, r, this);
      this.resizeItem(o, s);
    }, this.resizeItem = (n, r) => {
      const o = this.itemSizeCache.get(n.key) ?? n.size, i = r - o;
      i !== 0 && (n.start < this.scrollOffset + this.scrollAdjustments && this._scrollToOffset(this.scrollOffset, {
        adjustments: this.scrollAdjustments += i,
        behavior: void 0
      }), this.pendingMeasuredCacheIndexes.push(n.index), this.itemSizeCache = new Map(this.itemSizeCache.set(n.key, r)), this.notify(!1));
    }, this.measureElement = (n) => {
      n && this._measureElement(n, void 0);
    }, this.getVirtualItems = Su(
      () => [this.getIndexes(), this.getMeasurements()],
      (n, r) => {
        const o = [];
        for (let i = 0, s = n.length; i < s; i++) {
          const l = n[i], c = r[l];
          o.push(c);
        }
        return o;
      },
      {
        key: !1,
        debug: () => this.options.debug
      }
    ), this.getVirtualItemForOffset = (n) => {
      const r = this.getMeasurements();
      return Nw(
        r[w4(
          0,
          r.length - 1,
          (o) => Nw(r[o]).start,
          n
        )]
      );
    }, this.getOffsetForAlignment = (n, r) => {
      const o = this.getSize();
      r === "auto" && (n <= this.scrollOffset ? r = "start" : n >= this.scrollOffset + o ? r = "end" : r = "start"), r === "start" ? n = n : r === "end" ? n = n - o : r === "center" && (n = n - o / 2);
      const i = this.options.horizontal ? "scrollWidth" : "scrollHeight", l = (this.scrollElement ? "document" in this.scrollElement ? this.scrollElement.document.documentElement[i] : this.scrollElement[i] : 0) - this.getSize();
      return Math.max(Math.min(l, n), 0);
    }, this.getOffsetForIndex = (n, r = "auto") => {
      n = Math.max(0, Math.min(n, this.options.count - 1));
      const o = Nw(this.getMeasurements()[n]);
      if (r === "auto")
        if (o.end >= this.scrollOffset + this.getSize() - this.options.scrollPaddingEnd)
          r = "end";
        else if (o.start <= this.scrollOffset + this.options.scrollPaddingStart)
          r = "start";
        else
          return [this.scrollOffset, r];
      const i = r === "end" ? o.end + this.options.scrollPaddingEnd : o.start - this.options.scrollPaddingStart;
      return [this.getOffsetForAlignment(i, r), r];
    }, this.isDynamicMode = () => this.measureElementCache.size > 0, this.cancelScrollToIndex = () => {
      this.scrollToIndexTimeoutId !== null && (clearTimeout(this.scrollToIndexTimeoutId), this.scrollToIndexTimeoutId = null);
    }, this.scrollToOffset = (n, { align: r = "start", behavior: o } = {}) => {
      this.cancelScrollToIndex(), o === "smooth" && this.isDynamicMode() && console.warn(
        "The `smooth` scroll behavior is not fully supported with dynamic size."
      ), this._scrollToOffset(this.getOffsetForAlignment(n, r), {
        adjustments: void 0,
        behavior: o
      });
    }, this.scrollToIndex = (n, { align: r = "auto", behavior: o } = {}) => {
      n = Math.max(0, Math.min(n, this.options.count - 1)), this.cancelScrollToIndex(), o === "smooth" && this.isDynamicMode() && console.warn(
        "The `smooth` scroll behavior is not fully supported with dynamic size."
      );
      const [i, s] = this.getOffsetForIndex(n, r);
      this._scrollToOffset(i, { adjustments: void 0, behavior: o }), o !== "smooth" && this.isDynamicMode() && (this.scrollToIndexTimeoutId = setTimeout(() => {
        if (this.scrollToIndexTimeoutId = null, this.measureElementCache.has(
          this.options.getItemKey(n)
        )) {
          const [c] = this.getOffsetForIndex(n, s);
          d3e(c, this.scrollOffset) || this.scrollToIndex(n, { align: s, behavior: o });
        } else
          this.scrollToIndex(n, { align: s, behavior: o });
      }));
    }, this.scrollBy = (n, { behavior: r } = {}) => {
      this.cancelScrollToIndex(), r === "smooth" && this.isDynamicMode() && console.warn(
        "The `smooth` scroll behavior is not fully supported with dynamic size."
      ), this._scrollToOffset(this.scrollOffset + n, {
        adjustments: void 0,
        behavior: r
      });
    }, this.getTotalSize = () => {
      var n;
      const r = this.getMeasurements();
      let o;
      return r.length === 0 ? o = this.options.paddingStart : o = this.options.lanes === 1 ? ((n = r[r.length - 1]) == null ? void 0 : n.end) ?? 0 : Math.max(
        ...r.slice(-this.options.lanes).map((i) => i.end)
      ), o - this.options.scrollMargin + this.options.paddingEnd;
    }, this._scrollToOffset = (n, {
      adjustments: r,
      behavior: o
    }) => {
      this.options.scrollToFn(n, { behavior: o, adjustments: r }, this);
    }, this.measure = () => {
      this.itemSizeCache = /* @__PURE__ */ new Map(), this.notify(!1);
    }, this.setOptions(t), this.scrollRect = this.options.initialRect, this.scrollOffset = this.options.initialOffset, this.measurementsCache = this.options.initialMeasurementsCache, this.measurementsCache.forEach((n) => {
      this.itemSizeCache.set(n.key, n.size);
    }), this.maybeNotify();
  }
}
const w4 = (e, t, n, r) => {
  for (; e <= t; ) {
    const o = (e + t) / 2 | 0, i = n(o);
    if (i < r)
      e = o + 1;
    else if (i > r)
      t = o - 1;
    else
      return o;
  }
  return e > 0 ? e - 1 : 0;
};
function E3e({
  measurements: e,
  outerSize: t,
  scrollOffset: n
}) {
  const r = e.length - 1, i = w4(0, r, (l) => e[l].start, n);
  let s = i;
  for (; s < r && e[s].end < n + t; )
    s++;
  return { startIndex: i, endIndex: s };
}
const w3e = typeof document < "u" ? k.useLayoutEffect : k.useEffect;
function x3e(e) {
  const t = k.useReducer(() => ({}), {})[1], n = {
    ...e,
    onChange: (o, i) => {
      var s;
      i ? vh.flushSync(t) : t(), (s = e.onChange) == null || s.call(e, o, i);
    }
  }, [r] = k.useState(
    () => new b3e(n)
  );
  return r.setOptions(n), k.useEffect(() => r._didMount(), []), w3e(() => r._willUpdate()), r;
}
function S3e(e) {
  return x3e({
    observeElementRect: m3e,
    observeElementOffset: g3e,
    scrollToFn: y3e,
    ...e
  });
}
var T3e = Object.defineProperty, C3e = (e, t, n) => t in e ? T3e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Ow = (e, t, n) => (C3e(e, typeof t != "symbol" ? t + "" : t, n), n);
let k3e = class {
  constructor() {
    Ow(this, "current", this.detect()), Ow(this, "handoffState", "pending"), Ow(this, "currentId", 0);
  }
  set(t) {
    this.current !== t && (this.handoffState = "pending", this.currentId = 0, this.current = t);
  }
  reset() {
    this.set(this.detect());
  }
  nextId() {
    return ++this.currentId;
  }
  get isServer() {
    return this.current === "server";
  }
  get isClient() {
    return this.current === "client";
  }
  detect() {
    return typeof window > "u" || typeof document > "u" ? "server" : "client";
  }
  handoff() {
    this.handoffState === "pending" && (this.handoffState = "complete");
  }
  get isHandoffComplete() {
    return this.handoffState === "complete";
  }
}, lc = new k3e(), Hr = (e, t) => {
  lc.isServer ? k.useEffect(e, t) : k.useLayoutEffect(e, t);
};
function $h(e) {
  let t = k.useRef(e);
  return Hr(() => {
    t.current = e;
  }, [e]), t;
}
function Lk(e, t) {
  let [n, r] = k.useState(e), o = $h(e);
  return Hr(() => r(o.current), [o, r, ...t]), n;
}
let _t = function(e) {
  let t = $h(e);
  return ce.useCallback((...n) => t.current(...n), [t]);
};
function _3e(e, t, n) {
  let [r, o] = k.useState(n), i = e !== void 0, s = k.useRef(i), l = k.useRef(!1), c = k.useRef(!1);
  return i && !s.current && !l.current ? (l.current = !0, s.current = i, console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")) : !i && s.current && !c.current && (c.current = !0, s.current = i, console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")), [i ? e : r, _t((f) => (i || o(f), t == null ? void 0 : t(f)))];
}
function N3e(e) {
  typeof queueMicrotask == "function" ? queueMicrotask(e) : Promise.resolve().then(e).catch((t) => setTimeout(() => {
    throw t;
  }));
}
function T0() {
  let e = [], t = { addEventListener(n, r, o, i) {
    return n.addEventListener(r, o, i), t.add(() => n.removeEventListener(r, o, i));
  }, requestAnimationFrame(...n) {
    let r = requestAnimationFrame(...n);
    return t.add(() => cancelAnimationFrame(r));
  }, nextFrame(...n) {
    return t.requestAnimationFrame(() => t.requestAnimationFrame(...n));
  }, setTimeout(...n) {
    let r = setTimeout(...n);
    return t.add(() => clearTimeout(r));
  }, microTask(...n) {
    let r = { current: !0 };
    return N3e(() => {
      r.current && n[0]();
    }), t.add(() => {
      r.current = !1;
    });
  }, style(n, r, o) {
    let i = n.style.getPropertyValue(r);
    return Object.assign(n.style, { [r]: o }), this.add(() => {
      Object.assign(n.style, { [r]: i });
    });
  }, group(n) {
    let r = T0();
    return n(r), this.add(() => r.dispose());
  }, add(n) {
    return e.push(n), () => {
      let r = e.indexOf(n);
      if (r >= 0)
        for (let o of e.splice(r, 1))
          o();
    };
  }, dispose() {
    for (let n of e.splice(0))
      n();
  } };
  return t;
}
function Rk() {
  let [e] = k.useState(T0);
  return k.useEffect(() => () => e.dispose(), [e]), e;
}
function O3e() {
  let e = typeof document > "u";
  return "useSyncExternalStore" in Ww ? ((t) => t.useSyncExternalStore)(Ww)(() => () => {
  }, () => !1, () => !e) : !1;
}
function A3e() {
  let e = O3e(), [t, n] = k.useState(lc.isHandoffComplete);
  return t && lc.isHandoffComplete === !1 && n(!1), k.useEffect(() => {
    t !== !0 && n(!0);
  }, [t]), k.useEffect(() => lc.handoff(), []), e ? !1 : t;
}
var OL;
let Vh = (OL = ce.useId) != null ? OL : function() {
  let e = A3e(), [t, n] = ce.useState(e ? () => lc.nextId() : null);
  return Hr(() => {
    t === null && n(lc.nextId());
  }, [t]), t != null ? "" + t : void 0;
};
function Ds(e, t, ...n) {
  if (e in t) {
    let o = t[e];
    return typeof o == "function" ? o(...n) : o;
  }
  let r = new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((o) => `"${o}"`).join(", ")}.`);
  throw Error.captureStackTrace && Error.captureStackTrace(r, Ds), r;
}
function Fk(e) {
  return lc.isServer ? null : e instanceof Node ? e.ownerDocument : e != null && e.hasOwnProperty("current") && e.current instanceof Node ? e.current.ownerDocument : document;
}
let AL = ["[contentEditable=true]", "[tabindex]", "a[href]", "area[href]", "button:not([disabled])", "iframe", "input:not([disabled])", "select:not([disabled])", "textarea:not([disabled])"].map((e) => `${e}:not([tabindex='-1'])`).join(",");
var D3e = ((e) => (e[e.First = 1] = "First", e[e.Previous = 2] = "Previous", e[e.Next = 4] = "Next", e[e.Last = 8] = "Last", e[e.WrapAround = 16] = "WrapAround", e[e.NoScroll = 32] = "NoScroll", e))(D3e || {}), I3e = ((e) => (e[e.Error = 0] = "Error", e[e.Overflow = 1] = "Overflow", e[e.Success = 2] = "Success", e[e.Underflow = 3] = "Underflow", e))(I3e || {}), L3e = ((e) => (e[e.Previous = -1] = "Previous", e[e.Next = 1] = "Next", e))(L3e || {}), x4 = ((e) => (e[e.Strict = 0] = "Strict", e[e.Loose = 1] = "Loose", e))(x4 || {});
function R3e(e, t = 0) {
  var n;
  return e === ((n = Fk(e)) == null ? void 0 : n.body) ? !1 : Ds(t, { 0() {
    return e.matches(AL);
  }, 1() {
    let r = e;
    for (; r !== null; ) {
      if (r.matches(AL))
        return !0;
      r = r.parentElement;
    }
    return !1;
  } });
}
var F3e = ((e) => (e[e.Keyboard = 0] = "Keyboard", e[e.Mouse = 1] = "Mouse", e))(F3e || {});
typeof window < "u" && typeof document < "u" && (document.addEventListener("keydown", (e) => {
  e.metaKey || e.altKey || e.ctrlKey || (document.documentElement.dataset.headlessuiFocusVisible = "");
}, !0), document.addEventListener("click", (e) => {
  e.detail === 1 ? delete document.documentElement.dataset.headlessuiFocusVisible : e.detail === 0 && (document.documentElement.dataset.headlessuiFocusVisible = "");
}, !0));
function M3e(e, t = (n) => n) {
  return e.slice().sort((n, r) => {
    let o = t(n), i = t(r);
    if (o === null || i === null)
      return 0;
    let s = o.compareDocumentPosition(i);
    return s & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : s & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
  });
}
function P3e() {
  return /iPhone/gi.test(window.navigator.platform) || /Mac/gi.test(window.navigator.platform) && window.navigator.maxTouchPoints > 0;
}
function $3e() {
  return /Android/gi.test(window.navigator.userAgent);
}
function S4() {
  return P3e() || $3e();
}
function Ag(e, t, n) {
  let r = $h(t);
  k.useEffect(() => {
    function o(i) {
      r.current(i);
    }
    return document.addEventListener(e, o, n), () => document.removeEventListener(e, o, n);
  }, [e, n]);
}
function V3e(e, t, n) {
  let r = $h(t);
  k.useEffect(() => {
    function o(i) {
      r.current(i);
    }
    return window.addEventListener(e, o, n), () => window.removeEventListener(e, o, n);
  }, [e, n]);
}
function j3e(e, t, n = !0) {
  let r = k.useRef(!1);
  k.useEffect(() => {
    requestAnimationFrame(() => {
      r.current = n;
    });
  }, [n]);
  function o(s, l) {
    if (!r.current || s.defaultPrevented)
      return;
    let c = l(s);
    if (c === null || !c.getRootNode().contains(c) || !c.isConnected)
      return;
    let f = function d(g) {
      return typeof g == "function" ? d(g()) : Array.isArray(g) || g instanceof Set ? g : [g];
    }(e);
    for (let d of f) {
      if (d === null)
        continue;
      let g = d instanceof HTMLElement ? d : d.current;
      if (g != null && g.contains(c) || s.composed && s.composedPath().includes(g))
        return;
    }
    return !R3e(c, x4.Loose) && c.tabIndex !== -1 && s.preventDefault(), t(s, c);
  }
  let i = k.useRef(null);
  Ag("pointerdown", (s) => {
    var l, c;
    r.current && (i.current = ((c = (l = s.composedPath) == null ? void 0 : l.call(s)) == null ? void 0 : c[0]) || s.target);
  }, !0), Ag("mousedown", (s) => {
    var l, c;
    r.current && (i.current = ((c = (l = s.composedPath) == null ? void 0 : l.call(s)) == null ? void 0 : c[0]) || s.target);
  }, !0), Ag("click", (s) => {
    S4() || i.current && (o(s, () => i.current), i.current = null);
  }, !0), Ag("touchend", (s) => o(s, () => s.target instanceof HTMLElement ? s.target : null), !0), V3e("blur", (s) => o(s, () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null), !0);
}
function U3e(...e) {
  return k.useMemo(() => Fk(...e), [...e]);
}
function DL(e) {
  var t;
  if (e.type)
    return e.type;
  let n = (t = e.as) != null ? t : "button";
  if (typeof n == "string" && n.toLowerCase() === "button")
    return "button";
}
function B3e(e, t) {
  let [n, r] = k.useState(() => DL(e));
  return Hr(() => {
    r(DL(e));
  }, [e.type, e.as]), Hr(() => {
    n || t.current && t.current instanceof HTMLButtonElement && !t.current.hasAttribute("type") && r("button");
  }, [n, t]), n;
}
let q3e = Symbol();
function jh(...e) {
  let t = k.useRef(e);
  k.useEffect(() => {
    t.current = e;
  }, [e]);
  let n = _t((r) => {
    for (let o of t.current)
      o != null && (typeof o == "function" ? o(r) : o.current = r);
  });
  return e.every((r) => r == null || (r == null ? void 0 : r[q3e])) ? void 0 : n;
}
function IL(e) {
  return [e.screenX, e.screenY];
}
function z3e() {
  let e = k.useRef([-1, -1]);
  return { wasMoved(t) {
    let n = IL(t);
    return e.current[0] === n[0] && e.current[1] === n[1] ? !1 : (e.current = n, !0);
  }, update(t) {
    e.current = IL(t);
  } };
}
function H3e({ container: e, accept: t, walk: n, enabled: r = !0 }) {
  let o = k.useRef(t), i = k.useRef(n);
  k.useEffect(() => {
    o.current = t, i.current = n;
  }, [t, n]), Hr(() => {
    if (!e || !r)
      return;
    let s = Fk(e);
    if (!s)
      return;
    let l = o.current, c = i.current, f = Object.assign((g) => l(g), { acceptNode: l }), d = s.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, f, !1);
    for (; d.nextNode(); )
      c(d.currentNode);
  }, [e, r, o, i]);
}
function LL(e, t) {
  let n = k.useRef([]), r = _t(e);
  k.useEffect(() => {
    let o = [...n.current];
    for (let [i, s] of t.entries())
      if (n.current[i] !== s) {
        let l = r(t, o);
        return n.current = t, l;
      }
  }, [r, ...t]);
}
function RL(...e) {
  return Array.from(new Set(e.flatMap((t) => typeof t == "string" ? t.split(" ") : []))).filter(Boolean).join(" ");
}
var VS = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(VS || {}), W3e = ((e) => (e[e.Unmount = 0] = "Unmount", e[e.Hidden = 1] = "Hidden", e))(W3e || {});
function Mc({ ourProps: e, theirProps: t, slot: n, defaultTag: r, features: o, visible: i = !0, name: s, mergeRefs: l }) {
  l = l ?? G3e;
  let c = T4(t, e);
  if (i)
    return Dg(c, n, r, s, l);
  let f = o ?? 0;
  if (f & 2) {
    let { static: d = !1, ...g } = c;
    if (d)
      return Dg(g, n, r, s, l);
  }
  if (f & 1) {
    let { unmount: d = !0, ...g } = c;
    return Ds(d ? 0 : 1, { 0() {
      return null;
    }, 1() {
      return Dg({ ...g, hidden: !0, style: { display: "none" } }, n, r, s, l);
    } });
  }
  return Dg(c, n, r, s, l);
}
function Dg(e, t = {}, n, r, o) {
  let { as: i = n, children: s, refName: l = "ref", ...c } = Aw(e, ["unmount", "static"]), f = e.ref !== void 0 ? { [l]: e.ref } : {}, d = typeof s == "function" ? s(t) : s;
  "className" in c && c.className && typeof c.className == "function" && (c.className = c.className(t));
  let g = {};
  if (t) {
    let m = !1, v = [];
    for (let [b, w] of Object.entries(t))
      typeof w == "boolean" && (m = !0), w === !0 && v.push(b);
    m && (g["data-headlessui-state"] = v.join(" "));
  }
  if (i === k.Fragment && Object.keys(jS(c)).length > 0) {
    if (!k.isValidElement(d) || Array.isArray(d) && d.length > 1)
      throw new Error(['Passing props on "Fragment"!', "", `The current component <${r} /> is rendering a "Fragment".`, "However we need to passthrough the following props:", Object.keys(c).map((w) => `  - ${w}`).join(`
`), "", "You can apply a few solutions:", ['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".', "Render a single element as the child so that we can forward the props onto that element."].map((w) => `  - ${w}`).join(`
`)].join(`
`));
    let m = d.props, v = typeof (m == null ? void 0 : m.className) == "function" ? (...w) => RL(m == null ? void 0 : m.className(...w), c.className) : RL(m == null ? void 0 : m.className, c.className), b = v ? { className: v } : {};
    return k.cloneElement(d, Object.assign({}, T4(d.props, jS(Aw(c, ["ref"]))), g, f, { ref: o(d.ref, f.ref) }, b));
  }
  return k.createElement(i, Object.assign({}, Aw(c, ["ref"]), i !== k.Fragment && f, i !== k.Fragment && g), d);
}
function G3e(...e) {
  return e.every((t) => t == null) ? void 0 : (t) => {
    for (let n of e)
      n != null && (typeof n == "function" ? n(t) : n.current = t);
  };
}
function T4(...e) {
  if (e.length === 0)
    return {};
  if (e.length === 1)
    return e[0];
  let t = {}, n = {};
  for (let r of e)
    for (let o in r)
      o.startsWith("on") && typeof r[o] == "function" ? (n[o] != null || (n[o] = []), n[o].push(r[o])) : t[o] = r[o];
  if (t.disabled || t["aria-disabled"])
    return Object.assign(t, Object.fromEntries(Object.keys(n).map((r) => [r, void 0])));
  for (let r in n)
    Object.assign(t, { [r](o, ...i) {
      let s = n[r];
      for (let l of s) {
        if ((o instanceof Event || (o == null ? void 0 : o.nativeEvent) instanceof Event) && o.defaultPrevented)
          return;
        l(o, ...i);
      }
    } });
  return t;
}
function Pc(e) {
  var t;
  return Object.assign(k.forwardRef(e), { displayName: (t = e.displayName) != null ? t : e.name });
}
function jS(e) {
  let t = Object.assign({}, e);
  for (let n in t)
    t[n] === void 0 && delete t[n];
  return t;
}
function Aw(e, t = []) {
  let n = Object.assign({}, e);
  for (let r of t)
    r in n && delete n[r];
  return n;
}
let Q3e = "div";
var C4 = ((e) => (e[e.None = 1] = "None", e[e.Focusable = 2] = "Focusable", e[e.Hidden = 4] = "Hidden", e))(C4 || {});
function Y3e(e, t) {
  var n;
  let { features: r = 1, ...o } = e, i = { ref: t, "aria-hidden": (r & 2) === 2 ? !0 : (n = o["aria-hidden"]) != null ? n : void 0, style: { position: "fixed", top: 1, left: 1, width: 1, height: 0, padding: 0, margin: -1, overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0", ...(r & 4) === 4 && (r & 2) !== 2 && { display: "none" } } };
  return Mc({ ourProps: i, theirProps: o, slot: {}, defaultTag: Q3e, name: "Hidden" });
}
let K3e = Pc(Y3e), Mk = k.createContext(null);
Mk.displayName = "OpenClosedContext";
var th = ((e) => (e[e.Open = 1] = "Open", e[e.Closed = 2] = "Closed", e[e.Closing = 4] = "Closing", e[e.Opening = 8] = "Opening", e))(th || {});
function J3e() {
  return k.useContext(Mk);
}
function X3e({ value: e, children: t }) {
  return ce.createElement(Mk.Provider, { value: e }, t);
}
function Z3e(e) {
  function t() {
    document.readyState !== "loading" && (e(), document.removeEventListener("DOMContentLoaded", t));
  }
  typeof window < "u" && typeof document < "u" && (document.addEventListener("DOMContentLoaded", t), t());
}
let Wl = [];
Z3e(() => {
  function e(t) {
    t.target instanceof HTMLElement && t.target !== document.body && Wl[0] !== t.target && (Wl.unshift(t.target), Wl = Wl.filter((n) => n != null && n.isConnected), Wl.splice(10));
  }
  window.addEventListener("click", e, { capture: !0 }), window.addEventListener("mousedown", e, { capture: !0 }), window.addEventListener("focus", e, { capture: !0 }), document.body.addEventListener("click", e, { capture: !0 }), document.body.addEventListener("mousedown", e, { capture: !0 }), document.body.addEventListener("focus", e, { capture: !0 });
});
function e5e(e) {
  let t = e.parentElement, n = null;
  for (; t && !(t instanceof HTMLFieldSetElement); )
    t instanceof HTMLLegendElement && (n = t), t = t.parentElement;
  let r = (t == null ? void 0 : t.getAttribute("disabled")) === "";
  return r && t5e(n) ? !1 : r;
}
function t5e(e) {
  if (!e)
    return !1;
  let t = e.previousElementSibling;
  for (; t !== null; ) {
    if (t instanceof HTMLLegendElement)
      return !1;
    t = t.previousElementSibling;
  }
  return !0;
}
function n5e(e) {
  throw new Error("Unexpected object: " + e);
}
var Pn = ((e) => (e[e.First = 0] = "First", e[e.Previous = 1] = "Previous", e[e.Next = 2] = "Next", e[e.Last = 3] = "Last", e[e.Specific = 4] = "Specific", e[e.Nothing = 5] = "Nothing", e))(Pn || {});
function FL(e, t) {
  let n = t.resolveItems();
  if (n.length <= 0)
    return null;
  let r = t.resolveActiveIndex(), o = r ?? -1;
  switch (e.focus) {
    case 0: {
      for (let i = 0; i < n.length; ++i)
        if (!t.resolveDisabled(n[i], i, n))
          return i;
      return r;
    }
    case 1: {
      for (let i = o - 1; i >= 0; --i)
        if (!t.resolveDisabled(n[i], i, n))
          return i;
      return r;
    }
    case 2: {
      for (let i = o + 1; i < n.length; ++i)
        if (!t.resolveDisabled(n[i], i, n))
          return i;
      return r;
    }
    case 3: {
      for (let i = n.length - 1; i >= 0; --i)
        if (!t.resolveDisabled(n[i], i, n))
          return i;
      return r;
    }
    case 4: {
      for (let i = 0; i < n.length; ++i)
        if (t.resolveId(n[i], i, n) === e.id)
          return i;
      return r;
    }
    case 5:
      return null;
    default:
      n5e(e);
  }
}
function k4(e = {}, t = null, n = []) {
  for (let [r, o] of Object.entries(e))
    N4(n, _4(t, r), o);
  return n;
}
function _4(e, t) {
  return e ? e + "[" + t + "]" : t;
}
function N4(e, t, n) {
  if (Array.isArray(n))
    for (let [r, o] of n.entries())
      N4(e, _4(t, r.toString()), o);
  else
    n instanceof Date ? e.push([t, n.toISOString()]) : typeof n == "boolean" ? e.push([t, n ? "1" : "0"]) : typeof n == "string" ? e.push([t, n]) : typeof n == "number" ? e.push([t, `${n}`]) : n == null ? e.push([t, ""]) : k4(n, t, e);
}
var mo = ((e) => (e.Space = " ", e.Enter = "Enter", e.Escape = "Escape", e.Backspace = "Backspace", e.Delete = "Delete", e.ArrowLeft = "ArrowLeft", e.ArrowUp = "ArrowUp", e.ArrowRight = "ArrowRight", e.ArrowDown = "ArrowDown", e.Home = "Home", e.End = "End", e.PageUp = "PageUp", e.PageDown = "PageDown", e.Tab = "Tab", e))(mo || {}), r5e = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(r5e || {}), o5e = ((e) => (e[e.Single = 0] = "Single", e[e.Multi = 1] = "Multi", e))(o5e || {}), i5e = ((e) => (e[e.Pointer = 0] = "Pointer", e[e.Focus = 1] = "Focus", e[e.Other = 2] = "Other", e))(i5e || {}), s5e = ((e) => (e[e.OpenCombobox = 0] = "OpenCombobox", e[e.CloseCombobox = 1] = "CloseCombobox", e[e.GoToOption = 2] = "GoToOption", e[e.RegisterOption = 3] = "RegisterOption", e[e.UnregisterOption = 4] = "UnregisterOption", e[e.RegisterLabel = 5] = "RegisterLabel", e[e.SetActivationTrigger = 6] = "SetActivationTrigger", e[e.UpdateVirtualOptions = 7] = "UpdateVirtualOptions", e))(s5e || {});
function Dw(e, t = (n) => n) {
  let n = e.activeOptionIndex !== null ? e.options[e.activeOptionIndex] : null, r = t(e.options.slice()), o = r.length > 0 && r[0].dataRef.current.order !== null ? r.sort((s, l) => s.dataRef.current.order - l.dataRef.current.order) : M3e(r, (s) => s.dataRef.current.domRef.current), i = n ? o.indexOf(n) : null;
  return i === -1 && (i = null), { options: o, activeOptionIndex: i };
}
let a5e = { 1(e) {
  var t;
  return (t = e.dataRef.current) != null && t.disabled || e.comboboxState === 1 ? e : { ...e, activeOptionIndex: null, comboboxState: 1 };
}, 0(e) {
  var t, n;
  if ((t = e.dataRef.current) != null && t.disabled || e.comboboxState === 0)
    return e;
  if ((n = e.dataRef.current) != null && n.value) {
    let r = e.dataRef.current.calculateIndex(e.dataRef.current.value);
    if (r !== -1)
      return { ...e, activeOptionIndex: r, comboboxState: 0 };
  }
  return { ...e, comboboxState: 0 };
}, 2(e, t) {
  var n, r, o, i, s;
  if ((n = e.dataRef.current) != null && n.disabled || (r = e.dataRef.current) != null && r.optionsRef.current && !((o = e.dataRef.current) != null && o.optionsPropsRef.current.static) && e.comboboxState === 1)
    return e;
  if (e.virtual) {
    let d = t.focus === Pn.Specific ? t.idx : FL(t, { resolveItems: () => e.virtual.options, resolveActiveIndex: () => {
      var m, v;
      return (v = (m = e.activeOptionIndex) != null ? m : e.virtual.options.findIndex((b) => !e.virtual.disabled(b))) != null ? v : null;
    }, resolveDisabled: e.virtual.disabled, resolveId() {
      throw new Error("Function not implemented.");
    } }), g = (i = t.trigger) != null ? i : 2;
    return e.activeOptionIndex === d && e.activationTrigger === g ? e : { ...e, activeOptionIndex: d, activationTrigger: g };
  }
  let l = Dw(e);
  if (l.activeOptionIndex === null) {
    let d = l.options.findIndex((g) => !g.dataRef.current.disabled);
    d !== -1 && (l.activeOptionIndex = d);
  }
  let c = t.focus === Pn.Specific ? t.idx : FL(t, { resolveItems: () => l.options, resolveActiveIndex: () => l.activeOptionIndex, resolveId: (d) => d.id, resolveDisabled: (d) => d.dataRef.current.disabled }), f = (s = t.trigger) != null ? s : 2;
  return e.activeOptionIndex === c && e.activationTrigger === f ? e : { ...e, ...l, activeOptionIndex: c, activationTrigger: f };
}, 3: (e, t) => {
  var n, r, o;
  if ((n = e.dataRef.current) != null && n.virtual)
    return { ...e, options: [...e.options, t.payload] };
  let i = t.payload, s = Dw(e, (c) => (c.push(i), c));
  e.activeOptionIndex === null && (r = e.dataRef.current) != null && r.isSelected(t.payload.dataRef.current.value) && (s.activeOptionIndex = s.options.indexOf(i));
  let l = { ...e, ...s, activationTrigger: 2 };
  return (o = e.dataRef.current) != null && o.__demoMode && e.dataRef.current.value === void 0 && (l.activeOptionIndex = 0), l;
}, 4: (e, t) => {
  var n;
  if ((n = e.dataRef.current) != null && n.virtual)
    return { ...e, options: e.options.filter((o) => o.id !== t.id) };
  let r = Dw(e, (o) => {
    let i = o.findIndex((s) => s.id === t.id);
    return i !== -1 && o.splice(i, 1), o;
  });
  return { ...e, ...r, activationTrigger: 2 };
}, 5: (e, t) => e.labelId === t.id ? e : { ...e, labelId: t.id }, 6: (e, t) => e.activationTrigger === t.trigger ? e : { ...e, activationTrigger: t.trigger }, 7: (e, t) => {
  var n;
  if (((n = e.virtual) == null ? void 0 : n.options) === t.options)
    return e;
  let r = e.activeOptionIndex;
  if (e.activeOptionIndex !== null) {
    let o = t.options.indexOf(e.virtual.options[e.activeOptionIndex]);
    o !== -1 ? r = o : r = null;
  }
  return { ...e, activeOptionIndex: r, virtual: Object.assign({}, e.virtual, { options: t.options }) };
} }, Pk = k.createContext(null);
Pk.displayName = "ComboboxActionsContext";
function Uh(e) {
  let t = k.useContext(Pk);
  if (t === null) {
    let n = new Error(`<${e} /> is missing a parent <Combobox /> component.`);
    throw Error.captureStackTrace && Error.captureStackTrace(n, Uh), n;
  }
  return t;
}
let O4 = k.createContext(null);
function l5e(e) {
  var t;
  let n = $c("VirtualProvider"), [r, o] = k.useMemo(() => {
    let c = n.optionsRef.current;
    if (!c)
      return [0, 0];
    let f = window.getComputedStyle(c);
    return [parseFloat(f.paddingBlockStart || f.paddingTop), parseFloat(f.paddingBlockEnd || f.paddingBottom)];
  }, [n.optionsRef.current]), i = S3e({ scrollPaddingStart: r, scrollPaddingEnd: o, count: n.virtual.options.length, estimateSize() {
    return 40;
  }, getScrollElement() {
    var c;
    return (c = n.optionsRef.current) != null ? c : null;
  }, overscan: 12 }), [s, l] = k.useState(0);
  return Hr(() => {
    l((c) => c + 1);
  }, [(t = n.virtual) == null ? void 0 : t.options]), ce.createElement(O4.Provider, { value: i }, ce.createElement("div", { style: { position: "relative", width: "100%", height: `${i.getTotalSize()}px` }, ref: (c) => {
    if (c) {
      if (typeof process < "u" && process.env.JEST_WORKER_ID !== void 0 || n.activationTrigger === 0)
        return;
      n.activeOptionIndex !== null && n.virtual.options.length > n.activeOptionIndex && i.scrollToIndex(n.activeOptionIndex);
    }
  } }, i.getVirtualItems().map((c) => {
    var f;
    return ce.createElement(k.Fragment, { key: c.key }, ce.cloneElement((f = e.children) == null ? void 0 : f.call(e, { option: n.virtual.options[c.index], open: n.comboboxState === 0 }), { key: `${s}-${c.key}`, "data-index": c.index, "aria-setsize": n.virtual.options.length, "aria-posinset": c.index + 1, style: { position: "absolute", top: 0, left: 0, transform: `translateY(${c.start}px)`, overflowAnchor: "none" } }));
  })));
}
let $k = k.createContext(null);
$k.displayName = "ComboboxDataContext";
function $c(e) {
  let t = k.useContext($k);
  if (t === null) {
    let n = new Error(`<${e} /> is missing a parent <Combobox /> component.`);
    throw Error.captureStackTrace && Error.captureStackTrace(n, $c), n;
  }
  return t;
}
function c5e(e, t) {
  return Ds(t.type, a5e, e, t);
}
let u5e = k.Fragment;
function f5e(e, t) {
  let { value: n, defaultValue: r, onChange: o, form: i, name: s, by: l = null, disabled: c = !1, __demoMode: f = !1, nullable: d = !1, multiple: g = !1, immediate: m = !1, virtual: v = null, ...b } = e, w = !1, _ = null, [S = g ? [] : void 0, x] = _3e(n, o, r), [C, E] = k.useReducer(c5e, { dataRef: k.createRef(), comboboxState: f ? 0 : 1, options: [], virtual: null, activeOptionIndex: null, activationTrigger: 2, labelId: null }), N = k.useRef(!1), I = k.useRef({ static: !1, hold: !1 }), D = k.useRef(null), A = k.useRef(null), F = k.useRef(null), $ = k.useRef(null), q = _t(typeof l == "string" ? (ge, qe) => {
    let Ie = l;
    return (ge == null ? void 0 : ge[Ie]) === (qe == null ? void 0 : qe[Ie]);
  } : l ?? ((ge, qe) => ge === qe)), H = _t((ge) => C.options.findIndex((qe) => q(qe.dataRef.current.value, ge))), z = k.useCallback((ge) => Ds(R.mode, { 1: () => S.some((qe) => q(qe, ge)), 0: () => q(S, ge) }), [S]), B = _t((ge) => C.activeOptionIndex === H(ge)), R = k.useMemo(() => ({ ...C, immediate: w, optionsPropsRef: I, labelRef: D, inputRef: A, buttonRef: F, optionsRef: $, value: S, defaultValue: r, disabled: c, mode: g ? 1 : 0, virtual: C.virtual, get activeOptionIndex() {
    if (N.current && C.activeOptionIndex === null && C.options.length > 0) {
      let ge = C.options.findIndex((qe) => !qe.dataRef.current.disabled);
      if (ge !== -1)
        return ge;
    }
    return C.activeOptionIndex;
  }, calculateIndex: H, compare: q, isSelected: z, isActive: B, nullable: d, __demoMode: f }), [S, r, c, g, d, f, C, _]);
  Hr(() => {
  }, [_, void 0]), Hr(() => {
    C.dataRef.current = R;
  }, [R]), j3e([R.buttonRef, R.inputRef, R.optionsRef], () => ae.closeCombobox(), R.comboboxState === 0);
  let te = k.useMemo(() => {
    var ge, qe, Ie;
    return { open: R.comboboxState === 0, disabled: c, activeIndex: R.activeOptionIndex, activeOption: R.activeOptionIndex === null ? null : R.virtual ? R.virtual.options[(ge = R.activeOptionIndex) != null ? ge : 0] : (Ie = (qe = R.options[R.activeOptionIndex]) == null ? void 0 : qe.dataRef.current.value) != null ? Ie : null, value: S };
  }, [R, c, S]), Q = _t(() => {
    if (R.activeOptionIndex !== null) {
      if (R.virtual)
        ie(R.virtual.options[R.activeOptionIndex]);
      else {
        let { dataRef: ge } = R.options[R.activeOptionIndex];
        ie(ge.current.value);
      }
      ae.goToOption(Pn.Specific, R.activeOptionIndex);
    }
  }), Y = _t(() => {
    E({ type: 0 }), N.current = !0;
  }), K = _t(() => {
    E({ type: 1 }), N.current = !1;
  }), Z = _t((ge, qe, Ie) => (N.current = !1, ge === Pn.Specific ? E({ type: 2, focus: Pn.Specific, idx: qe, trigger: Ie }) : E({ type: 2, focus: ge, trigger: Ie }))), re = _t((ge, qe) => (E({ type: 3, payload: { id: ge, dataRef: qe } }), () => {
    R.isActive(qe.current.value) && (N.current = !0), E({ type: 4, id: ge });
  })), J = _t((ge) => (E({ type: 5, id: ge }), () => E({ type: 5, id: null }))), ie = _t((ge) => Ds(R.mode, { 0() {
    return x == null ? void 0 : x(ge);
  }, 1() {
    let qe = R.value.slice(), Ie = qe.findIndex((Oe) => q(Oe, ge));
    return Ie === -1 ? qe.push(ge) : qe.splice(Ie, 1), x == null ? void 0 : x(qe);
  } })), ne = _t((ge) => {
    E({ type: 6, trigger: ge });
  }), ae = k.useMemo(() => ({ onChange: ie, registerOption: re, registerLabel: J, goToOption: Z, closeCombobox: K, openCombobox: Y, setActivationTrigger: ne, selectActiveOption: Q }), []), le = t === null ? {} : { ref: t }, de = k.useRef(null), xe = Rk();
  return k.useEffect(() => {
    de.current && r !== void 0 && xe.addEventListener(de.current, "reset", () => {
      x == null || x(r);
    });
  }, [de, x]), ce.createElement(Pk.Provider, { value: ae }, ce.createElement($k.Provider, { value: R }, ce.createElement(X3e, { value: Ds(R.comboboxState, { 0: th.Open, 1: th.Closed }) }, s != null && S != null && k4({ [s]: S }).map(([ge, qe], Ie) => ce.createElement(K3e, { features: C4.Hidden, ref: Ie === 0 ? (Oe) => {
    var ot;
    de.current = (ot = Oe == null ? void 0 : Oe.closest("form")) != null ? ot : null;
  } : void 0, ...jS({ key: ge, as: "input", type: "hidden", hidden: !0, readOnly: !0, form: i, name: ge, value: qe }) })), Mc({ ourProps: le, theirProps: b, slot: te, defaultTag: u5e, name: "Combobox" }))));
}
let d5e = "input";
function p5e(e, t) {
  var n, r, o, i, s;
  let l = Vh(), { id: c = `headlessui-combobox-input-${l}`, onChange: f, displayValue: d, type: g = "text", ...m } = e, v = $c("Combobox.Input"), b = Uh("Combobox.Input"), w = jh(v.inputRef, t), _ = U3e(v.inputRef), S = k.useRef(!1), x = Rk(), C = _t(() => {
    b.onChange(null), v.optionsRef.current && (v.optionsRef.current.scrollTop = 0), b.goToOption(Pn.Nothing);
  }), E = function() {
    var R;
    return typeof d == "function" && v.value !== void 0 ? (R = d(v.value)) != null ? R : "" : typeof v.value == "string" ? v.value : "";
  }();
  LL(([R, te], [Q, Y]) => {
    if (S.current)
      return;
    let K = v.inputRef.current;
    K && ((Y === 0 && te === 1 || R !== Q) && (K.value = R), requestAnimationFrame(() => {
      if (S.current || !K || (_ == null ? void 0 : _.activeElement) !== K)
        return;
      let { selectionStart: Z, selectionEnd: re } = K;
      Math.abs((re ?? 0) - (Z ?? 0)) === 0 && Z === 0 && K.setSelectionRange(K.value.length, K.value.length);
    }));
  }, [E, v.comboboxState, _]), LL(([R], [te]) => {
    if (R === 0 && te === 1) {
      if (S.current)
        return;
      let Q = v.inputRef.current;
      if (!Q)
        return;
      let Y = Q.value, { selectionStart: K, selectionEnd: Z, selectionDirection: re } = Q;
      Q.value = "", Q.value = Y, re !== null ? Q.setSelectionRange(K, Z, re) : Q.setSelectionRange(K, Z);
    }
  }, [v.comboboxState]);
  let N = k.useRef(!1), I = _t(() => {
    N.current = !0;
  }), D = _t(() => {
    x.nextFrame(() => {
      N.current = !1;
    });
  }), A = _t((R) => {
    switch (S.current = !0, R.key) {
      case mo.Enter:
        if (S.current = !1, v.comboboxState !== 0 || N.current)
          return;
        if (R.preventDefault(), R.stopPropagation(), v.activeOptionIndex === null) {
          b.closeCombobox();
          return;
        }
        b.selectActiveOption(), v.mode === 0 && b.closeCombobox();
        break;
      case mo.ArrowDown:
        return S.current = !1, R.preventDefault(), R.stopPropagation(), Ds(v.comboboxState, { 0: () => b.goToOption(Pn.Next), 1: () => b.openCombobox() });
      case mo.ArrowUp:
        return S.current = !1, R.preventDefault(), R.stopPropagation(), Ds(v.comboboxState, { 0: () => b.goToOption(Pn.Previous), 1: () => {
          b.openCombobox(), x.nextFrame(() => {
            v.value || b.goToOption(Pn.Last);
          });
        } });
      case mo.Home:
        if (R.shiftKey)
          break;
        return S.current = !1, R.preventDefault(), R.stopPropagation(), b.goToOption(Pn.First);
      case mo.PageUp:
        return S.current = !1, R.preventDefault(), R.stopPropagation(), b.goToOption(Pn.First);
      case mo.End:
        if (R.shiftKey)
          break;
        return S.current = !1, R.preventDefault(), R.stopPropagation(), b.goToOption(Pn.Last);
      case mo.PageDown:
        return S.current = !1, R.preventDefault(), R.stopPropagation(), b.goToOption(Pn.Last);
      case mo.Escape:
        return S.current = !1, v.comboboxState !== 0 ? void 0 : (R.preventDefault(), v.optionsRef.current && !v.optionsPropsRef.current.static && R.stopPropagation(), v.nullable && v.mode === 0 && v.value === null && C(), b.closeCombobox());
      case mo.Tab:
        if (S.current = !1, v.comboboxState !== 0)
          return;
        v.mode === 0 && v.activationTrigger !== 1 && b.selectActiveOption(), b.closeCombobox();
        break;
    }
  }), F = _t((R) => {
    f == null || f(R), v.nullable && v.mode === 0 && R.target.value === "" && C(), b.openCombobox();
  }), $ = _t((R) => {
    var te, Q, Y;
    let K = (te = R.relatedTarget) != null ? te : Wl.find((Z) => Z !== R.currentTarget);
    if (S.current = !1, !((Q = v.optionsRef.current) != null && Q.contains(K)) && !((Y = v.buttonRef.current) != null && Y.contains(K)) && v.comboboxState === 0)
      return R.preventDefault(), v.mode === 0 && (v.nullable && v.value === null ? C() : v.activationTrigger !== 1 && b.selectActiveOption()), b.closeCombobox();
  }), q = _t((R) => {
    var te, Q, Y;
    let K = (te = R.relatedTarget) != null ? te : Wl.find((Z) => Z !== R.currentTarget);
    (Q = v.buttonRef.current) != null && Q.contains(K) || (Y = v.optionsRef.current) != null && Y.contains(K) || v.disabled || v.immediate && v.comboboxState !== 0 && (b.openCombobox(), x.nextFrame(() => {
      b.setActivationTrigger(1);
    }));
  }), H = Lk(() => {
    if (v.labelId)
      return [v.labelId].join(" ");
  }, [v.labelId]), z = k.useMemo(() => ({ open: v.comboboxState === 0, disabled: v.disabled }), [v]), B = { ref: w, id: c, role: "combobox", type: g, "aria-controls": (n = v.optionsRef.current) == null ? void 0 : n.id, "aria-expanded": v.comboboxState === 0, "aria-activedescendant": v.activeOptionIndex === null ? void 0 : v.virtual ? (r = v.options.find((R) => {
    var te;
    return !((te = v.virtual) != null && te.disabled(R.dataRef.current.value)) && v.compare(R.dataRef.current.value, v.virtual.options[v.activeOptionIndex]);
  })) == null ? void 0 : r.id : (o = v.options[v.activeOptionIndex]) == null ? void 0 : o.id, "aria-labelledby": H, "aria-autocomplete": "list", defaultValue: (s = (i = e.defaultValue) != null ? i : v.defaultValue !== void 0 ? d == null ? void 0 : d(v.defaultValue) : null) != null ? s : v.defaultValue, disabled: v.disabled, onCompositionStart: I, onCompositionEnd: D, onKeyDown: A, onChange: F, onFocus: q, onBlur: $ };
  return Mc({ ourProps: B, theirProps: m, slot: z, defaultTag: d5e, name: "Combobox.Input" });
}
let h5e = "button";
function m5e(e, t) {
  var n;
  let r = $c("Combobox.Button"), o = Uh("Combobox.Button"), i = jh(r.buttonRef, t), s = Vh(), { id: l = `headlessui-combobox-button-${s}`, ...c } = e, f = Rk(), d = _t((w) => {
    switch (w.key) {
      case mo.ArrowDown:
        return w.preventDefault(), w.stopPropagation(), r.comboboxState === 1 && o.openCombobox(), f.nextFrame(() => {
          var _;
          return (_ = r.inputRef.current) == null ? void 0 : _.focus({ preventScroll: !0 });
        });
      case mo.ArrowUp:
        return w.preventDefault(), w.stopPropagation(), r.comboboxState === 1 && (o.openCombobox(), f.nextFrame(() => {
          r.value || o.goToOption(Pn.Last);
        })), f.nextFrame(() => {
          var _;
          return (_ = r.inputRef.current) == null ? void 0 : _.focus({ preventScroll: !0 });
        });
      case mo.Escape:
        return r.comboboxState !== 0 ? void 0 : (w.preventDefault(), r.optionsRef.current && !r.optionsPropsRef.current.static && w.stopPropagation(), o.closeCombobox(), f.nextFrame(() => {
          var _;
          return (_ = r.inputRef.current) == null ? void 0 : _.focus({ preventScroll: !0 });
        }));
      default:
        return;
    }
  }), g = _t((w) => {
    if (e5e(w.currentTarget))
      return w.preventDefault();
    r.comboboxState === 0 ? o.closeCombobox() : (w.preventDefault(), o.openCombobox()), f.nextFrame(() => {
      var _;
      return (_ = r.inputRef.current) == null ? void 0 : _.focus({ preventScroll: !0 });
    });
  }), m = Lk(() => {
    if (r.labelId)
      return [r.labelId, l].join(" ");
  }, [r.labelId, l]), v = k.useMemo(() => ({ open: r.comboboxState === 0, disabled: r.disabled, value: r.value }), [r]), b = { ref: i, id: l, type: B3e(e, r.buttonRef), tabIndex: -1, "aria-haspopup": "listbox", "aria-controls": (n = r.optionsRef.current) == null ? void 0 : n.id, "aria-expanded": r.comboboxState === 0, "aria-labelledby": m, disabled: r.disabled, onClick: g, onKeyDown: d };
  return Mc({ ourProps: b, theirProps: c, slot: v, defaultTag: h5e, name: "Combobox.Button" });
}
let g5e = "label";
function v5e(e, t) {
  let n = Vh(), { id: r = `headlessui-combobox-label-${n}`, ...o } = e, i = $c("Combobox.Label"), s = Uh("Combobox.Label"), l = jh(i.labelRef, t);
  Hr(() => s.registerLabel(r), [r]);
  let c = _t(() => {
    var d;
    return (d = i.inputRef.current) == null ? void 0 : d.focus({ preventScroll: !0 });
  }), f = k.useMemo(() => ({ open: i.comboboxState === 0, disabled: i.disabled }), [i]);
  return Mc({ ourProps: { ref: l, id: r, onClick: c }, theirProps: o, slot: f, defaultTag: g5e, name: "Combobox.Label" });
}
let y5e = "ul", b5e = VS.RenderStrategy | VS.Static;
function E5e(e, t) {
  let n = Vh(), { id: r = `headlessui-combobox-options-${n}`, hold: o = !1, ...i } = e, s = $c("Combobox.Options"), l = jh(s.optionsRef, t), c = J3e(), f = c !== null ? (c & th.Open) === th.Open : s.comboboxState === 0;
  Hr(() => {
    var v;
    s.optionsPropsRef.current.static = (v = e.static) != null ? v : !1;
  }, [s.optionsPropsRef, e.static]), Hr(() => {
    s.optionsPropsRef.current.hold = o;
  }, [s.optionsPropsRef, o]), H3e({ container: s.optionsRef.current, enabled: s.comboboxState === 0, accept(v) {
    return v.getAttribute("role") === "option" ? NodeFilter.FILTER_REJECT : v.hasAttribute("role") ? NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT;
  }, walk(v) {
    v.setAttribute("role", "none");
  } });
  let d = Lk(() => {
    var v, b;
    return (b = s.labelId) != null ? b : (v = s.buttonRef.current) == null ? void 0 : v.id;
  }, [s.labelId, s.buttonRef.current]), g = k.useMemo(() => ({ open: s.comboboxState === 0, option: void 0 }), [s]), m = { "aria-labelledby": d, role: "listbox", "aria-multiselectable": s.mode === 1 ? !0 : void 0, id: r, ref: l };
  return s.virtual && s.comboboxState === 0 && Object.assign(i, { children: ce.createElement(l5e, null, i.children) }), Mc({ ourProps: m, theirProps: i, slot: g, defaultTag: y5e, features: b5e, visible: f, name: "Combobox.Options" });
}
let w5e = "li";
function x5e(e, t) {
  var n;
  let r = Vh(), { id: o = `headlessui-combobox-option-${r}`, disabled: i = !1, value: s, order: l = null, ...c } = e, f = $c("Combobox.Option"), d = Uh("Combobox.Option"), g = f.virtual ? f.activeOptionIndex === f.calculateIndex(s) : f.activeOptionIndex === null ? !1 : ((n = f.options[f.activeOptionIndex]) == null ? void 0 : n.id) === o, m = f.isSelected(s), v = k.useRef(null), b = $h({ disabled: i, value: s, domRef: v, order: l }), w = k.useContext(O4), _ = jh(t, v, w ? w.measureElement : null), S = _t(() => d.onChange(s));
  Hr(() => d.registerOption(o, b), [b, o]);
  let x = k.useRef(!(f.virtual || f.__demoMode));
  Hr(() => {
    if (!f.virtual || !f.__demoMode)
      return;
    let $ = T0();
    return $.requestAnimationFrame(() => {
      x.current = !0;
    }), $.dispose;
  }, [f.virtual, f.__demoMode]), Hr(() => {
    if (!x.current || f.comboboxState !== 0 || !g || f.activationTrigger === 0)
      return;
    let $ = T0();
    return $.requestAnimationFrame(() => {
      var q, H;
      (H = (q = v.current) == null ? void 0 : q.scrollIntoView) == null || H.call(q, { block: "nearest" });
    }), $.dispose;
  }, [v, g, f.comboboxState, f.activationTrigger, f.activeOptionIndex]);
  let C = _t(($) => {
    var q;
    if (i || (q = f.virtual) != null && q.disabled(s))
      return $.preventDefault();
    S(), S4() || requestAnimationFrame(() => {
      var H;
      return (H = f.inputRef.current) == null ? void 0 : H.focus({ preventScroll: !0 });
    }), f.mode === 0 && requestAnimationFrame(() => d.closeCombobox());
  }), E = _t(() => {
    var $;
    if (i || ($ = f.virtual) != null && $.disabled(s))
      return d.goToOption(Pn.Nothing);
    let q = f.calculateIndex(s);
    d.goToOption(Pn.Specific, q);
  }), N = z3e(), I = _t(($) => N.update($)), D = _t(($) => {
    var q;
    if (!N.wasMoved($) || i || (q = f.virtual) != null && q.disabled(s) || g)
      return;
    let H = f.calculateIndex(s);
    d.goToOption(Pn.Specific, H, 0);
  }), A = _t(($) => {
    var q;
    N.wasMoved($) && (i || (q = f.virtual) != null && q.disabled(s) || g && (f.optionsPropsRef.current.hold || d.goToOption(Pn.Nothing)));
  }), F = k.useMemo(() => ({ active: g, selected: m, disabled: i }), [g, m, i]);
  return Mc({ ourProps: { id: o, ref: _, role: "option", tabIndex: i === !0 ? void 0 : -1, "aria-disabled": i === !0 ? !0 : void 0, "aria-selected": m, disabled: void 0, onClick: C, onFocus: E, onPointerEnter: I, onMouseEnter: I, onPointerMove: D, onMouseMove: D, onPointerLeave: A, onMouseLeave: A }, theirProps: c, slot: F, defaultTag: w5e, name: "Combobox.Option" });
}
let S5e = Pc(f5e), T5e = Pc(m5e), C5e = Pc(p5e), k5e = Pc(v5e), _5e = Pc(E5e), N5e = Pc(x5e), Tu = Object.assign(S5e, { Input: C5e, Button: T5e, Label: k5e, Options: _5e, Option: N5e });
var O5e = Object.defineProperty, fe = (e, t) => O5e(e, "name", { value: t, configurable: !0 });
function cl(e) {
  const t = k.createContext(null);
  return t.displayName = e, t;
}
fe(cl, "createNullableContext");
function ul(e) {
  function t(n) {
    var r;
    const o = k.useContext(e);
    if (o === null && n != null && n.nonNull)
      throw new Error(
        `Tried to use \`${((r = n.caller) == null ? void 0 : r.name) || t.caller.name}\` without the necessary context. Make sure to render the \`${e.displayName}Provider\` component higher up the tree.`
      );
    return o;
  }
  return fe(t, "useGivenContext"), Object.defineProperty(t, "name", {
    value: `use${e.displayName}`
  }), t;
}
fe(ul, "createContextHook");
const A4 = cl("StorageContext");
function D4(e) {
  const t = k.useRef(!0), [n, r] = k.useState(new Kx(e.storage));
  return k.useEffect(() => {
    t.current ? t.current = !1 : r(new Kx(e.storage));
  }, [e.storage]), /* @__PURE__ */ W.jsx(A4.Provider, { value: n, children: e.children });
}
fe(D4, "StorageContextProvider");
const fl = ul(A4), A5e = /* @__PURE__ */ fe(({
  title: e,
  titleId: t,
  ...n
}) => /* @__PURE__ */ k.createElement("svg", { height: "1em", viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-labelledby": t, ...n }, e ? /* @__PURE__ */ k.createElement("title", { id: t }, e) : null, /* @__PURE__ */ k.createElement("path", { d: "M5.0484 1.40838C6.12624 0.33054 7.87376 0.330541 8.9516 1.40838L12.5916 5.0484C13.6695 6.12624 13.6695 7.87376 12.5916 8.9516L8.9516 12.5916C7.87376 13.6695 6.12624 13.6695 5.0484 12.5916L1.40838 8.9516C0.33054 7.87376 0.330541 6.12624 1.40838 5.0484L5.0484 1.40838Z", stroke: "currentColor", strokeWidth: 1.2 }), /* @__PURE__ */ k.createElement("rect", { x: 6, y: 6, width: 2, height: 2, rx: 1, fill: "currentColor" })), "SvgArgument"), D5e = /* @__PURE__ */ fe(({
  title: e,
  titleId: t,
  ...n
}) => /* @__PURE__ */ k.createElement("svg", { height: "1em", viewBox: "0 0 14 9", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-labelledby": t, ...n }, e ? /* @__PURE__ */ k.createElement("title", { id: t }, e) : null, /* @__PURE__ */ k.createElement("path", { d: "M1 1L7 7L13 1", stroke: "currentColor", strokeWidth: 1.5 })), "SvgChevronDown"), I5e = /* @__PURE__ */ fe(({
  title: e,
  titleId: t,
  ...n
}) => /* @__PURE__ */ k.createElement("svg", { height: "1em", viewBox: "0 0 7 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-labelledby": t, ...n }, e ? /* @__PURE__ */ k.createElement("title", { id: t }, e) : null, /* @__PURE__ */ k.createElement("path", { d: "M6 1.04819L2 5.04819L6 9.04819", stroke: "currentColor", strokeWidth: 1.75 })), "SvgChevronLeft"), L5e = /* @__PURE__ */ fe(({
  title: e,
  titleId: t,
  ...n
}) => /* @__PURE__ */ k.createElement("svg", { height: "1em", viewBox: "0 0 14 9", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-labelledby": t, ...n }, e ? /* @__PURE__ */ k.createElement("title", { id: t }, e) : null, /* @__PURE__ */ k.createElement("path", { d: "M13 8L7 2L1 8", stroke: "currentColor", strokeWidth: 1.5 })), "SvgChevronUp"), R5e = /* @__PURE__ */ fe(({
  title: e,
  titleId: t,
  ...n
}) => /* @__PURE__ */ k.createElement("svg", { height: "1em", viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-labelledby": t, ...n }, e ? /* @__PURE__ */ k.createElement("title", { id: t }, e) : null, /* @__PURE__ */ k.createElement("path", { d: "M1 1L12.9998 12.9997", stroke: "currentColor", strokeWidth: 1.5 }), /* @__PURE__ */ k.createElement("path", { d: "M13 1L1.00079 13.0003", stroke: "currentColor", strokeWidth: 1.5 })), "SvgClose"), F5e = /* @__PURE__ */ fe(({
  title: e,
  titleId: t,
  ...n
}) => /* @__PURE__ */ k.createElement("svg", { height: "1em", viewBox: "-2 -2 22 22", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-labelledby": t, ...n }, e ? /* @__PURE__ */ k.createElement("title", { id: t }, e) : null, /* @__PURE__ */ k.createElement("path", { d: "M11.25 14.2105V15.235C11.25 16.3479 10.3479 17.25 9.23501 17.25H2.76499C1.65214 17.25 0.75 16.3479 0.75 15.235L0.75 8.76499C0.75 7.65214 1.65214 6.75 2.76499 6.75L3.78947 6.75", stroke: "currentColor", strokeWidth: 1.5 }), /* @__PURE__ */ k.createElement("rect", { x: 6.75, y: 0.75, width: 10.5, height: 10.5, rx: 2.2069, stroke: "currentColor", strokeWidth: 1.5 })), "SvgCopy"), M5e = /* @__PURE__ */ fe(({
  title: e,
  titleId: t,
  ...n
}) => /* @__PURE__ */ k.createElement("svg", { height: "1em", viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-labelledby": t, ...n }, e ? /* @__PURE__ */ k.createElement("title", { id: t }, e) : null, /* @__PURE__ */ k.createElement("path", { d: "M5.0484 1.40838C6.12624 0.33054 7.87376 0.330541 8.9516 1.40838L12.5916 5.0484C13.6695 6.12624 13.6695 7.87376 12.5916 8.9516L8.9516 12.5916C7.87376 13.6695 6.12624 13.6695 5.0484 12.5916L1.40838 8.9516C0.33054 7.87376 0.330541 6.12624 1.40838 5.0484L5.0484 1.40838Z", stroke: "currentColor", strokeWidth: 1.2 }), /* @__PURE__ */ k.createElement("path", { d: "M5 9L9 5", stroke: "currentColor", strokeWidth: 1.2 }), /* @__PURE__ */ k.createElement("path", { d: "M5 5L9 9", stroke: "currentColor", strokeWidth: 1.2 })), "SvgDeprecatedArgument"), P5e = /* @__PURE__ */ fe(({
  title: e,
  titleId: t,
  ...n
}) => /* @__PURE__ */ k.createElement("svg", { height: "1em", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-labelledby": t, ...n }, e ? /* @__PURE__ */ k.createElement("title", { id: t }, e) : null, /* @__PURE__ */ k.createElement("path", { d: "M4 8L8 4", stroke: "currentColor", strokeWidth: 1.2 }), /* @__PURE__ */ k.createElement("path", { d: "M4 4L8 8", stroke: "currentColor", strokeWidth: 1.2 }), /* @__PURE__ */ k.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M8.5 1.2H9C9.99411 1.2 10.8 2.00589 10.8 3V9C10.8 9.99411 9.99411 10.8 9 10.8H8.5V12H9C10.6569 12 12 10.6569 12 9V3C12 1.34315 10.6569 0 9 0H8.5V1.2ZM3.5 1.2V0H3C1.34315 0 0 1.34315 0 3V9C0 10.6569 1.34315 12 3 12H3.5V10.8H3C2.00589 10.8 1.2 9.99411 1.2 9V3C1.2 2.00589 2.00589 1.2 3 1.2H3.5Z", fill: "currentColor" })), "SvgDeprecatedEnumValue"), $5e = /* @__PURE__ */ fe(({
  title: e,
  titleId: t,
  ...n
}) => /* @__PURE__ */ k.createElement("svg", { height: "1em", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-labelledby": t, ...n }, e ? /* @__PURE__ */ k.createElement("title", { id: t }, e) : null, /* @__PURE__ */ k.createElement("rect", { x: 0.6, y: 0.6, width: 10.8, height: 10.8, rx: 3.4, stroke: "currentColor", strokeWidth: 1.2 }), /* @__PURE__ */ k.createElement("path", { d: "M4 8L8 4", stroke: "currentColor", strokeWidth: 1.2 }), /* @__PURE__ */ k.createElement("path", { d: "M4 4L8 8", stroke: "currentColor", strokeWidth: 1.2 })), "SvgDeprecatedField"), V5e = /* @__PURE__ */ fe(({
  title: e,
  titleId: t,
  ...n
}) => /* @__PURE__ */ k.createElement("svg", { height: "1em", viewBox: "0 0.5 12 12", xmlns: "http://www.w3.org/2000/svg", "aria-labelledby": t, ...n }, e ? /* @__PURE__ */ k.createElement("title", { id: t }, e) : null, /* @__PURE__ */ k.createElement("rect", { x: 7, y: 5.5, width: 2, height: 2, rx: 1, transform: "rotate(90 7 5.5)", fill: "currentColor" }), /* @__PURE__ */ k.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M10.8 9L10.8 9.5C10.8 10.4941 9.99411 11.3 9 11.3L3 11.3C2.00589 11.3 1.2 10.4941 1.2 9.5L1.2 9L-3.71547e-07 9L-3.93402e-07 9.5C-4.65826e-07 11.1569 1.34314 12.5 3 12.5L9 12.5C10.6569 12.5 12 11.1569 12 9.5L12 9L10.8 9ZM10.8 4L12 4L12 3.5C12 1.84315 10.6569 0.5 9 0.5L3 0.5C1.34315 0.5 -5.87117e-08 1.84315 -1.31135e-07 3.5L-1.5299e-07 4L1.2 4L1.2 3.5C1.2 2.50589 2.00589 1.7 3 1.7L9 1.7C9.99411 1.7 10.8 2.50589 10.8 3.5L10.8 4Z", fill: "currentColor" })), "SvgDirective"), j5e = /* @__PURE__ */ fe(({
  title: e,
  titleId: t,
  ...n
}) => /* @__PURE__ */ k.createElement("svg", { height: "1em", viewBox: "0 0 20 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-labelledby": t, ...n }, e ? /* @__PURE__ */ k.createElement("title", { id: t }, e) : null, /* @__PURE__ */ k.createElement("path", { d: "M0.75 3C0.75 1.75736 1.75736 0.75 3 0.75H17.25C17.8023 0.75 18.25 1.19772 18.25 1.75V5.25", stroke: "currentColor", strokeWidth: 1.5 }), /* @__PURE__ */ k.createElement("path", { d: "M0.75 3C0.75 4.24264 1.75736 5.25 3 5.25H18.25C18.8023 5.25 19.25 5.69771 19.25 6.25V22.25C19.25 22.8023 18.8023 23.25 18.25 23.25H3C1.75736 23.25 0.75 22.2426 0.75 21V3Z", stroke: "currentColor", strokeWidth: 1.5 }), /* @__PURE__ */ k.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M3 5.25C1.75736 5.25 0.75 4.24264 0.75 3V21C0.75 22.2426 1.75736 23.25 3 23.25H18.25C18.8023 23.25 19.25 22.8023 19.25 22.25V6.25C19.25 5.69771 18.8023 5.25 18.25 5.25H3ZM13 11L6 11V12.5L13 12.5V11Z", fill: "currentColor" })), "SvgDocsFilled"), U5e = /* @__PURE__ */ fe(({
  title: e,
  titleId: t,
  ...n
}) => /* @__PURE__ */ k.createElement("svg", { height: "1em", viewBox: "0 0 20 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-labelledby": t, ...n }, e ? /* @__PURE__ */ k.createElement("title", { id: t }, e) : null, /* @__PURE__ */ k.createElement("path", { d: "M0.75 3C0.75 4.24264 1.75736 5.25 3 5.25H17.25M0.75 3C0.75 1.75736 1.75736 0.75 3 0.75H16.25C16.8023 0.75 17.25 1.19772 17.25 1.75V5.25M0.75 3V21C0.75 22.2426 1.75736 23.25 3 23.25H18.25C18.8023 23.25 19.25 22.8023 19.25 22.25V6.25C19.25 5.69771 18.8023 5.25 18.25 5.25H17.25", stroke: "currentColor", strokeWidth: 1.5 }), /* @__PURE__ */ k.createElement("line", { x1: 13, y1: 11.75, x2: 6, y2: 11.75, stroke: "currentColor", strokeWidth: 1.5 })), "SvgDocs"), B5e = /* @__PURE__ */ fe(({
  title: e,
  titleId: t,
  ...n
}) => /* @__PURE__ */ k.createElement("svg", { height: "1em", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-labelledby": t, ...n }, e ? /* @__PURE__ */ k.createElement("title", { id: t }, e) : null, /* @__PURE__ */ k.createElement("rect", { x: 5, y: 5, width: 2, height: 2, rx: 1, fill: "currentColor" }), /* @__PURE__ */ k.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M8.5 1.2H9C9.99411 1.2 10.8 2.00589 10.8 3V9C10.8 9.99411 9.99411 10.8 9 10.8H8.5V12H9C10.6569 12 12 10.6569 12 9V3C12 1.34315 10.6569 0 9 0H8.5V1.2ZM3.5 1.2V0H3C1.34315 0 0 1.34315 0 3V9C0 10.6569 1.34315 12 3 12H3.5V10.8H3C2.00589 10.8 1.2 9.99411 1.2 9V3C1.2 2.00589 2.00589 1.2 3 1.2H3.5Z", fill: "currentColor" })), "SvgEnumValue"), q5e = /* @__PURE__ */ fe(({
  title: e,
  titleId: t,
  ...n
}) => /* @__PURE__ */ k.createElement("svg", { height: "1em", viewBox: "0 0 12 13", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-labelledby": t, ...n }, e ? /* @__PURE__ */ k.createElement("title", { id: t }, e) : null, /* @__PURE__ */ k.createElement("rect", { x: 0.6, y: 1.1, width: 10.8, height: 10.8, rx: 2.4, stroke: "currentColor", strokeWidth: 1.2 }), /* @__PURE__ */ k.createElement("rect", { x: 5, y: 5.5, width: 2, height: 2, rx: 1, fill: "currentColor" })), "SvgField"), z5e = /* @__PURE__ */ fe(({
  title: e,
  titleId: t,
  ...n
}) => /* @__PURE__ */ k.createElement("svg", { height: "1em", viewBox: "0 0 24 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-labelledby": t, ...n }, e ? /* @__PURE__ */ k.createElement("title", { id: t }, e) : null, /* @__PURE__ */ k.createElement("path", { d: "M1.59375 9.52344L4.87259 12.9944L8.07872 9.41249", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "square" }), /* @__PURE__ */ k.createElement("path", { d: "M13.75 5.25V10.75H18.75", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "square" }), /* @__PURE__ */ k.createElement("path", { d: "M4.95427 11.9332C4.55457 10.0629 4.74441 8.11477 5.49765 6.35686C6.25089 4.59894 7.5305 3.11772 9.16034 2.11709C10.7902 1.11647 12.6901 0.645626 14.5986 0.769388C16.5071 0.893151 18.3303 1.60543 19.8172 2.80818C21.3042 4.01093 22.3818 5.64501 22.9017 7.48548C23.4216 9.32595 23.3582 11.2823 22.7203 13.0853C22.0824 14.8883 20.9013 16.4492 19.3396 17.5532C17.778 18.6572 15.9125 19.25 14 19.25", stroke: "currentColor", strokeWidth: 1.5 })), "SvgHistory"), H5e = /* @__PURE__ */ fe(({
  title: e,
  titleId: t,
  ...n
}) => /* @__PURE__ */ k.createElement("svg", { height: "1em", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-labelledby": t, ...n }, e ? /* @__PURE__ */ k.createElement("title", { id: t }, e) : null, /* @__PURE__ */ k.createElement("circle", { cx: 6, cy: 6, r: 5.4, stroke: "currentColor", strokeWidth: 1.2, strokeDasharray: "4.241025 4.241025", transform: "rotate(22.5)", "transform-origin": "center" }), /* @__PURE__ */ k.createElement("circle", { cx: 6, cy: 6, r: 1, fill: "currentColor" })), "SvgImplements"), W5e = /* @__PURE__ */ fe(({
  title: e,
  titleId: t,
  ...n
}) => /* @__PURE__ */ k.createElement("svg", { height: "1em", viewBox: "0 0 19 18", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-labelledby": t, ...n }, e ? /* @__PURE__ */ k.createElement("title", { id: t }, e) : null, /* @__PURE__ */ k.createElement("path", { d: "M1.5 14.5653C1.5 15.211 1.75652 15.8303 2.21314 16.2869C2.66975 16.7435 3.28905 17 3.9348 17C4.58054 17 5.19984 16.7435 5.65646 16.2869C6.11307 15.8303 6.36959 15.211 6.36959 14.5653V12.1305H3.9348C3.28905 12.1305 2.66975 12.387 2.21314 12.8437C1.75652 13.3003 1.5 13.9195 1.5 14.5653Z", stroke: "currentColor", strokeWidth: 1.125, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ k.createElement("path", { d: "M3.9348 1.00063C3.28905 1.00063 2.66975 1.25715 2.21314 1.71375C1.75652 2.17035 1.5 2.78964 1.5 3.43537C1.5 4.0811 1.75652 4.70038 2.21314 5.15698C2.66975 5.61358 3.28905 5.8701 3.9348 5.8701H6.36959V3.43537C6.36959 2.78964 6.11307 2.17035 5.65646 1.71375C5.19984 1.25715 4.58054 1.00063 3.9348 1.00063Z", stroke: "currentColor", strokeWidth: 1.125, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ k.createElement("path", { d: "M15.0652 12.1305H12.6304V14.5653C12.6304 15.0468 12.7732 15.5175 13.0407 15.9179C13.3083 16.3183 13.6885 16.6304 14.1334 16.8147C14.5783 16.9989 15.0679 17.0472 15.5402 16.9532C16.0125 16.8593 16.4464 16.6274 16.7869 16.2869C17.1274 15.9464 17.3593 15.5126 17.4532 15.0403C17.5472 14.568 17.4989 14.0784 17.3147 13.6335C17.1304 13.1886 16.8183 12.8084 16.4179 12.5409C16.0175 12.2733 15.5468 12.1305 15.0652 12.1305Z", stroke: "currentColor", strokeWidth: 1.125, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ k.createElement("path", { d: "M12.6318 5.86775H6.36955V12.1285H12.6318V5.86775Z", stroke: "currentColor", strokeWidth: 1.125, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ k.createElement("path", { d: "M17.5 3.43473C17.5 2.789 17.2435 2.16972 16.7869 1.71312C16.3303 1.25652 15.711 1 15.0652 1C14.4195 1 13.8002 1.25652 13.3435 1.71312C12.8869 2.16972 12.6304 2.789 12.6304 3.43473V5.86946H15.0652C15.711 5.86946 16.3303 5.61295 16.7869 5.15635C17.2435 4.69975 17.5 4.08046 17.5 3.43473Z", stroke: "currentColor", strokeWidth: 1.125, strokeLinecap: "round", strokeLinejoin: "round" })), "SvgKeyboardShortcut"), G5e = /* @__PURE__ */ fe(({
  title: e,
  titleId: t,
  ...n
}) => /* @__PURE__ */ k.createElement("svg", { height: "1em", viewBox: "0 0 13 13", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-labelledby": t, ...n }, e ? /* @__PURE__ */ k.createElement("title", { id: t }, e) : null, /* @__PURE__ */ k.createElement("circle", { cx: 5, cy: 5, r: 4.35, stroke: "currentColor", strokeWidth: 1.3 }), /* @__PURE__ */ k.createElement("line", { x1: 8.45962, y1: 8.54038, x2: 11.7525, y2: 11.8333, stroke: "currentColor", strokeWidth: 1.3 })), "SvgMagnifyingGlass"), Q5e = /* @__PURE__ */ fe(({
  title: e,
  titleId: t,
  ...n
}) => /* @__PURE__ */ k.createElement("svg", { height: "1em", viewBox: "-2 -2 22 22", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-labelledby": t, ...n }, e ? /* @__PURE__ */ k.createElement("title", { id: t }, e) : null, /* @__PURE__ */ k.createElement("path", { d: "M17.2492 6V2.9569C17.2492 1.73806 16.2611 0.75 15.0423 0.75L2.9569 0.75C1.73806 0.75 0.75 1.73806 0.75 2.9569L0.75 6", stroke: "currentColor", strokeWidth: 1.5 }), /* @__PURE__ */ k.createElement("path", { d: "M0.749873 12V15.0431C0.749873 16.2619 1.73794 17.25 2.95677 17.25H15.0421C16.261 17.25 17.249 16.2619 17.249 15.0431V12", stroke: "currentColor", strokeWidth: 1.5 }), /* @__PURE__ */ k.createElement("path", { d: "M6 4.5L9 7.5L12 4.5", stroke: "currentColor", strokeWidth: 1.5 }), /* @__PURE__ */ k.createElement("path", { d: "M12 13.5L9 10.5L6 13.5", stroke: "currentColor", strokeWidth: 1.5 })), "SvgMerge"), Y5e = /* @__PURE__ */ fe(({
  title: e,
  titleId: t,
  ...n
}) => /* @__PURE__ */ k.createElement("svg", { height: "1em", viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-labelledby": t, ...n }, e ? /* @__PURE__ */ k.createElement("title", { id: t }, e) : null, /* @__PURE__ */ k.createElement("path", { d: "M0.75 13.25L0.0554307 12.967C-0.0593528 13.2488 0.00743073 13.5719 0.224488 13.7851C0.441545 13.9983 0.765869 14.0592 1.04549 13.9393L0.75 13.25ZM12.8214 1.83253L12.2911 2.36286L12.2911 2.36286L12.8214 1.83253ZM12.8214 3.90194L13.3517 4.43227L12.8214 3.90194ZM10.0981 1.17859L9.56773 0.648259L10.0981 1.17859ZM12.1675 1.17859L12.6978 0.648258L12.6978 0.648257L12.1675 1.17859ZM2.58049 8.75697L3.27506 9.03994L2.58049 8.75697ZM2.70066 8.57599L3.23099 9.10632L2.70066 8.57599ZM5.2479 11.4195L4.95355 10.7297L5.2479 11.4195ZM5.42036 11.303L4.89003 10.7727L5.42036 11.303ZM4.95355 10.7297C4.08882 11.0987 3.41842 11.362 2.73535 11.6308C2.05146 11.9 1.35588 12.1743 0.454511 12.5607L1.04549 13.9393C1.92476 13.5624 2.60256 13.2951 3.28469 13.0266C3.96762 12.7578 4.65585 12.4876 5.54225 12.1093L4.95355 10.7297ZM1.44457 13.533L3.27506 9.03994L1.88592 8.474L0.0554307 12.967L1.44457 13.533ZM3.23099 9.10632L10.6284 1.70892L9.56773 0.648259L2.17033 8.04566L3.23099 9.10632ZM11.6371 1.70892L12.2911 2.36286L13.3517 1.3022L12.6978 0.648258L11.6371 1.70892ZM12.2911 3.37161L4.89003 10.7727L5.95069 11.8333L13.3517 4.43227L12.2911 3.37161ZM12.2911 2.36286C12.5696 2.64142 12.5696 3.09305 12.2911 3.37161L13.3517 4.43227C14.2161 3.56792 14.2161 2.16654 13.3517 1.3022L12.2911 2.36286ZM10.6284 1.70892C10.9069 1.43036 11.3586 1.43036 11.6371 1.70892L12.6978 0.648257C11.8335 -0.216088 10.4321 -0.216084 9.56773 0.648259L10.6284 1.70892ZM3.27506 9.03994C3.26494 9.06479 3.24996 9.08735 3.23099 9.10632L2.17033 8.04566C2.04793 8.16806 1.95123 8.31369 1.88592 8.474L3.27506 9.03994ZM5.54225 12.1093C5.69431 12.0444 5.83339 11.9506 5.95069 11.8333L4.89003 10.7727C4.90863 10.7541 4.92988 10.7398 4.95355 10.7297L5.54225 12.1093Z", fill: "currentColor" }), /* @__PURE__ */ k.createElement("path", { d: "M11.5 4.5L9.5 2.5", stroke: "currentColor", strokeWidth: 1.4026, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ k.createElement("path", { d: "M5.5 10.5L3.5 8.5", stroke: "currentColor", strokeWidth: 1.4026, strokeLinecap: "round", strokeLinejoin: "round" })), "SvgPen"), K5e = /* @__PURE__ */ fe(({
  title: e,
  titleId: t,
  ...n
}) => /* @__PURE__ */ k.createElement("svg", { height: "1em", viewBox: "0 0 16 18", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-labelledby": t, ...n }, e ? /* @__PURE__ */ k.createElement("title", { id: t }, e) : null, /* @__PURE__ */ k.createElement("path", { d: "M1.32226e-07 1.6609C7.22332e-08 0.907329 0.801887 0.424528 1.46789 0.777117L15.3306 8.11621C16.0401 8.49182 16.0401 9.50818 15.3306 9.88379L1.46789 17.2229C0.801886 17.5755 1.36076e-06 17.0927 1.30077e-06 16.3391L1.32226e-07 1.6609Z", fill: "currentColor" })), "SvgPlay"), J5e = /* @__PURE__ */ fe(({
  title: e,
  titleId: t,
  ...n
}) => /* @__PURE__ */ k.createElement("svg", { height: "1em", viewBox: "0 0 10 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-labelledby": t, ...n }, e ? /* @__PURE__ */ k.createElement("title", { id: t }, e) : null, /* @__PURE__ */ k.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M4.25 9.25V13.5H5.75V9.25L10 9.25V7.75L5.75 7.75V3.5H4.25V7.75L0 7.75V9.25L4.25 9.25Z", fill: "currentColor" })), "SvgPlus"), X5e = /* @__PURE__ */ fe(({
  title: e,
  titleId: t,
  ...n
}) => /* @__PURE__ */ k.createElement("svg", { width: 25, height: 25, viewBox: "0 0 25 25", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-labelledby": t, ...n }, e ? /* @__PURE__ */ k.createElement("title", { id: t }, e) : null, /* @__PURE__ */ k.createElement("path", { d: "M10.2852 24.0745L13.7139 18.0742", stroke: "currentColor", strokeWidth: 1.5625 }), /* @__PURE__ */ k.createElement("path", { d: "M14.5742 24.0749L17.1457 19.7891", stroke: "currentColor", strokeWidth: 1.5625 }), /* @__PURE__ */ k.createElement("path", { d: "M19.4868 24.0735L20.7229 21.7523C21.3259 20.6143 21.5457 19.3122 21.3496 18.0394C21.1535 16.7666 20.5519 15.591 19.6342 14.6874L23.7984 6.87853C24.0123 6.47728 24.0581 6.00748 23.9256 5.57249C23.7932 5.1375 23.4933 4.77294 23.0921 4.55901C22.6908 4.34509 22.221 4.29932 21.7861 4.43178C21.3511 4.56424 20.9865 4.86408 20.7726 5.26533L16.6084 13.0742C15.3474 12.8142 14.0362 12.9683 12.8699 13.5135C11.7035 14.0586 10.7443 14.9658 10.135 16.1L6 24.0735", stroke: "currentColor", strokeWidth: 1.5625 }), /* @__PURE__ */ k.createElement("path", { d: "M4 15L5 13L7 12L5 11L4 9L3 11L1 12L3 13L4 15Z", stroke: "currentColor", strokeWidth: 1.5625, strokeLinejoin: "round" }), /* @__PURE__ */ k.createElement("path", { d: "M11.5 8L12.6662 5.6662L15 4.5L12.6662 3.3338L11.5 1L10.3338 3.3338L8 4.5L10.3338 5.6662L11.5 8Z", stroke: "currentColor", strokeWidth: 1.5625, strokeLinejoin: "round" })), "SvgPrettify"), Z5e = /* @__PURE__ */ fe(({
  title: e,
  titleId: t,
  ...n
}) => /* @__PURE__ */ k.createElement("svg", { height: "1em", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-labelledby": t, ...n }, e ? /* @__PURE__ */ k.createElement("title", { id: t }, e) : null, /* @__PURE__ */ k.createElement("path", { d: "M4.75 9.25H1.25V12.75", stroke: "currentColor", strokeWidth: 1, strokeLinecap: "square" }), /* @__PURE__ */ k.createElement("path", { d: "M11.25 6.75H14.75V3.25", stroke: "currentColor", strokeWidth: 1, strokeLinecap: "square" }), /* @__PURE__ */ k.createElement("path", { d: "M14.1036 6.65539C13.8 5.27698 13.0387 4.04193 11.9437 3.15131C10.8487 2.26069 9.48447 1.76694 8.0731 1.75043C6.66173 1.73392 5.28633 2.19563 4.17079 3.0604C3.05526 3.92516 2.26529 5.14206 1.92947 6.513", stroke: "currentColor", strokeWidth: 1 }), /* @__PURE__ */ k.createElement("path", { d: "M1.89635 9.34461C2.20001 10.723 2.96131 11.9581 4.05631 12.8487C5.15131 13.7393 6.51553 14.2331 7.9269 14.2496C9.33827 14.2661 10.7137 13.8044 11.8292 12.9396C12.9447 12.0748 13.7347 10.8579 14.0705 9.487", stroke: "currentColor", strokeWidth: 1 })), "SvgReload"), e$e = /* @__PURE__ */ fe(({
  title: e,
  titleId: t,
  ...n
}) => /* @__PURE__ */ k.createElement("svg", { height: "1em", viewBox: "0 0 13 13", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-labelledby": t, ...n }, e ? /* @__PURE__ */ k.createElement("title", { id: t }, e) : null, /* @__PURE__ */ k.createElement("rect", { x: 0.6, y: 0.6, width: 11.8, height: 11.8, rx: 5.9, stroke: "currentColor", strokeWidth: 1.2 }), /* @__PURE__ */ k.createElement("path", { d: "M4.25 7.5C4.25 6 5.75 5 6.5 6.5C7.25 8 8.75 7 8.75 5.5", stroke: "currentColor", strokeWidth: 1.2 })), "SvgRootType"), t$e = /* @__PURE__ */ fe(({
  title: e,
  titleId: t,
  ...n
}) => /* @__PURE__ */ k.createElement("svg", { height: "1em", viewBox: "0 0 21 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-labelledby": t, ...n }, e ? /* @__PURE__ */ k.createElement("title", { id: t }, e) : null, /* @__PURE__ */ k.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M9.29186 1.92702C9.06924 1.82745 8.87014 1.68202 8.70757 1.50024L7.86631 0.574931C7.62496 0.309957 7.30773 0.12592 6.95791 0.0479385C6.60809 -0.0300431 6.24274 0.00182978 5.91171 0.139208C5.58068 0.276585 5.3001 0.512774 5.10828 0.815537C4.91645 1.1183 4.82272 1.47288 4.83989 1.83089L4.90388 3.08019C4.91612 3.32348 4.87721 3.56662 4.78968 3.79394C4.70215 4.02126 4.56794 4.2277 4.39571 4.39994C4.22347 4.57219 4.01704 4.7064 3.78974 4.79394C3.56243 4.88147 3.3193 4.92038 3.07603 4.90814L1.8308 4.84414C1.47162 4.82563 1.11553 4.91881 0.811445 5.11086C0.507359 5.30292 0.270203 5.58443 0.132561 5.91671C-0.00508149 6.249 -0.0364554 6.61576 0.0427496 6.9666C0.121955 7.31744 0.307852 7.63514 0.5749 7.87606L1.50016 8.71204C1.68193 8.87461 1.82735 9.07373 1.92692 9.29636C2.02648 9.51898 2.07794 9.76012 2.07794 10.004C2.07794 10.2479 2.02648 10.489 1.92692 10.7116C1.82735 10.9343 1.68193 11.1334 1.50016 11.296L0.5749 12.1319C0.309856 12.3729 0.125575 12.6898 0.0471809 13.0393C-0.0312128 13.3888 9.64098e-05 13.754 0.13684 14.0851C0.273583 14.4162 0.509106 14.6971 0.811296 14.8894C1.11349 15.0817 1.46764 15.1762 1.82546 15.1599L3.0707 15.0959C3.31397 15.0836 3.5571 15.1225 3.7844 15.2101C4.01171 15.2976 4.21814 15.4318 4.39037 15.6041C4.56261 15.7763 4.69682 15.9827 4.78435 16.2101C4.87188 16.4374 4.91078 16.6805 4.89855 16.9238L4.83455 18.1691C4.81605 18.5283 4.90921 18.8844 5.10126 19.1885C5.2933 19.4926 5.5748 19.7298 5.90707 19.8674C6.23934 20.0051 6.60608 20.0365 6.9569 19.9572C7.30772 19.878 7.6254 19.6921 7.86631 19.4251L8.7129 18.4998C8.87547 18.318 9.07458 18.1725 9.29719 18.073C9.51981 17.9734 9.76093 17.9219 10.0048 17.9219C10.2487 17.9219 10.4898 17.9734 10.7124 18.073C10.935 18.1725 11.1341 18.318 11.2967 18.4998L12.1326 19.4251C12.3735 19.6921 12.6912 19.878 13.042 19.9572C13.3929 20.0365 13.7596 20.0051 14.0919 19.8674C14.4241 19.7298 14.7056 19.4926 14.8977 19.1885C15.0897 18.8844 15.1829 18.5283 15.1644 18.1691L15.1004 16.9238C15.0882 16.6805 15.1271 16.4374 15.2146 16.2101C15.3021 15.9827 15.4363 15.7763 15.6086 15.6041C15.7808 15.4318 15.9872 15.2976 16.2145 15.2101C16.4418 15.1225 16.685 15.0836 16.9282 15.0959L18.1735 15.1599C18.5326 15.1784 18.8887 15.0852 19.1928 14.8931C19.4969 14.7011 19.7341 14.4196 19.8717 14.0873C20.0093 13.755 20.0407 13.3882 19.9615 13.0374C19.8823 12.6866 19.6964 12.3689 19.4294 12.1279L18.5041 11.292C18.3223 11.1294 18.1769 10.9303 18.0774 10.7076C17.9778 10.485 17.9263 10.2439 17.9263 10C17.9263 9.75612 17.9778 9.51499 18.0774 9.29236C18.1769 9.06973 18.3223 8.87062 18.5041 8.70804L19.4294 7.87206C19.6964 7.63114 19.8823 7.31344 19.9615 6.9626C20.0407 6.61176 20.0093 6.245 19.8717 5.91271C19.7341 5.58043 19.4969 5.29892 19.1928 5.10686C18.8887 4.91481 18.5326 4.82163 18.1735 4.84014L16.9282 4.90414C16.685 4.91638 16.4418 4.87747 16.2145 4.78994C15.9872 4.7024 15.7808 4.56818 15.6086 4.39594C15.4363 4.2237 15.3021 4.01726 15.2146 3.78994C15.1271 3.56262 15.0882 3.31948 15.1004 3.07619L15.1644 1.83089C15.1829 1.4717 15.0897 1.11559 14.8977 0.811487C14.7056 0.507385 14.4241 0.270217 14.0919 0.132568C13.7596 -0.00508182 13.3929 -0.0364573 13.042 0.0427519C12.6912 0.121961 12.3735 0.307869 12.1326 0.574931L11.2914 1.50024C11.1288 1.68202 10.9297 1.82745 10.7071 1.92702C10.4845 2.02659 10.2433 2.07805 9.99947 2.07805C9.7556 2.07805 9.51448 2.02659 9.29186 1.92702ZM14.3745 10C14.3745 12.4162 12.4159 14.375 9.99977 14.375C7.58365 14.375 5.625 12.4162 5.625 10C5.625 7.58375 7.58365 5.625 9.99977 5.625C12.4159 5.625 14.3745 7.58375 14.3745 10Z", fill: "currentColor" })), "SvgSettings"), n$e = /* @__PURE__ */ fe(({
  title: e,
  titleId: t,
  ...n
}) => /* @__PURE__ */ k.createElement("svg", { height: "1em", viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-labelledby": t, ...n }, e ? /* @__PURE__ */ k.createElement("title", { id: t }, e) : null, /* @__PURE__ */ k.createElement("path", { d: "M6.5782 1.07092C6.71096 0.643026 7.28904 0.643027 7.4218 1.07092L8.59318 4.84622C8.65255 5.03758 8.82284 5.16714 9.01498 5.16714L12.8056 5.16714C13.2353 5.16714 13.4139 5.74287 13.0663 6.00732L9.99962 8.34058C9.84418 8.45885 9.77913 8.66848 9.83851 8.85984L11.0099 12.6351C11.1426 13.063 10.675 13.4189 10.3274 13.1544L7.26069 10.8211C7.10524 10.7029 6.89476 10.7029 6.73931 10.8211L3.6726 13.1544C3.32502 13.4189 2.85735 13.063 2.99012 12.6351L4.16149 8.85984C4.22087 8.66848 4.15582 8.45885 4.00038 8.34058L0.933671 6.00732C0.586087 5.74287 0.764722 5.16714 1.19436 5.16714L4.98502 5.16714C5.17716 5.16714 5.34745 5.03758 5.40682 4.84622L6.5782 1.07092Z", fill: "currentColor", stroke: "currentColor" })), "SvgStarFilled"), r$e = /* @__PURE__ */ fe(({
  title: e,
  titleId: t,
  ...n
}) => /* @__PURE__ */ k.createElement("svg", { height: "1em", viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-labelledby": t, ...n }, e ? /* @__PURE__ */ k.createElement("title", { id: t }, e) : null, /* @__PURE__ */ k.createElement("path", { d: "M6.5782 1.07092C6.71096 0.643026 7.28904 0.643027 7.4218 1.07092L8.59318 4.84622C8.65255 5.03758 8.82284 5.16714 9.01498 5.16714L12.8056 5.16714C13.2353 5.16714 13.4139 5.74287 13.0663 6.00732L9.99962 8.34058C9.84418 8.45885 9.77913 8.66848 9.83851 8.85984L11.0099 12.6351C11.1426 13.063 10.675 13.4189 10.3274 13.1544L7.26069 10.8211C7.10524 10.7029 6.89476 10.7029 6.73931 10.8211L3.6726 13.1544C3.32502 13.4189 2.85735 13.063 2.99012 12.6351L4.16149 8.85984C4.22087 8.66848 4.15582 8.45885 4.00038 8.34058L0.933671 6.00732C0.586087 5.74287 0.764722 5.16714 1.19436 5.16714L4.98502 5.16714C5.17716 5.16714 5.34745 5.03758 5.40682 4.84622L6.5782 1.07092Z", stroke: "currentColor", strokeWidth: 1.5 })), "SvgStar"), o$e = /* @__PURE__ */ fe(({
  title: e,
  titleId: t,
  ...n
}) => /* @__PURE__ */ k.createElement("svg", { height: "1em", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-labelledby": t, ...n }, e ? /* @__PURE__ */ k.createElement("title", { id: t }, e) : null, /* @__PURE__ */ k.createElement("rect", { width: 16, height: 16, rx: 2, fill: "currentColor" })), "SvgStop"), i$e = /* @__PURE__ */ fe(({
  title: e,
  titleId: t,
  ...n
}) => /* @__PURE__ */ k.createElement("svg", { width: "1em", height: "5em", xmlns: "http://www.w3.org/2000/svg", fillRule: "evenodd", "aria-hidden": "true", viewBox: "0 0 23 23", style: {
  height: "1.5em"
}, clipRule: "evenodd", "aria-labelledby": t, ...n }, e === void 0 ? /* @__PURE__ */ k.createElement("title", { id: t }, "trash icon") : e ? /* @__PURE__ */ k.createElement("title", { id: t }, e) : null, /* @__PURE__ */ k.createElement("path", { d: "M19 24h-14c-1.104 0-2-.896-2-2v-17h-1v-2h6v-1.5c0-.827.673-1.5 1.5-1.5h5c.825 0 1.5.671 1.5 1.5v1.5h6v2h-1v17c0 1.104-.896 2-2 2zm0-19h-14v16.5c0 .276.224.5.5.5h13c.276 0 .5-.224.5-.5v-16.5zm-7 7.586l3.293-3.293 1.414 1.414-3.293 3.293 3.293 3.293-1.414 1.414-3.293-3.293-3.293 3.293-1.414-1.414 3.293-3.293-3.293-3.293 1.414-1.414 3.293 3.293zm2-10.586h-4v1h4v-1z", fill: "currentColor", strokeWidth: 0.25, stroke: "currentColor" })), "SvgTrash"), s$e = /* @__PURE__ */ fe(({
  title: e,
  titleId: t,
  ...n
}) => /* @__PURE__ */ k.createElement("svg", { height: "1em", viewBox: "0 0 13 13", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-labelledby": t, ...n }, e ? /* @__PURE__ */ k.createElement("title", { id: t }, e) : null, /* @__PURE__ */ k.createElement("rect", { x: 0.6, y: 0.6, width: 11.8, height: 11.8, rx: 5.9, stroke: "currentColor", strokeWidth: 1.2 }), /* @__PURE__ */ k.createElement("rect", { x: 5.5, y: 5.5, width: 2, height: 2, rx: 1, fill: "currentColor" })), "SvgType"), a$e = St(A5e), l$e = St(D5e), c$e = St(I5e), u$e = St(L5e), Vk = St(R5e), f$e = St(F5e), d$e = St(M5e), p$e = St(P5e), h$e = St($5e), m$e = St(V5e), g$e = St(j5e, "filled docs icon"), v$e = St(U5e), y$e = St(B5e), b$e = St(q5e), E$e = St(z5e), w$e = St(H5e), x$e = St(W5e), S$e = St(G5e), T$e = St(Q5e), C$e = St(Y5e), k$e = St(K5e), _$e = St(J5e), N$e = St(X5e), O$e = St(Z5e), A$e = St(e$e), D$e = St(t$e), I$e = St(n$e, "filled star icon"), L$e = St(r$e), R$e = St(o$e), F$e = St(i$e, "trash icon"), Ig = St(s$e);
function St(e, t = e.name.replace("Svg", "").replaceAll(/([A-Z])/g, " $1").trimStart().toLowerCase() + " icon") {
  return e.defaultProps = { title: t }, e;
}
fe(St, "generateIcon");
const $n = k.forwardRef((e, t) => /* @__PURE__ */ W.jsx(
  "button",
  {
    ...e,
    ref: t,
    className: Xn("graphiql-un-styled", e.className)
  }
));
$n.displayName = "UnStyledButton";
const wi = k.forwardRef((e, t) => /* @__PURE__ */ W.jsx(
  "button",
  {
    ...e,
    ref: t,
    className: Xn(
      "graphiql-button",
      {
        success: "graphiql-button-success",
        error: "graphiql-button-error"
      }[e.state],
      e.className
    )
  }
));
wi.displayName = "Button";
const US = k.forwardRef((e, t) => /* @__PURE__ */ W.jsx(
  "div",
  {
    ...e,
    ref: t,
    className: Xn("graphiql-button-group", e.className)
  }
));
US.displayName = "ButtonGroup";
const Bh = /* @__PURE__ */ fe((e, t) => Object.entries(t).reduce((n, [r, o]) => (n[r] = o, n), e), "createComponentGroup"), I4 = k.forwardRef((e, t) => /* @__PURE__ */ W.jsx(YH, { asChild: !0, children: /* @__PURE__ */ W.jsxs(
  $n,
  {
    ...e,
    ref: t,
    type: "button",
    className: Xn("graphiql-dialog-close", e.className),
    children: [
      /* @__PURE__ */ W.jsx(X3, { children: "Close dialog" }),
      /* @__PURE__ */ W.jsx(Vk, {})
    ]
  }
) }));
I4.displayName = "Dialog.Close";
function L4({
  children: e,
  ...t
}) {
  return /* @__PURE__ */ W.jsx(BH, { ...t, children: /* @__PURE__ */ W.jsxs(zH, { children: [
    /* @__PURE__ */ W.jsx(HH, { className: "graphiql-dialog-overlay" }),
    /* @__PURE__ */ W.jsx(WH, { className: "graphiql-dialog", children: e })
  ] }) });
}
fe(L4, "DialogRoot");
const Cu = Bh(L4, {
  Close: I4,
  Title: GH,
  Trigger: qH,
  Description: QH
}), R4 = k.forwardRef(
  (e, t) => /* @__PURE__ */ W.jsx(eQ, { asChild: !0, children: /* @__PURE__ */ W.jsx(
    "button",
    {
      ...e,
      ref: t,
      className: Xn("graphiql-un-styled", e.className)
    }
  ) })
);
R4.displayName = "DropdownMenuButton";
function F4({
  children: e,
  align: t = "start",
  sideOffset: n = 5,
  className: r,
  ...o
}) {
  return /* @__PURE__ */ W.jsx(tQ, { children: /* @__PURE__ */ W.jsx(
    nQ,
    {
      align: t,
      sideOffset: n,
      className: Xn("graphiql-dropdown-content", r),
      ...o,
      children: e
    }
  ) });
}
fe(F4, "Content");
const M$e = /* @__PURE__ */ fe(({ className: e, children: t, ...n }) => /* @__PURE__ */ W.jsx(rQ, { className: Xn("graphiql-dropdown-item", e), ...n, children: t }), "Item"), Ra = Bh(ZG, {
  Button: R4,
  Item: M$e,
  Content: F4
}), C0 = new KIe({
  breaks: !0,
  linkify: !0
}), os = k.forwardRef(({ children: e, onlyShowFirstChild: t, type: n, ...r }, o) => /* @__PURE__ */ W.jsx(
  "div",
  {
    ...r,
    ref: o,
    className: Xn(
      `graphiql-markdown-${n}`,
      t && "graphiql-markdown-preview",
      r.className
    ),
    dangerouslySetInnerHTML: { __html: C0.render(e) }
  }
));
os.displayName = "MarkdownContent";
const jk = k.forwardRef(
  (e, t) => /* @__PURE__ */ W.jsx(
    "div",
    {
      ...e,
      ref: t,
      className: Xn("graphiql-spinner", e.className)
    }
  )
);
jk.displayName = "Spinner";
function M4({
  children: e,
  align: t = "start",
  side: n = "bottom",
  sideOffset: r = 5,
  label: o
}) {
  return /* @__PURE__ */ W.jsxs(l3e, { children: [
    /* @__PURE__ */ W.jsx(c3e, { asChild: !0, children: e }),
    /* @__PURE__ */ W.jsx(u3e, { children: /* @__PURE__ */ W.jsx(
      f3e,
      {
        className: "graphiql-tooltip",
        align: t,
        side: n,
        sideOffset: r,
        children: o
      }
    ) })
  ] });
}
fe(M4, "TooltipRoot");
const Sr = Bh(M4, {
  Provider: a3e
}), P4 = k.forwardRef(
  ({ isActive: e, value: t, children: n, className: r, ...o }, i) => /* @__PURE__ */ W.jsx(
    y4.Item,
    {
      ...o,
      ref: i,
      value: t,
      "aria-selected": e ? "true" : void 0,
      role: "tab",
      className: Xn(
        "graphiql-tab",
        e && "graphiql-tab-active",
        r
      ),
      children: n
    }
  )
);
P4.displayName = "Tab";
const $4 = k.forwardRef((e, t) => /* @__PURE__ */ W.jsx(
  $n,
  {
    ...e,
    ref: t,
    type: "button",
    className: Xn("graphiql-tab-button", e.className),
    children: e.children
  }
));
$4.displayName = "Tab.Button";
const V4 = k.forwardRef(
  (e, t) => /* @__PURE__ */ W.jsx(Sr, { label: "Close Tab", children: /* @__PURE__ */ W.jsx(
    $n,
    {
      "aria-label": "Close Tab",
      ...e,
      ref: t,
      type: "button",
      className: Xn("graphiql-tab-close", e.className),
      children: /* @__PURE__ */ W.jsx(Vk, {})
    }
  ) })
);
V4.displayName = "Tab.Close";
const Iw = Bh(P4, {
  Button: $4,
  Close: V4
}), j4 = k.forwardRef(
  ({ values: e, onReorder: t, children: n, className: r, ...o }, i) => /* @__PURE__ */ W.jsx(
    y4.Group,
    {
      ...o,
      ref: i,
      values: e,
      onReorder: t,
      axis: "x",
      role: "tablist",
      className: Xn("graphiql-tabs", r),
      children: n
    }
  )
);
j4.displayName = "Tabs";
const U4 = cl("HistoryContext");
function B4(e) {
  var t;
  const n = fl(), r = k.useRef(
    new uq(
      // Fall back to a noop storage when the StorageContext is empty
      n || new Kx(null),
      e.maxHistoryLength || P$e
    )
  ), [o, i] = k.useState(((t = r.current) == null ? void 0 : t.queries) || []), s = k.useCallback(
    (m) => {
      var v;
      (v = r.current) == null || v.updateHistory(m), i(r.current.queries);
    },
    []
  ), l = k.useCallback(
    (m, v) => {
      r.current.editLabel(m, v), i(r.current.queries);
    },
    []
  ), c = k.useCallback(
    (m) => {
      r.current.toggleFavorite(m), i(r.current.queries);
    },
    []
  ), f = k.useCallback(
    (m) => m,
    []
  ), d = k.useCallback((m, v = !1) => {
    r.current.deleteHistory(m, v), i(r.current.queries);
  }, []), g = k.useMemo(
    () => ({
      addToHistory: s,
      editLabel: l,
      items: o,
      toggleFavorite: c,
      setActive: f,
      deleteFromHistory: d
    }),
    [
      s,
      l,
      o,
      c,
      f,
      d
    ]
  );
  return /* @__PURE__ */ W.jsx(U4.Provider, { value: g, children: e.children });
}
fe(B4, "HistoryContextProvider");
const s1 = ul(U4), P$e = 20;
function q4() {
  const { items: e, deleteFromHistory: t } = s1({
    nonNull: !0
  });
  let n = e.slice().map((l, c) => ({ ...l, index: c })).reverse();
  const r = n.filter((l) => l.favorite);
  r.length && (n = n.filter((l) => !l.favorite));
  const [o, i] = k.useState(
    null
  );
  k.useEffect(() => {
    o && setTimeout(() => {
      i(null);
    }, 2e3);
  }, [o]);
  const s = k.useCallback(() => {
    try {
      for (const l of n)
        t(l, !0);
      i("success");
    } catch {
      i("error");
    }
  }, [t, n]);
  return /* @__PURE__ */ W.jsxs("section", { "aria-label": "History", className: "graphiql-history", children: [
    /* @__PURE__ */ W.jsxs("div", { className: "graphiql-history-header", children: [
      "History",
      (o || n.length > 0) && /* @__PURE__ */ W.jsx(
        wi,
        {
          type: "button",
          state: o || void 0,
          disabled: !n.length,
          onClick: s,
          children: {
            success: "Cleared",
            error: "Failed to Clear"
          }[o] || "Clear"
        }
      )
    ] }),
    !!r.length && /* @__PURE__ */ W.jsx("ul", { className: "graphiql-history-items", children: r.map((l) => /* @__PURE__ */ W.jsx(nh, { item: l }, l.index)) }),
    !!r.length && !!n.length && /* @__PURE__ */ W.jsx("div", { className: "graphiql-history-item-spacer" }),
    !!n.length && /* @__PURE__ */ W.jsx("ul", { className: "graphiql-history-items", children: n.map((l) => /* @__PURE__ */ W.jsx(nh, { item: l }, l.index)) })
  ] });
}
fe(q4, "History");
function nh(e) {
  const { editLabel: t, toggleFavorite: n, deleteFromHistory: r, setActive: o } = s1({
    nonNull: !0,
    caller: nh
  }), { headerEditor: i, queryEditor: s, variableEditor: l } = Zn({
    nonNull: !0,
    caller: nh
  }), c = k.useRef(null), f = k.useRef(null), [d, g] = k.useState(!1);
  k.useEffect(() => {
    var C;
    d && ((C = c.current) == null || C.focus());
  }, [d]);
  const m = e.item.label || e.item.operationName || z4(e.item.query), v = k.useCallback(() => {
    var C;
    g(!1);
    const { index: E, ...N } = e.item;
    t({ ...N, label: (C = c.current) == null ? void 0 : C.value }, E);
  }, [t, e.item]), b = k.useCallback(() => {
    g(!1);
  }, []), w = k.useCallback(
    (C) => {
      C.stopPropagation(), g(!0);
    },
    []
  ), _ = k.useCallback(() => {
    const { query: C, variables: E, headers: N } = e.item;
    s == null || s.setValue(C ?? ""), l == null || l.setValue(E ?? ""), i == null || i.setValue(N ?? ""), o(e.item);
  }, [i, e.item, s, o, l]), S = k.useCallback(
    (C) => {
      C.stopPropagation(), r(e.item);
    },
    [e.item, r]
  ), x = k.useCallback(
    (C) => {
      C.stopPropagation(), n(e.item);
    },
    [e.item, n]
  );
  return /* @__PURE__ */ W.jsx("li", { className: Xn("graphiql-history-item", d && "editable"), children: d ? /* @__PURE__ */ W.jsxs(W.Fragment, { children: [
    /* @__PURE__ */ W.jsx(
      "input",
      {
        type: "text",
        defaultValue: e.item.label,
        ref: c,
        onKeyDown: (C) => {
          C.key === "Esc" ? g(!1) : C.key === "Enter" && (g(!1), t({ ...e.item, label: C.currentTarget.value }));
        },
        placeholder: "Type a label"
      }
    ),
    /* @__PURE__ */ W.jsx($n, { type: "button", ref: f, onClick: v, children: "Save" }),
    /* @__PURE__ */ W.jsx($n, { type: "button", ref: f, onClick: b, children: /* @__PURE__ */ W.jsx(Vk, {}) })
  ] }) : /* @__PURE__ */ W.jsxs(W.Fragment, { children: [
    /* @__PURE__ */ W.jsx(Sr, { label: "Set active", children: /* @__PURE__ */ W.jsx(
      $n,
      {
        type: "button",
        className: "graphiql-history-item-label",
        onClick: _,
        "aria-label": "Set active",
        children: m
      }
    ) }),
    /* @__PURE__ */ W.jsx(Sr, { label: "Edit label", children: /* @__PURE__ */ W.jsx(
      $n,
      {
        type: "button",
        className: "graphiql-history-item-action",
        onClick: w,
        "aria-label": "Edit label",
        children: /* @__PURE__ */ W.jsx(C$e, { "aria-hidden": "true" })
      }
    ) }),
    /* @__PURE__ */ W.jsx(
      Sr,
      {
        label: e.item.favorite ? "Remove favorite" : "Add favorite",
        children: /* @__PURE__ */ W.jsx(
          $n,
          {
            type: "button",
            className: "graphiql-history-item-action",
            onClick: x,
            "aria-label": e.item.favorite ? "Remove favorite" : "Add favorite",
            children: e.item.favorite ? /* @__PURE__ */ W.jsx(I$e, { "aria-hidden": "true" }) : /* @__PURE__ */ W.jsx(L$e, { "aria-hidden": "true" })
          }
        )
      }
    ),
    /* @__PURE__ */ W.jsx(Sr, { label: "Delete from history", children: /* @__PURE__ */ W.jsx(
      $n,
      {
        type: "button",
        className: "graphiql-history-item-action",
        onClick: S,
        "aria-label": "Delete from history",
        children: /* @__PURE__ */ W.jsx(F$e, { "aria-hidden": "true" })
      }
    ) })
  ] }) });
}
fe(nh, "HistoryItem");
function z4(e) {
  return e == null ? void 0 : e.split(`
`).map((t) => t.replace(/#(.*)/, "")).join(" ").replaceAll("{", " { ").replaceAll("}", " } ").replaceAll(/[\s]{2,}/g, " ");
}
fe(z4, "formatQuery");
const H4 = cl("ExecutionContext");
function k0({
  fetcher: e,
  getDefaultFieldNames: t,
  children: n,
  operationName: r
}) {
  if (!e)
    throw new TypeError(
      "The `ExecutionContextProvider` component requires a `fetcher` function to be passed as prop."
    );
  const {
    externalFragments: o,
    headerEditor: i,
    queryEditor: s,
    responseEditor: l,
    variableEditor: c,
    updateActiveTabValues: f
  } = Zn({ nonNull: !0, caller: k0 }), d = s1(), g = A0({
    getDefaultFieldNames: t,
    caller: k0
  }), [m, v] = k.useState(!1), [b, w] = k.useState(null), _ = k.useRef(0), S = k.useCallback(() => {
    b == null || b.unsubscribe(), v(!1), w(null);
  }, [b]), x = k.useCallback(async () => {
    if (!s || !l)
      return;
    if (b) {
      S();
      return;
    }
    const N = /* @__PURE__ */ fe((z) => {
      l.setValue(z), f({ response: z });
    }, "setResponse");
    _.current += 1;
    const I = _.current;
    let D = g() || s.getValue();
    const A = c == null ? void 0 : c.getValue();
    let F;
    try {
      F = BS({
        json: A,
        errorMessageParse: "Variables are invalid JSON",
        errorMessageType: "Variables are not a JSON object."
      });
    } catch (z) {
      N(z instanceof Error ? z.message : `${z}`);
      return;
    }
    const $ = i == null ? void 0 : i.getValue();
    let q;
    try {
      q = BS({
        json: $,
        errorMessageParse: "Headers are invalid JSON",
        errorMessageType: "Headers are not a JSON object."
      });
    } catch (z) {
      N(z instanceof Error ? z.message : `${z}`);
      return;
    }
    if (o) {
      const z = s.documentAST ? zq(
        s.documentAST,
        o
      ) : [];
      z.length > 0 && (D += `
` + z.map((B) => pt(B)).join(`
`));
    }
    N(""), v(!0);
    const H = r ?? s.operationName ?? void 0;
    d == null || d.addToHistory({
      query: D,
      variables: A,
      headers: $,
      operationName: H
    });
    try {
      let z = { data: {} };
      const B = /* @__PURE__ */ fe((Q) => {
        if (I !== _.current)
          return;
        let Y = Array.isArray(Q) ? Q : !1;
        if (!Y && typeof Q == "object" && Q !== null && "hasNext" in Q && (Y = [Q]), Y) {
          const K = {
            data: z.data
          }, Z = [
            ...(z == null ? void 0 : z.errors) || [],
            ...Y.flatMap((re) => re.errors).filter(Boolean)
          ];
          Z.length && (K.errors = Z);
          for (const re of Y) {
            const { path: J, data: ie, errors: ne, ...ae } = re;
            if (J) {
              if (!ie)
                throw new Error(
                  `Expected part to contain a data property, but got ${re}`
                );
              pz(K.data, J, ie, { merge: !0 });
            } else
              ie && (K.data = ie);
            z = {
              ...K,
              ...ae
            };
          }
          v(!1), N(Yx(z));
        } else {
          const K = Yx(Q);
          v(!1), N(K);
        }
      }, "handleResponse"), R = e(
        {
          query: D,
          variables: F,
          operationName: H
        },
        {
          headers: q ?? void 0,
          documentAST: s.documentAST ?? void 0
        }
      ), te = await Promise.resolve(R);
      if (m3(te))
        w(
          te.subscribe({
            next(Q) {
              B(Q);
            },
            error(Q) {
              v(!1), Q && N(jp(Q)), w(null);
            },
            complete() {
              v(!1), w(null);
            }
          })
        );
      else if (g3(te)) {
        w({
          unsubscribe: () => {
            var Q, Y;
            return (Y = (Q = te[Symbol.asyncIterator]()).return) == null ? void 0 : Y.call(Q);
          }
        });
        for await (const Q of te)
          B(Q);
        v(!1), w(null);
      } else
        B(te);
    } catch (z) {
      v(!1), N(jp(z)), w(null);
    }
  }, [
    g,
    o,
    e,
    i,
    d,
    r,
    s,
    l,
    S,
    b,
    f,
    c
  ]), C = !!b, E = k.useMemo(
    () => ({
      isFetching: m,
      isSubscribed: C,
      operationName: r ?? null,
      run: x,
      stop: S
    }),
    [m, C, r, x, S]
  );
  return /* @__PURE__ */ W.jsx(H4.Provider, { value: E, children: n });
}
fe(k0, "ExecutionContextProvider");
const Vf = ul(H4);
function BS({
  json: e,
  errorMessageParse: t,
  errorMessageType: n
}) {
  let r;
  try {
    r = e && e.trim() !== "" ? JSON.parse(e) : void 0;
  } catch (i) {
    throw new Error(
      `${t}: ${i instanceof Error ? i.message : i}.`
    );
  }
  const o = typeof r == "object" && r !== null && !Array.isArray(r);
  if (r !== void 0 && !o)
    throw new Error(n);
  return r;
}
fe(BS, "tryParseJsonObject");
const a1 = "graphiql", l1 = "sublime";
let W4 = !1;
typeof window == "object" && (W4 = window.navigator.platform.toLowerCase().indexOf("mac") === 0);
const c1 = {
  // Persistent search box in Query Editor
  [W4 ? "Cmd-F" : "Ctrl-F"]: "findPersistent",
  "Cmd-G": "findPersistent",
  "Ctrl-G": "findPersistent",
  // Editor improvements
  "Ctrl-Left": "goSubwordLeft",
  "Ctrl-Right": "goSubwordRight",
  "Alt-Left": "goGroupLeft",
  "Alt-Right": "goGroupRight"
};
async function jf(e, t) {
  const n = await Promise.resolve().then(() => k7e).then((r) => r.c).then(
    (r) => (
      // Depending on bundler and settings the dynamic import either returns a
      // function (e.g. parcel) or an object containing a `default` property
      typeof r == "function" ? r : r.default
    )
  );
  return await Promise.all(
    (t == null ? void 0 : t.useCommonAddons) === !1 ? e : [
      Promise.resolve().then(() => D7e).then((r) => r.s),
      Promise.resolve().then(() => $7e).then((r) => r.m),
      Promise.resolve().then(() => q7e).then((r) => r.c),
      Promise.resolve().then(() => M8).then((r) => r.b),
      Promise.resolve().then(() => j8).then((r) => r.f),
      Promise.resolve().then(() => r9e).then((r) => r.l),
      Promise.resolve().then(() => H8).then((r) => r.s),
      Promise.resolve().then(() => K8).then((r) => r.j),
      Promise.resolve().then(() => G8).then((r) => r.d),
      // @ts-expect-error
      Promise.resolve().then(() => Z8).then((r) => r.s),
      ...e
    ]
  ), n;
}
fe(jf, "importCodeMirror");
const $$e = /* @__PURE__ */ fe((e) => e ? pt(e) : "", "printDefault");
function Uk({ field: e }) {
  if (!("defaultValue" in e) || e.defaultValue === void 0)
    return null;
  const t = _s(e.defaultValue, e.type);
  return t ? /* @__PURE__ */ W.jsxs(W.Fragment, { children: [
    " = ",
    /* @__PURE__ */ W.jsx("span", { className: "graphiql-doc-explorer-default-value", children: $$e(t) })
  ] }) : null;
}
fe(Uk, "DefaultValue");
const G4 = cl("SchemaContext");
function Bk(e) {
  if (!e.fetcher)
    throw new TypeError(
      "The `SchemaContextProvider` component requires a `fetcher` function to be passed as prop."
    );
  const { initialHeaders: t, headerEditor: n } = Zn({
    nonNull: !0,
    caller: Bk
  }), [r, o] = k.useState(), [i, s] = k.useState(!1), [l, c] = k.useState(null), f = k.useRef(0);
  k.useEffect(() => {
    o(
      zv(e.schema) || e.schema === null || e.schema === void 0 ? e.schema : void 0
    ), f.current++;
  }, [e.schema]);
  const d = k.useRef(t);
  k.useEffect(() => {
    n && (d.current = n.getValue());
  });
  const {
    introspectionQuery: g,
    introspectionQueryName: m,
    introspectionQuerySansSubscriptions: v
  } = Q4({
    inputValueDeprecation: e.inputValueDeprecation,
    introspectionQueryName: e.introspectionQueryName,
    schemaDescription: e.schemaDescription
  }), { fetcher: b, onSchemaChange: w, dangerouslyAssumeSchemaIsValid: _, children: S } = e, x = k.useCallback(() => {
    if (zv(e.schema) || e.schema === null)
      return;
    const N = ++f.current, I = e.schema;
    async function D() {
      if (I)
        return I;
      const A = Y4(d.current);
      if (!A.isValidJSON) {
        c("Introspection failed as headers are invalid.");
        return;
      }
      const F = A.headers ? { headers: A.headers } : {}, $ = hA(
        b(
          {
            query: g,
            operationName: m
          },
          F
        )
      );
      if (!pA($)) {
        c("Fetcher did not return a Promise for introspection.");
        return;
      }
      s(!0), c(null);
      let q = await $;
      if (typeof q != "object" || q === null || !("data" in q)) {
        const z = hA(
          b(
            {
              query: v,
              operationName: m
            },
            F
          )
        );
        if (!pA(z))
          throw new Error(
            "Fetcher did not return a Promise for introspection."
          );
        q = await z;
      }
      if (s(!1), q != null && q.data && "__schema" in q.data)
        return q.data;
      const H = typeof q == "string" ? q : Yx(q);
      c(H);
    }
    fe(D, "fetchIntrospectionData"), D().then((A) => {
      if (!(N !== f.current || !A))
        try {
          const F = $C(A);
          o(F), w == null || w(F);
        } catch (F) {
          c(jp(F));
        }
    }).catch((A) => {
      N === f.current && (c(jp(A)), s(!1));
    });
  }, [
    b,
    m,
    g,
    v,
    w,
    e.schema
  ]);
  k.useEffect(() => {
    x();
  }, [x]), k.useEffect(() => {
    function N(I) {
      I.ctrlKey && I.key === "R" && x();
    }
    return fe(N, "triggerIntrospection"), window.addEventListener("keydown", N), () => window.removeEventListener("keydown", N);
  });
  const C = k.useMemo(() => !r || _ ? [] : Ey(r), [r, _]), E = k.useMemo(
    () => ({
      fetchError: l,
      introspect: x,
      isFetching: i,
      schema: r,
      validationErrors: C
    }),
    [l, x, i, r, C]
  );
  return /* @__PURE__ */ W.jsx(G4.Provider, { value: E, children: S });
}
fe(Bk, "SchemaContextProvider");
const Ri = ul(G4);
function Q4({
  inputValueDeprecation: e,
  introspectionQueryName: t,
  schemaDescription: n
}) {
  return k.useMemo(() => {
    const r = t || "IntrospectionQuery";
    let o = Iy({
      inputValueDeprecation: e,
      schemaDescription: n
    });
    t && (o = o.replace("query IntrospectionQuery", `query ${r}`));
    const i = o.replace(
      "subscriptionType { name }",
      ""
    );
    return {
      introspectionQueryName: r,
      introspectionQuery: o,
      introspectionQuerySansSubscriptions: i
    };
  }, [e, t, n]);
}
fe(Q4, "useIntrospectionQuery");
function Y4(e) {
  let t = null, n = !0;
  try {
    e && (t = JSON.parse(e));
  } catch {
    n = !1;
  }
  return { headers: t, isValidJSON: n };
}
fe(Y4, "parseHeaderString");
const Lg = { name: "Docs" }, K4 = cl("ExplorerContext");
function qk(e) {
  const { schema: t, validationErrors: n } = Ri({
    nonNull: !0,
    caller: qk
  }), [r, o] = k.useState([
    Lg
  ]), i = k.useCallback((f) => {
    o((d) => d.at(-1).def === f.def ? (
      // Avoid pushing duplicate items
      d
    ) : [...d, f]);
  }, []), s = k.useCallback(() => {
    o(
      (f) => f.length > 1 ? f.slice(0, -1) : f
    );
  }, []), l = k.useCallback(() => {
    o(
      (f) => f.length === 1 ? f : [Lg]
    );
  }, []);
  k.useEffect(() => {
    t == null || n.length > 0 ? l() : o((f) => {
      if (f.length === 1)
        return f;
      const d = [Lg];
      let g = null;
      for (const m of f)
        if (m !== Lg)
          if (m.def)
            if (Ks(m.def)) {
              const v = t.getType(m.def.name);
              if (v)
                d.push({
                  name: m.name,
                  def: v
                }), g = v;
              else
                break;
            } else {
              if (g === null)
                break;
              if (Ye(g) || mt(g)) {
                const v = g.getFields()[m.name];
                if (v)
                  d.push({
                    name: m.name,
                    def: v
                  });
                else
                  break;
              } else {
                if (pr(g) || Lt(g) || Ze(g) || Zt(g))
                  break;
                {
                  const v = g;
                  if (v.args.find((b) => b.name === m.name))
                    d.push({
                      name: m.name,
                      def: v
                    });
                  else
                    break;
                }
              }
            }
          else
            g = null, d.push(m);
      return d;
    });
  }, [l, t, n]);
  const c = k.useMemo(
    () => ({ explorerNavStack: r, push: i, pop: s, reset: l }),
    [r, i, s, l]
  );
  return /* @__PURE__ */ W.jsx(K4.Provider, { value: c, children: e.children });
}
fe(qk, "ExplorerContextProvider");
const dl = ul(K4);
function rh(e, t) {
  return He(e) ? /* @__PURE__ */ W.jsxs(W.Fragment, { children: [
    rh(e.ofType, t),
    "!"
  ] }) : vt(e) ? /* @__PURE__ */ W.jsxs(W.Fragment, { children: [
    "[",
    rh(e.ofType, t),
    "]"
  ] }) : t(e);
}
fe(rh, "renderType");
function xi(e) {
  const { push: t } = dl({ nonNull: !0, caller: xi });
  return e.type ? rh(e.type, (n) => /* @__PURE__ */ W.jsx(
    "a",
    {
      className: "graphiql-doc-explorer-type-name",
      onClick: (r) => {
        r.preventDefault(), t({ name: n.name, def: n });
      },
      href: "#",
      children: n.name
    }
  )) : null;
}
fe(xi, "TypeLink");
function oh({ arg: e, showDefaultValue: t, inline: n }) {
  const r = /* @__PURE__ */ W.jsxs("span", { children: [
    /* @__PURE__ */ W.jsx("span", { className: "graphiql-doc-explorer-argument-name", children: e.name }),
    ": ",
    /* @__PURE__ */ W.jsx(xi, { type: e.type }),
    t !== !1 && /* @__PURE__ */ W.jsx(Uk, { field: e })
  ] });
  return n ? r : /* @__PURE__ */ W.jsxs("div", { className: "graphiql-doc-explorer-argument", children: [
    r,
    e.description ? /* @__PURE__ */ W.jsx(os, { type: "description", children: e.description }) : null,
    e.deprecationReason ? /* @__PURE__ */ W.jsxs("div", { className: "graphiql-doc-explorer-argument-deprecation", children: [
      /* @__PURE__ */ W.jsx("div", { className: "graphiql-doc-explorer-argument-deprecation-label", children: "Deprecated" }),
      /* @__PURE__ */ W.jsx(os, { type: "deprecation", children: e.deprecationReason })
    ] }) : null
  ] });
}
fe(oh, "Argument");
function zk(e) {
  return e.children ? /* @__PURE__ */ W.jsxs("div", { className: "graphiql-doc-explorer-deprecation", children: [
    /* @__PURE__ */ W.jsx("div", { className: "graphiql-doc-explorer-deprecation-label", children: "Deprecated" }),
    /* @__PURE__ */ W.jsx(
      os,
      {
        type: "deprecation",
        onlyShowFirstChild: e.preview ?? !0,
        children: e.children
      }
    )
  ] }) : null;
}
fe(zk, "DeprecationReason");
function J4({ directive: e }) {
  return /* @__PURE__ */ W.jsxs("span", { className: "graphiql-doc-explorer-directive", children: [
    "@",
    e.name.value
  ] });
}
fe(J4, "Directive");
function No(e) {
  const t = V$e[e.title];
  return /* @__PURE__ */ W.jsxs("div", { children: [
    /* @__PURE__ */ W.jsxs("div", { className: "graphiql-doc-explorer-section-title", children: [
      /* @__PURE__ */ W.jsx(t, {}),
      e.title
    ] }),
    /* @__PURE__ */ W.jsx("div", { className: "graphiql-doc-explorer-section-content", children: e.children })
  ] });
}
fe(No, "ExplorerSection");
const V$e = {
  Arguments: a$e,
  "Deprecated Arguments": d$e,
  "Deprecated Enum Values": p$e,
  "Deprecated Fields": h$e,
  Directives: m$e,
  "Enum Values": y$e,
  Fields: b$e,
  Implements: w$e,
  Implementations: Ig,
  "Possible Types": Ig,
  "Root Types": A$e,
  Type: Ig,
  "All Schema Types": Ig
};
function X4(e) {
  return /* @__PURE__ */ W.jsxs(W.Fragment, { children: [
    e.field.description ? /* @__PURE__ */ W.jsx(os, { type: "description", children: e.field.description }) : null,
    /* @__PURE__ */ W.jsx(zk, { preview: !1, children: e.field.deprecationReason }),
    /* @__PURE__ */ W.jsx(No, { title: "Type", children: /* @__PURE__ */ W.jsx(xi, { type: e.field.type }) }),
    /* @__PURE__ */ W.jsx(Z4, { field: e.field }),
    /* @__PURE__ */ W.jsx(e6, { field: e.field })
  ] });
}
fe(X4, "FieldDocumentation");
function Z4({ field: e }) {
  const [t, n] = k.useState(!1), r = k.useCallback(() => {
    n(!0);
  }, []);
  if (!("args" in e))
    return null;
  const o = [], i = [];
  for (const s of e.args)
    s.deprecationReason ? i.push(s) : o.push(s);
  return /* @__PURE__ */ W.jsxs(W.Fragment, { children: [
    o.length > 0 ? /* @__PURE__ */ W.jsx(No, { title: "Arguments", children: o.map((s) => /* @__PURE__ */ W.jsx(oh, { arg: s }, s.name)) }) : null,
    i.length > 0 ? t || o.length === 0 ? /* @__PURE__ */ W.jsx(No, { title: "Deprecated Arguments", children: i.map((s) => /* @__PURE__ */ W.jsx(oh, { arg: s }, s.name)) }) : /* @__PURE__ */ W.jsx(wi, { type: "button", onClick: r, children: "Show Deprecated Arguments" }) : null
  ] });
}
fe(Z4, "Arguments");
function e6({ field: e }) {
  var t;
  const n = ((t = e.astNode) == null ? void 0 : t.directives) || [];
  return !n || n.length === 0 ? null : /* @__PURE__ */ W.jsx(No, { title: "Directives", children: n.map((r) => /* @__PURE__ */ W.jsx("div", { children: /* @__PURE__ */ W.jsx(J4, { directive: r }) }, r.name.value)) });
}
fe(e6, "Directives");
function t6(e) {
  var t, n, r, o;
  const i = e.schema.getQueryType(), s = (n = (t = e.schema).getMutationType) == null ? void 0 : n.call(t), l = (o = (r = e.schema).getSubscriptionType) == null ? void 0 : o.call(r), c = e.schema.getTypeMap(), f = [
    i == null ? void 0 : i.name,
    s == null ? void 0 : s.name,
    l == null ? void 0 : l.name
  ];
  return /* @__PURE__ */ W.jsxs(W.Fragment, { children: [
    /* @__PURE__ */ W.jsx(os, { type: "description", children: e.schema.description || "A GraphQL schema provides a root type for each kind of operation." }),
    /* @__PURE__ */ W.jsxs(No, { title: "Root Types", children: [
      i ? /* @__PURE__ */ W.jsxs("div", { children: [
        /* @__PURE__ */ W.jsx("span", { className: "graphiql-doc-explorer-root-type", children: "query" }),
        ": ",
        /* @__PURE__ */ W.jsx(xi, { type: i })
      ] }) : null,
      s && /* @__PURE__ */ W.jsxs("div", { children: [
        /* @__PURE__ */ W.jsx("span", { className: "graphiql-doc-explorer-root-type", children: "mutation" }),
        ": ",
        /* @__PURE__ */ W.jsx(xi, { type: s })
      ] }),
      l && /* @__PURE__ */ W.jsxs("div", { children: [
        /* @__PURE__ */ W.jsx("span", { className: "graphiql-doc-explorer-root-type", children: "subscription" }),
        ": ",
        /* @__PURE__ */ W.jsx(xi, { type: l })
      ] })
    ] }),
    /* @__PURE__ */ W.jsx(No, { title: "All Schema Types", children: c && /* @__PURE__ */ W.jsx("div", { children: Object.values(c).map((d) => f.includes(d.name) || d.name.startsWith("__") ? null : /* @__PURE__ */ W.jsx("div", { children: /* @__PURE__ */ W.jsx(xi, { type: d }) }, d.name)) }) })
  ] });
}
fe(t6, "SchemaDocumentation");
function Sc(e, t) {
  let n;
  return function(...r) {
    n && window.clearTimeout(n), n = window.setTimeout(() => {
      n = null, t(...r);
    }, e);
  };
}
fe(Sc, "debounce");
function Hk() {
  const { explorerNavStack: e, push: t } = dl({
    nonNull: !0,
    caller: Hk
  }), n = k.useRef(null), r = _0(), [o, i] = k.useState(""), [s, l] = k.useState(r(o)), c = k.useMemo(
    () => Sc(200, (v) => {
      l(r(v));
    }),
    [r]
  );
  k.useEffect(() => {
    c(o);
  }, [c, o]), k.useEffect(() => {
    function v(b) {
      var w;
      b.metaKey && b.key === "k" && ((w = n.current) == null || w.focus());
    }
    return fe(v, "handleKeyDown"), window.addEventListener("keydown", v), () => window.removeEventListener("keydown", v);
  }, []);
  const f = e.at(-1), d = k.useCallback(
    (v) => {
      t(
        "field" in v ? { name: v.field.name, def: v.field } : { name: v.type.name, def: v.type }
      );
    },
    [t]
  ), g = k.useRef(!1), m = k.useCallback((v) => {
    g.current = v.type === "focus";
  }, []);
  return e.length === 1 || Ye(f.def) || Ze(f.def) || mt(f.def) ? /* @__PURE__ */ W.jsxs(
    Tu,
    {
      as: "div",
      className: "graphiql-doc-explorer-search",
      onChange: d,
      "data-state": g ? void 0 : "idle",
      "aria-label": `Search ${f.name}...`,
      children: [
        /* @__PURE__ */ W.jsxs(
          "div",
          {
            className: "graphiql-doc-explorer-search-input",
            onClick: () => {
              var v;
              (v = n.current) == null || v.focus();
            },
            children: [
              /* @__PURE__ */ W.jsx(S$e, {}),
              /* @__PURE__ */ W.jsx(
                Tu.Input,
                {
                  autoComplete: "off",
                  onFocus: m,
                  onBlur: m,
                  onChange: (v) => i(v.target.value),
                  placeholder: "⌘ K",
                  ref: n,
                  value: o,
                  "data-cy": "doc-explorer-input"
                }
              )
            ]
          }
        ),
        g.current && /* @__PURE__ */ W.jsxs(Tu.Options, { "data-cy": "doc-explorer-list", children: [
          s.within.length + s.types.length + s.fields.length === 0 ? /* @__PURE__ */ W.jsx("li", { className: "graphiql-doc-explorer-search-empty", children: "No results found" }) : s.within.map((v, b) => /* @__PURE__ */ W.jsx(
            Tu.Option,
            {
              value: v,
              "data-cy": "doc-explorer-option",
              children: /* @__PURE__ */ W.jsx(qS, { field: v.field, argument: v.argument })
            },
            `within-${b}`
          )),
          s.within.length > 0 && s.types.length + s.fields.length > 0 ? /* @__PURE__ */ W.jsx("div", { className: "graphiql-doc-explorer-search-divider", children: "Other results" }) : null,
          s.types.map((v, b) => /* @__PURE__ */ W.jsx(
            Tu.Option,
            {
              value: v,
              "data-cy": "doc-explorer-option",
              children: /* @__PURE__ */ W.jsx(N0, { type: v.type })
            },
            `type-${b}`
          )),
          s.fields.map((v, b) => /* @__PURE__ */ W.jsxs(
            Tu.Option,
            {
              value: v,
              "data-cy": "doc-explorer-option",
              children: [
                /* @__PURE__ */ W.jsx(N0, { type: v.type }),
                ".",
                /* @__PURE__ */ W.jsx(qS, { field: v.field, argument: v.argument })
              ]
            },
            `field-${b}`
          ))
        ] })
      ]
    }
  ) : null;
}
fe(Hk, "Search");
function _0(e) {
  const { explorerNavStack: t } = dl({
    nonNull: !0,
    caller: e || _0
  }), { schema: n } = Ri({
    nonNull: !0,
    caller: e || _0
  }), r = t.at(-1);
  return k.useCallback(
    (o) => {
      const i = {
        within: [],
        types: [],
        fields: []
      };
      if (!n)
        return i;
      const s = r.def, l = n.getTypeMap();
      let c = Object.keys(l);
      s && (c = c.filter((f) => f !== s.name), c.unshift(s.name));
      for (const f of c) {
        if (i.within.length + i.types.length + i.fields.length >= 100)
          break;
        const d = l[f];
        if (s !== d && sv(f, o) && i.types.push({ type: d }), !Ye(d) && !Ze(d) && !mt(d))
          continue;
        const g = d.getFields();
        for (const m in g) {
          const v = g[m];
          let b;
          if (!sv(m, o))
            if ("args" in v) {
              if (b = v.args.filter(
                (w) => sv(w.name, o)
              ), b.length === 0)
                continue;
            } else
              continue;
          i[s === d ? "within" : "fields"].push(
            ...b ? b.map((w) => ({ type: d, field: v, argument: w })) : [{ type: d, field: v }]
          );
        }
      }
      return i;
    },
    [r.def, n]
  );
}
fe(_0, "useSearchResults");
function sv(e, t) {
  try {
    const n = t.replaceAll(/[^_0-9A-Za-z]/g, (r) => "\\" + r);
    return e.search(new RegExp(n, "i")) !== -1;
  } catch {
    return e.toLowerCase().includes(t.toLowerCase());
  }
}
fe(sv, "isMatch");
function N0(e) {
  return /* @__PURE__ */ W.jsx("span", { className: "graphiql-doc-explorer-search-type", children: e.type.name });
}
fe(N0, "Type");
function qS({ field: e, argument: t }) {
  return /* @__PURE__ */ W.jsxs(W.Fragment, { children: [
    /* @__PURE__ */ W.jsx("span", { className: "graphiql-doc-explorer-search-field", children: e.name }),
    t ? /* @__PURE__ */ W.jsxs(W.Fragment, { children: [
      "(",
      /* @__PURE__ */ W.jsx("span", { className: "graphiql-doc-explorer-search-argument", children: t.name }),
      ":",
      " ",
      rh(t.type, (n) => /* @__PURE__ */ W.jsx(N0, { type: n })),
      ")"
    ] }) : null
  ] });
}
fe(qS, "Field$1");
function n6(e) {
  const { push: t } = dl({ nonNull: !0 });
  return /* @__PURE__ */ W.jsx(
    "a",
    {
      className: "graphiql-doc-explorer-field-name",
      onClick: (n) => {
        n.preventDefault(), t({ name: e.field.name, def: e.field });
      },
      href: "#",
      children: e.field.name
    }
  );
}
fe(n6, "FieldLink");
function r6(e) {
  return Ks(e.type) ? /* @__PURE__ */ W.jsxs(W.Fragment, { children: [
    e.type.description ? /* @__PURE__ */ W.jsx(os, { type: "description", children: e.type.description }) : null,
    /* @__PURE__ */ W.jsx(o6, { type: e.type }),
    /* @__PURE__ */ W.jsx(i6, { type: e.type }),
    /* @__PURE__ */ W.jsx(s6, { type: e.type }),
    /* @__PURE__ */ W.jsx(a6, { type: e.type })
  ] }) : null;
}
fe(r6, "TypeDocumentation");
function o6({ type: e }) {
  return Ye(e) && e.getInterfaces().length > 0 ? /* @__PURE__ */ W.jsx(No, { title: "Implements", children: e.getInterfaces().map((t) => /* @__PURE__ */ W.jsx("div", { children: /* @__PURE__ */ W.jsx(xi, { type: t }) }, t.name)) }) : null;
}
fe(o6, "ImplementsInterfaces");
function i6({ type: e }) {
  const [t, n] = k.useState(!1), r = k.useCallback(() => {
    n(!0);
  }, []);
  if (!Ye(e) && !Ze(e) && !mt(e))
    return null;
  const o = e.getFields(), i = [], s = [];
  for (const l of Object.keys(o).map((c) => o[c]))
    l.deprecationReason ? s.push(l) : i.push(l);
  return /* @__PURE__ */ W.jsxs(W.Fragment, { children: [
    i.length > 0 ? /* @__PURE__ */ W.jsx(No, { title: "Fields", children: i.map((l) => /* @__PURE__ */ W.jsx(zS, { field: l }, l.name)) }) : null,
    s.length > 0 ? t || i.length === 0 ? /* @__PURE__ */ W.jsx(No, { title: "Deprecated Fields", children: s.map((l) => /* @__PURE__ */ W.jsx(zS, { field: l }, l.name)) }) : /* @__PURE__ */ W.jsx(wi, { type: "button", onClick: r, children: "Show Deprecated Fields" }) : null
  ] });
}
fe(i6, "Fields");
function zS({ field: e }) {
  const t = "args" in e ? e.args.filter((n) => !n.deprecationReason) : [];
  return /* @__PURE__ */ W.jsxs("div", { className: "graphiql-doc-explorer-item", children: [
    /* @__PURE__ */ W.jsxs("div", { children: [
      /* @__PURE__ */ W.jsx(n6, { field: e }),
      t.length > 0 ? /* @__PURE__ */ W.jsxs(W.Fragment, { children: [
        "(",
        /* @__PURE__ */ W.jsx("span", { children: t.map(
          (n) => t.length === 1 ? /* @__PURE__ */ W.jsx(oh, { arg: n, inline: !0 }, n.name) : /* @__PURE__ */ W.jsx(
            "div",
            {
              className: "graphiql-doc-explorer-argument-multiple",
              children: /* @__PURE__ */ W.jsx(oh, { arg: n, inline: !0 })
            },
            n.name
          )
        ) }),
        ")"
      ] }) : null,
      ": ",
      /* @__PURE__ */ W.jsx(xi, { type: e.type }),
      /* @__PURE__ */ W.jsx(Uk, { field: e })
    ] }),
    e.description ? /* @__PURE__ */ W.jsx(os, { type: "description", onlyShowFirstChild: !0, children: e.description }) : null,
    /* @__PURE__ */ W.jsx(zk, { children: e.deprecationReason })
  ] });
}
fe(zS, "Field");
function s6({ type: e }) {
  const [t, n] = k.useState(!1), r = k.useCallback(() => {
    n(!0);
  }, []);
  if (!Lt(e))
    return null;
  const o = [], i = [];
  for (const s of e.getValues())
    s.deprecationReason ? i.push(s) : o.push(s);
  return /* @__PURE__ */ W.jsxs(W.Fragment, { children: [
    o.length > 0 ? /* @__PURE__ */ W.jsx(No, { title: "Enum Values", children: o.map((s) => /* @__PURE__ */ W.jsx(HS, { value: s }, s.name)) }) : null,
    i.length > 0 ? t || o.length === 0 ? /* @__PURE__ */ W.jsx(No, { title: "Deprecated Enum Values", children: i.map((s) => /* @__PURE__ */ W.jsx(HS, { value: s }, s.name)) }) : /* @__PURE__ */ W.jsx(wi, { type: "button", onClick: r, children: "Show Deprecated Values" }) : null
  ] });
}
fe(s6, "EnumValues");
function HS({ value: e }) {
  return /* @__PURE__ */ W.jsxs("div", { className: "graphiql-doc-explorer-item", children: [
    /* @__PURE__ */ W.jsx("div", { className: "graphiql-doc-explorer-enum-value", children: e.name }),
    e.description ? /* @__PURE__ */ W.jsx(os, { type: "description", children: e.description }) : null,
    e.deprecationReason ? /* @__PURE__ */ W.jsx(os, { type: "deprecation", children: e.deprecationReason }) : null
  ] });
}
fe(HS, "EnumValue");
function a6({ type: e }) {
  const { schema: t } = Ri({ nonNull: !0 });
  return !t || !qn(e) ? null : /* @__PURE__ */ W.jsx(
    No,
    {
      title: Ze(e) ? "Implementations" : "Possible Types",
      children: t.getPossibleTypes(e).map((n) => /* @__PURE__ */ W.jsx("div", { children: /* @__PURE__ */ W.jsx(xi, { type: n }) }, n.name))
    }
  );
}
fe(a6, "PossibleTypes");
function O0() {
  const { fetchError: e, isFetching: t, schema: n, validationErrors: r } = Ri(
    { nonNull: !0, caller: O0 }
  ), { explorerNavStack: o, pop: i } = dl({
    nonNull: !0,
    caller: O0
  }), s = o.at(-1);
  let l = null;
  e ? l = /* @__PURE__ */ W.jsx("div", { className: "graphiql-doc-explorer-error", children: "Error fetching schema" }) : r.length > 0 ? l = /* @__PURE__ */ W.jsxs("div", { className: "graphiql-doc-explorer-error", children: [
    "Schema is invalid: ",
    r[0].message
  ] }) : t ? l = /* @__PURE__ */ W.jsx(jk, {}) : n ? o.length === 1 ? l = /* @__PURE__ */ W.jsx(t6, { schema: n }) : Df(s.def) ? l = /* @__PURE__ */ W.jsx(r6, { type: s.def }) : s.def && (l = /* @__PURE__ */ W.jsx(X4, { field: s.def })) : l = /* @__PURE__ */ W.jsx("div", { className: "graphiql-doc-explorer-error", children: "No GraphQL schema available" });
  let c;
  return o.length > 1 && (c = o.at(-2).name), /* @__PURE__ */ W.jsxs(
    "section",
    {
      className: "graphiql-doc-explorer",
      "aria-label": "Documentation Explorer",
      children: [
        /* @__PURE__ */ W.jsxs("div", { className: "graphiql-doc-explorer-header", children: [
          /* @__PURE__ */ W.jsxs("div", { className: "graphiql-doc-explorer-header-content", children: [
            c && /* @__PURE__ */ W.jsxs(
              "a",
              {
                href: "#",
                className: "graphiql-doc-explorer-back",
                onClick: (f) => {
                  f.preventDefault(), i();
                },
                "aria-label": `Go back to ${c}`,
                children: [
                  /* @__PURE__ */ W.jsx(c$e, {}),
                  c
                ]
              }
            ),
            /* @__PURE__ */ W.jsx("div", { className: "graphiql-doc-explorer-title", children: s.name })
          ] }),
          /* @__PURE__ */ W.jsx(Hk, {}, s.name)
        ] }),
        /* @__PURE__ */ W.jsx("div", { className: "graphiql-doc-explorer-content", children: l })
      ]
    }
  );
}
fe(O0, "DocExplorer");
const ih = {
  title: "Documentation Explorer",
  icon: /* @__PURE__ */ fe(function() {
    const e = u1();
    return (e == null ? void 0 : e.visiblePlugin) === ih ? /* @__PURE__ */ W.jsx(g$e, {}) : /* @__PURE__ */ W.jsx(v$e, {});
  }, "Icon"),
  content: O0
}, ML = {
  title: "History",
  icon: E$e,
  content: q4
}, l6 = cl("PluginContext");
function c6(e) {
  const t = fl(), n = dl(), r = s1(), o = !!n, i = !!r, s = k.useMemo(() => {
    const v = [], b = {};
    o && (v.push(ih), b[ih.title] = !0), i && (v.push(ML), b[ML.title] = !0);
    for (const w of e.plugins || []) {
      if (typeof w.title != "string" || !w.title)
        throw new Error("All GraphiQL plugins must have a unique title");
      if (b[w.title])
        throw new Error(
          `All GraphiQL plugins must have a unique title, found two plugins with the title '${w.title}'`
        );
      v.push(w), b[w.title] = !0;
    }
    return v;
  }, [o, i, e.plugins]), [l, c] = k.useState(() => {
    const v = t == null ? void 0 : t.get(PL);
    return s.find(
      (w) => w.title === v
    ) || (v && (t == null || t.set(PL, "")), e.visiblePlugin && s.find(
      (w) => (typeof e.visiblePlugin == "string" ? w.title : w) === e.visiblePlugin
    ) || null);
  }), { onTogglePluginVisibility: f, children: d } = e, g = k.useCallback(
    (v) => {
      const b = v && s.find(
        (w) => (typeof v == "string" ? w.title : w) === v
      ) || null;
      c((w) => b === w ? w : (f == null || f(b), b));
    },
    [f, s]
  );
  k.useEffect(() => {
    e.visiblePlugin && g(e.visiblePlugin);
  }, [s, e.visiblePlugin, g]);
  const m = k.useMemo(
    () => ({ plugins: s, setVisiblePlugin: g, visiblePlugin: l }),
    [s, g, l]
  );
  return /* @__PURE__ */ W.jsx(l6.Provider, { value: m, children: d });
}
fe(c6, "PluginContextProvider");
const u1 = ul(l6), PL = "visiblePlugin";
function u6(e, t, n, r, o, i) {
  jf([], { useCommonAddons: !1 }).then((l) => {
    let c, f, d, g, m, v, b, w, _;
    l.on(
      t,
      "select",
      // @ts-expect-error
      (S, x) => {
        if (!c) {
          const C = x.parentNode;
          c = document.createElement("div"), c.className = "CodeMirror-hint-information", C.append(c);
          const E = document.createElement("header");
          E.className = "CodeMirror-hint-information-header", c.append(E), f = document.createElement("span"), f.className = "CodeMirror-hint-information-field-name", E.append(f), d = document.createElement("span"), d.className = "CodeMirror-hint-information-type-name-pill", E.append(d), g = document.createElement("span"), d.append(g), m = document.createElement("a"), m.className = "CodeMirror-hint-information-type-name", m.href = "javascript:void 0", m.addEventListener("click", s), d.append(m), v = document.createElement("span"), d.append(v), b = document.createElement("div"), b.className = "CodeMirror-hint-information-description", c.append(b), w = document.createElement("div"), w.className = "CodeMirror-hint-information-deprecation", c.append(w);
          const N = document.createElement("span");
          N.className = "CodeMirror-hint-information-deprecation-label", N.textContent = "Deprecated", w.append(N), _ = document.createElement("div"), _.className = "CodeMirror-hint-information-deprecation-reason", w.append(_);
          const I = parseInt(
            window.getComputedStyle(c).paddingBottom.replace(/px$/, ""),
            10
          ) || 0, D = parseInt(
            window.getComputedStyle(c).maxHeight.replace(/px$/, ""),
            10
          ) || 0, A = /* @__PURE__ */ fe(() => {
            c && (c.style.paddingTop = C.scrollTop + I + "px", c.style.maxHeight = C.scrollTop + D + "px");
          }, "handleScroll");
          C.addEventListener("scroll", A);
          let F;
          C.addEventListener(
            "DOMNodeRemoved",
            F = /* @__PURE__ */ fe(($) => {
              $.target === C && (C.removeEventListener("scroll", A), C.removeEventListener("DOMNodeRemoved", F), c && c.removeEventListener(
                "click",
                s
              ), c = null, f = null, d = null, g = null, m = null, v = null, b = null, w = null, _ = null, F = null);
            }, "onRemoveFn")
          );
        }
        if (f && (f.textContent = S.text), d && g && m && v)
          if (S.type) {
            d.style.display = "inline";
            const C = /* @__PURE__ */ fe((E) => {
              He(E) ? (v.textContent = "!" + v.textContent, C(E.ofType)) : vt(E) ? (g.textContent += "[", v.textContent = "]" + v.textContent, C(E.ofType)) : m.textContent = E.name;
            }, "renderType");
            g.textContent = "", v.textContent = "", C(S.type);
          } else
            g.textContent = "", m.textContent = "", v.textContent = "", d.style.display = "none";
        b && (S.description ? (b.style.display = "block", b.innerHTML = C0.render(S.description)) : (b.style.display = "none", b.innerHTML = "")), w && _ && (S.deprecationReason ? (w.style.display = "block", _.innerHTML = C0.render(
          S.deprecationReason
        )) : (w.style.display = "none", _.innerHTML = ""));
      }
    );
  });
  function s(l) {
    if (!n || !r || !o || !(l.currentTarget instanceof HTMLElement))
      return;
    const c = l.currentTarget.textContent || "", f = n.getType(c);
    f && (o.setVisiblePlugin(ih), r.push({ name: f.name, def: f }), i == null || i(f));
  }
  fe(s, "onClickHintInformation");
}
fe(u6, "onHasCompletion");
function Wd(e, t) {
  k.useEffect(() => {
    e && typeof t == "string" && t !== e.getValue() && e.setValue(t);
  }, [e, t]);
}
fe(Wd, "useSynchronizeValue");
function qh(e, t, n) {
  k.useEffect(() => {
    e && e.setOption(t, n);
  }, [e, t, n]);
}
fe(qh, "useSynchronizeOption");
function Wk(e, t, n, r, o) {
  const { updateActiveTabValues: i } = Zn({ nonNull: !0, caller: o }), s = fl();
  k.useEffect(() => {
    if (!e)
      return;
    const l = Sc(500, (d) => {
      !s || n === null || s.set(n, d);
    }), c = Sc(100, (d) => {
      i({ [r]: d });
    }), f = /* @__PURE__ */ fe((d, g) => {
      if (!g)
        return;
      const m = d.getValue();
      l(m), c(m), t == null || t(m);
    }, "handleChange");
    return e.on("change", f), () => e.off("change", f);
  }, [
    t,
    e,
    s,
    n,
    r,
    i
  ]);
}
fe(Wk, "useChangeHandler");
function Gk(e, t, n) {
  const { schema: r } = Ri({ nonNull: !0, caller: n }), o = dl(), i = u1();
  k.useEffect(() => {
    if (!e)
      return;
    const s = /* @__PURE__ */ fe((l, c) => {
      u6(l, c, r, o, i, (f) => {
        t == null || t({ kind: "Type", type: f, schema: r || void 0 });
      });
    }, "handleCompletion");
    return e.on(
      // @ts-expect-error @TODO additional args for hasCompletion event
      "hasCompletion",
      s
    ), () => e.off(
      // @ts-expect-error @TODO additional args for hasCompletion event
      "hasCompletion",
      s
    );
  }, [t, e, o, i, r]);
}
fe(Gk, "useCompletion");
function Si(e, t, n) {
  k.useEffect(() => {
    if (e) {
      for (const r of t)
        e.removeKeyMap(r);
      if (n) {
        const r = {};
        for (const o of t)
          r[o] = () => n();
        e.addKeyMap(r);
      }
    }
  }, [e, t, n]);
}
fe(Si, "useKeyMap");
function f1({ caller: e, onCopyQuery: t } = {}) {
  const { queryEditor: n } = Zn({
    nonNull: !0,
    caller: e || f1
  });
  return k.useCallback(() => {
    if (!n)
      return;
    const r = n.getValue();
    Ez(r), t == null || t(r);
  }, [n, t]);
}
fe(f1, "useCopyQuery");
function Tc({ caller: e } = {}) {
  const { queryEditor: t } = Zn({
    nonNull: !0,
    caller: e || Tc
  }), { schema: n } = Ri({ nonNull: !0, caller: Tc });
  return k.useCallback(() => {
    const r = t == null ? void 0 : t.documentAST, o = t == null ? void 0 : t.getValue();
    !r || !o || t.setValue(pt(sq(r, n)));
  }, [t, n]);
}
fe(Tc, "useMergeQuery");
function Uf({ caller: e } = {}) {
  const { queryEditor: t, headerEditor: n, variableEditor: r } = Zn({
    nonNull: !0,
    caller: e || Uf
  });
  return k.useCallback(() => {
    if (r) {
      const o = r.getValue();
      try {
        const i = JSON.stringify(
          JSON.parse(o),
          null,
          2
        );
        i !== o && r.setValue(i);
      } catch {
      }
    }
    if (n) {
      const o = n.getValue();
      try {
        const i = JSON.stringify(
          JSON.parse(o),
          null,
          2
        );
        i !== o && n.setValue(i);
      } catch {
      }
    }
    if (t) {
      const o = t.getValue(), i = pt(fr(o));
      i !== o && t.setValue(i);
    }
  }, [t, r, n]);
}
fe(Uf, "usePrettifyEditors");
function A0({
  getDefaultFieldNames: e,
  caller: t
} = {}) {
  const { schema: n } = Ri({
    nonNull: !0,
    caller: t || A0
  }), { queryEditor: r } = Zn({
    nonNull: !0,
    caller: t || A0
  });
  return k.useCallback(() => {
    if (!r)
      return;
    const o = r.getValue(), { insertions: i, result: s } = eq(
      n,
      o,
      e
    );
    return i && i.length > 0 && r.operation(() => {
      const l = r.getCursor(), c = r.indexFromPos(l);
      r.setValue(s || "");
      let f = 0;
      const d = i.map(
        ({ index: m, string: v }) => r.markText(
          r.posFromIndex(m + f),
          r.posFromIndex(m + (f += v.length)),
          {
            className: "auto-inserted-leaf",
            clearOnEnter: !0,
            title: "Automatically added leaf fields"
          }
        )
      );
      setTimeout(() => {
        for (const m of d)
          m.clear();
      }, 7e3);
      let g = c;
      for (const { index: m, string: v } of i)
        m < c && (g += v.length);
      r.setCursor(r.posFromIndex(g));
    }), s;
  }, [e, r, n]);
}
fe(A0, "useAutoCompleteLeafs");
const j$e = /* @__PURE__ */ fe((e) => {
  const t = Zn({
    nonNull: !0
  })[`${e}Editor`];
  let n = "";
  const r = (t == null ? void 0 : t.getValue()) ?? !1;
  r && r.length > 0 && (n = r);
  const o = k.useCallback(
    (i) => t == null ? void 0 : t.setValue(i),
    [t]
  );
  return k.useMemo(
    () => [n, o],
    [n, o]
  );
}, "useEditorState"), U$e = /* @__PURE__ */ fe(() => j$e("query"), "useOperationsEditorState");
function f6([
  e,
  t
]) {
  const n = k.useRef({
    /** The last thing that we sent upstream; we're expecting this back */
    pending: null,
    /** The last thing we received from upstream */
    last: e
  }), [r, o] = k.useState(e);
  k.useEffect(() => {
    n.current.last === e || (n.current.last = e, n.current.pending === null ? o(e) : n.current.pending === e ? (n.current.pending = null, e !== r && (n.current.pending = r, t(r))) : (n.current.pending = null, o(e)));
  }, [e, r, t]);
  const i = k.useCallback(
    (s) => {
      o(s), n.current.pending === null && n.current.last !== s && (n.current.pending = s, t(s));
    },
    [t]
  );
  return k.useMemo(() => [r, i], [r, i]);
}
fe(f6, "useOptimisticState");
function Qu({
  editorTheme: e = a1,
  keyMap: t = l1,
  onEdit: n,
  readOnly: r = !1
} = {}, o) {
  const {
    initialHeaders: i,
    headerEditor: s,
    setHeaderEditor: l,
    shouldPersistHeaders: c
  } = Zn({
    nonNull: !0,
    caller: o || Qu
  }), f = Vf(), d = Tc({ caller: o || Qu }), g = Uf({ caller: o || Qu }), m = k.useRef(null);
  return k.useEffect(() => {
    let v = !0;
    return jf([
      // @ts-expect-error
      Promise.resolve().then(() => k9e).then((b) => b.j)
    ]).then((b) => {
      if (!v)
        return;
      const w = m.current;
      if (!w)
        return;
      const _ = b(w, {
        value: i,
        lineNumbers: !0,
        tabSize: 2,
        mode: { name: "javascript", json: !0 },
        theme: e,
        autoCloseBrackets: !0,
        matchBrackets: !0,
        showCursorWhenSelecting: !0,
        readOnly: r ? "nocursor" : !1,
        foldGutter: !0,
        gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"],
        extraKeys: c1
      });
      _.addKeyMap({
        "Cmd-Space"() {
          _.showHint({ completeSingle: !1, container: w });
        },
        "Ctrl-Space"() {
          _.showHint({ completeSingle: !1, container: w });
        },
        "Alt-Space"() {
          _.showHint({ completeSingle: !1, container: w });
        },
        "Shift-Space"() {
          _.showHint({ completeSingle: !1, container: w });
        }
      }), _.on("keyup", (S, x) => {
        const { code: C, key: E, shiftKey: N } = x, I = C.startsWith("Key"), D = !N && C.startsWith("Digit");
        (I || D || E === "_" || E === '"') && S.execCommand("autocomplete");
      }), l(_);
    }), () => {
      v = !1;
    };
  }, [e, i, r, l]), qh(s, "keyMap", t), Wk(
    s,
    n,
    c ? av : null,
    "headers",
    Qu
  ), Si(s, ["Cmd-Enter", "Ctrl-Enter"], f == null ? void 0 : f.run), Si(s, ["Shift-Ctrl-P"], g), Si(s, ["Shift-Ctrl-M"], d), m;
}
fe(Qu, "useHeaderEditor");
const av = "headers", B$e = Array.from({ length: 11 }, (e, t) => String.fromCharCode(8192 + t)).concat(["\u2028", "\u2029", " ", " "]), q$e = new RegExp("[" + B$e.join("") + "]", "g");
function d6(e) {
  return e.replace(q$e, " ");
}
fe(d6, "normalizeWhitespace");
function Ca({
  editorTheme: e = a1,
  keyMap: t = l1,
  onClickReference: n,
  onCopyQuery: r,
  onEdit: o,
  readOnly: i = !1
} = {}, s) {
  const { schema: l } = Ri({
    nonNull: !0,
    caller: s || Ca
  }), {
    externalFragments: c,
    initialQuery: f,
    queryEditor: d,
    setOperationName: g,
    setQueryEditor: m,
    validationRules: v,
    variableEditor: b,
    updateActiveTabValues: w
  } = Zn({
    nonNull: !0,
    caller: s || Ca
  }), _ = Vf(), S = fl(), x = dl(), C = u1(), E = f1({ caller: s || Ca, onCopyQuery: r }), N = Tc({ caller: s || Ca }), I = Uf({ caller: s || Ca }), D = k.useRef(null), A = k.useRef(), F = k.useRef(() => {
  });
  k.useEffect(() => {
    F.current = (H) => {
      if (!(!x || !C)) {
        switch (C.setVisiblePlugin(ih), H.kind) {
          case "Type": {
            x.push({ name: H.type.name, def: H.type });
            break;
          }
          case "Field": {
            x.push({ name: H.field.name, def: H.field });
            break;
          }
          case "Argument": {
            H.field && x.push({ name: H.field.name, def: H.field });
            break;
          }
          case "EnumValue": {
            H.type && x.push({ name: H.type.name, def: H.type });
            break;
          }
        }
        n == null || n(H);
      }
    };
  }, [x, n, C]), k.useEffect(() => {
    let H = !0;
    return jf([
      Promise.resolve().then(() => D9e).then((z) => z.c),
      Promise.resolve().then(() => sV).then((z) => z.s),
      Promise.resolve().then(() => M9e),
      Promise.resolve().then(() => $9e),
      Promise.resolve().then(() => H9e),
      Promise.resolve().then(() => Q9e),
      Promise.resolve().then(() => eje)
    ]).then((z) => {
      if (!H)
        return;
      A.current = z;
      const B = D.current;
      if (!B)
        return;
      const R = z(B, {
        value: f,
        lineNumbers: !0,
        tabSize: 2,
        foldGutter: !0,
        mode: "graphql",
        theme: e,
        autoCloseBrackets: !0,
        matchBrackets: !0,
        showCursorWhenSelecting: !0,
        readOnly: i ? "nocursor" : !1,
        lint: {
          // @ts-expect-error
          schema: void 0,
          validationRules: null,
          // linting accepts string or FragmentDefinitionNode[]
          externalFragments: void 0
        },
        hintOptions: {
          // @ts-expect-error
          schema: void 0,
          closeOnUnfocus: !1,
          completeSingle: !1,
          container: B,
          externalFragments: void 0
        },
        info: {
          schema: void 0,
          renderDescription: (Q) => C0.render(Q),
          onClick(Q) {
            F.current(Q);
          }
        },
        jump: {
          schema: void 0,
          onClick(Q) {
            F.current(Q);
          }
        },
        gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"],
        extraKeys: {
          ...c1,
          "Cmd-S"() {
          },
          "Ctrl-S"() {
          }
        }
      });
      R.addKeyMap({
        "Cmd-Space"() {
          R.showHint({ completeSingle: !0, container: B });
        },
        "Ctrl-Space"() {
          R.showHint({ completeSingle: !0, container: B });
        },
        "Alt-Space"() {
          R.showHint({ completeSingle: !0, container: B });
        },
        "Shift-Space"() {
          R.showHint({ completeSingle: !0, container: B });
        },
        "Shift-Alt-Space"() {
          R.showHint({ completeSingle: !0, container: B });
        }
      }), R.on("keyup", (Q, Y) => {
        z$e.test(Y.key) && Q.execCommand("autocomplete");
      });
      let te = !1;
      R.on("startCompletion", () => {
        te = !0;
      }), R.on("endCompletion", () => {
        te = !1;
      }), R.on("keydown", (Q, Y) => {
        Y.key === "Escape" && te && Y.stopPropagation();
      }), R.on("beforeChange", (Q, Y) => {
        var K;
        if (Y.origin === "paste") {
          const Z = Y.text.map(d6);
          (K = Y.update) == null || K.call(Y, Y.from, Y.to, Z);
        }
      }), R.documentAST = null, R.operationName = null, R.operations = null, R.variableToType = null, m(R);
    }), () => {
      H = !1;
    };
  }, [e, f, i, m]), qh(d, "keyMap", t), k.useEffect(() => {
    if (!d)
      return;
    function H(B) {
      var R;
      const te = Yq(
        l,
        B.getValue()
      ), Q = aq(
        B.operations ?? void 0,
        B.operationName ?? void 0,
        te == null ? void 0 : te.operations
      );
      return B.documentAST = (te == null ? void 0 : te.documentAST) ?? null, B.operationName = Q ?? null, B.operations = (te == null ? void 0 : te.operations) ?? null, b && (b.state.lint.linterOptions.variableToType = te == null ? void 0 : te.variableToType, b.options.lint.variableToType = te == null ? void 0 : te.variableToType, b.options.hintOptions.variableToType = te == null ? void 0 : te.variableToType, (R = A.current) == null || R.signal(b, "change", b)), te ? { ...te, operationName: Q } : null;
    }
    fe(H, "getAndUpdateOperationFacts");
    const z = Sc(
      100,
      (B) => {
        const R = B.getValue();
        S == null || S.set(g6, R);
        const te = B.operationName, Q = H(B);
        (Q == null ? void 0 : Q.operationName) !== void 0 && (S == null || S.set(
          H$e,
          Q.operationName
        )), o == null || o(R, Q == null ? void 0 : Q.documentAST), Q != null && Q.operationName && te !== Q.operationName && g(Q.operationName), w({
          query: R,
          operationName: (Q == null ? void 0 : Q.operationName) ?? null
        });
      }
    );
    return H(d), d.on("change", z), () => d.off("change", z);
  }, [
    o,
    d,
    l,
    g,
    S,
    b,
    w
  ]), p6(d, l ?? null, A), h6(
    d,
    v ?? null,
    A
  ), m6(
    d,
    c,
    A
  ), Gk(d, n || null, Ca);
  const $ = _ == null ? void 0 : _.run, q = k.useCallback(() => {
    var H;
    if (!$ || !d || !d.operations || !d.hasFocus()) {
      $ == null || $();
      return;
    }
    const z = d.indexFromPos(d.getCursor());
    let B;
    for (const R of d.operations)
      R.loc && R.loc.start <= z && R.loc.end >= z && (B = (H = R.name) == null ? void 0 : H.value);
    B && B !== d.operationName && g(B), $();
  }, [d, $, g]);
  return Si(d, ["Cmd-Enter", "Ctrl-Enter"], q), Si(d, ["Shift-Ctrl-C"], E), Si(
    d,
    [
      "Shift-Ctrl-P",
      // Shift-Ctrl-P is hard coded in Firefox for private browsing so adding an alternative to prettify
      "Shift-Ctrl-F"
    ],
    I
  ), Si(d, ["Shift-Ctrl-M"], N), D;
}
fe(Ca, "useQueryEditor");
function p6(e, t, n) {
  k.useEffect(() => {
    if (!e)
      return;
    const r = e.options.lint.schema !== t;
    e.state.lint.linterOptions.schema = t, e.options.lint.schema = t, e.options.hintOptions.schema = t, e.options.info.schema = t, e.options.jump.schema = t, r && n.current && n.current.signal(e, "change", e);
  }, [e, t, n]);
}
fe(p6, "useSynchronizeSchema");
function h6(e, t, n) {
  k.useEffect(() => {
    if (!e)
      return;
    const r = e.options.lint.validationRules !== t;
    e.state.lint.linterOptions.validationRules = t, e.options.lint.validationRules = t, r && n.current && n.current.signal(e, "change", e);
  }, [e, t, n]);
}
fe(h6, "useSynchronizeValidationRules");
function m6(e, t, n) {
  const r = k.useMemo(
    () => [...t.values()],
    [t]
  );
  k.useEffect(() => {
    if (!e)
      return;
    const o = e.options.lint.externalFragments !== r;
    e.state.lint.linterOptions.externalFragments = r, e.options.lint.externalFragments = r, e.options.hintOptions.externalFragments = r, o && n.current && n.current.signal(e, "change", e);
  }, [e, r, n]);
}
fe(m6, "useSynchronizeExternalFragments");
const z$e = /^[a-zA-Z0-9_@(]$/, g6 = "query", H$e = "operationName";
function v6({
  defaultQuery: e,
  defaultHeaders: t,
  headers: n,
  defaultTabs: r,
  query: o,
  variables: i,
  storage: s,
  shouldPersistHeaders: l
}) {
  const c = s == null ? void 0 : s.get(ah);
  try {
    if (!c)
      throw new Error("Storage for tabs is empty");
    const f = JSON.parse(c), d = l ? n : void 0;
    if (y6(f)) {
      const g = sh({
        query: o,
        variables: i,
        headers: d
      });
      let m = -1;
      for (let v = 0; v < f.tabs.length; v++) {
        const b = f.tabs[v];
        b.hash = sh({
          query: b.query,
          variables: b.variables,
          headers: b.headers
        }), b.hash === g && (m = v);
      }
      if (m >= 0)
        f.activeTabIndex = m;
      else {
        const v = o ? d1(o) : null;
        f.tabs.push({
          id: Jk(),
          hash: g,
          title: v || Xk,
          query: o,
          variables: i,
          headers: n,
          operationName: v,
          response: null
        }), f.activeTabIndex = f.tabs.length - 1;
      }
      return f;
    }
    throw new Error("Storage for tabs is invalid");
  } catch {
    return {
      activeTabIndex: 0,
      tabs: (r || [
        {
          query: o ?? e,
          variables: i,
          headers: n ?? t
        }
      ]).map(Yk)
    };
  }
}
fe(v6, "getDefaultTabState");
function y6(e) {
  return e && typeof e == "object" && !Array.isArray(e) && E6(e, "activeTabIndex") && "tabs" in e && Array.isArray(e.tabs) && e.tabs.every(b6);
}
fe(y6, "isTabsState");
function b6(e) {
  return e && typeof e == "object" && !Array.isArray(e) && WS(e, "id") && WS(e, "title") && Nu(e, "query") && Nu(e, "variables") && Nu(e, "headers") && Nu(e, "operationName") && Nu(e, "response");
}
fe(b6, "isTabState");
function E6(e, t) {
  return t in e && typeof e[t] == "number";
}
fe(E6, "hasNumberKey");
function WS(e, t) {
  return t in e && typeof e[t] == "string";
}
fe(WS, "hasStringKey");
function Nu(e, t) {
  return t in e && (typeof e[t] == "string" || e[t] === null);
}
fe(Nu, "hasStringOrNullKey");
function w6({
  queryEditor: e,
  variableEditor: t,
  headerEditor: n,
  responseEditor: r
}) {
  return k.useCallback(
    (o) => {
      const i = (e == null ? void 0 : e.getValue()) ?? null, s = (t == null ? void 0 : t.getValue()) ?? null, l = (n == null ? void 0 : n.getValue()) ?? null, c = (e == null ? void 0 : e.operationName) ?? null, f = (r == null ? void 0 : r.getValue()) ?? null;
      return Kk(o, {
        query: i,
        variables: s,
        headers: l,
        response: f,
        operationName: c
      });
    },
    [e, t, n, r]
  );
}
fe(w6, "useSynchronizeActiveTabValues");
function Qk(e, t = !1) {
  return JSON.stringify(
    e,
    (n, r) => n === "hash" || n === "response" || !t && n === "headers" ? null : r
  );
}
fe(Qk, "serializeTabState");
function x6({
  storage: e,
  shouldPersistHeaders: t
}) {
  const n = k.useMemo(
    () => Sc(500, (r) => {
      e == null || e.set(ah, r);
    }),
    [e]
  );
  return k.useCallback(
    (r) => {
      n(Qk(r, t));
    },
    [t, n]
  );
}
fe(x6, "useStoreTabs");
function S6({
  queryEditor: e,
  variableEditor: t,
  headerEditor: n,
  responseEditor: r
}) {
  return k.useCallback(
    ({
      query: o,
      variables: i,
      headers: s,
      response: l
    }) => {
      e == null || e.setValue(o ?? ""), t == null || t.setValue(i ?? ""), n == null || n.setValue(s ?? ""), r == null || r.setValue(l ?? "");
    },
    [n, e, r, t]
  );
}
fe(S6, "useSetEditorValues");
function Yk({
  query: e = null,
  variables: t = null,
  headers: n = null
} = {}) {
  return {
    id: Jk(),
    hash: sh({ query: e, variables: t, headers: n }),
    title: e && d1(e) || Xk,
    query: e,
    variables: t,
    headers: n,
    operationName: null,
    response: null
  };
}
fe(Yk, "createTab");
function Kk(e, t) {
  return {
    ...e,
    tabs: e.tabs.map((n, r) => {
      if (r !== e.activeTabIndex)
        return n;
      const o = { ...n, ...t };
      return {
        ...o,
        hash: sh(o),
        title: o.operationName || (o.query ? d1(o.query) : void 0) || Xk
      };
    })
  };
}
fe(Kk, "setPropertiesInActiveTab");
function Jk() {
  const e = /* @__PURE__ */ fe(() => Math.floor((1 + Math.random()) * 65536).toString(16).slice(1), "s4");
  return `${e()}${e()}-${e()}-${e()}-${e()}-${e()}${e()}${e()}`;
}
fe(Jk, "guid");
function sh(e) {
  return [e.query ?? "", e.variables ?? "", e.headers ?? ""].join("|");
}
fe(sh, "hashFromTabContents");
function d1(e) {
  const t = /^(?!#).*(query|subscription|mutation)\s+([a-zA-Z0-9_]+)/m.exec(e);
  return (t == null ? void 0 : t[2]) ?? null;
}
fe(d1, "fuzzyExtractOperationName");
function T6(e) {
  const t = e == null ? void 0 : e.get(ah);
  if (t) {
    const n = JSON.parse(t);
    e == null || e.set(
      ah,
      JSON.stringify(
        n,
        (r, o) => r === "headers" ? null : o
      )
    );
  }
}
fe(T6, "clearHeadersFromTabs");
const Xk = "<untitled>", ah = "tabState";
function Gl({
  editorTheme: e = a1,
  keyMap: t = l1,
  onClickReference: n,
  onEdit: r,
  readOnly: o = !1
} = {}, i) {
  const { initialVariables: s, variableEditor: l, setVariableEditor: c } = Zn({
    nonNull: !0,
    caller: i || Gl
  }), f = Vf(), d = Tc({ caller: i || Gl }), g = Uf({ caller: i || Gl }), m = k.useRef(null), v = k.useRef();
  return k.useEffect(() => {
    let b = !0;
    return jf([
      Promise.resolve().then(() => nje),
      Promise.resolve().then(() => oje),
      Promise.resolve().then(() => cje)
    ]).then((w) => {
      if (!b)
        return;
      v.current = w;
      const _ = m.current;
      if (!_)
        return;
      const S = w(_, {
        value: s,
        lineNumbers: !0,
        tabSize: 2,
        mode: "graphql-variables",
        theme: e,
        autoCloseBrackets: !0,
        matchBrackets: !0,
        showCursorWhenSelecting: !0,
        readOnly: o ? "nocursor" : !1,
        foldGutter: !0,
        lint: {
          // @ts-expect-error
          variableToType: void 0
        },
        hintOptions: {
          closeOnUnfocus: !1,
          completeSingle: !1,
          container: _,
          // @ts-expect-error
          variableToType: void 0
        },
        gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"],
        extraKeys: c1
      });
      S.addKeyMap({
        "Cmd-Space"() {
          S.showHint({ completeSingle: !1, container: _ });
        },
        "Ctrl-Space"() {
          S.showHint({ completeSingle: !1, container: _ });
        },
        "Alt-Space"() {
          S.showHint({ completeSingle: !1, container: _ });
        },
        "Shift-Space"() {
          S.showHint({ completeSingle: !1, container: _ });
        }
      }), S.on("keyup", (x, C) => {
        const { code: E, key: N, shiftKey: I } = C, D = E.startsWith("Key"), A = !I && E.startsWith("Digit");
        (D || A || N === "_" || N === '"') && x.execCommand("autocomplete");
      }), c(S);
    }), () => {
      b = !1;
    };
  }, [e, s, o, c]), qh(l, "keyMap", t), Wk(
    l,
    r,
    C6,
    "variables",
    Gl
  ), Gk(l, n || null, Gl), Si(l, ["Cmd-Enter", "Ctrl-Enter"], f == null ? void 0 : f.run), Si(l, ["Shift-Ctrl-P"], g), Si(l, ["Shift-Ctrl-M"], d), m;
}
fe(Gl, "useVariableEditor");
const C6 = "variables", k6 = cl("EditorContext");
function _6(e) {
  const t = fl(), [n, r] = k.useState(
    null
  ), [o, i] = k.useState(null), [s, l] = k.useState(
    null
  ), [c, f] = k.useState(
    null
  ), [d, g] = k.useState(
    () => {
      const Q = (t == null ? void 0 : t.get(Lw)) !== null;
      return e.shouldPersistHeaders !== !1 && Q ? (t == null ? void 0 : t.get(Lw)) === "true" : !!e.shouldPersistHeaders;
    }
  );
  Wd(n, e.headers), Wd(o, e.query), Wd(s, e.response), Wd(c, e.variables);
  const m = x6({
    storage: t,
    shouldPersistHeaders: d
  }), [v] = k.useState(() => {
    const Q = e.query ?? (t == null ? void 0 : t.get(g6)) ?? null, Y = e.variables ?? (t == null ? void 0 : t.get(C6)) ?? null, K = e.headers ?? (t == null ? void 0 : t.get(av)) ?? null, Z = e.response ?? "", re = v6({
      query: Q,
      variables: Y,
      headers: K,
      defaultTabs: e.defaultTabs,
      defaultQuery: e.defaultQuery || W$e,
      defaultHeaders: e.defaultHeaders,
      storage: t,
      shouldPersistHeaders: d
    });
    return m(re), {
      query: Q ?? (re.activeTabIndex === 0 ? re.tabs[0].query : null) ?? "",
      variables: Y ?? "",
      headers: K ?? e.defaultHeaders ?? "",
      response: Z,
      tabState: re
    };
  }), [b, w] = k.useState(v.tabState), _ = k.useCallback(
    (Q) => {
      if (Q) {
        t == null || t.set(av, (n == null ? void 0 : n.getValue()) ?? "");
        const Y = Qk(b, !0);
        t == null || t.set(ah, Y);
      } else
        t == null || t.set(av, ""), T6(t);
      g(Q), t == null || t.set(Lw, Q.toString());
    },
    [t, b, n]
  ), S = k.useRef();
  k.useEffect(() => {
    const Q = !!e.shouldPersistHeaders;
    (S == null ? void 0 : S.current) !== Q && (_(Q), S.current = Q);
  }, [e.shouldPersistHeaders, _]);
  const x = w6({
    queryEditor: o,
    variableEditor: c,
    headerEditor: n,
    responseEditor: s
  }), C = S6({
    queryEditor: o,
    variableEditor: c,
    headerEditor: n,
    responseEditor: s
  }), { onTabChange: E, defaultHeaders: N, children: I } = e, D = k.useCallback(() => {
    w((Q) => {
      const Y = x(Q), K = {
        tabs: [...Y.tabs, Yk({ headers: N })],
        activeTabIndex: Y.tabs.length
      };
      return m(K), C(K.tabs[K.activeTabIndex]), E == null || E(K), K;
    });
  }, [
    N,
    E,
    C,
    m,
    x
  ]), A = k.useCallback(
    (Q) => {
      w((Y) => {
        const K = {
          ...Y,
          activeTabIndex: Q
        };
        return m(K), C(K.tabs[K.activeTabIndex]), E == null || E(K), K;
      });
    },
    [E, C, m]
  ), F = k.useCallback(
    (Q) => {
      w((Y) => {
        const K = Y.tabs[Y.activeTabIndex], Z = {
          tabs: Q,
          activeTabIndex: Q.indexOf(K)
        };
        return m(Z), C(Z.tabs[Z.activeTabIndex]), E == null || E(Z), Z;
      });
    },
    [E, C, m]
  ), $ = k.useCallback(
    (Q) => {
      w((Y) => {
        const K = {
          tabs: Y.tabs.filter((Z, re) => Q !== re),
          activeTabIndex: Math.max(Y.activeTabIndex - 1, 0)
        };
        return m(K), C(K.tabs[K.activeTabIndex]), E == null || E(K), K;
      });
    },
    [E, C, m]
  ), q = k.useCallback(
    (Q) => {
      w((Y) => {
        const K = Kk(Y, Q);
        return m(K), E == null || E(K), K;
      });
    },
    [E, m]
  ), { onEditOperationName: H } = e, z = k.useCallback(
    (Q) => {
      o && (o.operationName = Q, q({ operationName: Q }), H == null || H(Q));
    },
    [H, o, q]
  ), B = k.useMemo(() => {
    const Q = /* @__PURE__ */ new Map();
    if (Array.isArray(e.externalFragments))
      for (const Y of e.externalFragments)
        Q.set(Y.name.value, Y);
    else if (typeof e.externalFragments == "string")
      pn(fr(e.externalFragments, {}), {
        FragmentDefinition(Y) {
          Q.set(Y.name.value, Y);
        }
      });
    else if (e.externalFragments)
      throw new Error(
        "The `externalFragments` prop must either be a string that contains the fragment definitions in SDL or a list of FragmentDefinitionNode objects."
      );
    return Q;
  }, [e.externalFragments]), R = k.useMemo(
    () => e.validationRules || [],
    [e.validationRules]
  ), te = k.useMemo(
    () => ({
      ...b,
      addTab: D,
      changeTab: A,
      moveTab: F,
      closeTab: $,
      updateActiveTabValues: q,
      headerEditor: n,
      queryEditor: o,
      responseEditor: s,
      variableEditor: c,
      setHeaderEditor: r,
      setQueryEditor: i,
      setResponseEditor: l,
      setVariableEditor: f,
      setOperationName: z,
      initialQuery: v.query,
      initialVariables: v.variables,
      initialHeaders: v.headers,
      initialResponse: v.response,
      externalFragments: B,
      validationRules: R,
      shouldPersistHeaders: d,
      setShouldPersistHeaders: _
    }),
    [
      b,
      D,
      A,
      F,
      $,
      q,
      n,
      o,
      s,
      c,
      z,
      v,
      B,
      R,
      d,
      _
    ]
  );
  return /* @__PURE__ */ W.jsx(k6.Provider, { value: te, children: I });
}
fe(_6, "EditorContextProvider");
const Zn = ul(k6), Lw = "shouldPersistHeaders", W$e = `# Welcome to GraphiQL
#
# GraphiQL is an in-browser tool for writing, validating, and
# testing GraphQL queries.
#
# Type queries into this side of the screen, and you will see intelligent
# typeaheads aware of the current GraphQL type schema and live syntax and
# validation errors highlighted within the text.
#
# GraphQL queries typically start with a "{" character. Lines that start
# with a # are ignored.
#
# An example GraphQL query might look like:
#
#     {
#       field(arg: "value") {
#         subField
#       }
#     }
#
# Keyboard shortcuts:
#
#   Prettify query:  Shift-Ctrl-P (or press the prettify button)
#
#  Merge fragments:  Shift-Ctrl-M (or press the merge button)
#
#        Run Query:  Ctrl-Enter (or press the play button)
#
#    Auto Complete:  Ctrl-Space (or just start typing)
#

`;
function D0({ isHidden: e, ...t }) {
  const { headerEditor: n } = Zn({
    nonNull: !0,
    caller: D0
  }), r = Qu(t, D0);
  return k.useEffect(() => {
    e || n == null || n.refresh();
  }, [n, e]), /* @__PURE__ */ W.jsx("div", { className: Xn("graphiql-editor", e && "hidden"), ref: r });
}
fe(D0, "HeaderEditor");
function I0(e) {
  var t;
  const [n, r] = k.useState({
    width: null,
    height: null
  }), [o, i] = k.useState(null), s = k.useRef(null), l = (t = Zk(e.token)) == null ? void 0 : t.href;
  k.useEffect(() => {
    if (s.current) {
      if (!l) {
        r({ width: null, height: null }), i(null);
        return;
      }
      fetch(l, { method: "HEAD" }).then((f) => {
        i(f.headers.get("Content-Type"));
      }).catch(() => {
        i(null);
      });
    }
  }, [l]);
  const c = n.width !== null && n.height !== null ? /* @__PURE__ */ W.jsxs("div", { children: [
    n.width,
    "x",
    n.height,
    o === null ? null : " " + o
  ] }) : null;
  return /* @__PURE__ */ W.jsxs("div", { children: [
    /* @__PURE__ */ W.jsx(
      "img",
      {
        onLoad: () => {
          var f, d;
          r({
            width: ((f = s.current) == null ? void 0 : f.naturalWidth) ?? null,
            height: ((d = s.current) == null ? void 0 : d.naturalHeight) ?? null
          });
        },
        ref: s,
        src: l
      }
    ),
    c
  ] });
}
fe(I0, "ImagePreview");
I0.shouldRender = /* @__PURE__ */ fe(function(e) {
  const t = Zk(e);
  return t ? N6(t) : !1;
}, "shouldRender");
function Zk(e) {
  if (e.type !== "string")
    return;
  const t = e.string.slice(1).slice(0, -1).trim();
  try {
    const { location: n } = window;
    return new URL(t, n.protocol + "//" + n.host);
  } catch {
    return;
  }
}
fe(Zk, "tokenToURL");
function N6(e) {
  return /(bmp|gif|jpeg|jpg|png|svg)$/.test(e.pathname);
}
fe(N6, "isImageURL");
function e_(e) {
  const t = Ca(e, e_);
  return /* @__PURE__ */ W.jsx("div", { className: "graphiql-editor", ref: t });
}
fe(e_, "QueryEditor");
function L0({
  responseTooltip: e,
  editorTheme: t = a1,
  keyMap: n = l1
} = {}, r) {
  const { fetchError: o, validationErrors: i } = Ri({
    nonNull: !0,
    caller: r || L0
  }), { initialResponse: s, responseEditor: l, setResponseEditor: c } = Zn({
    nonNull: !0,
    caller: r || L0
  }), f = k.useRef(null), d = k.useRef(
    e
  );
  return k.useEffect(() => {
    d.current = e;
  }, [e]), k.useEffect(() => {
    let g = !0;
    return jf(
      [
        Promise.resolve().then(() => j8).then((m) => m.f),
        Promise.resolve().then(() => M8).then((m) => m.b),
        Promise.resolve().then(() => G8).then((m) => m.d),
        Promise.resolve().then(() => sV).then((m) => m.s),
        Promise.resolve().then(() => H8).then((m) => m.s),
        Promise.resolve().then(() => K8).then((m) => m.j),
        // @ts-expect-error
        Promise.resolve().then(() => Z8).then((m) => m.s),
        Promise.resolve().then(() => dje),
        Promise.resolve().then(() => q9e)
      ],
      { useCommonAddons: !1 }
    ).then((m) => {
      if (!g)
        return;
      const v = document.createElement("div");
      m.registerHelper(
        "info",
        "graphql-results",
        (_, S, x, C) => {
          const E = [], N = d.current;
          return N && E.push(
            /* @__PURE__ */ W.jsx(N, { pos: C, token: _ })
          ), I0.shouldRender(_) && E.push(
            /* @__PURE__ */ W.jsx(I0, { token: _ }, "image-preview")
          ), E.length ? (jv.render(E, v), v) : (jv.unmountComponentAtNode(v), null);
        }
      );
      const b = f.current;
      if (!b)
        return;
      const w = m(b, {
        value: s,
        lineWrapping: !0,
        readOnly: !0,
        theme: t,
        mode: "graphql-results",
        foldGutter: !0,
        gutters: ["CodeMirror-foldgutter"],
        // @ts-expect-error
        info: !0,
        extraKeys: c1
      });
      c(w);
    }), () => {
      g = !1;
    };
  }, [t, s, c]), qh(l, "keyMap", n), k.useEffect(() => {
    o && (l == null || l.setValue(o)), i.length > 0 && (l == null || l.setValue(jp(i)));
  }, [l, o, i]), f;
}
fe(L0, "useResponseEditor");
function t_(e) {
  const t = L0(e, t_);
  return /* @__PURE__ */ W.jsx(
    "section",
    {
      className: "result-window",
      "aria-label": "Result Window",
      "aria-live": "polite",
      "aria-atomic": "true",
      ref: t
    }
  );
}
fe(t_, "ResponseEditor");
function R0({ isHidden: e, ...t }) {
  const { variableEditor: n } = Zn({
    nonNull: !0,
    caller: R0
  }), r = Gl(t, R0);
  return k.useEffect(() => {
    n && !e && n.refresh();
  }, [n, e]), /* @__PURE__ */ W.jsx("div", { className: Xn("graphiql-editor", e && "hidden"), ref: r });
}
fe(R0, "VariableEditor");
function n_({
  children: e,
  dangerouslyAssumeSchemaIsValid: t,
  defaultQuery: n,
  defaultHeaders: r,
  defaultTabs: o,
  externalFragments: i,
  fetcher: s,
  getDefaultFieldNames: l,
  headers: c,
  inputValueDeprecation: f,
  introspectionQueryName: d,
  maxHistoryLength: g,
  onEditOperationName: m,
  onSchemaChange: v,
  onTabChange: b,
  onTogglePluginVisibility: w,
  operationName: _,
  plugins: S,
  query: x,
  response: C,
  schema: E,
  schemaDescription: N,
  shouldPersistHeaders: I,
  storage: D,
  validationRules: A,
  variables: F,
  visiblePlugin: $
}) {
  return /* @__PURE__ */ W.jsx(D4, { storage: D, children: /* @__PURE__ */ W.jsx(B4, { maxHistoryLength: g, children: /* @__PURE__ */ W.jsx(
    _6,
    {
      defaultQuery: n,
      defaultHeaders: r,
      defaultTabs: o,
      externalFragments: i,
      headers: c,
      onEditOperationName: m,
      onTabChange: b,
      query: x,
      response: C,
      shouldPersistHeaders: I,
      validationRules: A,
      variables: F,
      children: /* @__PURE__ */ W.jsx(
        Bk,
        {
          dangerouslyAssumeSchemaIsValid: t,
          fetcher: s,
          inputValueDeprecation: f,
          introspectionQueryName: d,
          onSchemaChange: v,
          schema: E,
          schemaDescription: N,
          children: /* @__PURE__ */ W.jsx(
            k0,
            {
              getDefaultFieldNames: l,
              fetcher: s,
              operationName: _,
              children: /* @__PURE__ */ W.jsx(qk, { children: /* @__PURE__ */ W.jsx(
                c6,
                {
                  onTogglePluginVisibility: w,
                  plugins: S,
                  visiblePlugin: $,
                  children: e
                }
              ) })
            }
          )
        }
      )
    }
  ) }) });
}
fe(n_, "GraphiQLProvider");
function O6() {
  const e = fl(), [t, n] = k.useState(() => {
    if (!e)
      return null;
    const o = e.get(Rw);
    switch (o) {
      case "light":
        return "light";
      case "dark":
        return "dark";
      default:
        return typeof o == "string" && e.set(Rw, ""), null;
    }
  });
  k.useLayoutEffect(() => {
    typeof window > "u" || (document.body.classList.remove("graphiql-light", "graphiql-dark"), t && document.body.classList.add(`graphiql-${t}`));
  }, [t]);
  const r = k.useCallback(
    (o) => {
      e == null || e.set(Rw, o || ""), n(o);
    },
    [e]
  );
  return k.useMemo(() => ({ theme: t, setTheme: r }), [t, r]);
}
fe(O6, "useTheme");
const Rw = "theme";
function lv({
  defaultSizeRelation: e = G$e,
  direction: t,
  initiallyHidden: n,
  onHiddenElementChange: r,
  sizeThresholdFirst: o = 100,
  sizeThresholdSecond: i = 100,
  storageKey: s
}) {
  const l = fl(), c = k.useMemo(
    () => Sc(500, (x) => {
      s && (l == null || l.set(s, x));
    }),
    [l, s]
  ), [f, d] = k.useState(
    () => {
      const x = s && (l == null ? void 0 : l.get(s));
      return x === Rg || n === "first" ? "first" : x === Fg || n === "second" ? "second" : null;
    }
  ), g = k.useCallback(
    (x) => {
      x !== f && (d(x), r == null || r(x));
    },
    [f, r]
  ), m = k.useRef(null), v = k.useRef(null), b = k.useRef(null), w = k.useRef(`${e}`);
  k.useLayoutEffect(() => {
    const x = s && (l == null ? void 0 : l.get(s)) || w.current;
    m.current && (m.current.style.display = "flex", m.current.style.flex = x === Rg || x === Fg ? w.current : x), b.current && (b.current.style.display = "flex", b.current.style.flex = "1"), v.current && (v.current.style.display = "flex");
  }, [t, l, s]);
  const _ = k.useCallback((x) => {
    const C = x === "first" ? m.current : b.current;
    if (C && (C.style.left = "-1000px", C.style.position = "absolute", C.style.opacity = "0", C.style.height = "500px", C.style.width = "500px", m.current)) {
      const E = parseFloat(m.current.style.flex);
      (!Number.isFinite(E) || E < 1) && (m.current.style.flex = "1");
    }
  }, []), S = k.useCallback(
    (x) => {
      const C = x === "first" ? m.current : b.current;
      if (C && (C.style.width = "", C.style.height = "", C.style.opacity = "", C.style.position = "", C.style.left = "", l && s)) {
        const E = l.get(s);
        m.current && E !== Rg && E !== Fg && (m.current.style.flex = E || w.current);
      }
    },
    [l, s]
  );
  return k.useLayoutEffect(() => {
    f === "first" ? _("first") : S("first"), f === "second" ? _("second") : S("second");
  }, [f, _, S]), k.useEffect(() => {
    if (!v.current || !m.current || !b.current)
      return;
    const x = v.current, C = m.current, E = C.parentElement, N = t === "horizontal" ? "clientX" : "clientY", I = t === "horizontal" ? "left" : "top", D = t === "horizontal" ? "right" : "bottom", A = t === "horizontal" ? "clientWidth" : "clientHeight";
    function F(q) {
      q.preventDefault();
      const H = q[N] - x.getBoundingClientRect()[I];
      function z(R) {
        if (R.buttons === 0)
          return B();
        const te = R[N] - E.getBoundingClientRect()[I] - H, Q = E.getBoundingClientRect()[D] - R[N] + H - x[A];
        if (te < o)
          g("first"), c(Rg);
        else if (Q < i)
          g("second"), c(Fg);
        else {
          g(null);
          const Y = `${te / Q}`;
          C.style.flex = Y, c(Y);
        }
      }
      fe(z, "handleMouseMove");
      function B() {
        document.removeEventListener("mousemove", z), document.removeEventListener("mouseup", B);
      }
      fe(B, "handleMouseUp"), document.addEventListener("mousemove", z), document.addEventListener("mouseup", B);
    }
    fe(F, "handleMouseDown"), x.addEventListener("mousedown", F);
    function $() {
      m.current && (m.current.style.flex = w.current), c(w.current), g(null);
    }
    return fe($, "reset"), x.addEventListener("dblclick", $), () => {
      x.removeEventListener("mousedown", F), x.removeEventListener("dblclick", $);
    };
  }, [
    t,
    g,
    o,
    i,
    c
  ]), k.useMemo(
    () => ({
      dragBarRef: v,
      hiddenElement: f,
      firstRef: m,
      setHiddenElement: d,
      secondRef: b
    }),
    [f, d]
  );
}
fe(lv, "useDragResize");
const G$e = 1, Rg = "hide-first", Fg = "hide-second", cv = k.forwardRef(({ label: e, onClick: t, ...n }, r) => {
  const [o, i] = k.useState(null), s = k.useCallback(
    (l) => {
      try {
        t == null || t(l), i(null);
      } catch (c) {
        i(
          c instanceof Error ? c : new Error(`Toolbar button click failed: ${c}`)
        );
      }
    },
    [t]
  );
  return /* @__PURE__ */ W.jsx(Sr, { label: e, children: /* @__PURE__ */ W.jsx(
    $n,
    {
      ...n,
      ref: r,
      type: "button",
      className: Xn(
        "graphiql-toolbar-button",
        o && "error",
        n.className
      ),
      onClick: s,
      "aria-label": o ? o.message : e,
      "aria-invalid": o ? "true" : n["aria-invalid"]
    }
  ) });
});
cv.displayName = "ToolbarButton";
function F0() {
  const { queryEditor: e, setOperationName: t } = Zn({
    nonNull: !0,
    caller: F0
  }), { isFetching: n, isSubscribed: r, operationName: o, run: i, stop: s } = Vf({
    nonNull: !0,
    caller: F0
  }), l = (e == null ? void 0 : e.operations) || [], c = l.length > 1 && typeof o != "string", f = n || r, d = `${f ? "Stop" : "Execute"} query (Ctrl-Enter)`, g = {
    type: "button",
    className: "graphiql-execute-button",
    children: f ? /* @__PURE__ */ W.jsx(R$e, {}) : /* @__PURE__ */ W.jsx(k$e, {}),
    "aria-label": d
  };
  return c && !f ? /* @__PURE__ */ W.jsxs(Ra, { children: [
    /* @__PURE__ */ W.jsx(Sr, { label: d, children: /* @__PURE__ */ W.jsx(Ra.Button, { ...g }) }),
    /* @__PURE__ */ W.jsx(Ra.Content, { children: l.map((m, v) => {
      const b = m.name ? m.name.value : `<Unnamed ${m.operation}>`;
      return /* @__PURE__ */ W.jsx(
        Ra.Item,
        {
          onSelect: () => {
            var w;
            const _ = (w = m.name) == null ? void 0 : w.value;
            e && _ && _ !== e.operationName && t(_), i();
          },
          children: b
        },
        `${b}-${v}`
      );
    }) })
  ] }) : /* @__PURE__ */ W.jsx(Sr, { label: d, children: /* @__PURE__ */ W.jsx(
    "button",
    {
      ...g,
      onClick: () => {
        f ? s() : i();
      }
    }
  ) });
}
fe(F0, "ExecuteButton");
const Q$e = /* @__PURE__ */ fe(({
  button: e,
  children: t,
  label: n,
  ...r
}) => /* @__PURE__ */ W.jsxs(Ra, { ...r, children: [
  /* @__PURE__ */ W.jsx(Sr, { label: n, children: /* @__PURE__ */ W.jsx(
    Ra.Button,
    {
      className: Xn(
        "graphiql-un-styled graphiql-toolbar-menu",
        r.className
      ),
      "aria-label": n,
      children: e
    }
  ) }),
  /* @__PURE__ */ W.jsx(Ra.Content, { children: t })
] }), "ToolbarMenuRoot");
Bh(Q$e, {
  Item: Ra.Item
});
var p1 = {}, h1 = {};
const Y$e = /* @__PURE__ */ HV(QB);
Object.defineProperty(h1, "__esModule", {
  value: !0
});
var K$e = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
  return typeof e;
} : function(e) {
  return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
}, $L = /* @__PURE__ */ function() {
  function e(t, n) {
    var r = [], o = !0, i = !1, s = void 0;
    try {
      for (var l = t[Symbol.iterator](), c; !(o = (c = l.next()).done) && (r.push(c.value), !(n && r.length === n)); o = !0)
        ;
    } catch (f) {
      i = !0, s = f;
    } finally {
      try {
        !o && l.return && l.return();
      } finally {
        if (i)
          throw s;
      }
    }
    return r;
  }
  return function(t, n) {
    if (Array.isArray(t))
      return t;
    if (Symbol.iterator in Object(t))
      return e(t, n);
    throw new TypeError("Invalid attempt to destructure non-iterable instance");
  };
}(), Tt = 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;
}, Fi = /* @__PURE__ */ function() {
  function e(t, n) {
    for (var r = 0; r < n.length; r++) {
      var o = n[r];
      o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(t, o.key, o);
    }
  }
  return function(t, n, r) {
    return n && e(t.prototype, n), r && e(t, r), t;
  };
}();
h1.defaultValue = r_;
var J$e = k, Ee = X$e(J$e), rt = Y$e;
function X$e(e) {
  if (e && e.__esModule)
    return e;
  var t = {};
  if (e != null)
    for (var n in e)
      Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]);
  return t.default = e, t;
}
function VL(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
function Qo(e) {
  if (Array.isArray(e)) {
    for (var t = 0, n = Array(e.length); t < e.length; t++)
      n[t] = e[t];
    return n;
  } else
    return Array.from(e);
}
function Mi(e, t) {
  if (!(e instanceof t))
    throw new TypeError("Cannot call a class as a function");
}
function Sn(e, t) {
  if (!e)
    throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  return t && (typeof t == "object" || typeof t == "function") ? t : e;
}
function Pi(e, t) {
  if (typeof t != "function" && t !== null)
    throw new TypeError("Super expression must either be null or a function, not " + typeof t);
  e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);
}
function GS(e) {
  return e.charAt(0).toUpperCase() + e.slice(1);
}
var Z$e = {
  keyword: "#B11A04",
  // OperationName, FragmentName
  def: "#D2054E",
  // FieldName
  property: "#1F61A0",
  // FieldAlias
  qualifier: "#1C92A9",
  // ArgumentName and ObjectFieldName
  attribute: "#8B2BB9",
  number: "#2882F9",
  string: "#D64292",
  // Boolean
  builtin: "#D47509",
  // Enum
  string2: "#0B7FC7",
  variable: "#397D13",
  // Type
  atom: "#CA9800"
}, e4e = Ee.createElement(
  "svg",
  { width: "12", height: "9" },
  Ee.createElement("path", { fill: "#666", d: "M 0 2 L 9 2 L 4.5 7.5 z" })
), t4e = Ee.createElement(
  "svg",
  { width: "12", height: "9" },
  Ee.createElement("path", { fill: "#666", d: "M 0 0 L 0 9 L 5.5 4.5 z" })
), n4e = Ee.createElement(
  "svg",
  {
    style: { marginRight: "3px", marginLeft: "-3px" },
    width: "12",
    height: "12",
    viewBox: "0 0 18 18",
    fill: "none",
    xmlns: "http://www.w3.org/2000/svg"
  },
  Ee.createElement("path", {
    d: "M16 0H2C0.9 0 0 0.9 0 2V16C0 17.1 0.9 18 2 18H16C17.1 18 18 17.1 18 16V2C18 0.9 17.1 0 16 0ZM16 16H2V2H16V16ZM14.99 6L13.58 4.58L6.99 11.17L4.41 8.6L2.99 10.01L6.99 14L14.99 6Z",
    fill: "#666"
  })
), r4e = Ee.createElement(
  "svg",
  {
    style: { marginRight: "3px", marginLeft: "-3px" },
    width: "12",
    height: "12",
    viewBox: "0 0 18 18",
    fill: "none",
    xmlns: "http://www.w3.org/2000/svg"
  },
  Ee.createElement("path", {
    d: "M16 2V16H2V2H16ZM16 0H2C0.9 0 0 0.9 0 2V16C0 17.1 0.9 18 2 18H16C17.1 18 18 17.1 18 16V2C18 0.9 17.1 0 16 0Z",
    fill: "#CCC"
  })
);
function m1(e) {
  return e.checked ? e.styleConfig.checkboxChecked : e.styleConfig.checkboxUnchecked;
}
function A6(e) {
  var t = e.getFields();
  if (t.id) {
    var n = ["id"];
    return t.email ? n.push("email") : t.name && n.push("name"), n;
  }
  if (t.edges)
    return ["edges"];
  if (t.node)
    return ["node"];
  if (t.nodes)
    return ["nodes"];
  var r = [];
  return Object.keys(t).forEach(function(o) {
    (0, rt.isLeafType)(t[o].type) && r.push(o);
  }), r.length ? r.slice(0, 2) : ["__typename"];
}
function D6(e) {
  return (0, rt.isNonNullType)(e.type) && e.defaultValue === void 0;
}
function o4e(e) {
  for (var t = e; (0, rt.isWrappingType)(t); )
    t = t.ofType;
  return t;
}
function Ja(e) {
  for (var t = e; (0, rt.isWrappingType)(t); )
    t = t.ofType;
  return t;
}
function I6(e, t) {
  if (typeof t != "string" && t.kind === "VariableDefinition")
    return t.variable;
  if ((0, rt.isScalarType)(e))
    try {
      switch (e.name) {
        case "String":
          return {
            kind: "StringValue",
            value: String(e.parseValue(t))
          };
        case "Float":
          return {
            kind: "FloatValue",
            value: String(e.parseValue(parseFloat(t)))
          };
        case "Int":
          return {
            kind: "IntValue",
            value: String(e.parseValue(parseInt(t, 10)))
          };
        case "Boolean":
          try {
            var n = JSON.parse(t);
            return typeof n == "boolean" ? { kind: "BooleanValue", value: n } : { kind: "BooleanValue", value: !1 };
          } catch {
            return {
              kind: "BooleanValue",
              value: !1
            };
          }
        default:
          return {
            kind: "StringValue",
            value: String(e.parseValue(t))
          };
      }
    } catch (o) {
      return console.error("error coercing arg value", o, t), { kind: "StringValue", value: t };
    }
  else
    try {
      var r = e.parseValue(t);
      return r ? { kind: "EnumValue", value: String(r) } : { kind: "EnumValue", value: e.getValues()[0].name };
    } catch {
      return { kind: "EnumValue", value: e.getValues()[0].name };
    }
}
var i4e = function(e) {
  Pi(t, e);
  function t() {
    var n, r, o, i;
    Mi(this, t);
    for (var s = arguments.length, l = Array(s), c = 0; c < s; c++)
      l[c] = arguments[c];
    return i = (r = (o = Sn(this, (n = t.__proto__ || Object.getPrototypeOf(t)).call.apply(n, [this].concat(l))), o), o._getArgSelection = function() {
      return o.props.selection.fields.find(function(f) {
        return f.name.value === o.props.arg.name;
      });
    }, o._removeArg = function() {
      var f = o.props.selection, d = o._getArgSelection();
      o._previousArgSelection = d, o.props.modifyFields(f.fields.filter(function(g) {
        return g !== d;
      }), !0);
    }, o._addArg = function() {
      var f = o.props, d = f.selection, g = f.arg, m = f.getDefaultScalarArgValue, v = f.parentField, b = f.makeDefaultArg, w = Ja(g.type), _ = null;
      if (o._previousArgSelection)
        _ = o._previousArgSelection;
      else if ((0, rt.isInputObjectType)(w)) {
        var S = w.getFields();
        _ = {
          kind: "ObjectField",
          name: { kind: "Name", value: g.name },
          value: {
            kind: "ObjectValue",
            fields: g1(m, b, v, Object.keys(S).map(function(x) {
              return S[x];
            }))
          }
        };
      } else
        (0, rt.isLeafType)(w) && (_ = {
          kind: "ObjectField",
          name: { kind: "Name", value: g.name },
          value: m(v, g, w)
        });
      if (!_)
        console.error("Unable to add arg for argType", w);
      else
        return o.props.modifyFields([].concat(Qo(d.fields || []), [_]), !0);
    }, o._setArgValue = function(f, d) {
      var g = !1, m = !1, v = !1;
      try {
        f.kind === "VariableDefinition" ? m = !0 : f === null || typeof f > "u" ? g = !0 : typeof f.kind == "string" && (v = !0);
      } catch {
      }
      var b = o.props.selection, w = o._getArgSelection();
      if (!w) {
        console.error("missing arg selection when setting arg value");
        return;
      }
      var _ = Ja(o.props.arg.type), S = (0, rt.isLeafType)(_) || m || g || v;
      if (!S) {
        console.warn("Unable to handle non leaf types in InputArgView.setArgValue", f);
        return;
      }
      var x = void 0, C = void 0;
      f === null || typeof f > "u" ? C = null : !f.target && f.kind && f.kind === "VariableDefinition" ? (x = f, C = x.variable) : typeof f.kind == "string" ? C = f : f.target && typeof f.target.value == "string" && (x = f.target.value, C = I6(_, x));
      var E = o.props.modifyFields((b.fields || []).map(function(N) {
        var I = N === w, D = I ? Tt({}, N, {
          value: C
        }) : N;
        return D;
      }), d);
      return E;
    }, o._modifyChildFields = function(f) {
      return o.props.modifyFields(o.props.selection.fields.map(function(d) {
        return d.name.value === o.props.arg.name ? Tt({}, d, {
          value: {
            kind: "ObjectValue",
            fields: f
          }
        }) : d;
      }), !0);
    }, r), Sn(o, i);
  }
  return Fi(t, [{
    key: "render",
    value: function() {
      var r = this.props, o = r.arg, i = r.parentField, s = this._getArgSelection();
      return Ee.createElement(R6, {
        argValue: s ? s.value : null,
        arg: o,
        parentField: i,
        addArg: this._addArg,
        removeArg: this._removeArg,
        setArgFields: this._modifyChildFields,
        setArgValue: this._setArgValue,
        getDefaultScalarArgValue: this.props.getDefaultScalarArgValue,
        makeDefaultArg: this.props.makeDefaultArg,
        onRunOperation: this.props.onRunOperation,
        styleConfig: this.props.styleConfig,
        onCommit: this.props.onCommit,
        definition: this.props.definition
      });
    }
  }]), t;
}(Ee.PureComponent);
function r_(e) {
  if ((0, rt.isEnumType)(e))
    return { kind: "EnumValue", value: e.getValues()[0].name };
  switch (e.name) {
    case "String":
      return { kind: "StringValue", value: "" };
    case "Float":
      return { kind: "FloatValue", value: "1.5" };
    case "Int":
      return { kind: "IntValue", value: "10" };
    case "Boolean":
      return { kind: "BooleanValue", value: !1 };
    default:
      return { kind: "StringValue", value: "" };
  }
}
function L6(e, t, n) {
  return r_(n);
}
var s4e = function(e) {
  Pi(t, e);
  function t() {
    var n, r, o, i;
    Mi(this, t);
    for (var s = arguments.length, l = Array(s), c = 0; c < s; c++)
      l[c] = arguments[c];
    return i = (r = (o = Sn(this, (n = t.__proto__ || Object.getPrototypeOf(t)).call.apply(n, [this].concat(l))), o), o._getArgSelection = function() {
      var f = o.props.selection;
      return (f.arguments || []).find(function(d) {
        return d.name.value === o.props.arg.name;
      });
    }, o._removeArg = function(f) {
      var d = o.props.selection, g = o._getArgSelection();
      return o._previousArgSelection = g, o.props.modifyArguments((d.arguments || []).filter(function(m) {
        return m !== g;
      }), f);
    }, o._addArg = function(f) {
      var d = o.props, g = d.selection, m = d.getDefaultScalarArgValue, v = d.makeDefaultArg, b = d.parentField, w = d.arg, _ = Ja(w.type), S = null;
      if (o._previousArgSelection)
        S = o._previousArgSelection;
      else if ((0, rt.isInputObjectType)(_)) {
        var x = _.getFields();
        S = {
          kind: "Argument",
          name: { kind: "Name", value: w.name },
          value: {
            kind: "ObjectValue",
            fields: g1(m, v, b, Object.keys(x).map(function(C) {
              return x[C];
            }))
          }
        };
      } else
        (0, rt.isLeafType)(_) && (S = {
          kind: "Argument",
          name: { kind: "Name", value: w.name },
          value: m(b, w, _)
        });
      return S ? o.props.modifyArguments([].concat(Qo(g.arguments || []), [S]), f) : (console.error("Unable to add arg for argType", _), null);
    }, o._setArgValue = function(f, d) {
      var g = !1, m = !1, v = !1;
      try {
        f.kind === "VariableDefinition" ? m = !0 : f === null || typeof f > "u" ? g = !0 : typeof f.kind == "string" && (v = !0);
      } catch {
      }
      var b = o.props.selection, w = o._getArgSelection();
      if (!w && !m) {
        console.error("missing arg selection when setting arg value");
        return;
      }
      var _ = Ja(o.props.arg.type), S = (0, rt.isLeafType)(_) || m || g || v;
      if (!S) {
        console.warn("Unable to handle non leaf types in ArgView._setArgValue");
        return;
      }
      var x = void 0, C = void 0;
      return f === null || typeof f > "u" ? C = null : f.target && typeof f.target.value == "string" ? (x = f.target.value, C = I6(_, x)) : !f.target && f.kind === "VariableDefinition" ? (x = f, C = x.variable) : typeof f.kind == "string" && (C = f), o.props.modifyArguments((b.arguments || []).map(function(E) {
        return E === w ? Tt({}, E, {
          value: C
        }) : E;
      }), d);
    }, o._setArgFields = function(f, d) {
      var g = o.props.selection, m = o._getArgSelection();
      if (!m) {
        console.error("missing arg selection when setting arg value");
        return;
      }
      return o.props.modifyArguments((g.arguments || []).map(function(v) {
        return v === m ? Tt({}, v, {
          value: {
            kind: "ObjectValue",
            fields: f
          }
        }) : v;
      }), d);
    }, r), Sn(o, i);
  }
  return Fi(t, [{
    key: "render",
    value: function() {
      var r = this.props, o = r.arg, i = r.parentField, s = this._getArgSelection();
      return Ee.createElement(R6, {
        argValue: s ? s.value : null,
        arg: o,
        parentField: i,
        addArg: this._addArg,
        removeArg: this._removeArg,
        setArgFields: this._setArgFields,
        setArgValue: this._setArgValue,
        getDefaultScalarArgValue: this.props.getDefaultScalarArgValue,
        makeDefaultArg: this.props.makeDefaultArg,
        onRunOperation: this.props.onRunOperation,
        styleConfig: this.props.styleConfig,
        onCommit: this.props.onCommit,
        definition: this.props.definition
      });
    }
  }]), t;
}(Ee.PureComponent);
function a4e(e) {
  return e.ctrlKey && e.key === "Enter";
}
function l4e(e) {
  return e !== "FragmentDefinition";
}
var c4e = function(e) {
  Pi(t, e);
  function t() {
    var n, r, o, i;
    Mi(this, t);
    for (var s = arguments.length, l = Array(s), c = 0; c < s; c++)
      l[c] = arguments[c];
    return i = (r = (o = Sn(this, (n = t.__proto__ || Object.getPrototypeOf(t)).call.apply(n, [this].concat(l))), o), o._handleChange = function(f) {
      o.props.setArgValue(f, !0);
    }, r), Sn(o, i);
  }
  return Fi(t, [{
    key: "componentDidMount",
    value: function() {
      var r = this._ref, o = document.activeElement;
      r && o && !(o instanceof HTMLTextAreaElement) && (r.focus(), r.setSelectionRange(0, r.value.length));
    }
  }, {
    key: "render",
    value: function() {
      var r = this, o = this.props, i = o.arg, s = o.argValue, l = o.styleConfig, c = Ja(i.type), f = typeof s.value == "string" ? s.value : "", d = this.props.argValue.kind === "StringValue" ? l.colors.string : l.colors.number;
      return Ee.createElement(
        "span",
        { style: { color: d } },
        c.name === "String" ? '"' : "",
        Ee.createElement("input", {
          style: {
            border: "none",
            borderBottom: "1px solid #888",
            outline: "none",
            width: Math.max(1, Math.min(15, f.length)) + "ch",
            color: d
          },
          ref: function(m) {
            r._ref = m;
          },
          type: "text",
          onChange: this._handleChange,
          value: f
        }),
        c.name === "String" ? '"' : ""
      );
    }
  }]), t;
}(Ee.PureComponent), R6 = function(e) {
  Pi(t, e);
  function t() {
    var n, r, o, i;
    Mi(this, t);
    for (var s = arguments.length, l = Array(s), c = 0; c < s; c++)
      l[c] = arguments[c];
    return i = (r = (o = Sn(this, (n = t.__proto__ || Object.getPrototypeOf(t)).call.apply(n, [this].concat(l))), o), o.state = { displayArgActions: !1 }, r), Sn(o, i);
  }
  return Fi(t, [{
    key: "render",
    value: function() {
      var r = this, o = this.props, i = o.argValue, s = o.arg, l = o.styleConfig, c = Ja(s.type), f = null;
      if (i) {
        if (i.kind === "Variable")
          f = Ee.createElement(
            "span",
            { style: { color: l.colors.variable } },
            "$",
            i.name.value
          );
        else if ((0, rt.isScalarType)(c))
          c.name === "Boolean" ? f = Ee.createElement(
            "select",
            {
              style: {
                color: l.colors.builtin
              },
              onChange: this.props.setArgValue,
              value: i.kind === "BooleanValue" ? i.value : void 0
            },
            Ee.createElement(
              "option",
              { key: "true", value: "true" },
              "true"
            ),
            Ee.createElement(
              "option",
              { key: "false", value: "false" },
              "false"
            )
          ) : f = Ee.createElement(c4e, {
            setArgValue: this.props.setArgValue,
            arg: s,
            argValue: i,
            onRunOperation: this.props.onRunOperation,
            styleConfig: this.props.styleConfig
          });
        else if ((0, rt.isEnumType)(c))
          i.kind === "EnumValue" ? f = Ee.createElement(
            "select",
            {
              style: {
                backgroundColor: "white",
                color: l.colors.string2
              },
              onChange: this.props.setArgValue,
              value: i.value
            },
            c.getValues().map(function(w) {
              return Ee.createElement(
                "option",
                { key: w.name, value: w.name },
                w.name
              );
            })
          ) : console.error("arg mismatch between arg and selection", c, i);
        else if ((0, rt.isInputObjectType)(c))
          if (i.kind === "ObjectValue") {
            var d = c.getFields();
            f = Ee.createElement(
              "div",
              { style: { marginLeft: 16 } },
              Object.keys(d).sort().map(function(w) {
                return Ee.createElement(i4e, {
                  key: w,
                  arg: d[w],
                  parentField: r.props.parentField,
                  selection: i,
                  modifyFields: r.props.setArgFields,
                  getDefaultScalarArgValue: r.props.getDefaultScalarArgValue,
                  makeDefaultArg: r.props.makeDefaultArg,
                  onRunOperation: r.props.onRunOperation,
                  styleConfig: r.props.styleConfig,
                  onCommit: r.props.onCommit,
                  definition: r.props.definition
                });
              })
            );
          } else
            console.error("arg mismatch between arg and selection", c, i);
      }
      var g = function() {
        var _ = s.name, S = (r.props.definition.variableDefinitions || []).filter(function(Z) {
          return Z.variable.name.value.startsWith(_);
        }).length, x = void 0;
        S > 0 ? x = "" + _ + S : x = _;
        var C = s.type.toString(), E = (0, rt.parseType)(C), N = {
          kind: "VariableDefinition",
          variable: {
            kind: "Variable",
            name: {
              kind: "Name",
              value: x
            }
          },
          type: E,
          directives: []
        }, I = function(re) {
          return (r.props.definition.variableDefinitions || []).find(function(J) {
            return J.variable.name.value === re;
          });
        }, D = void 0, A = {};
        if (typeof i < "u" && i !== null) {
          var F = (0, rt.visit)(i, {
            Variable: function(re) {
              var J = re.name.value, ie = I(J);
              if (A[J] = A[J] + 1 || 1, !!ie)
                return ie.defaultValue;
            }
          }), $ = N.type.kind === "NonNullType", q = $ ? Tt({}, N, { type: N.type.type }) : N;
          D = Tt({}, q, { defaultValue: F });
        } else
          D = N;
        var H = Object.entries(A).filter(function(Z) {
          var re = $L(Z, 2);
          re[0];
          var J = re[1];
          return J < 2;
        }).map(function(Z) {
          var re = $L(Z, 2), J = re[0];
          return re[1], J;
        });
        if (D) {
          var z = r.props.setArgValue(D, !1);
          if (z) {
            var B = z.definitions.find(function(Z) {
              return Z.operation && Z.name && Z.name.value && r.props.definition.name && r.props.definition.name.value ? Z.name.value === r.props.definition.name.value : !1;
            }), R = [].concat(Qo(B.variableDefinitions || []), [D]).filter(function(Z) {
              return H.indexOf(Z.variable.name.value) === -1;
            }), te = Tt({}, B, {
              variableDefinitions: R
            }), Q = z.definitions, Y = Q.map(function(Z) {
              return B === Z ? te : Z;
            }), K = Tt({}, z, {
              definitions: Y
            });
            r.props.onCommit(K);
          }
        }
      }, m = function() {
        if (!(!i || !i.name || !i.name.value)) {
          var _ = i.name.value, S = (r.props.definition.variableDefinitions || []).find(function(q) {
            return q.variable.name.value === _;
          });
          if (S) {
            var x = S.defaultValue, C = r.props.setArgValue(x, {
              commit: !1
            });
            if (C) {
              var E = C.definitions.find(function(q) {
                return q.name.value === r.props.definition.name.value;
              });
              if (!E)
                return;
              var N = 0;
              (0, rt.visit)(E, {
                Variable: function(H) {
                  H.name.value === _ && (N = N + 1);
                }
              });
              var I = E.variableDefinitions || [];
              N < 2 && (I = I.filter(function(q) {
                return q.variable.name.value !== _;
              }));
              var D = Tt({}, E, {
                variableDefinitions: I
              }), A = C.definitions, F = A.map(function(q) {
                return E === q ? D : q;
              }), $ = Tt({}, C, {
                definitions: F
              });
              r.props.onCommit($);
            }
          }
        }
      }, v = i && i.kind === "Variable", b = this.state.displayArgActions ? Ee.createElement(
        "button",
        {
          type: "submit",
          className: "toolbar-button",
          title: v ? "Remove the variable" : "Extract the current value into a GraphQL variable",
          onClick: function(_) {
            _.preventDefault(), _.stopPropagation(), v ? m() : g();
          },
          style: l.styles.actionButtonStyle
        },
        Ee.createElement(
          "span",
          { style: { color: l.colors.variable } },
          "$"
        )
      ) : null;
      return Ee.createElement(
        "div",
        {
          style: {
            cursor: "pointer",
            minHeight: "16px",
            WebkitUserSelect: "none",
            userSelect: "none"
          },
          "data-arg-name": s.name,
          "data-arg-type": c.name,
          className: "graphiql-explorer-" + s.name
        },
        Ee.createElement(
          "span",
          {
            style: { cursor: "pointer" },
            onClick: function(_) {
              var S = !i;
              S ? r.props.addArg(!0) : r.props.removeArg(!0), r.setState({ displayArgActions: S });
            }
          },
          (0, rt.isInputObjectType)(c) ? Ee.createElement(
            "span",
            null,
            i ? this.props.styleConfig.arrowOpen : this.props.styleConfig.arrowClosed
          ) : Ee.createElement(m1, {
            checked: !!i,
            styleConfig: this.props.styleConfig
          }),
          Ee.createElement(
            "span",
            {
              style: { color: l.colors.attribute },
              title: s.description,
              onMouseEnter: function() {
                i !== null && typeof i < "u" && r.setState({ displayArgActions: !0 });
              },
              onMouseLeave: function() {
                return r.setState({ displayArgActions: !1 });
              }
            },
            s.name,
            D6(s) ? "*" : "",
            ": ",
            b,
            " "
          ),
          " "
        ),
        f || Ee.createElement("span", null),
        " "
      );
    }
  }]), t;
}(Ee.PureComponent), u4e = function(e) {
  Pi(t, e);
  function t() {
    var n, r, o, i;
    Mi(this, t);
    for (var s = arguments.length, l = Array(s), c = 0; c < s; c++)
      l[c] = arguments[c];
    return i = (r = (o = Sn(this, (n = t.__proto__ || Object.getPrototypeOf(t)).call.apply(n, [this].concat(l))), o), o._addFragment = function() {
      o.props.modifySelections([].concat(Qo(o.props.selections), [o._previousSelection || {
        kind: "InlineFragment",
        typeCondition: {
          kind: "NamedType",
          name: { kind: "Name", value: o.props.implementingType.name }
        },
        selectionSet: {
          kind: "SelectionSet",
          selections: o.props.getDefaultFieldNames(o.props.implementingType).map(function(f) {
            return {
              kind: "Field",
              name: { kind: "Name", value: f }
            };
          })
        }
      }]));
    }, o._removeFragment = function() {
      var f = o._getSelection();
      o._previousSelection = f, o.props.modifySelections(o.props.selections.filter(function(d) {
        return d !== f;
      }));
    }, o._getSelection = function() {
      var f = o.props.selections.find(function(d) {
        return d.kind === "InlineFragment" && d.typeCondition && o.props.implementingType.name === d.typeCondition.name.value;
      });
      if (!f)
        return null;
      if (f.kind === "InlineFragment")
        return f;
    }, o._modifyChildSelections = function(f, d) {
      var g = o._getSelection();
      return o.props.modifySelections(o.props.selections.map(function(m) {
        return m === g ? {
          directives: m.directives,
          kind: "InlineFragment",
          typeCondition: {
            kind: "NamedType",
            name: { kind: "Name", value: o.props.implementingType.name }
          },
          selectionSet: {
            kind: "SelectionSet",
            selections: f
          }
        } : m;
      }), d);
    }, r), Sn(o, i);
  }
  return Fi(t, [{
    key: "render",
    value: function() {
      var r = this, o = this.props, i = o.implementingType, s = o.schema, l = o.getDefaultFieldNames, c = o.styleConfig, f = this._getSelection(), d = i.getFields(), g = f ? f.selectionSet ? f.selectionSet.selections : [] : [];
      return Ee.createElement(
        "div",
        { className: "graphiql-explorer-" + i.name },
        Ee.createElement(
          "span",
          {
            style: { cursor: "pointer" },
            onClick: f ? this._removeFragment : this._addFragment
          },
          Ee.createElement(m1, {
            checked: !!f,
            styleConfig: this.props.styleConfig
          }),
          Ee.createElement(
            "span",
            { style: { color: c.colors.atom } },
            this.props.implementingType.name
          )
        ),
        f ? Ee.createElement(
          "div",
          { style: { marginLeft: 16 } },
          Object.keys(d).sort().map(function(m) {
            return Ee.createElement(F6, {
              key: m,
              field: d[m],
              selections: g,
              modifySelections: r._modifyChildSelections,
              schema: s,
              getDefaultFieldNames: l,
              getDefaultScalarArgValue: r.props.getDefaultScalarArgValue,
              makeDefaultArg: r.props.makeDefaultArg,
              onRunOperation: r.props.onRunOperation,
              onCommit: r.props.onCommit,
              styleConfig: r.props.styleConfig,
              definition: r.props.definition,
              availableFragments: r.props.availableFragments
            });
          })
        ) : null
      );
    }
  }]), t;
}(Ee.PureComponent), f4e = function(e) {
  Pi(t, e);
  function t() {
    var n, r, o, i;
    Mi(this, t);
    for (var s = arguments.length, l = Array(s), c = 0; c < s; c++)
      l[c] = arguments[c];
    return i = (r = (o = Sn(this, (n = t.__proto__ || Object.getPrototypeOf(t)).call.apply(n, [this].concat(l))), o), o._addFragment = function() {
      o.props.modifySelections([].concat(Qo(o.props.selections), [o._previousSelection || {
        kind: "FragmentSpread",
        name: o.props.fragment.name
      }]));
    }, o._removeFragment = function() {
      var f = o._getSelection();
      o._previousSelection = f, o.props.modifySelections(o.props.selections.filter(function(d) {
        var g = d.kind === "FragmentSpread" && d.name.value === o.props.fragment.name.value;
        return !g;
      }));
    }, o._getSelection = function() {
      var f = o.props.selections.find(function(d) {
        return d.kind === "FragmentSpread" && d.name.value === o.props.fragment.name.value;
      });
      return f;
    }, r), Sn(o, i);
  }
  return Fi(t, [{
    key: "render",
    value: function() {
      var r = this.props.styleConfig, o = this._getSelection();
      return Ee.createElement(
        "div",
        { className: "graphiql-explorer-" + this.props.fragment.name.value },
        Ee.createElement(
          "span",
          {
            style: { cursor: "pointer" },
            onClick: o ? this._removeFragment : this._addFragment
          },
          Ee.createElement(m1, {
            checked: !!o,
            styleConfig: this.props.styleConfig
          }),
          Ee.createElement(
            "span",
            {
              style: { color: r.colors.def },
              className: "graphiql-explorer-" + this.props.fragment.name.value
            },
            this.props.fragment.name.value
          )
        )
      );
    }
  }]), t;
}(Ee.PureComponent);
function g1(e, t, n, r) {
  var o = [], i = !0, s = !1, l = void 0;
  try {
    for (var c = r[Symbol.iterator](), f; !(i = (f = c.next()).done); i = !0) {
      var d = f.value;
      if ((0, rt.isRequiredInputField)(d) || t && t(n, d)) {
        var g = Ja(d.type);
        (0, rt.isInputObjectType)(g) ? function() {
          var m = g.getFields();
          o.push({
            kind: "ObjectField",
            name: { kind: "Name", value: d.name },
            value: {
              kind: "ObjectValue",
              fields: g1(e, t, n, Object.keys(m).map(function(v) {
                return m[v];
              }))
            }
          });
        }() : (0, rt.isLeafType)(g) && o.push({
          kind: "ObjectField",
          name: { kind: "Name", value: d.name },
          value: e(n, d, g)
        });
      }
    }
  } catch (m) {
    s = !0, l = m;
  } finally {
    try {
      !i && c.return && c.return();
    } finally {
      if (s)
        throw l;
    }
  }
  return o;
}
function jL(e, t, n) {
  var r = [], o = !0, i = !1, s = void 0;
  try {
    for (var l = n.args[Symbol.iterator](), c; !(o = (c = l.next()).done); o = !0) {
      var f = c.value;
      if (D6(f) || t && t(n, f)) {
        var d = Ja(f.type);
        (0, rt.isInputObjectType)(d) ? function() {
          var g = d.getFields();
          r.push({
            kind: "Argument",
            name: { kind: "Name", value: f.name },
            value: {
              kind: "ObjectValue",
              fields: g1(e, t, n, Object.keys(g).map(function(m) {
                return g[m];
              }))
            }
          });
        }() : (0, rt.isLeafType)(d) && r.push({
          kind: "Argument",
          name: { kind: "Name", value: f.name },
          value: e(n, f, d)
        });
      }
    }
  } catch (g) {
    i = !0, s = g;
  } finally {
    try {
      !o && l.return && l.return();
    } finally {
      if (i)
        throw s;
    }
  }
  return r;
}
var F6 = function(e) {
  Pi(t, e);
  function t() {
    var n, r, o, i;
    Mi(this, t);
    for (var s = arguments.length, l = Array(s), c = 0; c < s; c++)
      l[c] = arguments[c];
    return i = (r = (o = Sn(this, (n = t.__proto__ || Object.getPrototypeOf(t)).call.apply(n, [this].concat(l))), o), o.state = { displayFieldActions: !1 }, o._addAllFieldsToSelections = function(f) {
      var d = f ? Object.keys(f).map(function(v) {
        return {
          kind: "Field",
          name: { kind: "Name", value: v },
          arguments: []
        };
      }) : [], g = {
        kind: "SelectionSet",
        selections: d
      }, m = [].concat(Qo(o.props.selections.filter(function(v) {
        return v.kind === "InlineFragment" ? !0 : v.name.value !== o.props.field.name;
      })), [{
        kind: "Field",
        name: { kind: "Name", value: o.props.field.name },
        arguments: jL(o.props.getDefaultScalarArgValue, o.props.makeDefaultArg, o.props.field),
        selectionSet: g
      }]);
      o.props.modifySelections(m);
    }, o._addFieldToSelections = function(f) {
      var d = [].concat(Qo(o.props.selections), [o._previousSelection || {
        kind: "Field",
        name: { kind: "Name", value: o.props.field.name },
        arguments: jL(o.props.getDefaultScalarArgValue, o.props.makeDefaultArg, o.props.field)
      }]);
      o.props.modifySelections(d);
    }, o._handleUpdateSelections = function(f) {
      var d = o._getSelection();
      if (d && !f.altKey)
        o._removeFieldFromSelections();
      else {
        var g = (0, rt.getNamedType)(o.props.field.type), m = (0, rt.isObjectType)(g) && g.getFields(), v = !!m && f.altKey;
        v ? o._addAllFieldsToSelections(m) : o._addFieldToSelections(m);
      }
    }, o._removeFieldFromSelections = function() {
      var f = o._getSelection();
      o._previousSelection = f, o.props.modifySelections(o.props.selections.filter(function(d) {
        return d !== f;
      }));
    }, o._getSelection = function() {
      var f = o.props.selections.find(function(d) {
        return d.kind === "Field" && o.props.field.name === d.name.value;
      });
      if (!f)
        return null;
      if (f.kind === "Field")
        return f;
    }, o._setArguments = function(f, d) {
      var g = o._getSelection();
      if (!g) {
        console.error("Missing selection when setting arguments", f);
        return;
      }
      return o.props.modifySelections(o.props.selections.map(function(m) {
        return m === g ? {
          alias: g.alias,
          arguments: f,
          directives: g.directives,
          kind: "Field",
          name: g.name,
          selectionSet: g.selectionSet
        } : m;
      }), d);
    }, o._modifyChildSelections = function(f, d) {
      return o.props.modifySelections(o.props.selections.map(function(g) {
        if (g.kind === "Field" && o.props.field.name === g.name.value) {
          if (g.kind !== "Field")
            throw new Error("invalid selection");
          return {
            alias: g.alias,
            arguments: g.arguments,
            directives: g.directives,
            kind: "Field",
            name: g.name,
            selectionSet: {
              kind: "SelectionSet",
              selections: f
            }
          };
        }
        return g;
      }), d);
    }, r), Sn(o, i);
  }
  return Fi(t, [{
    key: "render",
    value: function() {
      var r = this, o = this.props, i = o.field, s = o.schema, l = o.getDefaultFieldNames, c = o.styleConfig, f = this._getSelection(), d = o4e(i.type), g = i.args.sort(function(S, x) {
        return S.name.localeCompare(x.name);
      }), m = "graphiql-explorer-node graphiql-explorer-" + i.name;
      i.isDeprecated && (m += " graphiql-explorer-deprecated");
      var v = (0, rt.isObjectType)(d) || (0, rt.isInterfaceType)(d) || (0, rt.isUnionType)(d) ? this.props.availableFragments && this.props.availableFragments[d.name] : null, b = Ee.createElement(
        "div",
        { className: m },
        Ee.createElement(
          "span",
          {
            title: i.description,
            style: {
              cursor: "pointer",
              display: "inline-flex",
              alignItems: "center",
              minHeight: "16px",
              WebkitUserSelect: "none",
              userSelect: "none"
            },
            "data-field-name": i.name,
            "data-field-type": d.name,
            onClick: this._handleUpdateSelections,
            onMouseEnter: function() {
              var x = (0, rt.isObjectType)(d) && f && f.selectionSet && f.selectionSet.selections.filter(function(C) {
                return C.kind !== "FragmentSpread";
              }).length > 0;
              x && r.setState({ displayFieldActions: !0 });
            },
            onMouseLeave: function() {
              return r.setState({ displayFieldActions: !1 });
            }
          },
          (0, rt.isObjectType)(d) ? Ee.createElement(
            "span",
            null,
            f ? this.props.styleConfig.arrowOpen : this.props.styleConfig.arrowClosed
          ) : null,
          (0, rt.isObjectType)(d) ? null : Ee.createElement(m1, {
            checked: !!f,
            styleConfig: this.props.styleConfig
          }),
          Ee.createElement(
            "span",
            {
              style: { color: c.colors.property },
              className: "graphiql-explorer-field-view"
            },
            i.name
          ),
          this.state.displayFieldActions ? Ee.createElement(
            "button",
            {
              type: "submit",
              className: "toolbar-button",
              title: "Extract selections into a new reusable fragment",
              onClick: function(x) {
                x.preventDefault(), x.stopPropagation();
                var C = d.name, E = C + "Fragment", N = (v || []).filter(function(q) {
                  return q.name.value.startsWith(E);
                }).length;
                N > 0 && (E = "" + E + N);
                var I = f ? f.selectionSet ? f.selectionSet.selections : [] : [], D = [{
                  kind: "FragmentSpread",
                  name: {
                    kind: "Name",
                    value: E
                  },
                  directives: []
                }], A = {
                  kind: "FragmentDefinition",
                  name: {
                    kind: "Name",
                    value: E
                  },
                  typeCondition: {
                    kind: "NamedType",
                    name: {
                      kind: "Name",
                      value: d.name
                    }
                  },
                  directives: [],
                  selectionSet: {
                    kind: "SelectionSet",
                    selections: I
                  }
                }, F = r._modifyChildSelections(D, !1);
                if (F) {
                  var $ = Tt({}, F, {
                    definitions: [].concat(Qo(F.definitions), [A])
                  });
                  r.props.onCommit($);
                } else
                  console.warn("Unable to complete extractFragment operation");
              },
              style: Tt({}, c.styles.actionButtonStyle)
            },
            Ee.createElement(
              "span",
              null,
              "…"
            )
          ) : null
        ),
        f && g.length ? Ee.createElement(
          "div",
          {
            style: { marginLeft: 16 },
            className: "graphiql-explorer-graphql-arguments"
          },
          g.map(function(S) {
            return Ee.createElement(s4e, {
              key: S.name,
              parentField: i,
              arg: S,
              selection: f,
              modifyArguments: r._setArguments,
              getDefaultScalarArgValue: r.props.getDefaultScalarArgValue,
              makeDefaultArg: r.props.makeDefaultArg,
              onRunOperation: r.props.onRunOperation,
              styleConfig: r.props.styleConfig,
              onCommit: r.props.onCommit,
              definition: r.props.definition
            });
          })
        ) : null
      );
      if (f && ((0, rt.isObjectType)(d) || (0, rt.isInterfaceType)(d) || (0, rt.isUnionType)(d))) {
        var w = (0, rt.isUnionType)(d) ? {} : d.getFields(), _ = f ? f.selectionSet ? f.selectionSet.selections : [] : [];
        return Ee.createElement(
          "div",
          { className: "graphiql-explorer-" + i.name },
          b,
          Ee.createElement(
            "div",
            { style: { marginLeft: 16 } },
            v ? v.map(function(S) {
              var x = s.getType(S.typeCondition.name.value), C = S.name.value;
              return x ? Ee.createElement(f4e, {
                key: C,
                fragment: S,
                selections: _,
                modifySelections: r._modifyChildSelections,
                schema: s,
                styleConfig: r.props.styleConfig,
                onCommit: r.props.onCommit
              }) : null;
            }) : null,
            Object.keys(w).sort().map(function(S) {
              return Ee.createElement(t, {
                key: S,
                field: w[S],
                selections: _,
                modifySelections: r._modifyChildSelections,
                schema: s,
                getDefaultFieldNames: l,
                getDefaultScalarArgValue: r.props.getDefaultScalarArgValue,
                makeDefaultArg: r.props.makeDefaultArg,
                onRunOperation: r.props.onRunOperation,
                styleConfig: r.props.styleConfig,
                onCommit: r.props.onCommit,
                definition: r.props.definition,
                availableFragments: r.props.availableFragments
              });
            }),
            (0, rt.isInterfaceType)(d) || (0, rt.isUnionType)(d) ? s.getPossibleTypes(d).map(function(S) {
              return Ee.createElement(u4e, {
                key: S.name,
                implementingType: S,
                selections: _,
                modifySelections: r._modifyChildSelections,
                schema: s,
                getDefaultFieldNames: l,
                getDefaultScalarArgValue: r.props.getDefaultScalarArgValue,
                makeDefaultArg: r.props.makeDefaultArg,
                onRunOperation: r.props.onRunOperation,
                styleConfig: r.props.styleConfig,
                onCommit: r.props.onCommit,
                definition: r.props.definition
              });
            }) : null
          )
        );
      }
      return b;
    }
  }]), t;
}(Ee.PureComponent);
function d4e(e) {
  try {
    return e.trim() ? (0, rt.parse)(
      e,
      // Tell graphql to not bother track locations when parsing, we don't need
      // it and it's a tiny bit more expensive.
      { noLocation: !0 }
    ) : null;
  } catch (t) {
    return new Error(t);
  }
}
var p4e = {
  kind: "OperationDefinition",
  operation: "query",
  variableDefinitions: [],
  name: { kind: "Name", value: "MyQuery" },
  directives: [],
  selectionSet: {
    kind: "SelectionSet",
    selections: []
  }
}, M0 = {
  kind: "Document",
  definitions: [p4e]
}, ku = null;
function h4e(e) {
  if (ku && ku[0] === e)
    return ku[1];
  var t = d4e(e);
  return t ? t instanceof Error ? ku ? ku[1] : M0 : (ku = [e, t], t) : M0;
}
var UL = {
  buttonStyle: {
    fontSize: "1.2em",
    padding: "0px",
    backgroundColor: "white",
    border: "none",
    margin: "5px 0px",
    height: "40px",
    width: "100%",
    display: "block",
    maxWidth: "none"
  },
  actionButtonStyle: {
    padding: "0px",
    backgroundColor: "white",
    border: "none",
    margin: "0px",
    maxWidth: "none",
    height: "15px",
    width: "15px",
    display: "inline-block",
    fontSize: "smaller"
  },
  explorerActionsStyle: {
    margin: "4px -8px -8px",
    paddingLeft: "8px",
    bottom: "0px",
    width: "100%",
    textAlign: "center",
    background: "none",
    borderTop: "none",
    borderBottom: "none"
  }
}, m4e = function(e) {
  Pi(t, e);
  function t() {
    var n, r, o, i;
    Mi(this, t);
    for (var s = arguments.length, l = Array(s), c = 0; c < s; c++)
      l[c] = arguments[c];
    return i = (r = (o = Sn(this, (n = t.__proto__ || Object.getPrototypeOf(t)).call.apply(n, [this].concat(l))), o), o.state = { newOperationType: "query", displayTitleActions: !1 }, o._modifySelections = function(f, d) {
      var g = o.props.definition;
      g.selectionSet.selections.length === 0 && o._previousOperationDef && (g = o._previousOperationDef);
      var m = void 0;
      if (g.kind === "FragmentDefinition")
        m = Tt({}, g, {
          selectionSet: Tt({}, g.selectionSet, {
            selections: f
          })
        });
      else if (g.kind === "OperationDefinition") {
        var v = f.filter(function(b) {
          return !(b.kind === "Field" && b.name.value === "__typename");
        });
        v.length === 0 && (v = [{
          kind: "Field",
          name: {
            kind: "Name",
            value: "__typename ## Placeholder value"
          }
        }]), m = Tt({}, g, {
          selectionSet: Tt({}, g.selectionSet, {
            selections: v
          })
        });
      }
      return o.props.onEdit(m, d);
    }, o._onOperationRename = function(f) {
      return o.props.onOperationRename(f.target.value);
    }, o._handlePotentialRun = function(f) {
      a4e(f) && l4e(o.props.definition.kind) && o.props.onRunOperation(o.props.name);
    }, o._rootViewElId = function() {
      var f = o.props, d = f.operationType, g = f.name, m = d + "-" + (g || "unknown");
      return m;
    }, r), Sn(o, i);
  }
  return Fi(t, [{
    key: "componentDidMount",
    value: function() {
      var r = this._rootViewElId();
      this.props.onMount(r);
    }
  }, {
    key: "render",
    value: function() {
      var r = this, o = this.props, i = o.operationType, s = o.definition, l = o.schema, c = o.getDefaultFieldNames, f = o.styleConfig, d = this._rootViewElId(), g = this.props.fields || {}, m = s, v = m.selectionSet.selections, b = this.props.name || GS(i) + " Name";
      return Ee.createElement(
        "div",
        {
          id: d,
          tabIndex: "0",
          onKeyDown: this._handlePotentialRun,
          style: {
            // The actions bar has its own top border
            borderBottom: this.props.isLast ? "none" : "1px solid #d6d6d6",
            marginBottom: "0em",
            paddingBottom: "1em"
          }
        },
        Ee.createElement(
          "div",
          {
            style: { color: f.colors.keyword, paddingBottom: 4 },
            className: "graphiql-operation-title-bar",
            onMouseEnter: function() {
              return r.setState({ displayTitleActions: !0 });
            },
            onMouseLeave: function() {
              return r.setState({ displayTitleActions: !1 });
            }
          },
          i,
          " ",
          Ee.createElement(
            "span",
            { style: { color: f.colors.def } },
            Ee.createElement("input", {
              style: {
                color: f.colors.def,
                border: "none",
                borderBottom: "1px solid #888",
                outline: "none",
                width: Math.max(4, b.length) + "ch"
              },
              autoComplete: "false",
              placeholder: GS(i) + " Name",
              value: this.props.name,
              onKeyDown: this._handlePotentialRun,
              onChange: this._onOperationRename
            })
          ),
          this.props.onTypeName ? Ee.createElement(
            "span",
            null,
            Ee.createElement("br", null),
            "on " + this.props.onTypeName
          ) : "",
          this.state.displayTitleActions ? Ee.createElement(
            Ee.Fragment,
            null,
            Ee.createElement(
              "button",
              {
                type: "submit",
                className: "toolbar-button",
                onClick: function() {
                  return r.props.onOperationDestroy();
                },
                style: Tt({}, f.styles.actionButtonStyle)
              },
              Ee.createElement(
                "span",
                null,
                "✕"
              )
            ),
            Ee.createElement(
              "button",
              {
                type: "submit",
                className: "toolbar-button",
                onClick: function() {
                  return r.props.onOperationClone();
                },
                style: Tt({}, f.styles.actionButtonStyle)
              },
              Ee.createElement(
                "span",
                null,
                "⎘"
              )
            )
          ) : ""
        ),
        Object.keys(g).sort().map(function(w) {
          return Ee.createElement(F6, {
            key: w,
            field: g[w],
            selections: v,
            modifySelections: r._modifySelections,
            schema: l,
            getDefaultFieldNames: c,
            getDefaultScalarArgValue: r.props.getDefaultScalarArgValue,
            makeDefaultArg: r.props.makeDefaultArg,
            onRunOperation: r.props.onRunOperation,
            styleConfig: r.props.styleConfig,
            onCommit: r.props.onCommit,
            definition: r.props.definition,
            availableFragments: r.props.availableFragments
          });
        })
      );
    }
  }]), t;
}(Ee.PureComponent);
function g4e() {
  return Ee.createElement(
    "div",
    {
      style: {
        fontFamily: "sans-serif",
        display: "flex",
        flexDirection: "column",
        alignItems: "center",
        margin: "1em",
        marginTop: 0,
        flexGrow: 1,
        justifyContent: "flex-end"
      }
    },
    Ee.createElement(
      "div",
      {
        style: {
          borderTop: "1px solid #d6d6d6",
          paddingTop: "1em",
          width: "100%",
          textAlign: "center"
        }
      },
      "GraphiQL Explorer by ",
      Ee.createElement(
        "a",
        { href: "https://www.onegraph.com" },
        "OneGraph"
      )
    ),
    Ee.createElement(
      "div",
      null,
      "Contribute on",
      " ",
      Ee.createElement(
        "a",
        { href: "https://github.com/OneGraph/graphiql-explorer" },
        "GitHub"
      )
    )
  );
}
var M6 = function(e) {
  Pi(t, e);
  function t() {
    var n, r, o, i;
    Mi(this, t);
    for (var s = arguments.length, l = Array(s), c = 0; c < s; c++)
      l[c] = arguments[c];
    return i = (r = (o = Sn(this, (n = t.__proto__ || Object.getPrototypeOf(t)).call.apply(n, [this].concat(l))), o), o.state = {
      newOperationType: "query",
      operation: null,
      operationToScrollTo: null
    }, o._resetScroll = function() {
      var f = o._ref;
      f && (f.scrollLeft = 0);
    }, o._onEdit = function(f) {
      return o.props.onEdit(f);
    }, o._setAddOperationType = function(f) {
      o.setState({ newOperationType: f });
    }, o._handleRootViewMount = function(f) {
      if (o.state.operationToScrollTo && o.state.operationToScrollTo === f) {
        var d = ".graphiql-explorer-root #" + f, g = document.querySelector(d);
        g && g.scrollIntoView();
      }
    }, r), Sn(o, i);
  }
  return Fi(t, [{
    key: "componentDidMount",
    value: function() {
      this._resetScroll();
    }
  }, {
    key: "render",
    value: function() {
      var r = this, o = this.props, i = o.schema, s = o.query, l = o.makeDefaultArg;
      if (!i)
        return Ee.createElement(
          "div",
          { style: { fontFamily: "sans-serif" }, className: "error-container" },
          "No Schema Available"
        );
      var c = {
        colors: this.props.colors || Z$e,
        checkboxChecked: this.props.checkboxChecked || n4e,
        checkboxUnchecked: this.props.checkboxUnchecked || r4e,
        arrowClosed: this.props.arrowClosed || t4e,
        arrowOpen: this.props.arrowOpen || e4e,
        styles: this.props.styles ? Tt({}, UL, this.props.styles) : UL
      }, f = i.getQueryType(), d = i.getMutationType(), g = i.getSubscriptionType();
      if (!f && !d && !g)
        return Ee.createElement(
          "div",
          null,
          "Missing query type"
        );
      var m = f && f.getFields(), v = d && d.getFields(), b = g && g.getFields(), w = h4e(s), _ = this.props.getDefaultFieldNames || A6, S = this.props.getDefaultScalarArgValue || L6, x = w.definitions, C = x.map(function(R) {
        return R.kind === "FragmentDefinition" || R.kind === "OperationDefinition" ? R : null;
      }).filter(Boolean), E = (
        // If we don't have any relevant definitions from the parsed document,
        // then at least show an expanded Query selection
        C.length === 0 ? M0.definitions : C
      ), N = function(te, Q) {
        var Y = Q == null || Q === "" ? null : { kind: "Name", value: Q, loc: void 0 }, K = Tt({}, te, { name: Y }), Z = w.definitions, re = Z.map(function(J) {
          return te === J ? K : J;
        });
        return Tt({}, w, {
          definitions: re
        });
      }, I = function(te) {
        var Q = void 0;
        te.kind === "FragmentDefinition" ? Q = "fragment" : Q = te.operation;
        var Y = (te.name && te.name.value || "") + "Copy", K = {
          kind: "Name",
          value: Y,
          loc: void 0
        }, Z = Tt({}, te, { name: K }), re = w.definitions, J = [].concat(Qo(re), [Z]);
        return r.setState({ operationToScrollTo: Q + "-" + Y }), Tt({}, w, {
          definitions: J
        });
      }, D = function(te) {
        var Q = w.definitions, Y = Q.filter(function(K) {
          return te !== K;
        });
        return Tt({}, w, {
          definitions: Y
        });
      }, A = function(te) {
        var Q = w.definitions, Y = w.definitions.length === 1 && w.definitions[0] === M0.definitions[0], K = Y ? [] : Q.filter(function(le) {
          return le.kind === "OperationDefinition" ? le.operation === te : !1;
        }), Z = "My" + GS(te) + (K.length === 0 ? "" : K.length + 1), re = "__typename # Placeholder value", J = {
          kind: "SelectionSet",
          selections: [{
            kind: "Field",
            name: {
              kind: "Name",
              value: re,
              loc: null
            },
            arguments: [],
            directives: [],
            selectionSet: null,
            loc: null
          }],
          loc: null
        }, ie = {
          kind: "OperationDefinition",
          operation: te,
          name: { kind: "Name", value: Z },
          variableDefinitions: [],
          directives: [],
          selectionSet: J,
          loc: null
        }, ne = (
          // If we only have our default operation in the document right now, then
          // just replace it with our new definition
          Y ? [ie] : [].concat(Qo(w.definitions), [ie])
        ), ae = Tt({}, w, {
          definitions: ne
        });
        r.setState({ operationToScrollTo: te + "-" + Z }), r.props.onEdit((0, rt.print)(ae));
      }, F = [m ? Ee.createElement(
        "option",
        {
          key: "query",
          className: "toolbar-button",
          style: c.styles.buttonStyle,
          type: "link",
          value: "query"
        },
        "Query"
      ) : null, v ? Ee.createElement(
        "option",
        {
          key: "mutation",
          className: "toolbar-button",
          style: c.styles.buttonStyle,
          type: "link",
          value: "mutation"
        },
        "Mutation"
      ) : null, b ? Ee.createElement(
        "option",
        {
          key: "subscription",
          className: "toolbar-button",
          style: c.styles.buttonStyle,
          type: "link",
          value: "subscription"
        },
        "Subscription"
      ) : null].filter(Boolean), $ = F.length === 0 || this.props.hideActions ? null : Ee.createElement(
        "div",
        {
          style: {
            minHeight: "50px",
            maxHeight: "50px",
            overflow: "none"
          }
        },
        Ee.createElement(
          "form",
          {
            className: "variable-editor-title graphiql-explorer-actions",
            style: Tt({}, c.styles.explorerActionsStyle, {
              display: "flex",
              flexDirection: "row",
              alignItems: "center",
              borderTop: "1px solid rgb(214, 214, 214)"
            }),
            onSubmit: function(te) {
              return te.preventDefault();
            }
          },
          Ee.createElement(
            "span",
            {
              style: {
                display: "inline-block",
                flexGrow: "0",
                textAlign: "right"
              }
            },
            "Add new",
            " "
          ),
          Ee.createElement(
            "select",
            {
              onChange: function(te) {
                return r._setAddOperationType(te.target.value);
              },
              value: this.state.newOperationType,
              style: { flexGrow: "2" }
            },
            F
          ),
          Ee.createElement(
            "button",
            {
              type: "submit",
              className: "toolbar-button",
              onClick: function() {
                return r.state.newOperationType ? A(r.state.newOperationType) : null;
              },
              style: Tt({}, c.styles.buttonStyle, {
                height: "22px",
                width: "22px"
              })
            },
            Ee.createElement(
              "span",
              null,
              "+"
            )
          )
        )
      ), q = this.props.externalFragments && this.props.externalFragments.reduce(function(R, te) {
        if (te.kind === "FragmentDefinition") {
          var Q = te.typeCondition.name.value, Y = R[Q] || [], K = [].concat(Qo(Y), [te]).sort(function(Z, re) {
            return Z.name.value.localeCompare(re.name.value);
          });
          return Tt({}, R, VL({}, Q, K));
        }
        return R;
      }, {}), H = E.reduce(function(R, te) {
        if (te.kind === "FragmentDefinition") {
          var Q = te.typeCondition.name.value, Y = R[Q] || [], K = [].concat(Qo(Y), [te]).sort(function(Z, re) {
            return Z.name.value.localeCompare(re.name.value);
          });
          return Tt({}, R, VL({}, Q, K));
        }
        return R;
      }, {}), z = Tt({}, H, q), B = this.props.showAttribution ? Ee.createElement(g4e, null) : null;
      return Ee.createElement(
        "div",
        {
          ref: function(te) {
            r._ref = te;
          },
          style: {
            fontSize: 12,
            textOverflow: "ellipsis",
            whiteSpace: "nowrap",
            margin: 0,
            padding: 8,
            fontFamily: 'Consolas, Inconsolata, "Droid Sans Mono", Monaco, monospace',
            display: "flex",
            flexDirection: "column",
            height: "100%"
          },
          className: "graphiql-explorer-root"
        },
        Ee.createElement(
          "div",
          {
            style: {
              flexGrow: "1",
              overflow: "scroll"
            }
          },
          E.map(function(R, te) {
            var Q = R && R.name && R.name.value, Y = R.kind === "FragmentDefinition" ? "fragment" : R && R.operation || "query", K = function(xe) {
              var ge = N(R, xe);
              r.props.onEdit((0, rt.print)(ge));
            }, Z = function() {
              var xe = I(R);
              r.props.onEdit((0, rt.print)(xe));
            }, re = function() {
              var xe = D(R);
              r.props.onEdit((0, rt.print)(xe));
            }, J = R.kind === "FragmentDefinition" && R.typeCondition.kind === "NamedType" && i.getType(R.typeCondition.name.value), ie = J instanceof rt.GraphQLObjectType ? J.getFields() : null, ne = Y === "query" ? m : Y === "mutation" ? v : Y === "subscription" ? b : R.kind === "FragmentDefinition" ? ie : null, ae = R.kind === "FragmentDefinition" ? R.typeCondition.name.value : null, le = function(xe) {
              var ge = (0, rt.print)(xe);
              r.props.onEdit(ge);
            };
            return Ee.createElement(m4e, {
              key: te,
              isLast: te === E.length - 1,
              fields: ne,
              operationType: Y,
              name: Q,
              definition: R,
              onOperationRename: K,
              onOperationDestroy: re,
              onOperationClone: Z,
              onTypeName: ae,
              onMount: r._handleRootViewMount,
              onCommit: le,
              onEdit: function(xe, ge) {
                var qe = void 0;
                if ((typeof ge > "u" ? "undefined" : K$e(ge)) === "object" && typeof ge.commit < "u" ? qe = ge.commit : qe = !0, xe) {
                  var Ie = Tt({}, w, {
                    definitions: w.definitions.map(function(Oe) {
                      return Oe === R ? xe : Oe;
                    })
                  });
                  return qe && le(Ie), Ie;
                } else
                  return w;
              },
              schema: i,
              getDefaultFieldNames: _,
              getDefaultScalarArgValue: S,
              makeDefaultArg: l,
              onRunOperation: function() {
                r.props.onRunOperation && r.props.onRunOperation(Q);
              },
              styleConfig: c,
              availableFragments: z
            });
          }),
          B
        ),
        $
      );
    }
  }]), t;
}(Ee.PureComponent);
M6.defaultProps = {
  getDefaultFieldNames: A6,
  getDefaultScalarArgValue: L6
};
var v4e = function(e) {
  Pi(t, e);
  function t() {
    var n, r, o, i;
    Mi(this, t);
    for (var s = arguments.length, l = Array(s), c = 0; c < s; c++)
      l[c] = arguments[c];
    return i = (r = (o = Sn(this, (n = t.__proto__ || Object.getPrototypeOf(t)).call.apply(n, [this].concat(l))), o), o.state = { hasError: !1, error: null, errorInfo: null }, r), Sn(o, i);
  }
  return Fi(t, [{
    key: "componentDidCatch",
    value: function(r, o) {
      this.setState({ hasError: !0, error: r, errorInfo: o }), console.error("Error in component", r, o);
    }
  }, {
    key: "render",
    value: function() {
      return this.state.hasError ? Ee.createElement(
        "div",
        { style: { padding: 18, fontFamily: "sans-serif" } },
        Ee.createElement(
          "div",
          null,
          "Something went wrong"
        ),
        Ee.createElement(
          "details",
          { style: { whiteSpace: "pre-wrap" } },
          this.state.error ? this.state.error.toString() : null,
          Ee.createElement("br", null),
          this.state.errorInfo ? this.state.errorInfo.componentStack : null
        )
      ) : this.props.children;
    }
  }]), t;
}(Ee.Component), o_ = function(e) {
  Pi(t, e);
  function t() {
    return Mi(this, t), Sn(this, (t.__proto__ || Object.getPrototypeOf(t)).apply(this, arguments));
  }
  return Fi(t, [{
    key: "render",
    value: function() {
      return Ee.createElement(
        "div",
        {
          className: "docExplorerWrap",
          style: {
            height: "100%",
            width: this.props.width,
            minWidth: this.props.width,
            zIndex: 7,
            display: this.props.explorerIsOpen ? "flex" : "none",
            flexDirection: "column",
            overflow: "hidden"
          }
        },
        Ee.createElement(
          "div",
          { className: "doc-explorer-title-bar" },
          Ee.createElement(
            "div",
            { className: "doc-explorer-title" },
            this.props.title
          ),
          Ee.createElement(
            "div",
            { className: "doc-explorer-rhs" },
            Ee.createElement(
              "div",
              {
                className: "docExplorerHide",
                onClick: this.props.onToggleExplorer
              },
              "✕"
            )
          )
        ),
        Ee.createElement(
          "div",
          {
            className: "doc-explorer-contents",
            style: {
              padding: "0px",
              /* Unset overflowY since docExplorerWrap sets it and it'll
              cause two scrollbars (one for the container and one for the schema tree) */
              overflowY: "unset"
            }
          },
          Ee.createElement(
            v4e,
            null,
            Ee.createElement(M6, this.props)
          )
        )
      );
    }
  }]), t;
}(Ee.PureComponent);
o_.defaultValue = r_;
o_.defaultProps = {
  width: 320,
  title: "Explorer"
};
h1.default = o_;
Object.defineProperty(p1, "__esModule", {
  value: !0
});
var P6 = p1.Explorer = void 0, y4e = h1, $6 = b4e(y4e);
function b4e(e) {
  return e && e.__esModule ? e : { default: e };
}
P6 = p1.Explorer = $6.default;
p1.default = $6.default;
const E4e = {
  keyword: "hsl(var(--color-primary))",
  def: "hsl(var(--color-tertiary))",
  property: "hsl(var(--color-info))",
  qualifier: "hsl(var(--color-secondary))",
  attribute: "hsl(var(--color-tertiary))",
  number: "hsl(var(--color-success))",
  string: "hsl(var(--color-warning))",
  builtin: "hsl(var(--color-success))",
  string2: "hsl(var(--color-secondary))",
  variable: "hsl(var(--color-secondary))",
  atom: "hsl(var(--color-tertiary))"
}, w4e = /* @__PURE__ */ ce.createElement(
  "svg",
  {
    viewBox: "0 -4 13 15",
    style: {
      color: "hsla(var(--color-neutral), var(--alpha-tertiary, 0.4))",
      marginRight: "var(--px-4)",
      height: "var(--px-16)",
      width: "var(--px-16)"
    }
  },
  /* @__PURE__ */ ce.createElement(
    "path",
    {
      d: "M3.35355 6.85355L6.14645 9.64645C6.34171 9.84171 6.65829 9.84171 6.85355 9.64645L9.64645 6.85355C9.96143 6.53857 9.73835 6 9.29289 6L3.70711 6C3.26165 6 3.03857 6.53857 3.35355 6.85355Z",
      fill: "currentColor"
    }
  )
), x4e = /* @__PURE__ */ ce.createElement(
  "svg",
  {
    viewBox: "0 -2 13 15",
    style: {
      color: "hsla(var(--color-neutral), var(--alpha-tertiary, 0.4))",
      marginRight: "var(--px-4)",
      height: "var(--px-16)",
      width: "var(--px-16)"
    }
  },
  /* @__PURE__ */ ce.createElement(
    "path",
    {
      d: "M6.35355 11.1464L9.14645 8.35355C9.34171 8.15829 9.34171 7.84171 9.14645 7.64645L6.35355 4.85355C6.03857 4.53857 5.5 4.76165 5.5 5.20711V10.7929C5.5 11.2383 6.03857 11.4614 6.35355 11.1464Z",
      fill: "currentColor"
    }
  )
), S4e = /* @__PURE__ */ ce.createElement(
  "svg",
  {
    viewBox: "0 0 15 15",
    style: {
      color: "hsla(var(--color-neutral), var(--alpha-tertiary, 0.4))",
      marginRight: "var(--px-4)",
      height: "var(--px-16)",
      width: "var(--px-16)"
    }
  },
  /* @__PURE__ */ ce.createElement("circle", { cx: "7.5", cy: "7.5", r: "6", stroke: "currentColor", fill: "none" })
), T4e = /* @__PURE__ */ ce.createElement(
  "svg",
  {
    viewBox: "0 0 15 15",
    style: {
      color: "hsl(var(--color-info))",
      marginRight: "var(--px-4)",
      height: "var(--px-16)",
      width: "var(--px-16)"
    }
  },
  /* @__PURE__ */ ce.createElement("circle", { cx: "7.5", cy: "7.5", r: "7.5", fill: "currentColor" }),
  /* @__PURE__ */ ce.createElement(
    "path",
    {
      d: "M4.64641 7.00106L6.8801 9.23256L10.5017 5.61325",
      fill: "none",
      stroke: "white",
      strokeWidth: "1.5"
    }
  )
), C4e = {
  buttonStyle: {
    backgroundColor: "transparent",
    border: "none",
    color: "hsla(var(--color-neutral), var(--alpha-secondary, 0.6))",
    cursor: "pointer",
    fontSize: "1em"
  },
  explorerActionsStyle: {
    padding: "var(--px-8) var(--px-4)"
  },
  actionButtonStyle: {
    backgroundColor: "transparent",
    border: "none",
    color: "hsla(var(--color-neutral), var(--alpha-secondary, 0.6))",
    cursor: "pointer",
    fontSize: "1em"
  }
};
function k4e(e) {
  const { setOperationName: t } = Zn({ nonNull: !0 }), { schema: n } = Ri({ nonNull: !0 }), { run: r } = Vf({ nonNull: !0 }), o = k.useCallback(
    (l) => {
      l && t(l), r();
    },
    [r, t]
  ), [i, s] = f6(
    U$e()
  );
  return /* @__PURE__ */ ce.createElement(
    P6,
    {
      schema: n,
      onRunOperation: o,
      explorerIsOpen: !0,
      colors: E4e,
      arrowOpen: w4e,
      arrowClosed: x4e,
      checkboxUnchecked: S4e,
      checkboxChecked: T4e,
      styles: C4e,
      query: i,
      onEdit: s,
      ...e
    }
  );
}
function _4e(e) {
  return {
    title: "GraphiQL Explorer",
    icon: () => /* @__PURE__ */ ce.createElement("svg", { height: "1em", strokeWidth: "1.5", viewBox: "0 0 24 24", fill: "none" }, /* @__PURE__ */ ce.createElement(
      "path",
      {
        d: "M18 6H20M22 6H20M20 6V4M20 6V8",
        stroke: "currentColor",
        strokeLinecap: "round",
        strokeLinejoin: "round"
      }
    ), /* @__PURE__ */ ce.createElement(
      "path",
      {
        d: "M21.4 20H2.6C2.26863 20 2 19.7314 2 19.4V11H21.4C21.7314 11 22 11.2686 22 11.6V19.4C22 19.7314 21.7314 20 21.4 20Z",
        stroke: "currentColor",
        strokeLinecap: "round",
        strokeLinejoin: "round"
      }
    ), /* @__PURE__ */ ce.createElement(
      "path",
      {
        d: "M2 11V4.6C2 4.26863 2.26863 4 2.6 4H8.77805C8.92127 4 9.05977 4.05124 9.16852 4.14445L12.3315 6.85555C12.4402 6.94876 12.5787 7 12.722 7H14",
        stroke: "currentColor",
        strokeLinecap: "round",
        strokeLinejoin: "round"
      }
    )),
    content: () => /* @__PURE__ */ ce.createElement(k4e, { ...e })
  };
}
var QS = function() {
  return QS = 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;
  }, QS.apply(this, arguments);
}, N4e = function(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;
}, uv = function(e, t) {
  var n = typeof Symbol == "function" && e[Symbol.iterator];
  if (!n)
    return e;
  var r = n.call(e), o, i = [], s;
  try {
    for (; (t === void 0 || t-- > 0) && !(o = r.next()).done; )
      i.push(o.value);
  } catch (l) {
    s = { error: l };
  } finally {
    try {
      o && !o.done && (n = r.return) && n.call(r);
    } finally {
      if (s)
        throw s.error;
    }
  }
  return i;
}, O4e = parseInt(ce.version.slice(0, 2), 10);
if (O4e < 16)
  throw new Error([
    "GraphiQL 0.18.0 and after is not compatible with React 15 or below.",
    "If you are using a CDN source (jsdelivr, unpkg, etc), follow this example:",
    "https://github.com/graphql/graphiql/blob/master/examples/graphiql-cdn/index.html#L49"
  ].join(`
`));
function Fa(e) {
  var t, n = e.dangerouslyAssumeSchemaIsValid, r = e.defaultQuery, o = e.defaultTabs, i = e.externalFragments, s = e.fetcher, l = e.getDefaultFieldNames, c = e.headers, f = e.inputValueDeprecation, d = e.introspectionQueryName, g = e.maxHistoryLength, m = e.onEditOperationName, v = e.onSchemaChange, b = e.onTabChange, w = e.onTogglePluginVisibility, _ = e.operationName, S = e.plugins, x = e.query, C = e.response, E = e.schema, N = e.schemaDescription, I = e.shouldPersistHeaders, D = e.storage, A = e.validationRules, F = e.variables, $ = e.visiblePlugin, q = e.defaultHeaders, H = N4e(e, ["dangerouslyAssumeSchemaIsValid", "defaultQuery", "defaultTabs", "externalFragments", "fetcher", "getDefaultFieldNames", "headers", "inputValueDeprecation", "introspectionQueryName", "maxHistoryLength", "onEditOperationName", "onSchemaChange", "onTabChange", "onTogglePluginVisibility", "operationName", "plugins", "query", "response", "schema", "schemaDescription", "shouldPersistHeaders", "storage", "validationRules", "variables", "visiblePlugin", "defaultHeaders"]);
  if (typeof s != "function")
    throw new TypeError("The `GraphiQL` component requires a `fetcher` function to be passed as prop.");
  return ce.createElement(
    n_,
    { getDefaultFieldNames: l, dangerouslyAssumeSchemaIsValid: n, defaultQuery: r, defaultHeaders: q, defaultTabs: o, externalFragments: i, fetcher: s, headers: c, inputValueDeprecation: f, introspectionQueryName: d, maxHistoryLength: g, onEditOperationName: m, onSchemaChange: v, onTabChange: b, onTogglePluginVisibility: w, plugins: S, visiblePlugin: $, operationName: _, query: x, response: C, schema: E, schemaDescription: N, shouldPersistHeaders: I, storage: D, validationRules: A, variables: F },
    ce.createElement(V6, QS({ showPersistHeadersSettings: I !== !1, disableTabs: (t = H.disableTabs) !== null && t !== void 0 ? t : !1 }, H))
  );
}
Fa.Logo = j6;
Fa.Toolbar = U6;
Fa.Footer = B6;
function V6(e) {
  var t, n, r, o, i = (t = e.isHeadersEditorEnabled) !== null && t !== void 0 ? t : !0, s = Zn({ nonNull: !0 }), l = Vf({ nonNull: !0 }), c = Ri({ nonNull: !0 }), f = fl(), d = u1(), g = f1({ onCopyQuery: e.onCopyQuery }), m = Tc(), v = Uf(), b = O6(), w = b.theme, _ = b.setTheme, S = (n = d == null ? void 0 : d.visiblePlugin) === null || n === void 0 ? void 0 : n.content, x = lv({
    defaultSizeRelation: 1 / 3,
    direction: "horizontal",
    initiallyHidden: d != null && d.visiblePlugin ? void 0 : "first",
    onHiddenElementChange: function(Oe) {
      Oe === "first" && (d == null || d.setVisiblePlugin(null));
    },
    sizeThresholdSecond: 200,
    storageKey: "docExplorerFlex"
  }), C = lv({
    direction: "horizontal",
    storageKey: "editorFlex"
  }), E = lv({
    defaultSizeRelation: 3,
    direction: "vertical",
    initiallyHidden: function() {
      if (!(e.defaultEditorToolsVisibility === "variables" || e.defaultEditorToolsVisibility === "headers"))
        return typeof e.defaultEditorToolsVisibility == "boolean" ? e.defaultEditorToolsVisibility ? void 0 : "second" : s.initialVariables || s.initialHeaders ? void 0 : "second";
    }(),
    sizeThresholdSecond: 60,
    storageKey: "secondaryEditorFlex"
  }), N = uv(k.useState(function() {
    return e.defaultEditorToolsVisibility === "variables" || e.defaultEditorToolsVisibility === "headers" ? e.defaultEditorToolsVisibility : !s.initialVariables && s.initialHeaders && i ? "headers" : "variables";
  }), 2), I = N[0], D = N[1], A = uv(k.useState(null), 2), F = A[0], $ = A[1], q = uv(k.useState(null), 2), H = q[0], z = q[1], B = ce.Children.toArray(e.children), R = B.find(function(Oe) {
    return Mw(Oe, Fa.Logo);
  }) || ce.createElement(Fa.Logo, null), te = B.find(function(Oe) {
    return Mw(Oe, Fa.Toolbar);
  }) || ce.createElement(
    ce.Fragment,
    null,
    ce.createElement(
      cv,
      { onClick: v, label: "Prettify query (Shift-Ctrl-P)" },
      ce.createElement(N$e, { className: "graphiql-toolbar-icon", "aria-hidden": "true" })
    ),
    ce.createElement(
      cv,
      { onClick: m, label: "Merge fragments into query (Shift-Ctrl-M)" },
      ce.createElement(T$e, { className: "graphiql-toolbar-icon", "aria-hidden": "true" })
    ),
    ce.createElement(
      cv,
      { onClick: g, label: "Copy query (Shift-Ctrl-C)" },
      ce.createElement(f$e, { className: "graphiql-toolbar-icon", "aria-hidden": "true" })
    ),
    ((r = e.toolbar) === null || r === void 0 ? void 0 : r.additionalContent) && e.toolbar.additionalContent,
    ((o = e.toolbar) === null || o === void 0 ? void 0 : o.additionalComponent) && ce.createElement(e.toolbar.additionalComponent, null)
  ), Q = B.find(function(Oe) {
    return Mw(Oe, Fa.Footer);
  }), Y = k.useCallback(function() {
    x.hiddenElement === "first" && x.setHiddenElement(null);
  }, [x]), K = k.useCallback(function() {
    try {
      f == null || f.clear(), z("success");
    } catch {
      z("error");
    }
  }, [f]), Z = k.useCallback(function(Oe) {
    s.setShouldPersistHeaders(Oe.currentTarget.dataset.value === "true");
  }, [s]), re = k.useCallback(function(Oe) {
    var ot = Oe.currentTarget.dataset.theme;
    _(ot || null);
  }, [_]), J = s.addTab, ie = c.introspect, ne = s.moveTab, ae = k.useCallback(function(Oe) {
    $(Oe.currentTarget.dataset.value);
  }, []), le = k.useCallback(function(Oe) {
    var ot = d, Nt = Number(Oe.currentTarget.dataset.index), Ve = ot.plugins.find(function(hr, Rt) {
      return Nt === Rt;
    }), At = Ve === ot.visiblePlugin;
    At ? (ot.setVisiblePlugin(null), x.setHiddenElement("first")) : (ot.setVisiblePlugin(Ve), x.setHiddenElement(null));
  }, [d, x]), de = k.useCallback(function(Oe) {
    E.hiddenElement === "second" && E.setHiddenElement(null), D(Oe.currentTarget.dataset.name);
  }, [E]), xe = k.useCallback(function() {
    E.setHiddenElement(E.hiddenElement === "second" ? null : "second");
  }, [E]), ge = k.useCallback(function(Oe) {
    Oe || $(null);
  }, []), qe = k.useCallback(function(Oe) {
    Oe || ($(null), z(null));
  }, []), Ie = ce.createElement(
    Sr,
    { label: "Add tab" },
    ce.createElement(
      $n,
      { type: "button", className: "graphiql-tab-add", onClick: J, "aria-label": "Add tab" },
      ce.createElement(_$e, { "aria-hidden": "true" })
    )
  );
  return ce.createElement(
    Sr.Provider,
    null,
    ce.createElement(
      "div",
      { "data-testid": "graphiql-container", className: "graphiql-container" },
      ce.createElement(
        "div",
        { className: "graphiql-sidebar" },
        ce.createElement("div", { className: "graphiql-sidebar-section" }, d == null ? void 0 : d.plugins.map(function(Oe, ot) {
          var Nt = Oe === d.visiblePlugin, Ve = "".concat(Nt ? "Hide" : "Show", " ").concat(Oe.title), At = Oe.icon;
          return ce.createElement(
            Sr,
            { key: Oe.title, label: Ve },
            ce.createElement(
              $n,
              { type: "button", className: Nt ? "active" : "", onClick: le, "data-index": ot, "aria-label": Ve },
              ce.createElement(At, { "aria-hidden": "true" })
            )
          );
        })),
        ce.createElement(
          "div",
          { className: "graphiql-sidebar-section" },
          ce.createElement(
            Sr,
            { label: "Re-fetch GraphQL schema" },
            ce.createElement(
              $n,
              { type: "button", disabled: c.isFetching, onClick: ie, "aria-label": "Re-fetch GraphQL schema" },
              ce.createElement(O$e, { className: c.isFetching ? "graphiql-spin" : "", "aria-hidden": "true" })
            )
          ),
          ce.createElement(
            Sr,
            { label: "Open short keys dialog" },
            ce.createElement(
              $n,
              { type: "button", "data-value": "short-keys", onClick: ae, "aria-label": "Open short keys dialog" },
              ce.createElement(x$e, { "aria-hidden": "true" })
            )
          ),
          ce.createElement(
            Sr,
            { label: "Open settings dialog" },
            ce.createElement(
              $n,
              { type: "button", "data-value": "settings", onClick: ae, "aria-label": "Open settings dialog" },
              ce.createElement(D$e, { "aria-hidden": "true" })
            )
          )
        )
      ),
      ce.createElement(
        "div",
        { className: "graphiql-main" },
        ce.createElement(
          "div",
          { ref: x.firstRef, style: {
            minWidth: "200px"
          } },
          ce.createElement("div", { className: "graphiql-plugin" }, S ? ce.createElement(S, null) : null)
        ),
        (d == null ? void 0 : d.visiblePlugin) && ce.createElement("div", { className: "graphiql-horizontal-drag-bar", ref: x.dragBarRef }),
        ce.createElement(
          "div",
          { ref: x.secondRef, className: "graphiql-sessions" },
          ce.createElement(
            "div",
            { className: "graphiql-session-header" },
            e.disableTabs ? null : ce.createElement(j4, { values: s.tabs, onReorder: ne, "aria-label": "Select active operation" }, s.tabs.length > 1 && ce.createElement(
              ce.Fragment,
              null,
              s.tabs.map(function(Oe, ot) {
                return ce.createElement(
                  Iw,
                  { key: Oe.id, value: Oe, isActive: ot === s.activeTabIndex },
                  ce.createElement(Iw.Button, { "aria-controls": "graphiql-session", id: "graphiql-session-tab-".concat(ot), onClick: function() {
                    l.stop(), s.changeTab(ot);
                  } }, Oe.title),
                  ce.createElement(Iw.Close, { onClick: function() {
                    s.activeTabIndex === ot && l.stop(), s.closeTab(ot);
                  } })
                );
              }),
              Ie
            )),
            ce.createElement(
              "div",
              { className: "graphiql-session-header-right" },
              s.tabs.length === 1 && Ie,
              R
            )
          ),
          ce.createElement(
            "div",
            { role: "tabpanel", id: "graphiql-session", className: "graphiql-session", "aria-labelledby": "graphiql-session-tab-".concat(s.activeTabIndex) },
            ce.createElement(
              "div",
              { ref: C.firstRef },
              ce.createElement(
                "div",
                { className: "graphiql-editors".concat(s.tabs.length === 1 ? " full-height" : "") },
                ce.createElement(
                  "div",
                  { ref: E.firstRef },
                  ce.createElement(
                    "section",
                    { className: "graphiql-query-editor", "aria-label": "Query Editor" },
                    ce.createElement(e_, { editorTheme: e.editorTheme, keyMap: e.keyMap, onClickReference: Y, onCopyQuery: e.onCopyQuery, onEdit: e.onEditQuery, readOnly: e.readOnly }),
                    ce.createElement(
                      "div",
                      { className: "graphiql-toolbar", role: "toolbar", "aria-label": "Editor Commands" },
                      ce.createElement(F0, null),
                      te
                    )
                  )
                ),
                ce.createElement(
                  "div",
                  { ref: E.dragBarRef },
                  ce.createElement(
                    "div",
                    { className: "graphiql-editor-tools" },
                    ce.createElement($n, { type: "button", className: I === "variables" && E.hiddenElement !== "second" ? "active" : "", onClick: de, "data-name": "variables" }, "Variables"),
                    i && ce.createElement($n, { type: "button", className: I === "headers" && E.hiddenElement !== "second" ? "active" : "", onClick: de, "data-name": "headers" }, "Headers"),
                    ce.createElement(
                      Sr,
                      { label: E.hiddenElement === "second" ? "Show editor tools" : "Hide editor tools" },
                      ce.createElement($n, { type: "button", onClick: xe, "aria-label": E.hiddenElement === "second" ? "Show editor tools" : "Hide editor tools", className: "graphiql-toggle-editor-tools" }, E.hiddenElement === "second" ? ce.createElement(u$e, { className: "graphiql-chevron-icon", "aria-hidden": "true" }) : ce.createElement(l$e, { className: "graphiql-chevron-icon", "aria-hidden": "true" }))
                    )
                  )
                ),
                ce.createElement(
                  "div",
                  { ref: E.secondRef },
                  ce.createElement(
                    "section",
                    { className: "graphiql-editor-tool", "aria-label": I === "variables" ? "Variables" : "Headers" },
                    ce.createElement(R0, { editorTheme: e.editorTheme, isHidden: I !== "variables", keyMap: e.keyMap, onEdit: e.onEditVariables, onClickReference: Y, readOnly: e.readOnly }),
                    i && ce.createElement(D0, { editorTheme: e.editorTheme, isHidden: I !== "headers", keyMap: e.keyMap, onEdit: e.onEditHeaders, readOnly: e.readOnly })
                  )
                )
              )
            ),
            ce.createElement("div", { className: "graphiql-horizontal-drag-bar", ref: C.dragBarRef }),
            ce.createElement(
              "div",
              { ref: C.secondRef },
              ce.createElement(
                "div",
                { className: "graphiql-response" },
                l.isFetching ? ce.createElement(jk, null) : null,
                ce.createElement(t_, { editorTheme: e.editorTheme, responseTooltip: e.responseTooltip, keyMap: e.keyMap }),
                Q
              )
            )
          )
        )
      ),
      ce.createElement(
        Cu,
        { open: F === "short-keys", onOpenChange: ge },
        ce.createElement(
          "div",
          { className: "graphiql-dialog-header" },
          ce.createElement(Cu.Title, { className: "graphiql-dialog-title" }, "Short Keys"),
          ce.createElement(Cu.Close, null)
        ),
        ce.createElement(
          "div",
          { className: "graphiql-dialog-section" },
          ce.createElement(D4e, { keyMap: e.keyMap || "sublime" })
        )
      ),
      ce.createElement(
        Cu,
        { open: F === "settings", onOpenChange: qe },
        ce.createElement(
          "div",
          { className: "graphiql-dialog-header" },
          ce.createElement(Cu.Title, { className: "graphiql-dialog-title" }, "Settings"),
          ce.createElement(Cu.Close, null)
        ),
        e.showPersistHeadersSettings ? ce.createElement(
          "div",
          { className: "graphiql-dialog-section" },
          ce.createElement(
            "div",
            null,
            ce.createElement("div", { className: "graphiql-dialog-section-title" }, "Persist headers"),
            ce.createElement(
              "div",
              { className: "graphiql-dialog-section-caption" },
              "Save headers upon reloading.",
              " ",
              ce.createElement("span", { className: "graphiql-warning-text" }, "Only enable if you trust this device.")
            )
          ),
          ce.createElement(
            US,
            null,
            ce.createElement(wi, { type: "button", id: "enable-persist-headers", className: s.shouldPersistHeaders ? "active" : "", "data-value": "true", onClick: Z }, "On"),
            ce.createElement(wi, { type: "button", id: "disable-persist-headers", className: s.shouldPersistHeaders ? "" : "active", onClick: Z }, "Off")
          )
        ) : null,
        ce.createElement(
          "div",
          { className: "graphiql-dialog-section" },
          ce.createElement(
            "div",
            null,
            ce.createElement("div", { className: "graphiql-dialog-section-title" }, "Theme"),
            ce.createElement("div", { className: "graphiql-dialog-section-caption" }, "Adjust how the interface looks like.")
          ),
          ce.createElement(
            US,
            null,
            ce.createElement(wi, { type: "button", className: w === null ? "active" : "", onClick: re }, "System"),
            ce.createElement(wi, { type: "button", className: w === "light" ? "active" : "", "data-theme": "light", onClick: re }, "Light"),
            ce.createElement(wi, { type: "button", className: w === "dark" ? "active" : "", "data-theme": "dark", onClick: re }, "Dark")
          )
        ),
        f ? ce.createElement(
          "div",
          { className: "graphiql-dialog-section" },
          ce.createElement(
            "div",
            null,
            ce.createElement("div", { className: "graphiql-dialog-section-title" }, "Clear storage"),
            ce.createElement("div", { className: "graphiql-dialog-section-caption" }, "Remove all locally stored data and start fresh.")
          ),
          ce.createElement(wi, { type: "button", state: H || void 0, disabled: H === "success", onClick: K }, {
            success: "Cleared data",
            error: "Failed"
          }[H] || "Clear data")
        ) : null
      )
    )
  );
}
var Fw = typeof window < "u" && window.navigator.platform.toLowerCase().indexOf("mac") === 0 ? "Cmd" : "Ctrl", A4e = Object.entries({
  "Search in editor": [Fw, "F"],
  "Search in documentation": [Fw, "K"],
  "Execute query": [Fw, "Enter"],
  "Prettify editors": ["Ctrl", "Shift", "P"],
  "Merge fragments definitions into operation definition": [
    "Ctrl",
    "Shift",
    "M"
  ],
  "Copy query": ["Ctrl", "Shift", "C"],
  "Re-fetch schema using introspection": ["Ctrl", "Shift", "R"]
});
function D4e(e) {
  var t = e.keyMap;
  return ce.createElement(
    "div",
    null,
    ce.createElement(
      "table",
      { className: "graphiql-table" },
      ce.createElement(
        "thead",
        null,
        ce.createElement(
          "tr",
          null,
          ce.createElement("th", null, "Short Key"),
          ce.createElement("th", null, "Function")
        )
      ),
      ce.createElement("tbody", null, A4e.map(function(n) {
        var r = uv(n, 2), o = r[0], i = r[1];
        return ce.createElement(
          "tr",
          { key: o },
          ce.createElement("td", null, i.map(function(s, l, c) {
            return ce.createElement(
              k.Fragment,
              { key: s },
              ce.createElement("code", { className: "graphiql-key" }, s),
              l !== c.length - 1 && " + "
            );
          })),
          ce.createElement("td", null, o)
        );
      }))
    ),
    ce.createElement(
      "p",
      null,
      "The editors use",
      " ",
      ce.createElement("a", { href: "https://codemirror.net/5/doc/manual.html#keymaps", target: "_blank", rel: "noopener noreferrer" }, "CodeMirror Key Maps"),
      " ",
      "that add more short keys. This instance of Graph",
      ce.createElement("em", null, "i"),
      "QL uses",
      " ",
      ce.createElement("code", null, t),
      "."
    )
  );
}
function j6(e) {
  return ce.createElement("div", { className: "graphiql-logo" }, e.children || ce.createElement(
    "a",
    { className: "graphiql-logo-link", href: "https://github.com/graphql/graphiql", target: "_blank", rel: "noreferrer" },
    "Graph",
    ce.createElement("em", null, "i"),
    "QL"
  ));
}
j6.displayName = "GraphiQLLogo";
function U6(e) {
  return ce.createElement(ce.Fragment, null, e.children);
}
U6.displayName = "GraphiQLToolbar";
function B6(e) {
  return ce.createElement("div", { className: "graphiql-footer" }, e.children);
}
B6.displayName = "GraphiQLFooter";
function Mw(e, t) {
  var n;
  return !((n = e == null ? void 0 : e.type) === null || n === void 0) && n.displayName && e.type.displayName === t.displayName ? !0 : e.type === t;
}
var Ou = null;
typeof WebSocket < "u" ? Ou = WebSocket : typeof MozWebSocket < "u" ? Ou = MozWebSocket : typeof global < "u" ? Ou = global.WebSocket || global.MozWebSocket : typeof window < "u" ? Ou = window.WebSocket || window.MozWebSocket : typeof self < "u" && (Ou = self.WebSocket || self.MozWebSocket);
const q6 = Ou;
function I4e(e) {
  return e != null && typeof e.then == "function";
}
const L4e = (e) => {
  throw e;
};
class zt {
  constructor(t) {
    RO(this, "state");
    let n;
    try {
      n = t();
    } catch (r) {
      this.state = { status: "rejected", value: r };
      return;
    }
    if (I4e(n)) {
      this.state = { status: "pending", value: n };
      return;
    }
    this.state = { status: "fulfilled", value: n };
  }
  then(t, n) {
    const r = this.state;
    if (r.status === "pending")
      return new zt(() => r.value.then(t, n));
    const o = typeof n == "function" ? n : L4e;
    if (r.status === "rejected")
      return new zt(() => o(r.value));
    try {
      const i = typeof t == "function" ? t : void 0;
      return i === void 0 ? new zt(() => r.value) : new zt(() => i(r.value));
    } catch (i) {
      return new zt(() => o(i));
    }
  }
  catch(t) {
    return this.then(void 0, t);
  }
  resolve() {
    const t = this.state;
    if (t.status === "pending")
      return Promise.resolve(t.value);
    if (t.status === "rejected")
      throw t.value;
    return t.value;
  }
  static all(t) {
    let n = !1, r, o = !1;
    const i = [];
    for (const s of t) {
      const l = s.state;
      if (l.status === "rejected") {
        if (n)
          continue;
        n = !0, r = l.value;
        continue;
      }
      l.status === "pending" && (o = !0), i.push(l.value);
    }
    return o ? n ? (Promise.all(i).catch(() => {
    }), new zt(() => {
      throw r;
    })) : new zt(() => Promise.all(i)) : new zt(() => i);
  }
}
function to(e) {
  return e === null ? "null" : Array.isArray(e) ? "array" : typeof e;
}
function zl(e) {
  return to(e) === "object";
}
function R4e(e) {
  return Array.isArray(e) && // must be at least one error
  e.length > 0 && // error has at least a message
  e.every((t) => "message" in t);
}
function BL(e, t) {
  return e.length < 124 ? e : t;
}
const F4e = "graphql-transport-ws";
var ho;
(function(e) {
  e[e.InternalServerError = 4500] = "InternalServerError", e[e.InternalClientError = 4005] = "InternalClientError", e[e.BadRequest = 4400] = "BadRequest", e[e.BadResponse = 4004] = "BadResponse", e[e.Unauthorized = 4401] = "Unauthorized", e[e.Forbidden = 4403] = "Forbidden", e[e.SubprotocolNotAcceptable = 4406] = "SubprotocolNotAcceptable", e[e.ConnectionInitialisationTimeout = 4408] = "ConnectionInitialisationTimeout", e[e.ConnectionAcknowledgementTimeout = 4504] = "ConnectionAcknowledgementTimeout", e[e.SubscriberAlreadyExists = 4409] = "SubscriberAlreadyExists", e[e.TooManyInitialisationRequests = 4429] = "TooManyInitialisationRequests";
})(ho || (ho = {}));
var yn;
(function(e) {
  e.ConnectionInit = "connection_init", e.ConnectionAck = "connection_ack", e.Ping = "ping", e.Pong = "pong", e.Subscribe = "subscribe", e.Next = "next", e.Error = "error", e.Complete = "complete";
})(yn || (yn = {}));
function z6(e) {
  if (!zl(e))
    throw new Error(`Message is expected to be an object, but got ${to(e)}`);
  if (!e.type)
    throw new Error("Message is missing the 'type' property");
  if (typeof e.type != "string")
    throw new Error(`Message is expects the 'type' property to be a string, but got ${to(e.type)}`);
  switch (e.type) {
    case yn.ConnectionInit:
    case yn.ConnectionAck:
    case yn.Ping:
    case yn.Pong: {
      if (e.payload != null && !zl(e.payload))
        throw new Error(`"${e.type}" message expects the 'payload' property to be an object or nullish or missing, but got "${e.payload}"`);
      break;
    }
    case yn.Subscribe: {
      if (typeof e.id != "string")
        throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${to(e.id)}`);
      if (!e.id)
        throw new Error(`"${e.type}" message requires a non-empty 'id' property`);
      if (!zl(e.payload))
        throw new Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${to(e.payload)}`);
      if (typeof e.payload.query != "string")
        throw new Error(`"${e.type}" message payload expects the 'query' property to be a string, but got ${to(e.payload.query)}`);
      if (e.payload.variables != null && !zl(e.payload.variables))
        throw new Error(`"${e.type}" message payload expects the 'variables' property to be a an object or nullish or missing, but got ${to(e.payload.variables)}`);
      if (e.payload.operationName != null && to(e.payload.operationName) !== "string")
        throw new Error(`"${e.type}" message payload expects the 'operationName' property to be a string or nullish or missing, but got ${to(e.payload.operationName)}`);
      if (e.payload.extensions != null && !zl(e.payload.extensions))
        throw new Error(`"${e.type}" message payload expects the 'extensions' property to be a an object or nullish or missing, but got ${to(e.payload.extensions)}`);
      break;
    }
    case yn.Next: {
      if (typeof e.id != "string")
        throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${to(e.id)}`);
      if (!e.id)
        throw new Error(`"${e.type}" message requires a non-empty 'id' property`);
      if (!zl(e.payload))
        throw new Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${to(e.payload)}`);
      break;
    }
    case yn.Error: {
      if (typeof e.id != "string")
        throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${to(e.id)}`);
      if (!e.id)
        throw new Error(`"${e.type}" message requires a non-empty 'id' property`);
      if (!R4e(e.payload))
        throw new Error(`"${e.type}" message expects the 'payload' property to be an array of GraphQL errors, but got ${JSON.stringify(e.payload)}`);
      break;
    }
    case yn.Complete: {
      if (typeof e.id != "string")
        throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${to(e.id)}`);
      if (!e.id)
        throw new Error(`"${e.type}" message requires a non-empty 'id' property`);
      break;
    }
    default:
      throw new Error(`Invalid message 'type' property "${e.type}"`);
  }
  return e;
}
function M4e(e, t) {
  return z6(typeof e == "string" ? JSON.parse(e, t) : e);
}
function Md(e, t) {
  return z6(e), JSON.stringify(e, t);
}
var cf = function(e) {
  return this instanceof cf ? (this.v = e, this) : new cf(e);
}, P4e = function(e, t, n) {
  if (!Symbol.asyncIterator)
    throw new TypeError("Symbol.asyncIterator is not defined.");
  var r = n.apply(e, t || []), o, i = [];
  return o = {}, s("next"), s("throw"), s("return"), o[Symbol.asyncIterator] = function() {
    return this;
  }, o;
  function s(m) {
    r[m] && (o[m] = function(v) {
      return new Promise(function(b, w) {
        i.push([m, v, b, w]) > 1 || l(m, v);
      });
    });
  }
  function l(m, v) {
    try {
      c(r[m](v));
    } catch (b) {
      g(i[0][3], b);
    }
  }
  function c(m) {
    m.value instanceof cf ? Promise.resolve(m.value.v).then(f, d) : g(i[0][2], m);
  }
  function f(m) {
    l("next", m);
  }
  function d(m) {
    l("throw", m);
  }
  function g(m, v) {
    m(v), i.shift(), i.length && l(i[0][0], i[0][1]);
  }
};
function $4e(e) {
  const {
    url: t,
    connectionParams: n,
    lazy: r = !0,
    onNonLazyError: o = console.error,
    lazyCloseTimeout: i = 0,
    keepAlive: s = 0,
    disablePong: l,
    connectionAckWaitTimeout: c = 0,
    retryAttempts: f = 5,
    retryWait: d = async function(te) {
      let Q = 1e3;
      for (let Y = 0; Y < te; Y++)
        Q *= 2;
      await new Promise((Y) => setTimeout(Y, Q + // add random timeout from 300ms to 3s
      Math.floor(Math.random() * 2700 + 300)));
    },
    shouldRetry: g = Pw,
    isFatalConnectionProblem: m,
    on: v,
    webSocketImpl: b,
    /**
     * Generates a v4 UUID to be used as the ID using `Math`
     * as the random number generator. Supply your own generator
     * in case you need more uniqueness.
     *
     * Reference: https://gist.github.com/jed/982883
     */
    generateID: w = function() {
      return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (te) => {
        const Q = Math.random() * 16 | 0;
        return (te == "x" ? Q : Q & 3 | 8).toString(16);
      });
    },
    jsonMessageReplacer: _,
    jsonMessageReviver: S
  } = e;
  let x;
  if (b) {
    if (!j4e(b))
      throw new Error("Invalid WebSocket implementation provided");
    x = b;
  } else
    typeof WebSocket < "u" ? x = WebSocket : typeof global < "u" ? x = global.WebSocket || // @ts-expect-error: Support more browsers
    global.MozWebSocket : typeof window < "u" && (x = window.WebSocket || // @ts-expect-error: Support more browsers
    window.MozWebSocket);
  if (!x)
    throw new Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");
  const C = x, E = (() => {
    const R = /* @__PURE__ */ (() => {
      const Q = {};
      return {
        on(Y, K) {
          return Q[Y] = K, () => {
            delete Q[Y];
          };
        },
        emit(Y) {
          var K;
          "id" in Y && ((K = Q[Y.id]) === null || K === void 0 || K.call(Q, Y));
        }
      };
    })(), te = {
      connecting: v != null && v.connecting ? [v.connecting] : [],
      opened: v != null && v.opened ? [v.opened] : [],
      connected: v != null && v.connected ? [v.connected] : [],
      ping: v != null && v.ping ? [v.ping] : [],
      pong: v != null && v.pong ? [v.pong] : [],
      message: v != null && v.message ? [R.emit, v.message] : [R.emit],
      closed: v != null && v.closed ? [v.closed] : [],
      error: v != null && v.error ? [v.error] : []
    };
    return {
      onMessage: R.on,
      on(Q, Y) {
        const K = te[Q];
        return K.push(Y), () => {
          K.splice(K.indexOf(Y), 1);
        };
      },
      emit(Q, ...Y) {
        for (const K of [...te[Q]])
          K(...Y);
      }
    };
  })();
  function N(R) {
    const te = [
      // errors are fatal and more critical than close events, throw them first
      E.on("error", (Q) => {
        te.forEach((Y) => Y()), R(Q);
      }),
      // closes can be graceful and not fatal, throw them second (if error didnt throw)
      E.on("closed", (Q) => {
        te.forEach((Y) => Y()), R(Q);
      })
    ];
  }
  let I, D = 0, A, F = !1, $ = 0, q = !1;
  async function H() {
    clearTimeout(A);
    const [R, te] = await (I ?? (I = new Promise((K, Z) => (async () => {
      if (F) {
        if (await d($), !D)
          return I = void 0, Z({ code: 1e3, reason: "All Subscriptions Gone" });
        $++;
      }
      E.emit("connecting", F);
      const re = new C(typeof t == "function" ? await t() : t, F4e);
      let J, ie;
      function ne() {
        isFinite(s) && s > 0 && (clearTimeout(ie), ie = setTimeout(() => {
          re.readyState === C.OPEN && (re.send(Md({ type: yn.Ping })), E.emit("ping", !1, void 0));
        }, s));
      }
      N((le) => {
        I = void 0, clearTimeout(J), clearTimeout(ie), Z(le), le instanceof qL && (re.close(4499, "Terminated"), re.onerror = null, re.onclose = null);
      }), re.onerror = (le) => E.emit("error", le), re.onclose = (le) => E.emit("closed", le), re.onopen = async () => {
        try {
          E.emit("opened", re);
          const le = typeof n == "function" ? await n() : n;
          if (re.readyState !== C.OPEN)
            return;
          re.send(Md(le ? {
            type: yn.ConnectionInit,
            payload: le
          } : {
            type: yn.ConnectionInit
            // payload is completely absent if not provided
          }, _)), isFinite(c) && c > 0 && (J = setTimeout(() => {
            re.close(ho.ConnectionAcknowledgementTimeout, "Connection acknowledgement timeout");
          }, c)), ne();
        } catch (le) {
          E.emit("error", le), re.close(ho.InternalClientError, BL(le instanceof Error ? le.message : new Error(le).message, "Internal client error"));
        }
      };
      let ae = !1;
      re.onmessage = ({ data: le }) => {
        try {
          const de = M4e(le, S);
          if (E.emit("message", de), de.type === "ping" || de.type === "pong") {
            E.emit(de.type, !0, de.payload), de.type === "pong" ? ne() : l || (re.send(Md(de.payload ? {
              type: yn.Pong,
              payload: de.payload
            } : {
              type: yn.Pong
              // payload is completely absent if not provided
            })), E.emit("pong", !1, de.payload));
            return;
          }
          if (ae)
            return;
          if (de.type !== yn.ConnectionAck)
            throw new Error(`First message cannot be of type ${de.type}`);
          clearTimeout(J), ae = !0, E.emit("connected", re, de.payload, F), F = !1, $ = 0, K([
            re,
            new Promise((xe, ge) => N(ge))
          ]);
        } catch (de) {
          re.onmessage = null, E.emit("error", de), re.close(ho.BadResponse, BL(de instanceof Error ? de.message : new Error(de).message, "Bad response"));
        }
      };
    })())));
    R.readyState === C.CLOSING && await te;
    let Q = () => {
    };
    const Y = new Promise((K) => Q = K);
    return [
      R,
      Q,
      Promise.race([
        // wait for
        Y.then(() => {
          if (!D) {
            const K = () => R.close(1e3, "Normal Closure");
            isFinite(i) && i > 0 ? A = setTimeout(() => {
              R.readyState === C.OPEN && K();
            }, i) : K();
          }
        }),
        // or
        te
      ])
    ];
  }
  function z(R) {
    if (Pw(R) && (V4e(R.code) || [
      ho.InternalServerError,
      ho.InternalClientError,
      ho.BadRequest,
      ho.BadResponse,
      ho.Unauthorized,
      // CloseCode.Forbidden, might grant access out after retry
      ho.SubprotocolNotAcceptable,
      // CloseCode.ConnectionInitialisationTimeout, might not time out after retry
      // CloseCode.ConnectionAcknowledgementTimeout, might not time out after retry
      ho.SubscriberAlreadyExists,
      ho.TooManyInitialisationRequests
      // 4499, // Terminated, probably because the socket froze, we want to retry
    ].includes(R.code)))
      throw R;
    if (q)
      return !1;
    if (Pw(R) && R.code === 1e3)
      return D > 0;
    if (!f || $ >= f || !g(R) || m != null && m(R))
      throw R;
    return F = !0;
  }
  r || (async () => {
    for (D++; ; )
      try {
        const [, , R] = await H();
        await R;
      } catch (R) {
        try {
          if (!z(R))
            return;
        } catch (te) {
          return o == null ? void 0 : o(te);
        }
      }
  })();
  function B(R, te) {
    const Q = w(R);
    let Y = !1, K = !1, Z = () => {
      D--, Y = !0;
    };
    return (async () => {
      for (D++; ; )
        try {
          const [re, J, ie] = await H();
          if (Y)
            return J();
          const ne = E.onMessage(Q, (ae) => {
            switch (ae.type) {
              case yn.Next: {
                te.next(ae.payload);
                return;
              }
              case yn.Error: {
                K = !0, Y = !0, te.error(ae.payload), Z();
                return;
              }
              case yn.Complete: {
                Y = !0, Z();
                return;
              }
            }
          });
          re.send(Md({
            id: Q,
            type: yn.Subscribe,
            payload: R
          }, _)), Z = () => {
            !Y && re.readyState === C.OPEN && re.send(Md({
              id: Q,
              type: yn.Complete
            }, _)), D--, Y = !0, J();
          }, await ie.finally(ne);
          return;
        } catch (re) {
          if (!z(re))
            return;
        }
    })().then(() => {
      K || te.complete();
    }).catch((re) => {
      te.error(re);
    }), () => {
      Y || Z();
    };
  }
  return {
    on: E.on,
    subscribe: B,
    iterate(R) {
      const te = [], Q = {
        done: !1,
        error: null,
        resolve: () => {
        }
      }, Y = B(R, {
        next(Z) {
          te.push(Z), Q.resolve();
        },
        error(Z) {
          Q.done = !0, Q.error = Z, Q.resolve();
        },
        complete() {
          Q.done = !0, Q.resolve();
        }
      }), K = function() {
        return P4e(this, arguments, function* () {
          for (; ; ) {
            for (te.length || (yield cf(new Promise((J) => Q.resolve = J))); te.length; )
              yield yield cf(te.shift());
            if (Q.error)
              throw Q.error;
            if (Q.done)
              return yield cf(void 0);
          }
        });
      }();
      return K.throw = async (Z) => (Q.done || (Q.done = !0, Q.error = Z, Q.resolve()), { done: !0, value: void 0 }), K.return = async () => (Y(), { done: !0, value: void 0 }), K;
    },
    async dispose() {
      if (q = !0, I) {
        const [R] = await I;
        R.close(1e3, "Normal Closure");
      }
    },
    terminate() {
      I && E.emit("closed", new qL());
    }
  };
}
class qL extends Error {
  constructor() {
    super(...arguments), this.name = "TerminatedCloseEvent", this.message = "4499: Terminated", this.code = 4499, this.reason = "Terminated", this.wasClean = !1;
  }
}
function Pw(e) {
  return zl(e) && "code" in e && "reason" in e;
}
function V4e(e) {
  return [
    1e3,
    1001,
    1006,
    1005,
    1012,
    1013,
    1014
    // Bad Gateway
  ].includes(e) ? !1 : e >= 1e3 && e <= 1999;
}
function j4e(e) {
  return typeof e == "function" && "constructor" in e && "CLOSED" in e && "CLOSING" in e && "CONNECTING" in e && "OPEN" in e;
}
const U4e = (e) => Array.isArray(e) ? e : e ? [e] : [], H6 = 3;
function Kn(e) {
  return v1(e, []);
}
function v1(e, t) {
  switch (typeof e) {
    case "string":
      return JSON.stringify(e);
    case "function":
      return e.name ? `[function ${e.name}]` : "[function]";
    case "object":
      return B4e(e, t);
    default:
      return String(e);
  }
}
function zL(e) {
  return (e.name = "GraphQLError") ? e.toString() : `${e.name}: ${e.message};
 ${e.stack}`;
}
function B4e(e, t) {
  if (e === null)
    return "null";
  if (e instanceof Error)
    return e.name === "AggregateError" ? zL(e) + `
` + HL(e.errors, t) : zL(e);
  if (t.includes(e))
    return "[Circular]";
  const n = [...t, e];
  if (q4e(e)) {
    const r = e.toJSON();
    if (r !== e)
      return typeof r == "string" ? r : v1(r, n);
  } else if (Array.isArray(e))
    return HL(e, n);
  return z4e(e, n);
}
function q4e(e) {
  return typeof e.toJSON == "function";
}
function z4e(e, t) {
  const n = Object.entries(e);
  return n.length === 0 ? "{}" : t.length > H6 ? "[" + H4e(e) + "]" : "{ " + n.map(([o, i]) => o + ": " + v1(i, t)).join(", ") + " }";
}
function HL(e, t) {
  if (e.length === 0)
    return "[]";
  if (t.length > H6)
    return "[Array]";
  const n = e.length, r = [];
  for (let o = 0; o < n; ++o)
    r.push(v1(e[o], t));
  return "[" + r.join(", ") + "]";
}
function H4e(e) {
  const t = Object.prototype.toString.call(e).replace(/^\[object /, "").replace(/]$/, "");
  if (t === "Object" && typeof e.constructor == "function") {
    const n = e.constructor.name;
    if (typeof n == "string" && n !== "")
      return n;
  }
  return t;
}
const W4e = [
  "message",
  "locations",
  "path",
  "nodes",
  "source",
  "positions",
  "originalError",
  "name",
  "stack",
  "extensions"
];
function G4e(e) {
  return e != null && typeof e == "object" && Object.keys(e).every((t) => W4e.includes(t));
}
function ut(e, t) {
  return t != null && t.originalError && !(t.originalError instanceof Error) && G4e(t.originalError) && (t.originalError = ut(t.originalError.message, t.originalError)), tC.major >= 17 ? new he(e, t) : new he(e, t == null ? void 0 : t.nodes, t == null ? void 0 : t.source, t == null ? void 0 : t.positions, t == null ? void 0 : t.path, t == null ? void 0 : t.originalError, t == null ? void 0 : t.extensions);
}
function i_(e, t) {
  return ut(e.message, {
    nodes: e.nodes,
    source: e.source,
    positions: e.positions,
    path: t ?? e.path,
    originalError: e,
    extensions: e.extensions
  });
}
function Q4e(e) {
  return e != null && typeof e == "object" && Symbol.iterator in e;
}
function W6(e) {
  return typeof e == "object" && e !== null;
}
function Xt(e) {
  return (e == null ? void 0 : e.then) != null;
}
function Y4e(e, t, n) {
  let r = n;
  for (const o of e)
    r = Xt(r) ? r.then((i) => t(i, o)) : t(r, o);
  return r;
}
function G6(e, t) {
  return Object.prototype.hasOwnProperty.call(e, t);
}
function Q6(e, t, n = {}) {
  const r = {}, i = (t.arguments ?? []).reduce((s, l) => ({
    ...s,
    [l.name.value]: l
  }), {});
  for (const { name: s, type: l, defaultValue: c } of e.args) {
    const f = i[s];
    if (!f) {
      if (c !== void 0)
        r[s] = c;
      else if (He(l))
        throw ut(`Argument "${s}" of required type "${Kn(l)}" was not provided.`, {
          nodes: [t]
        });
      continue;
    }
    const d = f.value;
    let g = d.kind === U.NULL;
    if (d.kind === U.VARIABLE) {
      const v = d.name.value;
      if (n == null || !G6(n, v)) {
        if (c !== void 0)
          r[s] = c;
        else if (He(l))
          throw ut(`Argument "${s}" of required type "${Kn(l)}" was provided the variable "$${v}" which was not provided a runtime value.`, {
            nodes: [d]
          });
        continue;
      }
      g = n[v] == null;
    }
    if (g && He(l))
      throw ut(`Argument "${s}" of non-null type "${Kn(l)}" must not be null.`, {
        nodes: [d]
      });
    const m = Go(d, l, n);
    if (m === void 0)
      throw ut(`Argument "${s}" has invalid value ${pt(d)}.`, {
        nodes: [d]
      });
    r[s] = m;
  }
  return r;
}
function YS(e) {
  if (He(e)) {
    const t = YS(e.ofType);
    if (t.kind === U.NON_NULL_TYPE)
      throw new Error(`Invalid type node ${Kn(e)}. Inner type of non-null type cannot be a non-null type.`);
    return {
      kind: U.NON_NULL_TYPE,
      type: t
    };
  } else if (vt(e))
    return {
      kind: U.LIST_TYPE,
      type: YS(e.ofType)
    };
  return {
    kind: U.NAMED_TYPE,
    name: {
      kind: U.NAME,
      value: e.name
    }
  };
}
function Xs(e) {
  const t = /* @__PURE__ */ new WeakMap();
  return function(r) {
    const o = t.get(r);
    if (o === void 0) {
      const i = e(r);
      return t.set(r, i), i;
    }
    return o;
  };
}
function s_(e) {
  const t = /* @__PURE__ */ new WeakMap();
  return function(r, o) {
    let i = t.get(r);
    if (!i) {
      i = /* @__PURE__ */ new WeakMap(), t.set(r, i);
      const l = e(r, o);
      return i.set(o, l), l;
    }
    const s = i.get(o);
    if (s === void 0) {
      const l = e(r, o);
      return i.set(o, l), l;
    }
    return s;
  };
}
function K4e(e) {
  const t = /* @__PURE__ */ new WeakMap();
  return function(r, o, i) {
    let s = t.get(r);
    if (!s) {
      s = /* @__PURE__ */ new WeakMap(), t.set(r, s);
      const f = /* @__PURE__ */ new WeakMap();
      s.set(o, f);
      const d = e(r, o, i);
      return f.set(i, d), d;
    }
    let l = s.get(o);
    if (!l) {
      l = /* @__PURE__ */ new WeakMap(), s.set(o, l);
      const f = e(r, o, i);
      return l.set(i, f), f;
    }
    const c = l.get(i);
    if (c === void 0) {
      const f = e(r, o, i);
      return l.set(i, f), f;
    }
    return c;
  };
}
function J4e(e) {
  const t = /* @__PURE__ */ new WeakMap();
  return function(r, o, i, s, l) {
    let c = t.get(r);
    if (!c) {
      c = /* @__PURE__ */ new WeakMap(), t.set(r, c);
      const v = /* @__PURE__ */ new WeakMap();
      c.set(o, v);
      const b = /* @__PURE__ */ new WeakMap();
      v.set(i, b);
      const w = /* @__PURE__ */ new WeakMap();
      b.set(s, w);
      const _ = e(r, o, i, s, l);
      return w.set(l, _), _;
    }
    let f = c.get(o);
    if (!f) {
      f = /* @__PURE__ */ new WeakMap(), c.set(o, f);
      const v = /* @__PURE__ */ new WeakMap();
      f.set(i, v);
      const b = /* @__PURE__ */ new WeakMap();
      v.set(s, b);
      const w = e(r, o, i, s, l);
      return b.set(l, w), w;
    }
    let d = f.get(i);
    if (!d) {
      d = /* @__PURE__ */ new WeakMap(), f.set(i, d);
      const v = /* @__PURE__ */ new WeakMap();
      d.set(s, v);
      const b = e(r, o, i, s, l);
      return v.set(l, b), b;
    }
    let g = d.get(s);
    if (!g) {
      g = /* @__PURE__ */ new WeakMap(), d.set(s, g);
      const v = e(r, o, i, s, l);
      return g.set(l, v), v;
    }
    const m = g.get(l);
    if (m === void 0) {
      const v = e(r, o, i, s, l);
      return g.set(l, v), v;
    }
    return m;
  };
}
function X4e(e) {
  const t = /* @__PURE__ */ new WeakMap();
  return function(r, o, i, s) {
    let l = t.get(r);
    if (!l) {
      l = /* @__PURE__ */ new WeakMap(), t.set(r, l);
      const f = e(r, o, i, s);
      return l.set(o, f), f;
    }
    const c = l.get(o);
    if (c === void 0) {
      const f = e(r, o, i, s);
      return l.set(o, f), f;
    }
    return c;
  };
}
function y1(e, t, n) {
  const o = a_(e).get(t);
  if (o == null)
    throw ut(`Schema is not configured to execute ${t} operation.`, {
      nodes: n
    });
  return o;
}
const Z4e = Xs(function(t) {
  const n = e6e(t);
  return new Set([...n].map((r) => r.name));
}), e6e = Xs(function(t) {
  const n = a_(t);
  return new Set(n.values());
}), a_ = Xs(function(t) {
  const n = /* @__PURE__ */ new Map(), r = t.getQueryType();
  r && n.set("query", r);
  const o = t.getMutationType();
  o && n.set("mutation", o);
  const i = t.getSubscriptionType();
  return i && n.set("subscription", i), n;
}), t6e = 80;
let WL = {};
function n6e(e) {
  return `
# ` + e.replace(/\n/g, `
# `);
}
function Ue(e, t) {
  return e ? e.filter((n) => n).join(t || "") : "";
}
function GL(e) {
  return (e == null ? void 0 : e.some((t) => t.includes(`
`))) ?? !1;
}
function r6e(e) {
  return (t, n, r, o, i) => {
    var d;
    const s = [], l = o.reduce((g, m) => (["fields", "arguments", "values"].includes(m) && g.name && s.push(g.name.value), g[m]), i[0]), c = [...s, (d = l == null ? void 0 : l.name) == null ? void 0 : d.value].filter(Boolean).join("."), f = [];
    return t.kind.includes("Definition") && WL[c] && f.push(...WL[c]), Ue([...f.map(n6e), t.description, e(t, n, r, o, i)], `
`);
  };
}
function hp(e) {
  return e && `  ${e.replace(/\n/g, `
  `)}`;
}
function hi(e) {
  return e && e.length !== 0 ? `{
${hp(Ue(e, `
`))}
}` : "";
}
function rn(e, t, n) {
  return t ? e + t + (n || "") : "";
}
function o6e(e, t = !1) {
  const n = e.replace(/"""/g, '\\"""');
  return (e[0] === " " || e[0] === "	") && e.indexOf(`
`) === -1 ? `"""${n.replace(/"$/, `"
`)}"""` : `"""
${t ? n : hp(n)}
"""`;
}
const QL = {
  Name: { leave: (e) => e.value },
  Variable: { leave: (e) => "$" + e.name },
  // Document
  Document: {
    leave: (e) => Ue(e.definitions, `

`)
  },
  OperationDefinition: {
    leave: (e) => {
      const t = rn("(", Ue(e.variableDefinitions, ", "), ")");
      return Ue([e.operation, Ue([e.name, t]), Ue(e.directives, " ")], " ") + " " + e.selectionSet;
    }
  },
  VariableDefinition: {
    leave: ({ variable: e, type: t, defaultValue: n, directives: r }) => e + ": " + t + rn(" = ", n) + rn(" ", Ue(r, " "))
  },
  SelectionSet: { leave: ({ selections: e }) => hi(e) },
  Field: {
    leave({ alias: e, name: t, arguments: n, directives: r, selectionSet: o }) {
      const i = rn("", e, ": ") + t;
      let s = i + rn("(", Ue(n, ", "), ")");
      return s.length > t6e && (s = i + rn(`(
`, hp(Ue(n, `
`)), `
)`)), Ue([s, Ue(r, " "), o], " ");
    }
  },
  Argument: { leave: ({ name: e, value: t }) => e + ": " + t },
  // Fragments
  FragmentSpread: {
    leave: ({ name: e, directives: t }) => "..." + e + rn(" ", Ue(t, " "))
  },
  InlineFragment: {
    leave: ({ typeCondition: e, directives: t, selectionSet: n }) => Ue(["...", rn("on ", e), Ue(t, " "), n], " ")
  },
  FragmentDefinition: {
    leave: ({ name: e, typeCondition: t, variableDefinitions: n, directives: r, selectionSet: o }) => (
      // Note: fragment variable definitions are experimental and may be changed
      // or removed in the future.
      `fragment ${e}${rn("(", Ue(n, ", "), ")")} on ${t} ${rn("", Ue(r, " "), " ")}` + o
    )
  },
  // Value
  IntValue: { leave: ({ value: e }) => e },
  FloatValue: { leave: ({ value: e }) => e },
  StringValue: {
    leave: ({ value: e, block: t }) => t ? o6e(e) : JSON.stringify(e)
  },
  BooleanValue: { leave: ({ value: e }) => e ? "true" : "false" },
  NullValue: { leave: () => "null" },
  EnumValue: { leave: ({ value: e }) => e },
  ListValue: { leave: ({ values: e }) => "[" + Ue(e, ", ") + "]" },
  ObjectValue: { leave: ({ fields: e }) => "{" + Ue(e, ", ") + "}" },
  ObjectField: { leave: ({ name: e, value: t }) => e + ": " + t },
  // Directive
  Directive: {
    leave: ({ name: e, arguments: t }) => "@" + e + rn("(", Ue(t, ", "), ")")
  },
  // Type
  NamedType: { leave: ({ name: e }) => e },
  ListType: { leave: ({ type: e }) => "[" + e + "]" },
  NonNullType: { leave: ({ type: e }) => e + "!" },
  // Type System Definitions
  SchemaDefinition: {
    leave: ({ directives: e, operationTypes: t }) => Ue(["schema", Ue(e, " "), hi(t)], " ")
  },
  OperationTypeDefinition: {
    leave: ({ operation: e, type: t }) => e + ": " + t
  },
  ScalarTypeDefinition: {
    leave: ({ name: e, directives: t }) => Ue(["scalar", e, Ue(t, " ")], " ")
  },
  ObjectTypeDefinition: {
    leave: ({ name: e, interfaces: t, directives: n, fields: r }) => Ue([
      "type",
      e,
      rn("implements ", Ue(t, " & ")),
      Ue(n, " "),
      hi(r)
    ], " ")
  },
  FieldDefinition: {
    leave: ({ name: e, arguments: t, type: n, directives: r }) => e + (GL(t) ? rn(`(
`, hp(Ue(t, `
`)), `
)`) : rn("(", Ue(t, ", "), ")")) + ": " + n + rn(" ", Ue(r, " "))
  },
  InputValueDefinition: {
    leave: ({ name: e, type: t, defaultValue: n, directives: r }) => Ue([e + ": " + t, rn("= ", n), Ue(r, " ")], " ")
  },
  InterfaceTypeDefinition: {
    leave: ({ name: e, interfaces: t, directives: n, fields: r }) => Ue([
      "interface",
      e,
      rn("implements ", Ue(t, " & ")),
      Ue(n, " "),
      hi(r)
    ], " ")
  },
  UnionTypeDefinition: {
    leave: ({ name: e, directives: t, types: n }) => Ue(["union", e, Ue(t, " "), rn("= ", Ue(n, " | "))], " ")
  },
  EnumTypeDefinition: {
    leave: ({ name: e, directives: t, values: n }) => Ue(["enum", e, Ue(t, " "), hi(n)], " ")
  },
  EnumValueDefinition: {
    leave: ({ name: e, directives: t }) => Ue([e, Ue(t, " ")], " ")
  },
  InputObjectTypeDefinition: {
    leave: ({ name: e, directives: t, fields: n }) => Ue(["input", e, Ue(t, " "), hi(n)], " ")
  },
  DirectiveDefinition: {
    leave: ({ name: e, arguments: t, repeatable: n, locations: r }) => "directive @" + e + (GL(t) ? rn(`(
`, hp(Ue(t, `
`)), `
)`) : rn("(", Ue(t, ", "), ")")) + (n ? " repeatable" : "") + " on " + Ue(r, " | ")
  },
  SchemaExtension: {
    leave: ({ directives: e, operationTypes: t }) => Ue(["extend schema", Ue(e, " "), hi(t)], " ")
  },
  ScalarTypeExtension: {
    leave: ({ name: e, directives: t }) => Ue(["extend scalar", e, Ue(t, " ")], " ")
  },
  ObjectTypeExtension: {
    leave: ({ name: e, interfaces: t, directives: n, fields: r }) => Ue([
      "extend type",
      e,
      rn("implements ", Ue(t, " & ")),
      Ue(n, " "),
      hi(r)
    ], " ")
  },
  InterfaceTypeExtension: {
    leave: ({ name: e, interfaces: t, directives: n, fields: r }) => Ue([
      "extend interface",
      e,
      rn("implements ", Ue(t, " & ")),
      Ue(n, " "),
      hi(r)
    ], " ")
  },
  UnionTypeExtension: {
    leave: ({ name: e, directives: t, types: n }) => Ue(["extend union", e, Ue(t, " "), rn("= ", Ue(n, " | "))], " ")
  },
  EnumTypeExtension: {
    leave: ({ name: e, directives: t, values: n }) => Ue(["extend enum", e, Ue(t, " "), hi(n)], " ")
  },
  InputObjectTypeExtension: {
    leave: ({ name: e, directives: t, fields: n }) => Ue(["extend input", e, Ue(t, " "), hi(n)], " ")
  }
};
Object.keys(QL).reduce((e, t) => ({
  ...e,
  [t]: {
    leave: r6e(QL[t].leave)
  }
}), {});
function i6e(e) {
  const t = e.loc;
  if (!t)
    return;
  const n = [];
  let r = t.startToken.prev;
  for (; r != null && r.kind === ve.COMMENT && r.next != null && r.prev != null && r.line + 1 === r.next.line && r.line !== r.prev.line; ) {
    const o = String(r.value);
    n.push(o), r = r.prev;
  }
  return n.length > 0 ? n.reverse().join(`
`) : void 0;
}
function s6e(e) {
  const t = e.split(/\r\n|[\n\r]/g), n = a6e(t);
  if (n !== 0)
    for (let r = 1; r < t.length; r++)
      t[r] = t[r].slice(n);
  for (; t.length > 0 && YL(t[0]); )
    t.shift();
  for (; t.length > 0 && YL(t[t.length - 1]); )
    t.pop();
  return t.join(`
`);
}
function a6e(e) {
  let t = null;
  for (let n = 1; n < e.length; n++) {
    const r = e[n], o = Y6(r);
    if (o !== r.length && (t === null || o < t) && (t = o, t === 0))
      break;
  }
  return t === null ? 0 : t;
}
function Y6(e) {
  let t = 0;
  for (; t < e.length && (e[t] === " " || e[t] === "	"); )
    t++;
  return t;
}
function YL(e) {
  return Y6(e) === e.length;
}
function l6e(e, t, n = {}) {
  let r;
  try {
    n.commentDescriptions && t.includes("#") ? (r = c6e(t, n), n.noLocation && (r = fr(pt(r), n))) : r = fr(new yh(t, e), n);
  } catch (o) {
    if (o.message.includes("EOF") && t.replace(/(\#[^*]*)/g, "").trim() === "")
      r = {
        kind: U.DOCUMENT,
        definitions: []
      };
    else
      throw o;
  }
  return {
    location: e,
    document: r
  };
}
function c6e(e, t = {}) {
  const n = fr(e, {
    ...t,
    noLocation: !1
  });
  return pn(n, {
    leave: (o) => {
      if (u6e(o)) {
        const i = i6e(o);
        if (i !== void 0) {
          const s = s6e(`
` + i), l = s.includes(`
`);
          return o.description ? {
            ...o,
            description: {
              ...o.description,
              value: o.description.value + `
` + s,
              block: !0
            }
          } : {
            ...o,
            description: {
              kind: U.STRING,
              value: s,
              block: l
            }
          };
        }
      }
    }
  });
}
function u6e(e) {
  return xy(e) || e.kind === U.FIELD_DEFINITION || e.kind === U.INPUT_VALUE_DEFINITION || e.kind === U.ENUM_VALUE_DEFINITION;
}
var it;
(function(e) {
  e.TYPE = "MapperKind.TYPE", e.SCALAR_TYPE = "MapperKind.SCALAR_TYPE", e.ENUM_TYPE = "MapperKind.ENUM_TYPE", e.COMPOSITE_TYPE = "MapperKind.COMPOSITE_TYPE", e.OBJECT_TYPE = "MapperKind.OBJECT_TYPE", e.INPUT_OBJECT_TYPE = "MapperKind.INPUT_OBJECT_TYPE", e.ABSTRACT_TYPE = "MapperKind.ABSTRACT_TYPE", e.UNION_TYPE = "MapperKind.UNION_TYPE", e.INTERFACE_TYPE = "MapperKind.INTERFACE_TYPE", e.ROOT_OBJECT = "MapperKind.ROOT_OBJECT", e.QUERY = "MapperKind.QUERY", e.MUTATION = "MapperKind.MUTATION", e.SUBSCRIPTION = "MapperKind.SUBSCRIPTION", e.DIRECTIVE = "MapperKind.DIRECTIVE", e.FIELD = "MapperKind.FIELD", e.COMPOSITE_FIELD = "MapperKind.COMPOSITE_FIELD", e.OBJECT_FIELD = "MapperKind.OBJECT_FIELD", e.ROOT_FIELD = "MapperKind.ROOT_FIELD", e.QUERY_ROOT_FIELD = "MapperKind.QUERY_ROOT_FIELD", e.MUTATION_ROOT_FIELD = "MapperKind.MUTATION_ROOT_FIELD", e.SUBSCRIPTION_ROOT_FIELD = "MapperKind.SUBSCRIPTION_ROOT_FIELD", e.INTERFACE_FIELD = "MapperKind.INTERFACE_FIELD", e.INPUT_OBJECT_FIELD = "MapperKind.INPUT_OBJECT_FIELD", e.ARGUMENT = "MapperKind.ARGUMENT", e.ENUM_VALUE = "MapperKind.ENUM_VALUE";
})(it || (it = {}));
function _u(e, t) {
  if (t) {
    const n = e[t.name];
    if (Ye(n))
      return n;
  }
}
function f6e(e) {
  if ("getFields" in e) {
    const t = e.getFields();
    for (const n in t)
      return t[n].name === "_fake";
  }
  return !1;
}
function d6e(e) {
  switch (e.name) {
    case Mp.name:
      return Mp;
    case Pp.name:
      return Pp;
    case Vt.name:
      return Vt;
    case Wt.name:
      return Wt;
    case $p.name:
      return $p;
    default:
      return e;
  }
}
function p6e(e, t) {
  const n = /* @__PURE__ */ Object.create(null);
  for (const m in e)
    n[m] = e[m];
  const r = /* @__PURE__ */ Object.create(null);
  for (const m in n) {
    const v = n[m];
    if (v == null || m.startsWith("__"))
      continue;
    const b = v.name;
    if (!b.startsWith("__")) {
      if (r[b] != null) {
        console.warn(`Duplicate schema type name ${b} found; keeping the existing one found in the schema`);
        continue;
      }
      r[b] = v;
    }
  }
  for (const m in r)
    r[m] = l(r[m]);
  const o = t.map((m) => i(m));
  return {
    typeMap: r,
    directives: o
  };
  function i(m) {
    if (yy(m))
      return m;
    const v = m.toConfig();
    return v.args = s(v.args), new ko(v);
  }
  function s(m) {
    const v = {};
    for (const b in m) {
      const w = m[b], _ = g(w.type);
      _ != null && (w.type = _, v[b] = w);
    }
    return v;
  }
  function l(m) {
    if (Ye(m)) {
      const v = m.toConfig(), b = {
        ...v,
        fields: () => c(v.fields),
        interfaces: () => d(v.interfaces)
      };
      return new zn(b);
    } else if (Ze(m)) {
      const v = m.toConfig(), b = {
        ...v,
        fields: () => c(v.fields)
      };
      return "interfaces" in b && (b.interfaces = () => d(v.interfaces)), new zr(b);
    } else if (Zt(m)) {
      const v = m.toConfig(), b = {
        ...v,
        types: () => d(v.types)
      };
      return new Ga(b);
    } else if (mt(m)) {
      const v = m.toConfig(), b = {
        ...v,
        fields: () => f(v.fields)
      };
      return new Gr(b);
    } else if (Lt(m)) {
      const v = m.toConfig();
      return new Or(v);
    } else if (pr(m)) {
      if (xh(m))
        return m;
      const v = m.toConfig();
      return new Zo(v);
    }
    throw new Error(`Unexpected schema type: ${m}`);
  }
  function c(m) {
    const v = {};
    for (const b in m) {
      const w = m[b], _ = g(w.type);
      _ != null && w.args && (w.type = _, w.args = s(w.args), v[b] = w);
    }
    return v;
  }
  function f(m) {
    const v = {};
    for (const b in m) {
      const w = m[b], _ = g(w.type);
      _ != null && (w.type = _, v[b] = w);
    }
    return v;
  }
  function d(m) {
    const v = [];
    for (const b of m) {
      const w = g(b);
      w != null && v.push(w);
    }
    return v;
  }
  function g(m) {
    if (vt(m)) {
      const v = g(m.ofType);
      return v != null ? new Ht(v) : null;
    } else if (He(m)) {
      const v = g(m.ofType);
      return v != null ? new et(v) : null;
    } else if (Ks(m)) {
      let v = n[m.name];
      return v === void 0 && (v = f6e(m) ? d6e(m) : l(m), r[v.name] = n[m.name] = v), v != null ? r[v.name] : null;
    }
    return null;
  }
}
function P0(e, t, n = null, r = null) {
  if (t == null)
    return t;
  const o = ol(e);
  if (Nr(o))
    return n != null ? n(o, t) : t;
  if (vt(o))
    return U4e(t).map((i) => P0(o.ofType, i, n, r));
  if (mt(o)) {
    const i = o.getFields(), s = {};
    for (const l in t) {
      const c = i[l];
      c != null && (s[l] = P0(c.type, t[l], n, r));
    }
    return r != null ? r(o, s) : s;
  }
}
function b1(e, t) {
  return P0(e, t, (n, r) => {
    try {
      return n.serialize(r);
    } catch {
      return r;
    }
  });
}
function h6e(e, t) {
  return P0(e, t, (n, r) => {
    try {
      return n.parseValue(r);
    } catch {
      return r;
    }
  });
}
function m6e(e, t = {}) {
  const n = J6(K6(KS(KL(g6e(KS(KL(e.getTypeMap(), e, b1), e, t, (l) => Nr(l)), e, t), e, h6e), e, t, (l) => !Nr(l)), e, t), e, t), r = e.getDirectives(), o = v6e(r, e, t), { typeMap: i, directives: s } = p6e(n, o);
  return new Dc({
    ...e.toConfig(),
    query: _u(i, _u(n, e.getQueryType())),
    mutation: _u(i, _u(n, e.getMutationType())),
    subscription: _u(i, _u(n, e.getSubscriptionType())),
    types: Object.values(i),
    directives: s
  });
}
function KS(e, t, n, r = () => !0) {
  const o = {};
  for (const i in e)
    if (!i.startsWith("__")) {
      const s = e[i];
      if (s == null || !r(s)) {
        o[i] = s;
        continue;
      }
      const l = b6e(t, n, i);
      if (l == null) {
        o[i] = s;
        continue;
      }
      const c = l(s, t);
      if (c === void 0) {
        o[i] = s;
        continue;
      }
      o[i] = c;
    }
  return o;
}
function g6e(e, t, n) {
  const r = T6e(n);
  return r ? KS(e, t, {
    [it.ENUM_TYPE]: (o) => {
      const i = o.toConfig(), s = i.values, l = {};
      for (const c in s) {
        const f = s[c], d = r(f, o.name, t, c);
        if (d === void 0)
          l[c] = f;
        else if (Array.isArray(d)) {
          const [g, m] = d;
          l[g] = m === void 0 ? f : m;
        } else
          d !== null && (l[c] = d);
      }
      return fv(new Or({
        ...i,
        values: l
      }));
    }
  }, (o) => Lt(o)) : e;
}
function KL(e, t, n) {
  const r = J6(e, t, {
    [it.ARGUMENT]: (o) => {
      if (o.defaultValue === void 0)
        return o;
      const i = $0(e, o.type);
      if (i != null)
        return {
          ...o,
          defaultValue: n(i, o.defaultValue)
        };
    }
  });
  return K6(r, t, {
    [it.INPUT_OBJECT_FIELD]: (o) => {
      if (o.defaultValue === void 0)
        return o;
      const i = $0(r, o.type);
      if (i != null)
        return {
          ...o,
          defaultValue: n(i, o.defaultValue)
        };
    }
  });
}
function $0(e, t) {
  if (vt(t)) {
    const n = $0(e, t.ofType);
    return n != null ? new Ht(n) : null;
  } else if (He(t)) {
    const n = $0(e, t.ofType);
    return n != null ? new et(n) : null;
  } else if (Ks(t)) {
    const n = e[t.name];
    return n ?? null;
  }
  return null;
}
function K6(e, t, n) {
  const r = {};
  for (const o in e)
    if (!o.startsWith("__")) {
      const i = e[o];
      if (!Ye(i) && !Ze(i) && !mt(i)) {
        r[o] = i;
        continue;
      }
      const s = w6e(t, n, o);
      if (s == null) {
        r[o] = i;
        continue;
      }
      const l = i.toConfig(), c = l.fields, f = {};
      for (const d in c) {
        const g = c[d], m = s(g, d, o, t);
        if (m === void 0)
          f[d] = g;
        else if (Array.isArray(m)) {
          const [v, b] = m;
          b.astNode != null && (b.astNode = {
            ...b.astNode,
            name: {
              ...b.astNode.name,
              value: v
            }
          }), f[v] = b === void 0 ? g : b;
        } else
          m !== null && (f[d] = m);
      }
      Ye(i) ? r[o] = fv(new zn({
        ...l,
        fields: f
      })) : Ze(i) ? r[o] = fv(new zr({
        ...l,
        fields: f
      })) : r[o] = fv(new Gr({
        ...l,
        fields: f
      }));
    }
  return r;
}
function J6(e, t, n) {
  const r = {};
  for (const o in e)
    if (!o.startsWith("__")) {
      const i = e[o];
      if (!Ye(i) && !Ze(i)) {
        r[o] = i;
        continue;
      }
      const s = x6e(n);
      if (s == null) {
        r[o] = i;
        continue;
      }
      const l = i.toConfig(), c = l.fields, f = {};
      for (const d in c) {
        const g = c[d], m = g.args;
        if (m == null) {
          f[d] = g;
          continue;
        }
        const v = Object.keys(m);
        if (!v.length) {
          f[d] = g;
          continue;
        }
        const b = {};
        for (const w of v) {
          const _ = m[w], S = s(_, d, o, t);
          if (S === void 0)
            b[w] = _;
          else if (Array.isArray(S)) {
            const [x, C] = S;
            b[x] = C;
          } else
            S !== null && (b[w] = S);
        }
        f[d] = {
          ...g,
          args: b
        };
      }
      Ye(i) ? r[o] = new zn({
        ...l,
        fields: f
      }) : Ze(i) ? r[o] = new zr({
        ...l,
        fields: f
      }) : r[o] = new Gr({
        ...l,
        fields: f
      });
    }
  return r;
}
function v6e(e, t, n) {
  const r = S6e(n);
  if (r == null)
    return e.slice();
  const o = [];
  for (const i of e) {
    const s = r(i, t);
    s === void 0 ? o.push(i) : s !== null && o.push(s);
  }
  return o;
}
function y6e(e, t) {
  var o, i, s;
  const n = e.getType(t), r = [it.TYPE];
  return Ye(n) ? (r.push(it.COMPOSITE_TYPE, it.OBJECT_TYPE), t === ((o = e.getQueryType()) == null ? void 0 : o.name) ? r.push(it.ROOT_OBJECT, it.QUERY) : t === ((i = e.getMutationType()) == null ? void 0 : i.name) ? r.push(it.ROOT_OBJECT, it.MUTATION) : t === ((s = e.getSubscriptionType()) == null ? void 0 : s.name) && r.push(it.ROOT_OBJECT, it.SUBSCRIPTION)) : mt(n) ? r.push(it.INPUT_OBJECT_TYPE) : Ze(n) ? r.push(it.COMPOSITE_TYPE, it.ABSTRACT_TYPE, it.INTERFACE_TYPE) : Zt(n) ? r.push(it.COMPOSITE_TYPE, it.ABSTRACT_TYPE, it.UNION_TYPE) : Lt(n) ? r.push(it.ENUM_TYPE) : pr(n) && r.push(it.SCALAR_TYPE), r;
}
function b6e(e, t, n) {
  const r = y6e(e, n);
  let o;
  const i = [...r];
  for (; !o && i.length > 0; ) {
    const s = i.pop();
    o = t[s];
  }
  return o ?? null;
}
function E6e(e, t) {
  var o, i, s;
  const n = e.getType(t), r = [it.FIELD];
  return Ye(n) ? (r.push(it.COMPOSITE_FIELD, it.OBJECT_FIELD), t === ((o = e.getQueryType()) == null ? void 0 : o.name) ? r.push(it.ROOT_FIELD, it.QUERY_ROOT_FIELD) : t === ((i = e.getMutationType()) == null ? void 0 : i.name) ? r.push(it.ROOT_FIELD, it.MUTATION_ROOT_FIELD) : t === ((s = e.getSubscriptionType()) == null ? void 0 : s.name) && r.push(it.ROOT_FIELD, it.SUBSCRIPTION_ROOT_FIELD)) : Ze(n) ? r.push(it.COMPOSITE_FIELD, it.INTERFACE_FIELD) : mt(n) && r.push(it.INPUT_OBJECT_FIELD), r;
}
function w6e(e, t, n) {
  const r = E6e(e, n);
  let o;
  const i = [...r];
  for (; !o && i.length > 0; ) {
    const s = i.pop();
    o = t[s];
  }
  return o ?? null;
}
function x6e(e) {
  const t = e[it.ARGUMENT];
  return t ?? null;
}
function S6e(e) {
  const t = e[it.DIRECTIVE];
  return t ?? null;
}
function T6e(e) {
  const t = e[it.ENUM_VALUE];
  return t ?? null;
}
function fv(e) {
  if (Ye(e)) {
    const t = e.toConfig();
    if (t.astNode != null) {
      const n = [];
      for (const r in t.fields) {
        const o = t.fields[r];
        o.astNode != null && n.push(o.astNode);
      }
      t.astNode = {
        ...t.astNode,
        kind: U.OBJECT_TYPE_DEFINITION,
        fields: n
      };
    }
    return t.extensionASTNodes != null && (t.extensionASTNodes = t.extensionASTNodes.map((n) => ({
      ...n,
      kind: U.OBJECT_TYPE_EXTENSION,
      fields: void 0
    }))), new zn(t);
  } else if (Ze(e)) {
    const t = e.toConfig();
    if (t.astNode != null) {
      const n = [];
      for (const r in t.fields) {
        const o = t.fields[r];
        o.astNode != null && n.push(o.astNode);
      }
      t.astNode = {
        ...t.astNode,
        kind: U.INTERFACE_TYPE_DEFINITION,
        fields: n
      };
    }
    return t.extensionASTNodes != null && (t.extensionASTNodes = t.extensionASTNodes.map((n) => ({
      ...n,
      kind: U.INTERFACE_TYPE_EXTENSION,
      fields: void 0
    }))), new zr(t);
  } else if (mt(e)) {
    const t = e.toConfig();
    if (t.astNode != null) {
      const n = [];
      for (const r in t.fields) {
        const o = t.fields[r];
        o.astNode != null && n.push(o.astNode);
      }
      t.astNode = {
        ...t.astNode,
        kind: U.INPUT_OBJECT_TYPE_DEFINITION,
        fields: n
      };
    }
    return t.extensionASTNodes != null && (t.extensionASTNodes = t.extensionASTNodes.map((n) => ({
      ...n,
      kind: U.INPUT_OBJECT_TYPE_EXTENSION,
      fields: void 0
    }))), new Gr(t);
  } else if (Lt(e)) {
    const t = e.toConfig();
    if (t.astNode != null) {
      const n = [];
      for (const r in t.values) {
        const o = t.values[r];
        o.astNode != null && n.push(o.astNode);
      }
      t.astNode = {
        ...t.astNode,
        values: n
      };
    }
    return t.extensionASTNodes != null && (t.extensionASTNodes = t.extensionASTNodes.map((n) => ({
      ...n,
      values: void 0
    }))), new Or(t);
  } else
    return e;
}
function l_(e) {
  return e.fieldNodes[0].alias != null ? e.fieldNodes[0].alias.value : e.fieldName;
}
function c_(e, t, n, r) {
  let o, i, s;
  r && (s = (f) => {
    const d = r();
    return Xt(d) ? d.then(() => f) : f;
  }), typeof e.return == "function" && (o = e.return, i = (f) => {
    const d = () => Promise.reject(f);
    return o.call(e).then(d, d);
  });
  function l(f) {
    return f.done ? s ? s(f) : f : JL(f.value, t).then(XL, i);
  }
  let c;
  if (n) {
    const f = n;
    c = (d) => JL(d, f).then(XL, i);
  }
  return {
    next() {
      return e.next().then(l, c);
    },
    return() {
      const f = o ? o.call(e).then(l, c) : Promise.resolve({ value: void 0, done: !0 });
      return s ? f.then(s) : f;
    },
    throw(f) {
      return typeof e.throw == "function" ? e.throw(f).then(l, c) : Promise.reject(f).catch(i);
    },
    [Symbol.asyncIterator]() {
      return this;
    }
  };
}
function JL(e, t) {
  return new Promise((n) => n(t(e)));
}
function XL(e) {
  return { value: e, done: !1 };
}
function X6(e, t, n, r, o, i, s) {
  if (e[r] = {
    kind: U.ARGUMENT,
    name: {
      kind: U.NAME,
      value: r
    },
    value: {
      kind: U.VARIABLE,
      name: {
        kind: U.NAME,
        value: o
      }
    }
  }, t[o] = {
    kind: U.VARIABLE_DEFINITION,
    variable: {
      kind: U.VARIABLE,
      name: {
        kind: U.NAME,
        value: o
      }
    },
    type: YS(i)
  }, s !== void 0) {
    n[o] = s;
    return;
  }
  o in n && delete n[o];
}
function Z6(e) {
  let t = 0;
  return (n) => {
    let r;
    do
      r = `_v${(t++).toString()}_${n}`;
    while (r in e);
    return r;
  };
}
function V0(e, t, n) {
  return n == null || t == null ? !1 : t === n ? !0 : Jt(t) && Jt(n) ? Fp(e, t, n) : !1;
}
function C6e(e) {
  const t = [], n = [];
  let r = !0;
  const o = (d) => {
    t.length !== 0 ? t.shift()({ value: d, done: !1 }) : n.push({ value: d, done: !1 });
  }, i = (d) => {
    t.length !== 0 ? t.shift()({ value: { errors: [d] }, done: !1 }) : n.push({ value: { errors: [d] }, done: !1 });
  }, s = () => {
    t.length !== 0 ? t.shift()({ done: !0 }) : n.push({ done: !0 });
  }, l = () => new Promise((d) => {
    if (n.length !== 0) {
      const g = n.shift();
      d(g);
    } else
      t.push(d);
  }), c = e.subscribe({
    next(d) {
      o(d);
    },
    error(d) {
      i(d);
    },
    complete() {
      s();
    }
  }), f = () => {
    if (r) {
      r = !1, c.unsubscribe();
      for (const d of t)
        d({ value: void 0, done: !0 });
      t.length = 0, n.length = 0;
    }
  };
  return {
    next() {
      return r ? l() : this.return();
    },
    return() {
      return f(), Promise.resolve({ value: void 0, done: !0 });
    },
    throw(d) {
      return f(), Promise.reject(d);
    },
    [Symbol.asyncIterator]() {
      return this;
    }
  };
}
class j0 extends Map {
  get [Symbol.toStringTag]() {
    return "AccumulatorMap";
  }
  add(t, n) {
    const r = this.get(t);
    r === void 0 ? this.set(t, [n]) : r.push(n);
  }
}
const k6e = new ko({
  name: "defer",
  description: "Directs the executor to defer this fragment when the `if` argument is true or undefined.",
  locations: [Fe.FRAGMENT_SPREAD, Fe.INLINE_FRAGMENT],
  args: {
    if: {
      type: new et(Wt),
      description: "Deferred when true or undefined.",
      defaultValue: !0
    },
    label: {
      type: Vt,
      description: "Unique name"
    }
  }
}), _6e = new ko({
  name: "stream",
  description: "Directs the executor to stream plural fields when the `if` argument is true or undefined.",
  locations: [Fe.FIELD],
  args: {
    if: {
      type: new et(Wt),
      description: "Stream when true or undefined.",
      defaultValue: !0
    },
    label: {
      type: Vt,
      description: "Unique name"
    },
    initialCount: {
      defaultValue: 0,
      type: Mp,
      description: "Number of items to return immediately"
    }
  }
});
function Yu(e, t, n, r, o, i, s, l) {
  for (const c of o.selections)
    switch (c.kind) {
      case U.FIELD: {
        if (!$w(n, c))
          continue;
        i.add(N6e(c), c);
        break;
      }
      case U.INLINE_FRAGMENT: {
        if (!$w(n, c) || !ZL(e, c, r))
          continue;
        const f = eR(n, c);
        if (f) {
          const d = new j0();
          Yu(e, t, n, r, c.selectionSet, d, s, l), s.push({
            label: f.label,
            fields: d
          });
        } else
          Yu(e, t, n, r, c.selectionSet, i, s, l);
        break;
      }
      case U.FRAGMENT_SPREAD: {
        const f = c.name.value;
        if (!$w(n, c))
          continue;
        const d = eR(n, c);
        if (l.has(f) && !d)
          continue;
        const g = t[f];
        if (!g || !ZL(e, g, r))
          continue;
        if (d || l.add(f), d) {
          const m = new j0();
          Yu(e, t, n, r, g.selectionSet, m, s, l), s.push({
            label: d.label,
            fields: m
          });
        } else
          Yu(e, t, n, r, g.selectionSet, i, s, l);
        break;
      }
    }
}
function u_(e, t, n, r, o) {
  const i = new j0(), s = [];
  return Yu(e, t, n, r, o, i, s, /* @__PURE__ */ new Set()), { fields: i, patches: s };
}
function $w(e, t) {
  const n = js(gy, t, e);
  if ((n == null ? void 0 : n.if) === !0)
    return !1;
  const r = js(my, t, e);
  return (r == null ? void 0 : r.if) !== !1;
}
function ZL(e, t, n) {
  const r = t.typeCondition;
  if (!r)
    return !0;
  const o = Jn(e, r);
  return o === n ? !0 : qn(o) ? e.getPossibleTypes(o).includes(n) : !1;
}
function N6e(e) {
  return e.alias ? e.alias.value : e.name.value;
}
function eR(e, t) {
  const n = js(k6e, t, e);
  if (n && n.if !== !1)
    return {
      label: typeof n.label == "string" ? n.label : void 0
    };
}
const O6e = J4e(function(t, n, r, o, i) {
  const s = new j0(), l = /* @__PURE__ */ new Set(), c = [], f = {
    fields: s,
    patches: c
  };
  for (const d of i)
    d.selectionSet && Yu(t, n, r, o, d.selectionSet, s, c, l);
  return f;
});
function A6e(e, t) {
  const n = PC(e, t);
  if (!n)
    throw new Error(`Cannot infer operation ${t || ""}`);
  return n;
}
const Cc = Xs(function(t) {
  return A6e(t.document, t.operationName);
});
function pl(e) {
  return (e == null ? void 0 : e[Symbol.asyncIterator]) != null;
}
async function D6e(e) {
  return { value: e, done: !0 };
}
const e8 = s_(function(t, n) {
  return function(...o) {
    return Reflect.apply(n, t, o);
  };
});
function I6e(e, t) {
  return new Proxy(e, {
    has(n, r) {
      return r === "return" ? !0 : Reflect.has(n, r);
    },
    get(n, r, o) {
      const i = Reflect.get(n, r, o);
      if (r === "return") {
        const s = i || D6e;
        return async function(c) {
          const f = await t(c);
          return Reflect.apply(s, n, [f]);
        };
      } else if (typeof i == "function")
        return e8(n, i);
      return i;
    }
  });
}
function L6e(e, t) {
  return new Proxy(e, {
    get(n, r, o) {
      const i = Reflect.get(n, r, o);
      return Symbol.asyncIterator === r ? function() {
        const l = Reflect.apply(i, n, []);
        return I6e(l, t);
      } : typeof i == "function" ? e8(n, i) : i;
    }
  });
}
function Bf(e, t, n) {
  return { prev: e, key: t, typename: n };
}
function Wr(e) {
  const t = [];
  let n = e;
  for (; n; )
    t.push(n.key), n = n.prev;
  return t.reverse();
}
function R6e(e) {
  return e.map((t) => typeof t == "number" ? "[" + t.toString() + "]" : "." + t).join("");
}
function JS(e, t, n) {
  if (typeof e == "object" && typeof t == "object") {
    if (Array.isArray(e) && Array.isArray(t))
      for (n = 0; n < t.length; n++)
        e[n] = JS(e[n], t[n]);
    else
      for (n in t) {
        if (n === "__proto__" || n === "constructor" || n === "prototype")
          break;
        e[n] = JS(e[n], t[n]);
      }
    return e;
  }
  return t;
}
function Vw(e, t, n) {
  t.split && (t = t.split("."));
  for (var r = 0, o = t.length, i = e, s, l; r < o && (l = t[r++], !(l === "__proto__" || l === "constructor" || l === "prototype")); )
    i = i[l] = r === o ? JS(i[l], n) : typeof (s = i[l]) == typeof t ? s : t[r] * 0 !== 0 || ~("" + t[r]).indexOf(".") ? {} : [];
}
function t8({ incrementalResult: e, executionResult: t }) {
  const n = ["data", ...e.path ?? []];
  if (e.items)
    for (const r of e.items)
      Vw(t, n, r), n[n.length - 1]++;
  e.data && Vw(t, n, e.data), e.errors && (t.errors = t.errors || [], t.errors.push(...e.errors)), e.extensions && Vw(t, "extensions", e.extensions), e.incremental && e.incremental.forEach((r) => {
    t8({
      incrementalResult: r,
      executionResult: t
    });
  });
}
function F6e(e) {
  return "subscribe" in e;
}
function M6e(e) {
  let t, n = {};
  return F6e(e) ? t = e : (t = $4e({
    ...e,
    webSocketImpl: q6,
    lazy: !0,
    connectionParams: () => {
      const r = (typeof e.connectionParams == "function" ? e.connectionParams() : e.connectionParams) || {};
      return Object.assign(r, n);
    }
  }), e.onClient && e.onClient(t)), function(o) {
    const { document: i, variables: s, operationName: l, extensions: c, operationType: f = Cc(o).operation } = o;
    c != null && c.connectionParams && typeof (c == null ? void 0 : c.connectionParams) == "object" && (n = Object.assign(n, c.connectionParams));
    const d = pt(i), g = t.iterate({
      query: d,
      variables: s,
      operationName: l,
      extensions: c
    });
    return f === "subscription" ? g : g.next().then(({ value: m }) => m);
  };
}
var n8 = globalThis.fetch, P6e = globalThis.FormData, $6e = globalThis.File, r8 = globalThis.TextDecoder, V6e = class {
  constructor({ uri: t, name: n, type: r }) {
    this.uri = t, this.name = n, this.type = r;
  }
};
const j6e = V6e;
var o8 = function(t) {
  return typeof File < "u" && t instanceof File || typeof Blob < "u" && t instanceof Blob || t instanceof j6e;
};
const U6e = /* @__PURE__ */ is(o8), B6e = o8;
var q6e = function(t, n = "", r = B6e) {
  const o = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
  function s(l, c, f) {
    let d = l;
    if (r(l)) {
      d = null;
      const g = o.get(l);
      g ? g.push(c) : o.set(l, [c]);
    } else {
      const g = Array.isArray(l) || typeof FileList < "u" && l instanceof FileList, m = l && l.constructor === Object;
      if (g || m) {
        const v = i.has(l);
        if (v ? d = i.get(l) : (d = g ? [] : {}, i.set(l, d)), !f.has(l)) {
          const b = c ? `${c}.` : "", w = new Set(f).add(l);
          if (g) {
            let _ = 0;
            for (const S of l) {
              const x = s(
                S,
                b + _++,
                w
              );
              v || d.push(x);
            }
          } else
            for (const _ in l) {
              const S = s(
                l[_],
                b + _,
                w
              );
              v || (d[_] = S);
            }
        }
      }
    }
    return d;
  }
  return {
    clone: s(t, n, /* @__PURE__ */ new Set()),
    files: o
  };
};
const z6e = /* @__PURE__ */ is(q6e);
function H6e(e) {
  return typeof e.createReadStream == "function";
}
function W6e({ query: e, variables: t, operationName: n, extensions: r }, { File: o = $6e, FormData: i = P6e }) {
  const s = Object.assign({}, t), { clone: l, files: c } = z6e(s, "variables", (b) => U6e(b) || (b == null ? void 0 : b.promise) || pl(b) || (b == null ? void 0 : b.then) || typeof (b == null ? void 0 : b.arrayBuffer) == "function");
  if (c.size === 0)
    return JSON.stringify({
      query: e,
      variables: t,
      operationName: n,
      extensions: r
    });
  const f = {}, d = [];
  let g = 0;
  for (const [b, w] of c)
    f[g] = w, d[g] = b, g++;
  const m = new i();
  m.append("operations", JSON.stringify({
    query: e,
    variables: l,
    operationName: n,
    extensions: r
  })), m.append("map", JSON.stringify(f));
  function v(b, w) {
    const _ = w.toString();
    if (b != null) {
      const S = b.filename || b.name || b.path || `blob-${_}`;
      if (Xt(b))
        return b.then((x) => v(x, w));
      if (G6e(b))
        m.append(_, b, S);
      else if (H6e(b)) {
        const x = b.createReadStream(), C = [];
        return Promise.resolve().then(async () => {
          for await (const N of x)
            N && C.push(...N);
          const E = new Uint8Array(C);
          m.append(_, new o([E], S, { type: b.mimetype }), S);
        });
      } else
        m.append(_, new o([b], S), S);
    }
  }
  return zt.all(d.map((b, w) => new zt(() => v(b, w)))).then(() => m).resolve();
}
function G6e(e) {
  return typeof e.arrayBuffer == "function";
}
const tR = /* @__PURE__ */ new WeakMap();
function Q6e(e) {
  let t = tR.get(e);
  return t || (t = pt(e), tR.set(e, t)), t;
}
function i8(e, t) {
  return L6e(e, () => {
    t.signal.aborted || t.abort();
  });
}
const nR = `

`;
async function* Y6e(e) {
  var r, o;
  const t = new r8();
  let n = "";
  e:
    for await (const i of e)
      for (n += typeof i == "string" ? i : t.decode(i); ; ) {
        const s = n.indexOf(nR);
        if (s === -1)
          continue e;
        const l = n.slice(0, s);
        n = n.slice(s + nR.length);
        const c = (r = l.split("data:")[1]) == null ? void 0 : r.trim();
        if (c) {
          const d = JSON.parse(c);
          yield d.payload || d;
        }
        if (((o = l.split("event:")[1]) == null ? void 0 : o.trim()) === "complete")
          break e;
      }
}
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
var XS = function(e, t) {
  return XS = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, r) {
    n.__proto__ = r;
  } || function(n, r) {
    for (var o in r)
      r.hasOwnProperty(o) && (n[o] = r[o]);
  }, XS(e, t);
};
function K6e(e, t) {
  XS(e, t);
  function n() {
    this.constructor = e;
  }
  e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n());
}
function Cf(e, t, n, r) {
  function o(i) {
    return i instanceof n ? i : new n(function(s) {
      s(i);
    });
  }
  return new (n || (n = Promise))(function(i, s) {
    function l(d) {
      try {
        f(r.next(d));
      } catch (g) {
        s(g);
      }
    }
    function c(d) {
      try {
        f(r.throw(d));
      } catch (g) {
        s(g);
      }
    }
    function f(d) {
      d.done ? i(d.value) : o(d.value).then(l, c);
    }
    f((r = r.apply(e, t || [])).next());
  });
}
function Xa(e, t) {
  var n = { label: 0, sent: function() {
    if (i[0] & 1)
      throw i[1];
    return i[1];
  }, trys: [], ops: [] }, r, o, i, s;
  return s = { next: l(0), throw: l(1), return: l(2) }, typeof Symbol == "function" && (s[Symbol.iterator] = function() {
    return this;
  }), s;
  function l(f) {
    return function(d) {
      return c([f, d]);
    };
  }
  function c(f) {
    if (r)
      throw new TypeError("Generator is already executing.");
    for (; n; )
      try {
        if (r = 1, o && (i = f[0] & 2 ? o.return : f[0] ? o.throw || ((i = o.return) && i.call(o), 0) : o.next) && !(i = i.call(o, f[1])).done)
          return i;
        switch (o = 0, i && (f = [f[0] & 2, i.value]), f[0]) {
          case 0:
          case 1:
            i = f;
            break;
          case 4:
            return n.label++, { value: f[1], done: !1 };
          case 5:
            n.label++, o = f[1], f = [0];
            continue;
          case 7:
            f = n.ops.pop(), n.trys.pop();
            continue;
          default:
            if (i = n.trys, !(i = i.length > 0 && i[i.length - 1]) && (f[0] === 6 || f[0] === 2)) {
              n = 0;
              continue;
            }
            if (f[0] === 3 && (!i || f[1] > i[0] && f[1] < i[3])) {
              n.label = f[1];
              break;
            }
            if (f[0] === 6 && n.label < i[1]) {
              n.label = i[1], i = f;
              break;
            }
            if (i && n.label < i[2]) {
              n.label = i[2], n.ops.push(f);
              break;
            }
            i[2] && n.ops.pop(), n.trys.pop();
            continue;
        }
        f = t.call(e, n);
      } catch (d) {
        f = [6, d], o = 0;
      } finally {
        r = i = 0;
      }
    if (f[0] & 5)
      throw f[1];
    return { value: f[0] ? f[1] : void 0, done: !0 };
  }
}
function qf(e) {
  var t = typeof Symbol == "function" && Symbol.iterator, n = t && e[t], r = 0;
  if (n)
    return n.call(e);
  if (e && typeof e.length == "number")
    return {
      next: function() {
        return e && r >= e.length && (e = void 0), { value: e && e[r++], done: !e };
      }
    };
  throw new TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
}
function lh(e) {
  return this instanceof lh ? (this.v = e, this) : new lh(e);
}
function J6e(e, t, n) {
  if (!Symbol.asyncIterator)
    throw new TypeError("Symbol.asyncIterator is not defined.");
  var r = n.apply(e, t || []), o, i = [];
  return o = {}, s("next"), s("throw"), s("return"), o[Symbol.asyncIterator] = function() {
    return this;
  }, o;
  function s(m) {
    r[m] && (o[m] = function(v) {
      return new Promise(function(b, w) {
        i.push([m, v, b, w]) > 1 || l(m, v);
      });
    });
  }
  function l(m, v) {
    try {
      c(r[m](v));
    } catch (b) {
      g(i[0][3], b);
    }
  }
  function c(m) {
    m.value instanceof lh ? Promise.resolve(m.value.v).then(f, d) : g(i[0][2], m);
  }
  function f(m) {
    l("next", m);
  }
  function d(m) {
    l("throw", m);
  }
  function g(m, v) {
    m(v), i.shift(), i.length && l(i[0][0], i[0][1]);
  }
}
var s8 = (
  /** @class */
  function(e) {
    K6e(t, e);
    function t(n) {
      var r = e.call(this, n) || this;
      return Object.defineProperty(r, "name", {
        value: "RepeaterOverflowError",
        enumerable: !1
      }), typeof Object.setPrototypeOf == "function" ? Object.setPrototypeOf(r, r.constructor.prototype) : r.__proto__ = r.constructor.prototype, typeof Error.captureStackTrace == "function" && Error.captureStackTrace(r, r.constructor), r;
    }
    return t;
  }(Error)
);
(function() {
  function e(t) {
    if (t < 0)
      throw new RangeError("Capacity may not be less than 0");
    this._c = t, this._q = [];
  }
  return Object.defineProperty(e.prototype, "empty", {
    get: function() {
      return this._q.length === 0;
    },
    enumerable: !1,
    configurable: !0
  }), Object.defineProperty(e.prototype, "full", {
    get: function() {
      return this._q.length >= this._c;
    },
    enumerable: !1,
    configurable: !0
  }), e.prototype.add = function(t) {
    if (this.full)
      throw new Error("Buffer full");
    this._q.push(t);
  }, e.prototype.remove = function() {
    if (this.empty)
      throw new Error("Buffer empty");
    return this._q.shift();
  }, e;
})();
(function() {
  function e(t) {
    if (t < 1)
      throw new RangeError("Capacity may not be less than 1");
    this._c = t, this._q = [];
  }
  return Object.defineProperty(e.prototype, "empty", {
    get: function() {
      return this._q.length === 0;
    },
    enumerable: !1,
    configurable: !0
  }), Object.defineProperty(e.prototype, "full", {
    get: function() {
      return !1;
    },
    enumerable: !1,
    configurable: !0
  }), e.prototype.add = function(t) {
    for (; this._q.length >= this._c; )
      this._q.shift();
    this._q.push(t);
  }, e.prototype.remove = function() {
    if (this.empty)
      throw new Error("Buffer empty");
    return this._q.shift();
  }, e;
})();
(function() {
  function e(t) {
    if (t < 1)
      throw new RangeError("Capacity may not be less than 1");
    this._c = t, this._q = [];
  }
  return Object.defineProperty(e.prototype, "empty", {
    get: function() {
      return this._q.length === 0;
    },
    enumerable: !1,
    configurable: !0
  }), Object.defineProperty(e.prototype, "full", {
    get: function() {
      return !1;
    },
    enumerable: !1,
    configurable: !0
  }), e.prototype.add = function(t) {
    this._q.length < this._c && this._q.push(t);
  }, e.prototype.remove = function() {
    if (this.empty)
      throw new Error("Buffer empty");
    return this._q.shift();
  }, e;
})();
function ZS(e) {
  e != null && typeof e.then == "function" && e.then(q0, q0);
}
var jw = 0, rR = 1, kc = 2, U0 = 3, eT = 4, B0 = 1024, q0 = function() {
};
function uf(e) {
  var t = e.err, n = Promise.resolve(e.execution).then(function(r) {
    if (t != null)
      throw t;
    return r;
  });
  return e.err = void 0, e.execution = n.then(function() {
  }, function() {
  }), e.pending === void 0 ? n : e.pending.then(function() {
    return n;
  });
}
function Ql(e, t) {
  var n = e.state >= U0;
  return Promise.resolve(t).then(function(r) {
    return !n && e.state >= eT ? uf(e).then(function(o) {
      return {
        value: o,
        done: !0
      };
    }) : { value: r, done: n };
  });
}
function f_(e, t) {
  var n, r;
  if (!(e.state >= kc))
    if (e.state = kc, e.onnext(), e.onstop(), e.err == null && (e.err = t), e.pushes.length === 0 && (typeof e.buffer > "u" || e.buffer.empty))
      mp(e);
    else
      try {
        for (var o = qf(e.pushes), i = o.next(); !i.done; i = o.next()) {
          var s = i.value;
          s.resolve();
        }
      } catch (l) {
        n = { error: l };
      } finally {
        try {
          i && !i.done && (r = o.return) && r.call(o);
        } finally {
          if (n)
            throw n.error;
        }
      }
}
function mp(e) {
  var t, n;
  if (!(e.state >= U0)) {
    e.state < kc && f_(e), e.state = U0, e.buffer = void 0;
    try {
      for (var r = qf(e.nexts), o = r.next(); !o.done; o = r.next()) {
        var i = o.value, s = e.pending === void 0 ? uf(e) : e.pending.then(function() {
          return uf(e);
        });
        i.resolve(Ql(e, s));
      }
    } catch (l) {
      t = { error: l };
    } finally {
      try {
        o && !o.done && (n = r.return) && n.call(r);
      } finally {
        if (t)
          throw t.error;
      }
    }
    e.pushes = [], e.nexts = [];
  }
}
function oR(e) {
  e.state >= eT || (e.state < U0 && mp(e), e.state = eT);
}
function X6e(e, t) {
  if (ZS(t), e.pushes.length >= B0)
    throw new s8("No more than " + B0 + " pending calls to push are allowed on a single repeater.");
  if (e.state >= kc)
    return Promise.resolve(void 0);
  var n = e.pending === void 0 ? Promise.resolve(t) : e.pending.then(function() {
    return t;
  });
  n = n.catch(function(c) {
    e.state < kc && (e.err = c), oR(e);
  });
  var r;
  if (e.nexts.length) {
    var o = e.nexts.shift();
    o.resolve(Ql(e, n)), e.nexts.length ? r = Promise.resolve(e.nexts[0].value) : r = new Promise(function(c) {
      return e.onnext = c;
    });
  } else
    typeof e.buffer < "u" && !e.buffer.full ? (e.buffer.add(n), r = Promise.resolve(void 0)) : r = new Promise(function(c) {
      return e.pushes.push({ resolve: c, value: n });
    });
  var i = !0, s = {}, l = r.catch(function(c) {
    if (i)
      throw c;
  });
  return s.then = function(c, f) {
    return i = !1, Promise.prototype.then.call(r, c, f);
  }, s.catch = function(c) {
    return i = !1, Promise.prototype.catch.call(r, c);
  }, s.finally = r.finally.bind(r), e.pending = n.then(function() {
    return l;
  }).catch(function(c) {
    e.err = c, oR(e);
  }), s;
}
function Z6e(e) {
  var t = f_.bind(null, e), n = new Promise(function(r) {
    return e.onstop = r;
  });
  return t.then = n.then.bind(n), t.catch = n.catch.bind(n), t.finally = n.finally.bind(n), t;
}
function e8e(e) {
  if (!(e.state >= rR)) {
    e.state = rR;
    var t = X6e.bind(null, e), n = Z6e(e);
    e.execution = new Promise(function(r) {
      return r(e.executor(t, n));
    }), e.execution.catch(function() {
      return f_(e);
    });
  }
}
var Mg = /* @__PURE__ */ new WeakMap(), zh = (
  /** @class */
  function() {
    function e(t, n) {
      Mg.set(this, {
        executor: t,
        buffer: n,
        err: void 0,
        state: jw,
        pushes: [],
        nexts: [],
        pending: void 0,
        execution: void 0,
        onnext: q0,
        onstop: q0
      });
    }
    return e.prototype.next = function(t) {
      ZS(t);
      var n = Mg.get(this);
      if (n === void 0)
        throw new Error("WeakMap error");
      if (n.nexts.length >= B0)
        throw new s8("No more than " + B0 + " pending calls to next are allowed on a single repeater.");
      if (n.state <= jw && e8e(n), n.onnext(t), typeof n.buffer < "u" && !n.buffer.empty) {
        var r = Ql(n, n.buffer.remove());
        if (n.pushes.length) {
          var o = n.pushes.shift();
          n.buffer.add(o.value), n.onnext = o.resolve;
        }
        return r;
      } else if (n.pushes.length) {
        var i = n.pushes.shift();
        return n.onnext = i.resolve, Ql(n, i.value);
      } else if (n.state >= kc)
        return mp(n), Ql(n, uf(n));
      return new Promise(function(s) {
        return n.nexts.push({ resolve: s, value: t });
      });
    }, e.prototype.return = function(t) {
      ZS(t);
      var n = Mg.get(this);
      if (n === void 0)
        throw new Error("WeakMap error");
      return mp(n), n.execution = Promise.resolve(n.execution).then(function() {
        return t;
      }), Ql(n, uf(n));
    }, e.prototype.throw = function(t) {
      var n = Mg.get(this);
      if (n === void 0)
        throw new Error("WeakMap error");
      return n.state <= jw || n.state >= kc || typeof n.buffer < "u" && !n.buffer.empty ? (mp(n), n.err == null && (n.err = t), Ql(n, uf(n))) : this.next(Promise.reject(t));
    }, e.prototype[Symbol.asyncIterator] = function() {
      return this;
    }, e.race = t8e, e.merge = n8e, e.zip = r8e, e.latest = o8e, e;
  }()
);
function E1(e, t) {
  var n, r, o = [], i = function(f) {
    f != null && typeof f[Symbol.asyncIterator] == "function" ? o.push(f[Symbol.asyncIterator]()) : f != null && typeof f[Symbol.iterator] == "function" ? o.push(f[Symbol.iterator]()) : o.push(function() {
      return J6e(this, arguments, function() {
        return Xa(this, function(m) {
          switch (m.label) {
            case 0:
              return t.yieldValues ? [4, lh(f)] : [3, 3];
            case 1:
              return [4, m.sent()];
            case 2:
              m.sent(), m.label = 3;
            case 3:
              return t.returnValues ? [4, lh(f)] : [3, 5];
            case 4:
              return [2, m.sent()];
            case 5:
              return [
                2
                /*return*/
              ];
          }
        });
      });
    }());
  };
  try {
    for (var s = qf(e), l = s.next(); !l.done; l = s.next()) {
      var c = l.value;
      i(c);
    }
  } catch (f) {
    n = { error: f };
  } finally {
    try {
      l && !l.done && (r = s.return) && r.call(s);
    } finally {
      if (n)
        throw n.error;
    }
  }
  return o;
}
function t8e(e) {
  var t = this, n = E1(e, { returnValues: !0 });
  return new zh(function(r, o) {
    return Cf(t, void 0, void 0, function() {
      var i, s, l, c, f, d;
      return Xa(this, function(g) {
        switch (g.label) {
          case 0:
            if (!n.length)
              return o(), [
                2
                /*return*/
              ];
            s = !1, o.then(function() {
              i(), s = !0;
            }), g.label = 1;
          case 1:
            g.trys.push([1, , 5, 7]), c = void 0, f = 0, d = function() {
              var m, v, b, w, _, S;
              return Xa(this, function(x) {
                switch (x.label) {
                  case 0:
                    m = f;
                    try {
                      for (v = (_ = void 0, qf(n)), b = v.next(); !b.done; b = v.next())
                        w = b.value, Promise.resolve(w.next()).then(function(C) {
                          C.done ? (o(), l === void 0 && (l = C)) : f === m && (f++, i(C));
                        }, function(C) {
                          return o(C);
                        });
                    } catch (C) {
                      _ = { error: C };
                    } finally {
                      try {
                        b && !b.done && (S = v.return) && S.call(v);
                      } finally {
                        if (_)
                          throw _.error;
                      }
                    }
                    return [4, new Promise(function(C) {
                      return i = C;
                    })];
                  case 1:
                    return c = x.sent(), c === void 0 ? [3, 3] : [4, r(c.value)];
                  case 2:
                    x.sent(), x.label = 3;
                  case 3:
                    return [
                      2
                      /*return*/
                    ];
                }
              });
            }, g.label = 2;
          case 2:
            return s ? [3, 4] : [5, d()];
          case 3:
            return g.sent(), [3, 2];
          case 4:
            return [2, l && l.value];
          case 5:
            return o(), [4, Promise.race(n.map(function(m) {
              return m.return && m.return();
            }))];
          case 6:
            return g.sent(), [
              7
              /*endfinally*/
            ];
          case 7:
            return [
              2
              /*return*/
            ];
        }
      });
    });
  });
}
function n8e(e) {
  var t = this, n = E1(e, { yieldValues: !0 });
  return new zh(function(r, o) {
    return Cf(t, void 0, void 0, function() {
      var i, s, l, c = this;
      return Xa(this, function(f) {
        switch (f.label) {
          case 0:
            if (!n.length)
              return o(), [
                2
                /*return*/
              ];
            i = [], s = !1, o.then(function() {
              var d, g;
              s = !0;
              try {
                for (var m = qf(i), v = m.next(); !v.done; v = m.next()) {
                  var b = v.value;
                  b();
                }
              } catch (w) {
                d = { error: w };
              } finally {
                try {
                  v && !v.done && (g = m.return) && g.call(m);
                } finally {
                  if (d)
                    throw d.error;
                }
              }
            }), f.label = 1;
          case 1:
            return f.trys.push([1, , 3, 4]), [4, Promise.all(n.map(function(d, g) {
              return Cf(c, void 0, void 0, function() {
                var m, v;
                return Xa(this, function(b) {
                  switch (b.label) {
                    case 0:
                      b.trys.push([0, , 6, 9]), b.label = 1;
                    case 1:
                      return s ? [3, 5] : (Promise.resolve(d.next()).then(function(w) {
                        return i[g](w);
                      }, function(w) {
                        return o(w);
                      }), [4, new Promise(function(w) {
                        i[g] = w;
                      })]);
                    case 2:
                      return m = b.sent(), m === void 0 ? [3, 4] : m.done ? (l = m, [
                        2
                        /*return*/
                      ]) : [4, r(m.value)];
                    case 3:
                      b.sent(), b.label = 4;
                    case 4:
                      return [3, 1];
                    case 5:
                      return [3, 9];
                    case 6:
                      return v = d.return, v ? [4, d.return()] : [3, 8];
                    case 7:
                      v = b.sent(), b.label = 8;
                    case 8:
                      return [
                        7
                        /*endfinally*/
                      ];
                    case 9:
                      return [
                        2
                        /*return*/
                      ];
                  }
                });
              });
            }))];
          case 2:
            return f.sent(), [2, l && l.value];
          case 3:
            return o(), [
              7
              /*endfinally*/
            ];
          case 4:
            return [
              2
              /*return*/
            ];
        }
      });
    });
  });
}
function r8e(e) {
  var t = this, n = E1(e, { returnValues: !0 });
  return new zh(function(r, o) {
    return Cf(t, void 0, void 0, function() {
      var i, s, l, c;
      return Xa(this, function(f) {
        switch (f.label) {
          case 0:
            if (!n.length)
              return o(), [2, []];
            s = !1, o.then(function() {
              i(), s = !0;
            }), f.label = 1;
          case 1:
            f.trys.push([1, , 6, 8]), f.label = 2;
          case 2:
            return s ? [3, 5] : (Promise.all(n.map(function(d) {
              return d.next();
            })).then(function(d) {
              return i(d);
            }, function(d) {
              return o(d);
            }), [4, new Promise(function(d) {
              return i = d;
            })]);
          case 3:
            return l = f.sent(), l === void 0 ? [
              2
              /*return*/
            ] : (c = l.map(function(d) {
              return d.value;
            }), l.some(function(d) {
              return d.done;
            }) ? [2, c] : [4, r(c)]);
          case 4:
            return f.sent(), [3, 2];
          case 5:
            return [3, 8];
          case 6:
            return o(), [4, Promise.all(n.map(function(d) {
              return d.return && d.return();
            }))];
          case 7:
            return f.sent(), [
              7
              /*endfinally*/
            ];
          case 8:
            return [
              2
              /*return*/
            ];
        }
      });
    });
  });
}
function o8e(e) {
  var t = this, n = E1(e, {
    yieldValues: !0,
    returnValues: !0
  });
  return new zh(function(r, o) {
    return Cf(t, void 0, void 0, function() {
      var i, s, l, c, f, d = this;
      return Xa(this, function(g) {
        switch (g.label) {
          case 0:
            if (!n.length)
              return o(), [2, []];
            s = [], l = !1, o.then(function() {
              var m, v;
              i();
              try {
                for (var b = qf(s), w = b.next(); !w.done; w = b.next()) {
                  var _ = w.value;
                  _();
                }
              } catch (S) {
                m = { error: S };
              } finally {
                try {
                  w && !w.done && (v = b.return) && v.call(b);
                } finally {
                  if (m)
                    throw m.error;
                }
              }
              l = !0;
            }), g.label = 1;
          case 1:
            return g.trys.push([1, , 5, 7]), Promise.all(n.map(function(m) {
              return m.next();
            })).then(function(m) {
              return i(m);
            }, function(m) {
              return o(m);
            }), [4, new Promise(function(m) {
              return i = m;
            })];
          case 2:
            return c = g.sent(), c === void 0 ? [
              2
              /*return*/
            ] : (f = c.map(function(m) {
              return m.value;
            }), c.every(function(m) {
              return m.done;
            }) ? [2, f] : [4, r(f.slice())]);
          case 3:
            return g.sent(), [4, Promise.all(n.map(function(m, v) {
              return Cf(d, void 0, void 0, function() {
                var b;
                return Xa(this, function(w) {
                  switch (w.label) {
                    case 0:
                      if (c[v].done)
                        return [2, c[v].value];
                      w.label = 1;
                    case 1:
                      return l ? [3, 4] : (Promise.resolve(m.next()).then(function(_) {
                        return s[v](_);
                      }, function(_) {
                        return o(_);
                      }), [4, new Promise(function(_) {
                        return s[v] = _;
                      })]);
                    case 2:
                      return b = w.sent(), b === void 0 ? [2, c[v].value] : b.done ? [2, b.value] : (f[v] = b.value, [4, r(f.slice())]);
                    case 3:
                      return w.sent(), [3, 1];
                    case 4:
                      return [
                        2
                        /*return*/
                      ];
                  }
                });
              });
            }))];
          case 4:
            return [2, g.sent()];
          case 5:
            return o(), [4, Promise.all(n.map(function(m) {
              return m.return && m.return();
            }))];
          case 6:
            return g.sent(), [
              7
              /*endfinally*/
            ];
          case 7:
            return [
              2
              /*return*/
            ];
        }
      });
    });
  });
}
function i8e(e) {
  const t = new r8();
  return new zh(function(r, o) {
    const i = e.getReader();
    async function s() {
      const { done: l, value: c } = await i.read();
      if (l)
        return o();
      if (c) {
        const f = typeof c == "string" ? c : t.decode(c, { stream: !0 });
        for (const d of f.split(`

`))
          if (d) {
            const g = d.split("event: ")[1], m = d.split("data: ")[1];
            if (g === "complete")
              return o();
            if (m) {
              const v = JSON.parse(m);
              await r(v.payload || v);
            }
          }
      }
      return s();
    }
    return o.finally(() => i.cancel()), s();
  });
}
function s8e(e) {
  return e && typeof e.getReader == "function";
}
function a8e(e, t) {
  const n = e.body;
  if (n) {
    if (pl(n)) {
      const r = Y6e(n);
      return t ? i8(r, t) : r;
    }
    if (s8e(n))
      return i8e(n);
  }
  throw new Error("Response body is expected to be a readable stream but got; " + Kn(n));
}
async function l8e(e, t) {
  const n = e.headers["content-type"];
  if (!n || !~n.indexOf("multipart/mixed"))
    return e;
  const r = n.indexOf("boundary="), o = r + 9, i = n.indexOf(";", o);
  return async function* (s, l, c) {
    const f = !c || !c.multiple;
    let d = Buffer.byteLength(l), g = Buffer.alloc(0), m = !0, v = [];
    e:
      for await (const b of s) {
        const w = b.indexOf(l);
        let _ = g.byteLength;
        for (g = Buffer.concat([g, b]), ~w ? _ += w : _ = g.indexOf(l), v = []; ~_; ) {
          const S = g.slice(0, _), x = g.slice(_ + d);
          if (m)
            m = !1, l = `\r
` + l, d += 2;
          else {
            const C = {}, E = S.indexOf(`\r
\r
`) + 4, N = String(g.slice(0, E)).trim().split(`\r
`);
            let I;
            for (; I = N.shift(); )
              I = I.split(": "), C[I.shift().toLowerCase()] = I.join(": ");
            const D = S.lastIndexOf(`\r
`, E);
            let A = S.slice(E, D > -1 ? void 0 : D), F = !1;
            if (I = C["content-type"], I && ~I.indexOf("application/json"))
              try {
                A = JSON.parse(String(A)), F = !0;
              } catch {
              }
            if (I = { headers: C, body: A, json: F }, f ? yield I : v.push(I), x[0] === 45 && x[1] === 45)
              break e;
          }
          g = x, _ = g.indexOf(l);
        }
        v.length && (yield v);
      }
    v.length && (yield v);
  }(e, `--${~r ? n.substring(o, i > -1 ? i : void 0).replace(/['"]/g, "").trim() : "-"}`, t);
}
function c8e(e) {
  return e != null && typeof e == "object" && "pipe" in e;
}
async function u8e(e, t) {
  const n = e.body, r = e.headers.get("content-type") || "";
  let o;
  if (c8e(n)) {
    n.headers = {
      "content-type": r
    };
    const l = await l8e(n);
    "next" in l && (o = l);
  } else {
    const l = await XB(e);
    "next" in l && (o = l);
  }
  const i = {};
  if (o == null)
    return i;
  const s = c_(o, (l) => {
    if (l.json) {
      const c = l.body;
      return t8({
        incrementalResult: c,
        executionResult: i
      }), i;
    }
  });
  return t ? i8(s, t) : s;
}
const a8 = Xs(function(t) {
  var n;
  return t.operation === "query" && ((n = t.directives) == null ? void 0 : n.some((r) => r.name.value === "live"));
});
function f8e({ baseUrl: e = "", query: t, variables: n, operationName: r, extensions: o }) {
  const i = "https://dummyhostname.com", s = e.startsWith("http") ? e : e != null && e.startsWith("/") ? `${i}${e}` : `${i}/${e}`, l = new URL(s);
  return l.searchParams.set("query", f3(t)), n && Object.keys(n).length > 0 && l.searchParams.set("variables", JSON.stringify(n)), r && l.searchParams.set("operationName", r), o && l.searchParams.set("extensions", JSON.stringify(o)), l.toString().replace(i, "");
}
function d8e(e) {
  const t = (e == null ? void 0 : e.print) ?? Q6e, n = (r) => {
    var w, _, S, x, C;
    const o = ((w = r.extensions) == null ? void 0 : w.fetch) ?? (e == null ? void 0 : e.fetch) ?? n8;
    let i, s = ((_ = r.extensions) == null ? void 0 : _.method) || (e == null ? void 0 : e.method);
    const l = Cc(r), c = l.operation;
    (e != null && e.useGETForQueries || (S = r.extensions) != null && S.useGETForQueries) && c === "query" && (s = "GET");
    let f = "application/graphql-response+json, application/json, multipart/mixed";
    c === "subscription" || a8(l) ? (s || (s = "GET"), f = "text/event-stream") : s || (s = "POST");
    const d = ((x = r.extensions) == null ? void 0 : x.endpoint) || (e == null ? void 0 : e.endpoint) || "/graphql", g = { accept: f };
    if (e != null && e.headers && Object.assign(g, typeof (e == null ? void 0 : e.headers) == "function" ? e.headers(r) : e == null ? void 0 : e.headers), (C = r.extensions) != null && C.headers) {
      const { headers: E, ...N } = r.extensions;
      Object.assign(g, E), r.extensions = N;
    }
    const m = t(r.document);
    let v;
    e != null && e.timeout && (i = new AbortController(), v = setTimeout(() => {
      i != null && i.signal.aborted || i == null || i.abort("timeout");
    }, e.timeout));
    const b = {};
    return new zt(() => {
      switch (s) {
        case "GET": {
          const E = f8e({
            baseUrl: d,
            query: m,
            variables: r.variables,
            operationName: r.operationName,
            extensions: r.extensions
          }), N = {
            method: "GET",
            headers: g,
            signal: i == null ? void 0 : i.signal
          };
          return (e == null ? void 0 : e.credentials) != null && (N.credentials = e.credentials), o(E, N, r.context, r.info);
        }
        case "POST":
          return new zt(() => W6e({
            query: m,
            variables: r.variables,
            operationName: r.operationName,
            extensions: r.extensions
          }, {
            File: e == null ? void 0 : e.File,
            FormData: e == null ? void 0 : e.FormData
          })).then((E) => {
            typeof E == "string" && !g["content-type"] && (g["content-type"] = "application/json");
            const N = {
              method: "POST",
              body: E,
              headers: g,
              signal: i == null ? void 0 : i.signal
            };
            return (e == null ? void 0 : e.credentials) != null && (N.credentials = e.credentials), o(d, N, r.context, r.info);
          }).resolve();
      }
    }).then((E) => {
      if (b.status = E.status, b.statusText = E.statusText, v != null && clearTimeout(v), (e == null ? void 0 : e.retry) != null && !E.status.toString().startsWith("2"))
        throw new Error(E.statusText || `HTTP Error: ${E.status}`);
      const N = E.headers.get("content-type");
      return N != null && N.includes("text/event-stream") ? a8e(E, i) : N != null && N.includes("multipart/mixed") ? u8e(E, i) : E.text();
    }).then((E) => {
      if (typeof E == "string") {
        if (E)
          try {
            const N = JSON.parse(E);
            return N.data == null && (N.errors == null || N.errors.length === 0) ? {
              errors: [
                ut('Unexpected empty "data" and "errors" fields', {
                  extensions: {
                    requestBody: {
                      query: m,
                      operationName: r.operationName
                    },
                    responseDetails: b
                  }
                })
              ]
            } : N;
          } catch (N) {
            return {
              errors: [
                ut(`Unexpected response: ${JSON.stringify(E)}`, {
                  extensions: {
                    requestBody: {
                      query: m,
                      operationName: r.operationName
                    },
                    responseDetails: b
                  },
                  originalError: N
                })
              ]
            };
          }
      } else
        return E;
    }).catch((E) => {
      var N;
      return typeof E == "string" ? {
        errors: [
          ut(E, {
            extensions: {
              requestBody: {
                query: m,
                operationName: r.operationName
              },
              responseDetails: b
            }
          })
        ]
      } : E.name === "GraphQLError" ? {
        errors: [E]
      } : E.name === "TypeError" && E.message === "fetch failed" ? {
        errors: [
          ut(`fetch failed to ${d}`, {
            extensions: {
              requestBody: {
                query: m,
                operationName: r.operationName
              },
              responseDetails: b
            },
            originalError: E
          })
        ]
      } : E.name === "AbortError" && ((N = i == null ? void 0 : i.signal) != null && N.reason) ? {
        errors: [
          ut("The operation was aborted. reason: " + i.signal.reason, {
            extensions: {
              requestBody: {
                query: m,
                operationName: r.operationName
              },
              responseDetails: b
            },
            originalError: E
          })
        ]
      } : E.message ? {
        errors: [
          ut(E.message, {
            extensions: {
              requestBody: {
                query: m,
                operationName: r.operationName
              },
              responseDetails: b
            },
            originalError: E
          })
        ]
      } : {
        errors: [
          ut("Unknown error", {
            extensions: {
              requestBody: {
                query: m,
                operationName: r.operationName
              },
              responseDetails: b
            },
            originalError: E
          })
        ]
      };
    }).resolve();
  };
  return (e == null ? void 0 : e.retry) != null ? function(o) {
    let i, s = 0;
    function l() {
      return s++, s > e.retry ? i ?? {
        errors: [ut("No response returned from fetch")]
      } : new zt(() => n(o)).then((c) => {
        var f;
        return i = c, (f = i == null ? void 0 : i.errors) != null && f.length ? l() : i;
      }).resolve();
    }
    return l();
  } : n;
}
var Au = null;
typeof WebSocket < "u" ? Au = WebSocket : typeof MozWebSocket < "u" ? Au = MozWebSocket : typeof global < "u" ? Au = global.WebSocket || global.MozWebSocket : typeof window < "u" ? Au = window.WebSocket || window.MozWebSocket : typeof self < "u" && (Au = self.WebSocket || self.MozWebSocket);
const iR = Au;
var Bo;
(function(e) {
  e.CONNECTION_INIT = "connection_init", e.CONNECTION_ACK = "connection_ack", e.CONNECTION_ERROR = "connection_error", e.CONNECTION_KEEP_ALIVE = "ka", e.START = "start", e.STOP = "stop", e.CONNECTION_TERMINATE = "connection_terminate", e.DATA = "data", e.ERROR = "error", e.COMPLETE = "complete";
})(Bo || (Bo = {}));
function p8e(e, t, n) {
  let r = {}, o = null;
  const i = (l = (c) => console.error(c)) => {
    (o == null || o.readyState !== iR.OPEN) && (o = new t(e, "graphql-ws", {
      followRedirects: !0,
      headers: n == null ? void 0 : n.headers,
      rejectUnauthorized: !1,
      skipUTF8Validation: !0
    }), o.onopen = () => {
      let c = {};
      switch (typeof (n == null ? void 0 : n.connectionParams)) {
        case "function":
          c = n == null ? void 0 : n.connectionParams();
          break;
        case "object":
          c = n == null ? void 0 : n.connectionParams;
          break;
      }
      c = Object.assign(c, r), o.send(JSON.stringify({
        type: Bo.CONNECTION_INIT,
        payload: c
      }), (f) => {
        f && l(f);
      });
    }, o.onerror = (c) => {
      l(c.error);
    }, o.onclose = () => {
      o = null;
    });
  }, s = () => {
    o != null && (o.send(JSON.stringify({
      type: Bo.CONNECTION_TERMINATE
    })), o.terminate(), o = null);
  };
  return function(c) {
    var d, g;
    (d = c.extensions) != null && d.connectionParams && typeof ((g = c.extensions) == null ? void 0 : g.connectionParams) == "object" && (r = Object.assign(r, c.extensions.connectionParams));
    const f = Date.now().toString();
    return C6e({
      subscribe(m) {
        function v(b) {
          m.error(b);
        }
        if (i(), o == null)
          throw new Error("WebSocket connection is not found!");
        return o.onmessage = (b) => {
          const w = JSON.parse(b.data.toString("utf-8"));
          switch (w.type) {
            case Bo.CONNECTION_ACK: {
              if (o == null)
                throw new Error("WebSocket connection is not found!");
              o.send(JSON.stringify({
                type: Bo.START,
                id: f,
                payload: {
                  query: pt(c.document),
                  variables: c.variables,
                  operationName: c.operationName
                }
              }), (_) => {
                _ && v(_);
              });
              break;
            }
            case Bo.CONNECTION_ERROR: {
              m.error(w.payload);
              break;
            }
            case Bo.CONNECTION_KEEP_ALIVE:
              break;
            case Bo.DATA: {
              m.next(w.payload);
              break;
            }
            case Bo.COMPLETE: {
              o != null && o.send(JSON.stringify({
                type: Bo.CONNECTION_TERMINATE
              }), (_) => {
                _ && v(_);
              }), m.complete(), s();
              break;
            }
          }
        }, {
          unsubscribe: () => {
            (o == null ? void 0 : o.readyState) === iR.OPEN && (o == null || o.send(JSON.stringify({
              type: Bo.STOP,
              id: f
            }))), s();
          }
        };
      }
    });
  };
}
const d_ = s_(function(t, n) {
  const r = n.transforms;
  return r == null ? t : r.reduce((o, i) => {
    var s;
    return ((s = i.transformSchema) == null ? void 0 : s.call(i, o, n)) || o;
  }, t);
});
class h8e {
  constructor(t) {
    this.schema = t.schema, this.executor = t.executor, this.batch = t.batch, this.batchingOptions = t.batchingOptions, this.createProxyingResolver = t.createProxyingResolver, this.transforms = t.transforms ?? [], this.merge = t.merge;
  }
  get transformedSchema() {
    var t, n;
    return this._transformedSchema || (((n = (t = globalThis.process) == null ? void 0 : t.env) == null ? void 0 : n.DEBUG) != null && console.warn("Transformed schema is not set yet. Returning a dummy one."), this._transformedSchema = d_(this.schema, this)), this._transformedSchema;
  }
  set transformedSchema(t) {
    this._transformedSchema = t;
  }
}
const kf = Symbol.for("subschemaErrors"), p_ = Symbol.for("initialSubschema"), w1 = Symbol.for("subschemaMap");
function h_(e) {
  return e[kf] !== void 0;
}
function m8e(e, t, n, r) {
  return Object.defineProperties(e, {
    [p_]: { value: n },
    [w1]: { value: r },
    [kf]: { value: t }
  }), e;
}
function l8(e, t) {
  return e[w1][t] ?? e[p_];
}
function c8(e) {
  return e[kf];
}
const g8e = [], z0 = /* @__PURE__ */ Object.create(null), v8e = Xs(function(e) {
  return [e];
});
function y8e(e, t, n, r, o) {
  var l;
  const s = e.delegationPlanBuilder(o.schema, n, o.variableValues != null && Object.keys(o.variableValues).length > 0 ? o.variableValues : z0, o.fragments != null && Object.keys(o.fragments).length > 0 ? o.fragments : z0, (l = o.fieldNodes) != null && l.length ? o.fieldNodes.length === 1 ? v8e(o.fieldNodes[0]) : o.fieldNodes : g8e).reduce((c, f) => {
    function d() {
      return b8e(e, f, t, r, o);
    }
    return Xt(c) ? c.then(d) : d();
  }, void 0);
  return Xt(s) ? s.then(() => t) : t;
}
function Pg(e, t, n, r, o, i, s, l) {
  if (e instanceof Error || e == null) {
    const d = t.transformedSchema || i.schema, g = d.getType(r.__typename), { fields: m } = u_(d, z0, z0, g, n), v = {};
    for (const [b, w] of m) {
      const _ = [...s, b];
      e instanceof he ? v[b] = i_(e, _) : e instanceof Error ? v[b] = wn(e, w, _) : v[b] = null;
    }
    e = v;
  } else
    e[kf] && l.push(...e[kf]);
  const c = e[p_], f = e[w1];
  for (const d in e) {
    if (d === "__proto__")
      continue;
    const g = r[d], m = e[d];
    (m != null || g == null) && (r[d] = m), o[d] = (f == null ? void 0 : f[d]) ?? c;
  }
}
function b8e(e, t, n, r, o) {
  const i = n[kf], s = Br(o.path), l = n[w1], c = [];
  for (const [f, d] of t) {
    const m = (f.transformedSchema || o.schema).getType(n.__typename), v = e.resolvers.get(f);
    if (v)
      try {
        const b = v(n, r, o, f, d, void 0, m);
        Xt(b) ? c.push(b.then((w) => Pg(w, f, d, n, l, o, s, i)).catch((w) => Pg(w, f, d, n, l, o, s, i))) : Pg(b, f, d, n, l, o, s, i);
      } catch (b) {
        Pg(b, f, d, n, l, o, s, i);
      }
  }
  if (c.length)
    return c.length === 1 ? c[0] : Promise.all(c);
}
function Hh(e, t, n, r, o, i = S8e(o), s) {
  const l = ol(i);
  if (e instanceof Error)
    return e;
  if (e == null)
    return x8e(t);
  if ("parseValue" in l)
    return l.parseValue(e);
  if (Jt(l))
    return E8e(l, e, t, n, r, o, s);
  if (vt(l))
    return Array.isArray(e) ? w8e(l, e, t, n, r, o, s) : Hh(e, t, n, r, o, l.ofType, s);
}
function E8e(e, t, n, r, o, i, s) {
  var g;
  if (h_(t) || m8e(t, n, r, /* @__PURE__ */ Object.create(null)), s || i == null)
    return t;
  const l = (g = i.schema.extensions) == null ? void 0 : g.stitchingInfo;
  if (l == null)
    return t;
  const c = qn(e) ? t.__typename : e.name, f = l.mergedTypes[c];
  let d;
  return f != null && (d = f.targetSubschemas.get(r)), !d || !d.length ? t : y8e(f, t, r, o, i);
}
function w8e(e, t, n, r, o, i, s) {
  return t.map((l) => Hh(l, n, r, o, i, e.ofType, s));
}
const sR = /* @__PURE__ */ new WeakMap();
function x8e(e) {
  if (e.length) {
    const t = [];
    for (const n of e)
      sR.has(n) || (t.push(n), sR.set(n, !0));
    if (t.length) {
      if (t.length === 1)
        return t[0];
      const n = new AggregateError(t, t.map((r) => r.message).join(`, 
`));
      return wn(n, void 0, t[0].path);
    }
  }
  return null;
}
function S8e(e) {
  if (e == null)
    throw new Error("Return type cannot be inferred without a source schema.");
  return e.returnType;
}
function T8e(e = {
  data: null,
  errors: []
}, t) {
  const { context: n, info: r, fieldName: o = C8e(r), subschema: i, returnType: s = k8e(r), skipTypeMerging: l, onLocatedError: c } = t, { data: f, unpathedErrors: d } = u8(e.data == null ? void 0 : e.data[o], e.errors == null ? [] : e.errors, r != null && r.path ? Br(r.path) : void 0, c);
  return Hh(f, d, i, n, r, s, l);
}
function u8(e, t, n, r, o = 1) {
  var l;
  if (e == null) {
    if (!t.length)
      return { data: null, unpathedErrors: [] };
    if (t.length === 1) {
      const d = r ? r(t[0]) : t[0], g = n === void 0 ? d.path : d.path ? n.concat(d.path.slice(1)) : n;
      return { data: i_(t[0], g), unpathedErrors: [] };
    }
    const c = new AggregateError(t, t.map((d) => d.message).join(`, 
`));
    return { data: wn(c, void 0, n), unpathedErrors: [] };
  }
  if (!t.length)
    return { data: e, unpathedErrors: [] };
  const i = [], s = /* @__PURE__ */ new Map();
  for (const c of t) {
    const f = (l = c.path) == null ? void 0 : l[o];
    if (f != null) {
      let d = s.get(f);
      d === void 0 ? (d = [c], s.set(f, d)) : d.push(c);
    } else
      i.push(c);
  }
  for (const [c, f] of s)
    if (e[c] !== void 0) {
      const { data: d, unpathedErrors: g } = u8(e[c], f, n, r, o + 1);
      e[c] = d, i.push(...g);
    } else
      i.push(...f);
  return { data: e, unpathedErrors: i };
}
function C8e(e) {
  if (e == null)
    throw new Error("Data cannot be extracted from result without an explicit key or source schema.");
  return l_(e);
}
function k8e(e) {
  if (e == null)
    throw new Error("Return type cannot be inferred without a source schema.");
  return e.returnType;
}
function f8(e) {
  const t = [], n = [], r = /* @__PURE__ */ new Set();
  for (let o = 0; o < e.definitions.length; o++) {
    const i = e.definitions[o];
    i.kind === U.FRAGMENT_DEFINITION ? (n.push(i), r.add(i.name.value)) : i.kind === U.OPERATION_DEFINITION && t.push(i);
  }
  return {
    operations: t,
    fragments: n,
    fragmentNames: r
  };
}
function _8e(e, t, n) {
  let r = [], o = [];
  const i = [];
  let s = [];
  const l = [], c = /* @__PURE__ */ Object.create(null);
  for (const g of t) {
    const m = g.typeCondition.name.value, v = e.getType(m);
    v != null && (l.push(g), c[g.name.value] = v);
  }
  let f = /* @__PURE__ */ Object.create(null);
  for (const g of n) {
    const m = y1(e, g.operation), { selectionSet: v, usedFragments: b, usedVariables: w } = d8(e, m, c, g.selectionSet);
    o = gp(o, b);
    const { usedVariables: _, newFragments: S, fragmentSet: x } = D8e(e, f, l, c, o), C = gp(w, _);
    r = gp(r, C), s = S, f = x;
    const E = (g.variableDefinitions ?? []).filter((N) => C.indexOf(N.variable.name.value) !== -1);
    g.operation === "subscription" && (v.selections = v.selections.filter((N) => N.kind !== U.FIELD || N.name.value !== "__typename")), i.push({
      kind: U.OPERATION_DEFINITION,
      operation: g.operation,
      name: g.name,
      directives: g.directives,
      variableDefinitions: E,
      selectionSet: v
    });
  }
  const d = {
    kind: U.DOCUMENT,
    definitions: [...i, ...s]
  };
  return {
    usedVariables: r,
    newDocument: d
  };
}
function N8e(e, t) {
  let { document: n, variables: r } = e, { operations: o, fragments: i } = f8(n);
  const { targetSchema: s, args: l } = t;
  if (l) {
    const g = O8e(s, o, l);
    o = g.newOperations, r = Object.assign({}, r ?? {}, g.newVariables);
  }
  const { usedVariables: c, newDocument: f } = _8e(s, i, o), d = {};
  if (r != null)
    for (const g of c) {
      const m = r[g];
      m !== void 0 && (d[g] = m);
    }
  return {
    ...e,
    document: f,
    variables: d
  };
}
function O8e(e, t, n) {
  const r = /* @__PURE__ */ Object.create(null);
  return {
    newOperations: t.map((i) => {
      const s = (i.variableDefinitions ?? []).reduce((d, g) => ({
        ...d,
        [g.variable.name.value]: g
      }), {}), l = y1(e, i.operation), c = [];
      for (const d of i.selectionSet.selections)
        if (d.kind === U.FIELD) {
          const m = (d.arguments ?? []).reduce((b, w) => ({
            ...b,
            [w.name.value]: w
          }), {}), v = l.getFields()[d.name.value];
          v != null && A8e(v, m, s, r, n), c.push({
            ...d,
            arguments: Object.values(m)
          });
        } else
          c.push(d);
      const f = {
        kind: U.SELECTION_SET,
        selections: c
      };
      return {
        ...i,
        variableDefinitions: Object.values(s),
        selectionSet: f
      };
    }),
    newVariables: r
  };
}
function A8e(e, t, n, r, o) {
  const i = Z6(n);
  for (const s of e.args) {
    const l = s.name, c = s.type;
    l in o && X6(t, n, r, l, i(l), c, b1(c, o[l]));
  }
}
function D8e(e, t, n, r, o) {
  let i = o.slice(), s = [];
  const l = [];
  for (; i.length !== 0; ) {
    const c = i.pop(), f = n.find((d) => d.name.value === c);
    if (f != null) {
      const d = c, g = f.typeCondition.name.value, m = e.getType(g);
      if (m == null)
        throw new Error(`Fragment reference type "${g}", but the type is not contained within the target schema.`);
      const { selectionSet: v, usedFragments: b, usedVariables: w } = d8(e, m, r, f.selectionSet);
      i = gp(i, b), s = gp(s, w), d && !(d in t) && (t[d] = !0, l.push({
        kind: U.FRAGMENT_DEFINITION,
        name: {
          kind: U.NAME,
          value: d
        },
        typeCondition: f.typeCondition,
        selectionSet: v
      }));
    }
  }
  return {
    usedVariables: s,
    newFragments: l,
    fragmentSet: t
  };
}
const I8e = {
  SelectionSet: ["selections"],
  Field: ["selectionSet"],
  InlineFragment: ["selectionSet"],
  FragmentDefinition: ["selectionSet"]
}, L8e = {
  SelectionSet: ["selections"],
  Field: ["arguments", "directives", "selectionSet"],
  Argument: ["value"],
  InlineFragment: ["directives", "selectionSet"],
  FragmentSpread: ["directives"],
  FragmentDefinition: ["selectionSet"],
  ObjectValue: ["fields"],
  ObjectField: ["name", "value"],
  Directive: ["arguments"],
  ListValue: ["values"]
};
function d8(e, t, n, r) {
  const o = [], i = [], s = tC.major < 16 ? new Vs(e, void 0, t) : new Vs(e, t), l = pn(
    r,
    Ic(s, {
      [U.FIELD]: {
        enter: (c) => {
          const f = s.getParentType();
          if (Ye(f) || Ze(f)) {
            const d = f.getFields(), g = c.name.value === "__typename" ? _o : d[c.name.value];
            if (!g)
              return null;
            const m = g.args != null ? g.args : [], v = /* @__PURE__ */ Object.create(null);
            for (const b of m)
              v[b.name] = b;
            if (c.arguments != null) {
              const b = [];
              for (const w of c.arguments)
                w.name.value in v && b.push(w);
              if (b.length !== c.arguments.length)
                return {
                  ...c,
                  arguments: b
                };
            }
          }
        },
        leave: (c) => {
          const f = s.getType();
          if (f == null)
            throw new Error(`No type was found for field node ${Kn(c)}.`);
          const d = Et(f);
          if (!e.getType(d.name) == null)
            return null;
          if (Ye(d) || Ze(d)) {
            const g = c.selectionSet != null ? c.selectionSet.selections : null;
            if (g == null || g.length === 0)
              return null;
          }
        }
      },
      [U.FRAGMENT_SPREAD]: {
        enter: (c) => {
          if (!(c.name.value in n))
            return null;
          const f = s.getParentType(), d = n[c.name.value];
          if (!V0(e, f, d))
            return null;
          o.push(c.name.value);
        }
      },
      [U.INLINE_FRAGMENT]: {
        enter: (c) => {
          if (c.typeCondition != null) {
            const f = s.getParentType(), d = e.getType(c.typeCondition.name.value);
            if (!V0(e, f, d))
              return null;
          }
        }
      },
      [U.SELECTION_SET]: {
        leave: (c) => {
          const f = s.getParentType();
          if (f != null && qn(f)) {
            const d = c.selections.concat([
              {
                kind: U.FIELD,
                name: {
                  kind: U.NAME,
                  value: "__typename"
                }
              }
            ]);
            return {
              ...c,
              selections: d
            };
          }
        }
      }
    }),
    // visitorKeys argument usage a la https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-source-graphql/src/batching/merge-queries.js
    // empty keys cannot be removed only because of typescript errors
    // will hopefully be fixed in future version of graphql-js to be optional
    I8e
  );
  return pn(
    l,
    {
      [U.VARIABLE]: (c) => {
        i.push(c.name.value);
      }
    },
    // visitorKeys argument usage a la https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-source-graphql/src/batching/merge-queries.js
    // empty keys cannot be removed only because of typescript errors
    // will hopefully be fixed in future version of graphql-js to be optional
    L8e
  ), {
    selectionSet: l,
    usedFragments: o,
    usedVariables: i
  };
}
function gp(...e) {
  const t = /* @__PURE__ */ Object.create(null), n = [];
  for (const r of e)
    for (const o of r)
      o in t || (t[o] = !0, n.push(o));
  return n;
}
function R8e(e, t, n, r) {
  const o = V8e(n, t, e);
  if (r == null)
    return o;
  const { possibleTypesMap: i, reversePossibleTypesMap: s, interfaceExtensionsMap: l, fieldNodesByType: c, fieldNodesByField: f, dynamicSelectionSetsByField: d } = M8e(r, t), { operations: g, fragments: m, fragmentNames: v } = f8(o), { expandedFragments: b, fragmentReplacements: w } = $8e(m, v, i), _ = new Vs(t), S = {
    kind: U.DOCUMENT,
    definitions: [...g, ...m, ...b]
  }, x = {
    Document: ["definitions"],
    OperationDefinition: ["selectionSet"],
    SelectionSet: ["selections"],
    Field: ["selectionSet"],
    InlineFragment: ["selectionSet"],
    FragmentDefinition: ["selectionSet"]
  };
  return pn(
    S,
    Ic(_, {
      [U.SELECTION_SET]: (C) => F8e(C, w, t, _, i, s, l, c, f, d)
    }),
    // visitorKeys argument usage a la https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-source-graphql/src/batching/merge-queries.js
    // empty keys cannot be removed only because of typescript errors
    // will hopefully be fixed in future version of graphql-js to be optional
    x
  );
}
function F8e(e, t, n, r, o, i, s, l, c, f) {
  var m, v;
  const d = /* @__PURE__ */ new Set(), g = r.getParentType();
  if (g != null) {
    const b = Et(g), w = b.name, _ = l[w];
    if (_)
      for (const C of _)
        d.add(C);
    const S = s[b.name], x = [];
    for (const C of e.selections)
      if (C.kind === U.INLINE_FRAGMENT) {
        if (C.typeCondition != null) {
          const E = o[C.typeCondition.name.value];
          if (E == null) {
            d.add(C);
            continue;
          }
          for (const N of E) {
            const I = n.getType(N);
            I != null && V0(n, b, I) && d.add(aR(N, C.selectionSet));
          }
        }
      } else if (C.kind === U.FRAGMENT_SPREAD) {
        const E = C.name.value;
        if (!t[E]) {
          d.add(C);
          continue;
        }
        for (const N of t[E]) {
          const I = N.typeName;
          n.getType(I) != null && V0(n, b, g) && d.add({
            kind: U.FRAGMENT_SPREAD,
            name: {
              kind: U.NAME,
              value: N.fragmentName
            }
          });
        }
      } else {
        const E = C.name.value, N = (m = c[w]) == null ? void 0 : m[E];
        if (N != null)
          for (const D of N)
            d.add(D);
        const I = (v = f[w]) == null ? void 0 : v[E];
        if (I != null)
          for (const D of I) {
            const A = D(C);
            if (A != null)
              for (const F of A.selections)
                d.add(F);
          }
        S != null && S[E] ? x.push(C) : d.add(C);
      }
    if (i[b.name] && d.add({
      kind: U.FIELD,
      name: {
        kind: U.NAME,
        value: "__typename"
      }
    }), x.length) {
      const C = o[b.name];
      if (C != null)
        for (const E of C)
          d.add(aR(E, {
            kind: U.SELECTION_SET,
            selections: x
          }));
    }
    return {
      ...e,
      selections: Array.from(d)
    };
  }
  return e;
}
function aR(e, t) {
  return {
    kind: U.INLINE_FRAGMENT,
    typeCondition: {
      kind: U.NAMED_TYPE,
      name: {
        kind: U.NAME,
        value: e
      }
    },
    selectionSet: t
  };
}
const M8e = s_((e, t) => {
  var l;
  const n = e.getTypeMap(), r = t.getTypeMap(), o = /* @__PURE__ */ Object.create(null), i = /* @__PURE__ */ Object.create(null);
  for (const c in n) {
    const f = n[c];
    if (qn(f)) {
      const d = r[c];
      if (Ze(f) && Ze(d)) {
        const g = d.getFields(), m = f.getFields(), v = /* @__PURE__ */ Object.create(null);
        let b = !0;
        for (const w in m)
          g[w] || (v[w] = !0, b = !1);
        b || (i[c] = v);
      }
      if (i[c] || !qn(d)) {
        const g = e.getPossibleTypes(f);
        o[c] = [];
        for (const m of g)
          r[m.name] && o[c].push(m.name);
      }
    }
  }
  const s = (l = e.extensions) == null ? void 0 : l.stitchingInfo;
  return {
    possibleTypesMap: o,
    reversePossibleTypesMap: P8e(o),
    interfaceExtensionsMap: i,
    fieldNodesByType: (s == null ? void 0 : s.fieldNodesByType) ?? {},
    fieldNodesByField: (s == null ? void 0 : s.fieldNodesByField) ?? {},
    dynamicSelectionSetsByField: (s == null ? void 0 : s.dynamicSelectionSetsByField) ?? {}
  };
});
function P8e(e) {
  const t = /* @__PURE__ */ Object.create(null);
  for (const n in e) {
    const r = e[n];
    for (const o of r)
      t[o] || (t[o] = []), t[o].push(n);
  }
  return t;
}
function $8e(e, t, n) {
  let r = 0;
  function o(l) {
    let c;
    do
      c = `_${l}_Fragment${r.toString()}`, r++;
    while (t.has(c));
    return c;
  }
  const i = [], s = /* @__PURE__ */ Object.create(null);
  for (const l of e) {
    const c = n[l.typeCondition.name.value];
    if (c != null) {
      const f = l.name.value;
      s[f] = [];
      for (const d of c) {
        const g = o(d);
        t.add(g), i.push({
          kind: U.FRAGMENT_DEFINITION,
          name: {
            kind: U.NAME,
            value: g
          },
          typeCondition: {
            kind: U.NAMED_TYPE,
            name: {
              kind: U.NAME,
              value: d
            }
          },
          selectionSet: l.selectionSet
        }), s[f].push({
          fragmentName: g,
          typeName: d
        });
      }
    }
  }
  return {
    expandedFragments: i,
    fragmentReplacements: s
  };
}
function V8e(e, t, n) {
  const r = Et(e);
  if (!Jt(r))
    return n;
  const o = Z4e(t), i = new Vs(t), s = {
    Document: ["definitions"],
    OperationDefinition: ["selectionSet"],
    SelectionSet: ["selections"],
    InlineFragment: ["selectionSet"],
    FragmentDefinition: ["selectionSet"]
  };
  return pn(
    n,
    Ic(i, {
      [U.FRAGMENT_DEFINITION]: (l) => {
        const c = l.typeCondition.name.value;
        if (!o.has(c))
          return !1;
      },
      [U.FIELD]: (l) => {
        let c = i.getType();
        if (c = He(c) ? c.ofType : c, c != null && qn(Et(c)) && (!Zt(c) || c.name === "_Entity"))
          return {
            ...l,
            selectionSet: {
              kind: U.SELECTION_SET,
              selections: [
                {
                  kind: U.INLINE_FRAGMENT,
                  typeCondition: {
                    kind: U.NAMED_TYPE,
                    name: {
                      kind: U.NAME,
                      value: r.name
                    }
                  },
                  selectionSet: l.selectionSet
                }
              ]
            }
          };
      }
    }),
    // visitorKeys argument usage a la https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-source-graphql/src/batching/merge-queries.js
    // empty keys cannot be removed only because of typescript errors
    // will hopefully be fixed in future version of graphql-js to be optional
    s
  );
}
class j8e {
  constructor(t) {
    this.transformations = [], this.delegationContext = t;
    const r = t.transforms.slice().reverse();
    for (const o of r)
      this.addTransform(o, {});
  }
  addTransform(t, n = {}) {
    this.transformations.push({ transform: t, context: n });
  }
  transformRequest(t) {
    var r;
    let n = {
      ...t,
      document: R8e(t.document, this.delegationContext.transformedSchema, this.delegationContext.returnType, (r = this.delegationContext.info) == null ? void 0 : r.schema)
    };
    for (const o of this.transformations)
      o.transform.transformRequest && (n = o.transform.transformRequest(n, this.delegationContext, o.context));
    return N8e(n, this.delegationContext);
  }
  transformResult(t) {
    let n = t;
    for (let r = this.transformations.length - 1; r >= 0; r--) {
      const o = this.transformations[r];
      o.transform.transformResult && (n = o.transform.transformResult(n, this.delegationContext, o.context));
    }
    return T8e(n, this.delegationContext);
  }
}
function U8e(e, t) {
  return e === t.getMutationType() ? "mutation" : e === t.getSubscriptionType() ? "subscription" : "query";
}
function B8e({ sourceSchema: e, sourceParentType: t, sourceFieldName: n, fragments: r, variableDefinitions: o, variableValues: i, targetRootValue: s, targetOperationName: l, targetOperation: c, targetFieldName: f, selectionSet: d, fieldNodes: g, context: m, info: v }) {
  var A, F;
  let b;
  const w = /* @__PURE__ */ Object.create(null);
  if (d != null)
    b = d;
  else {
    const $ = [];
    for (const H of g || [])
      if (H.selectionSet)
        for (const z of H.selectionSet.selections)
          $.push(z);
    b = $.length ? {
      kind: U.SELECTION_SET,
      selections: $
    } : void 0;
    const q = (A = g == null ? void 0 : g[0]) == null ? void 0 : A.arguments;
    if (q)
      for (const H of q)
        w[H.name.value] = H;
  }
  const _ = /* @__PURE__ */ Object.create(null), S = /* @__PURE__ */ Object.create(null);
  if (e != null && o != null)
    for (const $ of o) {
      const q = $.variable.name.value;
      S[q] = $;
      const H = Jn(e, $.type), z = b1(H, i == null ? void 0 : i[q]);
      z !== void 0 && (_[q] = z);
    }
  t != null && n != null && q8e(t, n, w, S, _);
  const x = f ?? ((F = g == null ? void 0 : g[0]) == null ? void 0 : F.name.value);
  if (x === void 0)
    throw new Error('Either "targetFieldName" or a non empty "fieldNodes" array must be provided.');
  const C = {
    kind: U.FIELD,
    arguments: Object.values(w),
    name: {
      kind: U.NAME,
      value: x
    },
    selectionSet: b
  }, E = l ? {
    kind: U.NAME,
    value: l
  } : void 0, I = [{
    kind: U.OPERATION_DEFINITION,
    name: E,
    operation: c,
    variableDefinitions: Object.values(S),
    selectionSet: {
      kind: U.SELECTION_SET,
      selections: [C]
    }
  }];
  if (r != null)
    for (const $ in r) {
      const q = r[$];
      I.push(q);
    }
  return {
    document: {
      kind: U.DOCUMENT,
      definitions: I
    },
    variables: _,
    rootValue: s,
    operationName: l,
    context: m,
    info: v,
    operationType: c
  };
}
function q8e(e, t, n, r, o) {
  const i = Z6(r), s = e.getFields()[t];
  if (!s)
    throw new Error(`Field "${t}" was not found in type "${e}".`);
  for (const l of s.args) {
    const c = l.name, f = l.type;
    if (n[c] === void 0) {
      const d = l.defaultValue;
      d !== void 0 && X6(n, r, o, c, i(c), f, b1(f, d));
    }
  }
}
function z8e(e, t, n, r) {
  if (!e)
    return null;
  const o = l_(r);
  if (!h_(e))
    return Jv(e, t, n, r);
  const i = e[o], s = c8(e), l = l8(e, o);
  return Hh(i, s, l, n, r);
}
var H8e = /* @__PURE__ */ function() {
  function e(n, r) {
    if (typeof n != "function")
      throw new TypeError("DataLoader must be constructed with a function which accepts " + ("Array<key> and returns Promise<Array<value>>, but got: " + n + "."));
    this._batchLoadFn = n, this._maxBatchSize = Y8e(r), this._batchScheduleFn = K8e(r), this._cacheKeyFn = J8e(r), this._cacheMap = X8e(r), this._batch = null, this.name = Z8e(r);
  }
  var t = e.prototype;
  return t.load = function(r) {
    if (r == null)
      throw new TypeError("The loader.load() function must be called with a value, " + ("but got: " + String(r) + "."));
    var o = G8e(this), i = this._cacheMap, s = this._cacheKeyFn(r);
    if (i) {
      var l = i.get(s);
      if (l) {
        var c = o.cacheHits || (o.cacheHits = []);
        return new Promise(function(d) {
          c.push(function() {
            d(l);
          });
        });
      }
    }
    o.keys.push(r);
    var f = new Promise(function(d, g) {
      o.callbacks.push({
        resolve: d,
        reject: g
      });
    });
    return i && i.set(s, f), f;
  }, t.loadMany = function(r) {
    if (!p8(r))
      throw new TypeError("The loader.loadMany() function must be called with Array<key> " + ("but got: " + r + "."));
    for (var o = [], i = 0; i < r.length; i++)
      o.push(this.load(r[i]).catch(function(s) {
        return s;
      }));
    return Promise.all(o);
  }, t.clear = function(r) {
    var o = this._cacheMap;
    if (o) {
      var i = this._cacheKeyFn(r);
      o.delete(i);
    }
    return this;
  }, t.clearAll = function() {
    var r = this._cacheMap;
    return r && r.clear(), this;
  }, t.prime = function(r, o) {
    var i = this._cacheMap;
    if (i) {
      var s = this._cacheKeyFn(r);
      if (i.get(s) === void 0) {
        var l;
        o instanceof Error ? (l = Promise.reject(o), l.catch(function() {
        })) : l = Promise.resolve(o), i.set(s, l);
      }
    }
    return this;
  }, e;
}(), W8e = typeof process == "object" && typeof process.nextTick == "function" ? function(e) {
  Uw || (Uw = Promise.resolve()), Uw.then(function() {
    process.nextTick(e);
  });
} : typeof setImmediate == "function" ? function(e) {
  setImmediate(e);
} : function(e) {
  setTimeout(e);
}, Uw;
function G8e(e) {
  var t = e._batch;
  if (t !== null && !t.hasDispatched && t.keys.length < e._maxBatchSize)
    return t;
  var n = {
    hasDispatched: !1,
    keys: [],
    callbacks: []
  };
  return e._batch = n, e._batchScheduleFn(function() {
    Q8e(e, n);
  }), n;
}
function Q8e(e, t) {
  if (t.hasDispatched = !0, t.keys.length === 0) {
    tT(t);
    return;
  }
  var n;
  try {
    n = e._batchLoadFn(t.keys);
  } catch (r) {
    return Bw(e, t, new TypeError("DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but the function " + ("errored synchronously: " + String(r) + ".")));
  }
  if (!n || typeof n.then != "function")
    return Bw(e, t, new TypeError("DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but the function did " + ("not return a Promise: " + String(n) + ".")));
  n.then(function(r) {
    if (!p8(r))
      throw new TypeError("DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but the function did " + ("not return a Promise of an Array: " + String(r) + "."));
    if (r.length !== t.keys.length)
      throw new TypeError("DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but the function did not return a Promise of an Array of the same length as the Array of keys." + (`

Keys:
` + String(t.keys)) + (`

Values:
` + String(r)));
    tT(t);
    for (var o = 0; o < t.callbacks.length; o++) {
      var i = r[o];
      i instanceof Error ? t.callbacks[o].reject(i) : t.callbacks[o].resolve(i);
    }
  }).catch(function(r) {
    Bw(e, t, r);
  });
}
function Bw(e, t, n) {
  tT(t);
  for (var r = 0; r < t.keys.length; r++)
    e.clear(t.keys[r]), t.callbacks[r].reject(n);
}
function tT(e) {
  if (e.cacheHits)
    for (var t = 0; t < e.cacheHits.length; t++)
      e.cacheHits[t]();
}
function Y8e(e) {
  var t = !e || e.batch !== !1;
  if (!t)
    return 1;
  var n = e && e.maxBatchSize;
  if (n === void 0)
    return 1 / 0;
  if (typeof n != "number" || n < 1)
    throw new TypeError("maxBatchSize must be a positive number: " + n);
  return n;
}
function K8e(e) {
  var t = e && e.batchScheduleFn;
  if (t === void 0)
    return W8e;
  if (typeof t != "function")
    throw new TypeError("batchScheduleFn must be a function: " + t);
  return t;
}
function J8e(e) {
  var t = e && e.cacheKeyFn;
  if (t === void 0)
    return function(n) {
      return n;
    };
  if (typeof t != "function")
    throw new TypeError("cacheKeyFn must be a function: " + t);
  return t;
}
function X8e(e) {
  var t = !e || e.cache !== !1;
  if (!t)
    return null;
  var n = e && e.cacheMap;
  if (n === void 0)
    return /* @__PURE__ */ new Map();
  if (n !== null) {
    var r = ["get", "set", "delete", "clear"], o = r.filter(function(i) {
      return n && typeof n[i] != "function";
    });
    if (o.length !== 0)
      throw new TypeError("Custom cacheMap missing methods: " + o.join(", "));
  }
  return n;
}
function Z8e(e) {
  return e && e.name ? e.name : null;
}
function p8(e) {
  return typeof e == "object" && e !== null && typeof e.length == "number" && (e.length === 0 || e.length > 0 && Object.prototype.hasOwnProperty.call(e, e.length - 1));
}
var eVe = H8e;
const lR = /* @__PURE__ */ is(eVe);
function tVe(e) {
  return `_${e}_`;
}
function h8(e) {
  const t = /^_(\d+)_(.*)$/.exec(e);
  return t && t.length === 3 && !isNaN(Number(t[1])) && t[2] ? { index: Number(t[1]), originalKey: t[2] } : null;
}
function nVe(e) {
  const t = h8(e);
  if (!t)
    throw new Error(`Key ${e} is not correctly prefixed`);
  return t;
}
function rVe(e) {
  let t = 0, n = null;
  for (; !n && t < e.length; t++) {
    const r = e[t];
    typeof r == "string" && (n = h8(r));
  }
  if (!n)
    throw new Error(`Path ${e.join(".")} does not contain correctly prefixed key`);
  return {
    ...n,
    keyOffset: t
  };
}
function oVe(e, t) {
  var g, m, v;
  const n = /* @__PURE__ */ Object.create(null), r = [], o = [], i = [];
  let s = /* @__PURE__ */ Object.create(null);
  for (let b = 0; b < e.length; b++) {
    const w = e[b], _ = iVe(tVe(b), w);
    for (const S of _.document.definitions)
      cVe(S) && (o.push(...S.selectionSet.selections), S.variableDefinitions && r.push(...S.variableDefinitions)), H0(S) && i.push(S);
    Object.assign(n, _.variables), s = t(s, w);
  }
  const l = e[0], c = l.operationType ?? Cc(l).operation, f = {
    kind: U.OPERATION_DEFINITION,
    operation: c,
    variableDefinitions: r,
    selectionSet: {
      kind: U.SELECTION_SET,
      selections: o
    }
  }, d = l.operationName ?? ((v = (m = (g = l.info) == null ? void 0 : g.operation) == null ? void 0 : m.name) == null ? void 0 : v.value);
  return d && (f.name = {
    kind: U.NAME,
    value: d
  }), {
    document: {
      kind: U.DOCUMENT,
      definitions: [f, ...i]
    },
    variables: n,
    extensions: s,
    context: e[0].context,
    info: e[0].info,
    operationType: c,
    rootValue: e[0].rootValue
  };
}
function iVe(e, t) {
  const n = t.variables ?? {};
  function r(f) {
    return uR(f, e);
  }
  let o = sVe(e, t.document);
  const i = Object.keys(n), s = t.document.definitions.some((f) => H0(f)), l = {};
  (i.length > 0 || s) && (o = pn(o, {
    [U.VARIABLE]: r,
    [U.FRAGMENT_DEFINITION]: r,
    [U.FRAGMENT_SPREAD]: (f) => (f = uR(f, e), l[f.name.value] = !0, f)
  }));
  const c = {};
  for (const f of i)
    c[e + f] = n[f];
  return s && (o = {
    ...o,
    definitions: o.definitions.filter((f) => !H0(f) || l[f.name.value])
  }), {
    document: o,
    variables: c
  };
}
function sVe(e, t) {
  const n = {
    [U.OPERATION_DEFINITION]: (r) => {
      const { selections: o } = r.selectionSet;
      return {
        ...r,
        selectionSet: {
          ...r.selectionSet,
          selections: m8(e, o, t)
        }
      };
    }
  };
  return pn(t, n, {
    [U.DOCUMENT]: ["definitions"]
  });
}
function m8(e, t, n) {
  return t.map((r) => {
    switch (r.kind) {
      case U.INLINE_FRAGMENT:
        return cR(e, r, n);
      case U.FRAGMENT_SPREAD: {
        const o = aVe(r, n);
        return cR(e, o, n);
      }
      case U.FIELD:
      default:
        return lVe(r, e);
    }
  });
}
function cR(e, t, n) {
  const { selections: r } = t.selectionSet;
  return {
    ...t,
    selectionSet: {
      ...t.selectionSet,
      selections: m8(e, r, n)
    }
  };
}
function aVe(e, t) {
  const n = t.definitions.find((i) => H0(i) && i.name.value === e.name.value);
  if (!n)
    throw new Error(`Fragment ${e.name.value} does not exist`);
  const { typeCondition: r, selectionSet: o } = n;
  return {
    kind: U.INLINE_FRAGMENT,
    typeCondition: r,
    selectionSet: o,
    directives: e.directives
  };
}
function uR(e, t) {
  return {
    ...e,
    name: {
      ...e.name,
      value: t + e.name.value
    }
  };
}
function lVe(e, t) {
  const n = e.alias ? e.alias : e.name;
  return {
    ...e,
    alias: {
      ...n,
      value: t + n.value
    }
  };
}
function cVe(e) {
  return e.kind === U.OPERATION_DEFINITION;
}
function H0(e) {
  return e.kind === U.FRAGMENT_DEFINITION;
}
function uVe({ data: e, errors: t }, n) {
  const r = [];
  for (let o = 0; o < n; o++)
    r.push({});
  if (e)
    for (const o in e) {
      const { index: i, originalKey: s } = nVe(o), l = r[i];
      l != null && (l.data == null ? l.data = { [s]: e[o] } : l.data[s] = e[o]);
    }
  if (t)
    for (const o of t)
      if (o.path) {
        const { index: i, originalKey: s, keyOffset: l } = rVe(o.path), c = i_(o, [s, ...o.path.slice(l)]);
        (r[i].errors = r[i].errors || []).push(c);
      } else
        r.forEach((i) => {
          (i.errors = i.errors || []).push(o);
        });
  return r;
}
function fVe(e, t, n = pVe) {
  const r = dVe(e, n), o = new lR(r, t), i = new lR(r, t);
  return function(l) {
    var f;
    const c = l.operationType ?? ((f = Cc(l)) == null ? void 0 : f.operation);
    switch (c) {
      case "query":
        return o.load(l);
      case "mutation":
        return i.load(l);
      case "subscription":
        return e(l);
      default:
        throw new Error(`Invalid operation type "${c}"`);
    }
  };
}
function dVe(e, t) {
  return function(r) {
    if (r.length === 1)
      return new zt(() => e(r[0])).then((i) => [i]).catch((i) => [i]);
    const o = oVe(r, t);
    return new zt(() => e(o)).then((i) => {
      if (pl(i))
        throw new Error("Executor must not return incremental results for batching");
      return uVe(i, r.length);
    });
  };
}
function pVe(e, t) {
  const n = t.extensions;
  return n != null && Object.assign(e, n), e;
}
const hVe = X4e(function(t, n, r, o) {
  return fVe(n, r, o);
});
function mVe(e) {
  const t = e[Symbol.asyncIterator]();
  let n, r, o = !1;
  async function i() {
    if (o)
      return { value: void 0, done: !0 };
    try {
      if (!n) {
        if (r)
          return await r, await i();
        let c;
        r = new Promise((d) => {
          c = d;
        });
        const f = await t.next();
        return f.done ? (o = !0, await i()) : (n = f.value[Symbol.asyncIterator](), r = void 0, c(), await i());
      }
      const s = n, l = await n.next();
      return l.done ? (n === s && (n = void 0), await i()) : l;
    } catch (s) {
      throw o = !0, s;
    }
  }
  return {
    next: i,
    async return() {
      var s, l;
      return o = !0, await Promise.all([(s = n == null ? void 0 : n.return) == null ? void 0 : s.call(n), (l = t.return) == null ? void 0 : l.call(t)]), { value: void 0, done: !0 };
    },
    async throw(s) {
      var l, c;
      throw o = !0, await Promise.all([(l = n == null ? void 0 : n.throw) == null ? void 0 : l.call(n, s), (c = t.throw) == null ? void 0 : c.call(t, s)]), s;
    },
    [Symbol.asyncIterator]() {
      return this;
    }
  };
}
function fR(e, t) {
  if (!e)
    throw new Error(t ?? "Unexpected invariant triggered.");
}
async function dR(e, t) {
  const n = /* @__PURE__ */ Object.create(null);
  return await new Promise((r, o) => {
    t == null || t.addEventListener("abort", () => {
      o(t.reason);
    }), Promise.all(Object.entries(e).map(async ([i, s]) => {
      n[i] = await s;
    })).then(() => r(), o);
  }), n;
}
function gVe(e, t, n, r) {
  const o = [], i = r == null ? void 0 : r.maxErrors;
  try {
    const s = vVe(e, t, n, (l) => {
      if (i != null && o.length >= i)
        throw ut("Too many errors processing variables, error limit reached. Execution aborted.");
      o.push(l);
    });
    if (o.length === 0)
      return { coerced: s };
  } catch (s) {
    o.push(s);
  }
  return { errors: o };
}
function vVe(e, t, n, r) {
  const o = {};
  for (const i of t) {
    const s = i.variable.name.value, l = Jn(e, i.type);
    if (!lr(l)) {
      const f = pt(i.type);
      r(ut(`Variable "$${s}" expected value of type "${f}" which cannot be used as an input type.`, { nodes: i.type }));
      continue;
    }
    if (!G6(n, s)) {
      if (i.defaultValue)
        o[s] = Go(i.defaultValue, l);
      else if (He(l)) {
        const f = Kn(l);
        r(ut(`Variable "$${s}" of required type "${f}" was not provided.`, {
          nodes: i
        }));
      }
      continue;
    }
    const c = n[s];
    if (c === null && He(l)) {
      const f = Kn(l);
      r(ut(`Variable "$${s}" of non-null type "${f}" must not be null.`, {
        nodes: i
      }));
      continue;
    }
    o[s] = NC(c, l, (f, d, g) => {
      let m = `Variable "$${s}" got invalid value ` + Kn(d);
      f.length > 0 && (m += ` at "${s}${R6e(f)}"`), r(ut(m + "; " + g.message, {
        nodes: i,
        originalError: g.originalError
      }));
    });
  }
  return o;
}
const yVe = K4e((e, t, n) => O6e(e.schema, e.fragments, e.variableValues, t, n));
function bVe(e) {
  const t = v8(e);
  return "schema" in t ? g8(t) : {
    errors: t.map((n) => {
      var r;
      return Object.defineProperty(n, "extensions", {
        value: {
          ...n.extensions,
          http: {
            ...(r = n.extensions) == null ? void 0 : r.http,
            status: 400
          }
        }
      }), n;
    })
  };
}
function g8(e) {
  var n;
  if ((n = e.signal) != null && n.aborted)
    throw e.signal.reason;
  return new zt(() => xVe(e)).then((r) => {
    const o = pR(r, e.errors);
    return e.subsequentPayloads.size > 0 ? {
      initialResult: {
        ...o,
        hasNext: !0
      },
      subsequentResults: PVe(e)
    } : o;
  }, (r) => {
    var o;
    if ((o = e.signal) != null && o.aborted)
      throw e.signal.reason;
    return e.errors.push(r), pR(null, e.errors);
  }).resolve();
}
function pR(e, t) {
  return t.length === 0 ? { data: e } : { errors: t, data: e };
}
const EVe = Xs(function(t) {
  const n = /* @__PURE__ */ Object.create(null);
  for (const r of t.definitions)
    r.kind === U.FRAGMENT_DEFINITION && (n[r.name.value] = r);
  return n;
});
function v8(e) {
  var w;
  const { schema: t, document: n, rootValue: r, contextValue: o, variableValues: i, operationName: s, fieldResolver: l, typeResolver: c, subscribeFieldResolver: f, signal: d } = e;
  wy(t);
  const g = EVe(n);
  let m;
  for (const _ of n.definitions)
    switch (_.kind) {
      case U.OPERATION_DEFINITION:
        if (s == null) {
          if (m !== void 0)
            return [
              ut("Must provide operation name if query contains multiple operations.")
            ];
          m = _;
        } else
          ((w = _.name) == null ? void 0 : w.value) === s && (m = _);
        break;
    }
  if (m == null)
    return s != null ? [ut(`Unknown operation named "${s}".`)] : [ut("Must provide an operation.")];
  const v = m.variableDefinitions ?? [], b = gVe(t, v, i ?? {}, {
    maxErrors: 50
  });
  return b.errors ? b.errors : {
    schema: t,
    fragments: g,
    rootValue: r,
    contextValue: o,
    operation: m,
    variableValues: b.coerced,
    fieldResolver: l ?? vR,
    typeResolver: c ?? NVe,
    subscribeFieldResolver: f ?? vR,
    subsequentPayloads: /* @__PURE__ */ new Set(),
    errors: [],
    signal: d
  };
}
function wVe(e, t) {
  return {
    ...e,
    rootValue: t,
    subsequentPayloads: /* @__PURE__ */ new Set(),
    errors: []
  };
}
function xVe(e) {
  const { operation: t, schema: n, fragments: r, variableValues: o, rootValue: i } = e, s = y1(n, t.operation, [t]);
  s == null && ut(`Schema is not configured to execute ${t.operation} operation.`, {
    nodes: t
  });
  const { fields: l, patches: c } = u_(n, r, o, s, t.selectionSet), f = void 0;
  let d;
  t.operation === "mutation" ? d = SVe(e, s, i, f, l) : d = m_(e, s, i, f, l);
  for (const g of c) {
    const { label: m, fields: v } = g;
    S8(e, s, i, v, m, f);
  }
  return d;
}
function SVe(e, t, n, r, o) {
  return Y4e(o, (i, [s, l]) => {
    var f;
    const c = Bf(r, s, t.name);
    if ((f = e.signal) != null && f.aborted)
      throw e.signal.reason;
    return new zt(() => y8(e, t, n, l, c)).then((d) => (d === void 0 || (i[s] = d), i));
  }, /* @__PURE__ */ Object.create(null)).resolve();
}
function m_(e, t, n, r, o, i) {
  var c;
  const s = /* @__PURE__ */ Object.create(null);
  let l = !1;
  try {
    for (const [f, d] of o) {
      if ((c = e.signal) != null && c.aborted)
        throw e.signal.reason;
      const g = Bf(r, f, t.name), m = y8(e, t, n, d, g, i);
      m !== void 0 && (s[f] = m, Xt(m) && (l = !0));
    }
  } catch (f) {
    if (l)
      return dR(s, e.signal).finally(() => {
        throw f;
      });
    throw f;
  }
  return l ? dR(s, e.signal) : s;
}
function y8(e, t, n, r, o, i) {
  const s = (i == null ? void 0 : i.errors) ?? e.errors, l = C8(e.schema, t, r[0]);
  if (!l)
    return;
  const c = l.type, f = l.resolve ?? e.fieldResolver, d = b8(e, l, r, t, o);
  try {
    const g = Q6(l, r[0], e.variableValues), m = e.contextValue, v = f(n, g, m, d);
    let b;
    return Xt(v) ? b = v.then((w) => Za(e, c, r, d, o, w, i)) : b = Za(e, c, r, d, o, v, i), Xt(b) ? b.then(void 0, (w) => {
      const _ = wn(w, r, Wr(o)), S = es(_, c, s);
      return Yo(e, o, i), S;
    }) : b;
  } catch (g) {
    const m = wn(g, r, Wr(o)), v = es(m, c, s);
    return Yo(e, o, i), v;
  }
}
function b8(e, t, n, r, o) {
  return {
    fieldName: t.name,
    fieldNodes: n,
    returnType: t.type,
    parentType: r,
    path: o,
    schema: e.schema,
    fragments: e.fragments,
    rootValue: e.rootValue,
    operation: e.operation,
    variableValues: e.variableValues
  };
}
function es(e, t, n) {
  if (He(t))
    throw e;
  return n.push(e), null;
}
function Za(e, t, n, r, o, i, s) {
  if (i instanceof Error)
    throw i;
  if (He(t)) {
    const l = Za(e, t.ofType, n, r, o, i, s);
    if (l === null)
      throw new Error(`Cannot return null for non-nullable field ${r.parentType.name}.${r.fieldName}.`);
    return l;
  }
  if (i == null)
    return null;
  if (vt(t))
    return CVe(e, t, n, r, o, i, s);
  if (Nr(t))
    return kVe(t, i);
  if (qn(t))
    return _Ve(e, t, n, r, o, i, s);
  if (Ye(t))
    return nT(e, t, n, r, o, i, s);
  console.assert(!1, "Cannot complete value of unexpected output type: " + Kn(t));
}
function E8(e, t, n) {
  if (typeof n.key == "number")
    return;
  const r = js(_6e, t[0], e.variableValues);
  if (r && r.if !== !1)
    return fR(typeof r.initialCount == "number", "initialCount must be a number"), fR(r.initialCount >= 0, "initialCount must be a positive integer"), {
      initialCount: r.initialCount,
      label: typeof r.label == "string" ? r.label : void 0
    };
}
async function TVe(e, t, n, r, o, i, s) {
  var m;
  (m = e.signal) == null || m.addEventListener("abort", () => {
    var v;
    (v = i.return) == null || v.call(i);
  });
  const l = (s == null ? void 0 : s.errors) ?? e.errors, c = E8(e, n, o);
  let f = !1;
  const d = [];
  let g = 0;
  for (; ; ) {
    if (c && typeof c.initialCount == "number" && g >= c.initialCount) {
      FVe(g, i, e, n, r, t, o, c.label, s);
      break;
    }
    const v = Bf(o, g, void 0);
    let b;
    try {
      if (b = await i.next(), b.done)
        break;
    } catch (w) {
      const _ = wn(w, n, Wr(v));
      d.push(es(_, t, l));
      break;
    }
    w8(b.value, d, l, e, t, n, r, v, s) && (f = !0), g += 1;
  }
  return f ? Promise.all(d) : d;
}
function CVe(e, t, n, r, o, i, s) {
  const l = t.ofType, c = (s == null ? void 0 : s.errors) ?? e.errors;
  if (pl(i)) {
    const b = i[Symbol.asyncIterator]();
    return TVe(e, l, n, r, o, b, s);
  }
  if (!Q4e(i))
    throw ut(`Expected Iterable, but did not find one for field "${r.parentType.name}.${r.fieldName}".`);
  const f = E8(e, n, o);
  let d = !1, g = s;
  const m = [];
  let v = 0;
  for (const b of i) {
    const w = Bf(o, v, void 0);
    if (f && typeof f.initialCount == "number" && v >= f.initialCount) {
      g = LVe(o, w, b, e, n, r, l, f.label, g), v++;
      continue;
    }
    w8(b, m, c, e, l, n, r, w, s) && (d = !0), v++;
  }
  return d ? Promise.all(m) : m;
}
function w8(e, t, n, r, o, i, s, l, c) {
  try {
    let f;
    if (Xt(e) ? f = e.then((d) => Za(r, o, i, s, l, d, c)) : f = Za(r, o, i, s, l, e, c), Xt(f))
      return t.push(f.then(void 0, (d) => {
        const g = wn(d, i, Wr(l)), m = es(g, o, n);
        return Yo(r, l, c), m;
      })), !0;
    t.push(f);
  } catch (f) {
    const d = wn(f, i, Wr(l)), g = es(d, o, n);
    Yo(r, l, c), t.push(g);
  }
  return !1;
}
function kVe(e, t) {
  let n;
  try {
    n = e.serialize(t);
  } catch (r) {
    throw r instanceof he ? new Error(r.message) : r;
  }
  if (n == null)
    throw new Error(`Expected \`${Kn(e)}.serialize(${Kn(t)})\` to return non-nullable value, returned: ${Kn(n)}`);
  return n;
}
function _Ve(e, t, n, r, o, i, s) {
  const l = t.resolveType ?? e.typeResolver, c = e.contextValue, f = l(i, c, r, t);
  return Xt(f) ? f.then((d) => nT(e, hR(d, e, t, n, r, i), n, r, o, i, s)) : nT(e, hR(f, e, t, n, r, i), n, r, o, i, s);
}
function hR(e, t, n, r, o, i) {
  if (e == null)
    throw ut(`Abstract type "${n.name}" must resolve to an Object type at runtime for field "${o.parentType.name}.${o.fieldName}". Either the "${n.name}" type should provide a "resolveType" function or each possible type should provide an "isTypeOf" function.`, { nodes: r });
  if (Ye(e))
    throw ut("Support for returning GraphQLObjectType from resolveType was removed in graphql-js@16.0.0 please return type name instead.");
  if (typeof e != "string")
    throw ut(`Abstract type "${n.name}" must resolve to an Object type at runtime for field "${o.parentType.name}.${o.fieldName}" with value ${Kn(i)}, received "${Kn(e)}".`);
  const s = t.schema.getType(e);
  if (s == null)
    throw ut(`Abstract type "${n.name}" was resolved to a type "${e}" that does not exist inside the schema.`, { nodes: r });
  if (!Ye(s))
    throw ut(`Abstract type "${n.name}" was resolved to a non-object type "${e}".`, { nodes: r });
  if (!t.schema.isSubType(n, s))
    throw ut(`Runtime Object type "${s.name}" is not a possible type for "${n.name}".`, { nodes: r });
  return s;
}
function nT(e, t, n, r, o, i, s) {
  if (t.isTypeOf) {
    const l = t.isTypeOf(i, e.contextValue, r);
    if (Xt(l))
      return l.then((c) => {
        if (!c)
          throw mR(t, i, n);
        return gR(e, t, n, o, i, s);
      });
    if (!l)
      throw mR(t, i, n);
  }
  return gR(e, t, n, o, i, s);
}
function mR(e, t, n) {
  return ut(`Expected value of type "${e.name}" but got: ${Kn(t)}.`, {
    nodes: n
  });
}
function gR(e, t, n, r, o, i) {
  const { fields: s, patches: l } = yVe(e, t, n), c = m_(e, t, o, r, s, i);
  for (const f of l) {
    const { label: d, fields: g } = f;
    S8(e, t, o, g, d, r, i);
  }
  return c;
}
const NVe = function(e, t, n, r) {
  if (W6(e) && typeof e.__typename == "string")
    return e.__typename;
  const o = n.schema.getPossibleTypes(r), i = [];
  for (let s = 0; s < o.length; s++) {
    const l = o[s];
    if (l.isTypeOf) {
      const c = l.isTypeOf(e, t, n);
      if (Xt(c))
        i[s] = c;
      else if (c)
        return l.name;
    }
  }
  if (i.length)
    return Promise.all(i).then((s) => {
      for (let l = 0; l < s.length; l++)
        if (s[l])
          return o[l].name;
    });
}, vR = function(e, t, n, r) {
  if (W6(e) || typeof e == "function") {
    const o = e[r.fieldName];
    return typeof o == "function" ? e[r.fieldName](t, n, r) : o;
  }
};
function OVe(e) {
  const t = v8(e);
  if (!("schema" in t))
    return {
      errors: t.map((r) => {
        var o;
        return Object.defineProperty(r, "extensions", {
          value: {
            ...r.extensions,
            http: {
              ...(o = r.extensions) == null ? void 0 : o.http,
              status: 400
            }
          }
        }), r;
      })
    };
  const n = DVe(t);
  return Xt(n) ? n.then((r) => yR(t, r)) : yR(t, n);
}
function x8(e) {
  const t = e.subsequentResults;
  let n = !1, r = !1;
  return {
    [Symbol.asyncIterator]() {
      return this;
    },
    next() {
      return r ? Promise.resolve({
        value: void 0,
        done: r
      }) : n ? t.next() : (n = !0, Promise.resolve({
        value: e.initialResult,
        done: r
      }));
    },
    return() {
      return r = !0, t.return();
    },
    throw(o) {
      return r = !0, t.throw(o);
    }
  };
}
async function* AVe(e) {
  "initialResult" in e ? yield* x8(e) : yield e;
}
function yR(e, t) {
  return pl(t) ? mVe(c_(t[Symbol.asyncIterator](), async (n) => AVe(await g8(wVe(e, n))), (n) => {
    throw ut(n.message, {
      originalError: n,
      nodes: [e.operation]
    });
  })) : t;
}
function DVe(e) {
  try {
    const t = IVe(e);
    return Xt(t) ? t.then(void 0, (n) => ({ errors: [n] })) : t;
  } catch (t) {
    return { errors: [t] };
  }
}
function IVe(e) {
  const { schema: t, fragments: n, operation: r, variableValues: o, rootValue: i } = e, s = t.getSubscriptionType();
  if (s == null)
    throw ut("Schema is not configured to execute subscription operation.", {
      nodes: r
    });
  const { fields: l } = u_(t, n, o, s, r.selectionSet), [c, f] = [...l.entries()][0], d = f[0].name.value, g = C8(t, s, f[0]);
  if (!g)
    throw ut(`The subscription field "${d}" is not defined.`, {
      nodes: f
    });
  const m = Bf(void 0, c, s.name), v = b8(e, g, f, s, m);
  try {
    const b = Q6(g, f[0], o), w = e.contextValue, S = (g.subscribe ?? e.subscribeFieldResolver)(i, b, w, v);
    return Xt(S) ? S.then(bR).then(void 0, (x) => {
      throw wn(x, f, Wr(m));
    }) : bR(S, e.signal);
  } catch (b) {
    throw wn(b, f, Wr(m));
  }
}
function bR(e, t) {
  if (e instanceof Error)
    throw e;
  if (!pl(e))
    throw ut(`Subscription field must return Async Iterable. Received: ${Kn(e)}.`);
  return {
    [Symbol.asyncIterator]() {
      const n = e[Symbol.asyncIterator]();
      return t == null || t.addEventListener("abort", () => {
        var r;
        (r = n.return) == null || r.call(n);
      }), n;
    }
  };
}
function S8(e, t, n, r, o, i, s) {
  const l = new $Ve({
    label: o,
    path: i,
    parentContext: s,
    exeContext: e
  });
  let c;
  try {
    c = m_(e, t, n, i, r, l), Xt(c) && (c = c.then(null, (f) => (l.errors.push(f), null)));
  } catch (f) {
    l.errors.push(f), c = null;
  }
  l.addData(c);
}
function LVe(e, t, n, r, o, i, s, l, c) {
  const f = new T8({
    label: l,
    path: t,
    parentContext: c,
    exeContext: r
  });
  let d;
  try {
    try {
      Xt(n) ? d = n.then((m) => Za(r, s, o, i, t, m, f)) : d = Za(r, s, o, i, t, n, f), Xt(d) && (d = d.then(void 0, (m) => {
        const v = wn(m, o, Wr(t)), b = es(v, s, f.errors);
        return Yo(r, t, f), b;
      }));
    } catch (m) {
      const v = wn(m, o, Wr(t));
      d = es(v, s, f.errors), Yo(r, t, f);
    }
  } catch (m) {
    return f.errors.push(m), Yo(r, e, f), f.addItems(null), f;
  }
  let g;
  return Xt(d) ? g = d.then((m) => [m], (m) => (f.errors.push(m), Yo(r, e, f), null)) : g = [d], f.addItems(g), f;
}
async function RVe(e, t, n, r, o, i, s) {
  let l;
  try {
    const { value: f, done: d } = await e.next();
    if (d)
      return i.setIsCompletedIterator(), { done: d, value: void 0 };
    l = f;
  } catch (f) {
    const d = wn(f, n, Wr(s));
    return { done: !0, value: es(d, o, i.errors) };
  }
  let c;
  try {
    return c = Za(t, o, n, r, s, l, i), Xt(c) && (c = c.then(void 0, (f) => {
      const d = wn(f, n, Wr(s)), g = es(d, o, i.errors);
      return Yo(t, s, i), g;
    })), { done: !1, value: c };
  } catch (f) {
    const d = wn(f, n, Wr(s)), g = es(d, o, i.errors);
    return Yo(t, s, i), { done: !1, value: g };
  }
}
async function FVe(e, t, n, r, o, i, s, l, c) {
  let f = e, d = c ?? void 0;
  for (; ; ) {
    const g = Bf(s, f, void 0), m = new T8({
      label: l,
      path: g,
      parentContext: d,
      iterator: t,
      exeContext: n
    });
    let v;
    try {
      v = await RVe(t, n, r, o, i, m, g);
    } catch (S) {
      m.errors.push(S), Yo(n, s, m), m.addItems(null), t != null && t.return && t.return().catch(() => {
      });
      return;
    }
    const { done: b, value: w } = v;
    let _;
    if (Xt(w) ? _ = w.then((S) => [S], (S) => (m.errors.push(S), Yo(n, s, m), null)) : _ = [w], m.addItems(_), b)
      break;
    d = m, f++;
  }
}
function Yo(e, t, n) {
  const r = Wr(t);
  e.subsequentPayloads.forEach((o) => {
    var i;
    if (o !== n) {
      for (let s = 0; s < r.length; s++)
        if (o.path[s] !== r[s])
          return;
      g_(o) && ((i = o.iterator) != null && i.return) && o.iterator.return().catch(() => {
      }), e.subsequentPayloads.delete(o);
    }
  });
}
function MVe(e) {
  const t = [];
  for (const n of e.subsequentPayloads) {
    const r = {};
    if (n.isCompleted) {
      if (e.subsequentPayloads.delete(n), g_(n)) {
        const o = n.items;
        if (n.isCompletedIterator)
          continue;
        r.items = o;
      } else {
        const o = n.data;
        r.data = o ?? null;
      }
      r.path = n.path, n.label && (r.label = n.label), n.errors.length > 0 && (r.errors = n.errors), t.push(r);
    }
  }
  return t;
}
function PVe(e) {
  let t = !1;
  const n = new Promise((i, s) => {
    var l;
    (l = e.signal) == null || l.addEventListener("abort", () => {
      var c;
      t = !0, s((c = e.signal) == null ? void 0 : c.reason);
    });
  });
  async function r() {
    if (t)
      return { value: void 0, done: !0 };
    if (await Promise.race([
      n,
      ...Array.from(e.subsequentPayloads).map((l) => l.promise)
    ]), t)
      return { value: void 0, done: !0 };
    const i = MVe(e), s = e.subsequentPayloads.size > 0;
    return !i.length && s ? r() : (s || (t = !0), {
      value: i.length ? { incremental: i, hasNext: s } : { hasNext: s },
      done: !1
    });
  }
  function o() {
    const i = [];
    return e.subsequentPayloads.forEach((s) => {
      var l;
      g_(s) && ((l = s.iterator) != null && l.return) && i.push(s.iterator.return());
    }), Promise.all(i);
  }
  return {
    [Symbol.asyncIterator]() {
      return this;
    },
    next: r,
    async return() {
      return await o(), t = !0, { value: void 0, done: !0 };
    },
    async throw(i) {
      return await o(), t = !0, Promise.reject(i);
    }
  };
}
class $Ve {
  constructor(t) {
    this.type = "defer", this.label = t.label, this.path = Wr(t.path), this.parentContext = t.parentContext, this.errors = [], this._exeContext = t.exeContext, this._exeContext.subsequentPayloads.add(this), this.isCompleted = !1, this.data = null, this.promise = new Promise((n) => {
      this._resolve = (r) => {
        n(r);
      };
    }).then((n) => {
      this.data = n, this.isCompleted = !0;
    });
  }
  addData(t) {
    var r, o, i;
    const n = (r = this.parentContext) == null ? void 0 : r.promise;
    if (n) {
      (o = this._resolve) == null || o.call(this, n.then(() => t));
      return;
    }
    (i = this._resolve) == null || i.call(this, t);
  }
}
class T8 {
  constructor(t) {
    this.type = "stream", this.items = null, this.label = t.label, this.path = Wr(t.path), this.parentContext = t.parentContext, this.iterator = t.iterator, this.errors = [], this._exeContext = t.exeContext, this._exeContext.subsequentPayloads.add(this), this.isCompleted = !1, this.items = null, this.promise = new Promise((n) => {
      this._resolve = (r) => {
        n(r);
      };
    }).then((n) => {
      this.items = n, this.isCompleted = !0;
    });
  }
  addItems(t) {
    var r, o, i;
    const n = (r = this.parentContext) == null ? void 0 : r.promise;
    if (n) {
      (o = this._resolve) == null || o.call(this, n.then(() => t));
      return;
    }
    (i = this._resolve) == null || i.call(this, t);
  }
  setIsCompletedIterator() {
    this.isCompletedIterator = !0;
  }
}
function g_(e) {
  return e.type === "stream";
}
function C8(e, t, n) {
  const r = n.name.value;
  return r === ei.name && e.getQueryType() === t ? ei : r === ti.name && e.getQueryType() === t ? ti : r === _o.name ? _o : t.getFields()[r];
}
function VVe(e) {
  const t = PC(e.document, e.operationName);
  if (t == null)
    throw new Error("Must provide an operation.");
  return t.operation === "subscription" ? OVe(e) : new zt(() => bVe(e)).then((n) => "initialResult" in n ? x8(n) : n).resolve();
}
function jVe(e) {
  return !!(e != null && e.schema);
}
function UVe(e) {
  var g;
  const { info: t, schema: n, rootValue: r = n.rootValue ?? t.rootValue, operationName: o = (g = t.operation.name) == null ? void 0 : g.value, operation: i = U8e(t.parentType, t.schema), fieldName: s = t.fieldName, selectionSet: l, fieldNodes: c = t.fieldNodes, context: f } = e, d = B8e({
    sourceSchema: t.schema,
    sourceParentType: t.parentType,
    sourceFieldName: t.fieldName,
    fragments: t.fragments,
    variableDefinitions: t.operation.variableDefinitions,
    variableValues: t.variableValues,
    targetRootValue: r,
    targetOperationName: o,
    targetOperation: i,
    targetFieldName: s,
    selectionSet: l,
    fieldNodes: c,
    context: f,
    info: t
  });
  return BVe({
    ...e,
    request: d
  });
}
function ER(e, t, n) {
  const r = y1(e, t), o = r.getFields()[n];
  if (!o)
    throw new Error(`Unable to find field '${n}' in type '${r}'.`);
  return o.type;
}
function BVe(e) {
  const t = qVe(e), n = new j8e(t), r = n.transformRequest(e.request);
  e.validateRequest && zVe(t, r.document);
  const i = WVe(t)(r);
  function s(l) {
    if (pl(l)) {
      const c = l[Symbol.asyncIterator]();
      return c_(c, (f) => n.transformResult(f));
    }
    return n.transformResult(l);
  }
  return Xt(i) ? i.then(s) : s(i);
}
function qVe({ request: e, schema: t, fieldName: n, returnType: r, args: o, info: i, transforms: s = [], transformedSchema: l, skipTypeMerging: c = !1 }) {
  var b;
  const f = Cc(e);
  let d;
  n == null ? d = f.selectionSet.selections[0].name.value : d = n;
  const g = (b = i == null ? void 0 : i.schema.extensions) == null ? void 0 : b.stitchingInfo, m = (g == null ? void 0 : g.subschemaMap.get(t)) ?? t, v = f.operation;
  if (jVe(m)) {
    const w = m.schema;
    return {
      subschema: t,
      subschemaConfig: m,
      targetSchema: w,
      operation: v,
      fieldName: d,
      args: o,
      context: e.context,
      info: i,
      returnType: r ?? (i == null ? void 0 : i.returnType) ?? ER(w, v, d),
      transforms: m.transforms != null ? m.transforms.concat(s) : s,
      transformedSchema: l ?? (m instanceof h8e ? m.transformedSchema : d_(w, m)),
      skipTypeMerging: c
    };
  }
  return {
    subschema: t,
    subschemaConfig: void 0,
    targetSchema: m,
    operation: v,
    fieldName: d,
    args: o,
    context: e.context,
    info: i,
    returnType: r ?? (i == null ? void 0 : i.returnType) ?? ER(m, v, d),
    transforms: s,
    transformedSchema: l ?? m,
    skipTypeMerging: c
  };
}
function zVe(e, t) {
  const n = kh(e.targetSchema, t);
  if (n.length > 0) {
    if (n.length > 1)
      throw new AggregateError(n, n.map((i) => i.message).join(`, 
`));
    const r = n[0];
    throw r.originalError || r;
  }
}
const HVe = {};
function WVe(e) {
  const { subschemaConfig: t, targetSchema: n, context: r } = e;
  let o = (t == null ? void 0 : t.executor) || GVe(n);
  if (t != null && t.batch) {
    const i = t == null ? void 0 : t.batchingOptions;
    o = hVe(r ?? HVe, o, i == null ? void 0 : i.dataLoaderOptions, i == null ? void 0 : i.extensionsReducer);
  }
  return o;
}
const GVe = Xs(function(t) {
  return function(r) {
    return VVe({
      schema: t,
      document: r.document,
      rootValue: r.rootValue,
      contextValue: r.context,
      variableValues: r.variables,
      operationName: r.operationName
    });
  };
});
function QVe(e) {
  const t = e.schema, n = e.createProxyingResolver ?? JVe, r = a_(t), o = {};
  for (const [i, s] of r.entries()) {
    const l = s.name, c = s.getFields();
    o[l] = {};
    for (const f in c) {
      const d = n({
        subschemaConfig: e,
        operation: i,
        fieldName: f
      }), g = KVe(e, d);
      i === "subscription" ? o[l][f] = {
        subscribe: g,
        resolve: YVe
      } : o[l][f] = {
        resolve: g
      };
    }
  }
  return o;
}
function YVe(e) {
  return e;
}
function KVe(e, t) {
  return function(r, o, i, s) {
    if (r != null) {
      const l = l_(s);
      if (h_(r)) {
        const c = c8(r), f = l8(r, l);
        if (e === f && r[l] !== void 0)
          return Hh(r[l], c, f, i, s);
      }
    }
    return t(r, o, i, s);
  };
}
function JVe({ subschemaConfig: e, operation: t }) {
  return function(r, o, i, s) {
    return UVe({
      schema: e,
      operation: t,
      context: i,
      info: s
    });
  };
}
const wR = Xs(function(t) {
  const n = t.schema, r = QVe(t), o = XVe(n, r);
  return d_(o, t);
});
function XVe(e, t) {
  return m6e(e, {
    [it.ROOT_FIELD]: (n, r, o) => {
      var i;
      return {
        ...n,
        ...(i = t[o]) == null ? void 0 : i[r]
      };
    },
    [it.OBJECT_FIELD]: (n) => ({
      ...n,
      resolve: z8e,
      subscribe: void 0
    }),
    [it.OBJECT_TYPE]: (n) => {
      const r = n.toConfig();
      return new zn({
        ...r,
        isTypeOf: void 0
      });
    },
    [it.INTERFACE_TYPE]: (n) => {
      const r = n.toConfig();
      return new zr({
        ...r,
        resolveType: void 0
      });
    },
    [it.UNION_TYPE]: (n) => {
      const r = n.toConfig();
      return new Ga({
        ...r,
        resolveType: void 0
      });
    },
    [it.ENUM_VALUE]: (n) => ({
      ...n,
      value: void 0
    })
  });
}
function ZVe(e, t) {
  var n;
  if ((n = e == null ? void 0 : e.data) != null && n.__schema)
    return $C(e.data, t);
  if (e != null && e.errors) {
    const r = e.errors.map((o) => ut(o.message, o));
    throw e.errors.length === 1 ? r[0] : new AggregateError(r, "Could not obtain introspection result");
  }
  throw ut(`Could not obtain introspection result, received the following as response; 
 ${Kn(e)}`);
}
function xR(e, t, n) {
  const r = fr(Iy(n), n);
  return new zt(() => e({
    document: r,
    context: t
  })).then((o) => pl(o) ? o[Symbol.asyncIterator]().next().then(({ value: s }) => s) : o).then((o) => ZVe(o, n)).resolve();
}
const e7e = async (e, t) => n8(e, t), v_ = new TextEncoder();
function Gs(...e) {
  const t = new Gs.Request(...e), n = new XMLHttpRequest();
  n.withCredentials = t.credentials === "include", n.timeout = t[Qe].timeout, n.open(t.method, t.url, !1);
  try {
    n.responseType = "arraybuffer";
  } catch {
  }
  for (const i of t.headers)
    n.setRequestHeader(...i);
  n.send(t.body || null);
  let r = n.getAllResponseHeaders();
  r = r && r.split(`\r
`).filter(Boolean).map((i) => i.split(": ", 2));
  const o = new Gs.Response(n.response, {
    headers: r,
    status: n.status,
    statusText: n.statusText
  });
  return o[Qe].url = n.responseURL, o[Qe].redirected = n.responseURL !== t.url, o;
}
const Qe = Symbol("SyncFetch Internals"), t7e = ["mode", "cache", "redirect", "referrer", "integrity"], n7e = {
  100: "Continue",
  101: "Switching Protocols",
  200: "OK",
  201: "Created",
  202: "Accepted",
  203: "Non-Authoritative Information",
  204: "No Content",
  205: "Reset Content",
  206: "Partial Content",
  300: "Multiple Choices",
  301: "Moved Permanently",
  302: "Found",
  303: "See Other",
  304: "Not Modified",
  305: "Use Proxy",
  307: "Temporary Redirect",
  400: "Bad Request",
  401: "Unauthorized",
  402: "Payment Required",
  403: "Forbidden",
  404: "Not Found",
  405: "Method Not Allowed",
  406: "Not Acceptable",
  407: "Proxy Authentication Required",
  408: "Request Timeout",
  409: "Conflict",
  410: "Gone",
  411: "Length Required",
  412: "Precondition Failed",
  413: "Payload Too Large",
  414: "URI Too Long",
  415: "Unsupported Media Type",
  416: "Range Not Satisfiable",
  417: "Expectation Failed",
  426: "Upgrade Required",
  500: "Internal Server Error",
  501: "Not Implemented",
  502: "Bad Gateway",
  503: "Service Unavailable",
  504: "Gateway Timeout",
  505: "HTTP Version Not Supported"
};
class ch {
  constructor(t, n = {}) {
    for (const r of t7e)
      if (r in n)
        throw new TypeError(`option ${r} not supported`);
    if (n.credentials === "same-origin")
      throw new TypeError("option credentials with value 'same-origin' not supported");
    if (this[Qe] = {
      method: n.method || "GET",
      headers: new Gs.Headers(n.headers),
      body: n.body ? v_.encode(n.body) : null,
      credentials: n.credentials || "omit",
      // Non-spec
      timeout: n.timeout || 0
    }, typeof t == "string")
      this[Qe].url = t;
    else if (t instanceof ch)
      this[Qe].url = t.url, n.method || (this[Qe].method = t.method), n.headers || (this[Qe].headers = t.headers), n.body || (this[Qe].body = t[Qe].body), n.credentials || (this[Qe].credentials = t.credentials);
    else
      throw new TypeError("Request input should be a URL string or a Request object");
  }
  get cache() {
    return "default";
  }
  get credentials() {
    return this[Qe].credentials;
  }
  get destination() {
    return "";
  }
  get headers() {
    return this[Qe].headers;
  }
  get integrity() {
    return "";
  }
  get method() {
    return this[Qe].method;
  }
  get mode() {
    return "cors";
  }
  get priority() {
    return "auto";
  }
  get redirect() {
    return "follow";
  }
  get referrer() {
    return "about:client";
  }
  get referrerPolicy() {
    return "";
  }
  get url() {
    return this[Qe].url;
  }
  clone() {
    return y_(this), new ch(this.url, this[Qe]);
  }
}
class x1 {
  constructor(t, n = {}) {
    this[Qe] = {
      body: t ? v_.encode(t) : null,
      bodyUsed: !1,
      headers: new Gs.Headers(n.headers),
      status: n.status,
      statusText: n.statusText
    };
  }
  get headers() {
    return this[Qe].headers;
  }
  get ok() {
    const t = this[Qe].status;
    return t >= 200 && t < 300;
  }
  get redirected() {
    return this[Qe].redirected;
  }
  get status() {
    return this[Qe].status;
  }
  get statusText() {
    return this[Qe].statusText;
  }
  get url() {
    return this[Qe].url;
  }
  clone() {
    return this.redirect(this[Qe].url, this[Qe].status);
  }
  redirect(t, n) {
    y_(this);
    const r = new x1(this[Qe].body, {
      headers: this[Qe].headers,
      status: n || this[Qe].status,
      statusText: n7e[n] || this[Qe].statusText
    });
    return r[Qe].url = t || this[Qe].url, r[Qe].redirected = this[Qe].redirected, r;
  }
}
class uh {
  constructor(t) {
    this[Qe] = {
      body: v_.encode(t),
      bodyUsed: !1
    };
  }
  get bodyUsed() {
    return this[Qe].bodyUsed;
  }
  static mixin(t) {
    for (const n of Object.getOwnPropertyNames(uh.prototype)) {
      if (n === "constructor")
        continue;
      const r = Object.getOwnPropertyDescriptor(uh.prototype, n);
      Object.defineProperty(t, n, { ...r, enumerable: !0 });
    }
  }
  arrayBuffer() {
    const t = Pd(this);
    return t.buffer.slice(t.byteOffset, t.byteOffset + t.byteLength);
  }
  blob() {
    const t = this.headers && this.headers.get("content-type");
    return new Blob([Pd(this)], t && { type: t });
  }
  text() {
    return Pd(this).toString();
  }
  json() {
    try {
      return JSON.parse(Pd(this).toString());
    } catch (t) {
      throw new TypeError(`invalid json response body at ${this.url} reason: ${t.message}`, "invalid-json");
    }
  }
  buffer() {
    return Pd(this).clone();
  }
}
function y_(e) {
  if (e.bodyUsed)
    throw new TypeError(`body used already for: ${e.url}`);
}
function Pd(e) {
  return y_(e), e[Qe].bodyUsed = !0, e[Qe].body || Buffer.alloc(0);
}
uh.mixin(ch.prototype);
uh.mixin(x1.prototype);
class r7e {
  constructor(t) {
    if (t instanceof Gs.Headers)
      this[Qe] = { ...t[Qe] };
    else if (this[Qe] = {}, Array.isArray(t))
      for (const [n, r] of t)
        this.append(n, r);
    else if (typeof t == "object")
      for (const n in t)
        this.set(n, t[n]);
  }
  // modification
  append(t, n) {
    t = t.toLowerCase(), this[Qe][t] || (this[Qe][t] = []), this[Qe][t].push(n);
  }
  delete(t) {
    delete this[Qe][t.toLowerCase()];
  }
  set(t, n) {
    this[Qe][t.toLowerCase()] = [n];
  }
  // access
  entries() {
    const t = [];
    for (const n in this[Qe])
      for (const r of this[Qe][n])
        t.push([n, r]);
    return t;
  }
  get(t) {
    return t = t.toLowerCase(), t in this[Qe] ? this[Qe][t].join(", ") : null;
  }
  keys() {
    return Object.keys(this[Qe]);
  }
  has(t) {
    return t.toLowerCase() in this[Qe];
  }
  values() {
    const t = [];
    for (const n in this[Qe])
      for (const r of this[Qe][n])
        t.push(r);
    return t;
  }
  *[Symbol.iterator]() {
    for (const t in this[Qe])
      for (const n of this[Qe][t])
        yield [t, n];
  }
}
Gs.Headers = r7e;
Gs.Request = ch;
Gs.Response = x1;
var o7e = Gs;
const i7e = /* @__PURE__ */ is(o7e), s7e = (e, t) => (typeof e == "string" ? t == null || delete t.signal : delete e.signal, i7e(e, t)), qw = (e) => import(`${e}`), SR = (e) => require(`${e}`);
var tc;
(function(e) {
  e.WS = "WS", e.LEGACY_WS = "LEGACY_WS", e.SSE = "SSE", e.GRAPHQL_SSE = "GRAPHQL_SSE";
})(tc || (tc = {}));
const a7e = ["http:", "https:", "ws:", "wss:"];
function TR(e) {
  try {
    const t = new URL(e);
    return a7e.includes(t.protocol);
  } catch {
    return !1;
  }
}
class l7e {
  buildHTTPExecutor(t, n, r) {
    const o = zw(t, {
      wss: "https",
      ws: "http"
    });
    return d8e({
      endpoint: o,
      fetch: n,
      ...r
    });
  }
  buildWSExecutor(t, n, r) {
    const o = zw(t, {
      https: "wss",
      http: "ws"
    });
    return M6e({
      url: o,
      webSocketImpl: n,
      connectionParams: r
    });
  }
  buildWSLegacyExecutor(t, n, r) {
    const o = zw(t, {
      https: "wss",
      http: "ws"
    });
    return p8e(o, n, r);
  }
  getFetch(t, n) {
    if (t) {
      if (typeof t == "string") {
        const [r, o] = t.split("#");
        return new zt(() => n(r)).then((i) => o ? i[o] : i).resolve();
      } else if (typeof t == "function")
        return t;
    }
    return n === qw ? e7e : s7e;
  }
  getDefaultMethodFromOptions(t, n) {
    return t && (n = t), n;
  }
  getWebSocketImpl(t, n) {
    if (typeof (n == null ? void 0 : n.webSocketImpl) == "string") {
      const [r, o] = n.webSocketImpl.split("#");
      return new zt(() => t(r)).then((i) => o ? i[o] : i).resolve();
    } else
      return (n == null ? void 0 : n.webSocketImpl) || q6;
  }
  buildSubscriptionExecutor(t, n, r, o) {
    if ((o == null ? void 0 : o.subscriptionsProtocol) === tc.SSE)
      return this.buildHTTPExecutor(t, n, o);
    if ((o == null ? void 0 : o.subscriptionsProtocol) === tc.GRAPHQL_SSE)
      return o != null && o.subscriptionsEndpoint || (t += "/stream"), this.buildHTTPExecutor(t, n, o);
    {
      const s = new zt(() => this.getWebSocketImpl(r, o)).then((l) => (o == null ? void 0 : o.subscriptionsProtocol) === tc.LEGACY_WS ? this.buildWSLegacyExecutor(t, l, o) : this.buildWSExecutor(t, l, o == null ? void 0 : o.connectionParams));
      return (l) => s.then((c) => c(l)).resolve();
    }
  }
  getExecutor(t, n, r) {
    const o = new zt(() => this.getFetch(r == null ? void 0 : r.customFetch, n)), i = o.then((s) => this.buildHTTPExecutor(t, s, r));
    if ((r == null ? void 0 : r.subscriptionsEndpoint) != null || (r == null ? void 0 : r.subscriptionsProtocol) !== tc.SSE) {
      let l = function(c) {
        var f;
        return c.operationType = c.operationType || ((f = Cc(c)) == null ? void 0 : f.operation), c.operationType === "subscription" && a8(Cc(c)) && (c.operationType = "subscription"), c.operationType === "subscription" ? s : i;
      };
      const s = o.then((c) => {
        const f = (r == null ? void 0 : r.subscriptionsEndpoint) || t;
        return this.buildSubscriptionExecutor(f, c, n, r);
      });
      return (c) => l(c).then((f) => f(c)).resolve();
    } else
      return (s) => i.then((l) => l(s)).resolve();
  }
  getExecutorAsync(t, n) {
    return this.getExecutor(t, qw, n);
  }
  getExecutorSync(t, n) {
    return this.getExecutor(t, SR, n);
  }
  handleSDL(t, n, r) {
    const o = this.getDefaultMethodFromOptions(r == null ? void 0 : r.method, "GET");
    return new zt(() => n(t, {
      method: o,
      headers: typeof (r == null ? void 0 : r.headers) == "function" ? r.headers() : r == null ? void 0 : r.headers
    })).then((i) => i.text()).then((i) => l6e(t, i, r)).resolve();
  }
  async load(t, n) {
    if (!TR(t))
      return [];
    let r = {
      location: t
    }, o;
    if (n != null && n.handleAsSDL || t.endsWith(".graphql") || t.endsWith(".graphqls")) {
      const i = await this.getFetch(n == null ? void 0 : n.customFetch, qw);
      if (r = await this.handleSDL(t, i, n), !r.schema && !r.document && !r.rawSDL)
        throw new Error("Invalid SDL response");
      r.schema = r.schema || (r.document ? Xv(r.document, n) : r.rawSDL ? Wx(r.rawSDL, n) : void 0);
    } else
      o = this.getExecutorAsync(t, n), r.schema = await xR(o, {}, n);
    if (!r.schema)
      throw new Error("Invalid introspected schema");
    return n != null && n.endpoint && (o = this.getExecutorAsync(n.endpoint, n)), o && (r.schema = wR({
      schema: r.schema,
      executor: o,
      batch: n == null ? void 0 : n.batch
    })), [r];
  }
  loadSync(t, n) {
    if (!TR(t))
      return [];
    let r = {
      location: t
    }, o;
    if (n != null && n.handleAsSDL || t.endsWith(".graphql") || t.endsWith(".graphqls")) {
      const i = this.getFetch(n == null ? void 0 : n.customFetch, SR);
      if (r = this.handleSDL(t, i, n), !r.schema && !r.document && !r.rawSDL)
        throw new Error("Invalid SDL response");
      r.schema = r.schema || (r.document ? Xv(r.document, n) : r.rawSDL ? Wx(r.rawSDL, n) : void 0);
    } else
      o = this.getExecutorSync(t, n), r.schema = xR(o, {}, n);
    if (!r.schema)
      throw new Error("Invalid introspected schema");
    return n != null && n.endpoint && (o = this.getExecutorSync(n.endpoint, n)), o && (r.schema = wR({
      schema: r.schema,
      executor: o
    })), [r];
  }
}
function zw(e, t) {
  return Object.entries(t).reduce((n, [r, o]) => n.replace(`${r}://`, `${o}://`).replace(`${r}:\\`, `${o}:\\`), e);
}
var rT = {};
const c7e = (...e) => rT.stringify(...e);
(function() {
  var e = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, t, n, r = {
    // table of character substitutions
    "\b": "\\b",
    "	": "\\t",
    "\n": "\\n",
    "\f": "\\f",
    "\r": "\\r",
    '"': '\\"',
    "\\": "\\\\"
  }, o;
  function i(l) {
    return e.lastIndex = 0, e.test(l) ? '"' + l.replace(e, function(c) {
      var f = r[c];
      return typeof f == "string" ? f : "\\u" + ("0000" + c.charCodeAt(0).toString(16)).slice(-4);
    }) + '"' : '"' + l + '"';
  }
  function s(l, c) {
    var f, d, g, m, v = t, b, w = c[l];
    switch (w && typeof w == "object" && typeof w.toJSON == "function" && (w = w.toJSON(l)), typeof o == "function" && (w = o.call(c, l, w)), typeof w) {
      case "string":
        return i(w);
      case "number":
        return isFinite(w) ? String(w) : "null";
      case "bigint":
      case "boolean":
      case "null":
        return String(w);
      case "object":
        if (!w)
          return "null";
        if (t += n, b = [], Object.prototype.toString.apply(w) === "[object Array]") {
          for (m = w.length, f = 0; f < m; f += 1)
            b[f] = s(f, w) || "null";
          return g = b.length === 0 ? "[]" : t ? `[
` + t + b.join(`,
` + t) + `
` + v + "]" : "[" + b.join(",") + "]", t = v, g;
        }
        if (o && typeof o == "object")
          for (m = o.length, f = 0; f < m; f += 1)
            typeof o[f] == "string" && (d = o[f], g = s(d, w), g && b.push(i(d) + (t ? ": " : ":") + g));
        else
          Object.keys(w).forEach(function(_) {
            var S = s(_, w);
            S && b.push(i(_) + (t ? ": " : ":") + S);
          });
        return g = b.length === 0 ? "{}" : t ? `{
` + t + b.join(`,
` + t) + `
` + v + "}" : "{" + b.join(",") + "}", t = v, g;
    }
  }
  typeof rT.stringify != "function" && (rT.stringify = function(l, c, f) {
    var d;
    if (t = "", n = "", typeof f == "number")
      for (d = 0; d < f; d += 1)
        n += " ";
    else
      typeof f == "string" && (n = f);
    if (o = c, c && typeof c != "function" && (typeof c != "object" || typeof c.length != "number"))
      throw new Error("JSON.stringify");
    return s("", { "": l });
  });
})();
function u7e(e) {
  var t = {
    strict: !1,
    // not being strict means do not generate syntax errors for "duplicate key"
    storeAsString: !1
    // toggles whether the values should be stored as BigNumber (default) or a string
  };
  e != null && (e.strict === !0 && (t.strict = !0), e.storeAsString === !0 && (t.storeAsString = !0));
  var n, r, o = {
    '"': '"',
    "\\": "\\",
    "/": "/",
    b: "\b",
    f: "\f",
    n: `
`,
    r: "\r",
    t: "	"
  }, i, s = function(w) {
    throw {
      name: "SyntaxError",
      message: w,
      at: n,
      text: i
    };
  }, l = function(w) {
    return w && w !== r && s("Expected '" + w + "' instead of '" + r + "'"), r = i.charAt(n), n += 1, r;
  }, c = function() {
    var w = "";
    for (r === "-" && (w = "-", l("-")); r >= "0" && r <= "9"; )
      w += r, l();
    if (r === ".")
      for (w += "."; l() && r >= "0" && r <= "9"; )
        w += r;
    if (r === "e" || r === "E")
      for (w += r, l(), (r === "-" || r === "+") && (w += r, l()); r >= "0" && r <= "9"; )
        w += r, l();
    if (!isFinite(Number(w)))
      s("Bad number");
    else {
      const _ = Number(w);
      return Number.isInteger(_) && !Number.isSafeInteger(_) ? t.storeAsString === !0 ? w : BigInt(w) : _;
    }
  }, f = function() {
    var w, _, S = "", x;
    if (r === '"')
      for (; l(); ) {
        if (r === '"')
          return l(), S;
        if (r === "\\")
          if (l(), r === "u") {
            for (x = 0, _ = 0; _ < 4 && (w = parseInt(l(), 16), !!isFinite(w)); _ += 1)
              x = x * 16 + w;
            S += String.fromCharCode(x);
          } else if (typeof o[r] == "string")
            S += o[r];
          else
            break;
        else
          S += r;
      }
    s("Bad string");
  }, d = function() {
    for (; r && r <= " "; )
      l();
  }, g = function() {
    switch (r) {
      case "t":
        return l("t"), l("r"), l("u"), l("e"), !0;
      case "f":
        return l("f"), l("a"), l("l"), l("s"), l("e"), !1;
      case "n":
        return l("n"), l("u"), l("l"), l("l"), null;
    }
    s("Unexpected '" + r + "'");
  }, m, v = function() {
    var w = [];
    if (r === "[") {
      if (l("["), d(), r === "]")
        return l("]"), w;
      for (; r; ) {
        if (w.push(m()), d(), r === "]")
          return l("]"), w;
        l(","), d();
      }
    }
    s("Bad array");
  }, b = function() {
    var w, _ = {};
    if (r === "{") {
      if (l("{"), d(), r === "}")
        return l("}"), _;
      for (; r; ) {
        if (w = f(), d(), l(":"), t.strict === !0 && Object.hasOwnProperty.call(_, w) && s('Duplicate key "' + w + '"'), _[w] = m(), d(), r === "}")
          return l("}"), _;
        l(","), d();
      }
    }
    s("Bad object");
  };
  return m = function() {
    switch (d(), r) {
      case "{":
        return b();
      case "[":
        return v();
      case '"':
        return f();
      case "-":
        return c();
      default:
        return r >= "0" && r <= "9" ? c() : g();
    }
  }, function(w, _) {
    var S;
    return i = w + "", n = 0, r = " ", S = m(), d(), r && s("Syntax error"), typeof _ == "function" ? function x(C, E) {
      var N, I = C[E];
      return I && typeof I == "object" && Object.keys(I).forEach(function(D) {
        N = x(I, D), N !== void 0 ? I[D] = N : delete I[D];
      }), _.call(C, E, I);
    }({ "": S }, "") : S;
  };
}
let nc;
typeof globalThis < "u" ? nc = globalThis : typeof self < "u" ? nc = self : typeof window < "u" ? nc = window : typeof Qd < "u" && (nc = Qd);
nc.BigInt.prototype.toJSON = function() {
  return this;
};
nc.JSON.parse = u7e();
nc.JSON.stringify = c7e;
const $g = function() {
}, Hw = {
  popstate: []
};
let f7e = {
  URL: function() {
    return {
      searchParams: {
        set: $g,
        append: $g,
        delete: $g
      }
    };
  },
  location: {
    href: "",
    search: ""
  },
  history: {
    pushState: $g
  },
  fireEvent: function(e) {
    Hw[e].forEach((t) => {
      t();
    });
  },
  addEventListener: function(e, t) {
    Hw[e].push(t);
  },
  removeEventListener: function(e, t) {
    const n = Hw[e], r = n.findIndex((o) => o === t);
    n.splice(r, 1);
  }
};
function ka() {
  return typeof window < "u" ? window : f7e;
}
const CR = [Number, String, Boolean, Date];
function d7e(e) {
  const { URL: t } = ka(), n = new t(ka().location.href);
  return Object.keys(e).forEach((r) => {
    const o = e[r];
    o != null ? Array.isArray(o) ? (n.searchParams.delete(r), o.forEach((i) => {
      n.searchParams.append(r, i);
    })) : o instanceof Date ? isNaN(o.getTime()) || n.searchParams.set(r, o.toISOString()) : typeof o == "object" ? n.searchParams.set(r, JSON.stringify(o)) : n.searchParams.set(r, o) : n.searchParams.delete(r);
  }), n;
}
function p7e(e) {
  return Array.isArray(e) && e.length > 0 && e.every((t) => typeof t == "number" || typeof t == "string" || typeof t == "boolean");
}
function h7e(e = {}) {
  if (!Object.values(e).every((n) => CR.includes(n) || p7e(n) || typeof n == "function"))
    throw new Error(`Unsupported param types. Must be one of [${CR.map((n) => n.name).join(", ")}]`);
}
function m7e(e = {}, t = {}, n = !1) {
  t && h7e(t);
  const [, r] = k.useState(), o = ka().location.search, i = k.useMemo(() => new URLSearchParams(o), [o]), s = k.useMemo(() => {
    let f = [];
    i.forEach((g, m) => {
      f.push({
        key: m,
        value: g
      });
    }), f = f.reduce((g, m) => ((g[m.key] = g[m.key] || []).push(m), g), {}), f = Object.keys(f).map((g) => {
      const m = f[g];
      return m.length === 1 ? [g, m[0].value] : [g, m.map(({ value: v }) => v)];
    });
    const d = Object.assign({}, e);
    return f.forEach(([g, m]) => {
      d[g] = v7e(g, m, t, e);
    }), d;
  }, [i]);
  function l(f) {
    const d = d7e(f);
    ka().location.search !== d.search && (n ? ka().history.replaceState({}, "", d.toString()) : ka().history.pushState({}, "", d.toString())), i.toString() !== d.searchParams.toString() && r({});
  }
  k.useEffect(() => {
    l(Object.assign(Object.assign({}, e), s));
  }, [s]);
  const c = (f) => {
    l(f);
  };
  return k.useEffect(() => {
    const f = () => {
      r({});
    };
    return ka().addEventListener("popstate", f), () => {
      ka().removeEventListener("popstate", f);
    };
  }, []), [s, c];
}
const g7e = {
  true: !0,
  false: !1
};
function v7e(e, t, n, r) {
  if (!n)
    return t;
  const o = n[e], i = t === void 0 ? r[e] : t;
  return o === Number ? Number(i) : o === Boolean ? g7e[i] : o === Date ? new Date(i) : Array.isArray(o) ? o.find((s) => s == i) || r[e] : typeof o == "function" ? o(i) : i;
}
const y7e = () => /* @__PURE__ */ W.jsxs("svg", { viewBox: "0 0 90 90", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
  /* @__PURE__ */ W.jsx(
    "path",
    {
      d: "M21 25.35c.728 0 1.42.156 2.043.435l19.1-10.985c.9-.5 2-.8 3-.8 1.1 0 2.1.3 3 .8l16.4 9.5c-1.2.8-2.1 2-2.7 3.4l-15.9-9.2c-.3-.2-.599-.2-.899-.2-.3 0-.6.1-.9.2L25.823 29.025A5.005 5.005 0 0 1 21 35.35a5 5 0 0 1 0-10Z",
      fill: "url(#a)"
    }
  ),
  /* @__PURE__ */ W.jsx(
    "path",
    {
      d: "M67.244 35.033A5.002 5.002 0 0 1 69 25.35a5 5 0 0 1 2.544 9.305V55.2c0 2.2-1.2 4.2-3 5.3l-16.4 9.4c0-1.5-.5-3-1.4-4.1l15.6-9c.6-.3.9-.9.9-1.6V35.033Z",
      fill: "url(#b)"
    }
  ),
  /* @__PURE__ */ W.jsx(
    "path",
    {
      d: "M49.844 69.106a5 5 0 1 1-9.78 2.043L21.843 60.6c-1.9-1.1-3-3.1-3-5.3V36.8c.7.2 1.5.4 2.2.4.7 0 1.4-.1 2-.3v18.4c0 .7.4 1.3.9 1.6l17.382 10.058a5.002 5.002 0 0 1 8.516 2.14l.002.002v.006Z",
      fill: "url(#c)"
    }
  ),
  /* @__PURE__ */ W.jsxs(
    "mask",
    {
      id: "g",
      style: {
        maskType: "alpha"
      },
      maskUnits: "userSpaceOnUse",
      x: 16,
      y: 14,
      width: 58,
      height: 62,
      children: [
        /* @__PURE__ */ W.jsx(
          "path",
          {
            d: "M21 25.35c.728 0 1.42.156 2.043.435l19.1-10.985c.9-.5 2-.8 3-.8 1.1 0 2.1.3 3 .8l16.4 9.5c-1.2.8-2.1 2-2.7 3.4l-15.9-9.2c-.3-.2-.599-.2-.899-.2-.3 0-.6.1-.9.2L25.823 29.025A5.005 5.005 0 0 1 21 35.35a5 5 0 0 1 0-10Z",
            fill: "url(#d)"
          }
        ),
        /* @__PURE__ */ W.jsx(
          "path",
          {
            d: "M67.244 35.033A5.002 5.002 0 0 1 69 25.35a5 5 0 0 1 2.544 9.305V55.2c0 2.2-1.2 4.2-3 5.3l-16.4 9.4c0-1.5-.5-3-1.4-4.1l15.6-9c.6-.3.9-.9.9-1.6V35.033Z",
            fill: "url(#e)"
          }
        ),
        /* @__PURE__ */ W.jsx(
          "path",
          {
            d: "M49.844 69.106a5 5 0 1 1-9.78 2.043L21.843 60.6c-1.9-1.1-3-3.1-3-5.3V36.8c.7.2 1.5.4 2.2.4.7 0 1.4-.1 2-.3v18.4c0 .7.4 1.3.9 1.6l17.382 10.058a5.002 5.002 0 0 1 8.516 2.14l.002.002v.006Z",
            fill: "url(#f)"
          }
        )
      ]
    }
  ),
  /* @__PURE__ */ W.jsxs("g", { mask: "url(#g)", children: [
    /* @__PURE__ */ W.jsx("g", { filter: "url(#h)", children: /* @__PURE__ */ W.jsx("circle", { cx: 73, cy: 25, r: 26, fill: "#ED2E7E" }) }),
    /* @__PURE__ */ W.jsx("g", { filter: "url(#i)", children: /* @__PURE__ */ W.jsx("circle", { cx: 26, cy: 69, r: 26, fill: "#1CC8EE" }) })
  ] }),
  /* @__PURE__ */ W.jsx(
    "path",
    {
      fillRule: "evenodd",
      clipRule: "evenodd",
      d: "M49.395 32.395c0 2.314-1.815 6.152-4.395 6.152-2.573 0-4.395-3.836-4.395-6.152A4.4 4.4 0 0 1 45 28a4.4 4.4 0 0 1 4.395 4.395ZM35.331 49.043v-.828c0-5.403 2.521-7.215 4.548-8.67.513-.368.98-.705 1.369-1.07 1.08 1.19 2.377 1.83 3.751 1.83 1.375 0 2.672-.64 3.753-1.83.388.366.855.702 1.367 1.07 2.027 1.455 4.548 3.267 4.548 8.67v.828l-.827.049c-3.856.227-6.976-2.192-8.841-5.514-1.884 3.357-5.015 5.74-8.84 5.514l-.828-.049Zm22.814 2.032c-1.128-.184-8.133-1.324-13.145 4.618-4.99-5.938-11.804-4.834-13.091-4.625a1.74 1.74 0 0 1-.21.028l.002.023c.024.281.266 3.156 2.355 5.123L30 58h30l-4.104-1.758c1.958-1.766 2.244-3.973 2.355-4.833.019-.146.033-.253.049-.313a1.388 1.388 0 0 1-.154-.021Zm-17.662-.971c1.912-.783 3.19-1.93 4.516-3.494 1.332 1.574 2.616 2.716 4.516 3.494l.06.114.01.021c-1.495.574-3.16 1.586-4.581 2.905-1.414-1.322-3.038-2.324-4.58-2.929l.059-.111Z",
      fill: "url(#j)"
    }
  ),
  /* @__PURE__ */ W.jsx(
    "mask",
    {
      id: "k",
      style: {
        maskType: "alpha"
      },
      maskUnits: "userSpaceOnUse",
      x: 30,
      y: 28,
      width: 30,
      height: 30,
      children: /* @__PURE__ */ W.jsx(
        "path",
        {
          fillRule: "evenodd",
          clipRule: "evenodd",
          d: "M49.395 32.395c0 2.314-1.815 6.152-4.395 6.152-2.573 0-4.395-3.836-4.395-6.152A4.4 4.4 0 0 1 45 28a4.4 4.4 0 0 1 4.395 4.395ZM35.331 49.043v-.828c0-5.403 2.521-7.215 4.548-8.67.513-.368.98-.705 1.369-1.07 1.08 1.19 2.377 1.83 3.751 1.83 1.375 0 2.672-.64 3.753-1.83.388.366.855.702 1.367 1.07 2.027 1.455 4.548 3.267 4.548 8.67v.828l-.827.049c-3.856.227-6.976-2.192-8.841-5.514-1.884 3.357-5.015 5.74-8.84 5.514l-.828-.049Zm22.814 2.032c-1.128-.184-8.133-1.324-13.145 4.618-4.99-5.938-11.804-4.834-13.091-4.625a1.74 1.74 0 0 1-.21.028l.002.023c.024.281.266 3.156 2.355 5.123L30 58h30l-4.104-1.758c1.958-1.766 2.244-3.973 2.355-4.833.019-.146.033-.253.049-.313a1.388 1.388 0 0 1-.154-.021Zm-17.662-.971c1.912-.783 3.19-1.93 4.516-3.494 1.332 1.574 2.616 2.716 4.516 3.494l.06.114.01.021c-1.495.574-3.16 1.586-4.581 2.905-1.414-1.322-3.038-2.324-4.58-2.929l.059-.111Z",
          fill: "#000"
        }
      )
    }
  ),
  /* @__PURE__ */ W.jsxs("g", { mask: "url(#k)", children: [
    /* @__PURE__ */ W.jsx("g", { filter: "url(#l)", children: /* @__PURE__ */ W.jsx("circle", { cx: 38, cy: 6, r: 26, fill: "#ED2E7E" }) }),
    /* @__PURE__ */ W.jsx("g", { filter: "url(#m)", children: /* @__PURE__ */ W.jsx("circle", { cx: 63, cy: 69, r: 26, fill: "#1CC8EE" }) })
  ] }),
  /* @__PURE__ */ W.jsxs("defs", { children: [
    /* @__PURE__ */ W.jsxs("linearGradient", { id: "a", x1: 16, y1: 14, x2: 87.213, y2: 44.598, gradientUnits: "userSpaceOnUse", children: [
      /* @__PURE__ */ W.jsx("stop", { stopColor: "#7433FF" }),
      /* @__PURE__ */ W.jsx("stop", { offset: 1, stopColor: "#FFA3FD" })
    ] }),
    /* @__PURE__ */ W.jsxs("linearGradient", { id: "b", x1: 16, y1: 14, x2: 87.213, y2: 44.598, gradientUnits: "userSpaceOnUse", children: [
      /* @__PURE__ */ W.jsx("stop", { stopColor: "#7433FF" }),
      /* @__PURE__ */ W.jsx("stop", { offset: 1, stopColor: "#FFA3FD" })
    ] }),
    /* @__PURE__ */ W.jsxs("linearGradient", { id: "c", x1: 16, y1: 14, x2: 87.213, y2: 44.598, gradientUnits: "userSpaceOnUse", children: [
      /* @__PURE__ */ W.jsx("stop", { stopColor: "#7433FF" }),
      /* @__PURE__ */ W.jsx("stop", { offset: 1, stopColor: "#FFA3FD" })
    ] }),
    /* @__PURE__ */ W.jsxs("linearGradient", { id: "d", x1: 16, y1: 14, x2: 87.213, y2: 44.598, gradientUnits: "userSpaceOnUse", children: [
      /* @__PURE__ */ W.jsx("stop", { stopColor: "#7433FF" }),
      /* @__PURE__ */ W.jsx("stop", { offset: 1, stopColor: "#FFA3FD" })
    ] }),
    /* @__PURE__ */ W.jsxs("linearGradient", { id: "e", x1: 16, y1: 14, x2: 87.213, y2: 44.598, gradientUnits: "userSpaceOnUse", children: [
      /* @__PURE__ */ W.jsx("stop", { stopColor: "#7433FF" }),
      /* @__PURE__ */ W.jsx("stop", { offset: 1, stopColor: "#FFA3FD" })
    ] }),
    /* @__PURE__ */ W.jsxs("linearGradient", { id: "f", x1: 16, y1: 14, x2: 87.213, y2: 44.598, gradientUnits: "userSpaceOnUse", children: [
      /* @__PURE__ */ W.jsx("stop", { stopColor: "#7433FF" }),
      /* @__PURE__ */ W.jsx("stop", { offset: 1, stopColor: "#FFA3FD" })
    ] }),
    /* @__PURE__ */ W.jsxs("linearGradient", { id: "j", x1: 30, y1: 28, x2: 66.165, y2: 44.436, gradientUnits: "userSpaceOnUse", children: [
      /* @__PURE__ */ W.jsx("stop", { stopColor: "#7433FF" }),
      /* @__PURE__ */ W.jsx("stop", { offset: 1, stopColor: "#FFA3FD" })
    ] }),
    /* @__PURE__ */ W.jsxs(
      "filter",
      {
        id: "h",
        x: 23,
        y: -25,
        width: 100,
        height: 100,
        filterUnits: "userSpaceOnUse",
        colorInterpolationFilters: "sRGB",
        children: [
          /* @__PURE__ */ W.jsx("feFlood", { floodOpacity: 0, result: "BackgroundImageFix" }),
          /* @__PURE__ */ W.jsx("feBlend", { in: "SourceGraphic", in2: "BackgroundImageFix", result: "shape" }),
          /* @__PURE__ */ W.jsx("feGaussianBlur", { stdDeviation: 12, result: "effect1_foregroundBlur_1677_11483" })
        ]
      }
    ),
    /* @__PURE__ */ W.jsxs(
      "filter",
      {
        id: "i",
        x: -24,
        y: 19,
        width: 100,
        height: 100,
        filterUnits: "userSpaceOnUse",
        colorInterpolationFilters: "sRGB",
        children: [
          /* @__PURE__ */ W.jsx("feFlood", { floodOpacity: 0, result: "BackgroundImageFix" }),
          /* @__PURE__ */ W.jsx("feBlend", { in: "SourceGraphic", in2: "BackgroundImageFix", result: "shape" }),
          /* @__PURE__ */ W.jsx("feGaussianBlur", { stdDeviation: 12, result: "effect1_foregroundBlur_1677_11483" })
        ]
      }
    ),
    /* @__PURE__ */ W.jsxs(
      "filter",
      {
        id: "l",
        x: -12,
        y: -44,
        width: 100,
        height: 100,
        filterUnits: "userSpaceOnUse",
        colorInterpolationFilters: "sRGB",
        children: [
          /* @__PURE__ */ W.jsx("feFlood", { floodOpacity: 0, result: "BackgroundImageFix" }),
          /* @__PURE__ */ W.jsx("feBlend", { in: "SourceGraphic", in2: "BackgroundImageFix", result: "shape" }),
          /* @__PURE__ */ W.jsx("feGaussianBlur", { stdDeviation: 12, result: "effect1_foregroundBlur_1677_11483" })
        ]
      }
    ),
    /* @__PURE__ */ W.jsxs(
      "filter",
      {
        id: "m",
        x: 13,
        y: 19,
        width: 100,
        height: 100,
        filterUnits: "userSpaceOnUse",
        colorInterpolationFilters: "sRGB",
        children: [
          /* @__PURE__ */ W.jsx("feFlood", { floodOpacity: 0, result: "BackgroundImageFix" }),
          /* @__PURE__ */ W.jsx("feBlend", { in: "SourceGraphic", in2: "BackgroundImageFix", result: "shape" }),
          /* @__PURE__ */ W.jsx("feGaussianBlur", { stdDeviation: 12, result: "effect1_foregroundBlur_1677_11483" })
        ]
      }
    )
  ] })
] }), b7e = (e, t) => {
  const n = e.definitions.filter((r) => {
    var o;
    return !(r.kind === U.OPERATION_DEFINITION && t && ((o = r.name) == null ? void 0 : o.value) !== t);
  });
  return {
    kind: U.DOCUMENT,
    definitions: n
  };
};
function E7e(e) {
  var g;
  const t = (
    /* GraphQL */
    `#
# Welcome to ${e.title || "Yoga GraphiQL"}
#
# ${e.title || "Yoga GraphiQL"} is an in-browser tool for writing, validating, and
# testing GraphQL queries.
#
# Type queries into this side of the screen, and you will see intelligent
# typeaheads aware of the current GraphQL type schema and live syntax and
# validation errors highlighted within the text.
#
# GraphQL queries typically start with a "{" character. Lines that start
# with a # are ignored.
#
# An example GraphQL query might look like:
#
#     {
#       field(arg: "value") {
#         subField
#       }
#     }
#
# Keyboard shortcuts:
#
#  Prettify Query:  Shift-Ctrl-P (or press the prettify button above)
#
#     Merge Query:  Shift-Ctrl-M (or press the merge button above)
#
#       Run Query:  Ctrl-Enter (or press the play button above)
#
#   Auto Complete:  Ctrl-Space (or just start typing)
#
`
  ), n = new URL(e.endpoint ?? location.pathname, location.href).toString(), r = {
    query: String
  }, o = k.useMemo(() => new l7e(), []), i = k.useMemo(() => {
    if (e.fetcher)
      return e.endpoint && console.warn(
        "You are using a custom fetcher and an endpoint. The endpoint will be ignored."
      ), e.fetcher;
    const m = o.getExecutorAsync(n, {
      subscriptionsProtocol: tc.GRAPHQL_SSE,
      subscriptionsEndpoint: n,
      // necessary because graphql-sse in graphql-tools url-loader defaults to endpoint+'/stream'
      credentials: "same-origin",
      specifiedByUrl: !0,
      directiveIsRepeatable: !0,
      ...e,
      headers: e.additionalHeaders || {}
    });
    return function(b, w) {
      const _ = b7e(
        fr(b.query),
        b.operationName ?? void 0
      );
      return m({
        document: (
          // eslint-disable-next-line @typescript-eslint/no-explicit-any
          _
        ),
        operationName: b.operationName ?? void 0,
        variables: b.variables,
        extensions: {
          headers: w == null ? void 0 : w.headers
        }
      });
    };
  }, [o, n, e.fetcher]), [s, l] = m7e(
    {
      query: e.defaultQuery || t
    },
    r,
    !1
  ), [c, f] = k.useState((g = s.query) == null ? void 0 : g.toString()), d = _4e({
    showAttribution: !0
  });
  return e.query && !e.onEditQuery && console.warn(
    "If you provide `query` prop, you should also provide `onEditQuery` prop to handle query changes."
  ), /* @__PURE__ */ W.jsx("div", { className: "graphiql-container", children: /* @__PURE__ */ W.jsx(
    n_,
    {
      shouldPersistHeaders: !0,
      plugins: [d],
      schemaDescription: !0,
      query: c,
      ...e,
      fetcher: i,
      children: /* @__PURE__ */ W.jsx(
        V6,
        {
          isHeadersEditorEnabled: !0,
          defaultEditorToolsVisibility: !0,
          ...e,
          onEditQuery: (m, v) => {
            var b;
            l({
              query: m
            }), f(m), (b = e.onEditQuery) == null || b.call(e, m, v);
          },
          children: /* @__PURE__ */ W.jsx(Fa.Logo, { children: /* @__PURE__ */ W.jsxs("div", { style: { display: "flex", alignItems: "center" }, children: [
            /* @__PURE__ */ W.jsx("div", { style: { width: 40, display: "flex" }, children: (e == null ? void 0 : e.logo) || /* @__PURE__ */ W.jsx(y7e, {}) }),
            /* @__PURE__ */ W.jsx("span", { children: (e == null ? void 0 : e.title) || /* @__PURE__ */ W.jsxs(W.Fragment, { children: [
              "Yoga Graph",
              /* @__PURE__ */ W.jsx("em", { children: "i" }),
              "QL"
            ] }) })
          ] }) })
        }
      )
    }
  ) });
}
function Sje(e, t) {
  jv.render(/* @__PURE__ */ W.jsx(E7e, { ...t }), e);
}
globalThis.React = ce;
var w7e = Object.defineProperty, P = (e, t) => w7e(e, "name", { value: t, configurable: !0 }), x7e = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function Kr(e) {
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
}
P(Kr, "getDefaultExportFromCjs");
var kR = { exports: {} }, _R;
function Ir() {
  return _R || (_R = 1, function(e, t) {
    (function(n, r) {
      e.exports = r();
    })(x7e, function() {
      var n = navigator.userAgent, r = navigator.platform, o = /gecko\/\d/i.test(n), i = /MSIE \d/.test(n), s = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(n), l = /Edge\/(\d+)/.exec(n), c = i || s || l, f = c && (i ? document.documentMode || 6 : +(l || s)[1]), d = !l && /WebKit\//.test(n), g = d && /Qt\/\d+\.\d+/.test(n), m = !l && /Chrome\//.test(n), v = /Opera\//.test(n), b = /Apple Computer/.test(navigator.vendor), w = /Mac OS X 1\d\D([8-9]|\d\d)\D/.test(n), _ = /PhantomJS/.test(n), S = b && (/Mobile\/\w+/.test(n) || navigator.maxTouchPoints > 2), x = /Android/.test(n), C = S || x || /webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(n), E = S || /Mac/.test(r), N = /\bCrOS\b/.test(n), I = /win/i.test(r), D = v && n.match(/Version\/(\d*\.\d*)/);
      D && (D = Number(D[1])), D && D >= 15 && (v = !1, d = !0);
      var A = E && (g || v && (D == null || D < 12.11)), F = o || c && f >= 9;
      function $(a) {
        return new RegExp("(^|\\s)" + a + "(?:$|\\s)\\s*");
      }
      P($, "classTest");
      var q = /* @__PURE__ */ P(function(a, u) {
        var h = a.className, p = $(u).exec(h);
        if (p) {
          var y = h.slice(p.index + p[0].length);
          a.className = h.slice(0, p.index) + (y ? p[1] + y : "");
        }
      }, "rmClass");
      function H(a) {
        for (var u = a.childNodes.length; u > 0; --u)
          a.removeChild(a.firstChild);
        return a;
      }
      P(H, "removeChildren");
      function z(a, u) {
        return H(a).appendChild(u);
      }
      P(z, "removeChildrenAndAdd");
      function B(a, u, h, p) {
        var y = document.createElement(a);
        if (h && (y.className = h), p && (y.style.cssText = p), typeof u == "string")
          y.appendChild(document.createTextNode(u));
        else if (u)
          for (var T = 0; T < u.length; ++T)
            y.appendChild(u[T]);
        return y;
      }
      P(B, "elt");
      function R(a, u, h, p) {
        var y = B(a, u, h, p);
        return y.setAttribute("role", "presentation"), y;
      }
      P(R, "eltP");
      var te;
      document.createRange ? te = /* @__PURE__ */ P(function(a, u, h, p) {
        var y = document.createRange();
        return y.setEnd(p || a, h), y.setStart(a, u), y;
      }, "range") : te = /* @__PURE__ */ P(function(a, u, h) {
        var p = document.body.createTextRange();
        try {
          p.moveToElementText(a.parentNode);
        } catch {
          return p;
        }
        return p.collapse(!0), p.moveEnd("character", h), p.moveStart("character", u), p;
      }, "range");
      function Q(a, u) {
        if (u.nodeType == 3 && (u = u.parentNode), a.contains)
          return a.contains(u);
        do
          if (u.nodeType == 11 && (u = u.host), u == a)
            return !0;
        while (u = u.parentNode);
      }
      P(Q, "contains");
      function Y() {
        var a;
        try {
          a = document.activeElement;
        } catch {
          a = document.body || null;
        }
        for (; a && a.shadowRoot && a.shadowRoot.activeElement; )
          a = a.shadowRoot.activeElement;
        return a;
      }
      P(Y, "activeElt");
      function K(a, u) {
        var h = a.className;
        $(u).test(h) || (a.className += (h ? " " : "") + u);
      }
      P(K, "addClass");
      function Z(a, u) {
        for (var h = a.split(" "), p = 0; p < h.length; p++)
          h[p] && !$(h[p]).test(u) && (u += " " + h[p]);
        return u;
      }
      P(Z, "joinClasses");
      var re = /* @__PURE__ */ P(function(a) {
        a.select();
      }, "selectInput");
      S ? re = /* @__PURE__ */ P(function(a) {
        a.selectionStart = 0, a.selectionEnd = a.value.length;
      }, "selectInput") : c && (re = /* @__PURE__ */ P(function(a) {
        try {
          a.select();
        } catch {
        }
      }, "selectInput"));
      function J(a) {
        var u = Array.prototype.slice.call(arguments, 1);
        return function() {
          return a.apply(null, u);
        };
      }
      P(J, "bind");
      function ie(a, u, h) {
        u || (u = {});
        for (var p in a)
          a.hasOwnProperty(p) && (h !== !1 || !u.hasOwnProperty(p)) && (u[p] = a[p]);
        return u;
      }
      P(ie, "copyObj");
      function ne(a, u, h, p, y) {
        u == null && (u = a.search(/[^\s\u00a0]/), u == -1 && (u = a.length));
        for (var T = p || 0, O = y || 0; ; ) {
          var L = a.indexOf("	", T);
          if (L < 0 || L >= u)
            return O + (u - T);
          O += L - T, O += h - O % h, T = L + 1;
        }
      }
      P(ne, "countColumn");
      var ae = /* @__PURE__ */ P(function() {
        this.id = null, this.f = null, this.time = 0, this.handler = J(this.onTimeout, this);
      }, "Delayed");
      ae.prototype.onTimeout = function(a) {
        a.id = 0, a.time <= +/* @__PURE__ */ new Date() ? a.f() : setTimeout(a.handler, a.time - +/* @__PURE__ */ new Date());
      }, ae.prototype.set = function(a, u) {
        this.f = u;
        var h = +/* @__PURE__ */ new Date() + a;
        (!this.id || h < this.time) && (clearTimeout(this.id), this.id = setTimeout(this.handler, a), this.time = h);
      };
      function le(a, u) {
        for (var h = 0; h < a.length; ++h)
          if (a[h] == u)
            return h;
        return -1;
      }
      P(le, "indexOf");
      var de = 50, xe = { toString: function() {
        return "CodeMirror.Pass";
      } }, ge = { scroll: !1 }, qe = { origin: "*mouse" }, Ie = { origin: "+move" };
      function Oe(a, u, h) {
        for (var p = 0, y = 0; ; ) {
          var T = a.indexOf("	", p);
          T == -1 && (T = a.length);
          var O = T - p;
          if (T == a.length || y + O >= u)
            return p + Math.min(O, u - y);
          if (y += T - p, y += h - y % h, p = T + 1, y >= u)
            return p;
        }
      }
      P(Oe, "findColumn");
      var ot = [""];
      function Nt(a) {
        for (; ot.length <= a; )
          ot.push(Ve(ot) + " ");
        return ot[a];
      }
      P(Nt, "spaceStr");
      function Ve(a) {
        return a[a.length - 1];
      }
      P(Ve, "lst");
      function At(a, u) {
        for (var h = [], p = 0; p < a.length; p++)
          h[p] = u(a[p], p);
        return h;
      }
      P(At, "map");
      function hr(a, u, h) {
        for (var p = 0, y = h(u); p < a.length && h(a[p]) <= y; )
          p++;
        a.splice(p, 0, u);
      }
      P(hr, "insertSorted");
      function Rt() {
      }
      P(Rt, "nothing");
      function hn(a, u) {
        var h;
        return Object.create ? h = Object.create(a) : (Rt.prototype = a, h = new Rt()), u && ie(u, h), h;
      }
      P(hn, "createObj");
      var $i = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;
      function er(a) {
        return /\w/.test(a) || a > "€" && (a.toUpperCase() != a.toLowerCase() || $i.test(a));
      }
      P(er, "isWordCharBasic");
      function ea(a, u) {
        return u ? u.source.indexOf("\\w") > -1 && er(a) ? !0 : u.test(a) : er(a);
      }
      P(ea, "isWordChar");
      function Vc(a) {
        for (var u in a)
          if (a.hasOwnProperty(u) && a[u])
            return !1;
        return !0;
      }
      P(Vc, "isEmpty");
      var Yh = /[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;
      function ml(a) {
        return a.charCodeAt(0) >= 768 && Yh.test(a);
      }
      P(ml, "isExtendingChar");
      function jc(a, u, h) {
        for (; (h < 0 ? u > 0 : u < a.length) && ml(a.charAt(u)); )
          u += h;
        return u;
      }
      P(jc, "skipExtendingChars");
      function Io(a, u, h) {
        for (var p = u > h ? -1 : 1; ; ) {
          if (u == h)
            return u;
          var y = (u + h) / 2, T = p < 0 ? Math.ceil(y) : Math.floor(y);
          if (T == u)
            return a(T) ? u : h;
          a(T) ? h = T : u = T + p;
        }
      }
      P(Io, "findFirst");
      function zf(a, u, h, p) {
        if (!a)
          return p(u, h, "ltr", 0);
        for (var y = !1, T = 0; T < a.length; ++T) {
          var O = a[T];
          (O.from < h && O.to > u || u == h && O.to == u) && (p(Math.max(O.from, u), Math.min(O.to, h), O.level == 1 ? "rtl" : "ltr", T), y = !0);
        }
        y || p(u, h, "ltr");
      }
      P(zf, "iterateBidiSections");
      var Jr = null;
      function jt(a, u, h) {
        var p;
        Jr = null;
        for (var y = 0; y < a.length; ++y) {
          var T = a[y];
          if (T.from < u && T.to > u)
            return y;
          T.to == u && (T.from != T.to && h == "before" ? p = y : Jr = y), T.from == u && (T.from != T.to && h != "before" ? p = y : Jr = y);
        }
        return p ?? Jr;
      }
      P(jt, "getBidiPartAt");
      var ta = function() {
        var a = "bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN", u = "nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";
        function h(V) {
          return V <= 247 ? a.charAt(V) : 1424 <= V && V <= 1524 ? "R" : 1536 <= V && V <= 1785 ? u.charAt(V - 1536) : 1774 <= V && V <= 2220 ? "r" : 8192 <= V && V <= 8203 ? "w" : V == 8204 ? "b" : "L";
        }
        P(h, "charType");
        var p = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/, y = /[stwN]/, T = /[LRr]/, O = /[Lb1n]/, L = /[1n]/;
        function M(V, G, X) {
          this.level = V, this.from = G, this.to = X;
        }
        return P(M, "BidiSpan"), function(V, G) {
          var X = G == "ltr" ? "L" : "R";
          if (V.length == 0 || G == "ltr" && !p.test(V))
            return !1;
          for (var se = V.length, oe = [], pe = 0; pe < se; ++pe)
            oe.push(h(V.charCodeAt(pe)));
          for (var ye = 0, Ce = X; ye < se; ++ye) {
            var Ae = oe[ye];
            Ae == "m" ? oe[ye] = Ce : Ce = Ae;
          }
          for (var Le = 0, De = X; Le < se; ++Le) {
            var Me = oe[Le];
            Me == "1" && De == "r" ? oe[Le] = "n" : T.test(Me) && (De = Me, Me == "r" && (oe[Le] = "R"));
          }
          for (var Ge = 1, ze = oe[0]; Ge < se - 1; ++Ge) {
            var st = oe[Ge];
            st == "+" && ze == "1" && oe[Ge + 1] == "1" ? oe[Ge] = "1" : st == "," && ze == oe[Ge + 1] && (ze == "1" || ze == "n") && (oe[Ge] = ze), ze = st;
          }
          for (var Dt = 0; Dt < se; ++Dt) {
            var Rn = oe[Dt];
            if (Rn == ",")
              oe[Dt] = "N";
            else if (Rn == "%") {
              var Ut = void 0;
              for (Ut = Dt + 1; Ut < se && oe[Ut] == "%"; ++Ut)
                ;
              for (var Mr = Dt && oe[Dt - 1] == "!" || Ut < se && oe[Ut] == "1" ? "1" : "N", Pr = Dt; Pr < Ut; ++Pr)
                oe[Pr] = Mr;
              Dt = Ut - 1;
            }
          }
          for (var mn = 0, $r = X; mn < se; ++mn) {
            var Gn = oe[mn];
            $r == "L" && Gn == "1" ? oe[mn] = "L" : T.test(Gn) && ($r = Gn);
          }
          for (var On = 0; On < se; ++On)
            if (y.test(oe[On])) {
              var gn = void 0;
              for (gn = On + 1; gn < se && y.test(oe[gn]); ++gn)
                ;
              for (var nn = (On ? oe[On - 1] : X) == "L", Vr = (gn < se ? oe[gn] : X) == "L", gu = nn == Vr ? nn ? "L" : "R" : X, ma = On; ma < gn; ++ma)
                oe[ma] = gu;
              On = gn - 1;
            }
          for (var rr = [], Hi, Fn = 0; Fn < se; )
            if (O.test(oe[Fn])) {
              var bE = Fn;
              for (++Fn; Fn < se && O.test(oe[Fn]); ++Fn)
                ;
              rr.push(new M(0, bE, Fn));
            } else {
              var Es = Fn, Ml = rr.length, Pl = G == "rtl" ? 1 : 0;
              for (++Fn; Fn < se && oe[Fn] != "L"; ++Fn)
                ;
              for (var br = Es; br < Fn; )
                if (L.test(oe[br])) {
                  Es < br && (rr.splice(Ml, 0, new M(1, Es, br)), Ml += Pl);
                  var vu = br;
                  for (++br; br < Fn && L.test(oe[br]); ++br)
                    ;
                  rr.splice(Ml, 0, new M(2, vu, br)), Ml += Pl, Es = br;
                } else
                  ++br;
              Es < Fn && rr.splice(Ml, 0, new M(1, Es, Fn));
            }
          return G == "ltr" && (rr[0].level == 1 && (Hi = V.match(/^\s+/)) && (rr[0].from = Hi[0].length, rr.unshift(new M(0, 0, Hi[0].length))), Ve(rr).level == 1 && (Hi = V.match(/\s+$/)) && (Ve(rr).to -= Hi[0].length, rr.push(new M(0, se - Hi[0].length, se)))), G == "rtl" ? rr.reverse() : rr;
        };
      }();
      function mr(a, u) {
        var h = a.order;
        return h == null && (h = a.order = ta(a.text, u)), h;
      }
      P(mr, "getOrder");
      var Vi = [], We = /* @__PURE__ */ P(function(a, u, h) {
        if (a.addEventListener)
          a.addEventListener(u, h, !1);
        else if (a.attachEvent)
          a.attachEvent("on" + u, h);
        else {
          var p = a._handlers || (a._handlers = {});
          p[u] = (p[u] || Vi).concat(h);
        }
      }, "on");
      function na(a, u) {
        return a._handlers && a._handlers[u] || Vi;
      }
      P(na, "getHandlers");
      function tr(a, u, h) {
        if (a.removeEventListener)
          a.removeEventListener(u, h, !1);
        else if (a.detachEvent)
          a.detachEvent("on" + u, h);
        else {
          var p = a._handlers, y = p && p[u];
          if (y) {
            var T = le(y, h);
            T > -1 && (p[u] = y.slice(0, T).concat(y.slice(T + 1)));
          }
        }
      }
      P(tr, "off");
      function Ke(a, u) {
        var h = na(a, u);
        if (h.length)
          for (var p = Array.prototype.slice.call(arguments, 2), y = 0; y < h.length; ++y)
            h[y].apply(null, p);
      }
      P(Ke, "signal");
      function tn(a, u, h) {
        return typeof u == "string" && (u = { type: u, preventDefault: function() {
          this.defaultPrevented = !0;
        } }), Ke(a, h || u.type, a, u), Lr(u) || u.codemirrorIgnore;
      }
      P(tn, "signalDOMEvent");
      function ra(a) {
        var u = a._handlers && a._handlers.cursorActivity;
        if (u)
          for (var h = a.curOp.cursorActivityHandlers || (a.curOp.cursorActivityHandlers = []), p = 0; p < u.length; ++p)
            le(h, u[p]) == -1 && h.push(u[p]);
      }
      P(ra, "signalCursorActivity");
      function Cn(a, u) {
        return na(a, u).length > 0;
      }
      P(Cn, "hasHandler");
      function Lo(a) {
        a.prototype.on = function(u, h) {
          We(this, u, h);
        }, a.prototype.off = function(u, h) {
          tr(this, u, h);
        };
      }
      P(Lo, "eventMixin");
      function Ln(a) {
        a.preventDefault ? a.preventDefault() : a.returnValue = !1;
      }
      P(Ln, "e_preventDefault");
      function oa(a) {
        a.stopPropagation ? a.stopPropagation() : a.cancelBubble = !0;
      }
      P(oa, "e_stopPropagation");
      function Lr(a) {
        return a.defaultPrevented != null ? a.defaultPrevented : a.returnValue == !1;
      }
      P(Lr, "e_defaultPrevented");
      function cs(a) {
        Ln(a), oa(a);
      }
      P(cs, "e_stop");
      function ji(a) {
        return a.target || a.srcElement;
      }
      P(ji, "e_target");
      function Uc(a) {
        var u = a.which;
        return u == null && (a.button & 1 ? u = 1 : a.button & 2 ? u = 3 : a.button & 4 && (u = 2)), E && a.ctrlKey && u == 1 && (u = 3), u;
      }
      P(Uc, "e_button");
      var Bc = function() {
        if (c && f < 9)
          return !1;
        var a = B("div");
        return "draggable" in a || "dragDrop" in a;
      }(), gr;
      function qc(a) {
        if (gr == null) {
          var u = B("span", "​");
          z(a, B("span", [u, document.createTextNode("x")])), a.firstChild.offsetHeight != 0 && (gr = u.offsetWidth <= 1 && u.offsetHeight > 2 && !(c && f < 8));
        }
        var h = gr ? B("span", "​") : B("span", " ", null, "display: inline-block; width: 1px; margin-right: -1px");
        return h.setAttribute("cm-text", ""), h;
      }
      P(qc, "zeroWidthElement");
      var zc;
      function Ro(a) {
        if (zc != null)
          return zc;
        var u = z(a, document.createTextNode("AخA")), h = te(u, 0, 1).getBoundingClientRect(), p = te(u, 1, 2).getBoundingClientRect();
        return H(a), !h || h.left == h.right ? !1 : zc = p.right - h.right < 3;
      }
      P(Ro, "hasBadBidiRects");
      var Hc = `

b`.split(/\n/).length != 3 ? function(a) {
        for (var u = 0, h = [], p = a.length; u <= p; ) {
          var y = a.indexOf(`
`, u);
          y == -1 && (y = a.length);
          var T = a.slice(u, a.charAt(y - 1) == "\r" ? y - 1 : y), O = T.indexOf("\r");
          O != -1 ? (h.push(T.slice(0, O)), u += O + 1) : (h.push(T), u = y + 1);
        }
        return h;
      } : function(a) {
        return a.split(/\r\n?|\n/);
      }, Hf = window.getSelection ? function(a) {
        try {
          return a.selectionStart != a.selectionEnd;
        } catch {
          return !1;
        }
      } : function(a) {
        var u;
        try {
          u = a.ownerDocument.selection.createRange();
        } catch {
        }
        return !u || u.parentElement() != a ? !1 : u.compareEndPoints("StartToEnd", u) != 0;
      }, Wf = function() {
        var a = B("div");
        return "oncopy" in a ? !0 : (a.setAttribute("oncopy", "return;"), typeof a.oncopy == "function");
      }(), Wc = null;
      function Ui(a) {
        if (Wc != null)
          return Wc;
        var u = z(a, B("span", "x")), h = u.getBoundingClientRect(), p = te(u, 0, 1).getBoundingClientRect();
        return Wc = Math.abs(h.left - p.left) > 1;
      }
      P(Ui, "hasBadZoomedRects");
      var co = {}, Xr = {};
      function Gc(a, u) {
        arguments.length > 2 && (u.dependencies = Array.prototype.slice.call(arguments, 2)), co[a] = u;
      }
      P(Gc, "defineMode");
      function ai(a, u) {
        Xr[a] = u;
      }
      P(ai, "defineMIME");
      function ia(a) {
        if (typeof a == "string" && Xr.hasOwnProperty(a))
          a = Xr[a];
        else if (a && typeof a.name == "string" && Xr.hasOwnProperty(a.name)) {
          var u = Xr[a.name];
          typeof u == "string" && (u = { name: u }), a = hn(u, a), a.name = u.name;
        } else {
          if (typeof a == "string" && /^[\w\-]+\/[\w\-]+\+xml$/.test(a))
            return ia("application/xml");
          if (typeof a == "string" && /^[\w\-]+\/[\w\-]+\+json$/.test(a))
            return ia("application/json");
        }
        return typeof a == "string" ? { name: a } : a || { name: "null" };
      }
      P(ia, "resolveMode");
      function sa(a, u) {
        u = ia(u);
        var h = co[u.name];
        if (!h)
          return sa(a, "text/plain");
        var p = h(a, u);
        if (Fo.hasOwnProperty(u.name)) {
          var y = Fo[u.name];
          for (var T in y)
            y.hasOwnProperty(T) && (p.hasOwnProperty(T) && (p["_" + T] = p[T]), p[T] = y[T]);
        }
        if (p.name = u.name, u.helperType && (p.helperType = u.helperType), u.modeProps)
          for (var O in u.modeProps)
            p[O] = u.modeProps[O];
        return p;
      }
      P(sa, "getMode");
      var Fo = {};
      function uo(a, u) {
        var h = Fo.hasOwnProperty(a) ? Fo[a] : Fo[a] = {};
        ie(u, h);
      }
      P(uo, "extendMode");
      function Zr(a, u) {
        if (u === !0)
          return u;
        if (a.copyState)
          return a.copyState(u);
        var h = {};
        for (var p in u) {
          var y = u[p];
          y instanceof Array && (y = y.concat([])), h[p] = y;
        }
        return h;
      }
      P(Zr, "copyState");
      function gl(a, u) {
        for (var h; a.innerMode && (h = a.innerMode(u), !(!h || h.mode == a)); )
          u = h.state, a = h.mode;
        return h || { mode: a, state: u };
      }
      P(gl, "innerMode");
      function vl(a, u, h) {
        return a.startState ? a.startState(u, h) : !0;
      }
      P(vl, "startState");
      var Qt = /* @__PURE__ */ P(function(a, u, h) {
        this.pos = this.start = 0, this.string = a, this.tabSize = u || 8, this.lastColumnPos = this.lastColumnValue = 0, this.lineStart = 0, this.lineOracle = h;
      }, "StringStream");
      Qt.prototype.eol = function() {
        return this.pos >= this.string.length;
      }, Qt.prototype.sol = function() {
        return this.pos == this.lineStart;
      }, Qt.prototype.peek = function() {
        return this.string.charAt(this.pos) || void 0;
      }, Qt.prototype.next = function() {
        if (this.pos < this.string.length)
          return this.string.charAt(this.pos++);
      }, Qt.prototype.eat = function(a) {
        var u = this.string.charAt(this.pos), h;
        if (typeof a == "string" ? h = u == a : h = u && (a.test ? a.test(u) : a(u)), h)
          return ++this.pos, u;
      }, Qt.prototype.eatWhile = function(a) {
        for (var u = this.pos; this.eat(a); )
          ;
        return this.pos > u;
      }, Qt.prototype.eatSpace = function() {
        for (var a = this.pos; /[\s\u00a0]/.test(this.string.charAt(this.pos)); )
          ++this.pos;
        return this.pos > a;
      }, Qt.prototype.skipToEnd = function() {
        this.pos = this.string.length;
      }, Qt.prototype.skipTo = function(a) {
        var u = this.string.indexOf(a, this.pos);
        if (u > -1)
          return this.pos = u, !0;
      }, Qt.prototype.backUp = function(a) {
        this.pos -= a;
      }, Qt.prototype.column = function() {
        return this.lastColumnPos < this.start && (this.lastColumnValue = ne(this.string, this.start, this.tabSize, this.lastColumnPos, this.lastColumnValue), this.lastColumnPos = this.start), this.lastColumnValue - (this.lineStart ? ne(this.string, this.lineStart, this.tabSize) : 0);
      }, Qt.prototype.indentation = function() {
        return ne(this.string, null, this.tabSize) - (this.lineStart ? ne(this.string, this.lineStart, this.tabSize) : 0);
      }, Qt.prototype.match = function(a, u, h) {
        if (typeof a == "string") {
          var p = /* @__PURE__ */ P(function(O) {
            return h ? O.toLowerCase() : O;
          }, "cased"), y = this.string.substr(this.pos, a.length);
          if (p(y) == p(a))
            return u !== !1 && (this.pos += a.length), !0;
        } else {
          var T = this.string.slice(this.pos).match(a);
          return T && T.index > 0 ? null : (T && u !== !1 && (this.pos += T[0].length), T);
        }
      }, Qt.prototype.current = function() {
        return this.string.slice(this.start, this.pos);
      }, Qt.prototype.hideFirstChars = function(a, u) {
        this.lineStart += a;
        try {
          return u();
        } finally {
          this.lineStart -= a;
        }
      }, Qt.prototype.lookAhead = function(a) {
        var u = this.lineOracle;
        return u && u.lookAhead(a);
      }, Qt.prototype.baseToken = function() {
        var a = this.lineOracle;
        return a && a.baseToken(this.pos);
      };
      function Pe(a, u) {
        if (u -= a.first, u < 0 || u >= a.size)
          throw new Error("There is no line " + (u + a.first) + " in the document.");
        for (var h = a; !h.lines; )
          for (var p = 0; ; ++p) {
            var y = h.children[p], T = y.chunkSize();
            if (u < T) {
              h = y;
              break;
            }
            u -= T;
          }
        return h.lines[u];
      }
      P(Pe, "getLine");
      function Mo(a, u, h) {
        var p = [], y = u.line;
        return a.iter(u.line, h.line + 1, function(T) {
          var O = T.text;
          y == h.line && (O = O.slice(0, h.ch)), y == u.line && (O = O.slice(u.ch)), p.push(O), ++y;
        }), p;
      }
      P(Mo, "getBetween");
      function yl(a, u, h) {
        var p = [];
        return a.iter(u, h, function(y) {
          p.push(y.text);
        }), p;
      }
      P(yl, "getLines");
      function vr(a, u) {
        var h = u - a.height;
        if (h)
          for (var p = a; p; p = p.parent)
            p.height += h;
      }
      P(vr, "updateLineHeight");
      function yt(a) {
        if (a.parent == null)
          return null;
        for (var u = a.parent, h = le(u.lines, a), p = u.parent; p; u = p, p = p.parent)
          for (var y = 0; p.children[y] != u; ++y)
            h += p.children[y].chunkSize();
        return h + u.first;
      }
      P(yt, "lineNo");
      function Po(a, u) {
        var h = a.first;
        e:
          do {
            for (var p = 0; p < a.children.length; ++p) {
              var y = a.children[p], T = y.height;
              if (u < T) {
                a = y;
                continue e;
              }
              u -= T, h += y.chunkSize();
            }
            return h;
          } while (!a.lines);
        for (var O = 0; O < a.lines.length; ++O) {
          var L = a.lines[O], M = L.height;
          if (u < M)
            break;
          u -= M;
        }
        return h + O;
      }
      P(Po, "lineAtHeight");
      function us(a, u) {
        return u >= a.first && u < a.first + a.size;
      }
      P(us, "isLine");
      function bl(a, u) {
        return String(a.lineNumberFormatter(u + a.firstLineNumber));
      }
      P(bl, "lineNumberFor");
      function we(a, u, h) {
        if (h === void 0 && (h = null), !(this instanceof we))
          return new we(a, u, h);
        this.line = a, this.ch = u, this.sticky = h;
      }
      P(we, "Pos");
      function j(a, u) {
        return a.line - u.line || a.ch - u.ch;
      }
      P(j, "cmp");
      function ee(a, u) {
        return a.sticky == u.sticky && j(a, u) == 0;
      }
      P(ee, "equalCursorPos");
      function me(a) {
        return we(a.line, a.ch);
      }
      P(me, "copyPos");
      function Se(a, u) {
        return j(a, u) < 0 ? u : a;
      }
      P(Se, "maxPos");
      function Je(a, u) {
        return j(a, u) < 0 ? a : u;
      }
      P(Je, "minPos");
      function ft(a, u) {
        return Math.max(a.first, Math.min(u, a.first + a.size - 1));
      }
      P(ft, "clipLine");
      function Re(a, u) {
        if (u.line < a.first)
          return we(a.first, 0);
        var h = a.first + a.size - 1;
        return u.line > h ? we(h, Pe(a, h).text.length) : Hn(u, Pe(a, u.line).text.length);
      }
      P(Re, "clipPos");
      function Hn(a, u) {
        var h = a.ch;
        return h == null || h > u ? we(a.line, u) : h < 0 ? we(a.line, 0) : a;
      }
      P(Hn, "clipToLen");
      function eo(a, u) {
        for (var h = [], p = 0; p < u.length; p++)
          h[p] = Re(a, u[p]);
        return h;
      }
      P(eo, "clipPosArray");
      var Qc = /* @__PURE__ */ P(function(a, u) {
        this.state = a, this.lookAhead = u;
      }, "SavedContext"), Bi = /* @__PURE__ */ P(function(a, u, h, p) {
        this.state = u, this.doc = a, this.line = h, this.maxLookAhead = p || 0, this.baseTokens = null, this.baseTokenPos = 1;
      }, "Context");
      Bi.prototype.lookAhead = function(a) {
        var u = this.doc.getLine(this.line + a);
        return u != null && a > this.maxLookAhead && (this.maxLookAhead = a), u;
      }, Bi.prototype.baseToken = function(a) {
        if (!this.baseTokens)
          return null;
        for (; this.baseTokens[this.baseTokenPos] <= a; )
          this.baseTokenPos += 2;
        var u = this.baseTokens[this.baseTokenPos + 1];
        return {
          type: u && u.replace(/( |^)overlay .*/, ""),
          size: this.baseTokens[this.baseTokenPos] - a
        };
      }, Bi.prototype.nextLine = function() {
        this.line++, this.maxLookAhead > 0 && this.maxLookAhead--;
      }, Bi.fromSaved = function(a, u, h) {
        return u instanceof Qc ? new Bi(a, Zr(a.mode, u.state), h, u.lookAhead) : new Bi(a, Zr(a.mode, u), h);
      }, Bi.prototype.save = function(a) {
        var u = a !== !1 ? Zr(this.doc.mode, this.state) : this.state;
        return this.maxLookAhead > 0 ? new Qc(u, this.maxLookAhead) : u;
      };
      function k1(a, u, h, p) {
        var y = [a.state.modeGen], T = {};
        D1(
          a,
          u.text,
          a.doc.mode,
          h,
          function(V, G) {
            return y.push(V, G);
          },
          T,
          p
        );
        for (var O = h.state, L = /* @__PURE__ */ P(function(V) {
          h.baseTokens = y;
          var G = a.state.overlays[V], X = 1, se = 0;
          h.state = !0, D1(a, u.text, G.mode, h, function(oe, pe) {
            for (var ye = X; se < oe; ) {
              var Ce = y[X];
              Ce > oe && y.splice(X, 1, oe, y[X + 1], Ce), X += 2, se = Math.min(oe, Ce);
            }
            if (pe)
              if (G.opaque)
                y.splice(ye, X - ye, oe, "overlay " + pe), X = ye + 2;
              else
                for (; ye < X; ye += 2) {
                  var Ae = y[ye + 1];
                  y[ye + 1] = (Ae ? Ae + " " : "") + "overlay " + pe;
                }
          }, T), h.state = O, h.baseTokens = null, h.baseTokenPos = 1;
        }, "loop"), M = 0; M < a.state.overlays.length; ++M)
          L(M);
        return { styles: y, classes: T.bgClass || T.textClass ? T : null };
      }
      P(k1, "highlightLine");
      function _1(a, u, h) {
        if (!u.styles || u.styles[0] != a.state.modeGen) {
          var p = Yc(a, yt(u)), y = u.text.length > a.options.maxHighlightLength && Zr(a.doc.mode, p.state), T = k1(a, u, p);
          y && (p.state = y), u.stateAfter = p.save(!y), u.styles = T.styles, T.classes ? u.styleClasses = T.classes : u.styleClasses && (u.styleClasses = null), h === a.doc.highlightFrontier && (a.doc.modeFrontier = Math.max(a.doc.modeFrontier, ++a.doc.highlightFrontier));
        }
        return u.styles;
      }
      P(_1, "getLineStyles");
      function Yc(a, u, h) {
        var p = a.doc, y = a.display;
        if (!p.mode.startState)
          return new Bi(p, !0, u);
        var T = M_(a, u, h), O = T > p.first && Pe(p, T - 1).stateAfter, L = O ? Bi.fromSaved(p, O, T) : new Bi(p, vl(p.mode), T);
        return p.iter(T, u, function(M) {
          Kh(a, M.text, L);
          var V = L.line;
          M.stateAfter = V == u - 1 || V % 5 == 0 || V >= y.viewFrom && V < y.viewTo ? L.save() : null, L.nextLine();
        }), h && (p.modeFrontier = L.line), L;
      }
      P(Yc, "getContextBefore");
      function Kh(a, u, h, p) {
        var y = a.doc.mode, T = new Qt(u, a.options.tabSize, h);
        for (T.start = T.pos = p || 0, u == "" && N1(y, h.state); !T.eol(); )
          Jh(y, T, h.state), T.start = T.pos;
      }
      P(Kh, "processLine");
      function N1(a, u) {
        if (a.blankLine)
          return a.blankLine(u);
        if (a.innerMode) {
          var h = gl(a, u);
          if (h.mode.blankLine)
            return h.mode.blankLine(h.state);
        }
      }
      P(N1, "callBlankLine");
      function Jh(a, u, h, p) {
        for (var y = 0; y < 10; y++) {
          p && (p[0] = gl(a, h).mode);
          var T = a.token(u, h);
          if (u.pos > u.start)
            return T;
        }
        throw new Error("Mode " + a.name + " failed to advance stream.");
      }
      P(Jh, "readToken");
      var F_ = /* @__PURE__ */ P(function(a, u, h) {
        this.start = a.start, this.end = a.pos, this.string = a.current(), this.type = u || null, this.state = h;
      }, "Token");
      function O1(a, u, h, p) {
        var y = a.doc, T = y.mode, O;
        u = Re(y, u);
        var L = Pe(y, u.line), M = Yc(a, u.line, h), V = new Qt(L.text, a.options.tabSize, M), G;
        for (p && (G = []); (p || V.pos < u.ch) && !V.eol(); )
          V.start = V.pos, O = Jh(T, V, M.state), p && G.push(new F_(V, O, Zr(y.mode, M.state)));
        return p ? G : new F_(V, O, M.state);
      }
      P(O1, "takeToken");
      function A1(a, u) {
        if (a)
          for (; ; ) {
            var h = a.match(/(?:^|\s+)line-(background-)?(\S+)/);
            if (!h)
              break;
            a = a.slice(0, h.index) + a.slice(h.index + h[0].length);
            var p = h[1] ? "bgClass" : "textClass";
            u[p] == null ? u[p] = h[2] : new RegExp("(?:^|\\s)" + h[2] + "(?:$|\\s)").test(u[p]) || (u[p] += " " + h[2]);
          }
        return a;
      }
      P(A1, "extractLineClasses");
      function D1(a, u, h, p, y, T, O) {
        var L = h.flattenSpans;
        L == null && (L = a.options.flattenSpans);
        var M = 0, V = null, G = new Qt(u, a.options.tabSize, p), X, se = a.options.addModeClass && [null];
        for (u == "" && A1(N1(h, p.state), T); !G.eol(); ) {
          if (G.pos > a.options.maxHighlightLength ? (L = !1, O && Kh(a, u, p, G.pos), G.pos = u.length, X = null) : X = A1(Jh(h, G, p.state, se), T), se) {
            var oe = se[0].name;
            oe && (X = "m-" + (X ? oe + " " + X : oe));
          }
          if (!L || V != X) {
            for (; M < G.start; )
              M = Math.min(G.start, M + 5e3), y(M, V);
            V = X;
          }
          G.start = G.pos;
        }
        for (; M < G.pos; ) {
          var pe = Math.min(G.pos, M + 5e3);
          y(pe, V), M = pe;
        }
      }
      P(D1, "runMode");
      function M_(a, u, h) {
        for (var p, y, T = a.doc, O = h ? -1 : u - (a.doc.mode.innerMode ? 1e3 : 100), L = u; L > O; --L) {
          if (L <= T.first)
            return T.first;
          var M = Pe(T, L - 1), V = M.stateAfter;
          if (V && (!h || L + (V instanceof Qc ? V.lookAhead : 0) <= T.modeFrontier))
            return L;
          var G = ne(M.text, null, a.options.tabSize);
          (y == null || p > G) && (y = L - 1, p = G);
        }
        return y;
      }
      P(M_, "findStartLine");
      function P_(a, u) {
        if (a.modeFrontier = Math.min(a.modeFrontier, u), !(a.highlightFrontier < u - 10)) {
          for (var h = a.first, p = u - 1; p > h; p--) {
            var y = Pe(a, p).stateAfter;
            if (y && (!(y instanceof Qc) || p + y.lookAhead < u)) {
              h = p + 1;
              break;
            }
          }
          a.highlightFrontier = Math.min(a.highlightFrontier, h);
        }
      }
      P(P_, "retreatFrontier");
      var $_ = !1, fs = !1;
      function V_() {
        $_ = !0;
      }
      P(V_, "seeReadOnlySpans");
      function j_() {
        fs = !0;
      }
      P(j_, "seeCollapsedSpans");
      function Gf(a, u, h) {
        this.marker = a, this.from = u, this.to = h;
      }
      P(Gf, "MarkedSpan");
      function Kc(a, u) {
        if (a)
          for (var h = 0; h < a.length; ++h) {
            var p = a[h];
            if (p.marker == u)
              return p;
          }
      }
      P(Kc, "getMarkedSpanFor");
      function U_(a, u) {
        for (var h, p = 0; p < a.length; ++p)
          a[p] != u && (h || (h = [])).push(a[p]);
        return h;
      }
      P(U_, "removeMarkedSpan");
      function B_(a, u, h) {
        var p = h && window.WeakSet && (h.markedSpans || (h.markedSpans = /* @__PURE__ */ new WeakSet()));
        p && a.markedSpans && p.has(a.markedSpans) ? a.markedSpans.push(u) : (a.markedSpans = a.markedSpans ? a.markedSpans.concat([u]) : [u], p && p.add(a.markedSpans)), u.marker.attachLine(a);
      }
      P(B_, "addMarkedSpan");
      function q_(a, u, h) {
        var p;
        if (a)
          for (var y = 0; y < a.length; ++y) {
            var T = a[y], O = T.marker, L = T.from == null || (O.inclusiveLeft ? T.from <= u : T.from < u);
            if (L || T.from == u && O.type == "bookmark" && (!h || !T.marker.insertLeft)) {
              var M = T.to == null || (O.inclusiveRight ? T.to >= u : T.to > u);
              (p || (p = [])).push(new Gf(O, T.from, M ? null : T.to));
            }
          }
        return p;
      }
      P(q_, "markedSpansBefore");
      function z_(a, u, h) {
        var p;
        if (a)
          for (var y = 0; y < a.length; ++y) {
            var T = a[y], O = T.marker, L = T.to == null || (O.inclusiveRight ? T.to >= u : T.to > u);
            if (L || T.from == u && O.type == "bookmark" && (!h || T.marker.insertLeft)) {
              var M = T.from == null || (O.inclusiveLeft ? T.from <= u : T.from < u);
              (p || (p = [])).push(new Gf(
                O,
                M ? null : T.from - u,
                T.to == null ? null : T.to - u
              ));
            }
          }
        return p;
      }
      P(z_, "markedSpansAfter");
      function Xh(a, u) {
        if (u.full)
          return null;
        var h = us(a, u.from.line) && Pe(a, u.from.line).markedSpans, p = us(a, u.to.line) && Pe(a, u.to.line).markedSpans;
        if (!h && !p)
          return null;
        var y = u.from.ch, T = u.to.ch, O = j(u.from, u.to) == 0, L = q_(h, y, O), M = z_(p, T, O), V = u.text.length == 1, G = Ve(u.text).length + (V ? y : 0);
        if (L)
          for (var X = 0; X < L.length; ++X) {
            var se = L[X];
            if (se.to == null) {
              var oe = Kc(M, se.marker);
              oe ? V && (se.to = oe.to == null ? null : oe.to + G) : se.to = y;
            }
          }
        if (M)
          for (var pe = 0; pe < M.length; ++pe) {
            var ye = M[pe];
            if (ye.to != null && (ye.to += G), ye.from == null) {
              var Ce = Kc(L, ye.marker);
              Ce || (ye.from = G, V && (L || (L = [])).push(ye));
            } else
              ye.from += G, V && (L || (L = [])).push(ye);
          }
        L && (L = I1(L)), M && M != L && (M = I1(M));
        var Ae = [L];
        if (!V) {
          var Le = u.text.length - 2, De;
          if (Le > 0 && L)
            for (var Me = 0; Me < L.length; ++Me)
              L[Me].to == null && (De || (De = [])).push(new Gf(L[Me].marker, null, null));
          for (var Ge = 0; Ge < Le; ++Ge)
            Ae.push(De);
          Ae.push(M);
        }
        return Ae;
      }
      P(Xh, "stretchSpansOverChange");
      function I1(a) {
        for (var u = 0; u < a.length; ++u) {
          var h = a[u];
          h.from != null && h.from == h.to && h.marker.clearWhenEmpty !== !1 && a.splice(u--, 1);
        }
        return a.length ? a : null;
      }
      P(I1, "clearEmptySpans");
      function H_(a, u, h) {
        var p = null;
        if (a.iter(u.line, h.line + 1, function(oe) {
          if (oe.markedSpans)
            for (var pe = 0; pe < oe.markedSpans.length; ++pe) {
              var ye = oe.markedSpans[pe].marker;
              ye.readOnly && (!p || le(p, ye) == -1) && (p || (p = [])).push(ye);
            }
        }), !p)
          return null;
        for (var y = [{ from: u, to: h }], T = 0; T < p.length; ++T)
          for (var O = p[T], L = O.find(0), M = 0; M < y.length; ++M) {
            var V = y[M];
            if (!(j(V.to, L.from) < 0 || j(V.from, L.to) > 0)) {
              var G = [M, 1], X = j(V.from, L.from), se = j(V.to, L.to);
              (X < 0 || !O.inclusiveLeft && !X) && G.push({ from: V.from, to: L.from }), (se > 0 || !O.inclusiveRight && !se) && G.push({ from: L.to, to: V.to }), y.splice.apply(y, G), M += G.length - 3;
            }
          }
        return y;
      }
      P(H_, "removeReadOnlyRanges");
      function L1(a) {
        var u = a.markedSpans;
        if (u) {
          for (var h = 0; h < u.length; ++h)
            u[h].marker.detachLine(a);
          a.markedSpans = null;
        }
      }
      P(L1, "detachMarkedSpans");
      function R1(a, u) {
        if (u) {
          for (var h = 0; h < u.length; ++h)
            u[h].marker.attachLine(a);
          a.markedSpans = u;
        }
      }
      P(R1, "attachMarkedSpans");
      function Qf(a) {
        return a.inclusiveLeft ? -1 : 0;
      }
      P(Qf, "extraLeft");
      function Yf(a) {
        return a.inclusiveRight ? 1 : 0;
      }
      P(Yf, "extraRight");
      function Zh(a, u) {
        var h = a.lines.length - u.lines.length;
        if (h != 0)
          return h;
        var p = a.find(), y = u.find(), T = j(p.from, y.from) || Qf(a) - Qf(u);
        if (T)
          return -T;
        var O = j(p.to, y.to) || Yf(a) - Yf(u);
        return O || u.id - a.id;
      }
      P(Zh, "compareCollapsedMarkers");
      function F1(a, u) {
        var h = fs && a.markedSpans, p;
        if (h)
          for (var y = void 0, T = 0; T < h.length; ++T)
            y = h[T], y.marker.collapsed && (u ? y.from : y.to) == null && (!p || Zh(p, y.marker) < 0) && (p = y.marker);
        return p;
      }
      P(F1, "collapsedSpanAtSide");
      function M1(a) {
        return F1(a, !0);
      }
      P(M1, "collapsedSpanAtStart");
      function Kf(a) {
        return F1(a, !1);
      }
      P(Kf, "collapsedSpanAtEnd");
      function W_(a, u) {
        var h = fs && a.markedSpans, p;
        if (h)
          for (var y = 0; y < h.length; ++y) {
            var T = h[y];
            T.marker.collapsed && (T.from == null || T.from < u) && (T.to == null || T.to > u) && (!p || Zh(p, T.marker) < 0) && (p = T.marker);
          }
        return p;
      }
      P(W_, "collapsedSpanAround");
      function P1(a, u, h, p, y) {
        var T = Pe(a, u), O = fs && T.markedSpans;
        if (O)
          for (var L = 0; L < O.length; ++L) {
            var M = O[L];
            if (M.marker.collapsed) {
              var V = M.marker.find(0), G = j(V.from, h) || Qf(M.marker) - Qf(y), X = j(V.to, p) || Yf(M.marker) - Yf(y);
              if (!(G >= 0 && X <= 0 || G <= 0 && X >= 0) && (G <= 0 && (M.marker.inclusiveRight && y.inclusiveLeft ? j(V.to, h) >= 0 : j(V.to, h) > 0) || G >= 0 && (M.marker.inclusiveRight && y.inclusiveLeft ? j(V.from, p) <= 0 : j(V.from, p) < 0)))
                return !0;
            }
          }
      }
      P(P1, "conflictingCollapsedRange");
      function $o(a) {
        for (var u; u = M1(a); )
          a = u.find(-1, !0).line;
        return a;
      }
      P($o, "visualLine");
      function G_(a) {
        for (var u; u = Kf(a); )
          a = u.find(1, !0).line;
        return a;
      }
      P(G_, "visualLineEnd");
      function Q_(a) {
        for (var u, h; u = Kf(a); )
          a = u.find(1, !0).line, (h || (h = [])).push(a);
        return h;
      }
      P(Q_, "visualLineContinued");
      function em(a, u) {
        var h = Pe(a, u), p = $o(h);
        return h == p ? u : yt(p);
      }
      P(em, "visualLineNo");
      function $1(a, u) {
        if (u > a.lastLine())
          return u;
        var h = Pe(a, u), p;
        if (!ds(a, h))
          return u;
        for (; p = Kf(h); )
          h = p.find(1, !0).line;
        return yt(h) + 1;
      }
      P($1, "visualLineEndNo");
      function ds(a, u) {
        var h = fs && u.markedSpans;
        if (h) {
          for (var p = void 0, y = 0; y < h.length; ++y)
            if (p = h[y], !!p.marker.collapsed && (p.from == null || !p.marker.widgetNode && p.from == 0 && p.marker.inclusiveLeft && tm(a, u, p)))
              return !0;
        }
      }
      P(ds, "lineIsHidden");
      function tm(a, u, h) {
        if (h.to == null) {
          var p = h.marker.find(1, !0);
          return tm(a, p.line, Kc(p.line.markedSpans, h.marker));
        }
        if (h.marker.inclusiveRight && h.to == u.text.length)
          return !0;
        for (var y = void 0, T = 0; T < u.markedSpans.length; ++T)
          if (y = u.markedSpans[T], y.marker.collapsed && !y.marker.widgetNode && y.from == h.to && (y.to == null || y.to != h.from) && (y.marker.inclusiveLeft || h.marker.inclusiveRight) && tm(a, u, y))
            return !0;
      }
      P(tm, "lineIsHiddenInner");
      function qi(a) {
        a = $o(a);
        for (var u = 0, h = a.parent, p = 0; p < h.lines.length; ++p) {
          var y = h.lines[p];
          if (y == a)
            break;
          u += y.height;
        }
        for (var T = h.parent; T; h = T, T = h.parent)
          for (var O = 0; O < T.children.length; ++O) {
            var L = T.children[O];
            if (L == h)
              break;
            u += L.height;
          }
        return u;
      }
      P(qi, "heightAtLine");
      function Jf(a) {
        if (a.height == 0)
          return 0;
        for (var u = a.text.length, h, p = a; h = M1(p); ) {
          var y = h.find(0, !0);
          p = y.from.line, u += y.from.ch - y.to.ch;
        }
        for (p = a; h = Kf(p); ) {
          var T = h.find(0, !0);
          u -= p.text.length - T.from.ch, p = T.to.line, u += p.text.length - T.to.ch;
        }
        return u;
      }
      P(Jf, "lineLength");
      function nm(a) {
        var u = a.display, h = a.doc;
        u.maxLine = Pe(h, h.first), u.maxLineLength = Jf(u.maxLine), u.maxLineChanged = !0, h.iter(function(p) {
          var y = Jf(p);
          y > u.maxLineLength && (u.maxLineLength = y, u.maxLine = p);
        });
      }
      P(nm, "findMaxLine");
      var Jc = /* @__PURE__ */ P(function(a, u, h) {
        this.text = a, R1(this, u), this.height = h ? h(this) : 1;
      }, "Line");
      Jc.prototype.lineNo = function() {
        return yt(this);
      }, Lo(Jc);
      function Y_(a, u, h, p) {
        a.text = u, a.stateAfter && (a.stateAfter = null), a.styles && (a.styles = null), a.order != null && (a.order = null), L1(a), R1(a, h);
        var y = p ? p(a) : 1;
        y != a.height && vr(a, y);
      }
      P(Y_, "updateLine");
      function K_(a) {
        a.parent = null, L1(a);
      }
      P(K_, "cleanUpLine");
      var FV = {}, MV = {};
      function V1(a, u) {
        if (!a || /^\s*$/.test(a))
          return null;
        var h = u.addModeClass ? MV : FV;
        return h[a] || (h[a] = a.replace(/\S+/g, "cm-$&"));
      }
      P(V1, "interpretTokenStyle");
      function j1(a, u) {
        var h = R("span", null, null, d ? "padding-right: .1px" : null), p = {
          pre: R("pre", [h], "CodeMirror-line"),
          content: h,
          col: 0,
          pos: 0,
          cm: a,
          trailingSpace: !1,
          splitSpaces: a.getOption("lineWrapping")
        };
        u.measure = {};
        for (var y = 0; y <= (u.rest ? u.rest.length : 0); y++) {
          var T = y ? u.rest[y - 1] : u.line, O = void 0;
          p.pos = 0, p.addToken = X_, Ro(a.display.measure) && (O = mr(T, a.doc.direction)) && (p.addToken = eN(p.addToken, O)), p.map = [];
          var L = u != a.display.externalMeasured && yt(T);
          tN(T, p, _1(a, T, L)), T.styleClasses && (T.styleClasses.bgClass && (p.bgClass = Z(T.styleClasses.bgClass, p.bgClass || "")), T.styleClasses.textClass && (p.textClass = Z(T.styleClasses.textClass, p.textClass || ""))), p.map.length == 0 && p.map.push(0, 0, p.content.appendChild(qc(a.display.measure))), y == 0 ? (u.measure.map = p.map, u.measure.cache = {}) : ((u.measure.maps || (u.measure.maps = [])).push(p.map), (u.measure.caches || (u.measure.caches = [])).push({}));
        }
        if (d) {
          var M = p.content.lastChild;
          (/\bcm-tab\b/.test(M.className) || M.querySelector && M.querySelector(".cm-tab")) && (p.content.className = "cm-tab-wrap-hack");
        }
        return Ke(a, "renderLine", a, u.line, p.pre), p.pre.className && (p.textClass = Z(p.pre.className, p.textClass || "")), p;
      }
      P(j1, "buildLineContent");
      function J_(a) {
        var u = B("span", "•", "cm-invalidchar");
        return u.title = "\\u" + a.charCodeAt(0).toString(16), u.setAttribute("aria-label", u.title), u;
      }
      P(J_, "defaultSpecialCharPlaceholder");
      function X_(a, u, h, p, y, T, O) {
        if (u) {
          var L = a.splitSpaces ? Z_(u, a.trailingSpace) : u, M = a.cm.state.specialChars, V = !1, G;
          if (!M.test(u))
            a.col += u.length, G = document.createTextNode(L), a.map.push(a.pos, a.pos + u.length, G), c && f < 9 && (V = !0), a.pos += u.length;
          else {
            G = document.createDocumentFragment();
            for (var X = 0; ; ) {
              M.lastIndex = X;
              var se = M.exec(u), oe = se ? se.index - X : u.length - X;
              if (oe) {
                var pe = document.createTextNode(L.slice(X, X + oe));
                c && f < 9 ? G.appendChild(B("span", [pe])) : G.appendChild(pe), a.map.push(a.pos, a.pos + oe, pe), a.col += oe, a.pos += oe;
              }
              if (!se)
                break;
              X += oe + 1;
              var ye = void 0;
              if (se[0] == "	") {
                var Ce = a.cm.options.tabSize, Ae = Ce - a.col % Ce;
                ye = G.appendChild(B("span", Nt(Ae), "cm-tab")), ye.setAttribute("role", "presentation"), ye.setAttribute("cm-text", "	"), a.col += Ae;
              } else
                se[0] == "\r" || se[0] == `
` ? (ye = G.appendChild(B("span", se[0] == "\r" ? "␍" : "␤", "cm-invalidchar")), ye.setAttribute("cm-text", se[0]), a.col += 1) : (ye = a.cm.options.specialCharPlaceholder(se[0]), ye.setAttribute("cm-text", se[0]), c && f < 9 ? G.appendChild(B("span", [ye])) : G.appendChild(ye), a.col += 1);
              a.map.push(a.pos, a.pos + 1, ye), a.pos++;
            }
          }
          if (a.trailingSpace = L.charCodeAt(u.length - 1) == 32, h || p || y || V || T || O) {
            var Le = h || "";
            p && (Le += p), y && (Le += y);
            var De = B("span", [G], Le, T);
            if (O)
              for (var Me in O)
                O.hasOwnProperty(Me) && Me != "style" && Me != "class" && De.setAttribute(Me, O[Me]);
            return a.content.appendChild(De);
          }
          a.content.appendChild(G);
        }
      }
      P(X_, "buildToken");
      function Z_(a, u) {
        if (a.length > 1 && !/  /.test(a))
          return a;
        for (var h = u, p = "", y = 0; y < a.length; y++) {
          var T = a.charAt(y);
          T == " " && h && (y == a.length - 1 || a.charCodeAt(y + 1) == 32) && (T = " "), p += T, h = T == " ";
        }
        return p;
      }
      P(Z_, "splitSpaces");
      function eN(a, u) {
        return function(h, p, y, T, O, L, M) {
          y = y ? y + " cm-force-border" : "cm-force-border";
          for (var V = h.pos, G = V + p.length; ; ) {
            for (var X = void 0, se = 0; se < u.length && (X = u[se], !(X.to > V && X.from <= V)); se++)
              ;
            if (X.to >= G)
              return a(h, p, y, T, O, L, M);
            a(h, p.slice(0, X.to - V), y, T, null, L, M), T = null, p = p.slice(X.to - V), V = X.to;
          }
        };
      }
      P(eN, "buildTokenBadBidi");
      function U1(a, u, h, p) {
        var y = !p && h.widgetNode;
        y && a.map.push(a.pos, a.pos + u, y), !p && a.cm.display.input.needsContentAttribute && (y || (y = a.content.appendChild(document.createElement("span"))), y.setAttribute("cm-marker", h.id)), y && (a.cm.display.input.setUneditable(y), a.content.appendChild(y)), a.pos += u, a.trailingSpace = !1;
      }
      P(U1, "buildCollapsedSpan");
      function tN(a, u, h) {
        var p = a.markedSpans, y = a.text, T = 0;
        if (!p) {
          for (var O = 1; O < h.length; O += 2)
            u.addToken(u, y.slice(T, T = h[O]), V1(h[O + 1], u.cm.options));
          return;
        }
        for (var L = y.length, M = 0, V = 1, G = "", X, se, oe = 0, pe, ye, Ce, Ae, Le; ; ) {
          if (oe == M) {
            pe = ye = Ce = se = "", Le = null, Ae = null, oe = 1 / 0;
            for (var De = [], Me = void 0, Ge = 0; Ge < p.length; ++Ge) {
              var ze = p[Ge], st = ze.marker;
              if (st.type == "bookmark" && ze.from == M && st.widgetNode)
                De.push(st);
              else if (ze.from <= M && (ze.to == null || ze.to > M || st.collapsed && ze.to == M && ze.from == M)) {
                if (ze.to != null && ze.to != M && oe > ze.to && (oe = ze.to, ye = ""), st.className && (pe += " " + st.className), st.css && (se = (se ? se + ";" : "") + st.css), st.startStyle && ze.from == M && (Ce += " " + st.startStyle), st.endStyle && ze.to == oe && (Me || (Me = [])).push(st.endStyle, ze.to), st.title && ((Le || (Le = {})).title = st.title), st.attributes)
                  for (var Dt in st.attributes)
                    (Le || (Le = {}))[Dt] = st.attributes[Dt];
                st.collapsed && (!Ae || Zh(Ae.marker, st) < 0) && (Ae = ze);
              } else
                ze.from > M && oe > ze.from && (oe = ze.from);
            }
            if (Me)
              for (var Rn = 0; Rn < Me.length; Rn += 2)
                Me[Rn + 1] == oe && (ye += " " + Me[Rn]);
            if (!Ae || Ae.from == M)
              for (var Ut = 0; Ut < De.length; ++Ut)
                U1(u, 0, De[Ut]);
            if (Ae && (Ae.from || 0) == M) {
              if (U1(
                u,
                (Ae.to == null ? L + 1 : Ae.to) - M,
                Ae.marker,
                Ae.from == null
              ), Ae.to == null)
                return;
              Ae.to == M && (Ae = !1);
            }
          }
          if (M >= L)
            break;
          for (var Mr = Math.min(L, oe); ; ) {
            if (G) {
              var Pr = M + G.length;
              if (!Ae) {
                var mn = Pr > Mr ? G.slice(0, Mr - M) : G;
                u.addToken(
                  u,
                  mn,
                  X ? X + pe : pe,
                  Ce,
                  M + mn.length == oe ? ye : "",
                  se,
                  Le
                );
              }
              if (Pr >= Mr) {
                G = G.slice(Mr - M), M = Mr;
                break;
              }
              M = Pr, Ce = "";
            }
            G = y.slice(T, T = h[V++]), X = V1(h[V++], u.cm.options);
          }
        }
      }
      P(tN, "insertLineContent");
      function B1(a, u, h) {
        this.line = u, this.rest = Q_(u), this.size = this.rest ? yt(Ve(this.rest)) - h + 1 : 1, this.node = this.text = null, this.hidden = ds(a, u);
      }
      P(B1, "LineView");
      function Xf(a, u, h) {
        for (var p = [], y, T = u; T < h; T = y) {
          var O = new B1(a.doc, Pe(a.doc, T), T);
          y = T + O.size, p.push(O);
        }
        return p;
      }
      P(Xf, "buildViewArray");
      var Xc = null;
      function nN(a) {
        Xc ? Xc.ops.push(a) : a.ownsGroup = Xc = {
          ops: [a],
          delayedCallbacks: []
        };
      }
      P(nN, "pushOperation");
      function rN(a) {
        var u = a.delayedCallbacks, h = 0;
        do {
          for (; h < u.length; h++)
            u[h].call(null);
          for (var p = 0; p < a.ops.length; p++) {
            var y = a.ops[p];
            if (y.cursorActivityHandlers)
              for (; y.cursorActivityCalled < y.cursorActivityHandlers.length; )
                y.cursorActivityHandlers[y.cursorActivityCalled++].call(null, y.cm);
          }
        } while (h < u.length);
      }
      P(rN, "fireCallbacksForOps");
      function oN(a, u) {
        var h = a.ownsGroup;
        if (h)
          try {
            rN(h);
          } finally {
            Xc = null, u(h);
          }
      }
      P(oN, "finishOperation");
      var Zf = null;
      function kn(a, u) {
        var h = na(a, u);
        if (h.length) {
          var p = Array.prototype.slice.call(arguments, 2), y;
          Xc ? y = Xc.delayedCallbacks : Zf ? y = Zf : (y = Zf = [], setTimeout(iN, 0));
          for (var T = /* @__PURE__ */ P(function(L) {
            y.push(function() {
              return h[L].apply(null, p);
            });
          }, "loop"), O = 0; O < h.length; ++O)
            T(O);
        }
      }
      P(kn, "signalLater");
      function iN() {
        var a = Zf;
        Zf = null;
        for (var u = 0; u < a.length; ++u)
          a[u]();
      }
      P(iN, "fireOrphanDelayed");
      function q1(a, u, h, p) {
        for (var y = 0; y < u.changes.length; y++) {
          var T = u.changes[y];
          T == "text" ? aN(a, u) : T == "gutter" ? H1(a, u, h, p) : T == "class" ? rm(a, u) : T == "widget" && lN(a, u, p);
        }
        u.changes = null;
      }
      P(q1, "updateLineForChanges");
      function Zc(a) {
        return a.node == a.text && (a.node = B("div", null, null, "position: relative"), a.text.parentNode && a.text.parentNode.replaceChild(a.node, a.text), a.node.appendChild(a.text), c && f < 8 && (a.node.style.zIndex = 2)), a.node;
      }
      P(Zc, "ensureLineWrapped");
      function sN(a, u) {
        var h = u.bgClass ? u.bgClass + " " + (u.line.bgClass || "") : u.line.bgClass;
        if (h && (h += " CodeMirror-linebackground"), u.background)
          h ? u.background.className = h : (u.background.parentNode.removeChild(u.background), u.background = null);
        else if (h) {
          var p = Zc(u);
          u.background = p.insertBefore(B("div", null, h), p.firstChild), a.display.input.setUneditable(u.background);
        }
      }
      P(sN, "updateLineBackground");
      function z1(a, u) {
        var h = a.display.externalMeasured;
        return h && h.line == u.line ? (a.display.externalMeasured = null, u.measure = h.measure, h.built) : j1(a, u);
      }
      P(z1, "getLineContent");
      function aN(a, u) {
        var h = u.text.className, p = z1(a, u);
        u.text == u.node && (u.node = p.pre), u.text.parentNode.replaceChild(p.pre, u.text), u.text = p.pre, p.bgClass != u.bgClass || p.textClass != u.textClass ? (u.bgClass = p.bgClass, u.textClass = p.textClass, rm(a, u)) : h && (u.text.className = h);
      }
      P(aN, "updateLineText");
      function rm(a, u) {
        sN(a, u), u.line.wrapClass ? Zc(u).className = u.line.wrapClass : u.node != u.text && (u.node.className = "");
        var h = u.textClass ? u.textClass + " " + (u.line.textClass || "") : u.line.textClass;
        u.text.className = h || "";
      }
      P(rm, "updateLineClasses");
      function H1(a, u, h, p) {
        if (u.gutter && (u.node.removeChild(u.gutter), u.gutter = null), u.gutterBackground && (u.node.removeChild(u.gutterBackground), u.gutterBackground = null), u.line.gutterClass) {
          var y = Zc(u);
          u.gutterBackground = B(
            "div",
            null,
            "CodeMirror-gutter-background " + u.line.gutterClass,
            "left: " + (a.options.fixedGutter ? p.fixedPos : -p.gutterTotalWidth) + "px; width: " + p.gutterTotalWidth + "px"
          ), a.display.input.setUneditable(u.gutterBackground), y.insertBefore(u.gutterBackground, u.text);
        }
        var T = u.line.gutterMarkers;
        if (a.options.lineNumbers || T) {
          var O = Zc(u), L = u.gutter = B("div", null, "CodeMirror-gutter-wrapper", "left: " + (a.options.fixedGutter ? p.fixedPos : -p.gutterTotalWidth) + "px");
          if (L.setAttribute("aria-hidden", "true"), a.display.input.setUneditable(L), O.insertBefore(L, u.text), u.line.gutterClass && (L.className += " " + u.line.gutterClass), a.options.lineNumbers && (!T || !T["CodeMirror-linenumbers"]) && (u.lineNumber = L.appendChild(
            B(
              "div",
              bl(a.options, h),
              "CodeMirror-linenumber CodeMirror-gutter-elt",
              "left: " + p.gutterLeft["CodeMirror-linenumbers"] + "px; width: " + a.display.lineNumInnerWidth + "px"
            )
          )), T)
            for (var M = 0; M < a.display.gutterSpecs.length; ++M) {
              var V = a.display.gutterSpecs[M].className, G = T.hasOwnProperty(V) && T[V];
              G && L.appendChild(B(
                "div",
                [G],
                "CodeMirror-gutter-elt",
                "left: " + p.gutterLeft[V] + "px; width: " + p.gutterWidth[V] + "px"
              ));
            }
        }
      }
      P(H1, "updateLineGutter");
      function lN(a, u, h) {
        u.alignable && (u.alignable = null);
        for (var p = $("CodeMirror-linewidget"), y = u.node.firstChild, T = void 0; y; y = T)
          T = y.nextSibling, p.test(y.className) && u.node.removeChild(y);
        W1(a, u, h);
      }
      P(lN, "updateLineWidgets");
      function cN(a, u, h, p) {
        var y = z1(a, u);
        return u.text = u.node = y.pre, y.bgClass && (u.bgClass = y.bgClass), y.textClass && (u.textClass = y.textClass), rm(a, u), H1(a, u, h, p), W1(a, u, p), u.node;
      }
      P(cN, "buildLineElement");
      function W1(a, u, h) {
        if (G1(a, u.line, u, h, !0), u.rest)
          for (var p = 0; p < u.rest.length; p++)
            G1(a, u.rest[p], u, h, !1);
      }
      P(W1, "insertLineWidgets");
      function G1(a, u, h, p, y) {
        if (u.widgets)
          for (var T = Zc(h), O = 0, L = u.widgets; O < L.length; ++O) {
            var M = L[O], V = B("div", [M.node], "CodeMirror-linewidget" + (M.className ? " " + M.className : ""));
            M.handleMouseEvents || V.setAttribute("cm-ignore-events", "true"), uN(M, V, h, p), a.display.input.setUneditable(V), y && M.above ? T.insertBefore(V, h.gutter || h.text) : T.appendChild(V), kn(M, "redraw");
          }
      }
      P(G1, "insertLineWidgetsFor");
      function uN(a, u, h, p) {
        if (a.noHScroll) {
          (h.alignable || (h.alignable = [])).push(u);
          var y = p.wrapperWidth;
          u.style.left = p.fixedPos + "px", a.coverGutter || (y -= p.gutterTotalWidth, u.style.paddingLeft = p.gutterTotalWidth + "px"), u.style.width = y + "px";
        }
        a.coverGutter && (u.style.zIndex = 5, u.style.position = "relative", a.noHScroll || (u.style.marginLeft = -p.gutterTotalWidth + "px"));
      }
      P(uN, "positionLineWidget");
      function eu(a) {
        if (a.height != null)
          return a.height;
        var u = a.doc.cm;
        if (!u)
          return 0;
        if (!Q(document.body, a.node)) {
          var h = "position: relative;";
          a.coverGutter && (h += "margin-left: -" + u.display.gutters.offsetWidth + "px;"), a.noHScroll && (h += "width: " + u.display.wrapper.clientWidth + "px;"), z(u.display.measure, B("div", [a.node], null, h));
        }
        return a.height = a.node.parentNode.offsetHeight;
      }
      P(eu, "widgetHeight");
      function zi(a, u) {
        for (var h = ji(u); h != a.wrapper; h = h.parentNode)
          if (!h || h.nodeType == 1 && h.getAttribute("cm-ignore-events") == "true" || h.parentNode == a.sizer && h != a.mover)
            return !0;
      }
      P(zi, "eventInWidget");
      function ed(a) {
        return a.lineSpace.offsetTop;
      }
      P(ed, "paddingTop");
      function om(a) {
        return a.mover.offsetHeight - a.lineSpace.offsetHeight;
      }
      P(om, "paddingVert");
      function Q1(a) {
        if (a.cachedPaddingH)
          return a.cachedPaddingH;
        var u = z(a.measure, B("pre", "x", "CodeMirror-line-like")), h = window.getComputedStyle ? window.getComputedStyle(u) : u.currentStyle, p = { left: parseInt(h.paddingLeft), right: parseInt(h.paddingRight) };
        return !isNaN(p.left) && !isNaN(p.right) && (a.cachedPaddingH = p), p;
      }
      P(Q1, "paddingH");
      function li(a) {
        return de - a.display.nativeBarWidth;
      }
      P(li, "scrollGap");
      function aa(a) {
        return a.display.scroller.clientWidth - li(a) - a.display.barWidth;
      }
      P(aa, "displayWidth");
      function im(a) {
        return a.display.scroller.clientHeight - li(a) - a.display.barHeight;
      }
      P(im, "displayHeight");
      function fN(a, u, h) {
        var p = a.options.lineWrapping, y = p && aa(a);
        if (!u.measure.heights || p && u.measure.width != y) {
          var T = u.measure.heights = [];
          if (p) {
            u.measure.width = y;
            for (var O = u.text.firstChild.getClientRects(), L = 0; L < O.length - 1; L++) {
              var M = O[L], V = O[L + 1];
              Math.abs(M.bottom - V.bottom) > 2 && T.push((M.bottom + V.top) / 2 - h.top);
            }
          }
          T.push(h.bottom - h.top);
        }
      }
      P(fN, "ensureLineHeights");
      function Y1(a, u, h) {
        if (a.line == u)
          return { map: a.measure.map, cache: a.measure.cache };
        if (a.rest) {
          for (var p = 0; p < a.rest.length; p++)
            if (a.rest[p] == u)
              return { map: a.measure.maps[p], cache: a.measure.caches[p] };
          for (var y = 0; y < a.rest.length; y++)
            if (yt(a.rest[y]) > h)
              return { map: a.measure.maps[y], cache: a.measure.caches[y], before: !0 };
        }
      }
      P(Y1, "mapFromLineView");
      function dN(a, u) {
        u = $o(u);
        var h = yt(u), p = a.display.externalMeasured = new B1(a.doc, u, h);
        p.lineN = h;
        var y = p.built = j1(a, p);
        return p.text = y.pre, z(a.display.lineMeasure, y.pre), p;
      }
      P(dN, "updateExternalMeasurement");
      function K1(a, u, h, p) {
        return ci(a, El(a, u), h, p);
      }
      P(K1, "measureChar");
      function sm(a, u) {
        if (u >= a.display.viewFrom && u < a.display.viewTo)
          return a.display.view[ca(a, u)];
        var h = a.display.externalMeasured;
        if (h && u >= h.lineN && u < h.lineN + h.size)
          return h;
      }
      P(sm, "findViewForLine");
      function El(a, u) {
        var h = yt(u), p = sm(a, h);
        p && !p.text ? p = null : p && p.changes && (q1(a, p, h, fm(a)), a.curOp.forceUpdate = !0), p || (p = dN(a, u));
        var y = Y1(p, u, h);
        return {
          line: u,
          view: p,
          rect: null,
          map: y.map,
          cache: y.cache,
          before: y.before,
          hasHeights: !1
        };
      }
      P(El, "prepareMeasureForLine");
      function ci(a, u, h, p, y) {
        u.before && (h = -1);
        var T = h + (p || ""), O;
        return u.cache.hasOwnProperty(T) ? O = u.cache[T] : (u.rect || (u.rect = u.view.text.getBoundingClientRect()), u.hasHeights || (fN(a, u.view, u.rect), u.hasHeights = !0), O = mN(a, u, h, p), O.bogus || (u.cache[T] = O)), {
          left: O.left,
          right: O.right,
          top: y ? O.rtop : O.top,
          bottom: y ? O.rbottom : O.bottom
        };
      }
      P(ci, "measureCharPrepared");
      var pN = { left: 0, right: 0, top: 0, bottom: 0 };
      function J1(a, u, h) {
        for (var p, y, T, O, L, M, V = 0; V < a.length; V += 3)
          if (L = a[V], M = a[V + 1], u < L ? (y = 0, T = 1, O = "left") : u < M ? (y = u - L, T = y + 1) : (V == a.length - 3 || u == M && a[V + 3] > u) && (T = M - L, y = T - 1, u >= M && (O = "right")), y != null) {
            if (p = a[V + 2], L == M && h == (p.insertLeft ? "left" : "right") && (O = h), h == "left" && y == 0)
              for (; V && a[V - 2] == a[V - 3] && a[V - 1].insertLeft; )
                p = a[(V -= 3) + 2], O = "left";
            if (h == "right" && y == M - L)
              for (; V < a.length - 3 && a[V + 3] == a[V + 4] && !a[V + 5].insertLeft; )
                p = a[(V += 3) + 2], O = "right";
            break;
          }
        return { node: p, start: y, end: T, collapse: O, coverStart: L, coverEnd: M };
      }
      P(J1, "nodeAndOffsetInLineMap");
      function hN(a, u) {
        var h = pN;
        if (u == "left")
          for (var p = 0; p < a.length && (h = a[p]).left == h.right; p++)
            ;
        else
          for (var y = a.length - 1; y >= 0 && (h = a[y]).left == h.right; y--)
            ;
        return h;
      }
      P(hN, "getUsefulRect");
      function mN(a, u, h, p) {
        var y = J1(u.map, h, p), T = y.node, O = y.start, L = y.end, M = y.collapse, V;
        if (T.nodeType == 3) {
          for (var G = 0; G < 4; G++) {
            for (; O && ml(u.line.text.charAt(y.coverStart + O)); )
              --O;
            for (; y.coverStart + L < y.coverEnd && ml(u.line.text.charAt(y.coverStart + L)); )
              ++L;
            if (c && f < 9 && O == 0 && L == y.coverEnd - y.coverStart ? V = T.parentNode.getBoundingClientRect() : V = hN(te(T, O, L).getClientRects(), p), V.left || V.right || O == 0)
              break;
            L = O, O = O - 1, M = "right";
          }
          c && f < 11 && (V = gN(a.display.measure, V));
        } else {
          O > 0 && (M = p = "right");
          var X;
          a.options.lineWrapping && (X = T.getClientRects()).length > 1 ? V = X[p == "right" ? X.length - 1 : 0] : V = T.getBoundingClientRect();
        }
        if (c && f < 9 && !O && (!V || !V.left && !V.right)) {
          var se = T.parentNode.getClientRects()[0];
          se ? V = { left: se.left, right: se.left + Sl(a.display), top: se.top, bottom: se.bottom } : V = pN;
        }
        for (var oe = V.top - u.rect.top, pe = V.bottom - u.rect.top, ye = (oe + pe) / 2, Ce = u.view.measure.heights, Ae = 0; Ae < Ce.length - 1 && !(ye < Ce[Ae]); Ae++)
          ;
        var Le = Ae ? Ce[Ae - 1] : 0, De = Ce[Ae], Me = {
          left: (M == "right" ? V.right : V.left) - u.rect.left,
          right: (M == "left" ? V.left : V.right) - u.rect.left,
          top: Le,
          bottom: De
        };
        return !V.left && !V.right && (Me.bogus = !0), a.options.singleCursorHeightPerLine || (Me.rtop = oe, Me.rbottom = pe), Me;
      }
      P(mN, "measureCharInner");
      function gN(a, u) {
        if (!window.screen || screen.logicalXDPI == null || screen.logicalXDPI == screen.deviceXDPI || !Ui(a))
          return u;
        var h = screen.logicalXDPI / screen.deviceXDPI, p = screen.logicalYDPI / screen.deviceYDPI;
        return {
          left: u.left * h,
          right: u.right * h,
          top: u.top * p,
          bottom: u.bottom * p
        };
      }
      P(gN, "maybeUpdateRectForZooming");
      function X1(a) {
        if (a.measure && (a.measure.cache = {}, a.measure.heights = null, a.rest))
          for (var u = 0; u < a.rest.length; u++)
            a.measure.caches[u] = {};
      }
      P(X1, "clearLineMeasurementCacheFor");
      function Z1(a) {
        a.display.externalMeasure = null, H(a.display.lineMeasure);
        for (var u = 0; u < a.display.view.length; u++)
          X1(a.display.view[u]);
      }
      P(Z1, "clearLineMeasurementCache");
      function tu(a) {
        Z1(a), a.display.cachedCharWidth = a.display.cachedTextHeight = a.display.cachedPaddingH = null, a.options.lineWrapping || (a.display.maxLineChanged = !0), a.display.lineNumChars = null;
      }
      P(tu, "clearCaches");
      function eb() {
        return m && x ? -(document.body.getBoundingClientRect().left - parseInt(getComputedStyle(document.body).marginLeft)) : window.pageXOffset || (document.documentElement || document.body).scrollLeft;
      }
      P(eb, "pageScrollX");
      function tb() {
        return m && x ? -(document.body.getBoundingClientRect().top - parseInt(getComputedStyle(document.body).marginTop)) : window.pageYOffset || (document.documentElement || document.body).scrollTop;
      }
      P(tb, "pageScrollY");
      function am(a) {
        var u = $o(a), h = u.widgets, p = 0;
        if (h)
          for (var y = 0; y < h.length; ++y)
            h[y].above && (p += eu(h[y]));
        return p;
      }
      P(am, "widgetTopHeight");
      function td(a, u, h, p, y) {
        if (!y) {
          var T = am(u);
          h.top += T, h.bottom += T;
        }
        if (p == "line")
          return h;
        p || (p = "local");
        var O = qi(u);
        if (p == "local" ? O += ed(a.display) : O -= a.display.viewOffset, p == "page" || p == "window") {
          var L = a.display.lineSpace.getBoundingClientRect();
          O += L.top + (p == "window" ? 0 : tb());
          var M = L.left + (p == "window" ? 0 : eb());
          h.left += M, h.right += M;
        }
        return h.top += O, h.bottom += O, h;
      }
      P(td, "intoCoordSystem");
      function nb(a, u, h) {
        if (h == "div")
          return u;
        var p = u.left, y = u.top;
        if (h == "page")
          p -= eb(), y -= tb();
        else if (h == "local" || !h) {
          var T = a.display.sizer.getBoundingClientRect();
          p += T.left, y += T.top;
        }
        var O = a.display.lineSpace.getBoundingClientRect();
        return { left: p - O.left, top: y - O.top };
      }
      P(nb, "fromCoordSystem");
      function nd(a, u, h, p, y) {
        return p || (p = Pe(a.doc, u.line)), td(a, p, K1(a, p, u.ch, y), h);
      }
      P(nd, "charCoords");
      function Vo(a, u, h, p, y, T) {
        p = p || Pe(a.doc, u.line), y || (y = El(a, p));
        function O(pe, ye) {
          var Ce = ci(a, y, pe, ye ? "right" : "left", T);
          return ye ? Ce.left = Ce.right : Ce.right = Ce.left, td(a, p, Ce, h);
        }
        P(O, "get");
        var L = mr(p, a.doc.direction), M = u.ch, V = u.sticky;
        if (M >= p.text.length ? (M = p.text.length, V = "before") : M <= 0 && (M = 0, V = "after"), !L)
          return O(V == "before" ? M - 1 : M, V == "before");
        function G(pe, ye, Ce) {
          var Ae = L[ye], Le = Ae.level == 1;
          return O(Ce ? pe - 1 : pe, Le != Ce);
        }
        P(G, "getBidi");
        var X = jt(L, M, V), se = Jr, oe = G(M, X, V == "before");
        return se != null && (oe.other = G(M, se, V != "before")), oe;
      }
      P(Vo, "cursorCoords");
      function rb(a, u) {
        var h = 0;
        u = Re(a.doc, u), a.options.lineWrapping || (h = Sl(a.display) * u.ch);
        var p = Pe(a.doc, u.line), y = qi(p) + ed(a.display);
        return { left: h, right: h, top: y, bottom: y + p.height };
      }
      P(rb, "estimateCoords");
      function lm(a, u, h, p, y) {
        var T = we(a, u, h);
        return T.xRel = y, p && (T.outside = p), T;
      }
      P(lm, "PosWithInfo");
      function cm(a, u, h) {
        var p = a.doc;
        if (h += a.display.viewOffset, h < 0)
          return lm(p.first, 0, null, -1, -1);
        var y = Po(p, h), T = p.first + p.size - 1;
        if (y > T)
          return lm(p.first + p.size - 1, Pe(p, T).text.length, null, 1, 1);
        u < 0 && (u = 0);
        for (var O = Pe(p, y); ; ) {
          var L = vN(a, O, y, u, h), M = W_(O, L.ch + (L.xRel > 0 || L.outside > 0 ? 1 : 0));
          if (!M)
            return L;
          var V = M.find(1);
          if (V.line == y)
            return V;
          O = Pe(p, y = V.line);
        }
      }
      P(cm, "coordsChar");
      function ob(a, u, h, p) {
        p -= am(u);
        var y = u.text.length, T = Io(function(O) {
          return ci(a, h, O - 1).bottom <= p;
        }, y, 0);
        return y = Io(function(O) {
          return ci(a, h, O).top > p;
        }, T, y), { begin: T, end: y };
      }
      P(ob, "wrappedLineExtent");
      function ib(a, u, h, p) {
        h || (h = El(a, u));
        var y = td(a, u, ci(a, h, p), "line").top;
        return ob(a, u, h, y);
      }
      P(ib, "wrappedLineExtentChar");
      function um(a, u, h, p) {
        return a.bottom <= h ? !1 : a.top > h ? !0 : (p ? a.left : a.right) > u;
      }
      P(um, "boxIsAfter");
      function vN(a, u, h, p, y) {
        y -= qi(u);
        var T = El(a, u), O = am(u), L = 0, M = u.text.length, V = !0, G = mr(u, a.doc.direction);
        if (G) {
          var X = (a.options.lineWrapping ? bN : yN)(a, u, h, T, G, p, y);
          V = X.level != 1, L = V ? X.from : X.to - 1, M = V ? X.to : X.from - 1;
        }
        var se = null, oe = null, pe = Io(function(Ge) {
          var ze = ci(a, T, Ge);
          return ze.top += O, ze.bottom += O, um(ze, p, y, !1) ? (ze.top <= y && ze.left <= p && (se = Ge, oe = ze), !0) : !1;
        }, L, M), ye, Ce, Ae = !1;
        if (oe) {
          var Le = p - oe.left < oe.right - p, De = Le == V;
          pe = se + (De ? 0 : 1), Ce = De ? "after" : "before", ye = Le ? oe.left : oe.right;
        } else {
          !V && (pe == M || pe == L) && pe++, Ce = pe == 0 ? "after" : pe == u.text.length ? "before" : ci(a, T, pe - (V ? 1 : 0)).bottom + O <= y == V ? "after" : "before";
          var Me = Vo(a, we(h, pe, Ce), "line", u, T);
          ye = Me.left, Ae = y < Me.top ? -1 : y >= Me.bottom ? 1 : 0;
        }
        return pe = jc(u.text, pe, 1), lm(h, pe, Ce, Ae, p - ye);
      }
      P(vN, "coordsCharInner");
      function yN(a, u, h, p, y, T, O) {
        var L = Io(function(X) {
          var se = y[X], oe = se.level != 1;
          return um(Vo(
            a,
            we(h, oe ? se.to : se.from, oe ? "before" : "after"),
            "line",
            u,
            p
          ), T, O, !0);
        }, 0, y.length - 1), M = y[L];
        if (L > 0) {
          var V = M.level != 1, G = Vo(
            a,
            we(h, V ? M.from : M.to, V ? "after" : "before"),
            "line",
            u,
            p
          );
          um(G, T, O, !0) && G.top > O && (M = y[L - 1]);
        }
        return M;
      }
      P(yN, "coordsBidiPart");
      function bN(a, u, h, p, y, T, O) {
        var L = ob(a, u, p, O), M = L.begin, V = L.end;
        /\s/.test(u.text.charAt(V - 1)) && V--;
        for (var G = null, X = null, se = 0; se < y.length; se++) {
          var oe = y[se];
          if (!(oe.from >= V || oe.to <= M)) {
            var pe = oe.level != 1, ye = ci(a, p, pe ? Math.min(V, oe.to) - 1 : Math.max(M, oe.from)).right, Ce = ye < T ? T - ye + 1e9 : ye - T;
            (!G || X > Ce) && (G = oe, X = Ce);
          }
        }
        return G || (G = y[y.length - 1]), G.from < M && (G = { from: M, to: G.to, level: G.level }), G.to > V && (G = { from: G.from, to: V, level: G.level }), G;
      }
      P(bN, "coordsBidiPartWrapped");
      var wl;
      function xl(a) {
        if (a.cachedTextHeight != null)
          return a.cachedTextHeight;
        if (wl == null) {
          wl = B("pre", null, "CodeMirror-line-like");
          for (var u = 0; u < 49; ++u)
            wl.appendChild(document.createTextNode("x")), wl.appendChild(B("br"));
          wl.appendChild(document.createTextNode("x"));
        }
        z(a.measure, wl);
        var h = wl.offsetHeight / 50;
        return h > 3 && (a.cachedTextHeight = h), H(a.measure), h || 1;
      }
      P(xl, "textHeight");
      function Sl(a) {
        if (a.cachedCharWidth != null)
          return a.cachedCharWidth;
        var u = B("span", "xxxxxxxxxx"), h = B("pre", [u], "CodeMirror-line-like");
        z(a.measure, h);
        var p = u.getBoundingClientRect(), y = (p.right - p.left) / 10;
        return y > 2 && (a.cachedCharWidth = y), y || 10;
      }
      P(Sl, "charWidth");
      function fm(a) {
        for (var u = a.display, h = {}, p = {}, y = u.gutters.clientLeft, T = u.gutters.firstChild, O = 0; T; T = T.nextSibling, ++O) {
          var L = a.display.gutterSpecs[O].className;
          h[L] = T.offsetLeft + T.clientLeft + y, p[L] = T.clientWidth;
        }
        return {
          fixedPos: dm(u),
          gutterTotalWidth: u.gutters.offsetWidth,
          gutterLeft: h,
          gutterWidth: p,
          wrapperWidth: u.wrapper.clientWidth
        };
      }
      P(fm, "getDimensions");
      function dm(a) {
        return a.scroller.getBoundingClientRect().left - a.sizer.getBoundingClientRect().left;
      }
      P(dm, "compensateForHScroll");
      function sb(a) {
        var u = xl(a.display), h = a.options.lineWrapping, p = h && Math.max(5, a.display.scroller.clientWidth / Sl(a.display) - 3);
        return function(y) {
          if (ds(a.doc, y))
            return 0;
          var T = 0;
          if (y.widgets)
            for (var O = 0; O < y.widgets.length; O++)
              y.widgets[O].height && (T += y.widgets[O].height);
          return h ? T + (Math.ceil(y.text.length / p) || 1) * u : T + u;
        };
      }
      P(sb, "estimateHeight");
      function pm(a) {
        var u = a.doc, h = sb(a);
        u.iter(function(p) {
          var y = h(p);
          y != p.height && vr(p, y);
        });
      }
      P(pm, "estimateLineHeights");
      function la(a, u, h, p) {
        var y = a.display;
        if (!h && ji(u).getAttribute("cm-not-content") == "true")
          return null;
        var T, O, L = y.lineSpace.getBoundingClientRect();
        try {
          T = u.clientX - L.left, O = u.clientY - L.top;
        } catch {
          return null;
        }
        var M = cm(a, T, O), V;
        if (p && M.xRel > 0 && (V = Pe(a.doc, M.line).text).length == M.ch) {
          var G = ne(V, V.length, a.options.tabSize) - V.length;
          M = we(M.line, Math.max(0, Math.round((T - Q1(a.display).left) / Sl(a.display)) - G));
        }
        return M;
      }
      P(la, "posFromMouse");
      function ca(a, u) {
        if (u >= a.display.viewTo || (u -= a.display.viewFrom, u < 0))
          return null;
        for (var h = a.display.view, p = 0; p < h.length; p++)
          if (u -= h[p].size, u < 0)
            return p;
      }
      P(ca, "findViewIndex");
      function yr(a, u, h, p) {
        u == null && (u = a.doc.first), h == null && (h = a.doc.first + a.doc.size), p || (p = 0);
        var y = a.display;
        if (p && h < y.viewTo && (y.updateLineNumbers == null || y.updateLineNumbers > u) && (y.updateLineNumbers = u), a.curOp.viewChanged = !0, u >= y.viewTo)
          fs && em(a.doc, u) < y.viewTo && hs(a);
        else if (h <= y.viewFrom)
          fs && $1(a.doc, h + p) > y.viewFrom ? hs(a) : (y.viewFrom += p, y.viewTo += p);
        else if (u <= y.viewFrom && h >= y.viewTo)
          hs(a);
        else if (u <= y.viewFrom) {
          var T = rd(a, h, h + p, 1);
          T ? (y.view = y.view.slice(T.index), y.viewFrom = T.lineN, y.viewTo += p) : hs(a);
        } else if (h >= y.viewTo) {
          var O = rd(a, u, u, -1);
          O ? (y.view = y.view.slice(0, O.index), y.viewTo = O.lineN) : hs(a);
        } else {
          var L = rd(a, u, u, -1), M = rd(a, h, h + p, 1);
          L && M ? (y.view = y.view.slice(0, L.index).concat(Xf(a, L.lineN, M.lineN)).concat(y.view.slice(M.index)), y.viewTo += p) : hs(a);
        }
        var V = y.externalMeasured;
        V && (h < V.lineN ? V.lineN += p : u < V.lineN + V.size && (y.externalMeasured = null));
      }
      P(yr, "regChange");
      function ps(a, u, h) {
        a.curOp.viewChanged = !0;
        var p = a.display, y = a.display.externalMeasured;
        if (y && u >= y.lineN && u < y.lineN + y.size && (p.externalMeasured = null), !(u < p.viewFrom || u >= p.viewTo)) {
          var T = p.view[ca(a, u)];
          if (T.node != null) {
            var O = T.changes || (T.changes = []);
            le(O, h) == -1 && O.push(h);
          }
        }
      }
      P(ps, "regLineChange");
      function hs(a) {
        a.display.viewFrom = a.display.viewTo = a.doc.first, a.display.view = [], a.display.viewOffset = 0;
      }
      P(hs, "resetView");
      function rd(a, u, h, p) {
        var y = ca(a, u), T, O = a.display.view;
        if (!fs || h == a.doc.first + a.doc.size)
          return { index: y, lineN: h };
        for (var L = a.display.viewFrom, M = 0; M < y; M++)
          L += O[M].size;
        if (L != u) {
          if (p > 0) {
            if (y == O.length - 1)
              return null;
            T = L + O[y].size - u, y++;
          } else
            T = L - u;
          u += T, h += T;
        }
        for (; em(a.doc, h) != h; ) {
          if (y == (p < 0 ? 0 : O.length - 1))
            return null;
          h += p * O[y - (p < 0 ? 1 : 0)].size, y += p;
        }
        return { index: y, lineN: h };
      }
      P(rd, "viewCuttingPoint");
      function EN(a, u, h) {
        var p = a.display, y = p.view;
        y.length == 0 || u >= p.viewTo || h <= p.viewFrom ? (p.view = Xf(a, u, h), p.viewFrom = u) : (p.viewFrom > u ? p.view = Xf(a, u, p.viewFrom).concat(p.view) : p.viewFrom < u && (p.view = p.view.slice(ca(a, u))), p.viewFrom = u, p.viewTo < h ? p.view = p.view.concat(Xf(a, p.viewTo, h)) : p.viewTo > h && (p.view = p.view.slice(0, ca(a, h)))), p.viewTo = h;
      }
      P(EN, "adjustView");
      function ab(a) {
        for (var u = a.display.view, h = 0, p = 0; p < u.length; p++) {
          var y = u[p];
          !y.hidden && (!y.node || y.changes) && ++h;
        }
        return h;
      }
      P(ab, "countDirtyView");
      function nu(a) {
        a.display.input.showSelection(a.display.input.prepareSelection());
      }
      P(nu, "updateSelection");
      function lb(a, u) {
        u === void 0 && (u = !0);
        var h = a.doc, p = {}, y = p.cursors = document.createDocumentFragment(), T = p.selection = document.createDocumentFragment(), O = a.options.$customCursor;
        O && (u = !0);
        for (var L = 0; L < h.sel.ranges.length; L++)
          if (!(!u && L == h.sel.primIndex)) {
            var M = h.sel.ranges[L];
            if (!(M.from().line >= a.display.viewTo || M.to().line < a.display.viewFrom)) {
              var V = M.empty();
              if (O) {
                var G = O(a, M);
                G && hm(a, G, y);
              } else
                (V || a.options.showCursorWhenSelecting) && hm(a, M.head, y);
              V || wN(a, M, T);
            }
          }
        return p;
      }
      P(lb, "prepareSelection");
      function hm(a, u, h) {
        var p = Vo(a, u, "div", null, null, !a.options.singleCursorHeightPerLine), y = h.appendChild(B("div", " ", "CodeMirror-cursor"));
        if (y.style.left = p.left + "px", y.style.top = p.top + "px", y.style.height = Math.max(0, p.bottom - p.top) * a.options.cursorHeight + "px", /\bcm-fat-cursor\b/.test(a.getWrapperElement().className)) {
          var T = nd(a, u, "div", null, null), O = T.right - T.left;
          y.style.width = (O > 0 ? O : a.defaultCharWidth()) + "px";
        }
        if (p.other) {
          var L = h.appendChild(B("div", " ", "CodeMirror-cursor CodeMirror-secondarycursor"));
          L.style.display = "", L.style.left = p.other.left + "px", L.style.top = p.other.top + "px", L.style.height = (p.other.bottom - p.other.top) * 0.85 + "px";
        }
      }
      P(hm, "drawSelectionCursor");
      function od(a, u) {
        return a.top - u.top || a.left - u.left;
      }
      P(od, "cmpCoords");
      function wN(a, u, h) {
        var p = a.display, y = a.doc, T = document.createDocumentFragment(), O = Q1(a.display), L = O.left, M = Math.max(p.sizerWidth, aa(a) - p.sizer.offsetLeft) - O.right, V = y.direction == "ltr";
        function G(De, Me, Ge, ze) {
          Me < 0 && (Me = 0), Me = Math.round(Me), ze = Math.round(ze), T.appendChild(B("div", null, "CodeMirror-selected", "position: absolute; left: " + De + `px;
                             top: ` + Me + "px; width: " + (Ge ?? M - De) + `px;
                             height: ` + (ze - Me) + "px"));
        }
        P(G, "add");
        function X(De, Me, Ge) {
          var ze = Pe(y, De), st = ze.text.length, Dt, Rn;
          function Ut(mn, $r) {
            return nd(a, we(De, mn), "div", ze, $r);
          }
          P(Ut, "coords");
          function Mr(mn, $r, Gn) {
            var On = ib(a, ze, null, mn), gn = $r == "ltr" == (Gn == "after") ? "left" : "right", nn = Gn == "after" ? On.begin : On.end - (/\s/.test(ze.text.charAt(On.end - 1)) ? 2 : 1);
            return Ut(nn, gn)[gn];
          }
          P(Mr, "wrapX");
          var Pr = mr(ze, y.direction);
          return zf(Pr, Me || 0, Ge ?? st, function(mn, $r, Gn, On) {
            var gn = Gn == "ltr", nn = Ut(mn, gn ? "left" : "right"), Vr = Ut($r - 1, gn ? "right" : "left"), gu = Me == null && mn == 0, ma = Ge == null && $r == st, rr = On == 0, Hi = !Pr || On == Pr.length - 1;
            if (Vr.top - nn.top <= 3) {
              var Fn = (V ? gu : ma) && rr, bE = (V ? ma : gu) && Hi, Es = Fn ? L : (gn ? nn : Vr).left, Ml = bE ? M : (gn ? Vr : nn).right;
              G(Es, nn.top, Ml - Es, nn.bottom);
            } else {
              var Pl, br, vu, EE;
              gn ? (Pl = V && gu && rr ? L : nn.left, br = V ? M : Mr(mn, Gn, "before"), vu = V ? L : Mr($r, Gn, "after"), EE = V && ma && Hi ? M : Vr.right) : (Pl = V ? Mr(mn, Gn, "before") : L, br = !V && gu && rr ? M : nn.right, vu = !V && ma && Hi ? L : Vr.left, EE = V ? Mr($r, Gn, "after") : M), G(Pl, nn.top, br - Pl, nn.bottom), nn.bottom < Vr.top && G(L, nn.bottom, null, Vr.top), G(vu, Vr.top, EE - vu, Vr.bottom);
            }
            (!Dt || od(nn, Dt) < 0) && (Dt = nn), od(Vr, Dt) < 0 && (Dt = Vr), (!Rn || od(nn, Rn) < 0) && (Rn = nn), od(Vr, Rn) < 0 && (Rn = Vr);
          }), { start: Dt, end: Rn };
        }
        P(X, "drawForLine");
        var se = u.from(), oe = u.to();
        if (se.line == oe.line)
          X(se.line, se.ch, oe.ch);
        else {
          var pe = Pe(y, se.line), ye = Pe(y, oe.line), Ce = $o(pe) == $o(ye), Ae = X(se.line, se.ch, Ce ? pe.text.length + 1 : null).end, Le = X(oe.line, Ce ? 0 : null, oe.ch).start;
          Ce && (Ae.top < Le.top - 2 ? (G(Ae.right, Ae.top, null, Ae.bottom), G(L, Le.top, Le.left, Le.bottom)) : G(Ae.right, Ae.top, Le.left - Ae.right, Ae.bottom)), Ae.bottom < Le.top && G(L, Ae.bottom, null, Le.top);
        }
        h.appendChild(T);
      }
      P(wN, "drawSelectionRange");
      function mm(a) {
        if (a.state.focused) {
          var u = a.display;
          clearInterval(u.blinker);
          var h = !0;
          u.cursorDiv.style.visibility = "", a.options.cursorBlinkRate > 0 ? u.blinker = setInterval(function() {
            a.hasFocus() || Tl(a), u.cursorDiv.style.visibility = (h = !h) ? "" : "hidden";
          }, a.options.cursorBlinkRate) : a.options.cursorBlinkRate < 0 && (u.cursorDiv.style.visibility = "hidden");
        }
      }
      P(mm, "restartBlink");
      function cb(a) {
        a.hasFocus() || (a.display.input.focus(), a.state.focused || vm(a));
      }
      P(cb, "ensureFocus");
      function gm(a) {
        a.state.delayingBlurEvent = !0, setTimeout(function() {
          a.state.delayingBlurEvent && (a.state.delayingBlurEvent = !1, a.state.focused && Tl(a));
        }, 100);
      }
      P(gm, "delayBlurEvent");
      function vm(a, u) {
        a.state.delayingBlurEvent && !a.state.draggingText && (a.state.delayingBlurEvent = !1), a.options.readOnly != "nocursor" && (a.state.focused || (Ke(a, "focus", a, u), a.state.focused = !0, K(a.display.wrapper, "CodeMirror-focused"), !a.curOp && a.display.selForContextMenu != a.doc.sel && (a.display.input.reset(), d && setTimeout(function() {
          return a.display.input.reset(!0);
        }, 20)), a.display.input.receivedFocus()), mm(a));
      }
      P(vm, "onFocus");
      function Tl(a, u) {
        a.state.delayingBlurEvent || (a.state.focused && (Ke(a, "blur", a, u), a.state.focused = !1, q(a.display.wrapper, "CodeMirror-focused")), clearInterval(a.display.blinker), setTimeout(function() {
          a.state.focused || (a.display.shift = !1);
        }, 150));
      }
      P(Tl, "onBlur");
      function id(a) {
        for (var u = a.display, h = u.lineDiv.offsetTop, p = Math.max(0, u.scroller.getBoundingClientRect().top), y = u.lineDiv.getBoundingClientRect().top, T = 0, O = 0; O < u.view.length; O++) {
          var L = u.view[O], M = a.options.lineWrapping, V = void 0, G = 0;
          if (!L.hidden) {
            if (y += L.line.height, c && f < 8) {
              var X = L.node.offsetTop + L.node.offsetHeight;
              V = X - h, h = X;
            } else {
              var se = L.node.getBoundingClientRect();
              V = se.bottom - se.top, !M && L.text.firstChild && (G = L.text.firstChild.getBoundingClientRect().right - se.left - 1);
            }
            var oe = L.line.height - V;
            if ((oe > 5e-3 || oe < -5e-3) && (y < p && (T -= oe), vr(L.line, V), ub(L.line), L.rest))
              for (var pe = 0; pe < L.rest.length; pe++)
                ub(L.rest[pe]);
            if (G > a.display.sizerWidth) {
              var ye = Math.ceil(G / Sl(a.display));
              ye > a.display.maxLineLength && (a.display.maxLineLength = ye, a.display.maxLine = L.line, a.display.maxLineChanged = !0);
            }
          }
        }
        Math.abs(T) > 2 && (u.scroller.scrollTop += T);
      }
      P(id, "updateHeightsInViewport");
      function ub(a) {
        if (a.widgets)
          for (var u = 0; u < a.widgets.length; ++u) {
            var h = a.widgets[u], p = h.node.parentNode;
            p && (h.height = p.offsetHeight);
          }
      }
      P(ub, "updateWidgetHeight");
      function sd(a, u, h) {
        var p = h && h.top != null ? Math.max(0, h.top) : a.scroller.scrollTop;
        p = Math.floor(p - ed(a));
        var y = h && h.bottom != null ? h.bottom : p + a.wrapper.clientHeight, T = Po(u, p), O = Po(u, y);
        if (h && h.ensure) {
          var L = h.ensure.from.line, M = h.ensure.to.line;
          L < T ? (T = L, O = Po(u, qi(Pe(u, L)) + a.wrapper.clientHeight)) : Math.min(M, u.lastLine()) >= O && (T = Po(u, qi(Pe(u, M)) - a.wrapper.clientHeight), O = M);
        }
        return { from: T, to: Math.max(O, T + 1) };
      }
      P(sd, "visibleLines");
      function xN(a, u) {
        if (!tn(a, "scrollCursorIntoView")) {
          var h = a.display, p = h.sizer.getBoundingClientRect(), y = null;
          if (u.top + p.top < 0 ? y = !0 : u.bottom + p.top > (window.innerHeight || document.documentElement.clientHeight) && (y = !1), y != null && !_) {
            var T = B("div", "​", null, `position: absolute;
                         top: ` + (u.top - h.viewOffset - ed(a.display)) + `px;
                         height: ` + (u.bottom - u.top + li(a) + h.barHeight) + `px;
                         left: ` + u.left + "px; width: " + Math.max(2, u.right - u.left) + "px;");
            a.display.lineSpace.appendChild(T), T.scrollIntoView(y), a.display.lineSpace.removeChild(T);
          }
        }
      }
      P(xN, "maybeScrollWindow");
      function SN(a, u, h, p) {
        p == null && (p = 0);
        var y;
        !a.options.lineWrapping && u == h && (h = u.sticky == "before" ? we(u.line, u.ch + 1, "before") : u, u = u.ch ? we(u.line, u.sticky == "before" ? u.ch - 1 : u.ch, "after") : u);
        for (var T = 0; T < 5; T++) {
          var O = !1, L = Vo(a, u), M = !h || h == u ? L : Vo(a, h);
          y = {
            left: Math.min(L.left, M.left),
            top: Math.min(L.top, M.top) - p,
            right: Math.max(L.left, M.left),
            bottom: Math.max(L.bottom, M.bottom) + p
          };
          var V = ym(a, y), G = a.doc.scrollTop, X = a.doc.scrollLeft;
          if (V.scrollTop != null && (ou(a, V.scrollTop), Math.abs(a.doc.scrollTop - G) > 1 && (O = !0)), V.scrollLeft != null && (ua(a, V.scrollLeft), Math.abs(a.doc.scrollLeft - X) > 1 && (O = !0)), !O)
            break;
        }
        return y;
      }
      P(SN, "scrollPosIntoView");
      function TN(a, u) {
        var h = ym(a, u);
        h.scrollTop != null && ou(a, h.scrollTop), h.scrollLeft != null && ua(a, h.scrollLeft);
      }
      P(TN, "scrollIntoView");
      function ym(a, u) {
        var h = a.display, p = xl(a.display);
        u.top < 0 && (u.top = 0);
        var y = a.curOp && a.curOp.scrollTop != null ? a.curOp.scrollTop : h.scroller.scrollTop, T = im(a), O = {};
        u.bottom - u.top > T && (u.bottom = u.top + T);
        var L = a.doc.height + om(h), M = u.top < p, V = u.bottom > L - p;
        if (u.top < y)
          O.scrollTop = M ? 0 : u.top;
        else if (u.bottom > y + T) {
          var G = Math.min(u.top, (V ? L : u.bottom) - T);
          G != y && (O.scrollTop = G);
        }
        var X = a.options.fixedGutter ? 0 : h.gutters.offsetWidth, se = a.curOp && a.curOp.scrollLeft != null ? a.curOp.scrollLeft : h.scroller.scrollLeft - X, oe = aa(a) - h.gutters.offsetWidth, pe = u.right - u.left > oe;
        return pe && (u.right = u.left + oe), u.left < 10 ? O.scrollLeft = 0 : u.left < se ? O.scrollLeft = Math.max(0, u.left + X - (pe ? 0 : 10)) : u.right > oe + se - 3 && (O.scrollLeft = u.right + (pe ? 0 : 10) - oe), O;
      }
      P(ym, "calculateScrollPos");
      function bm(a, u) {
        u != null && (ad(a), a.curOp.scrollTop = (a.curOp.scrollTop == null ? a.doc.scrollTop : a.curOp.scrollTop) + u);
      }
      P(bm, "addToScrollTop");
      function Cl(a) {
        ad(a);
        var u = a.getCursor();
        a.curOp.scrollToPos = { from: u, to: u, margin: a.options.cursorScrollMargin };
      }
      P(Cl, "ensureCursorVisible");
      function ru(a, u, h) {
        (u != null || h != null) && ad(a), u != null && (a.curOp.scrollLeft = u), h != null && (a.curOp.scrollTop = h);
      }
      P(ru, "scrollToCoords");
      function CN(a, u) {
        ad(a), a.curOp.scrollToPos = u;
      }
      P(CN, "scrollToRange");
      function ad(a) {
        var u = a.curOp.scrollToPos;
        if (u) {
          a.curOp.scrollToPos = null;
          var h = rb(a, u.from), p = rb(a, u.to);
          fb(a, h, p, u.margin);
        }
      }
      P(ad, "resolveScrollToPos");
      function fb(a, u, h, p) {
        var y = ym(a, {
          left: Math.min(u.left, h.left),
          top: Math.min(u.top, h.top) - p,
          right: Math.max(u.right, h.right),
          bottom: Math.max(u.bottom, h.bottom) + p
        });
        ru(a, y.scrollLeft, y.scrollTop);
      }
      P(fb, "scrollToCoordsRange");
      function ou(a, u) {
        Math.abs(a.doc.scrollTop - u) < 2 || (o || xm(a, { top: u }), db(a, u, !0), o && xm(a), su(a, 100));
      }
      P(ou, "updateScrollTop");
      function db(a, u, h) {
        u = Math.max(0, Math.min(a.display.scroller.scrollHeight - a.display.scroller.clientHeight, u)), !(a.display.scroller.scrollTop == u && !h) && (a.doc.scrollTop = u, a.display.scrollbars.setScrollTop(u), a.display.scroller.scrollTop != u && (a.display.scroller.scrollTop = u));
      }
      P(db, "setScrollTop");
      function ua(a, u, h, p) {
        u = Math.max(0, Math.min(u, a.display.scroller.scrollWidth - a.display.scroller.clientWidth)), !((h ? u == a.doc.scrollLeft : Math.abs(a.doc.scrollLeft - u) < 2) && !p) && (a.doc.scrollLeft = u, gb(a), a.display.scroller.scrollLeft != u && (a.display.scroller.scrollLeft = u), a.display.scrollbars.setScrollLeft(u));
      }
      P(ua, "setScrollLeft");
      function iu(a) {
        var u = a.display, h = u.gutters.offsetWidth, p = Math.round(a.doc.height + om(a.display));
        return {
          clientHeight: u.scroller.clientHeight,
          viewHeight: u.wrapper.clientHeight,
          scrollWidth: u.scroller.scrollWidth,
          clientWidth: u.scroller.clientWidth,
          viewWidth: u.wrapper.clientWidth,
          barLeft: a.options.fixedGutter ? h : 0,
          docHeight: p,
          scrollHeight: p + li(a) + u.barHeight,
          nativeBarWidth: u.nativeBarWidth,
          gutterWidth: h
        };
      }
      P(iu, "measureForScrollbars");
      var kl = /* @__PURE__ */ P(function(a, u, h) {
        this.cm = h;
        var p = this.vert = B("div", [B("div", null, null, "min-width: 1px")], "CodeMirror-vscrollbar"), y = this.horiz = B("div", [B("div", null, null, "height: 100%; min-height: 1px")], "CodeMirror-hscrollbar");
        p.tabIndex = y.tabIndex = -1, a(p), a(y), We(p, "scroll", function() {
          p.clientHeight && u(p.scrollTop, "vertical");
        }), We(y, "scroll", function() {
          y.clientWidth && u(y.scrollLeft, "horizontal");
        }), this.checkedZeroWidth = !1, c && f < 8 && (this.horiz.style.minHeight = this.vert.style.minWidth = "18px");
      }, "NativeScrollbars");
      kl.prototype.update = function(a) {
        var u = a.scrollWidth > a.clientWidth + 1, h = a.scrollHeight > a.clientHeight + 1, p = a.nativeBarWidth;
        if (h) {
          this.vert.style.display = "block", this.vert.style.bottom = u ? p + "px" : "0";
          var y = a.viewHeight - (u ? p : 0);
          this.vert.firstChild.style.height = Math.max(0, a.scrollHeight - a.clientHeight + y) + "px";
        } else
          this.vert.scrollTop = 0, this.vert.style.display = "", this.vert.firstChild.style.height = "0";
        if (u) {
          this.horiz.style.display = "block", this.horiz.style.right = h ? p + "px" : "0", this.horiz.style.left = a.barLeft + "px";
          var T = a.viewWidth - a.barLeft - (h ? p : 0);
          this.horiz.firstChild.style.width = Math.max(0, a.scrollWidth - a.clientWidth + T) + "px";
        } else
          this.horiz.style.display = "", this.horiz.firstChild.style.width = "0";
        return !this.checkedZeroWidth && a.clientHeight > 0 && (p == 0 && this.zeroWidthHack(), this.checkedZeroWidth = !0), { right: h ? p : 0, bottom: u ? p : 0 };
      }, kl.prototype.setScrollLeft = function(a) {
        this.horiz.scrollLeft != a && (this.horiz.scrollLeft = a), this.disableHoriz && this.enableZeroWidthBar(this.horiz, this.disableHoriz, "horiz");
      }, kl.prototype.setScrollTop = function(a) {
        this.vert.scrollTop != a && (this.vert.scrollTop = a), this.disableVert && this.enableZeroWidthBar(this.vert, this.disableVert, "vert");
      }, kl.prototype.zeroWidthHack = function() {
        var a = E && !w ? "12px" : "18px";
        this.horiz.style.height = this.vert.style.width = a, this.horiz.style.pointerEvents = this.vert.style.pointerEvents = "none", this.disableHoriz = new ae(), this.disableVert = new ae();
      }, kl.prototype.enableZeroWidthBar = function(a, u, h) {
        a.style.pointerEvents = "auto";
        function p() {
          var y = a.getBoundingClientRect(), T = h == "vert" ? document.elementFromPoint(y.right - 1, (y.top + y.bottom) / 2) : document.elementFromPoint((y.right + y.left) / 2, y.bottom - 1);
          T != a ? a.style.pointerEvents = "none" : u.set(1e3, p);
        }
        P(p, "maybeDisable"), u.set(1e3, p);
      }, kl.prototype.clear = function() {
        var a = this.horiz.parentNode;
        a.removeChild(this.horiz), a.removeChild(this.vert);
      };
      var ld = /* @__PURE__ */ P(function() {
      }, "NullScrollbars");
      ld.prototype.update = function() {
        return { bottom: 0, right: 0 };
      }, ld.prototype.setScrollLeft = function() {
      }, ld.prototype.setScrollTop = function() {
      }, ld.prototype.clear = function() {
      };
      function _l(a, u) {
        u || (u = iu(a));
        var h = a.display.barWidth, p = a.display.barHeight;
        pb(a, u);
        for (var y = 0; y < 4 && h != a.display.barWidth || p != a.display.barHeight; y++)
          h != a.display.barWidth && a.options.lineWrapping && id(a), pb(a, iu(a)), h = a.display.barWidth, p = a.display.barHeight;
      }
      P(_l, "updateScrollbars");
      function pb(a, u) {
        var h = a.display, p = h.scrollbars.update(u);
        h.sizer.style.paddingRight = (h.barWidth = p.right) + "px", h.sizer.style.paddingBottom = (h.barHeight = p.bottom) + "px", h.heightForcer.style.borderBottom = p.bottom + "px solid transparent", p.right && p.bottom ? (h.scrollbarFiller.style.display = "block", h.scrollbarFiller.style.height = p.bottom + "px", h.scrollbarFiller.style.width = p.right + "px") : h.scrollbarFiller.style.display = "", p.bottom && a.options.coverGutterNextToScrollbar && a.options.fixedGutter ? (h.gutterFiller.style.display = "block", h.gutterFiller.style.height = p.bottom + "px", h.gutterFiller.style.width = u.gutterWidth + "px") : h.gutterFiller.style.display = "";
      }
      P(pb, "updateScrollbarsInner");
      var kN = { native: kl, null: ld };
      function hb(a) {
        a.display.scrollbars && (a.display.scrollbars.clear(), a.display.scrollbars.addClass && q(a.display.wrapper, a.display.scrollbars.addClass)), a.display.scrollbars = new kN[a.options.scrollbarStyle](function(u) {
          a.display.wrapper.insertBefore(u, a.display.scrollbarFiller), We(u, "mousedown", function() {
            a.state.focused && setTimeout(function() {
              return a.display.input.focus();
            }, 0);
          }), u.setAttribute("cm-not-content", "true");
        }, function(u, h) {
          h == "horizontal" ? ua(a, u) : ou(a, u);
        }, a), a.display.scrollbars.addClass && K(a.display.wrapper, a.display.scrollbars.addClass);
      }
      P(hb, "initScrollbars");
      var PV = 0;
      function fa(a) {
        a.curOp = {
          cm: a,
          viewChanged: !1,
          // Flag that indicates that lines might need to be redrawn
          startHeight: a.doc.height,
          // Used to detect need to update scrollbar
          forceUpdate: !1,
          // Used to force a redraw
          updateInput: 0,
          // Whether to reset the input textarea
          typing: !1,
          // Whether this reset should be careful to leave existing text (for compositing)
          changeObjs: null,
          // Accumulated changes, for firing change events
          cursorActivityHandlers: null,
          // Set of handlers to fire cursorActivity on
          cursorActivityCalled: 0,
          // Tracks which cursorActivity handlers have been called already
          selectionChanged: !1,
          // Whether the selection needs to be redrawn
          updateMaxLine: !1,
          // Set when the widest line needs to be determined anew
          scrollLeft: null,
          scrollTop: null,
          // Intermediate scroll position, not pushed to DOM yet
          scrollToPos: null,
          // Used to scroll to a specific position
          focus: !1,
          id: ++PV,
          // Unique ID
          markArrays: null
          // Used by addMarkedSpan
        }, nN(a.curOp);
      }
      P(fa, "startOperation");
      function da(a) {
        var u = a.curOp;
        u && oN(u, function(h) {
          for (var p = 0; p < h.ops.length; p++)
            h.ops[p].cm.curOp = null;
          _N(h);
        });
      }
      P(da, "endOperation");
      function _N(a) {
        for (var u = a.ops, h = 0; h < u.length; h++)
          NN(u[h]);
        for (var p = 0; p < u.length; p++)
          ON(u[p]);
        for (var y = 0; y < u.length; y++)
          AN(u[y]);
        for (var T = 0; T < u.length; T++)
          DN(u[T]);
        for (var O = 0; O < u.length; O++)
          IN(u[O]);
      }
      P(_N, "endOperations");
      function NN(a) {
        var u = a.cm, h = u.display;
        RN(u), a.updateMaxLine && nm(u), a.mustUpdate = a.viewChanged || a.forceUpdate || a.scrollTop != null || a.scrollToPos && (a.scrollToPos.from.line < h.viewFrom || a.scrollToPos.to.line >= h.viewTo) || h.maxLineChanged && u.options.lineWrapping, a.update = a.mustUpdate && new Em(u, a.mustUpdate && { top: a.scrollTop, ensure: a.scrollToPos }, a.forceUpdate);
      }
      P(NN, "endOperation_R1");
      function ON(a) {
        a.updatedDisplay = a.mustUpdate && wm(a.cm, a.update);
      }
      P(ON, "endOperation_W1");
      function AN(a) {
        var u = a.cm, h = u.display;
        a.updatedDisplay && id(u), a.barMeasure = iu(u), h.maxLineChanged && !u.options.lineWrapping && (a.adjustWidthTo = K1(u, h.maxLine, h.maxLine.text.length).left + 3, u.display.sizerWidth = a.adjustWidthTo, a.barMeasure.scrollWidth = Math.max(h.scroller.clientWidth, h.sizer.offsetLeft + a.adjustWidthTo + li(u) + u.display.barWidth), a.maxScrollLeft = Math.max(0, h.sizer.offsetLeft + a.adjustWidthTo - aa(u))), (a.updatedDisplay || a.selectionChanged) && (a.preparedSelection = h.input.prepareSelection());
      }
      P(AN, "endOperation_R2");
      function DN(a) {
        var u = a.cm;
        a.adjustWidthTo != null && (u.display.sizer.style.minWidth = a.adjustWidthTo + "px", a.maxScrollLeft < u.doc.scrollLeft && ua(u, Math.min(u.display.scroller.scrollLeft, a.maxScrollLeft), !0), u.display.maxLineChanged = !1);
        var h = a.focus && a.focus == Y();
        a.preparedSelection && u.display.input.showSelection(a.preparedSelection, h), (a.updatedDisplay || a.startHeight != u.doc.height) && _l(u, a.barMeasure), a.updatedDisplay && Tm(u, a.barMeasure), a.selectionChanged && mm(u), u.state.focused && a.updateInput && u.display.input.reset(a.typing), h && cb(a.cm);
      }
      P(DN, "endOperation_W2");
      function IN(a) {
        var u = a.cm, h = u.display, p = u.doc;
        if (a.updatedDisplay && mb(u, a.update), h.wheelStartX != null && (a.scrollTop != null || a.scrollLeft != null || a.scrollToPos) && (h.wheelStartX = h.wheelStartY = null), a.scrollTop != null && db(u, a.scrollTop, a.forceScroll), a.scrollLeft != null && ua(u, a.scrollLeft, !0, !0), a.scrollToPos) {
          var y = SN(
            u,
            Re(p, a.scrollToPos.from),
            Re(p, a.scrollToPos.to),
            a.scrollToPos.margin
          );
          xN(u, y);
        }
        var T = a.maybeHiddenMarkers, O = a.maybeUnhiddenMarkers;
        if (T)
          for (var L = 0; L < T.length; ++L)
            T[L].lines.length || Ke(T[L], "hide");
        if (O)
          for (var M = 0; M < O.length; ++M)
            O[M].lines.length && Ke(O[M], "unhide");
        h.wrapper.offsetHeight && (p.scrollTop = u.display.scroller.scrollTop), a.changeObjs && Ke(u, "changes", u, a.changeObjs), a.update && a.update.finish();
      }
      P(IN, "endOperation_finish");
      function Rr(a, u) {
        if (a.curOp)
          return u();
        fa(a);
        try {
          return u();
        } finally {
          da(a);
        }
      }
      P(Rr, "runInOp");
      function _n(a, u) {
        return function() {
          if (a.curOp)
            return u.apply(a, arguments);
          fa(a);
          try {
            return u.apply(a, arguments);
          } finally {
            da(a);
          }
        };
      }
      P(_n, "operation");
      function nr(a) {
        return function() {
          if (this.curOp)
            return a.apply(this, arguments);
          fa(this);
          try {
            return a.apply(this, arguments);
          } finally {
            da(this);
          }
        };
      }
      P(nr, "methodOp");
      function Nn(a) {
        return function() {
          var u = this.cm;
          if (!u || u.curOp)
            return a.apply(this, arguments);
          fa(u);
          try {
            return a.apply(this, arguments);
          } finally {
            da(u);
          }
        };
      }
      P(Nn, "docMethodOp");
      function su(a, u) {
        a.doc.highlightFrontier < a.display.viewTo && a.state.highlight.set(u, J(LN, a));
      }
      P(su, "startWorker");
      function LN(a) {
        var u = a.doc;
        if (!(u.highlightFrontier >= a.display.viewTo)) {
          var h = +/* @__PURE__ */ new Date() + a.options.workTime, p = Yc(a, u.highlightFrontier), y = [];
          u.iter(p.line, Math.min(u.first + u.size, a.display.viewTo + 500), function(T) {
            if (p.line >= a.display.viewFrom) {
              var O = T.styles, L = T.text.length > a.options.maxHighlightLength ? Zr(u.mode, p.state) : null, M = k1(a, T, p, !0);
              L && (p.state = L), T.styles = M.styles;
              var V = T.styleClasses, G = M.classes;
              G ? T.styleClasses = G : V && (T.styleClasses = null);
              for (var X = !O || O.length != T.styles.length || V != G && (!V || !G || V.bgClass != G.bgClass || V.textClass != G.textClass), se = 0; !X && se < O.length; ++se)
                X = O[se] != T.styles[se];
              X && y.push(p.line), T.stateAfter = p.save(), p.nextLine();
            } else
              T.text.length <= a.options.maxHighlightLength && Kh(a, T.text, p), T.stateAfter = p.line % 5 == 0 ? p.save() : null, p.nextLine();
            if (+/* @__PURE__ */ new Date() > h)
              return su(a, a.options.workDelay), !0;
          }), u.highlightFrontier = p.line, u.modeFrontier = Math.max(u.modeFrontier, p.line), y.length && Rr(a, function() {
            for (var T = 0; T < y.length; T++)
              ps(a, y[T], "text");
          });
        }
      }
      P(LN, "highlightWorker");
      var Em = /* @__PURE__ */ P(function(a, u, h) {
        var p = a.display;
        this.viewport = u, this.visible = sd(p, a.doc, u), this.editorIsHidden = !p.wrapper.offsetWidth, this.wrapperHeight = p.wrapper.clientHeight, this.wrapperWidth = p.wrapper.clientWidth, this.oldDisplayWidth = aa(a), this.force = h, this.dims = fm(a), this.events = [];
      }, "DisplayUpdate");
      Em.prototype.signal = function(a, u) {
        Cn(a, u) && this.events.push(arguments);
      }, Em.prototype.finish = function() {
        for (var a = 0; a < this.events.length; a++)
          Ke.apply(null, this.events[a]);
      };
      function RN(a) {
        var u = a.display;
        !u.scrollbarsClipped && u.scroller.offsetWidth && (u.nativeBarWidth = u.scroller.offsetWidth - u.scroller.clientWidth, u.heightForcer.style.height = li(a) + "px", u.sizer.style.marginBottom = -u.nativeBarWidth + "px", u.sizer.style.borderRightWidth = li(a) + "px", u.scrollbarsClipped = !0);
      }
      P(RN, "maybeClipScrollbars");
      function FN(a) {
        if (a.hasFocus())
          return null;
        var u = Y();
        if (!u || !Q(a.display.lineDiv, u))
          return null;
        var h = { activeElt: u };
        if (window.getSelection) {
          var p = window.getSelection();
          p.anchorNode && p.extend && Q(a.display.lineDiv, p.anchorNode) && (h.anchorNode = p.anchorNode, h.anchorOffset = p.anchorOffset, h.focusNode = p.focusNode, h.focusOffset = p.focusOffset);
        }
        return h;
      }
      P(FN, "selectionSnapshot");
      function MN(a) {
        if (!(!a || !a.activeElt || a.activeElt == Y()) && (a.activeElt.focus(), !/^(INPUT|TEXTAREA)$/.test(a.activeElt.nodeName) && a.anchorNode && Q(document.body, a.anchorNode) && Q(document.body, a.focusNode))) {
          var u = window.getSelection(), h = document.createRange();
          h.setEnd(a.anchorNode, a.anchorOffset), h.collapse(!1), u.removeAllRanges(), u.addRange(h), u.extend(a.focusNode, a.focusOffset);
        }
      }
      P(MN, "restoreSelection");
      function wm(a, u) {
        var h = a.display, p = a.doc;
        if (u.editorIsHidden)
          return hs(a), !1;
        if (!u.force && u.visible.from >= h.viewFrom && u.visible.to <= h.viewTo && (h.updateLineNumbers == null || h.updateLineNumbers >= h.viewTo) && h.renderedView == h.view && ab(a) == 0)
          return !1;
        vb(a) && (hs(a), u.dims = fm(a));
        var y = p.first + p.size, T = Math.max(u.visible.from - a.options.viewportMargin, p.first), O = Math.min(y, u.visible.to + a.options.viewportMargin);
        h.viewFrom < T && T - h.viewFrom < 20 && (T = Math.max(p.first, h.viewFrom)), h.viewTo > O && h.viewTo - O < 20 && (O = Math.min(y, h.viewTo)), fs && (T = em(a.doc, T), O = $1(a.doc, O));
        var L = T != h.viewFrom || O != h.viewTo || h.lastWrapHeight != u.wrapperHeight || h.lastWrapWidth != u.wrapperWidth;
        EN(a, T, O), h.viewOffset = qi(Pe(a.doc, h.viewFrom)), a.display.mover.style.top = h.viewOffset + "px";
        var M = ab(a);
        if (!L && M == 0 && !u.force && h.renderedView == h.view && (h.updateLineNumbers == null || h.updateLineNumbers >= h.viewTo))
          return !1;
        var V = FN(a);
        return M > 4 && (h.lineDiv.style.display = "none"), PN(a, h.updateLineNumbers, u.dims), M > 4 && (h.lineDiv.style.display = ""), h.renderedView = h.view, MN(V), H(h.cursorDiv), H(h.selectionDiv), h.gutters.style.height = h.sizer.style.minHeight = 0, L && (h.lastWrapHeight = u.wrapperHeight, h.lastWrapWidth = u.wrapperWidth, su(a, 400)), h.updateLineNumbers = null, !0;
      }
      P(wm, "updateDisplayIfNeeded");
      function mb(a, u) {
        for (var h = u.viewport, p = !0; ; p = !1) {
          if (!p || !a.options.lineWrapping || u.oldDisplayWidth == aa(a)) {
            if (h && h.top != null && (h = { top: Math.min(a.doc.height + om(a.display) - im(a), h.top) }), u.visible = sd(a.display, a.doc, h), u.visible.from >= a.display.viewFrom && u.visible.to <= a.display.viewTo)
              break;
          } else
            p && (u.visible = sd(a.display, a.doc, h));
          if (!wm(a, u))
            break;
          id(a);
          var y = iu(a);
          nu(a), _l(a, y), Tm(a, y), u.force = !1;
        }
        u.signal(a, "update", a), (a.display.viewFrom != a.display.reportedViewFrom || a.display.viewTo != a.display.reportedViewTo) && (u.signal(a, "viewportChange", a, a.display.viewFrom, a.display.viewTo), a.display.reportedViewFrom = a.display.viewFrom, a.display.reportedViewTo = a.display.viewTo);
      }
      P(mb, "postUpdateDisplay");
      function xm(a, u) {
        var h = new Em(a, u);
        if (wm(a, h)) {
          id(a), mb(a, h);
          var p = iu(a);
          nu(a), _l(a, p), Tm(a, p), h.finish();
        }
      }
      P(xm, "updateDisplaySimple");
      function PN(a, u, h) {
        var p = a.display, y = a.options.lineNumbers, T = p.lineDiv, O = T.firstChild;
        function L(pe) {
          var ye = pe.nextSibling;
          return d && E && a.display.currentWheelTarget == pe ? pe.style.display = "none" : pe.parentNode.removeChild(pe), ye;
        }
        P(L, "rm");
        for (var M = p.view, V = p.viewFrom, G = 0; G < M.length; G++) {
          var X = M[G];
          if (!X.hidden)
            if (!X.node || X.node.parentNode != T) {
              var se = cN(a, X, V, h);
              T.insertBefore(se, O);
            } else {
              for (; O != X.node; )
                O = L(O);
              var oe = y && u != null && u <= V && X.lineNumber;
              X.changes && (le(X.changes, "gutter") > -1 && (oe = !1), q1(a, X, V, h)), oe && (H(X.lineNumber), X.lineNumber.appendChild(document.createTextNode(bl(a.options, V)))), O = X.node.nextSibling;
            }
          V += X.size;
        }
        for (; O; )
          O = L(O);
      }
      P(PN, "patchDisplay");
      function Sm(a) {
        var u = a.gutters.offsetWidth;
        a.sizer.style.marginLeft = u + "px", kn(a, "gutterChanged", a);
      }
      P(Sm, "updateGutterSpace");
      function Tm(a, u) {
        a.display.sizer.style.minHeight = u.docHeight + "px", a.display.heightForcer.style.top = u.docHeight + "px", a.display.gutters.style.height = u.docHeight + a.display.barHeight + li(a) + "px";
      }
      P(Tm, "setDocumentHeight");
      function gb(a) {
        var u = a.display, h = u.view;
        if (!(!u.alignWidgets && (!u.gutters.firstChild || !a.options.fixedGutter))) {
          for (var p = dm(u) - u.scroller.scrollLeft + a.doc.scrollLeft, y = u.gutters.offsetWidth, T = p + "px", O = 0; O < h.length; O++)
            if (!h[O].hidden) {
              a.options.fixedGutter && (h[O].gutter && (h[O].gutter.style.left = T), h[O].gutterBackground && (h[O].gutterBackground.style.left = T));
              var L = h[O].alignable;
              if (L)
                for (var M = 0; M < L.length; M++)
                  L[M].style.left = T;
            }
          a.options.fixedGutter && (u.gutters.style.left = p + y + "px");
        }
      }
      P(gb, "alignHorizontally");
      function vb(a) {
        if (!a.options.lineNumbers)
          return !1;
        var u = a.doc, h = bl(a.options, u.first + u.size - 1), p = a.display;
        if (h.length != p.lineNumChars) {
          var y = p.measure.appendChild(B(
            "div",
            [B("div", h)],
            "CodeMirror-linenumber CodeMirror-gutter-elt"
          )), T = y.firstChild.offsetWidth, O = y.offsetWidth - T;
          return p.lineGutter.style.width = "", p.lineNumInnerWidth = Math.max(T, p.lineGutter.offsetWidth - O) + 1, p.lineNumWidth = p.lineNumInnerWidth + O, p.lineNumChars = p.lineNumInnerWidth ? h.length : -1, p.lineGutter.style.width = p.lineNumWidth + "px", Sm(a.display), !0;
        }
        return !1;
      }
      P(vb, "maybeUpdateLineNumberWidth");
      function Cm(a, u) {
        for (var h = [], p = !1, y = 0; y < a.length; y++) {
          var T = a[y], O = null;
          if (typeof T != "string" && (O = T.style, T = T.className), T == "CodeMirror-linenumbers")
            if (u)
              p = !0;
            else
              continue;
          h.push({ className: T, style: O });
        }
        return u && !p && h.push({ className: "CodeMirror-linenumbers", style: null }), h;
      }
      P(Cm, "getGutters");
      function yb(a) {
        var u = a.gutters, h = a.gutterSpecs;
        H(u), a.lineGutter = null;
        for (var p = 0; p < h.length; ++p) {
          var y = h[p], T = y.className, O = y.style, L = u.appendChild(B("div", null, "CodeMirror-gutter " + T));
          O && (L.style.cssText = O), T == "CodeMirror-linenumbers" && (a.lineGutter = L, L.style.width = (a.lineNumWidth || 1) + "px");
        }
        u.style.display = h.length ? "" : "none", Sm(a);
      }
      P(yb, "renderGutters");
      function au(a) {
        yb(a.display), yr(a), gb(a);
      }
      P(au, "updateGutters");
      function $N(a, u, h, p) {
        var y = this;
        this.input = h, y.scrollbarFiller = B("div", null, "CodeMirror-scrollbar-filler"), y.scrollbarFiller.setAttribute("cm-not-content", "true"), y.gutterFiller = B("div", null, "CodeMirror-gutter-filler"), y.gutterFiller.setAttribute("cm-not-content", "true"), y.lineDiv = R("div", null, "CodeMirror-code"), y.selectionDiv = B("div", null, null, "position: relative; z-index: 1"), y.cursorDiv = B("div", null, "CodeMirror-cursors"), y.measure = B("div", null, "CodeMirror-measure"), y.lineMeasure = B("div", null, "CodeMirror-measure"), y.lineSpace = R(
          "div",
          [y.measure, y.lineMeasure, y.selectionDiv, y.cursorDiv, y.lineDiv],
          null,
          "position: relative; outline: none"
        );
        var T = R("div", [y.lineSpace], "CodeMirror-lines");
        y.mover = B("div", [T], null, "position: relative"), y.sizer = B("div", [y.mover], "CodeMirror-sizer"), y.sizerWidth = null, y.heightForcer = B("div", null, null, "position: absolute; height: " + de + "px; width: 1px;"), y.gutters = B("div", null, "CodeMirror-gutters"), y.lineGutter = null, y.scroller = B("div", [y.sizer, y.heightForcer, y.gutters], "CodeMirror-scroll"), y.scroller.setAttribute("tabIndex", "-1"), y.wrapper = B("div", [y.scrollbarFiller, y.gutterFiller, y.scroller], "CodeMirror"), y.wrapper.setAttribute("translate", "no"), c && f < 8 && (y.gutters.style.zIndex = -1, y.scroller.style.paddingRight = 0), !d && !(o && C) && (y.scroller.draggable = !0), a && (a.appendChild ? a.appendChild(y.wrapper) : a(y.wrapper)), y.viewFrom = y.viewTo = u.first, y.reportedViewFrom = y.reportedViewTo = u.first, y.view = [], y.renderedView = null, y.externalMeasured = null, y.viewOffset = 0, y.lastWrapHeight = y.lastWrapWidth = 0, y.updateLineNumbers = null, y.nativeBarWidth = y.barHeight = y.barWidth = 0, y.scrollbarsClipped = !1, y.lineNumWidth = y.lineNumInnerWidth = y.lineNumChars = null, y.alignWidgets = !1, y.cachedCharWidth = y.cachedTextHeight = y.cachedPaddingH = null, y.maxLine = null, y.maxLineLength = 0, y.maxLineChanged = !1, y.wheelDX = y.wheelDY = y.wheelStartX = y.wheelStartY = null, y.shift = !1, y.selForContextMenu = null, y.activeTouch = null, y.gutterSpecs = Cm(p.gutters, p.lineNumbers), yb(y), h.init(y);
      }
      P($N, "Display");
      var km = 0, ms = null;
      c ? ms = -0.53 : o ? ms = 15 : m ? ms = -0.7 : b && (ms = -1 / 3);
      function bb(a) {
        var u = a.wheelDeltaX, h = a.wheelDeltaY;
        return u == null && a.detail && a.axis == a.HORIZONTAL_AXIS && (u = a.detail), h == null && a.detail && a.axis == a.VERTICAL_AXIS ? h = a.detail : h == null && (h = a.wheelDelta), { x: u, y: h };
      }
      P(bb, "wheelEventDelta");
      function VN(a) {
        var u = bb(a);
        return u.x *= ms, u.y *= ms, u;
      }
      P(VN, "wheelEventPixels");
      function Eb(a, u) {
        var h = bb(u), p = h.x, y = h.y, T = ms;
        u.deltaMode === 0 && (p = u.deltaX, y = u.deltaY, T = 1);
        var O = a.display, L = O.scroller, M = L.scrollWidth > L.clientWidth, V = L.scrollHeight > L.clientHeight;
        if (p && M || y && V) {
          if (y && E && d) {
            e:
              for (var G = u.target, X = O.view; G != L; G = G.parentNode)
                for (var se = 0; se < X.length; se++)
                  if (X[se].node == G) {
                    a.display.currentWheelTarget = G;
                    break e;
                  }
          }
          if (p && !o && !v && T != null) {
            y && V && ou(a, Math.max(0, L.scrollTop + y * T)), ua(a, Math.max(0, L.scrollLeft + p * T)), (!y || y && V) && Ln(u), O.wheelStartX = null;
            return;
          }
          if (y && T != null) {
            var oe = y * T, pe = a.doc.scrollTop, ye = pe + O.wrapper.clientHeight;
            oe < 0 ? pe = Math.max(0, pe + oe - 50) : ye = Math.min(a.doc.height, ye + oe + 50), xm(a, { top: pe, bottom: ye });
          }
          km < 20 && u.deltaMode !== 0 && (O.wheelStartX == null ? (O.wheelStartX = L.scrollLeft, O.wheelStartY = L.scrollTop, O.wheelDX = p, O.wheelDY = y, setTimeout(function() {
            if (O.wheelStartX != null) {
              var Ce = L.scrollLeft - O.wheelStartX, Ae = L.scrollTop - O.wheelStartY, Le = Ae && O.wheelDY && Ae / O.wheelDY || Ce && O.wheelDX && Ce / O.wheelDX;
              O.wheelStartX = O.wheelStartY = null, Le && (ms = (ms * km + Le) / (km + 1), ++km);
            }
          }, 200)) : (O.wheelDX += p, O.wheelDY += y));
        }
      }
      P(Eb, "onScrollWheel");
      var fo = /* @__PURE__ */ P(function(a, u) {
        this.ranges = a, this.primIndex = u;
      }, "Selection");
      fo.prototype.primary = function() {
        return this.ranges[this.primIndex];
      }, fo.prototype.equals = function(a) {
        if (a == this)
          return !0;
        if (a.primIndex != this.primIndex || a.ranges.length != this.ranges.length)
          return !1;
        for (var u = 0; u < this.ranges.length; u++) {
          var h = this.ranges[u], p = a.ranges[u];
          if (!ee(h.anchor, p.anchor) || !ee(h.head, p.head))
            return !1;
        }
        return !0;
      }, fo.prototype.deepCopy = function() {
        for (var a = [], u = 0; u < this.ranges.length; u++)
          a[u] = new wt(me(this.ranges[u].anchor), me(this.ranges[u].head));
        return new fo(a, this.primIndex);
      }, fo.prototype.somethingSelected = function() {
        for (var a = 0; a < this.ranges.length; a++)
          if (!this.ranges[a].empty())
            return !0;
        return !1;
      }, fo.prototype.contains = function(a, u) {
        u || (u = a);
        for (var h = 0; h < this.ranges.length; h++) {
          var p = this.ranges[h];
          if (j(u, p.from()) >= 0 && j(a, p.to()) <= 0)
            return h;
        }
        return -1;
      };
      var wt = /* @__PURE__ */ P(function(a, u) {
        this.anchor = a, this.head = u;
      }, "Range");
      wt.prototype.from = function() {
        return Je(this.anchor, this.head);
      }, wt.prototype.to = function() {
        return Se(this.anchor, this.head);
      }, wt.prototype.empty = function() {
        return this.head.line == this.anchor.line && this.head.ch == this.anchor.ch;
      };
      function jo(a, u, h) {
        var p = a && a.options.selectionsMayTouch, y = u[h];
        u.sort(function(se, oe) {
          return j(se.from(), oe.from());
        }), h = le(u, y);
        for (var T = 1; T < u.length; T++) {
          var O = u[T], L = u[T - 1], M = j(L.to(), O.from());
          if (p && !O.empty() ? M > 0 : M >= 0) {
            var V = Je(L.from(), O.from()), G = Se(L.to(), O.to()), X = L.empty() ? O.from() == O.head : L.from() == L.head;
            T <= h && --h, u.splice(--T, 2, new wt(X ? G : V, X ? V : G));
          }
        }
        return new fo(u, h);
      }
      P(jo, "normalizeSelection");
      function gs(a, u) {
        return new fo([new wt(a, u || a)], 0);
      }
      P(gs, "simpleSelection");
      function vs(a) {
        return a.text ? we(
          a.from.line + a.text.length - 1,
          Ve(a.text).length + (a.text.length == 1 ? a.from.ch : 0)
        ) : a.to;
      }
      P(vs, "changeEnd");
      function wb(a, u) {
        if (j(a, u.from) < 0)
          return a;
        if (j(a, u.to) <= 0)
          return vs(u);
        var h = a.line + u.text.length - (u.to.line - u.from.line) - 1, p = a.ch;
        return a.line == u.to.line && (p += vs(u).ch - u.to.ch), we(h, p);
      }
      P(wb, "adjustForChange");
      function _m(a, u) {
        for (var h = [], p = 0; p < a.sel.ranges.length; p++) {
          var y = a.sel.ranges[p];
          h.push(new wt(
            wb(y.anchor, u),
            wb(y.head, u)
          ));
        }
        return jo(a.cm, h, a.sel.primIndex);
      }
      P(_m, "computeSelAfterChange");
      function xb(a, u, h) {
        return a.line == u.line ? we(h.line, a.ch - u.ch + h.ch) : we(h.line + (a.line - u.line), a.ch);
      }
      P(xb, "offsetPos");
      function jN(a, u, h) {
        for (var p = [], y = we(a.first, 0), T = y, O = 0; O < u.length; O++) {
          var L = u[O], M = xb(L.from, y, T), V = xb(vs(L), y, T);
          if (y = L.to, T = V, h == "around") {
            var G = a.sel.ranges[O], X = j(G.head, G.anchor) < 0;
            p[O] = new wt(X ? V : M, X ? M : V);
          } else
            p[O] = new wt(M, M);
        }
        return new fo(p, a.sel.primIndex);
      }
      P(jN, "computeReplacedSel");
      function Nm(a) {
        a.doc.mode = sa(a.options, a.doc.modeOption), lu(a);
      }
      P(Nm, "loadMode");
      function lu(a) {
        a.doc.iter(function(u) {
          u.stateAfter && (u.stateAfter = null), u.styles && (u.styles = null);
        }), a.doc.modeFrontier = a.doc.highlightFrontier = a.doc.first, su(a, 100), a.state.modeGen++, a.curOp && yr(a);
      }
      P(lu, "resetModeState");
      function Sb(a, u) {
        return u.from.ch == 0 && u.to.ch == 0 && Ve(u.text) == "" && (!a.cm || a.cm.options.wholeLineUpdateBefore);
      }
      P(Sb, "isWholeLineUpdate");
      function Om(a, u, h, p) {
        function y(Le) {
          return h ? h[Le] : null;
        }
        P(y, "spansFor");
        function T(Le, De, Me) {
          Y_(Le, De, Me, p), kn(Le, "change", Le, u);
        }
        P(T, "update");
        function O(Le, De) {
          for (var Me = [], Ge = Le; Ge < De; ++Ge)
            Me.push(new Jc(V[Ge], y(Ge), p));
          return Me;
        }
        P(O, "linesFor");
        var L = u.from, M = u.to, V = u.text, G = Pe(a, L.line), X = Pe(a, M.line), se = Ve(V), oe = y(V.length - 1), pe = M.line - L.line;
        if (u.full)
          a.insert(0, O(0, V.length)), a.remove(V.length, a.size - V.length);
        else if (Sb(a, u)) {
          var ye = O(0, V.length - 1);
          T(X, X.text, oe), pe && a.remove(L.line, pe), ye.length && a.insert(L.line, ye);
        } else if (G == X)
          if (V.length == 1)
            T(G, G.text.slice(0, L.ch) + se + G.text.slice(M.ch), oe);
          else {
            var Ce = O(1, V.length - 1);
            Ce.push(new Jc(se + G.text.slice(M.ch), oe, p)), T(G, G.text.slice(0, L.ch) + V[0], y(0)), a.insert(L.line + 1, Ce);
          }
        else if (V.length == 1)
          T(G, G.text.slice(0, L.ch) + V[0] + X.text.slice(M.ch), y(0)), a.remove(L.line + 1, pe);
        else {
          T(G, G.text.slice(0, L.ch) + V[0], y(0)), T(X, se + X.text.slice(M.ch), oe);
          var Ae = O(1, V.length - 1);
          pe > 1 && a.remove(L.line + 1, pe - 1), a.insert(L.line + 1, Ae);
        }
        kn(a, "change", a, u);
      }
      P(Om, "updateDoc");
      function ys(a, u, h) {
        function p(y, T, O) {
          if (y.linked)
            for (var L = 0; L < y.linked.length; ++L) {
              var M = y.linked[L];
              if (M.doc != T) {
                var V = O && M.sharedHist;
                h && !V || (u(M.doc, V), p(M.doc, y, V));
              }
            }
        }
        P(p, "propagate"), p(a, null, !0);
      }
      P(ys, "linkedDocs");
      function Tb(a, u) {
        if (u.cm)
          throw new Error("This document is already in use.");
        a.doc = u, u.cm = a, pm(a), Nm(a), Cb(a), a.options.direction = u.direction, a.options.lineWrapping || nm(a), a.options.mode = u.modeOption, yr(a);
      }
      P(Tb, "attachDoc");
      function Cb(a) {
        (a.doc.direction == "rtl" ? K : q)(a.display.lineDiv, "CodeMirror-rtl");
      }
      P(Cb, "setDirectionClass");
      function UN(a) {
        Rr(a, function() {
          Cb(a), yr(a);
        });
      }
      P(UN, "directionChanged");
      function cd(a) {
        this.done = [], this.undone = [], this.undoDepth = a ? a.undoDepth : 1 / 0, this.lastModTime = this.lastSelTime = 0, this.lastOp = this.lastSelOp = null, this.lastOrigin = this.lastSelOrigin = null, this.generation = this.maxGeneration = a ? a.maxGeneration : 1;
      }
      P(cd, "History");
      function Am(a, u) {
        var h = { from: me(u.from), to: vs(u), text: Mo(a, u.from, u.to) };
        return Nb(a, h, u.from.line, u.to.line + 1), ys(a, function(p) {
          return Nb(p, h, u.from.line, u.to.line + 1);
        }, !0), h;
      }
      P(Am, "historyChangeFromChange");
      function kb(a) {
        for (; a.length; ) {
          var u = Ve(a);
          if (u.ranges)
            a.pop();
          else
            break;
        }
      }
      P(kb, "clearSelectionEvents");
      function BN(a, u) {
        if (u)
          return kb(a.done), Ve(a.done);
        if (a.done.length && !Ve(a.done).ranges)
          return Ve(a.done);
        if (a.done.length > 1 && !a.done[a.done.length - 2].ranges)
          return a.done.pop(), Ve(a.done);
      }
      P(BN, "lastChangeEvent");
      function _b(a, u, h, p) {
        var y = a.history;
        y.undone.length = 0;
        var T = +/* @__PURE__ */ new Date(), O, L;
        if ((y.lastOp == p || y.lastOrigin == u.origin && u.origin && (u.origin.charAt(0) == "+" && y.lastModTime > T - (a.cm ? a.cm.options.historyEventDelay : 500) || u.origin.charAt(0) == "*")) && (O = BN(y, y.lastOp == p)))
          L = Ve(O.changes), j(u.from, u.to) == 0 && j(u.from, L.to) == 0 ? L.to = vs(u) : O.changes.push(Am(a, u));
        else {
          var M = Ve(y.done);
          for ((!M || !M.ranges) && ud(a.sel, y.done), O = {
            changes: [Am(a, u)],
            generation: y.generation
          }, y.done.push(O); y.done.length > y.undoDepth; )
            y.done.shift(), y.done[0].ranges || y.done.shift();
        }
        y.done.push(h), y.generation = ++y.maxGeneration, y.lastModTime = y.lastSelTime = T, y.lastOp = y.lastSelOp = p, y.lastOrigin = y.lastSelOrigin = u.origin, L || Ke(a, "historyAdded");
      }
      P(_b, "addChangeToHistory");
      function qN(a, u, h, p) {
        var y = u.charAt(0);
        return y == "*" || y == "+" && h.ranges.length == p.ranges.length && h.somethingSelected() == p.somethingSelected() && /* @__PURE__ */ new Date() - a.history.lastSelTime <= (a.cm ? a.cm.options.historyEventDelay : 500);
      }
      P(qN, "selectionEventCanBeMerged");
      function zN(a, u, h, p) {
        var y = a.history, T = p && p.origin;
        h == y.lastSelOp || T && y.lastSelOrigin == T && (y.lastModTime == y.lastSelTime && y.lastOrigin == T || qN(a, T, Ve(y.done), u)) ? y.done[y.done.length - 1] = u : ud(u, y.done), y.lastSelTime = +/* @__PURE__ */ new Date(), y.lastSelOrigin = T, y.lastSelOp = h, p && p.clearRedo !== !1 && kb(y.undone);
      }
      P(zN, "addSelectionToHistory");
      function ud(a, u) {
        var h = Ve(u);
        h && h.ranges && h.equals(a) || u.push(a);
      }
      P(ud, "pushSelectionToHistory");
      function Nb(a, u, h, p) {
        var y = u["spans_" + a.id], T = 0;
        a.iter(Math.max(a.first, h), Math.min(a.first + a.size, p), function(O) {
          O.markedSpans && ((y || (y = u["spans_" + a.id] = {}))[T] = O.markedSpans), ++T;
        });
      }
      P(Nb, "attachLocalSpans");
      function HN(a) {
        if (!a)
          return null;
        for (var u, h = 0; h < a.length; ++h)
          a[h].marker.explicitlyCleared ? u || (u = a.slice(0, h)) : u && u.push(a[h]);
        return u ? u.length ? u : null : a;
      }
      P(HN, "removeClearedSpans");
      function WN(a, u) {
        var h = u["spans_" + a.id];
        if (!h)
          return null;
        for (var p = [], y = 0; y < u.text.length; ++y)
          p.push(HN(h[y]));
        return p;
      }
      P(WN, "getOldSpans");
      function Ob(a, u) {
        var h = WN(a, u), p = Xh(a, u);
        if (!h)
          return p;
        if (!p)
          return h;
        for (var y = 0; y < h.length; ++y) {
          var T = h[y], O = p[y];
          if (T && O)
            e:
              for (var L = 0; L < O.length; ++L) {
                for (var M = O[L], V = 0; V < T.length; ++V)
                  if (T[V].marker == M.marker)
                    continue e;
                T.push(M);
              }
          else
            O && (h[y] = O);
        }
        return h;
      }
      P(Ob, "mergeOldSpans");
      function Nl(a, u, h) {
        for (var p = [], y = 0; y < a.length; ++y) {
          var T = a[y];
          if (T.ranges) {
            p.push(h ? fo.prototype.deepCopy.call(T) : T);
            continue;
          }
          var O = T.changes, L = [];
          p.push({ changes: L });
          for (var M = 0; M < O.length; ++M) {
            var V = O[M], G = void 0;
            if (L.push({ from: V.from, to: V.to, text: V.text }), u)
              for (var X in V)
                (G = X.match(/^spans_(\d+)$/)) && le(u, Number(G[1])) > -1 && (Ve(L)[X] = V[X], delete V[X]);
          }
        }
        return p;
      }
      P(Nl, "copyHistoryArray");
      function Dm(a, u, h, p) {
        if (p) {
          var y = a.anchor;
          if (h) {
            var T = j(u, y) < 0;
            T != j(h, y) < 0 ? (y = u, u = h) : T != j(u, h) < 0 && (u = h);
          }
          return new wt(y, u);
        } else
          return new wt(h || u, u);
      }
      P(Dm, "extendRange");
      function fd(a, u, h, p, y) {
        y == null && (y = a.cm && (a.cm.display.shift || a.extend)), Wn(a, new fo([Dm(a.sel.primary(), u, h, y)], 0), p);
      }
      P(fd, "extendSelection");
      function Ab(a, u, h) {
        for (var p = [], y = a.cm && (a.cm.display.shift || a.extend), T = 0; T < a.sel.ranges.length; T++)
          p[T] = Dm(a.sel.ranges[T], u[T], null, y);
        var O = jo(a.cm, p, a.sel.primIndex);
        Wn(a, O, h);
      }
      P(Ab, "extendSelections");
      function Im(a, u, h, p) {
        var y = a.sel.ranges.slice(0);
        y[u] = h, Wn(a, jo(a.cm, y, a.sel.primIndex), p);
      }
      P(Im, "replaceOneSelection");
      function Db(a, u, h, p) {
        Wn(a, gs(u, h), p);
      }
      P(Db, "setSimpleSelection");
      function GN(a, u, h) {
        var p = {
          ranges: u.ranges,
          update: function(y) {
            this.ranges = [];
            for (var T = 0; T < y.length; T++)
              this.ranges[T] = new wt(
                Re(a, y[T].anchor),
                Re(a, y[T].head)
              );
          },
          origin: h && h.origin
        };
        return Ke(a, "beforeSelectionChange", a, p), a.cm && Ke(a.cm, "beforeSelectionChange", a.cm, p), p.ranges != u.ranges ? jo(a.cm, p.ranges, p.ranges.length - 1) : u;
      }
      P(GN, "filterSelectionChange");
      function Ib(a, u, h) {
        var p = a.history.done, y = Ve(p);
        y && y.ranges ? (p[p.length - 1] = u, dd(a, u, h)) : Wn(a, u, h);
      }
      P(Ib, "setSelectionReplaceHistory");
      function Wn(a, u, h) {
        dd(a, u, h), zN(a, a.sel, a.cm ? a.cm.curOp.id : NaN, h);
      }
      P(Wn, "setSelection");
      function dd(a, u, h) {
        (Cn(a, "beforeSelectionChange") || a.cm && Cn(a.cm, "beforeSelectionChange")) && (u = GN(a, u, h));
        var p = h && h.bias || (j(u.primary().head, a.sel.primary().head) < 0 ? -1 : 1);
        Lb(a, Fb(a, u, p, !0)), !(h && h.scroll === !1) && a.cm && a.cm.getOption("readOnly") != "nocursor" && Cl(a.cm);
      }
      P(dd, "setSelectionNoUndo");
      function Lb(a, u) {
        u.equals(a.sel) || (a.sel = u, a.cm && (a.cm.curOp.updateInput = 1, a.cm.curOp.selectionChanged = !0, ra(a.cm)), kn(a, "cursorActivity", a));
      }
      P(Lb, "setSelectionInner");
      function Rb(a) {
        Lb(a, Fb(a, a.sel, null, !1));
      }
      P(Rb, "reCheckSelection");
      function Fb(a, u, h, p) {
        for (var y, T = 0; T < u.ranges.length; T++) {
          var O = u.ranges[T], L = u.ranges.length == a.sel.ranges.length && a.sel.ranges[T], M = pd(a, O.anchor, L && L.anchor, h, p), V = pd(a, O.head, L && L.head, h, p);
          (y || M != O.anchor || V != O.head) && (y || (y = u.ranges.slice(0, T)), y[T] = new wt(M, V));
        }
        return y ? jo(a.cm, y, u.primIndex) : u;
      }
      P(Fb, "skipAtomicInSelection");
      function Ol(a, u, h, p, y) {
        var T = Pe(a, u.line);
        if (T.markedSpans)
          for (var O = 0; O < T.markedSpans.length; ++O) {
            var L = T.markedSpans[O], M = L.marker, V = "selectLeft" in M ? !M.selectLeft : M.inclusiveLeft, G = "selectRight" in M ? !M.selectRight : M.inclusiveRight;
            if ((L.from == null || (V ? L.from <= u.ch : L.from < u.ch)) && (L.to == null || (G ? L.to >= u.ch : L.to > u.ch))) {
              if (y && (Ke(M, "beforeCursorEnter"), M.explicitlyCleared))
                if (T.markedSpans) {
                  --O;
                  continue;
                } else
                  break;
              if (!M.atomic)
                continue;
              if (h) {
                var X = M.find(p < 0 ? 1 : -1), se = void 0;
                if ((p < 0 ? G : V) && (X = Mb(a, X, -p, X && X.line == u.line ? T : null)), X && X.line == u.line && (se = j(X, h)) && (p < 0 ? se < 0 : se > 0))
                  return Ol(a, X, u, p, y);
              }
              var oe = M.find(p < 0 ? -1 : 1);
              return (p < 0 ? V : G) && (oe = Mb(a, oe, p, oe.line == u.line ? T : null)), oe ? Ol(a, oe, u, p, y) : null;
            }
          }
        return u;
      }
      P(Ol, "skipAtomicInner");
      function pd(a, u, h, p, y) {
        var T = p || 1, O = Ol(a, u, h, T, y) || !y && Ol(a, u, h, T, !0) || Ol(a, u, h, -T, y) || !y && Ol(a, u, h, -T, !0);
        return O || (a.cantEdit = !0, we(a.first, 0));
      }
      P(pd, "skipAtomic");
      function Mb(a, u, h, p) {
        return h < 0 && u.ch == 0 ? u.line > a.first ? Re(a, we(u.line - 1)) : null : h > 0 && u.ch == (p || Pe(a, u.line)).text.length ? u.line < a.first + a.size - 1 ? we(u.line + 1, 0) : null : new we(u.line, u.ch + h);
      }
      P(Mb, "movePos");
      function Pb(a) {
        a.setSelection(we(a.firstLine(), 0), we(a.lastLine()), ge);
      }
      P(Pb, "selectAll");
      function $b(a, u, h) {
        var p = {
          canceled: !1,
          from: u.from,
          to: u.to,
          text: u.text,
          origin: u.origin,
          cancel: function() {
            return p.canceled = !0;
          }
        };
        return h && (p.update = function(y, T, O, L) {
          y && (p.from = Re(a, y)), T && (p.to = Re(a, T)), O && (p.text = O), L !== void 0 && (p.origin = L);
        }), Ke(a, "beforeChange", a, p), a.cm && Ke(a.cm, "beforeChange", a.cm, p), p.canceled ? (a.cm && (a.cm.curOp.updateInput = 2), null) : { from: p.from, to: p.to, text: p.text, origin: p.origin };
      }
      P($b, "filterChange");
      function Al(a, u, h) {
        if (a.cm) {
          if (!a.cm.curOp)
            return _n(a.cm, Al)(a, u, h);
          if (a.cm.state.suppressEdits)
            return;
        }
        if (!((Cn(a, "beforeChange") || a.cm && Cn(a.cm, "beforeChange")) && (u = $b(a, u, !0), !u))) {
          var p = $_ && !h && H_(a, u.from, u.to);
          if (p)
            for (var y = p.length - 1; y >= 0; --y)
              Vb(a, { from: p[y].from, to: p[y].to, text: y ? [""] : u.text, origin: u.origin });
          else
            Vb(a, u);
        }
      }
      P(Al, "makeChange");
      function Vb(a, u) {
        if (!(u.text.length == 1 && u.text[0] == "" && j(u.from, u.to) == 0)) {
          var h = _m(a, u);
          _b(a, u, h, a.cm ? a.cm.curOp.id : NaN), cu(a, u, h, Xh(a, u));
          var p = [];
          ys(a, function(y, T) {
            !T && le(p, y.history) == -1 && (qb(y.history, u), p.push(y.history)), cu(y, u, null, Xh(y, u));
          });
        }
      }
      P(Vb, "makeChangeInner");
      function hd(a, u, h) {
        var p = a.cm && a.cm.state.suppressEdits;
        if (!(p && !h)) {
          for (var y = a.history, T, O = a.sel, L = u == "undo" ? y.done : y.undone, M = u == "undo" ? y.undone : y.done, V = 0; V < L.length && (T = L[V], !(h ? T.ranges && !T.equals(a.sel) : !T.ranges)); V++)
            ;
          if (V != L.length) {
            for (y.lastOrigin = y.lastSelOrigin = null; ; )
              if (T = L.pop(), T.ranges) {
                if (ud(T, M), h && !T.equals(a.sel)) {
                  Wn(a, T, { clearRedo: !1 });
                  return;
                }
                O = T;
              } else if (p) {
                L.push(T);
                return;
              } else
                break;
            var G = [];
            ud(O, M), M.push({ changes: G, generation: y.generation }), y.generation = T.generation || ++y.maxGeneration;
            for (var X = Cn(a, "beforeChange") || a.cm && Cn(a.cm, "beforeChange"), se = /* @__PURE__ */ P(function(ye) {
              var Ce = T.changes[ye];
              if (Ce.origin = u, X && !$b(a, Ce, !1))
                return L.length = 0, {};
              G.push(Am(a, Ce));
              var Ae = ye ? _m(a, Ce) : Ve(L);
              cu(a, Ce, Ae, Ob(a, Ce)), !ye && a.cm && a.cm.scrollIntoView({ from: Ce.from, to: vs(Ce) });
              var Le = [];
              ys(a, function(De, Me) {
                !Me && le(Le, De.history) == -1 && (qb(De.history, Ce), Le.push(De.history)), cu(De, Ce, null, Ob(De, Ce));
              });
            }, "loop"), oe = T.changes.length - 1; oe >= 0; --oe) {
              var pe = se(oe);
              if (pe)
                return pe.v;
            }
          }
        }
      }
      P(hd, "makeChangeFromHistory");
      function jb(a, u) {
        if (u != 0 && (a.first += u, a.sel = new fo(At(a.sel.ranges, function(y) {
          return new wt(
            we(y.anchor.line + u, y.anchor.ch),
            we(y.head.line + u, y.head.ch)
          );
        }), a.sel.primIndex), a.cm)) {
          yr(a.cm, a.first, a.first - u, u);
          for (var h = a.cm.display, p = h.viewFrom; p < h.viewTo; p++)
            ps(a.cm, p, "gutter");
        }
      }
      P(jb, "shiftDoc");
      function cu(a, u, h, p) {
        if (a.cm && !a.cm.curOp)
          return _n(a.cm, cu)(a, u, h, p);
        if (u.to.line < a.first) {
          jb(a, u.text.length - 1 - (u.to.line - u.from.line));
          return;
        }
        if (!(u.from.line > a.lastLine())) {
          if (u.from.line < a.first) {
            var y = u.text.length - 1 - (a.first - u.from.line);
            jb(a, y), u = {
              from: we(a.first, 0),
              to: we(u.to.line + y, u.to.ch),
              text: [Ve(u.text)],
              origin: u.origin
            };
          }
          var T = a.lastLine();
          u.to.line > T && (u = {
            from: u.from,
            to: we(T, Pe(a, T).text.length),
            text: [u.text[0]],
            origin: u.origin
          }), u.removed = Mo(a, u.from, u.to), h || (h = _m(a, u)), a.cm ? QN(a.cm, u, p) : Om(a, u, p), dd(a, h, ge), a.cantEdit && pd(a, we(a.firstLine(), 0)) && (a.cantEdit = !1);
        }
      }
      P(cu, "makeChangeSingleDoc");
      function QN(a, u, h) {
        var p = a.doc, y = a.display, T = u.from, O = u.to, L = !1, M = T.line;
        a.options.lineWrapping || (M = yt($o(Pe(p, T.line))), p.iter(M, O.line + 1, function(oe) {
          if (oe == y.maxLine)
            return L = !0, !0;
        })), p.sel.contains(u.from, u.to) > -1 && ra(a), Om(p, u, h, sb(a)), a.options.lineWrapping || (p.iter(M, T.line + u.text.length, function(oe) {
          var pe = Jf(oe);
          pe > y.maxLineLength && (y.maxLine = oe, y.maxLineLength = pe, y.maxLineChanged = !0, L = !1);
        }), L && (a.curOp.updateMaxLine = !0)), P_(p, T.line), su(a, 400);
        var V = u.text.length - (O.line - T.line) - 1;
        u.full ? yr(a) : T.line == O.line && u.text.length == 1 && !Sb(a.doc, u) ? ps(a, T.line, "text") : yr(a, T.line, O.line + 1, V);
        var G = Cn(a, "changes"), X = Cn(a, "change");
        if (X || G) {
          var se = {
            from: T,
            to: O,
            text: u.text,
            removed: u.removed,
            origin: u.origin
          };
          X && kn(a, "change", a, se), G && (a.curOp.changeObjs || (a.curOp.changeObjs = [])).push(se);
        }
        a.display.selForContextMenu = null;
      }
      P(QN, "makeChangeSingleDocInEditor");
      function Dl(a, u, h, p, y) {
        var T;
        p || (p = h), j(p, h) < 0 && (T = [p, h], h = T[0], p = T[1]), typeof u == "string" && (u = a.splitLines(u)), Al(a, { from: h, to: p, text: u, origin: y });
      }
      P(Dl, "replaceRange");
      function Ub(a, u, h, p) {
        h < a.line ? a.line += p : u < a.line && (a.line = u, a.ch = 0);
      }
      P(Ub, "rebaseHistSelSingle");
      function Bb(a, u, h, p) {
        for (var y = 0; y < a.length; ++y) {
          var T = a[y], O = !0;
          if (T.ranges) {
            T.copied || (T = a[y] = T.deepCopy(), T.copied = !0);
            for (var L = 0; L < T.ranges.length; L++)
              Ub(T.ranges[L].anchor, u, h, p), Ub(T.ranges[L].head, u, h, p);
            continue;
          }
          for (var M = 0; M < T.changes.length; ++M) {
            var V = T.changes[M];
            if (h < V.from.line)
              V.from = we(V.from.line + p, V.from.ch), V.to = we(V.to.line + p, V.to.ch);
            else if (u <= V.to.line) {
              O = !1;
              break;
            }
          }
          O || (a.splice(0, y + 1), y = 0);
        }
      }
      P(Bb, "rebaseHistArray");
      function qb(a, u) {
        var h = u.from.line, p = u.to.line, y = u.text.length - (p - h) - 1;
        Bb(a.done, h, p, y), Bb(a.undone, h, p, y);
      }
      P(qb, "rebaseHist");
      function uu(a, u, h, p) {
        var y = u, T = u;
        return typeof u == "number" ? T = Pe(a, ft(a, u)) : y = yt(u), y == null ? null : (p(T, y) && a.cm && ps(a.cm, y, h), T);
      }
      P(uu, "changeLine");
      function fu(a) {
        this.lines = a, this.parent = null;
        for (var u = 0, h = 0; h < a.length; ++h)
          a[h].parent = this, u += a[h].height;
        this.height = u;
      }
      P(fu, "LeafChunk"), fu.prototype = {
        chunkSize: function() {
          return this.lines.length;
        },
        // Remove the n lines at offset 'at'.
        removeInner: function(a, u) {
          for (var h = a, p = a + u; h < p; ++h) {
            var y = this.lines[h];
            this.height -= y.height, K_(y), kn(y, "delete");
          }
          this.lines.splice(a, u);
        },
        // Helper used to collapse a small branch into a single leaf.
        collapse: function(a) {
          a.push.apply(a, this.lines);
        },
        // Insert the given array of lines at offset 'at', count them as
        // having the given height.
        insertInner: function(a, u, h) {
          this.height += h, this.lines = this.lines.slice(0, a).concat(u).concat(this.lines.slice(a));
          for (var p = 0; p < u.length; ++p)
            u[p].parent = this;
        },
        // Used to iterate over a part of the tree.
        iterN: function(a, u, h) {
          for (var p = a + u; a < p; ++a)
            if (h(this.lines[a]))
              return !0;
        }
      };
      function du(a) {
        this.children = a;
        for (var u = 0, h = 0, p = 0; p < a.length; ++p) {
          var y = a[p];
          u += y.chunkSize(), h += y.height, y.parent = this;
        }
        this.size = u, this.height = h, this.parent = null;
      }
      P(du, "BranchChunk"), du.prototype = {
        chunkSize: function() {
          return this.size;
        },
        removeInner: function(a, u) {
          this.size -= u;
          for (var h = 0; h < this.children.length; ++h) {
            var p = this.children[h], y = p.chunkSize();
            if (a < y) {
              var T = Math.min(u, y - a), O = p.height;
              if (p.removeInner(a, T), this.height -= O - p.height, y == T && (this.children.splice(h--, 1), p.parent = null), (u -= T) == 0)
                break;
              a = 0;
            } else
              a -= y;
          }
          if (this.size - u < 25 && (this.children.length > 1 || !(this.children[0] instanceof fu))) {
            var L = [];
            this.collapse(L), this.children = [new fu(L)], this.children[0].parent = this;
          }
        },
        collapse: function(a) {
          for (var u = 0; u < this.children.length; ++u)
            this.children[u].collapse(a);
        },
        insertInner: function(a, u, h) {
          this.size += u.length, this.height += h;
          for (var p = 0; p < this.children.length; ++p) {
            var y = this.children[p], T = y.chunkSize();
            if (a <= T) {
              if (y.insertInner(a, u, h), y.lines && y.lines.length > 50) {
                for (var O = y.lines.length % 25 + 25, L = O; L < y.lines.length; ) {
                  var M = new fu(y.lines.slice(L, L += 25));
                  y.height -= M.height, this.children.splice(++p, 0, M), M.parent = this;
                }
                y.lines = y.lines.slice(0, O), this.maybeSpill();
              }
              break;
            }
            a -= T;
          }
        },
        // When a node has grown, check whether it should be split.
        maybeSpill: function() {
          if (!(this.children.length <= 10)) {
            var a = this;
            do {
              var u = a.children.splice(a.children.length - 5, 5), h = new du(u);
              if (a.parent) {
                a.size -= h.size, a.height -= h.height;
                var p = le(a.parent.children, a);
                a.parent.children.splice(p + 1, 0, h);
              } else {
                var y = new du(a.children);
                y.parent = a, a.children = [y, h], a = y;
              }
              h.parent = a.parent;
            } while (a.children.length > 10);
            a.parent.maybeSpill();
          }
        },
        iterN: function(a, u, h) {
          for (var p = 0; p < this.children.length; ++p) {
            var y = this.children[p], T = y.chunkSize();
            if (a < T) {
              var O = Math.min(u, T - a);
              if (y.iterN(a, O, h))
                return !0;
              if ((u -= O) == 0)
                break;
              a = 0;
            } else
              a -= T;
          }
        }
      };
      var md = /* @__PURE__ */ P(function(a, u, h) {
        if (h)
          for (var p in h)
            h.hasOwnProperty(p) && (this[p] = h[p]);
        this.doc = a, this.node = u;
      }, "LineWidget");
      md.prototype.clear = function() {
        var a = this.doc.cm, u = this.line.widgets, h = this.line, p = yt(h);
        if (!(p == null || !u)) {
          for (var y = 0; y < u.length; ++y)
            u[y] == this && u.splice(y--, 1);
          u.length || (h.widgets = null);
          var T = eu(this);
          vr(h, Math.max(0, h.height - T)), a && (Rr(a, function() {
            zb(a, h, -T), ps(a, p, "widget");
          }), kn(a, "lineWidgetCleared", a, this, p));
        }
      }, md.prototype.changed = function() {
        var a = this, u = this.height, h = this.doc.cm, p = this.line;
        this.height = null;
        var y = eu(this) - u;
        y && (ds(this.doc, p) || vr(p, p.height + y), h && Rr(h, function() {
          h.curOp.forceUpdate = !0, zb(h, p, y), kn(h, "lineWidgetChanged", h, a, yt(p));
        }));
      }, Lo(md);
      function zb(a, u, h) {
        qi(u) < (a.curOp && a.curOp.scrollTop || a.doc.scrollTop) && bm(a, h);
      }
      P(zb, "adjustScrollWhenAboveVisible");
      function YN(a, u, h, p) {
        var y = new md(a, h, p), T = a.cm;
        return T && y.noHScroll && (T.display.alignWidgets = !0), uu(a, u, "widget", function(O) {
          var L = O.widgets || (O.widgets = []);
          if (y.insertAt == null ? L.push(y) : L.splice(Math.min(L.length, Math.max(0, y.insertAt)), 0, y), y.line = O, T && !ds(a, O)) {
            var M = qi(O) < a.scrollTop;
            vr(O, O.height + eu(y)), M && bm(T, y.height), T.curOp.forceUpdate = !0;
          }
          return !0;
        }), T && kn(T, "lineWidgetAdded", T, y, typeof u == "number" ? u : yt(u)), y;
      }
      P(YN, "addLineWidget");
      var KN = 0, pa = /* @__PURE__ */ P(function(a, u) {
        this.lines = [], this.type = u, this.doc = a, this.id = ++KN;
      }, "TextMarker");
      pa.prototype.clear = function() {
        if (!this.explicitlyCleared) {
          var a = this.doc.cm, u = a && !a.curOp;
          if (u && fa(a), Cn(this, "clear")) {
            var h = this.find();
            h && kn(this, "clear", h.from, h.to);
          }
          for (var p = null, y = null, T = 0; T < this.lines.length; ++T) {
            var O = this.lines[T], L = Kc(O.markedSpans, this);
            a && !this.collapsed ? ps(a, yt(O), "text") : a && (L.to != null && (y = yt(O)), L.from != null && (p = yt(O))), O.markedSpans = U_(O.markedSpans, L), L.from == null && this.collapsed && !ds(this.doc, O) && a && vr(O, xl(a.display));
          }
          if (a && this.collapsed && !a.options.lineWrapping)
            for (var M = 0; M < this.lines.length; ++M) {
              var V = $o(this.lines[M]), G = Jf(V);
              G > a.display.maxLineLength && (a.display.maxLine = V, a.display.maxLineLength = G, a.display.maxLineChanged = !0);
            }
          p != null && a && this.collapsed && yr(a, p, y + 1), this.lines.length = 0, this.explicitlyCleared = !0, this.atomic && this.doc.cantEdit && (this.doc.cantEdit = !1, a && Rb(a.doc)), a && kn(a, "markerCleared", a, this, p, y), u && da(a), this.parent && this.parent.clear();
        }
      }, pa.prototype.find = function(a, u) {
        a == null && this.type == "bookmark" && (a = 1);
        for (var h, p, y = 0; y < this.lines.length; ++y) {
          var T = this.lines[y], O = Kc(T.markedSpans, this);
          if (O.from != null && (h = we(u ? T : yt(T), O.from), a == -1))
            return h;
          if (O.to != null && (p = we(u ? T : yt(T), O.to), a == 1))
            return p;
        }
        return h && { from: h, to: p };
      }, pa.prototype.changed = function() {
        var a = this, u = this.find(-1, !0), h = this, p = this.doc.cm;
        !u || !p || Rr(p, function() {
          var y = u.line, T = yt(u.line), O = sm(p, T);
          if (O && (X1(O), p.curOp.selectionChanged = p.curOp.forceUpdate = !0), p.curOp.updateMaxLine = !0, !ds(h.doc, y) && h.height != null) {
            var L = h.height;
            h.height = null;
            var M = eu(h) - L;
            M && vr(y, y.height + M);
          }
          kn(p, "markerChanged", p, a);
        });
      }, pa.prototype.attachLine = function(a) {
        if (!this.lines.length && this.doc.cm) {
          var u = this.doc.cm.curOp;
          (!u.maybeHiddenMarkers || le(u.maybeHiddenMarkers, this) == -1) && (u.maybeUnhiddenMarkers || (u.maybeUnhiddenMarkers = [])).push(this);
        }
        this.lines.push(a);
      }, pa.prototype.detachLine = function(a) {
        if (this.lines.splice(le(this.lines, a), 1), !this.lines.length && this.doc.cm) {
          var u = this.doc.cm.curOp;
          (u.maybeHiddenMarkers || (u.maybeHiddenMarkers = [])).push(this);
        }
      }, Lo(pa);
      function Il(a, u, h, p, y) {
        if (p && p.shared)
          return JN(a, u, h, p, y);
        if (a.cm && !a.cm.curOp)
          return _n(a.cm, Il)(a, u, h, p, y);
        var T = new pa(a, y), O = j(u, h);
        if (p && ie(p, T, !1), O > 0 || O == 0 && T.clearWhenEmpty !== !1)
          return T;
        if (T.replacedWith && (T.collapsed = !0, T.widgetNode = R("span", [T.replacedWith], "CodeMirror-widget"), p.handleMouseEvents || T.widgetNode.setAttribute("cm-ignore-events", "true"), p.insertLeft && (T.widgetNode.insertLeft = !0)), T.collapsed) {
          if (P1(a, u.line, u, h, T) || u.line != h.line && P1(a, h.line, u, h, T))
            throw new Error("Inserting collapsed marker partially overlapping an existing one");
          j_();
        }
        T.addToHistory && _b(a, { from: u, to: h, origin: "markText" }, a.sel, NaN);
        var L = u.line, M = a.cm, V;
        if (a.iter(L, h.line + 1, function(X) {
          M && T.collapsed && !M.options.lineWrapping && $o(X) == M.display.maxLine && (V = !0), T.collapsed && L != u.line && vr(X, 0), B_(X, new Gf(
            T,
            L == u.line ? u.ch : null,
            L == h.line ? h.ch : null
          ), a.cm && a.cm.curOp), ++L;
        }), T.collapsed && a.iter(u.line, h.line + 1, function(X) {
          ds(a, X) && vr(X, 0);
        }), T.clearOnEnter && We(T, "beforeCursorEnter", function() {
          return T.clear();
        }), T.readOnly && (V_(), (a.history.done.length || a.history.undone.length) && a.clearHistory()), T.collapsed && (T.id = ++KN, T.atomic = !0), M) {
          if (V && (M.curOp.updateMaxLine = !0), T.collapsed)
            yr(M, u.line, h.line + 1);
          else if (T.className || T.startStyle || T.endStyle || T.css || T.attributes || T.title)
            for (var G = u.line; G <= h.line; G++)
              ps(M, G, "text");
          T.atomic && Rb(M.doc), kn(M, "markerAdded", M, T);
        }
        return T;
      }
      P(Il, "markText");
      var gd = /* @__PURE__ */ P(function(a, u) {
        this.markers = a, this.primary = u;
        for (var h = 0; h < a.length; ++h)
          a[h].parent = this;
      }, "SharedTextMarker");
      gd.prototype.clear = function() {
        if (!this.explicitlyCleared) {
          this.explicitlyCleared = !0;
          for (var a = 0; a < this.markers.length; ++a)
            this.markers[a].clear();
          kn(this, "clear");
        }
      }, gd.prototype.find = function(a, u) {
        return this.primary.find(a, u);
      }, Lo(gd);
      function JN(a, u, h, p, y) {
        p = ie(p), p.shared = !1;
        var T = [Il(a, u, h, p, y)], O = T[0], L = p.widgetNode;
        return ys(a, function(M) {
          L && (p.widgetNode = L.cloneNode(!0)), T.push(Il(M, Re(M, u), Re(M, h), p, y));
          for (var V = 0; V < M.linked.length; ++V)
            if (M.linked[V].isParent)
              return;
          O = Ve(T);
        }), new gd(T, O);
      }
      P(JN, "markTextShared");
      function Hb(a) {
        return a.findMarks(we(a.first, 0), a.clipPos(we(a.lastLine())), function(u) {
          return u.parent;
        });
      }
      P(Hb, "findSharedMarkers");
      function XN(a, u) {
        for (var h = 0; h < u.length; h++) {
          var p = u[h], y = p.find(), T = a.clipPos(y.from), O = a.clipPos(y.to);
          if (j(T, O)) {
            var L = Il(a, T, O, p.primary, p.primary.type);
            p.markers.push(L), L.parent = p;
          }
        }
      }
      P(XN, "copySharedMarkers");
      function ZN(a) {
        for (var u = /* @__PURE__ */ P(function(p) {
          var y = a[p], T = [y.primary.doc];
          ys(y.primary.doc, function(M) {
            return T.push(M);
          });
          for (var O = 0; O < y.markers.length; O++) {
            var L = y.markers[O];
            le(T, L.doc) == -1 && (L.parent = null, y.markers.splice(O--, 1));
          }
        }, "loop"), h = 0; h < a.length; h++)
          u(h);
      }
      P(ZN, "detachSharedMarkers");
      var $V = 0, Fr = /* @__PURE__ */ P(function(a, u, h, p, y) {
        if (!(this instanceof Fr))
          return new Fr(a, u, h, p, y);
        h == null && (h = 0), du.call(this, [new fu([new Jc("", null)])]), this.first = h, this.scrollTop = this.scrollLeft = 0, this.cantEdit = !1, this.cleanGeneration = 1, this.modeFrontier = this.highlightFrontier = h;
        var T = we(h, 0);
        this.sel = gs(T), this.history = new cd(null), this.id = ++$V, this.modeOption = u, this.lineSep = p, this.direction = y == "rtl" ? "rtl" : "ltr", this.extend = !1, typeof a == "string" && (a = this.splitLines(a)), Om(this, { from: T, to: T, text: a }), Wn(this, gs(T), ge);
      }, "Doc");
      Fr.prototype = hn(du.prototype, {
        constructor: Fr,
        // Iterate over the document. Supports two forms -- with only one
        // argument, it calls that for each line in the document. With
        // three, it iterates over the range given by the first two (with
        // the second being non-inclusive).
        iter: function(a, u, h) {
          h ? this.iterN(a - this.first, u - a, h) : this.iterN(this.first, this.first + this.size, a);
        },
        // Non-public interface for adding and removing lines.
        insert: function(a, u) {
          for (var h = 0, p = 0; p < u.length; ++p)
            h += u[p].height;
          this.insertInner(a - this.first, u, h);
        },
        remove: function(a, u) {
          this.removeInner(a - this.first, u);
        },
        // From here, the methods are part of the public interface. Most
        // are also available from CodeMirror (editor) instances.
        getValue: function(a) {
          var u = yl(this, this.first, this.first + this.size);
          return a === !1 ? u : u.join(a || this.lineSeparator());
        },
        setValue: Nn(function(a) {
          var u = we(this.first, 0), h = this.first + this.size - 1;
          Al(this, {
            from: u,
            to: we(h, Pe(this, h).text.length),
            text: this.splitLines(a),
            origin: "setValue",
            full: !0
          }, !0), this.cm && ru(this.cm, 0, 0), Wn(this, gs(u), ge);
        }),
        replaceRange: function(a, u, h, p) {
          u = Re(this, u), h = h ? Re(this, h) : u, Dl(this, a, u, h, p);
        },
        getRange: function(a, u, h) {
          var p = Mo(this, Re(this, a), Re(this, u));
          return h === !1 ? p : h === "" ? p.join("") : p.join(h || this.lineSeparator());
        },
        getLine: function(a) {
          var u = this.getLineHandle(a);
          return u && u.text;
        },
        getLineHandle: function(a) {
          if (us(this, a))
            return Pe(this, a);
        },
        getLineNumber: function(a) {
          return yt(a);
        },
        getLineHandleVisualStart: function(a) {
          return typeof a == "number" && (a = Pe(this, a)), $o(a);
        },
        lineCount: function() {
          return this.size;
        },
        firstLine: function() {
          return this.first;
        },
        lastLine: function() {
          return this.first + this.size - 1;
        },
        clipPos: function(a) {
          return Re(this, a);
        },
        getCursor: function(a) {
          var u = this.sel.primary(), h;
          return a == null || a == "head" ? h = u.head : a == "anchor" ? h = u.anchor : a == "end" || a == "to" || a === !1 ? h = u.to() : h = u.from(), h;
        },
        listSelections: function() {
          return this.sel.ranges;
        },
        somethingSelected: function() {
          return this.sel.somethingSelected();
        },
        setCursor: Nn(function(a, u, h) {
          Db(this, Re(this, typeof a == "number" ? we(a, u || 0) : a), null, h);
        }),
        setSelection: Nn(function(a, u, h) {
          Db(this, Re(this, a), Re(this, u || a), h);
        }),
        extendSelection: Nn(function(a, u, h) {
          fd(this, Re(this, a), u && Re(this, u), h);
        }),
        extendSelections: Nn(function(a, u) {
          Ab(this, eo(this, a), u);
        }),
        extendSelectionsBy: Nn(function(a, u) {
          var h = At(this.sel.ranges, a);
          Ab(this, eo(this, h), u);
        }),
        setSelections: Nn(function(a, u, h) {
          if (a.length) {
            for (var p = [], y = 0; y < a.length; y++)
              p[y] = new wt(
                Re(this, a[y].anchor),
                Re(this, a[y].head || a[y].anchor)
              );
            u == null && (u = Math.min(a.length - 1, this.sel.primIndex)), Wn(this, jo(this.cm, p, u), h);
          }
        }),
        addSelection: Nn(function(a, u, h) {
          var p = this.sel.ranges.slice(0);
          p.push(new wt(Re(this, a), Re(this, u || a))), Wn(this, jo(this.cm, p, p.length - 1), h);
        }),
        getSelection: function(a) {
          for (var u = this.sel.ranges, h, p = 0; p < u.length; p++) {
            var y = Mo(this, u[p].from(), u[p].to());
            h = h ? h.concat(y) : y;
          }
          return a === !1 ? h : h.join(a || this.lineSeparator());
        },
        getSelections: function(a) {
          for (var u = [], h = this.sel.ranges, p = 0; p < h.length; p++) {
            var y = Mo(this, h[p].from(), h[p].to());
            a !== !1 && (y = y.join(a || this.lineSeparator())), u[p] = y;
          }
          return u;
        },
        replaceSelection: function(a, u, h) {
          for (var p = [], y = 0; y < this.sel.ranges.length; y++)
            p[y] = a;
          this.replaceSelections(p, u, h || "+input");
        },
        replaceSelections: Nn(function(a, u, h) {
          for (var p = [], y = this.sel, T = 0; T < y.ranges.length; T++) {
            var O = y.ranges[T];
            p[T] = { from: O.from(), to: O.to(), text: this.splitLines(a[T]), origin: h };
          }
          for (var L = u && u != "end" && jN(this, p, u), M = p.length - 1; M >= 0; M--)
            Al(this, p[M]);
          L ? Ib(this, L) : this.cm && Cl(this.cm);
        }),
        undo: Nn(function() {
          hd(this, "undo");
        }),
        redo: Nn(function() {
          hd(this, "redo");
        }),
        undoSelection: Nn(function() {
          hd(this, "undo", !0);
        }),
        redoSelection: Nn(function() {
          hd(this, "redo", !0);
        }),
        setExtending: function(a) {
          this.extend = a;
        },
        getExtending: function() {
          return this.extend;
        },
        historySize: function() {
          for (var a = this.history, u = 0, h = 0, p = 0; p < a.done.length; p++)
            a.done[p].ranges || ++u;
          for (var y = 0; y < a.undone.length; y++)
            a.undone[y].ranges || ++h;
          return { undo: u, redo: h };
        },
        clearHistory: function() {
          var a = this;
          this.history = new cd(this.history), ys(this, function(u) {
            return u.history = a.history;
          }, !0);
        },
        markClean: function() {
          this.cleanGeneration = this.changeGeneration(!0);
        },
        changeGeneration: function(a) {
          return a && (this.history.lastOp = this.history.lastSelOp = this.history.lastOrigin = null), this.history.generation;
        },
        isClean: function(a) {
          return this.history.generation == (a || this.cleanGeneration);
        },
        getHistory: function() {
          return {
            done: Nl(this.history.done),
            undone: Nl(this.history.undone)
          };
        },
        setHistory: function(a) {
          var u = this.history = new cd(this.history);
          u.done = Nl(a.done.slice(0), null, !0), u.undone = Nl(a.undone.slice(0), null, !0);
        },
        setGutterMarker: Nn(function(a, u, h) {
          return uu(this, a, "gutter", function(p) {
            var y = p.gutterMarkers || (p.gutterMarkers = {});
            return y[u] = h, !h && Vc(y) && (p.gutterMarkers = null), !0;
          });
        }),
        clearGutter: Nn(function(a) {
          var u = this;
          this.iter(function(h) {
            h.gutterMarkers && h.gutterMarkers[a] && uu(u, h, "gutter", function() {
              return h.gutterMarkers[a] = null, Vc(h.gutterMarkers) && (h.gutterMarkers = null), !0;
            });
          });
        }),
        lineInfo: function(a) {
          var u;
          if (typeof a == "number") {
            if (!us(this, a) || (u = a, a = Pe(this, a), !a))
              return null;
          } else if (u = yt(a), u == null)
            return null;
          return {
            line: u,
            handle: a,
            text: a.text,
            gutterMarkers: a.gutterMarkers,
            textClass: a.textClass,
            bgClass: a.bgClass,
            wrapClass: a.wrapClass,
            widgets: a.widgets
          };
        },
        addLineClass: Nn(function(a, u, h) {
          return uu(this, a, u == "gutter" ? "gutter" : "class", function(p) {
            var y = u == "text" ? "textClass" : u == "background" ? "bgClass" : u == "gutter" ? "gutterClass" : "wrapClass";
            if (!p[y])
              p[y] = h;
            else {
              if ($(h).test(p[y]))
                return !1;
              p[y] += " " + h;
            }
            return !0;
          });
        }),
        removeLineClass: Nn(function(a, u, h) {
          return uu(this, a, u == "gutter" ? "gutter" : "class", function(p) {
            var y = u == "text" ? "textClass" : u == "background" ? "bgClass" : u == "gutter" ? "gutterClass" : "wrapClass", T = p[y];
            if (T)
              if (h == null)
                p[y] = null;
              else {
                var O = T.match($(h));
                if (!O)
                  return !1;
                var L = O.index + O[0].length;
                p[y] = T.slice(0, O.index) + (!O.index || L == T.length ? "" : " ") + T.slice(L) || null;
              }
            else
              return !1;
            return !0;
          });
        }),
        addLineWidget: Nn(function(a, u, h) {
          return YN(this, a, u, h);
        }),
        removeLineWidget: function(a) {
          a.clear();
        },
        markText: function(a, u, h) {
          return Il(this, Re(this, a), Re(this, u), h, h && h.type || "range");
        },
        setBookmark: function(a, u) {
          var h = {
            replacedWith: u && (u.nodeType == null ? u.widget : u),
            insertLeft: u && u.insertLeft,
            clearWhenEmpty: !1,
            shared: u && u.shared,
            handleMouseEvents: u && u.handleMouseEvents
          };
          return a = Re(this, a), Il(this, a, a, h, "bookmark");
        },
        findMarksAt: function(a) {
          a = Re(this, a);
          var u = [], h = Pe(this, a.line).markedSpans;
          if (h)
            for (var p = 0; p < h.length; ++p) {
              var y = h[p];
              (y.from == null || y.from <= a.ch) && (y.to == null || y.to >= a.ch) && u.push(y.marker.parent || y.marker);
            }
          return u;
        },
        findMarks: function(a, u, h) {
          a = Re(this, a), u = Re(this, u);
          var p = [], y = a.line;
          return this.iter(a.line, u.line + 1, function(T) {
            var O = T.markedSpans;
            if (O)
              for (var L = 0; L < O.length; L++) {
                var M = O[L];
                !(M.to != null && y == a.line && a.ch >= M.to || M.from == null && y != a.line || M.from != null && y == u.line && M.from >= u.ch) && (!h || h(M.marker)) && p.push(M.marker.parent || M.marker);
              }
            ++y;
          }), p;
        },
        getAllMarks: function() {
          var a = [];
          return this.iter(function(u) {
            var h = u.markedSpans;
            if (h)
              for (var p = 0; p < h.length; ++p)
                h[p].from != null && a.push(h[p].marker);
          }), a;
        },
        posFromIndex: function(a) {
          var u, h = this.first, p = this.lineSeparator().length;
          return this.iter(function(y) {
            var T = y.text.length + p;
            if (T > a)
              return u = a, !0;
            a -= T, ++h;
          }), Re(this, we(h, u));
        },
        indexFromPos: function(a) {
          a = Re(this, a);
          var u = a.ch;
          if (a.line < this.first || a.ch < 0)
            return 0;
          var h = this.lineSeparator().length;
          return this.iter(this.first, a.line, function(p) {
            u += p.text.length + h;
          }), u;
        },
        copy: function(a) {
          var u = new Fr(
            yl(this, this.first, this.first + this.size),
            this.modeOption,
            this.first,
            this.lineSep,
            this.direction
          );
          return u.scrollTop = this.scrollTop, u.scrollLeft = this.scrollLeft, u.sel = this.sel, u.extend = !1, a && (u.history.undoDepth = this.history.undoDepth, u.setHistory(this.getHistory())), u;
        },
        linkedDoc: function(a) {
          a || (a = {});
          var u = this.first, h = this.first + this.size;
          a.from != null && a.from > u && (u = a.from), a.to != null && a.to < h && (h = a.to);
          var p = new Fr(yl(this, u, h), a.mode || this.modeOption, u, this.lineSep, this.direction);
          return a.sharedHist && (p.history = this.history), (this.linked || (this.linked = [])).push({ doc: p, sharedHist: a.sharedHist }), p.linked = [{ doc: this, isParent: !0, sharedHist: a.sharedHist }], XN(p, Hb(this)), p;
        },
        unlinkDoc: function(a) {
          if (a instanceof Ft && (a = a.doc), this.linked)
            for (var u = 0; u < this.linked.length; ++u) {
              var h = this.linked[u];
              if (h.doc == a) {
                this.linked.splice(u, 1), a.unlinkDoc(this), ZN(Hb(this));
                break;
              }
            }
          if (a.history == this.history) {
            var p = [a.id];
            ys(a, function(y) {
              return p.push(y.id);
            }, !0), a.history = new cd(null), a.history.done = Nl(this.history.done, p), a.history.undone = Nl(this.history.undone, p);
          }
        },
        iterLinkedDocs: function(a) {
          ys(this, a);
        },
        getMode: function() {
          return this.mode;
        },
        getEditor: function() {
          return this.cm;
        },
        splitLines: function(a) {
          return this.lineSep ? a.split(this.lineSep) : Hc(a);
        },
        lineSeparator: function() {
          return this.lineSep || `
`;
        },
        setDirection: Nn(function(a) {
          a != "rtl" && (a = "ltr"), a != this.direction && (this.direction = a, this.iter(function(u) {
            return u.order = null;
          }), this.cm && UN(this.cm));
        })
      }), Fr.prototype.eachLine = Fr.prototype.iter;
      var eO = 0;
      function tO(a) {
        var u = this;
        if (Wb(u), !(tn(u, a) || zi(u.display, a))) {
          Ln(a), c && (eO = +/* @__PURE__ */ new Date());
          var h = la(u, a, !0), p = a.dataTransfer.files;
          if (!(!h || u.isReadOnly()))
            if (p && p.length && window.FileReader && window.File)
              for (var y = p.length, T = Array(y), O = 0, L = /* @__PURE__ */ P(function() {
                ++O == y && _n(u, function() {
                  h = Re(u.doc, h);
                  var oe = {
                    from: h,
                    to: h,
                    text: u.doc.splitLines(
                      T.filter(function(pe) {
                        return pe != null;
                      }).join(u.doc.lineSeparator())
                    ),
                    origin: "paste"
                  };
                  Al(u.doc, oe), Ib(u.doc, gs(Re(u.doc, h), Re(u.doc, vs(oe))));
                })();
              }, "markAsReadAndPasteIfAllFilesAreRead"), M = /* @__PURE__ */ P(function(oe, pe) {
                if (u.options.allowDropFileTypes && le(u.options.allowDropFileTypes, oe.type) == -1) {
                  L();
                  return;
                }
                var ye = new FileReader();
                ye.onerror = function() {
                  return L();
                }, ye.onload = function() {
                  var Ce = ye.result;
                  if (/[\x00-\x08\x0e-\x1f]{2}/.test(Ce)) {
                    L();
                    return;
                  }
                  T[pe] = Ce, L();
                }, ye.readAsText(oe);
              }, "readTextFromFile"), V = 0; V < p.length; V++)
                M(p[V], V);
            else {
              if (u.state.draggingText && u.doc.sel.contains(h) > -1) {
                u.state.draggingText(a), setTimeout(function() {
                  return u.display.input.focus();
                }, 20);
                return;
              }
              try {
                var G = a.dataTransfer.getData("Text");
                if (G) {
                  var X;
                  if (u.state.draggingText && !u.state.draggingText.copy && (X = u.listSelections()), dd(u.doc, gs(h, h)), X)
                    for (var se = 0; se < X.length; ++se)
                      Dl(u.doc, "", X[se].anchor, X[se].head, "drag");
                  u.replaceSelection(G, "around", "paste"), u.display.input.focus();
                }
              } catch {
              }
            }
        }
      }
      P(tO, "onDrop");
      function nO(a, u) {
        if (c && (!a.state.draggingText || +/* @__PURE__ */ new Date() - eO < 100)) {
          cs(u);
          return;
        }
        if (!(tn(a, u) || zi(a.display, u)) && (u.dataTransfer.setData("Text", a.getSelection()), u.dataTransfer.effectAllowed = "copyMove", u.dataTransfer.setDragImage && !b)) {
          var h = B("img", null, null, "position: fixed; left: 0; top: 0;");
          h.src = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==", v && (h.width = h.height = 1, a.display.wrapper.appendChild(h), h._top = h.offsetTop), u.dataTransfer.setDragImage(h, 0, 0), v && h.parentNode.removeChild(h);
        }
      }
      P(nO, "onDragStart");
      function rO(a, u) {
        var h = la(a, u);
        if (h) {
          var p = document.createDocumentFragment();
          hm(a, h, p), a.display.dragCursor || (a.display.dragCursor = B("div", null, "CodeMirror-cursors CodeMirror-dragcursors"), a.display.lineSpace.insertBefore(a.display.dragCursor, a.display.cursorDiv)), z(a.display.dragCursor, p);
        }
      }
      P(rO, "onDragOver");
      function Wb(a) {
        a.display.dragCursor && (a.display.lineSpace.removeChild(a.display.dragCursor), a.display.dragCursor = null);
      }
      P(Wb, "clearDragCursor");
      function Gb(a) {
        if (document.getElementsByClassName) {
          for (var u = document.getElementsByClassName("CodeMirror"), h = [], p = 0; p < u.length; p++) {
            var y = u[p].CodeMirror;
            y && h.push(y);
          }
          h.length && h[0].operation(function() {
            for (var T = 0; T < h.length; T++)
              a(h[T]);
          });
        }
      }
      P(Gb, "forEachCodeMirror");
      var oO = !1;
      function iO() {
        oO || (sO(), oO = !0);
      }
      P(iO, "ensureGlobalHandlers");
      function sO() {
        var a;
        We(window, "resize", function() {
          a == null && (a = setTimeout(function() {
            a = null, Gb(aO);
          }, 100));
        }), We(window, "blur", function() {
          return Gb(Tl);
        });
      }
      P(sO, "registerGlobalHandlers");
      function aO(a) {
        var u = a.display;
        u.cachedCharWidth = u.cachedTextHeight = u.cachedPaddingH = null, u.scrollbarsClipped = !1, a.setSize();
      }
      P(aO, "onResize");
      for (var ha = {
        3: "Pause",
        8: "Backspace",
        9: "Tab",
        13: "Enter",
        16: "Shift",
        17: "Ctrl",
        18: "Alt",
        19: "Pause",
        20: "CapsLock",
        27: "Esc",
        32: "Space",
        33: "PageUp",
        34: "PageDown",
        35: "End",
        36: "Home",
        37: "Left",
        38: "Up",
        39: "Right",
        40: "Down",
        44: "PrintScrn",
        45: "Insert",
        46: "Delete",
        59: ";",
        61: "=",
        91: "Mod",
        92: "Mod",
        93: "Mod",
        106: "*",
        107: "=",
        109: "-",
        110: ".",
        111: "/",
        145: "ScrollLock",
        173: "-",
        186: ";",
        187: "=",
        188: ",",
        189: "-",
        190: ".",
        191: "/",
        192: "`",
        219: "[",
        220: "\\",
        221: "]",
        222: "'",
        224: "Mod",
        63232: "Up",
        63233: "Down",
        63234: "Left",
        63235: "Right",
        63272: "Delete",
        63273: "Home",
        63275: "End",
        63276: "PageUp",
        63277: "PageDown",
        63302: "Insert"
      }, vd = 0; vd < 10; vd++)
        ha[vd + 48] = ha[vd + 96] = String(vd);
      for (var Lm = 65; Lm <= 90; Lm++)
        ha[Lm] = String.fromCharCode(Lm);
      for (var yd = 1; yd <= 12; yd++)
        ha[yd + 111] = ha[yd + 63235] = "F" + yd;
      var bs = {};
      bs.basic = {
        Left: "goCharLeft",
        Right: "goCharRight",
        Up: "goLineUp",
        Down: "goLineDown",
        End: "goLineEnd",
        Home: "goLineStartSmart",
        PageUp: "goPageUp",
        PageDown: "goPageDown",
        Delete: "delCharAfter",
        Backspace: "delCharBefore",
        "Shift-Backspace": "delCharBefore",
        Tab: "defaultTab",
        "Shift-Tab": "indentAuto",
        Enter: "newlineAndIndent",
        Insert: "toggleOverwrite",
        Esc: "singleSelection"
      }, bs.pcDefault = {
        "Ctrl-A": "selectAll",
        "Ctrl-D": "deleteLine",
        "Ctrl-Z": "undo",
        "Shift-Ctrl-Z": "redo",
        "Ctrl-Y": "redo",
        "Ctrl-Home": "goDocStart",
        "Ctrl-End": "goDocEnd",
        "Ctrl-Up": "goLineUp",
        "Ctrl-Down": "goLineDown",
        "Ctrl-Left": "goGroupLeft",
        "Ctrl-Right": "goGroupRight",
        "Alt-Left": "goLineStart",
        "Alt-Right": "goLineEnd",
        "Ctrl-Backspace": "delGroupBefore",
        "Ctrl-Delete": "delGroupAfter",
        "Ctrl-S": "save",
        "Ctrl-F": "find",
        "Ctrl-G": "findNext",
        "Shift-Ctrl-G": "findPrev",
        "Shift-Ctrl-F": "replace",
        "Shift-Ctrl-R": "replaceAll",
        "Ctrl-[": "indentLess",
        "Ctrl-]": "indentMore",
        "Ctrl-U": "undoSelection",
        "Shift-Ctrl-U": "redoSelection",
        "Alt-U": "redoSelection",
        fallthrough: "basic"
      }, bs.emacsy = {
        "Ctrl-F": "goCharRight",
        "Ctrl-B": "goCharLeft",
        "Ctrl-P": "goLineUp",
        "Ctrl-N": "goLineDown",
        "Ctrl-A": "goLineStart",
        "Ctrl-E": "goLineEnd",
        "Ctrl-V": "goPageDown",
        "Shift-Ctrl-V": "goPageUp",
        "Ctrl-D": "delCharAfter",
        "Ctrl-H": "delCharBefore",
        "Alt-Backspace": "delWordBefore",
        "Ctrl-K": "killLine",
        "Ctrl-T": "transposeChars",
        "Ctrl-O": "openLine"
      }, bs.macDefault = {
        "Cmd-A": "selectAll",
        "Cmd-D": "deleteLine",
        "Cmd-Z": "undo",
        "Shift-Cmd-Z": "redo",
        "Cmd-Y": "redo",
        "Cmd-Home": "goDocStart",
        "Cmd-Up": "goDocStart",
        "Cmd-End": "goDocEnd",
        "Cmd-Down": "goDocEnd",
        "Alt-Left": "goGroupLeft",
        "Alt-Right": "goGroupRight",
        "Cmd-Left": "goLineLeft",
        "Cmd-Right": "goLineRight",
        "Alt-Backspace": "delGroupBefore",
        "Ctrl-Alt-Backspace": "delGroupAfter",
        "Alt-Delete": "delGroupAfter",
        "Cmd-S": "save",
        "Cmd-F": "find",
        "Cmd-G": "findNext",
        "Shift-Cmd-G": "findPrev",
        "Cmd-Alt-F": "replace",
        "Shift-Cmd-Alt-F": "replaceAll",
        "Cmd-[": "indentLess",
        "Cmd-]": "indentMore",
        "Cmd-Backspace": "delWrappedLineLeft",
        "Cmd-Delete": "delWrappedLineRight",
        "Cmd-U": "undoSelection",
        "Shift-Cmd-U": "redoSelection",
        "Ctrl-Up": "goDocStart",
        "Ctrl-Down": "goDocEnd",
        fallthrough: ["basic", "emacsy"]
      }, bs.default = E ? bs.macDefault : bs.pcDefault;
      function lO(a) {
        var u = a.split(/-(?!$)/);
        a = u[u.length - 1];
        for (var h, p, y, T, O = 0; O < u.length - 1; O++) {
          var L = u[O];
          if (/^(cmd|meta|m)$/i.test(L))
            T = !0;
          else if (/^a(lt)?$/i.test(L))
            h = !0;
          else if (/^(c|ctrl|control)$/i.test(L))
            p = !0;
          else if (/^s(hift)?$/i.test(L))
            y = !0;
          else
            throw new Error("Unrecognized modifier name: " + L);
        }
        return h && (a = "Alt-" + a), p && (a = "Ctrl-" + a), T && (a = "Cmd-" + a), y && (a = "Shift-" + a), a;
      }
      P(lO, "normalizeKeyName");
      function cO(a) {
        var u = {};
        for (var h in a)
          if (a.hasOwnProperty(h)) {
            var p = a[h];
            if (/^(name|fallthrough|(de|at)tach)$/.test(h))
              continue;
            if (p == "...") {
              delete a[h];
              continue;
            }
            for (var y = At(h.split(" "), lO), T = 0; T < y.length; T++) {
              var O = void 0, L = void 0;
              T == y.length - 1 ? (L = y.join(" "), O = p) : (L = y.slice(0, T + 1).join(" "), O = "...");
              var M = u[L];
              if (!M)
                u[L] = O;
              else if (M != O)
                throw new Error("Inconsistent bindings for " + L);
            }
            delete a[h];
          }
        for (var V in u)
          a[V] = u[V];
        return a;
      }
      P(cO, "normalizeKeyMap");
      function Ll(a, u, h, p) {
        u = bd(u);
        var y = u.call ? u.call(a, p) : u[a];
        if (y === !1)
          return "nothing";
        if (y === "...")
          return "multi";
        if (y != null && h(y))
          return "handled";
        if (u.fallthrough) {
          if (Object.prototype.toString.call(u.fallthrough) != "[object Array]")
            return Ll(a, u.fallthrough, h, p);
          for (var T = 0; T < u.fallthrough.length; T++) {
            var O = Ll(a, u.fallthrough[T], h, p);
            if (O)
              return O;
          }
        }
      }
      P(Ll, "lookupKey");
      function Qb(a) {
        var u = typeof a == "string" ? a : ha[a.keyCode];
        return u == "Ctrl" || u == "Alt" || u == "Shift" || u == "Mod";
      }
      P(Qb, "isModifierKey");
      function Yb(a, u, h) {
        var p = a;
        return u.altKey && p != "Alt" && (a = "Alt-" + a), (A ? u.metaKey : u.ctrlKey) && p != "Ctrl" && (a = "Ctrl-" + a), (A ? u.ctrlKey : u.metaKey) && p != "Mod" && (a = "Cmd-" + a), !h && u.shiftKey && p != "Shift" && (a = "Shift-" + a), a;
      }
      P(Yb, "addModifierNames");
      function Kb(a, u) {
        if (v && a.keyCode == 34 && a.char)
          return !1;
        var h = ha[a.keyCode];
        return h == null || a.altGraphKey ? !1 : (a.keyCode == 3 && a.code && (h = a.code), Yb(h, a, u));
      }
      P(Kb, "keyName");
      function bd(a) {
        return typeof a == "string" ? bs[a] : a;
      }
      P(bd, "getKeyMap");
      function Rl(a, u) {
        for (var h = a.doc.sel.ranges, p = [], y = 0; y < h.length; y++) {
          for (var T = u(h[y]); p.length && j(T.from, Ve(p).to) <= 0; ) {
            var O = p.pop();
            if (j(O.from, T.from) < 0) {
              T.from = O.from;
              break;
            }
          }
          p.push(T);
        }
        Rr(a, function() {
          for (var L = p.length - 1; L >= 0; L--)
            Dl(a.doc, "", p[L].from, p[L].to, "+delete");
          Cl(a);
        });
      }
      P(Rl, "deleteNearSelection");
      function Rm(a, u, h) {
        var p = jc(a.text, u + h, h);
        return p < 0 || p > a.text.length ? null : p;
      }
      P(Rm, "moveCharLogically");
      function Fm(a, u, h) {
        var p = Rm(a, u.ch, h);
        return p == null ? null : new we(u.line, p, h < 0 ? "after" : "before");
      }
      P(Fm, "moveLogically");
      function Mm(a, u, h, p, y) {
        if (a) {
          u.doc.direction == "rtl" && (y = -y);
          var T = mr(h, u.doc.direction);
          if (T) {
            var O = y < 0 ? Ve(T) : T[0], L = y < 0 == (O.level == 1), M = L ? "after" : "before", V;
            if (O.level > 0 || u.doc.direction == "rtl") {
              var G = El(u, h);
              V = y < 0 ? h.text.length - 1 : 0;
              var X = ci(u, G, V).top;
              V = Io(function(se) {
                return ci(u, G, se).top == X;
              }, y < 0 == (O.level == 1) ? O.from : O.to - 1, V), M == "before" && (V = Rm(h, V, 1));
            } else
              V = y < 0 ? O.to : O.from;
            return new we(p, V, M);
          }
        }
        return new we(p, y < 0 ? h.text.length : 0, y < 0 ? "before" : "after");
      }
      P(Mm, "endOfLine");
      function uO(a, u, h, p) {
        var y = mr(u, a.doc.direction);
        if (!y)
          return Fm(u, h, p);
        h.ch >= u.text.length ? (h.ch = u.text.length, h.sticky = "before") : h.ch <= 0 && (h.ch = 0, h.sticky = "after");
        var T = jt(y, h.ch, h.sticky), O = y[T];
        if (a.doc.direction == "ltr" && O.level % 2 == 0 && (p > 0 ? O.to > h.ch : O.from < h.ch))
          return Fm(u, h, p);
        var L = /* @__PURE__ */ P(function(Ae, Le) {
          return Rm(u, Ae instanceof we ? Ae.ch : Ae, Le);
        }, "mv"), M, V = /* @__PURE__ */ P(function(Ae) {
          return a.options.lineWrapping ? (M = M || El(a, u), ib(a, u, M, Ae)) : { begin: 0, end: u.text.length };
        }, "getWrappedLineExtent"), G = V(h.sticky == "before" ? L(h, -1) : h.ch);
        if (a.doc.direction == "rtl" || O.level == 1) {
          var X = O.level == 1 == p < 0, se = L(h, X ? 1 : -1);
          if (se != null && (X ? se <= O.to && se <= G.end : se >= O.from && se >= G.begin)) {
            var oe = X ? "before" : "after";
            return new we(h.line, se, oe);
          }
        }
        var pe = /* @__PURE__ */ P(function(Ae, Le, De) {
          for (var Me = /* @__PURE__ */ P(function(Dt, Rn) {
            return Rn ? new we(h.line, L(Dt, 1), "before") : new we(h.line, Dt, "after");
          }, "getRes"); Ae >= 0 && Ae < y.length; Ae += Le) {
            var Ge = y[Ae], ze = Le > 0 == (Ge.level != 1), st = ze ? De.begin : L(De.end, -1);
            if (Ge.from <= st && st < Ge.to || (st = ze ? Ge.from : L(Ge.to, -1), De.begin <= st && st < De.end))
              return Me(st, ze);
          }
        }, "searchInVisualLine"), ye = pe(T + p, p, G);
        if (ye)
          return ye;
        var Ce = p > 0 ? G.end : L(G.begin, -1);
        return Ce != null && !(p > 0 && Ce == u.text.length) && (ye = pe(p > 0 ? 0 : y.length - 1, p, V(Ce)), ye) ? ye : null;
      }
      P(uO, "moveVisually");
      var Ed = {
        selectAll: Pb,
        singleSelection: function(a) {
          return a.setSelection(a.getCursor("anchor"), a.getCursor("head"), ge);
        },
        killLine: function(a) {
          return Rl(a, function(u) {
            if (u.empty()) {
              var h = Pe(a.doc, u.head.line).text.length;
              return u.head.ch == h && u.head.line < a.lastLine() ? { from: u.head, to: we(u.head.line + 1, 0) } : { from: u.head, to: we(u.head.line, h) };
            } else
              return { from: u.from(), to: u.to() };
          });
        },
        deleteLine: function(a) {
          return Rl(a, function(u) {
            return {
              from: we(u.from().line, 0),
              to: Re(a.doc, we(u.to().line + 1, 0))
            };
          });
        },
        delLineLeft: function(a) {
          return Rl(a, function(u) {
            return {
              from: we(u.from().line, 0),
              to: u.from()
            };
          });
        },
        delWrappedLineLeft: function(a) {
          return Rl(a, function(u) {
            var h = a.charCoords(u.head, "div").top + 5, p = a.coordsChar({ left: 0, top: h }, "div");
            return { from: p, to: u.from() };
          });
        },
        delWrappedLineRight: function(a) {
          return Rl(a, function(u) {
            var h = a.charCoords(u.head, "div").top + 5, p = a.coordsChar({ left: a.display.lineDiv.offsetWidth + 100, top: h }, "div");
            return { from: u.from(), to: p };
          });
        },
        undo: function(a) {
          return a.undo();
        },
        redo: function(a) {
          return a.redo();
        },
        undoSelection: function(a) {
          return a.undoSelection();
        },
        redoSelection: function(a) {
          return a.redoSelection();
        },
        goDocStart: function(a) {
          return a.extendSelection(we(a.firstLine(), 0));
        },
        goDocEnd: function(a) {
          return a.extendSelection(we(a.lastLine()));
        },
        goLineStart: function(a) {
          return a.extendSelectionsBy(
            function(u) {
              return Jb(a, u.head.line);
            },
            { origin: "+move", bias: 1 }
          );
        },
        goLineStartSmart: function(a) {
          return a.extendSelectionsBy(
            function(u) {
              return Xb(a, u.head);
            },
            { origin: "+move", bias: 1 }
          );
        },
        goLineEnd: function(a) {
          return a.extendSelectionsBy(
            function(u) {
              return fO(a, u.head.line);
            },
            { origin: "+move", bias: -1 }
          );
        },
        goLineRight: function(a) {
          return a.extendSelectionsBy(function(u) {
            var h = a.cursorCoords(u.head, "div").top + 5;
            return a.coordsChar({ left: a.display.lineDiv.offsetWidth + 100, top: h }, "div");
          }, Ie);
        },
        goLineLeft: function(a) {
          return a.extendSelectionsBy(function(u) {
            var h = a.cursorCoords(u.head, "div").top + 5;
            return a.coordsChar({ left: 0, top: h }, "div");
          }, Ie);
        },
        goLineLeftSmart: function(a) {
          return a.extendSelectionsBy(function(u) {
            var h = a.cursorCoords(u.head, "div").top + 5, p = a.coordsChar({ left: 0, top: h }, "div");
            return p.ch < a.getLine(p.line).search(/\S/) ? Xb(a, u.head) : p;
          }, Ie);
        },
        goLineUp: function(a) {
          return a.moveV(-1, "line");
        },
        goLineDown: function(a) {
          return a.moveV(1, "line");
        },
        goPageUp: function(a) {
          return a.moveV(-1, "page");
        },
        goPageDown: function(a) {
          return a.moveV(1, "page");
        },
        goCharLeft: function(a) {
          return a.moveH(-1, "char");
        },
        goCharRight: function(a) {
          return a.moveH(1, "char");
        },
        goColumnLeft: function(a) {
          return a.moveH(-1, "column");
        },
        goColumnRight: function(a) {
          return a.moveH(1, "column");
        },
        goWordLeft: function(a) {
          return a.moveH(-1, "word");
        },
        goGroupRight: function(a) {
          return a.moveH(1, "group");
        },
        goGroupLeft: function(a) {
          return a.moveH(-1, "group");
        },
        goWordRight: function(a) {
          return a.moveH(1, "word");
        },
        delCharBefore: function(a) {
          return a.deleteH(-1, "codepoint");
        },
        delCharAfter: function(a) {
          return a.deleteH(1, "char");
        },
        delWordBefore: function(a) {
          return a.deleteH(-1, "word");
        },
        delWordAfter: function(a) {
          return a.deleteH(1, "word");
        },
        delGroupBefore: function(a) {
          return a.deleteH(-1, "group");
        },
        delGroupAfter: function(a) {
          return a.deleteH(1, "group");
        },
        indentAuto: function(a) {
          return a.indentSelection("smart");
        },
        indentMore: function(a) {
          return a.indentSelection("add");
        },
        indentLess: function(a) {
          return a.indentSelection("subtract");
        },
        insertTab: function(a) {
          return a.replaceSelection("	");
        },
        insertSoftTab: function(a) {
          for (var u = [], h = a.listSelections(), p = a.options.tabSize, y = 0; y < h.length; y++) {
            var T = h[y].from(), O = ne(a.getLine(T.line), T.ch, p);
            u.push(Nt(p - O % p));
          }
          a.replaceSelections(u);
        },
        defaultTab: function(a) {
          a.somethingSelected() ? a.indentSelection("add") : a.execCommand("insertTab");
        },
        // Swap the two chars left and right of each selection's head.
        // Move cursor behind the two swapped characters afterwards.
        //
        // Doesn't consider line feeds a character.
        // Doesn't scan more than one line above to find a character.
        // Doesn't do anything on an empty line.
        // Doesn't do anything with non-empty selections.
        transposeChars: function(a) {
          return Rr(a, function() {
            for (var u = a.listSelections(), h = [], p = 0; p < u.length; p++)
              if (u[p].empty()) {
                var y = u[p].head, T = Pe(a.doc, y.line).text;
                if (T) {
                  if (y.ch == T.length && (y = new we(y.line, y.ch - 1)), y.ch > 0)
                    y = new we(y.line, y.ch + 1), a.replaceRange(
                      T.charAt(y.ch - 1) + T.charAt(y.ch - 2),
                      we(y.line, y.ch - 2),
                      y,
                      "+transpose"
                    );
                  else if (y.line > a.doc.first) {
                    var O = Pe(a.doc, y.line - 1).text;
                    O && (y = new we(y.line, 1), a.replaceRange(
                      T.charAt(0) + a.doc.lineSeparator() + O.charAt(O.length - 1),
                      we(y.line - 1, O.length - 1),
                      y,
                      "+transpose"
                    ));
                  }
                }
                h.push(new wt(y, y));
              }
            a.setSelections(h);
          });
        },
        newlineAndIndent: function(a) {
          return Rr(a, function() {
            for (var u = a.listSelections(), h = u.length - 1; h >= 0; h--)
              a.replaceRange(a.doc.lineSeparator(), u[h].anchor, u[h].head, "+input");
            u = a.listSelections();
            for (var p = 0; p < u.length; p++)
              a.indentLine(u[p].from().line, null, !0);
            Cl(a);
          });
        },
        openLine: function(a) {
          return a.replaceSelection(`
`, "start");
        },
        toggleOverwrite: function(a) {
          return a.toggleOverwrite();
        }
      };
      function Jb(a, u) {
        var h = Pe(a.doc, u), p = $o(h);
        return p != h && (u = yt(p)), Mm(!0, a, p, u, 1);
      }
      P(Jb, "lineStart");
      function fO(a, u) {
        var h = Pe(a.doc, u), p = G_(h);
        return p != h && (u = yt(p)), Mm(!0, a, h, u, -1);
      }
      P(fO, "lineEnd");
      function Xb(a, u) {
        var h = Jb(a, u.line), p = Pe(a.doc, h.line), y = mr(p, a.doc.direction);
        if (!y || y[0].level == 0) {
          var T = Math.max(h.ch, p.text.search(/\S/)), O = u.line == h.line && u.ch <= T && u.ch;
          return we(h.line, O ? 0 : T, h.sticky);
        }
        return h;
      }
      P(Xb, "lineStartSmart");
      function wd(a, u, h) {
        if (typeof u == "string" && (u = Ed[u], !u))
          return !1;
        a.display.input.ensurePolled();
        var p = a.display.shift, y = !1;
        try {
          a.isReadOnly() && (a.state.suppressEdits = !0), h && (a.display.shift = !1), y = u(a) != xe;
        } finally {
          a.display.shift = p, a.state.suppressEdits = !1;
        }
        return y;
      }
      P(wd, "doHandleBinding");
      function dO(a, u, h) {
        for (var p = 0; p < a.state.keyMaps.length; p++) {
          var y = Ll(u, a.state.keyMaps[p], h, a);
          if (y)
            return y;
        }
        return a.options.extraKeys && Ll(u, a.options.extraKeys, h, a) || Ll(u, a.options.keyMap, h, a);
      }
      P(dO, "lookupKeyForEditor");
      var VV = new ae();
      function pu(a, u, h, p) {
        var y = a.state.keySeq;
        if (y) {
          if (Qb(u))
            return "handled";
          if (/\'$/.test(u) ? a.state.keySeq = null : VV.set(50, function() {
            a.state.keySeq == y && (a.state.keySeq = null, a.display.input.reset());
          }), Zb(a, y + " " + u, h, p))
            return !0;
        }
        return Zb(a, u, h, p);
      }
      P(pu, "dispatchKey");
      function Zb(a, u, h, p) {
        var y = dO(a, u, p);
        return y == "multi" && (a.state.keySeq = u), y == "handled" && kn(a, "keyHandled", a, u, h), (y == "handled" || y == "multi") && (Ln(h), mm(a)), !!y;
      }
      P(Zb, "dispatchKeyInner");
      function eE(a, u) {
        var h = Kb(u, !0);
        return h ? u.shiftKey && !a.state.keySeq ? pu(a, "Shift-" + h, u, function(p) {
          return wd(a, p, !0);
        }) || pu(a, h, u, function(p) {
          if (typeof p == "string" ? /^go[A-Z]/.test(p) : p.motion)
            return wd(a, p);
        }) : pu(a, h, u, function(p) {
          return wd(a, p);
        }) : !1;
      }
      P(eE, "handleKeyBinding");
      function pO(a, u, h) {
        return pu(a, "'" + h + "'", u, function(p) {
          return wd(a, p, !0);
        });
      }
      P(pO, "handleCharBinding");
      var tE = null;
      function nE(a) {
        var u = this;
        if (!(a.target && a.target != u.display.input.getField()) && (u.curOp.focus = Y(), !tn(u, a))) {
          c && f < 11 && a.keyCode == 27 && (a.returnValue = !1);
          var h = a.keyCode;
          u.display.shift = h == 16 || a.shiftKey;
          var p = eE(u, a);
          v && (tE = p ? h : null, !p && h == 88 && !Wf && (E ? a.metaKey : a.ctrlKey) && u.replaceSelection("", null, "cut")), o && !E && !p && h == 46 && a.shiftKey && !a.ctrlKey && document.execCommand && document.execCommand("cut"), h == 18 && !/\bCodeMirror-crosshair\b/.test(u.display.lineDiv.className) && hO(u);
        }
      }
      P(nE, "onKeyDown");
      function hO(a) {
        var u = a.display.lineDiv;
        K(u, "CodeMirror-crosshair");
        function h(p) {
          (p.keyCode == 18 || !p.altKey) && (q(u, "CodeMirror-crosshair"), tr(document, "keyup", h), tr(document, "mouseover", h));
        }
        P(h, "up"), We(document, "keyup", h), We(document, "mouseover", h);
      }
      P(hO, "showCrossHair");
      function rE(a) {
        a.keyCode == 16 && (this.doc.sel.shift = !1), tn(this, a);
      }
      P(rE, "onKeyUp");
      function oE(a) {
        var u = this;
        if (!(a.target && a.target != u.display.input.getField()) && !(zi(u.display, a) || tn(u, a) || a.ctrlKey && !a.altKey || E && a.metaKey)) {
          var h = a.keyCode, p = a.charCode;
          if (v && h == tE) {
            tE = null, Ln(a);
            return;
          }
          if (!(v && (!a.which || a.which < 10) && eE(u, a))) {
            var y = String.fromCharCode(p ?? h);
            y != "\b" && (pO(u, a, y) || u.display.input.onKeyPress(a));
          }
        }
      }
      P(oE, "onKeyPress");
      var jV = 400, iE = /* @__PURE__ */ P(function(a, u, h) {
        this.time = a, this.pos = u, this.button = h;
      }, "PastClick");
      iE.prototype.compare = function(a, u, h) {
        return this.time + jV > a && j(u, this.pos) == 0 && h == this.button;
      };
      var xd, Sd;
      function mO(a, u) {
        var h = +/* @__PURE__ */ new Date();
        return Sd && Sd.compare(h, a, u) ? (xd = Sd = null, "triple") : xd && xd.compare(h, a, u) ? (Sd = new iE(h, a, u), xd = null, "double") : (xd = new iE(h, a, u), Sd = null, "single");
      }
      P(mO, "clickRepeat");
      function sE(a) {
        var u = this, h = u.display;
        if (!(tn(u, a) || h.activeTouch && h.input.supportsTouch())) {
          if (h.input.ensurePolled(), h.shift = a.shiftKey, zi(h, a)) {
            d || (h.scroller.draggable = !1, setTimeout(function() {
              return h.scroller.draggable = !0;
            }, 100));
            return;
          }
          if (!Pm(u, a)) {
            var p = la(u, a), y = Uc(a), T = p ? mO(p, y) : "single";
            window.focus(), y == 1 && u.state.selectingText && u.state.selectingText(a), !(p && gO(u, y, p, T, a)) && (y == 1 ? p ? yO(u, p, T, a) : ji(a) == h.scroller && Ln(a) : y == 2 ? (p && fd(u.doc, p), setTimeout(function() {
              return h.input.focus();
            }, 20)) : y == 3 && (F ? u.display.input.onContextMenu(a) : gm(u)));
          }
        }
      }
      P(sE, "onMouseDown");
      function gO(a, u, h, p, y) {
        var T = "Click";
        return p == "double" ? T = "Double" + T : p == "triple" && (T = "Triple" + T), T = (u == 1 ? "Left" : u == 2 ? "Middle" : "Right") + T, pu(a, Yb(T, y), y, function(O) {
          if (typeof O == "string" && (O = Ed[O]), !O)
            return !1;
          var L = !1;
          try {
            a.isReadOnly() && (a.state.suppressEdits = !0), L = O(a, h) != xe;
          } finally {
            a.state.suppressEdits = !1;
          }
          return L;
        });
      }
      P(gO, "handleMappedButton");
      function vO(a, u, h) {
        var p = a.getOption("configureMouse"), y = p ? p(a, u, h) : {};
        if (y.unit == null) {
          var T = N ? h.shiftKey && h.metaKey : h.altKey;
          y.unit = T ? "rectangle" : u == "single" ? "char" : u == "double" ? "word" : "line";
        }
        return (y.extend == null || a.doc.extend) && (y.extend = a.doc.extend || h.shiftKey), y.addNew == null && (y.addNew = E ? h.metaKey : h.ctrlKey), y.moveOnDrag == null && (y.moveOnDrag = !(E ? h.altKey : h.ctrlKey)), y;
      }
      P(vO, "configureMouse");
      function yO(a, u, h, p) {
        c ? setTimeout(J(cb, a), 0) : a.curOp.focus = Y();
        var y = vO(a, h, p), T = a.doc.sel, O;
        a.options.dragDrop && Bc && !a.isReadOnly() && h == "single" && (O = T.contains(u)) > -1 && (j((O = T.ranges[O]).from(), u) < 0 || u.xRel > 0) && (j(O.to(), u) > 0 || u.xRel < 0) ? bO(a, p, u, y) : EO(a, p, u, y);
      }
      P(yO, "leftButtonDown");
      function bO(a, u, h, p) {
        var y = a.display, T = !1, O = _n(a, function(V) {
          d && (y.scroller.draggable = !1), a.state.draggingText = !1, a.state.delayingBlurEvent && (a.hasFocus() ? a.state.delayingBlurEvent = !1 : gm(a)), tr(y.wrapper.ownerDocument, "mouseup", O), tr(y.wrapper.ownerDocument, "mousemove", L), tr(y.scroller, "dragstart", M), tr(y.scroller, "drop", O), T || (Ln(V), p.addNew || fd(a.doc, h, null, null, p.extend), d && !b || c && f == 9 ? setTimeout(function() {
            y.wrapper.ownerDocument.body.focus({ preventScroll: !0 }), y.input.focus();
          }, 20) : y.input.focus());
        }), L = /* @__PURE__ */ P(function(V) {
          T = T || Math.abs(u.clientX - V.clientX) + Math.abs(u.clientY - V.clientY) >= 10;
        }, "mouseMove"), M = /* @__PURE__ */ P(function() {
          return T = !0;
        }, "dragStart");
        d && (y.scroller.draggable = !0), a.state.draggingText = O, O.copy = !p.moveOnDrag, We(y.wrapper.ownerDocument, "mouseup", O), We(y.wrapper.ownerDocument, "mousemove", L), We(y.scroller, "dragstart", M), We(y.scroller, "drop", O), a.state.delayingBlurEvent = !0, setTimeout(function() {
          return y.input.focus();
        }, 20), y.scroller.dragDrop && y.scroller.dragDrop();
      }
      P(bO, "leftButtonStartDrag");
      function aE(a, u, h) {
        if (h == "char")
          return new wt(u, u);
        if (h == "word")
          return a.findWordAt(u);
        if (h == "line")
          return new wt(we(u.line, 0), Re(a.doc, we(u.line + 1, 0)));
        var p = h(a, u);
        return new wt(p.from, p.to);
      }
      P(aE, "rangeForUnit");
      function EO(a, u, h, p) {
        c && gm(a);
        var y = a.display, T = a.doc;
        Ln(u);
        var O, L, M = T.sel, V = M.ranges;
        if (p.addNew && !p.extend ? (L = T.sel.contains(h), L > -1 ? O = V[L] : O = new wt(h, h)) : (O = T.sel.primary(), L = T.sel.primIndex), p.unit == "rectangle")
          p.addNew || (O = new wt(h, h)), h = la(a, u, !0, !0), L = -1;
        else {
          var G = aE(a, h, p.unit);
          p.extend ? O = Dm(O, G.anchor, G.head, p.extend) : O = G;
        }
        p.addNew ? L == -1 ? (L = V.length, Wn(
          T,
          jo(a, V.concat([O]), L),
          { scroll: !1, origin: "*mouse" }
        )) : V.length > 1 && V[L].empty() && p.unit == "char" && !p.extend ? (Wn(
          T,
          jo(a, V.slice(0, L).concat(V.slice(L + 1)), 0),
          { scroll: !1, origin: "*mouse" }
        ), M = T.sel) : Im(T, L, O, qe) : (L = 0, Wn(T, new fo([O], 0), qe), M = T.sel);
        var X = h;
        function se(De) {
          if (j(X, De) != 0)
            if (X = De, p.unit == "rectangle") {
              for (var Me = [], Ge = a.options.tabSize, ze = ne(Pe(T, h.line).text, h.ch, Ge), st = ne(Pe(T, De.line).text, De.ch, Ge), Dt = Math.min(ze, st), Rn = Math.max(ze, st), Ut = Math.min(h.line, De.line), Mr = Math.min(a.lastLine(), Math.max(h.line, De.line)); Ut <= Mr; Ut++) {
                var Pr = Pe(T, Ut).text, mn = Oe(Pr, Dt, Ge);
                Dt == Rn ? Me.push(new wt(we(Ut, mn), we(Ut, mn))) : Pr.length > mn && Me.push(new wt(we(Ut, mn), we(Ut, Oe(Pr, Rn, Ge))));
              }
              Me.length || Me.push(new wt(h, h)), Wn(
                T,
                jo(a, M.ranges.slice(0, L).concat(Me), L),
                { origin: "*mouse", scroll: !1 }
              ), a.scrollIntoView(De);
            } else {
              var $r = O, Gn = aE(a, De, p.unit), On = $r.anchor, gn;
              j(Gn.anchor, On) > 0 ? (gn = Gn.head, On = Je($r.from(), Gn.anchor)) : (gn = Gn.anchor, On = Se($r.to(), Gn.head));
              var nn = M.ranges.slice(0);
              nn[L] = wO(a, new wt(Re(T, On), gn)), Wn(T, jo(a, nn, L), qe);
            }
        }
        P(se, "extendTo");
        var oe = y.wrapper.getBoundingClientRect(), pe = 0;
        function ye(De) {
          var Me = ++pe, Ge = la(a, De, !0, p.unit == "rectangle");
          if (Ge)
            if (j(Ge, X) != 0) {
              a.curOp.focus = Y(), se(Ge);
              var ze = sd(y, T);
              (Ge.line >= ze.to || Ge.line < ze.from) && setTimeout(_n(a, function() {
                pe == Me && ye(De);
              }), 150);
            } else {
              var st = De.clientY < oe.top ? -20 : De.clientY > oe.bottom ? 20 : 0;
              st && setTimeout(_n(a, function() {
                pe == Me && (y.scroller.scrollTop += st, ye(De));
              }), 50);
            }
        }
        P(ye, "extend");
        function Ce(De) {
          a.state.selectingText = !1, pe = 1 / 0, De && (Ln(De), y.input.focus()), tr(y.wrapper.ownerDocument, "mousemove", Ae), tr(y.wrapper.ownerDocument, "mouseup", Le), T.history.lastSelOrigin = null;
        }
        P(Ce, "done");
        var Ae = _n(a, function(De) {
          De.buttons === 0 || !Uc(De) ? Ce(De) : ye(De);
        }), Le = _n(a, Ce);
        a.state.selectingText = Le, We(y.wrapper.ownerDocument, "mousemove", Ae), We(y.wrapper.ownerDocument, "mouseup", Le);
      }
      P(EO, "leftButtonSelect");
      function wO(a, u) {
        var h = u.anchor, p = u.head, y = Pe(a.doc, h.line);
        if (j(h, p) == 0 && h.sticky == p.sticky)
          return u;
        var T = mr(y);
        if (!T)
          return u;
        var O = jt(T, h.ch, h.sticky), L = T[O];
        if (L.from != h.ch && L.to != h.ch)
          return u;
        var M = O + (L.from == h.ch == (L.level != 1) ? 0 : 1);
        if (M == 0 || M == T.length)
          return u;
        var V;
        if (p.line != h.line)
          V = (p.line - h.line) * (a.doc.direction == "ltr" ? 1 : -1) > 0;
        else {
          var G = jt(T, p.ch, p.sticky), X = G - O || (p.ch - h.ch) * (L.level == 1 ? -1 : 1);
          G == M - 1 || G == M ? V = X < 0 : V = X > 0;
        }
        var se = T[M + (V ? -1 : 0)], oe = V == (se.level == 1), pe = oe ? se.from : se.to, ye = oe ? "after" : "before";
        return h.ch == pe && h.sticky == ye ? u : new wt(new we(h.line, pe, ye), p);
      }
      P(wO, "bidiSimplify");
      function lE(a, u, h, p) {
        var y, T;
        if (u.touches)
          y = u.touches[0].clientX, T = u.touches[0].clientY;
        else
          try {
            y = u.clientX, T = u.clientY;
          } catch {
            return !1;
          }
        if (y >= Math.floor(a.display.gutters.getBoundingClientRect().right))
          return !1;
        p && Ln(u);
        var O = a.display, L = O.lineDiv.getBoundingClientRect();
        if (T > L.bottom || !Cn(a, h))
          return Lr(u);
        T -= L.top - O.viewOffset;
        for (var M = 0; M < a.display.gutterSpecs.length; ++M) {
          var V = O.gutters.childNodes[M];
          if (V && V.getBoundingClientRect().right >= y) {
            var G = Po(a.doc, T), X = a.display.gutterSpecs[M];
            return Ke(a, h, a, G, X.className, u), Lr(u);
          }
        }
      }
      P(lE, "gutterEvent");
      function Pm(a, u) {
        return lE(a, u, "gutterClick", !0);
      }
      P(Pm, "clickInGutter");
      function cE(a, u) {
        zi(a.display, u) || xO(a, u) || tn(a, u, "contextmenu") || F || a.display.input.onContextMenu(u);
      }
      P(cE, "onContextMenu");
      function xO(a, u) {
        return Cn(a, "gutterContextMenu") ? lE(a, u, "gutterContextMenu", !1) : !1;
      }
      P(xO, "contextMenuInGutter");
      function uE(a) {
        a.display.wrapper.className = a.display.wrapper.className.replace(/\s*cm-s-\S+/g, "") + a.options.theme.replace(/(^|\s)\s*/g, " cm-s-"), tu(a);
      }
      P(uE, "themeChanged");
      var hu = { toString: function() {
        return "CodeMirror.Init";
      } }, SO = {}, $m = {};
      function TO(a) {
        var u = a.optionHandlers;
        function h(p, y, T, O) {
          a.defaults[p] = y, T && (u[p] = O ? function(L, M, V) {
            V != hu && T(L, M, V);
          } : T);
        }
        P(h, "option"), a.defineOption = h, a.Init = hu, h("value", "", function(p, y) {
          return p.setValue(y);
        }, !0), h("mode", null, function(p, y) {
          p.doc.modeOption = y, Nm(p);
        }, !0), h("indentUnit", 2, Nm, !0), h("indentWithTabs", !1), h("smartIndent", !0), h("tabSize", 4, function(p) {
          lu(p), tu(p), yr(p);
        }, !0), h("lineSeparator", null, function(p, y) {
          if (p.doc.lineSep = y, !!y) {
            var T = [], O = p.doc.first;
            p.doc.iter(function(M) {
              for (var V = 0; ; ) {
                var G = M.text.indexOf(y, V);
                if (G == -1)
                  break;
                V = G + y.length, T.push(we(O, G));
              }
              O++;
            });
            for (var L = T.length - 1; L >= 0; L--)
              Dl(p.doc, y, T[L], we(T[L].line, T[L].ch + y.length));
          }
        }), h("specialChars", /[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g, function(p, y, T) {
          p.state.specialChars = new RegExp(y.source + (y.test("	") ? "" : "|	"), "g"), T != hu && p.refresh();
        }), h("specialCharPlaceholder", J_, function(p) {
          return p.refresh();
        }, !0), h("electricChars", !0), h("inputStyle", C ? "contenteditable" : "textarea", function() {
          throw new Error("inputStyle can not (yet) be changed in a running editor");
        }, !0), h("spellcheck", !1, function(p, y) {
          return p.getInputField().spellcheck = y;
        }, !0), h("autocorrect", !1, function(p, y) {
          return p.getInputField().autocorrect = y;
        }, !0), h("autocapitalize", !1, function(p, y) {
          return p.getInputField().autocapitalize = y;
        }, !0), h("rtlMoveVisually", !I), h("wholeLineUpdateBefore", !0), h("theme", "default", function(p) {
          uE(p), au(p);
        }, !0), h("keyMap", "default", function(p, y, T) {
          var O = bd(y), L = T != hu && bd(T);
          L && L.detach && L.detach(p, O), O.attach && O.attach(p, L || null);
        }), h("extraKeys", null), h("configureMouse", null), h("lineWrapping", !1, kO, !0), h("gutters", [], function(p, y) {
          p.display.gutterSpecs = Cm(y, p.options.lineNumbers), au(p);
        }, !0), h("fixedGutter", !0, function(p, y) {
          p.display.gutters.style.left = y ? dm(p.display) + "px" : "0", p.refresh();
        }, !0), h("coverGutterNextToScrollbar", !1, function(p) {
          return _l(p);
        }, !0), h("scrollbarStyle", "native", function(p) {
          hb(p), _l(p), p.display.scrollbars.setScrollTop(p.doc.scrollTop), p.display.scrollbars.setScrollLeft(p.doc.scrollLeft);
        }, !0), h("lineNumbers", !1, function(p, y) {
          p.display.gutterSpecs = Cm(p.options.gutters, y), au(p);
        }, !0), h("firstLineNumber", 1, au, !0), h("lineNumberFormatter", function(p) {
          return p;
        }, au, !0), h("showCursorWhenSelecting", !1, nu, !0), h("resetSelectionOnContextMenu", !0), h("lineWiseCopyCut", !0), h("pasteLinesPerSelection", !0), h("selectionsMayTouch", !1), h("readOnly", !1, function(p, y) {
          y == "nocursor" && (Tl(p), p.display.input.blur()), p.display.input.readOnlyChanged(y);
        }), h("screenReaderLabel", null, function(p, y) {
          y = y === "" ? null : y, p.display.input.screenReaderLabelChanged(y);
        }), h("disableInput", !1, function(p, y) {
          y || p.display.input.reset();
        }, !0), h("dragDrop", !0, CO), h("allowDropFileTypes", null), h("cursorBlinkRate", 530), h("cursorScrollMargin", 0), h("cursorHeight", 1, nu, !0), h("singleCursorHeightPerLine", !0, nu, !0), h("workTime", 100), h("workDelay", 100), h("flattenSpans", !0, lu, !0), h("addModeClass", !1, lu, !0), h("pollInterval", 100), h("undoDepth", 200, function(p, y) {
          return p.doc.history.undoDepth = y;
        }), h("historyEventDelay", 1250), h("viewportMargin", 10, function(p) {
          return p.refresh();
        }, !0), h("maxHighlightLength", 1e4, lu, !0), h("moveInputWithCursor", !0, function(p, y) {
          y || p.display.input.resetPosition();
        }), h("tabindex", null, function(p, y) {
          return p.display.input.getField().tabIndex = y || "";
        }), h("autofocus", null), h("direction", "ltr", function(p, y) {
          return p.doc.setDirection(y);
        }, !0), h("phrases", null);
      }
      P(TO, "defineOptions");
      function CO(a, u, h) {
        var p = h && h != hu;
        if (!u != !p) {
          var y = a.display.dragFunctions, T = u ? We : tr;
          T(a.display.scroller, "dragstart", y.start), T(a.display.scroller, "dragenter", y.enter), T(a.display.scroller, "dragover", y.over), T(a.display.scroller, "dragleave", y.leave), T(a.display.scroller, "drop", y.drop);
        }
      }
      P(CO, "dragDropChanged");
      function kO(a) {
        a.options.lineWrapping ? (K(a.display.wrapper, "CodeMirror-wrap"), a.display.sizer.style.minWidth = "", a.display.sizerWidth = null) : (q(a.display.wrapper, "CodeMirror-wrap"), nm(a)), pm(a), yr(a), tu(a), setTimeout(function() {
          return _l(a);
        }, 100);
      }
      P(kO, "wrappingChanged");
      function Ft(a, u) {
        var h = this;
        if (!(this instanceof Ft))
          return new Ft(a, u);
        this.options = u = u ? ie(u) : {}, ie(SO, u, !1);
        var p = u.value;
        typeof p == "string" ? p = new Fr(p, u.mode, null, u.lineSeparator, u.direction) : u.mode && (p.modeOption = u.mode), this.doc = p;
        var y = new Ft.inputStyles[u.inputStyle](this), T = this.display = new $N(a, p, y, u);
        T.wrapper.CodeMirror = this, uE(this), u.lineWrapping && (this.display.wrapper.className += " CodeMirror-wrap"), hb(this), this.state = {
          keyMaps: [],
          // stores maps added by addKeyMap
          overlays: [],
          // highlighting overlays, as added by addOverlay
          modeGen: 0,
          // bumped when mode/overlay changes, used to invalidate highlighting info
          overwrite: !1,
          delayingBlurEvent: !1,
          focused: !1,
          suppressEdits: !1,
          // used to disable editing during key handlers when in readOnly mode
          pasteIncoming: -1,
          cutIncoming: -1,
          // help recognize paste/cut edits in input.poll
          selectingText: !1,
          draggingText: !1,
          highlight: new ae(),
          // stores highlight worker timeout
          keySeq: null,
          // Unfinished key sequence
          specialChars: null
        }, u.autofocus && !C && T.input.focus(), c && f < 11 && setTimeout(function() {
          return h.display.input.reset(!0);
        }, 20), _O(this), iO(), fa(this), this.curOp.forceUpdate = !0, Tb(this, p), u.autofocus && !C || this.hasFocus() ? setTimeout(function() {
          h.hasFocus() && !h.state.focused && vm(h);
        }, 20) : Tl(this);
        for (var O in $m)
          $m.hasOwnProperty(O) && $m[O](this, u[O], hu);
        vb(this), u.finishInit && u.finishInit(this);
        for (var L = 0; L < fE.length; ++L)
          fE[L](this);
        da(this), d && u.lineWrapping && getComputedStyle(T.lineDiv).textRendering == "optimizelegibility" && (T.lineDiv.style.textRendering = "auto");
      }
      P(Ft, "CodeMirror"), Ft.defaults = SO, Ft.optionHandlers = $m;
      function _O(a) {
        var u = a.display;
        We(u.scroller, "mousedown", _n(a, sE)), c && f < 11 ? We(u.scroller, "dblclick", _n(a, function(M) {
          if (!tn(a, M)) {
            var V = la(a, M);
            if (!(!V || Pm(a, M) || zi(a.display, M))) {
              Ln(M);
              var G = a.findWordAt(V);
              fd(a.doc, G.anchor, G.head);
            }
          }
        })) : We(u.scroller, "dblclick", function(M) {
          return tn(a, M) || Ln(M);
        }), We(u.scroller, "contextmenu", function(M) {
          return cE(a, M);
        }), We(u.input.getField(), "contextmenu", function(M) {
          u.scroller.contains(M.target) || cE(a, M);
        });
        var h, p = { end: 0 };
        function y() {
          u.activeTouch && (h = setTimeout(function() {
            return u.activeTouch = null;
          }, 1e3), p = u.activeTouch, p.end = +/* @__PURE__ */ new Date());
        }
        P(y, "finishTouch");
        function T(M) {
          if (M.touches.length != 1)
            return !1;
          var V = M.touches[0];
          return V.radiusX <= 1 && V.radiusY <= 1;
        }
        P(T, "isMouseLikeTouchEvent");
        function O(M, V) {
          if (V.left == null)
            return !0;
          var G = V.left - M.left, X = V.top - M.top;
          return G * G + X * X > 20 * 20;
        }
        P(O, "farAway"), We(u.scroller, "touchstart", function(M) {
          if (!tn(a, M) && !T(M) && !Pm(a, M)) {
            u.input.ensurePolled(), clearTimeout(h);
            var V = +/* @__PURE__ */ new Date();
            u.activeTouch = {
              start: V,
              moved: !1,
              prev: V - p.end <= 300 ? p : null
            }, M.touches.length == 1 && (u.activeTouch.left = M.touches[0].pageX, u.activeTouch.top = M.touches[0].pageY);
          }
        }), We(u.scroller, "touchmove", function() {
          u.activeTouch && (u.activeTouch.moved = !0);
        }), We(u.scroller, "touchend", function(M) {
          var V = u.activeTouch;
          if (V && !zi(u, M) && V.left != null && !V.moved && /* @__PURE__ */ new Date() - V.start < 300) {
            var G = a.coordsChar(u.activeTouch, "page"), X;
            !V.prev || O(V, V.prev) ? X = new wt(G, G) : !V.prev.prev || O(V, V.prev.prev) ? X = a.findWordAt(G) : X = new wt(we(G.line, 0), Re(a.doc, we(G.line + 1, 0))), a.setSelection(X.anchor, X.head), a.focus(), Ln(M);
          }
          y();
        }), We(u.scroller, "touchcancel", y), We(u.scroller, "scroll", function() {
          u.scroller.clientHeight && (ou(a, u.scroller.scrollTop), ua(a, u.scroller.scrollLeft, !0), Ke(a, "scroll", a));
        }), We(u.scroller, "mousewheel", function(M) {
          return Eb(a, M);
        }), We(u.scroller, "DOMMouseScroll", function(M) {
          return Eb(a, M);
        }), We(u.wrapper, "scroll", function() {
          return u.wrapper.scrollTop = u.wrapper.scrollLeft = 0;
        }), u.dragFunctions = {
          enter: function(M) {
            tn(a, M) || cs(M);
          },
          over: function(M) {
            tn(a, M) || (rO(a, M), cs(M));
          },
          start: function(M) {
            return nO(a, M);
          },
          drop: _n(a, tO),
          leave: function(M) {
            tn(a, M) || Wb(a);
          }
        };
        var L = u.input.getField();
        We(L, "keyup", function(M) {
          return rE.call(a, M);
        }), We(L, "keydown", _n(a, nE)), We(L, "keypress", _n(a, oE)), We(L, "focus", function(M) {
          return vm(a, M);
        }), We(L, "blur", function(M) {
          return Tl(a, M);
        });
      }
      P(_O, "registerEventHandlers");
      var fE = [];
      Ft.defineInitHook = function(a) {
        return fE.push(a);
      };
      function mu(a, u, h, p) {
        var y = a.doc, T;
        h == null && (h = "add"), h == "smart" && (y.mode.indent ? T = Yc(a, u).state : h = "prev");
        var O = a.options.tabSize, L = Pe(y, u), M = ne(L.text, null, O);
        L.stateAfter && (L.stateAfter = null);
        var V = L.text.match(/^\s*/)[0], G;
        if (!p && !/\S/.test(L.text))
          G = 0, h = "not";
        else if (h == "smart" && (G = y.mode.indent(T, L.text.slice(V.length), L.text), G == xe || G > 150)) {
          if (!p)
            return;
          h = "prev";
        }
        h == "prev" ? u > y.first ? G = ne(Pe(y, u - 1).text, null, O) : G = 0 : h == "add" ? G = M + a.options.indentUnit : h == "subtract" ? G = M - a.options.indentUnit : typeof h == "number" && (G = M + h), G = Math.max(0, G);
        var X = "", se = 0;
        if (a.options.indentWithTabs)
          for (var oe = Math.floor(G / O); oe; --oe)
            se += O, X += "	";
        if (se < G && (X += Nt(G - se)), X != V)
          return Dl(y, X, we(u, 0), we(u, V.length), "+input"), L.stateAfter = null, !0;
        for (var pe = 0; pe < y.sel.ranges.length; pe++) {
          var ye = y.sel.ranges[pe];
          if (ye.head.line == u && ye.head.ch < V.length) {
            var Ce = we(u, V.length);
            Im(y, pe, new wt(Ce, Ce));
            break;
          }
        }
      }
      P(mu, "indentLine");
      var ui = null;
      function Td(a) {
        ui = a;
      }
      P(Td, "setLastCopied");
      function Vm(a, u, h, p, y) {
        var T = a.doc;
        a.display.shift = !1, p || (p = T.sel);
        var O = +/* @__PURE__ */ new Date() - 200, L = y == "paste" || a.state.pasteIncoming > O, M = Hc(u), V = null;
        if (L && p.ranges.length > 1)
          if (ui && ui.text.join(`
`) == u) {
            if (p.ranges.length % ui.text.length == 0) {
              V = [];
              for (var G = 0; G < ui.text.length; G++)
                V.push(T.splitLines(ui.text[G]));
            }
          } else
            M.length == p.ranges.length && a.options.pasteLinesPerSelection && (V = At(M, function(Ae) {
              return [Ae];
            }));
        for (var X = a.curOp.updateInput, se = p.ranges.length - 1; se >= 0; se--) {
          var oe = p.ranges[se], pe = oe.from(), ye = oe.to();
          oe.empty() && (h && h > 0 ? pe = we(pe.line, pe.ch - h) : a.state.overwrite && !L ? ye = we(ye.line, Math.min(Pe(T, ye.line).text.length, ye.ch + Ve(M).length)) : L && ui && ui.lineWise && ui.text.join(`
`) == M.join(`
`) && (pe = ye = we(pe.line, 0)));
          var Ce = {
            from: pe,
            to: ye,
            text: V ? V[se % V.length] : M,
            origin: y || (L ? "paste" : a.state.cutIncoming > O ? "cut" : "+input")
          };
          Al(a.doc, Ce), kn(a, "inputRead", a, Ce);
        }
        u && !L && pE(a, u), Cl(a), a.curOp.updateInput < 2 && (a.curOp.updateInput = X), a.curOp.typing = !0, a.state.pasteIncoming = a.state.cutIncoming = -1;
      }
      P(Vm, "applyTextInput");
      function dE(a, u) {
        var h = a.clipboardData && a.clipboardData.getData("Text");
        if (h)
          return a.preventDefault(), !u.isReadOnly() && !u.options.disableInput && Rr(u, function() {
            return Vm(u, h, 0, null, "paste");
          }), !0;
      }
      P(dE, "handlePaste");
      function pE(a, u) {
        if (!(!a.options.electricChars || !a.options.smartIndent))
          for (var h = a.doc.sel, p = h.ranges.length - 1; p >= 0; p--) {
            var y = h.ranges[p];
            if (!(y.head.ch > 100 || p && h.ranges[p - 1].head.line == y.head.line)) {
              var T = a.getModeAt(y.head), O = !1;
              if (T.electricChars) {
                for (var L = 0; L < T.electricChars.length; L++)
                  if (u.indexOf(T.electricChars.charAt(L)) > -1) {
                    O = mu(a, y.head.line, "smart");
                    break;
                  }
              } else
                T.electricInput && T.electricInput.test(Pe(a.doc, y.head.line).text.slice(0, y.head.ch)) && (O = mu(a, y.head.line, "smart"));
              O && kn(a, "electricInput", a, y.head.line);
            }
          }
      }
      P(pE, "triggerElectric");
      function hE(a) {
        for (var u = [], h = [], p = 0; p < a.doc.sel.ranges.length; p++) {
          var y = a.doc.sel.ranges[p].head.line, T = { anchor: we(y, 0), head: we(y + 1, 0) };
          h.push(T), u.push(a.getRange(T.anchor, T.head));
        }
        return { text: u, ranges: h };
      }
      P(hE, "copyableRanges");
      function mE(a, u, h, p) {
        a.setAttribute("autocorrect", h ? "" : "off"), a.setAttribute("autocapitalize", p ? "" : "off"), a.setAttribute("spellcheck", !!u);
      }
      P(mE, "disableBrowserMagic");
      function gE() {
        var a = B("textarea", null, null, "position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"), u = B("div", [a], null, "overflow: hidden; position: relative; width: 3px; height: 0px;");
        return d ? a.style.width = "1000px" : a.setAttribute("wrap", "off"), S && (a.style.border = "1px solid black"), mE(a), u;
      }
      P(gE, "hiddenTextarea");
      function NO(a) {
        var u = a.optionHandlers, h = a.helpers = {};
        a.prototype = {
          constructor: a,
          focus: function() {
            window.focus(), this.display.input.focus();
          },
          setOption: function(p, y) {
            var T = this.options, O = T[p];
            T[p] == y && p != "mode" || (T[p] = y, u.hasOwnProperty(p) && _n(this, u[p])(this, y, O), Ke(this, "optionChange", this, p));
          },
          getOption: function(p) {
            return this.options[p];
          },
          getDoc: function() {
            return this.doc;
          },
          addKeyMap: function(p, y) {
            this.state.keyMaps[y ? "push" : "unshift"](bd(p));
          },
          removeKeyMap: function(p) {
            for (var y = this.state.keyMaps, T = 0; T < y.length; ++T)
              if (y[T] == p || y[T].name == p)
                return y.splice(T, 1), !0;
          },
          addOverlay: nr(function(p, y) {
            var T = p.token ? p : a.getMode(this.options, p);
            if (T.startState)
              throw new Error("Overlays may not be stateful.");
            hr(
              this.state.overlays,
              {
                mode: T,
                modeSpec: p,
                opaque: y && y.opaque,
                priority: y && y.priority || 0
              },
              function(O) {
                return O.priority;
              }
            ), this.state.modeGen++, yr(this);
          }),
          removeOverlay: nr(function(p) {
            for (var y = this.state.overlays, T = 0; T < y.length; ++T) {
              var O = y[T].modeSpec;
              if (O == p || typeof p == "string" && O.name == p) {
                y.splice(T, 1), this.state.modeGen++, yr(this);
                return;
              }
            }
          }),
          indentLine: nr(function(p, y, T) {
            typeof y != "string" && typeof y != "number" && (y == null ? y = this.options.smartIndent ? "smart" : "prev" : y = y ? "add" : "subtract"), us(this.doc, p) && mu(this, p, y, T);
          }),
          indentSelection: nr(function(p) {
            for (var y = this.doc.sel.ranges, T = -1, O = 0; O < y.length; O++) {
              var L = y[O];
              if (L.empty())
                L.head.line > T && (mu(this, L.head.line, p, !0), T = L.head.line, O == this.doc.sel.primIndex && Cl(this));
              else {
                var M = L.from(), V = L.to(), G = Math.max(T, M.line);
                T = Math.min(this.lastLine(), V.line - (V.ch ? 0 : 1)) + 1;
                for (var X = G; X < T; ++X)
                  mu(this, X, p);
                var se = this.doc.sel.ranges;
                M.ch == 0 && y.length == se.length && se[O].from().ch > 0 && Im(this.doc, O, new wt(M, se[O].to()), ge);
              }
            }
          }),
          // Fetch the parser token for a given character. Useful for hacks
          // that want to inspect the mode state (say, for completion).
          getTokenAt: function(p, y) {
            return O1(this, p, y);
          },
          getLineTokens: function(p, y) {
            return O1(this, we(p), y, !0);
          },
          getTokenTypeAt: function(p) {
            p = Re(this.doc, p);
            var y = _1(this, Pe(this.doc, p.line)), T = 0, O = (y.length - 1) / 2, L = p.ch, M;
            if (L == 0)
              M = y[2];
            else
              for (; ; ) {
                var V = T + O >> 1;
                if ((V ? y[V * 2 - 1] : 0) >= L)
                  O = V;
                else if (y[V * 2 + 1] < L)
                  T = V + 1;
                else {
                  M = y[V * 2 + 2];
                  break;
                }
              }
            var G = M ? M.indexOf("overlay ") : -1;
            return G < 0 ? M : G == 0 ? null : M.slice(0, G - 1);
          },
          getModeAt: function(p) {
            var y = this.doc.mode;
            return y.innerMode ? a.innerMode(y, this.getTokenAt(p).state).mode : y;
          },
          getHelper: function(p, y) {
            return this.getHelpers(p, y)[0];
          },
          getHelpers: function(p, y) {
            var T = [];
            if (!h.hasOwnProperty(y))
              return T;
            var O = h[y], L = this.getModeAt(p);
            if (typeof L[y] == "string")
              O[L[y]] && T.push(O[L[y]]);
            else if (L[y])
              for (var M = 0; M < L[y].length; M++) {
                var V = O[L[y][M]];
                V && T.push(V);
              }
            else
              L.helperType && O[L.helperType] ? T.push(O[L.helperType]) : O[L.name] && T.push(O[L.name]);
            for (var G = 0; G < O._global.length; G++) {
              var X = O._global[G];
              X.pred(L, this) && le(T, X.val) == -1 && T.push(X.val);
            }
            return T;
          },
          getStateAfter: function(p, y) {
            var T = this.doc;
            return p = ft(T, p ?? T.first + T.size - 1), Yc(this, p + 1, y).state;
          },
          cursorCoords: function(p, y) {
            var T, O = this.doc.sel.primary();
            return p == null ? T = O.head : typeof p == "object" ? T = Re(this.doc, p) : T = p ? O.from() : O.to(), Vo(this, T, y || "page");
          },
          charCoords: function(p, y) {
            return nd(this, Re(this.doc, p), y || "page");
          },
          coordsChar: function(p, y) {
            return p = nb(this, p, y || "page"), cm(this, p.left, p.top);
          },
          lineAtHeight: function(p, y) {
            return p = nb(this, { top: p, left: 0 }, y || "page").top, Po(this.doc, p + this.display.viewOffset);
          },
          heightAtLine: function(p, y, T) {
            var O = !1, L;
            if (typeof p == "number") {
              var M = this.doc.first + this.doc.size - 1;
              p < this.doc.first ? p = this.doc.first : p > M && (p = M, O = !0), L = Pe(this.doc, p);
            } else
              L = p;
            return td(this, L, { top: 0, left: 0 }, y || "page", T || O).top + (O ? this.doc.height - qi(L) : 0);
          },
          defaultTextHeight: function() {
            return xl(this.display);
          },
          defaultCharWidth: function() {
            return Sl(this.display);
          },
          getViewport: function() {
            return { from: this.display.viewFrom, to: this.display.viewTo };
          },
          addWidget: function(p, y, T, O, L) {
            var M = this.display;
            p = Vo(this, Re(this.doc, p));
            var V = p.bottom, G = p.left;
            if (y.style.position = "absolute", y.setAttribute("cm-ignore-events", "true"), this.display.input.setUneditable(y), M.sizer.appendChild(y), O == "over")
              V = p.top;
            else if (O == "above" || O == "near") {
              var X = Math.max(M.wrapper.clientHeight, this.doc.height), se = Math.max(M.sizer.clientWidth, M.lineSpace.clientWidth);
              (O == "above" || p.bottom + y.offsetHeight > X) && p.top > y.offsetHeight ? V = p.top - y.offsetHeight : p.bottom + y.offsetHeight <= X && (V = p.bottom), G + y.offsetWidth > se && (G = se - y.offsetWidth);
            }
            y.style.top = V + "px", y.style.left = y.style.right = "", L == "right" ? (G = M.sizer.clientWidth - y.offsetWidth, y.style.right = "0px") : (L == "left" ? G = 0 : L == "middle" && (G = (M.sizer.clientWidth - y.offsetWidth) / 2), y.style.left = G + "px"), T && TN(this, { left: G, top: V, right: G + y.offsetWidth, bottom: V + y.offsetHeight });
          },
          triggerOnKeyDown: nr(nE),
          triggerOnKeyPress: nr(oE),
          triggerOnKeyUp: rE,
          triggerOnMouseDown: nr(sE),
          execCommand: function(p) {
            if (Ed.hasOwnProperty(p))
              return Ed[p].call(null, this);
          },
          triggerElectric: nr(function(p) {
            pE(this, p);
          }),
          findPosH: function(p, y, T, O) {
            var L = 1;
            y < 0 && (L = -1, y = -y);
            for (var M = Re(this.doc, p), V = 0; V < y && (M = jm(this.doc, M, L, T, O), !M.hitSide); ++V)
              ;
            return M;
          },
          moveH: nr(function(p, y) {
            var T = this;
            this.extendSelectionsBy(function(O) {
              return T.display.shift || T.doc.extend || O.empty() ? jm(T.doc, O.head, p, y, T.options.rtlMoveVisually) : p < 0 ? O.from() : O.to();
            }, Ie);
          }),
          deleteH: nr(function(p, y) {
            var T = this.doc.sel, O = this.doc;
            T.somethingSelected() ? O.replaceSelection("", null, "+delete") : Rl(this, function(L) {
              var M = jm(O, L.head, p, y, !1);
              return p < 0 ? { from: M, to: L.head } : { from: L.head, to: M };
            });
          }),
          findPosV: function(p, y, T, O) {
            var L = 1, M = O;
            y < 0 && (L = -1, y = -y);
            for (var V = Re(this.doc, p), G = 0; G < y; ++G) {
              var X = Vo(this, V, "div");
              if (M == null ? M = X.left : X.left = M, V = vE(this, X, L, T), V.hitSide)
                break;
            }
            return V;
          },
          moveV: nr(function(p, y) {
            var T = this, O = this.doc, L = [], M = !this.display.shift && !O.extend && O.sel.somethingSelected();
            if (O.extendSelectionsBy(function(G) {
              if (M)
                return p < 0 ? G.from() : G.to();
              var X = Vo(T, G.head, "div");
              G.goalColumn != null && (X.left = G.goalColumn), L.push(X.left);
              var se = vE(T, X, p, y);
              return y == "page" && G == O.sel.primary() && bm(T, nd(T, se, "div").top - X.top), se;
            }, Ie), L.length)
              for (var V = 0; V < O.sel.ranges.length; V++)
                O.sel.ranges[V].goalColumn = L[V];
          }),
          // Find the word at the given position (as returned by coordsChar).
          findWordAt: function(p) {
            var y = this.doc, T = Pe(y, p.line).text, O = p.ch, L = p.ch;
            if (T) {
              var M = this.getHelper(p, "wordChars");
              (p.sticky == "before" || L == T.length) && O ? --O : ++L;
              for (var V = T.charAt(O), G = ea(V, M) ? function(X) {
                return ea(X, M);
              } : /\s/.test(V) ? function(X) {
                return /\s/.test(X);
              } : function(X) {
                return !/\s/.test(X) && !ea(X);
              }; O > 0 && G(T.charAt(O - 1)); )
                --O;
              for (; L < T.length && G(T.charAt(L)); )
                ++L;
            }
            return new wt(we(p.line, O), we(p.line, L));
          },
          toggleOverwrite: function(p) {
            p != null && p == this.state.overwrite || ((this.state.overwrite = !this.state.overwrite) ? K(this.display.cursorDiv, "CodeMirror-overwrite") : q(this.display.cursorDiv, "CodeMirror-overwrite"), Ke(this, "overwriteToggle", this, this.state.overwrite));
          },
          hasFocus: function() {
            return this.display.input.getField() == Y();
          },
          isReadOnly: function() {
            return !!(this.options.readOnly || this.doc.cantEdit);
          },
          scrollTo: nr(function(p, y) {
            ru(this, p, y);
          }),
          getScrollInfo: function() {
            var p = this.display.scroller;
            return {
              left: p.scrollLeft,
              top: p.scrollTop,
              height: p.scrollHeight - li(this) - this.display.barHeight,
              width: p.scrollWidth - li(this) - this.display.barWidth,
              clientHeight: im(this),
              clientWidth: aa(this)
            };
          },
          scrollIntoView: nr(function(p, y) {
            p == null ? (p = { from: this.doc.sel.primary().head, to: null }, y == null && (y = this.options.cursorScrollMargin)) : typeof p == "number" ? p = { from: we(p, 0), to: null } : p.from == null && (p = { from: p, to: null }), p.to || (p.to = p.from), p.margin = y || 0, p.from.line != null ? CN(this, p) : fb(this, p.from, p.to, p.margin);
          }),
          setSize: nr(function(p, y) {
            var T = this, O = /* @__PURE__ */ P(function(M) {
              return typeof M == "number" || /^\d+$/.test(String(M)) ? M + "px" : M;
            }, "interpret");
            p != null && (this.display.wrapper.style.width = O(p)), y != null && (this.display.wrapper.style.height = O(y)), this.options.lineWrapping && Z1(this);
            var L = this.display.viewFrom;
            this.doc.iter(L, this.display.viewTo, function(M) {
              if (M.widgets) {
                for (var V = 0; V < M.widgets.length; V++)
                  if (M.widgets[V].noHScroll) {
                    ps(T, L, "widget");
                    break;
                  }
              }
              ++L;
            }), this.curOp.forceUpdate = !0, Ke(this, "refresh", this);
          }),
          operation: function(p) {
            return Rr(this, p);
          },
          startOperation: function() {
            return fa(this);
          },
          endOperation: function() {
            return da(this);
          },
          refresh: nr(function() {
            var p = this.display.cachedTextHeight;
            yr(this), this.curOp.forceUpdate = !0, tu(this), ru(this, this.doc.scrollLeft, this.doc.scrollTop), Sm(this.display), (p == null || Math.abs(p - xl(this.display)) > 0.5 || this.options.lineWrapping) && pm(this), Ke(this, "refresh", this);
          }),
          swapDoc: nr(function(p) {
            var y = this.doc;
            return y.cm = null, this.state.selectingText && this.state.selectingText(), Tb(this, p), tu(this), this.display.input.reset(), ru(this, p.scrollLeft, p.scrollTop), this.curOp.forceScroll = !0, kn(this, "swapDoc", this, y), y;
          }),
          phrase: function(p) {
            var y = this.options.phrases;
            return y && Object.prototype.hasOwnProperty.call(y, p) ? y[p] : p;
          },
          getInputField: function() {
            return this.display.input.getField();
          },
          getWrapperElement: function() {
            return this.display.wrapper;
          },
          getScrollerElement: function() {
            return this.display.scroller;
          },
          getGutterElement: function() {
            return this.display.gutters;
          }
        }, Lo(a), a.registerHelper = function(p, y, T) {
          h.hasOwnProperty(p) || (h[p] = a[p] = { _global: [] }), h[p][y] = T;
        }, a.registerGlobalHelper = function(p, y, T, O) {
          a.registerHelper(p, y, O), h[p]._global.push({ pred: T, val: O });
        };
      }
      P(NO, "addEditorMethods");
      function jm(a, u, h, p, y) {
        var T = u, O = h, L = Pe(a, u.line), M = y && a.direction == "rtl" ? -h : h;
        function V() {
          var Le = u.line + M;
          return Le < a.first || Le >= a.first + a.size ? !1 : (u = new we(Le, u.ch, u.sticky), L = Pe(a, Le));
        }
        P(V, "findNextLine");
        function G(Le) {
          var De;
          if (p == "codepoint") {
            var Me = L.text.charCodeAt(u.ch + (h > 0 ? 0 : -1));
            if (isNaN(Me))
              De = null;
            else {
              var Ge = h > 0 ? Me >= 55296 && Me < 56320 : Me >= 56320 && Me < 57343;
              De = new we(u.line, Math.max(0, Math.min(L.text.length, u.ch + h * (Ge ? 2 : 1))), -h);
            }
          } else
            y ? De = uO(a.cm, L, u, h) : De = Fm(L, u, h);
          if (De == null)
            if (!Le && V())
              u = Mm(y, a.cm, L, u.line, M);
            else
              return !1;
          else
            u = De;
          return !0;
        }
        if (P(G, "moveOnce"), p == "char" || p == "codepoint")
          G();
        else if (p == "column")
          G(!0);
        else if (p == "word" || p == "group")
          for (var X = null, se = p == "group", oe = a.cm && a.cm.getHelper(u, "wordChars"), pe = !0; !(h < 0 && !G(!pe)); pe = !1) {
            var ye = L.text.charAt(u.ch) || `
`, Ce = ea(ye, oe) ? "w" : se && ye == `
` ? "n" : !se || /\s/.test(ye) ? null : "p";
            if (se && !pe && !Ce && (Ce = "s"), X && X != Ce) {
              h < 0 && (h = 1, G(), u.sticky = "after");
              break;
            }
            if (Ce && (X = Ce), h > 0 && !G(!pe))
              break;
          }
        var Ae = pd(a, u, T, O, !0);
        return ee(T, Ae) && (Ae.hitSide = !0), Ae;
      }
      P(jm, "findPosH");
      function vE(a, u, h, p) {
        var y = a.doc, T = u.left, O;
        if (p == "page") {
          var L = Math.min(a.display.wrapper.clientHeight, window.innerHeight || document.documentElement.clientHeight), M = Math.max(L - 0.5 * xl(a.display), 3);
          O = (h > 0 ? u.bottom : u.top) + h * M;
        } else
          p == "line" && (O = h > 0 ? u.bottom + 3 : u.top - 3);
        for (var V; V = cm(a, T, O), !!V.outside; ) {
          if (h < 0 ? O <= 0 : O >= y.height) {
            V.hitSide = !0;
            break;
          }
          O += h * 5;
        }
        return V;
      }
      P(vE, "findPosV");
      var kt = /* @__PURE__ */ P(function(a) {
        this.cm = a, this.lastAnchorNode = this.lastAnchorOffset = this.lastFocusNode = this.lastFocusOffset = null, this.polling = new ae(), this.composing = null, this.gracePeriod = !1, this.readDOMTimeout = null;
      }, "ContentEditableInput");
      kt.prototype.init = function(a) {
        var u = this, h = this, p = h.cm, y = h.div = a.lineDiv;
        y.contentEditable = !0, mE(y, p.options.spellcheck, p.options.autocorrect, p.options.autocapitalize);
        function T(L) {
          for (var M = L.target; M; M = M.parentNode) {
            if (M == y)
              return !0;
            if (/\bCodeMirror-(?:line)?widget\b/.test(M.className))
              break;
          }
          return !1;
        }
        P(T, "belongsToInput"), We(y, "paste", function(L) {
          !T(L) || tn(p, L) || dE(L, p) || f <= 11 && setTimeout(_n(p, function() {
            return u.updateFromDOM();
          }), 20);
        }), We(y, "compositionstart", function(L) {
          u.composing = { data: L.data, done: !1 };
        }), We(y, "compositionupdate", function(L) {
          u.composing || (u.composing = { data: L.data, done: !1 });
        }), We(y, "compositionend", function(L) {
          u.composing && (L.data != u.composing.data && u.readFromDOMSoon(), u.composing.done = !0);
        }), We(y, "touchstart", function() {
          return h.forceCompositionEnd();
        }), We(y, "input", function() {
          u.composing || u.readFromDOMSoon();
        });
        function O(L) {
          if (!(!T(L) || tn(p, L))) {
            if (p.somethingSelected())
              Td({ lineWise: !1, text: p.getSelections() }), L.type == "cut" && p.replaceSelection("", null, "cut");
            else if (p.options.lineWiseCopyCut) {
              var M = hE(p);
              Td({ lineWise: !0, text: M.text }), L.type == "cut" && p.operation(function() {
                p.setSelections(M.ranges, 0, ge), p.replaceSelection("", null, "cut");
              });
            } else
              return;
            if (L.clipboardData) {
              L.clipboardData.clearData();
              var V = ui.text.join(`
`);
              if (L.clipboardData.setData("Text", V), L.clipboardData.getData("Text") == V) {
                L.preventDefault();
                return;
              }
            }
            var G = gE(), X = G.firstChild;
            p.display.lineSpace.insertBefore(G, p.display.lineSpace.firstChild), X.value = ui.text.join(`
`);
            var se = Y();
            re(X), setTimeout(function() {
              p.display.lineSpace.removeChild(G), se.focus(), se == y && h.showPrimarySelection();
            }, 50);
          }
        }
        P(O, "onCopyCut"), We(y, "copy", O), We(y, "cut", O);
      }, kt.prototype.screenReaderLabelChanged = function(a) {
        a ? this.div.setAttribute("aria-label", a) : this.div.removeAttribute("aria-label");
      }, kt.prototype.prepareSelection = function() {
        var a = lb(this.cm, !1);
        return a.focus = Y() == this.div, a;
      }, kt.prototype.showSelection = function(a, u) {
        !a || !this.cm.display.view.length || ((a.focus || u) && this.showPrimarySelection(), this.showMultipleSelections(a));
      }, kt.prototype.getSelection = function() {
        return this.cm.display.wrapper.ownerDocument.getSelection();
      }, kt.prototype.showPrimarySelection = function() {
        var a = this.getSelection(), u = this.cm, h = u.doc.sel.primary(), p = h.from(), y = h.to();
        if (u.display.viewTo == u.display.viewFrom || p.line >= u.display.viewTo || y.line < u.display.viewFrom) {
          a.removeAllRanges();
          return;
        }
        var T = Cd(u, a.anchorNode, a.anchorOffset), O = Cd(u, a.focusNode, a.focusOffset);
        if (!(T && !T.bad && O && !O.bad && j(Je(T, O), p) == 0 && j(Se(T, O), y) == 0)) {
          var L = u.display.view, M = p.line >= u.display.viewFrom && yE(u, p) || { node: L[0].measure.map[2], offset: 0 }, V = y.line < u.display.viewTo && yE(u, y);
          if (!V) {
            var G = L[L.length - 1].measure, X = G.maps ? G.maps[G.maps.length - 1] : G.map;
            V = { node: X[X.length - 1], offset: X[X.length - 2] - X[X.length - 3] };
          }
          if (!M || !V) {
            a.removeAllRanges();
            return;
          }
          var se = a.rangeCount && a.getRangeAt(0), oe;
          try {
            oe = te(M.node, M.offset, V.offset, V.node);
          } catch {
          }
          oe && (!o && u.state.focused ? (a.collapse(M.node, M.offset), oe.collapsed || (a.removeAllRanges(), a.addRange(oe))) : (a.removeAllRanges(), a.addRange(oe)), se && a.anchorNode == null ? a.addRange(se) : o && this.startGracePeriod()), this.rememberSelection();
        }
      }, kt.prototype.startGracePeriod = function() {
        var a = this;
        clearTimeout(this.gracePeriod), this.gracePeriod = setTimeout(function() {
          a.gracePeriod = !1, a.selectionChanged() && a.cm.operation(function() {
            return a.cm.curOp.selectionChanged = !0;
          });
        }, 20);
      }, kt.prototype.showMultipleSelections = function(a) {
        z(this.cm.display.cursorDiv, a.cursors), z(this.cm.display.selectionDiv, a.selection);
      }, kt.prototype.rememberSelection = function() {
        var a = this.getSelection();
        this.lastAnchorNode = a.anchorNode, this.lastAnchorOffset = a.anchorOffset, this.lastFocusNode = a.focusNode, this.lastFocusOffset = a.focusOffset;
      }, kt.prototype.selectionInEditor = function() {
        var a = this.getSelection();
        if (!a.rangeCount)
          return !1;
        var u = a.getRangeAt(0).commonAncestorContainer;
        return Q(this.div, u);
      }, kt.prototype.focus = function() {
        this.cm.options.readOnly != "nocursor" && ((!this.selectionInEditor() || Y() != this.div) && this.showSelection(this.prepareSelection(), !0), this.div.focus());
      }, kt.prototype.blur = function() {
        this.div.blur();
      }, kt.prototype.getField = function() {
        return this.div;
      }, kt.prototype.supportsTouch = function() {
        return !0;
      }, kt.prototype.receivedFocus = function() {
        var a = this, u = this;
        this.selectionInEditor() ? setTimeout(function() {
          return a.pollSelection();
        }, 20) : Rr(this.cm, function() {
          return u.cm.curOp.selectionChanged = !0;
        });
        function h() {
          u.cm.state.focused && (u.pollSelection(), u.polling.set(u.cm.options.pollInterval, h));
        }
        P(h, "poll"), this.polling.set(this.cm.options.pollInterval, h);
      }, kt.prototype.selectionChanged = function() {
        var a = this.getSelection();
        return a.anchorNode != this.lastAnchorNode || a.anchorOffset != this.lastAnchorOffset || a.focusNode != this.lastFocusNode || a.focusOffset != this.lastFocusOffset;
      }, kt.prototype.pollSelection = function() {
        if (!(this.readDOMTimeout != null || this.gracePeriod || !this.selectionChanged())) {
          var a = this.getSelection(), u = this.cm;
          if (x && m && this.cm.display.gutterSpecs.length && OO(a.anchorNode)) {
            this.cm.triggerOnKeyDown({ type: "keydown", keyCode: 8, preventDefault: Math.abs }), this.blur(), this.focus();
            return;
          }
          if (!this.composing) {
            this.rememberSelection();
            var h = Cd(u, a.anchorNode, a.anchorOffset), p = Cd(u, a.focusNode, a.focusOffset);
            h && p && Rr(u, function() {
              Wn(u.doc, gs(h, p), ge), (h.bad || p.bad) && (u.curOp.selectionChanged = !0);
            });
          }
        }
      }, kt.prototype.pollContent = function() {
        this.readDOMTimeout != null && (clearTimeout(this.readDOMTimeout), this.readDOMTimeout = null);
        var a = this.cm, u = a.display, h = a.doc.sel.primary(), p = h.from(), y = h.to();
        if (p.ch == 0 && p.line > a.firstLine() && (p = we(p.line - 1, Pe(a.doc, p.line - 1).length)), y.ch == Pe(a.doc, y.line).text.length && y.line < a.lastLine() && (y = we(y.line + 1, 0)), p.line < u.viewFrom || y.line > u.viewTo - 1)
          return !1;
        var T, O, L;
        p.line == u.viewFrom || (T = ca(a, p.line)) == 0 ? (O = yt(u.view[0].line), L = u.view[0].node) : (O = yt(u.view[T].line), L = u.view[T - 1].node.nextSibling);
        var M = ca(a, y.line), V, G;
        if (M == u.view.length - 1 ? (V = u.viewTo - 1, G = u.lineDiv.lastChild) : (V = yt(u.view[M + 1].line) - 1, G = u.view[M + 1].node.previousSibling), !L)
          return !1;
        for (var X = a.doc.splitLines(AO(a, L, G, O, V)), se = Mo(a.doc, we(O, 0), we(V, Pe(a.doc, V).text.length)); X.length > 1 && se.length > 1; )
          if (Ve(X) == Ve(se))
            X.pop(), se.pop(), V--;
          else if (X[0] == se[0])
            X.shift(), se.shift(), O++;
          else
            break;
        for (var oe = 0, pe = 0, ye = X[0], Ce = se[0], Ae = Math.min(ye.length, Ce.length); oe < Ae && ye.charCodeAt(oe) == Ce.charCodeAt(oe); )
          ++oe;
        for (var Le = Ve(X), De = Ve(se), Me = Math.min(
          Le.length - (X.length == 1 ? oe : 0),
          De.length - (se.length == 1 ? oe : 0)
        ); pe < Me && Le.charCodeAt(Le.length - pe - 1) == De.charCodeAt(De.length - pe - 1); )
          ++pe;
        if (X.length == 1 && se.length == 1 && O == p.line)
          for (; oe && oe > p.ch && Le.charCodeAt(Le.length - pe - 1) == De.charCodeAt(De.length - pe - 1); )
            oe--, pe++;
        X[X.length - 1] = Le.slice(0, Le.length - pe).replace(/^\u200b+/, ""), X[0] = X[0].slice(oe).replace(/\u200b+$/, "");
        var Ge = we(O, oe), ze = we(V, se.length ? Ve(se).length - pe : 0);
        if (X.length > 1 || X[0] || j(Ge, ze))
          return Dl(a.doc, X, Ge, ze, "+input"), !0;
      }, kt.prototype.ensurePolled = function() {
        this.forceCompositionEnd();
      }, kt.prototype.reset = function() {
        this.forceCompositionEnd();
      }, kt.prototype.forceCompositionEnd = function() {
        this.composing && (clearTimeout(this.readDOMTimeout), this.composing = null, this.updateFromDOM(), this.div.blur(), this.div.focus());
      }, kt.prototype.readFromDOMSoon = function() {
        var a = this;
        this.readDOMTimeout == null && (this.readDOMTimeout = setTimeout(function() {
          if (a.readDOMTimeout = null, a.composing)
            if (a.composing.done)
              a.composing = null;
            else
              return;
          a.updateFromDOM();
        }, 80));
      }, kt.prototype.updateFromDOM = function() {
        var a = this;
        (this.cm.isReadOnly() || !this.pollContent()) && Rr(this.cm, function() {
          return yr(a.cm);
        });
      }, kt.prototype.setUneditable = function(a) {
        a.contentEditable = "false";
      }, kt.prototype.onKeyPress = function(a) {
        a.charCode == 0 || this.composing || (a.preventDefault(), this.cm.isReadOnly() || _n(this.cm, Vm)(this.cm, String.fromCharCode(a.charCode == null ? a.keyCode : a.charCode), 0));
      }, kt.prototype.readOnlyChanged = function(a) {
        this.div.contentEditable = String(a != "nocursor");
      }, kt.prototype.onContextMenu = function() {
      }, kt.prototype.resetPosition = function() {
      }, kt.prototype.needsContentAttribute = !0;
      function yE(a, u) {
        var h = sm(a, u.line);
        if (!h || h.hidden)
          return null;
        var p = Pe(a.doc, u.line), y = Y1(h, p, u.line), T = mr(p, a.doc.direction), O = "left";
        if (T) {
          var L = jt(T, u.ch);
          O = L % 2 ? "right" : "left";
        }
        var M = J1(y.map, u.ch, O);
        return M.offset = M.collapse == "right" ? M.end : M.start, M;
      }
      P(yE, "posToDOM");
      function OO(a) {
        for (var u = a; u; u = u.parentNode)
          if (/CodeMirror-gutter-wrapper/.test(u.className))
            return !0;
        return !1;
      }
      P(OO, "isInGutter");
      function Fl(a, u) {
        return u && (a.bad = !0), a;
      }
      P(Fl, "badPos");
      function AO(a, u, h, p, y) {
        var T = "", O = !1, L = a.doc.lineSeparator(), M = !1;
        function V(oe) {
          return function(pe) {
            return pe.id == oe;
          };
        }
        P(V, "recognizeMarker");
        function G() {
          O && (T += L, M && (T += L), O = M = !1);
        }
        P(G, "close");
        function X(oe) {
          oe && (G(), T += oe);
        }
        P(X, "addText");
        function se(oe) {
          if (oe.nodeType == 1) {
            var pe = oe.getAttribute("cm-text");
            if (pe) {
              X(pe);
              return;
            }
            var ye = oe.getAttribute("cm-marker"), Ce;
            if (ye) {
              var Ae = a.findMarks(we(p, 0), we(y + 1, 0), V(+ye));
              Ae.length && (Ce = Ae[0].find(0)) && X(Mo(a.doc, Ce.from, Ce.to).join(L));
              return;
            }
            if (oe.getAttribute("contenteditable") == "false")
              return;
            var Le = /^(pre|div|p|li|table|br)$/i.test(oe.nodeName);
            if (!/^br$/i.test(oe.nodeName) && oe.textContent.length == 0)
              return;
            Le && G();
            for (var De = 0; De < oe.childNodes.length; De++)
              se(oe.childNodes[De]);
            /^(pre|p)$/i.test(oe.nodeName) && (M = !0), Le && (O = !0);
          } else
            oe.nodeType == 3 && X(oe.nodeValue.replace(/\u200b/g, "").replace(/\u00a0/g, " "));
        }
        for (P(se, "walk"); se(u), u != h; )
          u = u.nextSibling, M = !1;
        return T;
      }
      P(AO, "domTextBetween");
      function Cd(a, u, h) {
        var p;
        if (u == a.display.lineDiv) {
          if (p = a.display.lineDiv.childNodes[h], !p)
            return Fl(a.clipPos(we(a.display.viewTo - 1)), !0);
          u = null, h = 0;
        } else
          for (p = u; ; p = p.parentNode) {
            if (!p || p == a.display.lineDiv)
              return null;
            if (p.parentNode && p.parentNode == a.display.lineDiv)
              break;
          }
        for (var y = 0; y < a.display.view.length; y++) {
          var T = a.display.view[y];
          if (T.node == p)
            return DO(T, u, h);
        }
      }
      P(Cd, "domToPos");
      function DO(a, u, h) {
        var p = a.text.firstChild, y = !1;
        if (!u || !Q(p, u))
          return Fl(we(yt(a.line), 0), !0);
        if (u == p && (y = !0, u = p.childNodes[h], h = 0, !u)) {
          var T = a.rest ? Ve(a.rest) : a.line;
          return Fl(we(yt(T), T.text.length), y);
        }
        var O = u.nodeType == 3 ? u : null, L = u;
        for (!O && u.childNodes.length == 1 && u.firstChild.nodeType == 3 && (O = u.firstChild, h && (h = O.nodeValue.length)); L.parentNode != p; )
          L = L.parentNode;
        var M = a.measure, V = M.maps;
        function G(Ce, Ae, Le) {
          for (var De = -1; De < (V ? V.length : 0); De++)
            for (var Me = De < 0 ? M.map : V[De], Ge = 0; Ge < Me.length; Ge += 3) {
              var ze = Me[Ge + 2];
              if (ze == Ce || ze == Ae) {
                var st = yt(De < 0 ? a.line : a.rest[De]), Dt = Me[Ge] + Le;
                return (Le < 0 || ze != Ce) && (Dt = Me[Ge + (Le ? 1 : 0)]), we(st, Dt);
              }
            }
        }
        P(G, "find");
        var X = G(O, L, h);
        if (X)
          return Fl(X, y);
        for (var se = L.nextSibling, oe = O ? O.nodeValue.length - h : 0; se; se = se.nextSibling) {
          if (X = G(se, se.firstChild, 0), X)
            return Fl(we(X.line, X.ch - oe), y);
          oe += se.textContent.length;
        }
        for (var pe = L.previousSibling, ye = h; pe; pe = pe.previousSibling) {
          if (X = G(pe, pe.firstChild, -1), X)
            return Fl(we(X.line, X.ch + ye), y);
          ye += pe.textContent.length;
        }
      }
      P(DO, "locateNodeInLineView");
      var un = /* @__PURE__ */ P(function(a) {
        this.cm = a, this.prevInput = "", this.pollingFast = !1, this.polling = new ae(), this.hasSelection = !1, this.composing = null;
      }, "TextareaInput");
      un.prototype.init = function(a) {
        var u = this, h = this, p = this.cm;
        this.createField(a);
        var y = this.textarea;
        a.wrapper.insertBefore(this.wrapper, a.wrapper.firstChild), S && (y.style.width = "0px"), We(y, "input", function() {
          c && f >= 9 && u.hasSelection && (u.hasSelection = null), h.poll();
        }), We(y, "paste", function(O) {
          tn(p, O) || dE(O, p) || (p.state.pasteIncoming = +/* @__PURE__ */ new Date(), h.fastPoll());
        });
        function T(O) {
          if (!tn(p, O)) {
            if (p.somethingSelected())
              Td({ lineWise: !1, text: p.getSelections() });
            else if (p.options.lineWiseCopyCut) {
              var L = hE(p);
              Td({ lineWise: !0, text: L.text }), O.type == "cut" ? p.setSelections(L.ranges, null, ge) : (h.prevInput = "", y.value = L.text.join(`
`), re(y));
            } else
              return;
            O.type == "cut" && (p.state.cutIncoming = +/* @__PURE__ */ new Date());
          }
        }
        P(T, "prepareCopyCut"), We(y, "cut", T), We(y, "copy", T), We(a.scroller, "paste", function(O) {
          if (!(zi(a, O) || tn(p, O))) {
            if (!y.dispatchEvent) {
              p.state.pasteIncoming = +/* @__PURE__ */ new Date(), h.focus();
              return;
            }
            var L = new Event("paste");
            L.clipboardData = O.clipboardData, y.dispatchEvent(L);
          }
        }), We(a.lineSpace, "selectstart", function(O) {
          zi(a, O) || Ln(O);
        }), We(y, "compositionstart", function() {
          var O = p.getCursor("from");
          h.composing && h.composing.range.clear(), h.composing = {
            start: O,
            range: p.markText(O, p.getCursor("to"), { className: "CodeMirror-composing" })
          };
        }), We(y, "compositionend", function() {
          h.composing && (h.poll(), h.composing.range.clear(), h.composing = null);
        });
      }, un.prototype.createField = function(a) {
        this.wrapper = gE(), this.textarea = this.wrapper.firstChild;
      }, un.prototype.screenReaderLabelChanged = function(a) {
        a ? this.textarea.setAttribute("aria-label", a) : this.textarea.removeAttribute("aria-label");
      }, un.prototype.prepareSelection = function() {
        var a = this.cm, u = a.display, h = a.doc, p = lb(a);
        if (a.options.moveInputWithCursor) {
          var y = Vo(a, h.sel.primary().head, "div"), T = u.wrapper.getBoundingClientRect(), O = u.lineDiv.getBoundingClientRect();
          p.teTop = Math.max(0, Math.min(
            u.wrapper.clientHeight - 10,
            y.top + O.top - T.top
          )), p.teLeft = Math.max(0, Math.min(
            u.wrapper.clientWidth - 10,
            y.left + O.left - T.left
          ));
        }
        return p;
      }, un.prototype.showSelection = function(a) {
        var u = this.cm, h = u.display;
        z(h.cursorDiv, a.cursors), z(h.selectionDiv, a.selection), a.teTop != null && (this.wrapper.style.top = a.teTop + "px", this.wrapper.style.left = a.teLeft + "px");
      }, un.prototype.reset = function(a) {
        if (!(this.contextMenuPending || this.composing)) {
          var u = this.cm;
          if (u.somethingSelected()) {
            this.prevInput = "";
            var h = u.getSelection();
            this.textarea.value = h, u.state.focused && re(this.textarea), c && f >= 9 && (this.hasSelection = h);
          } else
            a || (this.prevInput = this.textarea.value = "", c && f >= 9 && (this.hasSelection = null));
        }
      }, un.prototype.getField = function() {
        return this.textarea;
      }, un.prototype.supportsTouch = function() {
        return !1;
      }, un.prototype.focus = function() {
        if (this.cm.options.readOnly != "nocursor" && (!C || Y() != this.textarea))
          try {
            this.textarea.focus();
          } catch {
          }
      }, un.prototype.blur = function() {
        this.textarea.blur();
      }, un.prototype.resetPosition = function() {
        this.wrapper.style.top = this.wrapper.style.left = 0;
      }, un.prototype.receivedFocus = function() {
        this.slowPoll();
      }, un.prototype.slowPoll = function() {
        var a = this;
        this.pollingFast || this.polling.set(this.cm.options.pollInterval, function() {
          a.poll(), a.cm.state.focused && a.slowPoll();
        });
      }, un.prototype.fastPoll = function() {
        var a = !1, u = this;
        u.pollingFast = !0;
        function h() {
          var p = u.poll();
          !p && !a ? (a = !0, u.polling.set(60, h)) : (u.pollingFast = !1, u.slowPoll());
        }
        P(h, "p"), u.polling.set(20, h);
      }, un.prototype.poll = function() {
        var a = this, u = this.cm, h = this.textarea, p = this.prevInput;
        if (this.contextMenuPending || !u.state.focused || Hf(h) && !p && !this.composing || u.isReadOnly() || u.options.disableInput || u.state.keySeq)
          return !1;
        var y = h.value;
        if (y == p && !u.somethingSelected())
          return !1;
        if (c && f >= 9 && this.hasSelection === y || E && /[\uf700-\uf7ff]/.test(y))
          return u.display.input.reset(), !1;
        if (u.doc.sel == u.display.selForContextMenu) {
          var T = y.charCodeAt(0);
          if (T == 8203 && !p && (p = "​"), T == 8666)
            return this.reset(), this.cm.execCommand("undo");
        }
        for (var O = 0, L = Math.min(p.length, y.length); O < L && p.charCodeAt(O) == y.charCodeAt(O); )
          ++O;
        return Rr(u, function() {
          Vm(
            u,
            y.slice(O),
            p.length - O,
            null,
            a.composing ? "*compose" : null
          ), y.length > 1e3 || y.indexOf(`
`) > -1 ? h.value = a.prevInput = "" : a.prevInput = y, a.composing && (a.composing.range.clear(), a.composing.range = u.markText(
            a.composing.start,
            u.getCursor("to"),
            { className: "CodeMirror-composing" }
          ));
        }), !0;
      }, un.prototype.ensurePolled = function() {
        this.pollingFast && this.poll() && (this.pollingFast = !1);
      }, un.prototype.onKeyPress = function() {
        c && f >= 9 && (this.hasSelection = null), this.fastPoll();
      }, un.prototype.onContextMenu = function(a) {
        var u = this, h = u.cm, p = h.display, y = u.textarea;
        u.contextMenuPending && u.contextMenuPending();
        var T = la(h, a), O = p.scroller.scrollTop;
        if (!T || v)
          return;
        var L = h.options.resetSelectionOnContextMenu;
        L && h.doc.sel.contains(T) == -1 && _n(h, Wn)(h.doc, gs(T), ge);
        var M = y.style.cssText, V = u.wrapper.style.cssText, G = u.wrapper.offsetParent.getBoundingClientRect();
        u.wrapper.style.cssText = "position: static", y.style.cssText = `position: absolute; width: 30px; height: 30px;
      top: ` + (a.clientY - G.top - 5) + "px; left: " + (a.clientX - G.left - 5) + `px;
      z-index: 1000; background: ` + (c ? "rgba(255, 255, 255, .05)" : "transparent") + `;
      outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;
        var X;
        d && (X = window.scrollY), p.input.focus(), d && window.scrollTo(null, X), p.input.reset(), h.somethingSelected() || (y.value = u.prevInput = " "), u.contextMenuPending = oe, p.selForContextMenu = h.doc.sel, clearTimeout(p.detectingSelectAll);
        function se() {
          if (y.selectionStart != null) {
            var ye = h.somethingSelected(), Ce = "​" + (ye ? y.value : "");
            y.value = "⇚", y.value = Ce, u.prevInput = ye ? "" : "​", y.selectionStart = 1, y.selectionEnd = Ce.length, p.selForContextMenu = h.doc.sel;
          }
        }
        P(se, "prepareSelectAllHack");
        function oe() {
          if (u.contextMenuPending == oe && (u.contextMenuPending = !1, u.wrapper.style.cssText = V, y.style.cssText = M, c && f < 9 && p.scrollbars.setScrollTop(p.scroller.scrollTop = O), y.selectionStart != null)) {
            (!c || c && f < 9) && se();
            var ye = 0, Ce = /* @__PURE__ */ P(function() {
              p.selForContextMenu == h.doc.sel && y.selectionStart == 0 && y.selectionEnd > 0 && u.prevInput == "​" ? _n(h, Pb)(h) : ye++ < 10 ? p.detectingSelectAll = setTimeout(Ce, 500) : (p.selForContextMenu = null, p.input.reset());
            }, "poll");
            p.detectingSelectAll = setTimeout(Ce, 200);
          }
        }
        if (P(oe, "rehide"), c && f >= 9 && se(), F) {
          cs(a);
          var pe = /* @__PURE__ */ P(function() {
            tr(window, "mouseup", pe), setTimeout(oe, 20);
          }, "mouseup");
          We(window, "mouseup", pe);
        } else
          setTimeout(oe, 50);
      }, un.prototype.readOnlyChanged = function(a) {
        a || this.reset(), this.textarea.disabled = a == "nocursor", this.textarea.readOnly = !!a;
      }, un.prototype.setUneditable = function() {
      }, un.prototype.needsContentAttribute = !1;
      function IO(a, u) {
        if (u = u ? ie(u) : {}, u.value = a.value, !u.tabindex && a.tabIndex && (u.tabindex = a.tabIndex), !u.placeholder && a.placeholder && (u.placeholder = a.placeholder), u.autofocus == null) {
          var h = Y();
          u.autofocus = h == a || a.getAttribute("autofocus") != null && h == document.body;
        }
        function p() {
          a.value = L.getValue();
        }
        P(p, "save");
        var y;
        if (a.form && (We(a.form, "submit", p), !u.leaveSubmitMethodAlone)) {
          var T = a.form;
          y = T.submit;
          try {
            var O = T.submit = function() {
              p(), T.submit = y, T.submit(), T.submit = O;
            };
          } catch {
          }
        }
        u.finishInit = function(M) {
          M.save = p, M.getTextArea = function() {
            return a;
          }, M.toTextArea = function() {
            M.toTextArea = isNaN, p(), a.parentNode.removeChild(M.getWrapperElement()), a.style.display = "", a.form && (tr(a.form, "submit", p), !u.leaveSubmitMethodAlone && typeof a.form.submit == "function" && (a.form.submit = y));
          };
        }, a.style.display = "none";
        var L = Ft(
          function(M) {
            return a.parentNode.insertBefore(M, a.nextSibling);
          },
          u
        );
        return L;
      }
      P(IO, "fromTextArea");
      function LO(a) {
        a.off = tr, a.on = We, a.wheelEventPixels = VN, a.Doc = Fr, a.splitLines = Hc, a.countColumn = ne, a.findColumn = Oe, a.isWordChar = er, a.Pass = xe, a.signal = Ke, a.Line = Jc, a.changeEnd = vs, a.scrollbarModel = kN, a.Pos = we, a.cmpPos = j, a.modes = co, a.mimeModes = Xr, a.resolveMode = ia, a.getMode = sa, a.modeExtensions = Fo, a.extendMode = uo, a.copyState = Zr, a.startState = vl, a.innerMode = gl, a.commands = Ed, a.keyMap = bs, a.keyName = Kb, a.isModifierKey = Qb, a.lookupKey = Ll, a.normalizeKeyMap = cO, a.StringStream = Qt, a.SharedTextMarker = gd, a.TextMarker = pa, a.LineWidget = md, a.e_preventDefault = Ln, a.e_stopPropagation = oa, a.e_stop = cs, a.addClass = K, a.contains = Q, a.rmClass = q, a.keyNames = ha;
      }
      P(LO, "addLegacyProps"), TO(Ft), NO(Ft);
      var UV = "iter insert remove copy getEditor constructor".split(" ");
      for (var Um in Fr.prototype)
        Fr.prototype.hasOwnProperty(Um) && le(UV, Um) < 0 && (Ft.prototype[Um] = /* @__PURE__ */ function(a) {
          return function() {
            return a.apply(this.doc, arguments);
          };
        }(Fr.prototype[Um]));
      return Lo(Fr), Ft.inputStyles = { textarea: un, contenteditable: kt }, Ft.defineMode = function(a) {
        !Ft.defaults.mode && a != "null" && (Ft.defaults.mode = a), Gc.apply(this, arguments);
      }, Ft.defineMIME = ai, Ft.defineMode("null", function() {
        return { token: function(a) {
          return a.skipToEnd();
        } };
      }), Ft.defineMIME("text/plain", "null"), Ft.defineExtension = function(a, u) {
        Ft.prototype[a] = u;
      }, Ft.defineDocExtension = function(a, u) {
        Fr.prototype[a] = u;
      }, Ft.fromTextArea = IO, LO(Ft), Ft.version = "5.65.3", Ft;
    });
  }(kR)), kR.exports;
}
P(Ir, "requireCodemirror");
var S7e = Object.defineProperty, T7e = (e, t) => S7e(e, "name", { value: t, configurable: !0 });
function k8(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" }));
}
T7e(k8, "_mergeNamespaces");
var _8 = Ir();
const tt = /* @__PURE__ */ Kr(_8), C7e = /* @__PURE__ */ k8({
  __proto__: null,
  default: tt
}, [_8]), k7e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  C: tt,
  c: C7e
}, Symbol.toStringTag, { value: "Module" }));
var _7e = Object.defineProperty, no = (e, t) => _7e(e, "name", { value: t, configurable: !0 });
function N8(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" }));
}
no(N8, "_mergeNamespaces");
var N7e = { exports: {} };
(function(e, t) {
  (function(n) {
    n(Ir());
  })(function(n) {
    var r = "CodeMirror-hint", o = "CodeMirror-hint-active";
    n.showHint = function(S, x, C) {
      if (!x)
        return S.showHint(C);
      C && C.async && (x.async = !0);
      var E = { hint: x };
      if (C)
        for (var N in C)
          E[N] = C[N];
      return S.showHint(E);
    }, n.defineExtension("showHint", function(S) {
      S = c(this, this.getCursor("start"), S);
      var x = this.listSelections();
      if (!(x.length > 1)) {
        if (this.somethingSelected()) {
          if (!S.hint.supportsSelection)
            return;
          for (var C = 0; C < x.length; C++)
            if (x[C].head.line != x[C].anchor.line)
              return;
        }
        this.state.completionActive && this.state.completionActive.close();
        var E = this.state.completionActive = new i(this, S);
        E.options.hint && (n.signal(this, "startCompletion", this), E.update(!0));
      }
    }), n.defineExtension("closeHint", function() {
      this.state.completionActive && this.state.completionActive.close();
    });
    function i(S, x) {
      if (this.cm = S, this.options = x, this.widget = null, this.debounce = 0, this.tick = 0, this.startPos = this.cm.getCursor("start"), this.startLen = this.cm.getLine(this.startPos.line).length - this.cm.getSelection().length, this.options.updateOnCursorActivity) {
        var C = this;
        S.on("cursorActivity", this.activityFunc = function() {
          C.cursorActivity();
        });
      }
    }
    no(i, "Completion");
    var s = window.requestAnimationFrame || function(S) {
      return setTimeout(S, 1e3 / 60);
    }, l = window.cancelAnimationFrame || clearTimeout;
    i.prototype = {
      close: function() {
        this.active() && (this.cm.state.completionActive = null, this.tick = null, this.options.updateOnCursorActivity && this.cm.off("cursorActivity", this.activityFunc), this.widget && this.data && n.signal(this.data, "close"), this.widget && this.widget.close(), n.signal(this.cm, "endCompletion", this.cm));
      },
      active: function() {
        return this.cm.state.completionActive == this;
      },
      pick: function(S, x) {
        var C = S.list[x], E = this;
        this.cm.operation(function() {
          C.hint ? C.hint(E.cm, S, C) : E.cm.replaceRange(
            f(C),
            C.from || S.from,
            C.to || S.to,
            "complete"
          ), n.signal(S, "pick", C), E.cm.scrollIntoView();
        }), this.options.closeOnPick && this.close();
      },
      cursorActivity: function() {
        this.debounce && (l(this.debounce), this.debounce = 0);
        var S = this.startPos;
        this.data && (S = this.data.from);
        var x = this.cm.getCursor(), C = this.cm.getLine(x.line);
        if (x.line != this.startPos.line || C.length - x.ch != this.startLen - this.startPos.ch || x.ch < S.ch || this.cm.somethingSelected() || !x.ch || this.options.closeCharacters.test(C.charAt(x.ch - 1)))
          this.close();
        else {
          var E = this;
          this.debounce = s(function() {
            E.update();
          }), this.widget && this.widget.disable();
        }
      },
      update: function(S) {
        if (this.tick != null) {
          var x = this, C = ++this.tick;
          b(this.options.hint, this.cm, this.options, function(E) {
            x.tick == C && x.finishUpdate(E, S);
          });
        }
      },
      finishUpdate: function(S, x) {
        this.data && n.signal(this.data, "update");
        var C = this.widget && this.widget.picked || x && this.options.completeSingle;
        this.widget && this.widget.close(), this.data = S, S && S.list.length && (C && S.list.length == 1 ? this.pick(S, 0) : (this.widget = new m(this, S), n.signal(S, "shown")));
      }
    };
    function c(S, x, C) {
      var E = S.options.hintOptions, N = {};
      for (var I in _)
        N[I] = _[I];
      if (E)
        for (var I in E)
          E[I] !== void 0 && (N[I] = E[I]);
      if (C)
        for (var I in C)
          C[I] !== void 0 && (N[I] = C[I]);
      return N.hint.resolve && (N.hint = N.hint.resolve(S, x)), N;
    }
    no(c, "parseOptions");
    function f(S) {
      return typeof S == "string" ? S : S.text;
    }
    no(f, "getText");
    function d(S, x) {
      var C = {
        Up: function() {
          x.moveFocus(-1);
        },
        Down: function() {
          x.moveFocus(1);
        },
        PageUp: function() {
          x.moveFocus(-x.menuSize() + 1, !0);
        },
        PageDown: function() {
          x.moveFocus(x.menuSize() - 1, !0);
        },
        Home: function() {
          x.setFocus(0);
        },
        End: function() {
          x.setFocus(x.length - 1);
        },
        Enter: x.pick,
        Tab: x.pick,
        Esc: x.close
      }, E = /Mac/.test(navigator.platform);
      E && (C["Ctrl-P"] = function() {
        x.moveFocus(-1);
      }, C["Ctrl-N"] = function() {
        x.moveFocus(1);
      });
      var N = S.options.customKeys, I = N ? {} : C;
      function D($, q) {
        var H;
        typeof q != "string" ? H = /* @__PURE__ */ no(function(z) {
          return q(z, x);
        }, "bound") : C.hasOwnProperty(q) ? H = C[q] : H = q, I[$] = H;
      }
      if (no(D, "addBinding"), N)
        for (var A in N)
          N.hasOwnProperty(A) && D(A, N[A]);
      var F = S.options.extraKeys;
      if (F)
        for (var A in F)
          F.hasOwnProperty(A) && D(A, F[A]);
      return I;
    }
    no(d, "buildKeyMap");
    function g(S, x) {
      for (; x && x != S; ) {
        if (x.nodeName.toUpperCase() === "LI" && x.parentNode == S)
          return x;
        x = x.parentNode;
      }
    }
    no(g, "getHintElement");
    function m(S, x) {
      this.id = "cm-complete-" + Math.floor(Math.random(1e6)), this.completion = S, this.data = x, this.picked = !1;
      var C = this, E = S.cm, N = E.getInputField().ownerDocument, I = N.defaultView || N.parentWindow, D = this.hints = N.createElement("ul");
      D.setAttribute("role", "listbox"), D.setAttribute("aria-expanded", "true"), D.id = this.id;
      var A = S.cm.options.theme;
      D.className = "CodeMirror-hints " + A, this.selectedHint = x.selectedHint || 0;
      for (var F = x.list, $ = 0; $ < F.length; ++$) {
        var q = D.appendChild(N.createElement("li")), H = F[$], z = r + ($ != this.selectedHint ? "" : " " + o);
        H.className != null && (z = H.className + " " + z), q.className = z, $ == this.selectedHint && q.setAttribute("aria-selected", "true"), q.id = this.id + "-" + $, q.setAttribute("role", "option"), H.render ? H.render(q, x, H) : q.appendChild(N.createTextNode(H.displayText || f(H))), q.hintId = $;
      }
      var B = S.options.container || N.body, R = E.cursorCoords(S.options.alignWithWord ? x.from : null), te = R.left, Q = R.bottom, Y = !0, K = 0, Z = 0;
      if (B !== N.body) {
        var re = ["absolute", "relative", "fixed"].indexOf(I.getComputedStyle(B).position) !== -1, J = re ? B : B.offsetParent, ie = J.getBoundingClientRect(), ne = N.body.getBoundingClientRect();
        K = ie.left - ne.left - J.scrollLeft, Z = ie.top - ne.top - J.scrollTop;
      }
      D.style.left = te - K + "px", D.style.top = Q - Z + "px";
      var ae = I.innerWidth || Math.max(N.body.offsetWidth, N.documentElement.offsetWidth), le = I.innerHeight || Math.max(N.body.offsetHeight, N.documentElement.offsetHeight);
      B.appendChild(D), E.getInputField().setAttribute("aria-autocomplete", "list"), E.getInputField().setAttribute("aria-owns", this.id), E.getInputField().setAttribute("aria-activedescendant", this.id + "-" + this.selectedHint);
      var de = S.options.moveOnOverlap ? D.getBoundingClientRect() : new DOMRect(), xe = S.options.paddingForScrollbar ? D.scrollHeight > D.clientHeight + 1 : !1, ge;
      setTimeout(function() {
        ge = E.getScrollInfo();
      });
      var qe = de.bottom - le;
      if (qe > 0) {
        var Ie = de.bottom - de.top, Oe = R.top - (R.bottom - de.top);
        if (Oe - Ie > 0)
          D.style.top = (Q = R.top - Ie - Z) + "px", Y = !1;
        else if (Ie > le) {
          D.style.height = le - 5 + "px", D.style.top = (Q = R.bottom - de.top - Z) + "px";
          var ot = E.getCursor();
          x.from.ch != ot.ch && (R = E.cursorCoords(ot), D.style.left = (te = R.left - K) + "px", de = D.getBoundingClientRect());
        }
      }
      var Nt = de.right - ae;
      if (xe && (Nt += E.display.nativeBarWidth), Nt > 0 && (de.right - de.left > ae && (D.style.width = ae - 5 + "px", Nt -= de.right - de.left - ae), D.style.left = (te = R.left - Nt - K) + "px"), xe)
        for (var Ve = D.firstChild; Ve; Ve = Ve.nextSibling)
          Ve.style.paddingRight = E.display.nativeBarWidth + "px";
      if (E.addKeyMap(this.keyMap = d(S, {
        moveFocus: function(Rt, hn) {
          C.changeActive(C.selectedHint + Rt, hn);
        },
        setFocus: function(Rt) {
          C.changeActive(Rt);
        },
        menuSize: function() {
          return C.screenAmount();
        },
        length: F.length,
        close: function() {
          S.close();
        },
        pick: function() {
          C.pick();
        },
        data: x
      })), S.options.closeOnUnfocus) {
        var At;
        E.on("blur", this.onBlur = function() {
          At = setTimeout(function() {
            S.close();
          }, 100);
        }), E.on("focus", this.onFocus = function() {
          clearTimeout(At);
        });
      }
      E.on("scroll", this.onScroll = function() {
        var Rt = E.getScrollInfo(), hn = E.getWrapperElement().getBoundingClientRect();
        ge || (ge = E.getScrollInfo());
        var $i = Q + ge.top - Rt.top, er = $i - (I.pageYOffset || (N.documentElement || N.body).scrollTop);
        if (Y || (er += D.offsetHeight), er <= hn.top || er >= hn.bottom)
          return S.close();
        D.style.top = $i + "px", D.style.left = te + ge.left - Rt.left + "px";
      }), n.on(D, "dblclick", function(Rt) {
        var hn = g(D, Rt.target || Rt.srcElement);
        hn && hn.hintId != null && (C.changeActive(hn.hintId), C.pick());
      }), n.on(D, "click", function(Rt) {
        var hn = g(D, Rt.target || Rt.srcElement);
        hn && hn.hintId != null && (C.changeActive(hn.hintId), S.options.completeOnSingleClick && C.pick());
      }), n.on(D, "mousedown", function() {
        setTimeout(function() {
          E.focus();
        }, 20);
      });
      var hr = this.getSelectedHintRange();
      return (hr.from !== 0 || hr.to !== 0) && this.scrollToActive(), n.signal(x, "select", F[this.selectedHint], D.childNodes[this.selectedHint]), !0;
    }
    no(m, "Widget"), m.prototype = {
      close: function() {
        if (this.completion.widget == this) {
          this.completion.widget = null, this.hints.parentNode && this.hints.parentNode.removeChild(this.hints), this.completion.cm.removeKeyMap(this.keyMap);
          var S = this.completion.cm.getInputField();
          S.removeAttribute("aria-activedescendant"), S.removeAttribute("aria-owns");
          var x = this.completion.cm;
          this.completion.options.closeOnUnfocus && (x.off("blur", this.onBlur), x.off("focus", this.onFocus)), x.off("scroll", this.onScroll);
        }
      },
      disable: function() {
        this.completion.cm.removeKeyMap(this.keyMap);
        var S = this;
        this.keyMap = { Enter: function() {
          S.picked = !0;
        } }, this.completion.cm.addKeyMap(this.keyMap);
      },
      pick: function() {
        this.completion.pick(this.data, this.selectedHint);
      },
      changeActive: function(S, x) {
        if (S >= this.data.list.length ? S = x ? this.data.list.length - 1 : 0 : S < 0 && (S = x ? 0 : this.data.list.length - 1), this.selectedHint != S) {
          var C = this.hints.childNodes[this.selectedHint];
          C && (C.className = C.className.replace(" " + o, ""), C.removeAttribute("aria-selected")), C = this.hints.childNodes[this.selectedHint = S], C.className += " " + o, C.setAttribute("aria-selected", "true"), this.completion.cm.getInputField().setAttribute("aria-activedescendant", C.id), this.scrollToActive(), n.signal(this.data, "select", this.data.list[this.selectedHint], C);
        }
      },
      scrollToActive: function() {
        var S = this.getSelectedHintRange(), x = this.hints.childNodes[S.from], C = this.hints.childNodes[S.to], E = this.hints.firstChild;
        x.offsetTop < this.hints.scrollTop ? this.hints.scrollTop = x.offsetTop - E.offsetTop : C.offsetTop + C.offsetHeight > this.hints.scrollTop + this.hints.clientHeight && (this.hints.scrollTop = C.offsetTop + C.offsetHeight - this.hints.clientHeight + E.offsetTop);
      },
      screenAmount: function() {
        return Math.floor(this.hints.clientHeight / this.hints.firstChild.offsetHeight) || 1;
      },
      getSelectedHintRange: function() {
        var S = this.completion.options.scrollMargin || 0;
        return {
          from: Math.max(0, this.selectedHint - S),
          to: Math.min(this.data.list.length - 1, this.selectedHint + S)
        };
      }
    };
    function v(S, x) {
      if (!S.somethingSelected())
        return x;
      for (var C = [], E = 0; E < x.length; E++)
        x[E].supportsSelection && C.push(x[E]);
      return C;
    }
    no(v, "applicableHelpers");
    function b(S, x, C, E) {
      if (S.async)
        S(x, E, C);
      else {
        var N = S(x, C);
        N && N.then ? N.then(E) : E(N);
      }
    }
    no(b, "fetchHints");
    function w(S, x) {
      var C = S.getHelpers(x, "hint"), E;
      if (C.length) {
        var N = /* @__PURE__ */ no(function(I, D, A) {
          var F = v(I, C);
          function $(q) {
            if (q == F.length)
              return D(null);
            b(F[q], I, A, function(H) {
              H && H.list.length > 0 ? D(H) : $(q + 1);
            });
          }
          no($, "run"), $(0);
        }, "resolved");
        return N.async = !0, N.supportsSelection = !0, N;
      } else
        return (E = S.getHelper(S.getCursor(), "hintWords")) ? function(I) {
          return n.hint.fromList(I, { words: E });
        } : n.hint.anyword ? function(I, D) {
          return n.hint.anyword(I, D);
        } : function() {
        };
    }
    no(w, "resolveAutoHints"), n.registerHelper("hint", "auto", {
      resolve: w
    }), n.registerHelper("hint", "fromList", function(S, x) {
      var C = S.getCursor(), E = S.getTokenAt(C), N, I = n.Pos(C.line, E.start), D = C;
      E.start < C.ch && /\w/.test(E.string.charAt(C.ch - E.start - 1)) ? N = E.string.substr(0, C.ch - E.start) : (N = "", I = C);
      for (var A = [], F = 0; F < x.words.length; F++) {
        var $ = x.words[F];
        $.slice(0, N.length) == N && A.push($);
      }
      if (A.length)
        return { list: A, from: I, to: D };
    }), n.commands.autocomplete = n.showHint;
    var _ = {
      hint: n.hint.auto,
      completeSingle: !0,
      alignWithWord: !0,
      closeCharacters: /[\s()\[\]{};:>,]/,
      closeOnPick: !0,
      closeOnUnfocus: !0,
      updateOnCursorActivity: !0,
      completeOnSingleClick: !0,
      container: null,
      customKeys: null,
      extraKeys: null,
      paddingForScrollbar: !0,
      moveOnOverlap: !0
    };
    n.defineOption("hintOptions", null);
  });
})();
var O8 = N7e.exports;
const O7e = /* @__PURE__ */ Kr(O8), A7e = /* @__PURE__ */ N8({
  __proto__: null,
  default: O7e
}, [O8]), D7e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  s: A7e
}, Symbol.toStringTag, { value: "Module" }));
var I7e = Object.defineProperty, Ea = (e, t) => I7e(e, "name", { value: t, configurable: !0 }), L7e = { exports: {} }, NR;
function b_() {
  return NR || (NR = 1, function(e, t) {
    (function(n) {
      n(Ir());
    })(function(n) {
      var r = /MSIE \d/.test(navigator.userAgent) && (document.documentMode == null || document.documentMode < 8), o = n.Pos, i = { "(": ")>", ")": "(<", "[": "]>", "]": "[<", "{": "}>", "}": "{<", "<": ">>", ">": "<<" };
      function s(m) {
        return m && m.bracketRegex || /[(){}[\]]/;
      }
      Ea(s, "bracketRegex");
      function l(m, v, b) {
        var w = m.getLineHandle(v.line), _ = v.ch - 1, S = b && b.afterCursor;
        S == null && (S = /(^| )cm-fat-cursor($| )/.test(m.getWrapperElement().className));
        var x = s(b), C = !S && _ >= 0 && x.test(w.text.charAt(_)) && i[w.text.charAt(_)] || x.test(w.text.charAt(_ + 1)) && i[w.text.charAt(++_)];
        if (!C)
          return null;
        var E = C.charAt(1) == ">" ? 1 : -1;
        if (b && b.strict && E > 0 != (_ == v.ch))
          return null;
        var N = m.getTokenTypeAt(o(v.line, _ + 1)), I = c(m, o(v.line, _ + (E > 0 ? 1 : 0)), E, N, b);
        return I == null ? null : {
          from: o(v.line, _),
          to: I && I.pos,
          match: I && I.ch == C.charAt(0),
          forward: E > 0
        };
      }
      Ea(l, "findMatchingBracket");
      function c(m, v, b, w, _) {
        for (var S = _ && _.maxScanLineLength || 1e4, x = _ && _.maxScanLines || 1e3, C = [], E = s(_), N = b > 0 ? Math.min(v.line + x, m.lastLine() + 1) : Math.max(m.firstLine() - 1, v.line - x), I = v.line; I != N; I += b) {
          var D = m.getLine(I);
          if (D) {
            var A = b > 0 ? 0 : D.length - 1, F = b > 0 ? D.length : -1;
            if (!(D.length > S))
              for (I == v.line && (A = v.ch - (b < 0 ? 1 : 0)); A != F; A += b) {
                var $ = D.charAt(A);
                if (E.test($) && (w === void 0 || (m.getTokenTypeAt(o(I, A + 1)) || "") == (w || ""))) {
                  var q = i[$];
                  if (q && q.charAt(1) == ">" == b > 0)
                    C.push($);
                  else if (C.length)
                    C.pop();
                  else
                    return { pos: o(I, A), ch: $ };
                }
              }
          }
        }
        return I - b == (b > 0 ? m.lastLine() : m.firstLine()) ? !1 : null;
      }
      Ea(c, "scanForBracket");
      function f(m, v, b) {
        for (var w = m.state.matchBrackets.maxHighlightLineLength || 1e3, _ = b && b.highlightNonMatching, S = [], x = m.listSelections(), C = 0; C < x.length; C++) {
          var E = x[C].empty() && l(m, x[C].head, b);
          if (E && (E.match || _ !== !1) && m.getLine(E.from.line).length <= w) {
            var N = E.match ? "CodeMirror-matchingbracket" : "CodeMirror-nonmatchingbracket";
            S.push(m.markText(E.from, o(E.from.line, E.from.ch + 1), { className: N })), E.to && m.getLine(E.to.line).length <= w && S.push(m.markText(E.to, o(E.to.line, E.to.ch + 1), { className: N }));
          }
        }
        if (S.length) {
          r && m.state.focused && m.focus();
          var I = /* @__PURE__ */ Ea(function() {
            m.operation(function() {
              for (var D = 0; D < S.length; D++)
                S[D].clear();
            });
          }, "clear");
          if (v)
            setTimeout(I, 800);
          else
            return I;
        }
      }
      Ea(f, "matchBrackets");
      function d(m) {
        m.operation(function() {
          m.state.matchBrackets.currentlyHighlighted && (m.state.matchBrackets.currentlyHighlighted(), m.state.matchBrackets.currentlyHighlighted = null), m.state.matchBrackets.currentlyHighlighted = f(m, !1, m.state.matchBrackets);
        });
      }
      Ea(d, "doMatchBrackets");
      function g(m) {
        m.state.matchBrackets && m.state.matchBrackets.currentlyHighlighted && (m.state.matchBrackets.currentlyHighlighted(), m.state.matchBrackets.currentlyHighlighted = null);
      }
      Ea(g, "clearHighlighted"), n.defineOption("matchBrackets", !1, function(m, v, b) {
        b && b != n.Init && (m.off("cursorActivity", d), m.off("focus", d), m.off("blur", g), g(m)), v && (m.state.matchBrackets = typeof v == "object" ? v : {}, m.on("cursorActivity", d), m.on("focus", d), m.on("blur", g));
      }), n.defineExtension("matchBrackets", function() {
        f(this, !0);
      }), n.defineExtension("findMatchingBracket", function(m, v, b) {
        return (b || typeof v == "boolean") && (b ? (b.strict = v, v = b) : v = v ? { strict: !0 } : null), l(this, m, v);
      }), n.defineExtension("scanForBracket", function(m, v, b, w) {
        return c(this, m, v, b, w);
      });
    });
  }()), L7e.exports;
}
Ea(b_, "requireMatchbrackets");
var R7e = Object.defineProperty, F7e = (e, t) => R7e(e, "name", { value: t, configurable: !0 });
function A8(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" }));
}
F7e(A8, "_mergeNamespaces");
var D8 = b_();
const M7e = /* @__PURE__ */ Kr(D8), P7e = /* @__PURE__ */ A8({
  __proto__: null,
  default: M7e
}, [D8]), $7e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  m: P7e
}, Symbol.toStringTag, { value: "Module" }));
var V7e = Object.defineProperty, Uo = (e, t) => V7e(e, "name", { value: t, configurable: !0 });
function I8(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" }));
}
Uo(I8, "_mergeNamespaces");
var j7e = { exports: {} };
(function(e, t) {
  (function(n) {
    n(Ir());
  })(function(n) {
    var r = {
      pairs: `()[]{}''""`,
      closeBefore: `)]}'":;>`,
      triples: "",
      explode: "[]{}"
    }, o = n.Pos;
    n.defineOption("autoCloseBrackets", !1, function(S, x, C) {
      C && C != n.Init && (S.removeKeyMap(s), S.state.closeBrackets = null), x && (l(i(x, "pairs")), S.state.closeBrackets = x, S.addKeyMap(s));
    });
    function i(S, x) {
      return x == "pairs" && typeof S == "string" ? S : typeof S == "object" && S[x] != null ? S[x] : r[x];
    }
    Uo(i, "getOption");
    var s = { Backspace: d, Enter: g };
    function l(S) {
      for (var x = 0; x < S.length; x++) {
        var C = S.charAt(x), E = "'" + C + "'";
        s[E] || (s[E] = c(C));
      }
    }
    Uo(l, "ensureBound"), l(r.pairs + "`");
    function c(S) {
      return function(x) {
        return b(x, S);
      };
    }
    Uo(c, "handler");
    function f(S) {
      var x = S.state.closeBrackets;
      if (!x || x.override)
        return x;
      var C = S.getModeAt(S.getCursor());
      return C.closeBrackets || x;
    }
    Uo(f, "getConfig");
    function d(S) {
      var x = f(S);
      if (!x || S.getOption("disableInput"))
        return n.Pass;
      for (var C = i(x, "pairs"), E = S.listSelections(), N = 0; N < E.length; N++) {
        if (!E[N].empty())
          return n.Pass;
        var I = w(S, E[N].head);
        if (!I || C.indexOf(I) % 2 != 0)
          return n.Pass;
      }
      for (var N = E.length - 1; N >= 0; N--) {
        var D = E[N].head;
        S.replaceRange("", o(D.line, D.ch - 1), o(D.line, D.ch + 1), "+delete");
      }
    }
    Uo(d, "handleBackspace");
    function g(S) {
      var x = f(S), C = x && i(x, "explode");
      if (!C || S.getOption("disableInput"))
        return n.Pass;
      for (var E = S.listSelections(), N = 0; N < E.length; N++) {
        if (!E[N].empty())
          return n.Pass;
        var I = w(S, E[N].head);
        if (!I || C.indexOf(I) % 2 != 0)
          return n.Pass;
      }
      S.operation(function() {
        var D = S.lineSeparator() || `
`;
        S.replaceSelection(D + D, null), m(S, -1), E = S.listSelections();
        for (var A = 0; A < E.length; A++) {
          var F = E[A].head.line;
          S.indentLine(F, null, !0), S.indentLine(F + 1, null, !0);
        }
      });
    }
    Uo(g, "handleEnter");
    function m(S, x) {
      for (var C = [], E = S.listSelections(), N = 0, I = 0; I < E.length; I++) {
        var D = E[I];
        D.head == S.getCursor() && (N = I);
        var A = D.head.ch || x > 0 ? { line: D.head.line, ch: D.head.ch + x } : { line: D.head.line - 1 };
        C.push({ anchor: A, head: A });
      }
      S.setSelections(C, N);
    }
    Uo(m, "moveSel");
    function v(S) {
      var x = n.cmpPos(S.anchor, S.head) > 0;
      return {
        anchor: new o(S.anchor.line, S.anchor.ch + (x ? -1 : 1)),
        head: new o(S.head.line, S.head.ch + (x ? 1 : -1))
      };
    }
    Uo(v, "contractSelection");
    function b(S, x) {
      var C = f(S);
      if (!C || S.getOption("disableInput"))
        return n.Pass;
      var E = i(C, "pairs"), N = E.indexOf(x);
      if (N == -1)
        return n.Pass;
      for (var I = i(C, "closeBefore"), D = i(C, "triples"), A = E.charAt(N + 1) == x, F = S.listSelections(), $ = N % 2 == 0, q, H = 0; H < F.length; H++) {
        var z = F[H], B = z.head, R, te = S.getRange(B, o(B.line, B.ch + 1));
        if ($ && !z.empty())
          R = "surround";
        else if ((A || !$) && te == x)
          A && _(S, B) ? R = "both" : D.indexOf(x) >= 0 && S.getRange(B, o(B.line, B.ch + 3)) == x + x + x ? R = "skipThree" : R = "skip";
        else if (A && B.ch > 1 && D.indexOf(x) >= 0 && S.getRange(o(B.line, B.ch - 2), B) == x + x) {
          if (B.ch > 2 && /\bstring/.test(S.getTokenTypeAt(o(B.line, B.ch - 2))))
            return n.Pass;
          R = "addFour";
        } else if (A) {
          var Q = B.ch == 0 ? " " : S.getRange(o(B.line, B.ch - 1), B);
          if (!n.isWordChar(te) && Q != x && !n.isWordChar(Q))
            R = "both";
          else
            return n.Pass;
        } else if ($ && (te.length === 0 || /\s/.test(te) || I.indexOf(te) > -1))
          R = "both";
        else
          return n.Pass;
        if (!q)
          q = R;
        else if (q != R)
          return n.Pass;
      }
      var Y = N % 2 ? E.charAt(N - 1) : x, K = N % 2 ? x : E.charAt(N + 1);
      S.operation(function() {
        if (q == "skip")
          m(S, 1);
        else if (q == "skipThree")
          m(S, 3);
        else if (q == "surround") {
          for (var Z = S.getSelections(), re = 0; re < Z.length; re++)
            Z[re] = Y + Z[re] + K;
          S.replaceSelections(Z, "around"), Z = S.listSelections().slice();
          for (var re = 0; re < Z.length; re++)
            Z[re] = v(Z[re]);
          S.setSelections(Z);
        } else
          q == "both" ? (S.replaceSelection(Y + K, null), S.triggerElectric(Y + K), m(S, -1)) : q == "addFour" && (S.replaceSelection(Y + Y + Y + Y, "before"), m(S, 1));
      });
    }
    Uo(b, "handleChar");
    function w(S, x) {
      var C = S.getRange(
        o(x.line, x.ch - 1),
        o(x.line, x.ch + 1)
      );
      return C.length == 2 ? C : null;
    }
    Uo(w, "charsAround");
    function _(S, x) {
      var C = S.getTokenAt(o(x.line, x.ch + 1));
      return /\bstring/.test(C.type) && C.start == x.ch && (x.ch == 0 || !/\bstring/.test(S.getTokenTypeAt(x)));
    }
    Uo(_, "stringStartsAfter");
  });
})();
var L8 = j7e.exports;
const U7e = /* @__PURE__ */ Kr(L8), B7e = /* @__PURE__ */ I8({
  __proto__: null,
  default: U7e
}, [L8]), q7e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  c: B7e
}, Symbol.toStringTag, { value: "Module" }));
var z7e = Object.defineProperty, Du = (e, t) => z7e(e, "name", { value: t, configurable: !0 });
function R8(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" }));
}
Du(R8, "_mergeNamespaces");
var H7e = { exports: {} };
(function(e, t) {
  (function(n) {
    n(Ir());
  })(function(n) {
    function r(o) {
      return function(i, s) {
        var l = s.line, c = i.getLine(l);
        function f(w) {
          for (var _, S = s.ch, x = 0; ; ) {
            var C = S <= 0 ? -1 : c.lastIndexOf(w[0], S - 1);
            if (C == -1) {
              if (x == 1)
                break;
              x = 1, S = c.length;
              continue;
            }
            if (x == 1 && C < s.ch)
              break;
            if (_ = i.getTokenTypeAt(n.Pos(l, C + 1)), !/^(comment|string)/.test(_))
              return { ch: C + 1, tokenType: _, pair: w };
            S = C - 1;
          }
        }
        Du(f, "findOpening");
        function d(w) {
          var _ = 1, S = i.lastLine(), x, C = w.ch, E;
          e:
            for (var N = l; N <= S; ++N)
              for (var I = i.getLine(N), D = N == l ? C : 0; ; ) {
                var A = I.indexOf(w.pair[0], D), F = I.indexOf(w.pair[1], D);
                if (A < 0 && (A = I.length), F < 0 && (F = I.length), D = Math.min(A, F), D == I.length)
                  break;
                if (i.getTokenTypeAt(n.Pos(N, D + 1)) == w.tokenType) {
                  if (D == A)
                    ++_;
                  else if (!--_) {
                    x = N, E = D;
                    break e;
                  }
                }
                ++D;
              }
          return x == null || l == x ? null : {
            from: n.Pos(l, C),
            to: n.Pos(x, E)
          };
        }
        Du(d, "findRange");
        for (var g = [], m = 0; m < o.length; m++) {
          var v = f(o[m]);
          v && g.push(v);
        }
        g.sort(function(w, _) {
          return w.ch - _.ch;
        });
        for (var m = 0; m < g.length; m++) {
          var b = d(g[m]);
          if (b)
            return b;
        }
        return null;
      };
    }
    Du(r, "bracketFolding"), n.registerHelper("fold", "brace", r([["{", "}"], ["[", "]"]])), n.registerHelper("fold", "brace-paren", r([["{", "}"], ["[", "]"], ["(", ")"]])), n.registerHelper("fold", "import", function(o, i) {
      function s(m) {
        if (m < o.firstLine() || m > o.lastLine())
          return null;
        var v = o.getTokenAt(n.Pos(m, 1));
        if (/\S/.test(v.string) || (v = o.getTokenAt(n.Pos(m, v.end + 1))), v.type != "keyword" || v.string != "import")
          return null;
        for (var b = m, w = Math.min(o.lastLine(), m + 10); b <= w; ++b) {
          var _ = o.getLine(b), S = _.indexOf(";");
          if (S != -1)
            return { startCh: v.end, end: n.Pos(b, S) };
        }
      }
      Du(s, "hasImport");
      var l = i.line, c = s(l), f;
      if (!c || s(l - 1) || (f = s(l - 2)) && f.end.line == l - 1)
        return null;
      for (var d = c.end; ; ) {
        var g = s(d.line + 1);
        if (g == null)
          break;
        d = g.end;
      }
      return { from: o.clipPos(n.Pos(l, c.startCh + 1)), to: d };
    }), n.registerHelper("fold", "include", function(o, i) {
      function s(g) {
        if (g < o.firstLine() || g > o.lastLine())
          return null;
        var m = o.getTokenAt(n.Pos(g, 1));
        if (/\S/.test(m.string) || (m = o.getTokenAt(n.Pos(g, m.end + 1))), m.type == "meta" && m.string.slice(0, 8) == "#include")
          return m.start + 8;
      }
      Du(s, "hasInclude");
      var l = i.line, c = s(l);
      if (c == null || s(l - 1) != null)
        return null;
      for (var f = l; ; ) {
        var d = s(f + 1);
        if (d == null)
          break;
        ++f;
      }
      return {
        from: n.Pos(l, c + 1),
        to: o.clipPos(n.Pos(f))
      };
    });
  });
})();
var F8 = H7e.exports;
const W7e = /* @__PURE__ */ Kr(F8), G7e = /* @__PURE__ */ R8({
  __proto__: null,
  default: W7e
}, [F8]), M8 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  b: G7e
}, Symbol.toStringTag, { value: "Module" }));
var Q7e = Object.defineProperty, ar = (e, t) => Q7e(e, "name", { value: t, configurable: !0 });
function P8(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" }));
}
ar(P8, "_mergeNamespaces");
var Y7e = { exports: {} }, K7e = { exports: {} }, OR;
function $8() {
  return OR || (OR = 1, function(e, t) {
    (function(n) {
      n(Ir());
    })(function(n) {
      function r(l, c, f, d) {
        if (f && f.call) {
          var g = f;
          f = null;
        } else
          var g = s(l, f, "rangeFinder");
        typeof c == "number" && (c = n.Pos(c, 0));
        var m = s(l, f, "minFoldSize");
        function v(S) {
          var x = g(l, c);
          if (!x || x.to.line - x.from.line < m)
            return null;
          if (d === "fold")
            return x;
          for (var C = l.findMarksAt(x.from), E = 0; E < C.length; ++E)
            if (C[E].__isFold) {
              if (!S)
                return null;
              x.cleared = !0, C[E].clear();
            }
          return x;
        }
        ar(v, "getRange");
        var b = v(!0);
        if (s(l, f, "scanUp"))
          for (; !b && c.line > l.firstLine(); )
            c = n.Pos(c.line - 1, 0), b = v(!1);
        if (!(!b || b.cleared || d === "unfold")) {
          var w = o(l, f, b);
          n.on(w, "mousedown", function(S) {
            _.clear(), n.e_preventDefault(S);
          });
          var _ = l.markText(b.from, b.to, {
            replacedWith: w,
            clearOnEnter: s(l, f, "clearOnEnter"),
            __isFold: !0
          });
          _.on("clear", function(S, x) {
            n.signal(l, "unfold", l, S, x);
          }), n.signal(l, "fold", l, b.from, b.to);
        }
      }
      ar(r, "doFold");
      function o(l, c, f) {
        var d = s(l, c, "widget");
        if (typeof d == "function" && (d = d(f.from, f.to)), typeof d == "string") {
          var g = document.createTextNode(d);
          d = document.createElement("span"), d.appendChild(g), d.className = "CodeMirror-foldmarker";
        } else
          d && (d = d.cloneNode(!0));
        return d;
      }
      ar(o, "makeWidget"), n.newFoldFunction = function(l, c) {
        return function(f, d) {
          r(f, d, { rangeFinder: l, widget: c });
        };
      }, n.defineExtension("foldCode", function(l, c, f) {
        r(this, l, c, f);
      }), n.defineExtension("isFolded", function(l) {
        for (var c = this.findMarksAt(l), f = 0; f < c.length; ++f)
          if (c[f].__isFold)
            return !0;
      }), n.commands.toggleFold = function(l) {
        l.foldCode(l.getCursor());
      }, n.commands.fold = function(l) {
        l.foldCode(l.getCursor(), null, "fold");
      }, n.commands.unfold = function(l) {
        l.foldCode(l.getCursor(), { scanUp: !1 }, "unfold");
      }, n.commands.foldAll = function(l) {
        l.operation(function() {
          for (var c = l.firstLine(), f = l.lastLine(); c <= f; c++)
            l.foldCode(n.Pos(c, 0), { scanUp: !1 }, "fold");
        });
      }, n.commands.unfoldAll = function(l) {
        l.operation(function() {
          for (var c = l.firstLine(), f = l.lastLine(); c <= f; c++)
            l.foldCode(n.Pos(c, 0), { scanUp: !1 }, "unfold");
        });
      }, n.registerHelper("fold", "combine", function() {
        var l = Array.prototype.slice.call(arguments, 0);
        return function(c, f) {
          for (var d = 0; d < l.length; ++d) {
            var g = l[d](c, f);
            if (g)
              return g;
          }
        };
      }), n.registerHelper("fold", "auto", function(l, c) {
        for (var f = l.getHelpers(c, "fold"), d = 0; d < f.length; d++) {
          var g = f[d](l, c);
          if (g)
            return g;
        }
      });
      var i = {
        rangeFinder: n.fold.auto,
        widget: "↔",
        minFoldSize: 0,
        scanUp: !1,
        clearOnEnter: !0
      };
      n.defineOption("foldOptions", null);
      function s(l, c, f) {
        if (c && c[f] !== void 0)
          return c[f];
        var d = l.options.foldOptions;
        return d && d[f] !== void 0 ? d[f] : i[f];
      }
      ar(s, "getOption"), n.defineExtension("foldOption", function(l, c) {
        return s(this, l, c);
      });
    });
  }()), K7e.exports;
}
ar($8, "requireFoldcode");
(function(e, t) {
  (function(n) {
    n(Ir(), $8());
  })(function(n) {
    n.defineOption("foldGutter", !1, function(w, _, S) {
      S && S != n.Init && (w.clearGutter(w.state.foldGutter.options.gutter), w.state.foldGutter = null, w.off("gutterClick", g), w.off("changes", m), w.off("viewportChange", v), w.off("fold", b), w.off("unfold", b), w.off("swapDoc", m)), _ && (w.state.foldGutter = new o(i(_)), d(w), w.on("gutterClick", g), w.on("changes", m), w.on("viewportChange", v), w.on("fold", b), w.on("unfold", b), w.on("swapDoc", m));
    });
    var r = n.Pos;
    function o(w) {
      this.options = w, this.from = this.to = 0;
    }
    ar(o, "State");
    function i(w) {
      return w === !0 && (w = {}), w.gutter == null && (w.gutter = "CodeMirror-foldgutter"), w.indicatorOpen == null && (w.indicatorOpen = "CodeMirror-foldgutter-open"), w.indicatorFolded == null && (w.indicatorFolded = "CodeMirror-foldgutter-folded"), w;
    }
    ar(i, "parseOptions");
    function s(w, _) {
      for (var S = w.findMarks(r(_, 0), r(_ + 1, 0)), x = 0; x < S.length; ++x)
        if (S[x].__isFold) {
          var C = S[x].find(-1);
          if (C && C.line === _)
            return S[x];
        }
    }
    ar(s, "isFolded");
    function l(w) {
      if (typeof w == "string") {
        var _ = document.createElement("div");
        return _.className = w + " CodeMirror-guttermarker-subtle", _;
      } else
        return w.cloneNode(!0);
    }
    ar(l, "marker");
    function c(w, _, S) {
      var x = w.state.foldGutter.options, C = _ - 1, E = w.foldOption(x, "minFoldSize"), N = w.foldOption(x, "rangeFinder"), I = typeof x.indicatorFolded == "string" && f(x.indicatorFolded), D = typeof x.indicatorOpen == "string" && f(x.indicatorOpen);
      w.eachLine(_, S, function(A) {
        ++C;
        var F = null, $ = A.gutterMarkers;
        if ($ && ($ = $[x.gutter]), s(w, C)) {
          if (I && $ && I.test($.className))
            return;
          F = l(x.indicatorFolded);
        } else {
          var q = r(C, 0), H = N && N(w, q);
          if (H && H.to.line - H.from.line >= E) {
            if (D && $ && D.test($.className))
              return;
            F = l(x.indicatorOpen);
          }
        }
        !F && !$ || w.setGutterMarker(A, x.gutter, F);
      });
    }
    ar(c, "updateFoldInfo");
    function f(w) {
      return new RegExp("(^|\\s)" + w + "(?:$|\\s)\\s*");
    }
    ar(f, "classTest");
    function d(w) {
      var _ = w.getViewport(), S = w.state.foldGutter;
      S && (w.operation(function() {
        c(w, _.from, _.to);
      }), S.from = _.from, S.to = _.to);
    }
    ar(d, "updateInViewport");
    function g(w, _, S) {
      var x = w.state.foldGutter;
      if (x) {
        var C = x.options;
        if (S == C.gutter) {
          var E = s(w, _);
          E ? E.clear() : w.foldCode(r(_, 0), C);
        }
      }
    }
    ar(g, "onGutterClick");
    function m(w) {
      var _ = w.state.foldGutter;
      if (_) {
        var S = _.options;
        _.from = _.to = 0, clearTimeout(_.changeUpdate), _.changeUpdate = setTimeout(function() {
          d(w);
        }, S.foldOnChangeTimeSpan || 600);
      }
    }
    ar(m, "onChange");
    function v(w) {
      var _ = w.state.foldGutter;
      if (_) {
        var S = _.options;
        clearTimeout(_.changeUpdate), _.changeUpdate = setTimeout(function() {
          var x = w.getViewport();
          _.from == _.to || x.from - _.to > 20 || _.from - x.to > 20 ? d(w) : w.operation(function() {
            x.from < _.from && (c(w, x.from, _.from), _.from = x.from), x.to > _.to && (c(w, _.to, x.to), _.to = x.to);
          });
        }, S.updateViewportTimeSpan || 400);
      }
    }
    ar(v, "onViewportChange");
    function b(w, _) {
      var S = w.state.foldGutter;
      if (S) {
        var x = _.line;
        x >= S.from && x < S.to && c(w, x, x + 1);
      }
    }
    ar(b, "onFold");
  });
})();
var V8 = Y7e.exports;
const J7e = /* @__PURE__ */ Kr(V8), X7e = /* @__PURE__ */ P8({
  __proto__: null,
  default: J7e
}, [V8]), j8 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  f: X7e
}, Symbol.toStringTag, { value: "Module" }));
var Z7e = Object.defineProperty, vn = (e, t) => Z7e(e, "name", { value: t, configurable: !0 });
function U8(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" }));
}
vn(U8, "_mergeNamespaces");
var e9e = { exports: {} };
(function(e, t) {
  (function(n) {
    n(Ir());
  })(function(n) {
    var r = "CodeMirror-lint-markers", o = "CodeMirror-lint-line-";
    function i(D, A, F) {
      var $ = document.createElement("div");
      $.className = "CodeMirror-lint-tooltip cm-s-" + D.options.theme, $.appendChild(F.cloneNode(!0)), D.state.lint.options.selfContain ? D.getWrapperElement().appendChild($) : document.body.appendChild($);
      function q(H) {
        if (!$.parentNode)
          return n.off(document, "mousemove", q);
        $.style.top = Math.max(0, H.clientY - $.offsetHeight - 5) + "px", $.style.left = H.clientX + 5 + "px";
      }
      return vn(q, "position"), n.on(document, "mousemove", q), q(A), $.style.opacity != null && ($.style.opacity = 1), $;
    }
    vn(i, "showTooltip");
    function s(D) {
      D.parentNode && D.parentNode.removeChild(D);
    }
    vn(s, "rm");
    function l(D) {
      D.parentNode && (D.style.opacity == null && s(D), D.style.opacity = 0, setTimeout(function() {
        s(D);
      }, 600));
    }
    vn(l, "hideTooltip");
    function c(D, A, F, $) {
      var q = i(D, A, F);
      function H() {
        n.off($, "mouseout", H), q && (l(q), q = null);
      }
      vn(H, "hide");
      var z = setInterval(function() {
        if (q)
          for (var B = $; ; B = B.parentNode) {
            if (B && B.nodeType == 11 && (B = B.host), B == document.body)
              return;
            if (!B) {
              H();
              break;
            }
          }
        if (!q)
          return clearInterval(z);
      }, 400);
      n.on($, "mouseout", H);
    }
    vn(c, "showTooltipFor");
    function f(D, A, F) {
      this.marked = [], A instanceof Function && (A = { getAnnotations: A }), (!A || A === !0) && (A = {}), this.options = {}, this.linterOptions = A.options || {};
      for (var $ in d)
        this.options[$] = d[$];
      for (var $ in A)
        d.hasOwnProperty($) ? A[$] != null && (this.options[$] = A[$]) : A.options || (this.linterOptions[$] = A[$]);
      this.timeout = null, this.hasGutter = F, this.onMouseOver = function(q) {
        I(D, q);
      }, this.waitingFor = 0;
    }
    vn(f, "LintState");
    var d = {
      highlightLines: !1,
      tooltips: !0,
      delay: 500,
      lintOnChange: !0,
      getAnnotations: null,
      async: !1,
      selfContain: null,
      formatAnnotation: null,
      onUpdateLinting: null
    };
    function g(D) {
      var A = D.state.lint;
      A.hasGutter && D.clearGutter(r), A.options.highlightLines && m(D);
      for (var F = 0; F < A.marked.length; ++F)
        A.marked[F].clear();
      A.marked.length = 0;
    }
    vn(g, "clearMarks");
    function m(D) {
      D.eachLine(function(A) {
        var F = A.wrapClass && /\bCodeMirror-lint-line-\w+\b/.exec(A.wrapClass);
        F && D.removeLineClass(A, "wrap", F[0]);
      });
    }
    vn(m, "clearErrorLines");
    function v(D, A, F, $, q) {
      var H = document.createElement("div"), z = H;
      return H.className = "CodeMirror-lint-marker CodeMirror-lint-marker-" + F, $ && (z = H.appendChild(document.createElement("div")), z.className = "CodeMirror-lint-marker CodeMirror-lint-marker-multiple"), q != !1 && n.on(z, "mouseover", function(B) {
        c(D, B, A, z);
      }), H;
    }
    vn(v, "makeMarker");
    function b(D, A) {
      return D == "error" ? D : A;
    }
    vn(b, "getMaxSeverity");
    function w(D) {
      for (var A = [], F = 0; F < D.length; ++F) {
        var $ = D[F], q = $.from.line;
        (A[q] || (A[q] = [])).push($);
      }
      return A;
    }
    vn(w, "groupByLine");
    function _(D) {
      var A = D.severity;
      A || (A = "error");
      var F = document.createElement("div");
      return F.className = "CodeMirror-lint-message CodeMirror-lint-message-" + A, typeof D.messageHTML < "u" ? F.innerHTML = D.messageHTML : F.appendChild(document.createTextNode(D.message)), F;
    }
    vn(_, "annotationTooltip");
    function S(D, A) {
      var F = D.state.lint, $ = ++F.waitingFor;
      function q() {
        $ = -1, D.off("change", q);
      }
      vn(q, "abort"), D.on("change", q), A(D.getValue(), function(H, z) {
        D.off("change", q), F.waitingFor == $ && (z && H instanceof n && (H = z), D.operation(function() {
          C(D, H);
        }));
      }, F.linterOptions, D);
    }
    vn(S, "lintAsync");
    function x(D) {
      var A = D.state.lint;
      if (A) {
        var F = A.options, $ = F.getAnnotations || D.getHelper(n.Pos(0, 0), "lint");
        if ($)
          if (F.async || $.async)
            S(D, $);
          else {
            var q = $(D.getValue(), A.linterOptions, D);
            if (!q)
              return;
            q.then ? q.then(function(H) {
              D.operation(function() {
                C(D, H);
              });
            }) : D.operation(function() {
              C(D, q);
            });
          }
      }
    }
    vn(x, "startLinting");
    function C(D, A) {
      var F = D.state.lint;
      if (F) {
        var $ = F.options;
        g(D);
        for (var q = w(A), H = 0; H < q.length; ++H) {
          var z = q[H];
          if (z) {
            var B = [];
            z = z.filter(function(Z) {
              return B.indexOf(Z.message) > -1 ? !1 : B.push(Z.message);
            });
            for (var R = null, te = F.hasGutter && document.createDocumentFragment(), Q = 0; Q < z.length; ++Q) {
              var Y = z[Q], K = Y.severity;
              K || (K = "error"), R = b(R, K), $.formatAnnotation && (Y = $.formatAnnotation(Y)), F.hasGutter && te.appendChild(_(Y)), Y.to && F.marked.push(D.markText(Y.from, Y.to, {
                className: "CodeMirror-lint-mark CodeMirror-lint-mark-" + K,
                __annotation: Y
              }));
            }
            F.hasGutter && D.setGutterMarker(H, r, v(
              D,
              te,
              R,
              q[H].length > 1,
              $.tooltips
            )), $.highlightLines && D.addLineClass(H, "wrap", o + R);
          }
        }
        $.onUpdateLinting && $.onUpdateLinting(A, q, D);
      }
    }
    vn(C, "updateLinting");
    function E(D) {
      var A = D.state.lint;
      A && (clearTimeout(A.timeout), A.timeout = setTimeout(function() {
        x(D);
      }, A.options.delay));
    }
    vn(E, "onChange");
    function N(D, A, F) {
      for (var $ = F.target || F.srcElement, q = document.createDocumentFragment(), H = 0; H < A.length; H++) {
        var z = A[H];
        q.appendChild(_(z));
      }
      c(D, F, q, $);
    }
    vn(N, "popupTooltips");
    function I(D, A) {
      var F = A.target || A.srcElement;
      if (/\bCodeMirror-lint-mark-/.test(F.className)) {
        for (var $ = F.getBoundingClientRect(), q = ($.left + $.right) / 2, H = ($.top + $.bottom) / 2, z = D.findMarksAt(D.coordsChar({ left: q, top: H }, "client")), B = [], R = 0; R < z.length; ++R) {
          var te = z[R].__annotation;
          te && B.push(te);
        }
        B.length && N(D, B, A);
      }
    }
    vn(I, "onMouseOver"), n.defineOption("lint", !1, function(D, A, F) {
      if (F && F != n.Init && (g(D), D.state.lint.options.lintOnChange !== !1 && D.off("change", E), n.off(D.getWrapperElement(), "mouseover", D.state.lint.onMouseOver), clearTimeout(D.state.lint.timeout), delete D.state.lint), A) {
        for (var $ = D.getOption("gutters"), q = !1, H = 0; H < $.length; ++H)
          $[H] == r && (q = !0);
        var z = D.state.lint = new f(D, A, q);
        z.options.lintOnChange && D.on("change", E), z.options.tooltips != !1 && z.options.tooltips != "gutter" && n.on(D.getWrapperElement(), "mouseover", z.onMouseOver), x(D);
      }
    }), n.defineExtension("performLint", function() {
      x(this);
    });
  });
})();
var B8 = e9e.exports;
const t9e = /* @__PURE__ */ Kr(B8), n9e = /* @__PURE__ */ U8({
  __proto__: null,
  default: t9e
}, [B8]), r9e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  l: n9e
}, Symbol.toStringTag, { value: "Module" }));
var o9e = Object.defineProperty, ir = (e, t) => o9e(e, "name", { value: t, configurable: !0 }), i9e = { exports: {} }, AR;
function S1() {
  return AR || (AR = 1, function(e, t) {
    (function(n) {
      n(Ir());
    })(function(n) {
      var r = n.Pos;
      function o(x) {
        var C = x.flags;
        return C ?? (x.ignoreCase ? "i" : "") + (x.global ? "g" : "") + (x.multiline ? "m" : "");
      }
      ir(o, "regexpFlags");
      function i(x, C) {
        for (var E = o(x), N = E, I = 0; I < C.length; I++)
          N.indexOf(C.charAt(I)) == -1 && (N += C.charAt(I));
        return E == N ? x : new RegExp(x.source, N);
      }
      ir(i, "ensureFlags");
      function s(x) {
        return /\\s|\\n|\n|\\W|\\D|\[\^/.test(x.source);
      }
      ir(s, "maybeMultiline");
      function l(x, C, E) {
        C = i(C, "g");
        for (var N = E.line, I = E.ch, D = x.lastLine(); N <= D; N++, I = 0) {
          C.lastIndex = I;
          var A = x.getLine(N), F = C.exec(A);
          if (F)
            return {
              from: r(N, F.index),
              to: r(N, F.index + F[0].length),
              match: F
            };
        }
      }
      ir(l, "searchRegexpForward");
      function c(x, C, E) {
        if (!s(C))
          return l(x, C, E);
        C = i(C, "gm");
        for (var N, I = 1, D = E.line, A = x.lastLine(); D <= A; ) {
          for (var F = 0; F < I && !(D > A); F++) {
            var $ = x.getLine(D++);
            N = N == null ? $ : N + `
` + $;
          }
          I = I * 2, C.lastIndex = E.ch;
          var q = C.exec(N);
          if (q) {
            var H = N.slice(0, q.index).split(`
`), z = q[0].split(`
`), B = E.line + H.length - 1, R = H[H.length - 1].length;
            return {
              from: r(B, R),
              to: r(
                B + z.length - 1,
                z.length == 1 ? R + z[0].length : z[z.length - 1].length
              ),
              match: q
            };
          }
        }
      }
      ir(c, "searchRegexpForwardMultiline");
      function f(x, C, E) {
        for (var N, I = 0; I <= x.length; ) {
          C.lastIndex = I;
          var D = C.exec(x);
          if (!D)
            break;
          var A = D.index + D[0].length;
          if (A > x.length - E)
            break;
          (!N || A > N.index + N[0].length) && (N = D), I = D.index + 1;
        }
        return N;
      }
      ir(f, "lastMatchIn");
      function d(x, C, E) {
        C = i(C, "g");
        for (var N = E.line, I = E.ch, D = x.firstLine(); N >= D; N--, I = -1) {
          var A = x.getLine(N), F = f(A, C, I < 0 ? 0 : A.length - I);
          if (F)
            return {
              from: r(N, F.index),
              to: r(N, F.index + F[0].length),
              match: F
            };
        }
      }
      ir(d, "searchRegexpBackward");
      function g(x, C, E) {
        if (!s(C))
          return d(x, C, E);
        C = i(C, "gm");
        for (var N, I = 1, D = x.getLine(E.line).length - E.ch, A = E.line, F = x.firstLine(); A >= F; ) {
          for (var $ = 0; $ < I && A >= F; $++) {
            var q = x.getLine(A--);
            N = N == null ? q : q + `
` + N;
          }
          I *= 2;
          var H = f(N, C, D);
          if (H) {
            var z = N.slice(0, H.index).split(`
`), B = H[0].split(`
`), R = A + z.length, te = z[z.length - 1].length;
            return {
              from: r(R, te),
              to: r(
                R + B.length - 1,
                B.length == 1 ? te + B[0].length : B[B.length - 1].length
              ),
              match: H
            };
          }
        }
      }
      ir(g, "searchRegexpBackwardMultiline");
      var m, v;
      String.prototype.normalize ? (m = /* @__PURE__ */ ir(function(x) {
        return x.normalize("NFD").toLowerCase();
      }, "doFold"), v = /* @__PURE__ */ ir(function(x) {
        return x.normalize("NFD");
      }, "noFold")) : (m = /* @__PURE__ */ ir(function(x) {
        return x.toLowerCase();
      }, "doFold"), v = /* @__PURE__ */ ir(function(x) {
        return x;
      }, "noFold"));
      function b(x, C, E, N) {
        if (x.length == C.length)
          return E;
        for (var I = 0, D = E + Math.max(0, x.length - C.length); ; ) {
          if (I == D)
            return I;
          var A = I + D >> 1, F = N(x.slice(0, A)).length;
          if (F == E)
            return A;
          F > E ? D = A : I = A + 1;
        }
      }
      ir(b, "adjustPos");
      function w(x, C, E, N) {
        if (!C.length)
          return null;
        var I = N ? m : v, D = I(C).split(/\r|\n\r?/);
        e:
          for (var A = E.line, F = E.ch, $ = x.lastLine() + 1 - D.length; A <= $; A++, F = 0) {
            var q = x.getLine(A).slice(F), H = I(q);
            if (D.length == 1) {
              var z = H.indexOf(D[0]);
              if (z == -1)
                continue e;
              var E = b(q, H, z, I) + F;
              return {
                from: r(A, b(q, H, z, I) + F),
                to: r(A, b(q, H, z + D[0].length, I) + F)
              };
            } else {
              var B = H.length - D[0].length;
              if (H.slice(B) != D[0])
                continue e;
              for (var R = 1; R < D.length - 1; R++)
                if (I(x.getLine(A + R)) != D[R])
                  continue e;
              var te = x.getLine(A + D.length - 1), Q = I(te), Y = D[D.length - 1];
              if (Q.slice(0, Y.length) != Y)
                continue e;
              return {
                from: r(A, b(q, H, B, I) + F),
                to: r(A + D.length - 1, b(te, Q, Y.length, I))
              };
            }
          }
      }
      ir(w, "searchStringForward");
      function _(x, C, E, N) {
        if (!C.length)
          return null;
        var I = N ? m : v, D = I(C).split(/\r|\n\r?/);
        e:
          for (var A = E.line, F = E.ch, $ = x.firstLine() - 1 + D.length; A >= $; A--, F = -1) {
            var q = x.getLine(A);
            F > -1 && (q = q.slice(0, F));
            var H = I(q);
            if (D.length == 1) {
              var z = H.lastIndexOf(D[0]);
              if (z == -1)
                continue e;
              return {
                from: r(A, b(q, H, z, I)),
                to: r(A, b(q, H, z + D[0].length, I))
              };
            } else {
              var B = D[D.length - 1];
              if (H.slice(0, B.length) != B)
                continue e;
              for (var R = 1, E = A - D.length + 1; R < D.length - 1; R++)
                if (I(x.getLine(E + R)) != D[R])
                  continue e;
              var te = x.getLine(A + 1 - D.length), Q = I(te);
              if (Q.slice(Q.length - D[0].length) != D[0])
                continue e;
              return {
                from: r(A + 1 - D.length, b(te, Q, te.length - D[0].length, I)),
                to: r(A, b(q, H, B.length, I))
              };
            }
          }
      }
      ir(_, "searchStringBackward");
      function S(x, C, E, N) {
        this.atOccurrence = !1, this.afterEmptyMatch = !1, this.doc = x, E = E ? x.clipPos(E) : r(0, 0), this.pos = { from: E, to: E };
        var I;
        typeof N == "object" ? I = N.caseFold : (I = N, N = null), typeof C == "string" ? (I == null && (I = !1), this.matches = function(D, A) {
          return (D ? _ : w)(x, C, A, I);
        }) : (C = i(C, "gm"), !N || N.multiline !== !1 ? this.matches = function(D, A) {
          return (D ? g : c)(x, C, A);
        } : this.matches = function(D, A) {
          return (D ? d : l)(x, C, A);
        });
      }
      ir(S, "SearchCursor"), S.prototype = {
        findNext: function() {
          return this.find(!1);
        },
        findPrevious: function() {
          return this.find(!0);
        },
        find: function(x) {
          var C = this.doc.clipPos(x ? this.pos.from : this.pos.to);
          if (this.afterEmptyMatch && this.atOccurrence && (C = r(C.line, C.ch), x ? (C.ch--, C.ch < 0 && (C.line--, C.ch = (this.doc.getLine(C.line) || "").length)) : (C.ch++, C.ch > (this.doc.getLine(C.line) || "").length && (C.ch = 0, C.line++)), n.cmpPos(C, this.doc.clipPos(C)) != 0))
            return this.atOccurrence = !1;
          var E = this.matches(x, C);
          if (this.afterEmptyMatch = E && n.cmpPos(E.from, E.to) == 0, E)
            return this.pos = E, this.atOccurrence = !0, this.pos.match || !0;
          var N = r(x ? this.doc.firstLine() : this.doc.lastLine() + 1, 0);
          return this.pos = { from: N, to: N }, this.atOccurrence = !1;
        },
        from: function() {
          if (this.atOccurrence)
            return this.pos.from;
        },
        to: function() {
          if (this.atOccurrence)
            return this.pos.to;
        },
        replace: function(x, C) {
          if (this.atOccurrence) {
            var E = n.splitLines(x);
            this.doc.replaceRange(E, this.pos.from, this.pos.to, C), this.pos.to = r(
              this.pos.from.line + E.length - 1,
              E[E.length - 1].length + (E.length == 1 ? this.pos.from.ch : 0)
            );
          }
        }
      }, n.defineExtension("getSearchCursor", function(x, C, E) {
        return new S(this.doc, x, C, E);
      }), n.defineDocExtension("getSearchCursor", function(x, C, E) {
        return new S(this, x, C, E);
      }), n.defineExtension("selectMatches", function(x, C) {
        for (var E = [], N = this.getSearchCursor(x, this.getCursor("from"), C); N.findNext() && !(n.cmpPos(N.to(), this.getCursor("to")) > 0); )
          E.push({ anchor: N.from(), head: N.to() });
        E.length && this.setSelections(E, 0);
      });
    });
  }()), i9e.exports;
}
ir(S1, "requireSearchcursor");
var s9e = Object.defineProperty, a9e = (e, t) => s9e(e, "name", { value: t, configurable: !0 });
function q8(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" }));
}
a9e(q8, "_mergeNamespaces");
var z8 = S1();
const l9e = /* @__PURE__ */ Kr(z8), c9e = /* @__PURE__ */ q8({
  __proto__: null,
  default: l9e
}, [z8]), H8 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  s: c9e
}, Symbol.toStringTag, { value: "Module" }));
var u9e = Object.defineProperty, Iu = (e, t) => u9e(e, "name", { value: t, configurable: !0 });
function W8(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" }));
}
Iu(W8, "_mergeNamespaces");
var f9e = { exports: {} };
(function(e, t) {
  (function(n) {
    n(Ir());
  })(function(n) {
    function r(i, s, l) {
      var c = i.getWrapperElement(), f;
      return f = c.appendChild(document.createElement("div")), l ? f.className = "CodeMirror-dialog CodeMirror-dialog-bottom" : f.className = "CodeMirror-dialog CodeMirror-dialog-top", typeof s == "string" ? f.innerHTML = s : f.appendChild(s), n.addClass(c, "dialog-opened"), f;
    }
    Iu(r, "dialogDiv");
    function o(i, s) {
      i.state.currentNotificationClose && i.state.currentNotificationClose(), i.state.currentNotificationClose = s;
    }
    Iu(o, "closeNotification"), n.defineExtension("openDialog", function(i, s, l) {
      l || (l = {}), o(this, null);
      var c = r(this, i, l.bottom), f = !1, d = this;
      function g(b) {
        if (typeof b == "string")
          m.value = b;
        else {
          if (f)
            return;
          f = !0, n.rmClass(c.parentNode, "dialog-opened"), c.parentNode.removeChild(c), d.focus(), l.onClose && l.onClose(c);
        }
      }
      Iu(g, "close");
      var m = c.getElementsByTagName("input")[0], v;
      return m ? (m.focus(), l.value && (m.value = l.value, l.selectValueOnOpen !== !1 && m.select()), l.onInput && n.on(m, "input", function(b) {
        l.onInput(b, m.value, g);
      }), l.onKeyUp && n.on(m, "keyup", function(b) {
        l.onKeyUp(b, m.value, g);
      }), n.on(m, "keydown", function(b) {
        l && l.onKeyDown && l.onKeyDown(b, m.value, g) || ((b.keyCode == 27 || l.closeOnEnter !== !1 && b.keyCode == 13) && (m.blur(), n.e_stop(b), g()), b.keyCode == 13 && s(m.value, b));
      }), l.closeOnBlur !== !1 && n.on(c, "focusout", function(b) {
        b.relatedTarget !== null && g();
      })) : (v = c.getElementsByTagName("button")[0]) && (n.on(v, "click", function() {
        g(), d.focus();
      }), l.closeOnBlur !== !1 && n.on(v, "blur", g), v.focus()), g;
    }), n.defineExtension("openConfirm", function(i, s, l) {
      o(this, null);
      var c = r(this, i, l && l.bottom), f = c.getElementsByTagName("button"), d = !1, g = this, m = 1;
      function v() {
        d || (d = !0, n.rmClass(c.parentNode, "dialog-opened"), c.parentNode.removeChild(c), g.focus());
      }
      Iu(v, "close"), f[0].focus();
      for (var b = 0; b < f.length; ++b) {
        var w = f[b];
        (function(_) {
          n.on(w, "click", function(S) {
            n.e_preventDefault(S), v(), _ && _(g);
          });
        })(s[b]), n.on(w, "blur", function() {
          --m, setTimeout(function() {
            m <= 0 && v();
          }, 200);
        }), n.on(w, "focus", function() {
          ++m;
        });
      }
    }), n.defineExtension("openNotification", function(i, s) {
      o(this, g);
      var l = r(this, i, s && s.bottom), c = !1, f, d = s && typeof s.duration < "u" ? s.duration : 5e3;
      function g() {
        c || (c = !0, clearTimeout(f), n.rmClass(l.parentNode, "dialog-opened"), l.parentNode.removeChild(l));
      }
      return Iu(g, "close"), n.on(l, "click", function(m) {
        n.e_preventDefault(m), g();
      }), d && (f = setTimeout(g, d)), g;
    });
  });
})();
var Wh = f9e.exports;
const d9e = /* @__PURE__ */ Kr(Wh), p9e = /* @__PURE__ */ W8({
  __proto__: null,
  default: d9e
}, [Wh]), G8 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  a: Wh,
  d: p9e
}, Symbol.toStringTag, { value: "Module" }));
var h9e = Object.defineProperty, dv = (e, t) => h9e(e, "name", { value: t, configurable: !0 });
function Q8(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" }));
}
dv(Q8, "_mergeNamespaces");
var m9e = { exports: {} };
(function(e, t) {
  (function(n) {
    n(Ir(), Wh);
  })(function(n) {
    n.defineOption("search", { bottom: !1 });
    function r(s, l, c, f, d) {
      s.openDialog ? s.openDialog(l, d, { value: f, selectValueOnOpen: !0, bottom: s.options.search.bottom }) : d(prompt(c, f));
    }
    dv(r, "dialog");
    function o(s) {
      return s.phrase("Jump to line:") + ' <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">' + s.phrase("(Use line:column or scroll% syntax)") + "</span>";
    }
    dv(o, "getJumpDialog");
    function i(s, l) {
      var c = Number(l);
      return /^[-+]/.test(l) ? s.getCursor().line + c : c - 1;
    }
    dv(i, "interpretLine"), n.commands.jumpToLine = function(s) {
      var l = s.getCursor();
      r(s, o(s), s.phrase("Jump to line:"), l.line + 1 + ":" + l.ch, function(c) {
        if (c) {
          var f;
          if (f = /^\s*([\+\-]?\d+)\s*\:\s*(\d+)\s*$/.exec(c))
            s.setCursor(i(s, f[1]), Number(f[2]));
          else if (f = /^\s*([\+\-]?\d+(\.\d+)?)\%\s*/.exec(c)) {
            var d = Math.round(s.lineCount() * Number(f[1]) / 100);
            /^[-+]/.test(f[1]) && (d = l.line + d + 1), s.setCursor(d - 1, l.ch);
          } else
            (f = /^\s*\:?\s*([\+\-]?\d+)\s*/.exec(c)) && s.setCursor(i(s, f[1]), l.ch);
        }
      });
    }, n.keyMap.default["Alt-G"] = "jumpToLine";
  });
})();
var Y8 = m9e.exports;
const g9e = /* @__PURE__ */ Kr(Y8), v9e = /* @__PURE__ */ Q8({
  __proto__: null,
  default: g9e
}, [Y8]), K8 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  j: v9e
}, Symbol.toStringTag, { value: "Module" }));
var y9e = Object.defineProperty, po = (e, t) => y9e(e, "name", { value: t, configurable: !0 });
function J8(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" }));
}
po(J8, "_mergeNamespaces");
var b9e = { exports: {} };
(function(e, t) {
  (function(n) {
    n(Ir(), S1(), b_());
  })(function(n) {
    var r = n.commands, o = n.Pos;
    function i(E, N, I) {
      if (I < 0 && N.ch == 0)
        return E.clipPos(o(N.line - 1));
      var D = E.getLine(N.line);
      if (I > 0 && N.ch >= D.length)
        return E.clipPos(o(N.line + 1, 0));
      for (var A = "start", F, $ = N.ch, q = $, H = I < 0 ? 0 : D.length, z = 0; q != H; q += I, z++) {
        var B = D.charAt(I < 0 ? q - 1 : q), R = B != "_" && n.isWordChar(B) ? "w" : "o";
        if (R == "w" && B.toUpperCase() == B && (R = "W"), A == "start")
          R != "o" ? (A = "in", F = R) : $ = q + I;
        else if (A == "in" && F != R) {
          if (F == "w" && R == "W" && I < 0 && q--, F == "W" && R == "w" && I > 0)
            if (q == $ + 1) {
              F = "w";
              continue;
            } else
              q--;
          break;
        }
      }
      return o(N.line, q);
    }
    po(i, "findPosSubword");
    function s(E, N) {
      E.extendSelectionsBy(function(I) {
        return E.display.shift || E.doc.extend || I.empty() ? i(E.doc, I.head, N) : N < 0 ? I.from() : I.to();
      });
    }
    po(s, "moveSubword"), r.goSubwordLeft = function(E) {
      s(E, -1);
    }, r.goSubwordRight = function(E) {
      s(E, 1);
    }, r.scrollLineUp = function(E) {
      var N = E.getScrollInfo();
      if (!E.somethingSelected()) {
        var I = E.lineAtHeight(N.top + N.clientHeight, "local");
        E.getCursor().line >= I && E.execCommand("goLineUp");
      }
      E.scrollTo(null, N.top - E.defaultTextHeight());
    }, r.scrollLineDown = function(E) {
      var N = E.getScrollInfo();
      if (!E.somethingSelected()) {
        var I = E.lineAtHeight(N.top, "local") + 1;
        E.getCursor().line <= I && E.execCommand("goLineDown");
      }
      E.scrollTo(null, N.top + E.defaultTextHeight());
    }, r.splitSelectionByLine = function(E) {
      for (var N = E.listSelections(), I = [], D = 0; D < N.length; D++)
        for (var A = N[D].from(), F = N[D].to(), $ = A.line; $ <= F.line; ++$)
          F.line > A.line && $ == F.line && F.ch == 0 || I.push({
            anchor: $ == A.line ? A : o($, 0),
            head: $ == F.line ? F : o($)
          });
      E.setSelections(I, 0);
    }, r.singleSelectionTop = function(E) {
      var N = E.listSelections()[0];
      E.setSelection(N.anchor, N.head, { scroll: !1 });
    }, r.selectLine = function(E) {
      for (var N = E.listSelections(), I = [], D = 0; D < N.length; D++) {
        var A = N[D];
        I.push({
          anchor: o(A.from().line, 0),
          head: o(A.to().line + 1, 0)
        });
      }
      E.setSelections(I);
    };
    function l(E, N) {
      if (E.isReadOnly())
        return n.Pass;
      E.operation(function() {
        for (var I = E.listSelections().length, D = [], A = -1, F = 0; F < I; F++) {
          var $ = E.listSelections()[F].head;
          if (!($.line <= A)) {
            var q = o($.line + (N ? 0 : 1), 0);
            E.replaceRange(`
`, q, null, "+insertLine"), E.indentLine(q.line, null, !0), D.push({ head: q, anchor: q }), A = $.line + 1;
          }
        }
        E.setSelections(D);
      }), E.execCommand("indentAuto");
    }
    po(l, "insertLine"), r.insertLineAfter = function(E) {
      return l(E, !1);
    }, r.insertLineBefore = function(E) {
      return l(E, !0);
    };
    function c(E, N) {
      for (var I = N.ch, D = I, A = E.getLine(N.line); I && n.isWordChar(A.charAt(I - 1)); )
        --I;
      for (; D < A.length && n.isWordChar(A.charAt(D)); )
        ++D;
      return { from: o(N.line, I), to: o(N.line, D), word: A.slice(I, D) };
    }
    po(c, "wordAt"), r.selectNextOccurrence = function(E) {
      var N = E.getCursor("from"), I = E.getCursor("to"), D = E.state.sublimeFindFullWord == E.doc.sel;
      if (n.cmpPos(N, I) == 0) {
        var A = c(E, N);
        if (!A.word)
          return;
        E.setSelection(A.from, A.to), D = !0;
      } else {
        var F = E.getRange(N, I), $ = D ? new RegExp("\\b" + F + "\\b") : F, q = E.getSearchCursor($, I), H = q.findNext();
        if (H || (q = E.getSearchCursor($, o(E.firstLine(), 0)), H = q.findNext()), !H || d(E.listSelections(), q.from(), q.to()))
          return;
        E.addSelection(q.from(), q.to());
      }
      D && (E.state.sublimeFindFullWord = E.doc.sel);
    }, r.skipAndSelectNextOccurrence = function(E) {
      var N = E.getCursor("anchor"), I = E.getCursor("head");
      r.selectNextOccurrence(E), n.cmpPos(N, I) != 0 && E.doc.setSelections(E.doc.listSelections().filter(function(D) {
        return D.anchor != N || D.head != I;
      }));
    };
    function f(E, N) {
      for (var I = E.listSelections(), D = [], A = 0; A < I.length; A++) {
        var F = I[A], $ = E.findPosV(
          F.anchor,
          N,
          "line",
          F.anchor.goalColumn
        ), q = E.findPosV(
          F.head,
          N,
          "line",
          F.head.goalColumn
        );
        $.goalColumn = F.anchor.goalColumn != null ? F.anchor.goalColumn : E.cursorCoords(F.anchor, "div").left, q.goalColumn = F.head.goalColumn != null ? F.head.goalColumn : E.cursorCoords(F.head, "div").left;
        var H = { anchor: $, head: q };
        D.push(F), D.push(H);
      }
      E.setSelections(D);
    }
    po(f, "addCursorToSelection"), r.addCursorToPrevLine = function(E) {
      f(E, -1);
    }, r.addCursorToNextLine = function(E) {
      f(E, 1);
    };
    function d(E, N, I) {
      for (var D = 0; D < E.length; D++)
        if (n.cmpPos(E[D].from(), N) == 0 && n.cmpPos(E[D].to(), I) == 0)
          return !0;
      return !1;
    }
    po(d, "isSelectedRange");
    var g = "(){}[]";
    function m(E) {
      for (var N = E.listSelections(), I = [], D = 0; D < N.length; D++) {
        var A = N[D], F = A.head, $ = E.scanForBracket(F, -1);
        if (!$)
          return !1;
        for (; ; ) {
          var q = E.scanForBracket(F, 1);
          if (!q)
            return !1;
          if (q.ch == g.charAt(g.indexOf($.ch) + 1)) {
            var H = o($.pos.line, $.pos.ch + 1);
            if (n.cmpPos(H, A.from()) == 0 && n.cmpPos(q.pos, A.to()) == 0) {
              if ($ = E.scanForBracket($.pos, -1), !$)
                return !1;
            } else {
              I.push({ anchor: H, head: q.pos });
              break;
            }
          }
          F = o(q.pos.line, q.pos.ch + 1);
        }
      }
      return E.setSelections(I), !0;
    }
    po(m, "selectBetweenBrackets"), r.selectScope = function(E) {
      m(E) || E.execCommand("selectAll");
    }, r.selectBetweenBrackets = function(E) {
      if (!m(E))
        return n.Pass;
    };
    function v(E) {
      return E ? /\bpunctuation\b/.test(E) ? E : void 0 : null;
    }
    po(v, "puncType"), r.goToBracket = function(E) {
      E.extendSelectionsBy(function(N) {
        var I = E.scanForBracket(N.head, 1, v(E.getTokenTypeAt(N.head)));
        if (I && n.cmpPos(I.pos, N.head) != 0)
          return I.pos;
        var D = E.scanForBracket(N.head, -1, v(E.getTokenTypeAt(o(N.head.line, N.head.ch + 1))));
        return D && o(D.pos.line, D.pos.ch + 1) || N.head;
      });
    }, r.swapLineUp = function(E) {
      if (E.isReadOnly())
        return n.Pass;
      for (var N = E.listSelections(), I = [], D = E.firstLine() - 1, A = [], F = 0; F < N.length; F++) {
        var $ = N[F], q = $.from().line - 1, H = $.to().line;
        A.push({
          anchor: o($.anchor.line - 1, $.anchor.ch),
          head: o($.head.line - 1, $.head.ch)
        }), $.to().ch == 0 && !$.empty() && --H, q > D ? I.push(q, H) : I.length && (I[I.length - 1] = H), D = H;
      }
      E.operation(function() {
        for (var z = 0; z < I.length; z += 2) {
          var B = I[z], R = I[z + 1], te = E.getLine(B);
          E.replaceRange("", o(B, 0), o(B + 1, 0), "+swapLine"), R > E.lastLine() ? E.replaceRange(`
` + te, o(E.lastLine()), null, "+swapLine") : E.replaceRange(te + `
`, o(R, 0), null, "+swapLine");
        }
        E.setSelections(A), E.scrollIntoView();
      });
    }, r.swapLineDown = function(E) {
      if (E.isReadOnly())
        return n.Pass;
      for (var N = E.listSelections(), I = [], D = E.lastLine() + 1, A = N.length - 1; A >= 0; A--) {
        var F = N[A], $ = F.to().line + 1, q = F.from().line;
        F.to().ch == 0 && !F.empty() && $--, $ < D ? I.push($, q) : I.length && (I[I.length - 1] = q), D = q;
      }
      E.operation(function() {
        for (var H = I.length - 2; H >= 0; H -= 2) {
          var z = I[H], B = I[H + 1], R = E.getLine(z);
          z == E.lastLine() ? E.replaceRange("", o(z - 1), o(z), "+swapLine") : E.replaceRange("", o(z, 0), o(z + 1, 0), "+swapLine"), E.replaceRange(R + `
`, o(B, 0), null, "+swapLine");
        }
        E.scrollIntoView();
      });
    }, r.toggleCommentIndented = function(E) {
      E.toggleComment({ indent: !0 });
    }, r.joinLines = function(E) {
      for (var N = E.listSelections(), I = [], D = 0; D < N.length; D++) {
        for (var A = N[D], F = A.from(), $ = F.line, q = A.to().line; D < N.length - 1 && N[D + 1].from().line == q; )
          q = N[++D].to().line;
        I.push({ start: $, end: q, anchor: !A.empty() && F });
      }
      E.operation(function() {
        for (var H = 0, z = [], B = 0; B < I.length; B++) {
          for (var R = I[B], te = R.anchor && o(R.anchor.line - H, R.anchor.ch), Q, Y = R.start; Y <= R.end; Y++) {
            var K = Y - H;
            Y == R.end && (Q = o(K, E.getLine(K).length + 1)), K < E.lastLine() && (E.replaceRange(" ", o(K), o(K + 1, /^\s*/.exec(E.getLine(K + 1))[0].length)), ++H);
          }
          z.push({ anchor: te || Q, head: Q });
        }
        E.setSelections(z, 0);
      });
    }, r.duplicateLine = function(E) {
      E.operation(function() {
        for (var N = E.listSelections().length, I = 0; I < N; I++) {
          var D = E.listSelections()[I];
          D.empty() ? E.replaceRange(E.getLine(D.head.line) + `
`, o(D.head.line, 0)) : E.replaceRange(E.getRange(D.from(), D.to()), D.from());
        }
        E.scrollIntoView();
      });
    };
    function b(E, N, I) {
      if (E.isReadOnly())
        return n.Pass;
      for (var D = E.listSelections(), A = [], F, $ = 0; $ < D.length; $++) {
        var q = D[$];
        if (!q.empty()) {
          for (var H = q.from().line, z = q.to().line; $ < D.length - 1 && D[$ + 1].from().line == z; )
            z = D[++$].to().line;
          D[$].to().ch || z--, A.push(H, z);
        }
      }
      A.length ? F = !0 : A.push(E.firstLine(), E.lastLine()), E.operation(function() {
        for (var B = [], R = 0; R < A.length; R += 2) {
          var te = A[R], Q = A[R + 1], Y = o(te, 0), K = o(Q), Z = E.getRange(Y, K, !1);
          N ? Z.sort(function(re, J) {
            return re < J ? -I : re == J ? 0 : I;
          }) : Z.sort(function(re, J) {
            var ie = re.toUpperCase(), ne = J.toUpperCase();
            return ie != ne && (re = ie, J = ne), re < J ? -I : re == J ? 0 : I;
          }), E.replaceRange(Z, Y, K), F && B.push({ anchor: Y, head: o(Q + 1, 0) });
        }
        F && E.setSelections(B, 0);
      });
    }
    po(b, "sortLines"), r.sortLines = function(E) {
      b(E, !0, 1);
    }, r.reverseSortLines = function(E) {
      b(E, !0, -1);
    }, r.sortLinesInsensitive = function(E) {
      b(E, !1, 1);
    }, r.reverseSortLinesInsensitive = function(E) {
      b(E, !1, -1);
    }, r.nextBookmark = function(E) {
      var N = E.state.sublimeBookmarks;
      if (N)
        for (; N.length; ) {
          var I = N.shift(), D = I.find();
          if (D)
            return N.push(I), E.setSelection(D.from, D.to);
        }
    }, r.prevBookmark = function(E) {
      var N = E.state.sublimeBookmarks;
      if (N)
        for (; N.length; ) {
          N.unshift(N.pop());
          var I = N[N.length - 1].find();
          if (!I)
            N.pop();
          else
            return E.setSelection(I.from, I.to);
        }
    }, r.toggleBookmark = function(E) {
      for (var N = E.listSelections(), I = E.state.sublimeBookmarks || (E.state.sublimeBookmarks = []), D = 0; D < N.length; D++) {
        for (var A = N[D].from(), F = N[D].to(), $ = N[D].empty() ? E.findMarksAt(A) : E.findMarks(A, F), q = 0; q < $.length; q++)
          if ($[q].sublimeBookmark) {
            $[q].clear();
            for (var H = 0; H < I.length; H++)
              I[H] == $[q] && I.splice(H--, 1);
            break;
          }
        q == $.length && I.push(E.markText(A, F, { sublimeBookmark: !0, clearWhenEmpty: !1 }));
      }
    }, r.clearBookmarks = function(E) {
      var N = E.state.sublimeBookmarks;
      if (N)
        for (var I = 0; I < N.length; I++)
          N[I].clear();
      N.length = 0;
    }, r.selectBookmarks = function(E) {
      var N = E.state.sublimeBookmarks, I = [];
      if (N)
        for (var D = 0; D < N.length; D++) {
          var A = N[D].find();
          A ? I.push({ anchor: A.from, head: A.to }) : N.splice(D--, 0);
        }
      I.length && E.setSelections(I, 0);
    };
    function w(E, N) {
      E.operation(function() {
        for (var I = E.listSelections(), D = [], A = [], F = 0; F < I.length; F++) {
          var $ = I[F];
          $.empty() ? (D.push(F), A.push("")) : A.push(N(E.getRange($.from(), $.to())));
        }
        E.replaceSelections(A, "around", "case");
        for (var F = D.length - 1, q; F >= 0; F--) {
          var $ = I[D[F]];
          if (!(q && n.cmpPos($.head, q) > 0)) {
            var H = c(E, $.head);
            q = H.from, E.replaceRange(N(H.word), H.from, H.to);
          }
        }
      });
    }
    po(w, "modifyWordOrSelection"), r.smartBackspace = function(E) {
      if (E.somethingSelected())
        return n.Pass;
      E.operation(function() {
        for (var N = E.listSelections(), I = E.getOption("indentUnit"), D = N.length - 1; D >= 0; D--) {
          var A = N[D].head, F = E.getRange({ line: A.line, ch: 0 }, A), $ = n.countColumn(F, null, E.getOption("tabSize")), q = E.findPosH(A, -1, "char", !1);
          if (F && !/\S/.test(F) && $ % I == 0) {
            var H = new o(
              A.line,
              n.findColumn(F, $ - I, I)
            );
            H.ch != A.ch && (q = H);
          }
          E.replaceRange("", q, A, "+delete");
        }
      });
    }, r.delLineRight = function(E) {
      E.operation(function() {
        for (var N = E.listSelections(), I = N.length - 1; I >= 0; I--)
          E.replaceRange("", N[I].anchor, o(N[I].to().line), "+delete");
        E.scrollIntoView();
      });
    }, r.upcaseAtCursor = function(E) {
      w(E, function(N) {
        return N.toUpperCase();
      });
    }, r.downcaseAtCursor = function(E) {
      w(E, function(N) {
        return N.toLowerCase();
      });
    }, r.setSublimeMark = function(E) {
      E.state.sublimeMark && E.state.sublimeMark.clear(), E.state.sublimeMark = E.setBookmark(E.getCursor());
    }, r.selectToSublimeMark = function(E) {
      var N = E.state.sublimeMark && E.state.sublimeMark.find();
      N && E.setSelection(E.getCursor(), N);
    }, r.deleteToSublimeMark = function(E) {
      var N = E.state.sublimeMark && E.state.sublimeMark.find();
      if (N) {
        var I = E.getCursor(), D = N;
        if (n.cmpPos(I, D) > 0) {
          var A = D;
          D = I, I = A;
        }
        E.state.sublimeKilled = E.getRange(I, D), E.replaceRange("", I, D);
      }
    }, r.swapWithSublimeMark = function(E) {
      var N = E.state.sublimeMark && E.state.sublimeMark.find();
      N && (E.state.sublimeMark.clear(), E.state.sublimeMark = E.setBookmark(E.getCursor()), E.setCursor(N));
    }, r.sublimeYank = function(E) {
      E.state.sublimeKilled != null && E.replaceSelection(E.state.sublimeKilled, null, "paste");
    }, r.showInCenter = function(E) {
      var N = E.cursorCoords(null, "local");
      E.scrollTo(null, (N.top + N.bottom) / 2 - E.getScrollInfo().clientHeight / 2);
    };
    function _(E) {
      var N = E.getCursor("from"), I = E.getCursor("to");
      if (n.cmpPos(N, I) == 0) {
        var D = c(E, N);
        if (!D.word)
          return;
        N = D.from, I = D.to;
      }
      return { from: N, to: I, query: E.getRange(N, I), word: D };
    }
    po(_, "getTarget");
    function S(E, N) {
      var I = _(E);
      if (I) {
        var D = I.query, A = E.getSearchCursor(D, N ? I.to : I.from);
        (N ? A.findNext() : A.findPrevious()) ? E.setSelection(A.from(), A.to()) : (A = E.getSearchCursor(D, N ? o(E.firstLine(), 0) : E.clipPos(o(E.lastLine()))), (N ? A.findNext() : A.findPrevious()) ? E.setSelection(A.from(), A.to()) : I.word && E.setSelection(I.from, I.to));
      }
    }
    po(S, "findAndGoTo"), r.findUnder = function(E) {
      S(E, !0);
    }, r.findUnderPrevious = function(E) {
      S(E, !1);
    }, r.findAllUnder = function(E) {
      var N = _(E);
      if (N) {
        for (var I = E.getSearchCursor(N.query), D = [], A = -1; I.findNext(); )
          D.push({ anchor: I.from(), head: I.to() }), I.from().line <= N.from.line && I.from().ch <= N.from.ch && A++;
        E.setSelections(D, A);
      }
    };
    var x = n.keyMap;
    x.macSublime = {
      "Cmd-Left": "goLineStartSmart",
      "Shift-Tab": "indentLess",
      "Shift-Ctrl-K": "deleteLine",
      "Alt-Q": "wrapLines",
      "Ctrl-Left": "goSubwordLeft",
      "Ctrl-Right": "goSubwordRight",
      "Ctrl-Alt-Up": "scrollLineUp",
      "Ctrl-Alt-Down": "scrollLineDown",
      "Cmd-L": "selectLine",
      "Shift-Cmd-L": "splitSelectionByLine",
      Esc: "singleSelectionTop",
      "Cmd-Enter": "insertLineAfter",
      "Shift-Cmd-Enter": "insertLineBefore",
      "Cmd-D": "selectNextOccurrence",
      "Shift-Cmd-Space": "selectScope",
      "Shift-Cmd-M": "selectBetweenBrackets",
      "Cmd-M": "goToBracket",
      "Cmd-Ctrl-Up": "swapLineUp",
      "Cmd-Ctrl-Down": "swapLineDown",
      "Cmd-/": "toggleCommentIndented",
      "Cmd-J": "joinLines",
      "Shift-Cmd-D": "duplicateLine",
      F5: "sortLines",
      "Shift-F5": "reverseSortLines",
      "Cmd-F5": "sortLinesInsensitive",
      "Shift-Cmd-F5": "reverseSortLinesInsensitive",
      F2: "nextBookmark",
      "Shift-F2": "prevBookmark",
      "Cmd-F2": "toggleBookmark",
      "Shift-Cmd-F2": "clearBookmarks",
      "Alt-F2": "selectBookmarks",
      Backspace: "smartBackspace",
      "Cmd-K Cmd-D": "skipAndSelectNextOccurrence",
      "Cmd-K Cmd-K": "delLineRight",
      "Cmd-K Cmd-U": "upcaseAtCursor",
      "Cmd-K Cmd-L": "downcaseAtCursor",
      "Cmd-K Cmd-Space": "setSublimeMark",
      "Cmd-K Cmd-A": "selectToSublimeMark",
      "Cmd-K Cmd-W": "deleteToSublimeMark",
      "Cmd-K Cmd-X": "swapWithSublimeMark",
      "Cmd-K Cmd-Y": "sublimeYank",
      "Cmd-K Cmd-C": "showInCenter",
      "Cmd-K Cmd-G": "clearBookmarks",
      "Cmd-K Cmd-Backspace": "delLineLeft",
      "Cmd-K Cmd-1": "foldAll",
      "Cmd-K Cmd-0": "unfoldAll",
      "Cmd-K Cmd-J": "unfoldAll",
      "Ctrl-Shift-Up": "addCursorToPrevLine",
      "Ctrl-Shift-Down": "addCursorToNextLine",
      "Cmd-F3": "findUnder",
      "Shift-Cmd-F3": "findUnderPrevious",
      "Alt-F3": "findAllUnder",
      "Shift-Cmd-[": "fold",
      "Shift-Cmd-]": "unfold",
      "Cmd-I": "findIncremental",
      "Shift-Cmd-I": "findIncrementalReverse",
      "Cmd-H": "replace",
      F3: "findNext",
      "Shift-F3": "findPrev",
      fallthrough: "macDefault"
    }, n.normalizeKeyMap(x.macSublime), x.pcSublime = {
      "Shift-Tab": "indentLess",
      "Shift-Ctrl-K": "deleteLine",
      "Alt-Q": "wrapLines",
      "Ctrl-T": "transposeChars",
      "Alt-Left": "goSubwordLeft",
      "Alt-Right": "goSubwordRight",
      "Ctrl-Up": "scrollLineUp",
      "Ctrl-Down": "scrollLineDown",
      "Ctrl-L": "selectLine",
      "Shift-Ctrl-L": "splitSelectionByLine",
      Esc: "singleSelectionTop",
      "Ctrl-Enter": "insertLineAfter",
      "Shift-Ctrl-Enter": "insertLineBefore",
      "Ctrl-D": "selectNextOccurrence",
      "Shift-Ctrl-Space": "selectScope",
      "Shift-Ctrl-M": "selectBetweenBrackets",
      "Ctrl-M": "goToBracket",
      "Shift-Ctrl-Up": "swapLineUp",
      "Shift-Ctrl-Down": "swapLineDown",
      "Ctrl-/": "toggleCommentIndented",
      "Ctrl-J": "joinLines",
      "Shift-Ctrl-D": "duplicateLine",
      F9: "sortLines",
      "Shift-F9": "reverseSortLines",
      "Ctrl-F9": "sortLinesInsensitive",
      "Shift-Ctrl-F9": "reverseSortLinesInsensitive",
      F2: "nextBookmark",
      "Shift-F2": "prevBookmark",
      "Ctrl-F2": "toggleBookmark",
      "Shift-Ctrl-F2": "clearBookmarks",
      "Alt-F2": "selectBookmarks",
      Backspace: "smartBackspace",
      "Ctrl-K Ctrl-D": "skipAndSelectNextOccurrence",
      "Ctrl-K Ctrl-K": "delLineRight",
      "Ctrl-K Ctrl-U": "upcaseAtCursor",
      "Ctrl-K Ctrl-L": "downcaseAtCursor",
      "Ctrl-K Ctrl-Space": "setSublimeMark",
      "Ctrl-K Ctrl-A": "selectToSublimeMark",
      "Ctrl-K Ctrl-W": "deleteToSublimeMark",
      "Ctrl-K Ctrl-X": "swapWithSublimeMark",
      "Ctrl-K Ctrl-Y": "sublimeYank",
      "Ctrl-K Ctrl-C": "showInCenter",
      "Ctrl-K Ctrl-G": "clearBookmarks",
      "Ctrl-K Ctrl-Backspace": "delLineLeft",
      "Ctrl-K Ctrl-1": "foldAll",
      "Ctrl-K Ctrl-0": "unfoldAll",
      "Ctrl-K Ctrl-J": "unfoldAll",
      "Ctrl-Alt-Up": "addCursorToPrevLine",
      "Ctrl-Alt-Down": "addCursorToNextLine",
      "Ctrl-F3": "findUnder",
      "Shift-Ctrl-F3": "findUnderPrevious",
      "Alt-F3": "findAllUnder",
      "Shift-Ctrl-[": "fold",
      "Shift-Ctrl-]": "unfold",
      "Ctrl-I": "findIncremental",
      "Shift-Ctrl-I": "findIncrementalReverse",
      "Ctrl-H": "replace",
      F3: "findNext",
      "Shift-F3": "findPrev",
      fallthrough: "pcDefault"
    }, n.normalizeKeyMap(x.pcSublime);
    var C = x.default == x.macDefault;
    x.sublime = C ? x.macSublime : x.pcSublime;
  });
})();
var X8 = b9e.exports;
const E9e = /* @__PURE__ */ Kr(X8), w9e = /* @__PURE__ */ J8({
  __proto__: null,
  default: E9e
}, [X8]), Z8 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  s: w9e
}, Symbol.toStringTag, { value: "Module" }));
var x9e = Object.defineProperty, ke = (e, t) => x9e(e, "name", { value: t, configurable: !0 });
function eV(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" }));
}
ke(eV, "_mergeNamespaces");
var S9e = { exports: {} };
(function(e, t) {
  (function(n) {
    n(Ir());
  })(function(n) {
    n.defineMode("javascript", function(r, o) {
      var i = r.indentUnit, s = o.statementIndent, l = o.jsonld, c = o.json || l, f = o.trackScope !== !1, d = o.typescript, g = o.wordCharacters || /[\w$\xa1-\uffff]/, m = function() {
        function j(Hn) {
          return { type: Hn, style: "keyword" };
        }
        ke(j, "kw");
        var ee = j("keyword a"), me = j("keyword b"), Se = j("keyword c"), Je = j("keyword d"), ft = j("operator"), Re = { type: "atom", style: "atom" };
        return {
          if: j("if"),
          while: ee,
          with: ee,
          else: me,
          do: me,
          try: me,
          finally: me,
          return: Je,
          break: Je,
          continue: Je,
          new: j("new"),
          delete: Se,
          void: Se,
          throw: Se,
          debugger: j("debugger"),
          var: j("var"),
          const: j("var"),
          let: j("var"),
          function: j("function"),
          catch: j("catch"),
          for: j("for"),
          switch: j("switch"),
          case: j("case"),
          default: j("default"),
          in: ft,
          typeof: ft,
          instanceof: ft,
          true: Re,
          false: Re,
          null: Re,
          undefined: Re,
          NaN: Re,
          Infinity: Re,
          this: j("this"),
          class: j("class"),
          super: j("atom"),
          yield: Se,
          export: j("export"),
          import: j("import"),
          extends: Se,
          await: Se
        };
      }(), v = /[+\-*&%=<>!?|~^@]/, b = /^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;
      function w(j) {
        for (var ee = !1, me, Se = !1; (me = j.next()) != null; ) {
          if (!ee) {
            if (me == "/" && !Se)
              return;
            me == "[" ? Se = !0 : Se && me == "]" && (Se = !1);
          }
          ee = !ee && me == "\\";
        }
      }
      ke(w, "readRegexp");
      var _, S;
      function x(j, ee, me) {
        return _ = j, S = me, ee;
      }
      ke(x, "ret");
      function C(j, ee) {
        var me = j.next();
        if (me == '"' || me == "'")
          return ee.tokenize = E(me), ee.tokenize(j, ee);
        if (me == "." && j.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))
          return x("number", "number");
        if (me == "." && j.match(".."))
          return x("spread", "meta");
        if (/[\[\]{}\(\),;\:\.]/.test(me))
          return x(me);
        if (me == "=" && j.eat(">"))
          return x("=>", "operator");
        if (me == "0" && j.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))
          return x("number", "number");
        if (/\d/.test(me))
          return j.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/), x("number", "number");
        if (me == "/")
          return j.eat("*") ? (ee.tokenize = N, N(j, ee)) : j.eat("/") ? (j.skipToEnd(), x("comment", "comment")) : we(j, ee, 1) ? (w(j), j.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/), x("regexp", "string-2")) : (j.eat("="), x("operator", "operator", j.current()));
        if (me == "`")
          return ee.tokenize = I, I(j, ee);
        if (me == "#" && j.peek() == "!")
          return j.skipToEnd(), x("meta", "meta");
        if (me == "#" && j.eatWhile(g))
          return x("variable", "property");
        if (me == "<" && j.match("!--") || me == "-" && j.match("->") && !/\S/.test(j.string.slice(0, j.start)))
          return j.skipToEnd(), x("comment", "comment");
        if (v.test(me))
          return (me != ">" || !ee.lexical || ee.lexical.type != ">") && (j.eat("=") ? (me == "!" || me == "=") && j.eat("=") : /[<>*+\-|&?]/.test(me) && (j.eat(me), me == ">" && j.eat(me))), me == "?" && j.eat(".") ? x(".") : x("operator", "operator", j.current());
        if (g.test(me)) {
          j.eatWhile(g);
          var Se = j.current();
          if (ee.lastType != ".") {
            if (m.propertyIsEnumerable(Se)) {
              var Je = m[Se];
              return x(Je.type, Je.style, Se);
            }
            if (Se == "async" && j.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/, !1))
              return x("async", "keyword", Se);
          }
          return x("variable", "variable", Se);
        }
      }
      ke(C, "tokenBase");
      function E(j) {
        return function(ee, me) {
          var Se = !1, Je;
          if (l && ee.peek() == "@" && ee.match(b))
            return me.tokenize = C, x("jsonld-keyword", "meta");
          for (; (Je = ee.next()) != null && !(Je == j && !Se); )
            Se = !Se && Je == "\\";
          return Se || (me.tokenize = C), x("string", "string");
        };
      }
      ke(E, "tokenString");
      function N(j, ee) {
        for (var me = !1, Se; Se = j.next(); ) {
          if (Se == "/" && me) {
            ee.tokenize = C;
            break;
          }
          me = Se == "*";
        }
        return x("comment", "comment");
      }
      ke(N, "tokenComment");
      function I(j, ee) {
        for (var me = !1, Se; (Se = j.next()) != null; ) {
          if (!me && (Se == "`" || Se == "$" && j.eat("{"))) {
            ee.tokenize = C;
            break;
          }
          me = !me && Se == "\\";
        }
        return x("quasi", "string-2", j.current());
      }
      ke(I, "tokenQuasi");
      var D = "([{}])";
      function A(j, ee) {
        ee.fatArrowAt && (ee.fatArrowAt = null);
        var me = j.string.indexOf("=>", j.start);
        if (!(me < 0)) {
          if (d) {
            var Se = /:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(j.string.slice(j.start, me));
            Se && (me = Se.index);
          }
          for (var Je = 0, ft = !1, Re = me - 1; Re >= 0; --Re) {
            var Hn = j.string.charAt(Re), eo = D.indexOf(Hn);
            if (eo >= 0 && eo < 3) {
              if (!Je) {
                ++Re;
                break;
              }
              if (--Je == 0) {
                Hn == "(" && (ft = !0);
                break;
              }
            } else if (eo >= 3 && eo < 6)
              ++Je;
            else if (g.test(Hn))
              ft = !0;
            else if (/["'\/`]/.test(Hn))
              for (; ; --Re) {
                if (Re == 0)
                  return;
                var Qc = j.string.charAt(Re - 1);
                if (Qc == Hn && j.string.charAt(Re - 2) != "\\") {
                  Re--;
                  break;
                }
              }
            else if (ft && !Je) {
              ++Re;
              break;
            }
          }
          ft && !Je && (ee.fatArrowAt = Re);
        }
      }
      ke(A, "findFatArrow");
      var F = {
        atom: !0,
        number: !0,
        variable: !0,
        string: !0,
        regexp: !0,
        this: !0,
        import: !0,
        "jsonld-keyword": !0
      };
      function $(j, ee, me, Se, Je, ft) {
        this.indented = j, this.column = ee, this.type = me, this.prev = Je, this.info = ft, Se != null && (this.align = Se);
      }
      ke($, "JSLexical");
      function q(j, ee) {
        if (!f)
          return !1;
        for (var me = j.localVars; me; me = me.next)
          if (me.name == ee)
            return !0;
        for (var Se = j.context; Se; Se = Se.prev)
          for (var me = Se.vars; me; me = me.next)
            if (me.name == ee)
              return !0;
      }
      ke(q, "inScope");
      function H(j, ee, me, Se, Je) {
        var ft = j.cc;
        for (z.state = j, z.stream = Je, z.marked = null, z.cc = ft, z.style = ee, j.lexical.hasOwnProperty("align") || (j.lexical.align = !0); ; ) {
          var Re = ft.length ? ft.pop() : c ? Ie : ge;
          if (Re(me, Se)) {
            for (; ft.length && ft[ft.length - 1].lex; )
              ft.pop()();
            return z.marked ? z.marked : me == "variable" && q(j, Se) ? "variable-2" : ee;
          }
        }
      }
      ke(H, "parseJS");
      var z = { state: null, column: null, marked: null, cc: null };
      function B() {
        for (var j = arguments.length - 1; j >= 0; j--)
          z.cc.push(arguments[j]);
      }
      ke(B, "pass");
      function R() {
        return B.apply(null, arguments), !0;
      }
      ke(R, "cont");
      function te(j, ee) {
        for (var me = ee; me; me = me.next)
          if (me.name == j)
            return !0;
        return !1;
      }
      ke(te, "inList");
      function Q(j) {
        var ee = z.state;
        if (z.marked = "def", !!f) {
          if (ee.context) {
            if (ee.lexical.info == "var" && ee.context && ee.context.block) {
              var me = Y(j, ee.context);
              if (me != null) {
                ee.context = me;
                return;
              }
            } else if (!te(j, ee.localVars)) {
              ee.localVars = new re(j, ee.localVars);
              return;
            }
          }
          o.globalVars && !te(j, ee.globalVars) && (ee.globalVars = new re(j, ee.globalVars));
        }
      }
      ke(Q, "register");
      function Y(j, ee) {
        if (ee)
          if (ee.block) {
            var me = Y(j, ee.prev);
            return me ? me == ee.prev ? ee : new Z(me, ee.vars, !0) : null;
          } else
            return te(j, ee.vars) ? ee : new Z(ee.prev, new re(j, ee.vars), !1);
        else
          return null;
      }
      ke(Y, "registerVarScoped");
      function K(j) {
        return j == "public" || j == "private" || j == "protected" || j == "abstract" || j == "readonly";
      }
      ke(K, "isModifier");
      function Z(j, ee, me) {
        this.prev = j, this.vars = ee, this.block = me;
      }
      ke(Z, "Context");
      function re(j, ee) {
        this.name = j, this.next = ee;
      }
      ke(re, "Var");
      var J = new re("this", new re("arguments", null));
      function ie() {
        z.state.context = new Z(z.state.context, z.state.localVars, !1), z.state.localVars = J;
      }
      ke(ie, "pushcontext");
      function ne() {
        z.state.context = new Z(z.state.context, z.state.localVars, !0), z.state.localVars = null;
      }
      ke(ne, "pushblockcontext"), ie.lex = ne.lex = !0;
      function ae() {
        z.state.localVars = z.state.context.vars, z.state.context = z.state.context.prev;
      }
      ke(ae, "popcontext"), ae.lex = !0;
      function le(j, ee) {
        var me = /* @__PURE__ */ ke(function() {
          var Se = z.state, Je = Se.indented;
          if (Se.lexical.type == "stat")
            Je = Se.lexical.indented;
          else
            for (var ft = Se.lexical; ft && ft.type == ")" && ft.align; ft = ft.prev)
              Je = ft.indented;
          Se.lexical = new $(Je, z.stream.column(), j, null, Se.lexical, ee);
        }, "result");
        return me.lex = !0, me;
      }
      ke(le, "pushlex");
      function de() {
        var j = z.state;
        j.lexical.prev && (j.lexical.type == ")" && (j.indented = j.lexical.indented), j.lexical = j.lexical.prev);
      }
      ke(de, "poplex"), de.lex = !0;
      function xe(j) {
        function ee(me) {
          return me == j ? R() : j == ";" || me == "}" || me == ")" || me == "]" ? B() : R(ee);
        }
        return ke(ee, "exp"), ee;
      }
      ke(xe, "expect");
      function ge(j, ee) {
        return j == "var" ? R(le("vardef", ee), Bc, xe(";"), de) : j == "keyword a" ? R(le("form"), ot, ge, de) : j == "keyword b" ? R(le("form"), ge, de) : j == "keyword d" ? z.stream.match(/^\s*$/, !1) ? R() : R(le("stat"), Ve, xe(";"), de) : j == "debugger" ? R(xe(";")) : j == "{" ? R(le("}"), ne, mr, de, ae) : j == ";" ? R() : j == "if" ? (z.state.lexical.info == "else" && z.state.cc[z.state.cc.length - 1] == de && z.state.cc.pop()(), R(le("form"), ot, ge, de, Hf)) : j == "function" ? R(co) : j == "for" ? R(le("form"), ne, Wf, ge, ae, de) : j == "class" || d && ee == "interface" ? (z.marked = "keyword", R(le("form", j == "class" ? j : ee), sa, de)) : j == "variable" ? d && ee == "declare" ? (z.marked = "keyword", R(ge)) : d && (ee == "module" || ee == "enum" || ee == "type") && z.stream.match(/^\s*\w/, !1) ? (z.marked = "keyword", ee == "enum" ? R(Po) : ee == "type" ? R(Gc, xe("operator"), Ke, xe(";")) : R(le("form"), gr, xe("{"), le("}"), mr, de, de)) : d && ee == "namespace" ? (z.marked = "keyword", R(le("form"), Ie, ge, de)) : d && ee == "abstract" ? (z.marked = "keyword", R(ge)) : R(le("stat"), ml) : j == "switch" ? R(
          le("form"),
          ot,
          xe("{"),
          le("}", "switch"),
          ne,
          mr,
          de,
          de,
          ae
        ) : j == "case" ? R(Ie, xe(":")) : j == "default" ? R(xe(":")) : j == "catch" ? R(le("form"), ie, qe, ge, de, ae) : j == "export" ? R(le("stat"), gl, de) : j == "import" ? R(le("stat"), Qt, de) : j == "async" ? R(ge) : ee == "@" ? R(Ie, ge) : B(le("stat"), Ie, xe(";"), de);
      }
      ke(ge, "statement");
      function qe(j) {
        if (j == "(")
          return R(ai, xe(")"));
      }
      ke(qe, "maybeCatchBinding");
      function Ie(j, ee) {
        return Nt(j, ee, !1);
      }
      ke(Ie, "expression");
      function Oe(j, ee) {
        return Nt(j, ee, !0);
      }
      ke(Oe, "expressionNoComma");
      function ot(j) {
        return j != "(" ? B() : R(le(")"), Ve, xe(")"), de);
      }
      ke(ot, "parenExpr");
      function Nt(j, ee, me) {
        if (z.state.fatArrowAt == z.stream.start) {
          var Se = me ? er : $i;
          if (j == "(")
            return R(ie, le(")"), jt(ai, ")"), de, xe("=>"), Se, ae);
          if (j == "variable")
            return B(ie, gr, xe("=>"), Se, ae);
        }
        var Je = me ? hr : At;
        return F.hasOwnProperty(j) ? R(Je) : j == "function" ? R(co, Je) : j == "class" || d && ee == "interface" ? (z.marked = "keyword", R(le("form"), ia, de)) : j == "keyword c" || j == "async" ? R(me ? Oe : Ie) : j == "(" ? R(le(")"), Ve, xe(")"), de, Je) : j == "operator" || j == "spread" ? R(me ? Oe : Ie) : j == "[" ? R(le("]"), yt, de, Je) : j == "{" ? ta(Io, "}", null, Je) : j == "quasi" ? B(Rt, Je) : j == "new" ? R(ea(me)) : R();
      }
      ke(Nt, "expressionInner");
      function Ve(j) {
        return j.match(/[;\}\)\],]/) ? B() : B(Ie);
      }
      ke(Ve, "maybeexpression");
      function At(j, ee) {
        return j == "," ? R(Ve) : hr(j, ee, !1);
      }
      ke(At, "maybeoperatorComma");
      function hr(j, ee, me) {
        var Se = me == !1 ? At : hr, Je = me == !1 ? Ie : Oe;
        if (j == "=>")
          return R(ie, me ? er : $i, ae);
        if (j == "operator")
          return /\+\+|--/.test(ee) || d && ee == "!" ? R(Se) : d && ee == "<" && z.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/, !1) ? R(le(">"), jt(Ke, ">"), de, Se) : ee == "?" ? R(Ie, xe(":"), Je) : R(Je);
        if (j == "quasi")
          return B(Rt, Se);
        if (j != ";") {
          if (j == "(")
            return ta(Oe, ")", "call", Se);
          if (j == ".")
            return R(jc, Se);
          if (j == "[")
            return R(le("]"), Ve, xe("]"), de, Se);
          if (d && ee == "as")
            return z.marked = "keyword", R(Ke, Se);
          if (j == "regexp")
            return z.state.lastType = z.marked = "operator", z.stream.backUp(z.stream.pos - z.stream.start - 1), R(Je);
        }
      }
      ke(hr, "maybeoperatorNoComma");
      function Rt(j, ee) {
        return j != "quasi" ? B() : ee.slice(ee.length - 2) != "${" ? R(Rt) : R(Ve, hn);
      }
      ke(Rt, "quasi");
      function hn(j) {
        if (j == "}")
          return z.marked = "string-2", z.state.tokenize = I, R(Rt);
      }
      ke(hn, "continueQuasi");
      function $i(j) {
        return A(z.stream, z.state), B(j == "{" ? ge : Ie);
      }
      ke($i, "arrowBody");
      function er(j) {
        return A(z.stream, z.state), B(j == "{" ? ge : Oe);
      }
      ke(er, "arrowBodyNoComma");
      function ea(j) {
        return function(ee) {
          return ee == "." ? R(j ? Yh : Vc) : ee == "variable" && d ? R(cs, j ? hr : At) : B(j ? Oe : Ie);
        };
      }
      ke(ea, "maybeTarget");
      function Vc(j, ee) {
        if (ee == "target")
          return z.marked = "keyword", R(At);
      }
      ke(Vc, "target");
      function Yh(j, ee) {
        if (ee == "target")
          return z.marked = "keyword", R(hr);
      }
      ke(Yh, "targetNoComma");
      function ml(j) {
        return j == ":" ? R(de, ge) : B(At, xe(";"), de);
      }
      ke(ml, "maybelabel");
      function jc(j) {
        if (j == "variable")
          return z.marked = "property", R();
      }
      ke(jc, "property");
      function Io(j, ee) {
        if (j == "async")
          return z.marked = "property", R(Io);
        if (j == "variable" || z.style == "keyword") {
          if (z.marked = "property", ee == "get" || ee == "set")
            return R(zf);
          var me;
          return d && z.state.fatArrowAt == z.stream.start && (me = z.stream.match(/^\s*:\s*/, !1)) && (z.state.fatArrowAt = z.stream.pos + me[0].length), R(Jr);
        } else {
          if (j == "number" || j == "string")
            return z.marked = l ? "property" : z.style + " property", R(Jr);
          if (j == "jsonld-keyword")
            return R(Jr);
          if (d && K(ee))
            return z.marked = "keyword", R(Io);
          if (j == "[")
            return R(Ie, Vi, xe("]"), Jr);
          if (j == "spread")
            return R(Oe, Jr);
          if (ee == "*")
            return z.marked = "keyword", R(Io);
          if (j == ":")
            return B(Jr);
        }
      }
      ke(Io, "objprop");
      function zf(j) {
        return j != "variable" ? B(Jr) : (z.marked = "property", R(co));
      }
      ke(zf, "getterSetter");
      function Jr(j) {
        if (j == ":")
          return R(Oe);
        if (j == "(")
          return B(co);
      }
      ke(Jr, "afterprop");
      function jt(j, ee, me) {
        function Se(Je, ft) {
          if (me ? me.indexOf(Je) > -1 : Je == ",") {
            var Re = z.state.lexical;
            return Re.info == "call" && (Re.pos = (Re.pos || 0) + 1), R(function(Hn, eo) {
              return Hn == ee || eo == ee ? B() : B(j);
            }, Se);
          }
          return Je == ee || ft == ee ? R() : me && me.indexOf(";") > -1 ? B(j) : R(xe(ee));
        }
        return ke(Se, "proceed"), function(Je, ft) {
          return Je == ee || ft == ee ? R() : B(j, Se);
        };
      }
      ke(jt, "commasep");
      function ta(j, ee, me) {
        for (var Se = 3; Se < arguments.length; Se++)
          z.cc.push(arguments[Se]);
        return R(le(ee, me), jt(j, ee), de);
      }
      ke(ta, "contCommasep");
      function mr(j) {
        return j == "}" ? R() : B(ge, mr);
      }
      ke(mr, "block");
      function Vi(j, ee) {
        if (d) {
          if (j == ":")
            return R(Ke);
          if (ee == "?")
            return R(Vi);
        }
      }
      ke(Vi, "maybetype");
      function We(j, ee) {
        if (d && (j == ":" || ee == "in"))
          return R(Ke);
      }
      ke(We, "maybetypeOrIn");
      function na(j) {
        if (d && j == ":")
          return z.stream.match(/^\s*\w+\s+is\b/, !1) ? R(Ie, tr, Ke) : R(Ke);
      }
      ke(na, "mayberettype");
      function tr(j, ee) {
        if (ee == "is")
          return z.marked = "keyword", R();
      }
      ke(tr, "isKW");
      function Ke(j, ee) {
        if (ee == "keyof" || ee == "typeof" || ee == "infer" || ee == "readonly")
          return z.marked = "keyword", R(ee == "typeof" ? Oe : Ke);
        if (j == "variable" || ee == "void")
          return z.marked = "type", R(Lr);
        if (ee == "|" || ee == "&")
          return R(Ke);
        if (j == "string" || j == "number" || j == "atom")
          return R(Lr);
        if (j == "[")
          return R(le("]"), jt(Ke, "]", ","), de, Lr);
        if (j == "{")
          return R(le("}"), ra, de, Lr);
        if (j == "(")
          return R(jt(oa, ")"), tn, Lr);
        if (j == "<")
          return R(jt(Ke, ">"), Ke);
        if (j == "quasi")
          return B(Lo, Lr);
      }
      ke(Ke, "typeexpr");
      function tn(j) {
        if (j == "=>")
          return R(Ke);
      }
      ke(tn, "maybeReturnType");
      function ra(j) {
        return j.match(/[\}\)\]]/) ? R() : j == "," || j == ";" ? R(ra) : B(Cn, ra);
      }
      ke(ra, "typeprops");
      function Cn(j, ee) {
        if (j == "variable" || z.style == "keyword")
          return z.marked = "property", R(Cn);
        if (ee == "?" || j == "number" || j == "string")
          return R(Cn);
        if (j == ":")
          return R(Ke);
        if (j == "[")
          return R(xe("variable"), We, xe("]"), Cn);
        if (j == "(")
          return B(Xr, Cn);
        if (!j.match(/[;\}\)\],]/))
          return R();
      }
      ke(Cn, "typeprop");
      function Lo(j, ee) {
        return j != "quasi" ? B() : ee.slice(ee.length - 2) != "${" ? R(Lo) : R(Ke, Ln);
      }
      ke(Lo, "quasiType");
      function Ln(j) {
        if (j == "}")
          return z.marked = "string-2", z.state.tokenize = I, R(Lo);
      }
      ke(Ln, "continueQuasiType");
      function oa(j, ee) {
        return j == "variable" && z.stream.match(/^\s*[?:]/, !1) || ee == "?" ? R(oa) : j == ":" ? R(Ke) : j == "spread" ? R(oa) : B(Ke);
      }
      ke(oa, "typearg");
      function Lr(j, ee) {
        if (ee == "<")
          return R(le(">"), jt(Ke, ">"), de, Lr);
        if (ee == "|" || j == "." || ee == "&")
          return R(Ke);
        if (j == "[")
          return R(Ke, xe("]"), Lr);
        if (ee == "extends" || ee == "implements")
          return z.marked = "keyword", R(Ke);
        if (ee == "?")
          return R(Ke, xe(":"), Ke);
      }
      ke(Lr, "afterType");
      function cs(j, ee) {
        if (ee == "<")
          return R(le(">"), jt(Ke, ">"), de, Lr);
      }
      ke(cs, "maybeTypeArgs");
      function ji() {
        return B(Ke, Uc);
      }
      ke(ji, "typeparam");
      function Uc(j, ee) {
        if (ee == "=")
          return R(Ke);
      }
      ke(Uc, "maybeTypeDefault");
      function Bc(j, ee) {
        return ee == "enum" ? (z.marked = "keyword", R(Po)) : B(gr, Vi, Ro, Hc);
      }
      ke(Bc, "vardef");
      function gr(j, ee) {
        if (d && K(ee))
          return z.marked = "keyword", R(gr);
        if (j == "variable")
          return Q(ee), R();
        if (j == "spread")
          return R(gr);
        if (j == "[")
          return ta(zc, "]");
        if (j == "{")
          return ta(qc, "}");
      }
      ke(gr, "pattern");
      function qc(j, ee) {
        return j == "variable" && !z.stream.match(/^\s*:/, !1) ? (Q(ee), R(Ro)) : (j == "variable" && (z.marked = "property"), j == "spread" ? R(gr) : j == "}" ? B() : j == "[" ? R(Ie, xe("]"), xe(":"), qc) : R(xe(":"), gr, Ro));
      }
      ke(qc, "proppattern");
      function zc() {
        return B(gr, Ro);
      }
      ke(zc, "eltpattern");
      function Ro(j, ee) {
        if (ee == "=")
          return R(Oe);
      }
      ke(Ro, "maybeAssign");
      function Hc(j) {
        if (j == ",")
          return R(Bc);
      }
      ke(Hc, "vardefCont");
      function Hf(j, ee) {
        if (j == "keyword b" && ee == "else")
          return R(le("form", "else"), ge, de);
      }
      ke(Hf, "maybeelse");
      function Wf(j, ee) {
        if (ee == "await")
          return R(Wf);
        if (j == "(")
          return R(le(")"), Wc, de);
      }
      ke(Wf, "forspec");
      function Wc(j) {
        return j == "var" ? R(Bc, Ui) : j == "variable" ? R(Ui) : B(Ui);
      }
      ke(Wc, "forspec1");
      function Ui(j, ee) {
        return j == ")" ? R() : j == ";" ? R(Ui) : ee == "in" || ee == "of" ? (z.marked = "keyword", R(Ie, Ui)) : B(Ie, Ui);
      }
      ke(Ui, "forspec2");
      function co(j, ee) {
        if (ee == "*")
          return z.marked = "keyword", R(co);
        if (j == "variable")
          return Q(ee), R(co);
        if (j == "(")
          return R(ie, le(")"), jt(ai, ")"), de, na, ge, ae);
        if (d && ee == "<")
          return R(le(">"), jt(ji, ">"), de, co);
      }
      ke(co, "functiondef");
      function Xr(j, ee) {
        if (ee == "*")
          return z.marked = "keyword", R(Xr);
        if (j == "variable")
          return Q(ee), R(Xr);
        if (j == "(")
          return R(ie, le(")"), jt(ai, ")"), de, na, ae);
        if (d && ee == "<")
          return R(le(">"), jt(ji, ">"), de, Xr);
      }
      ke(Xr, "functiondecl");
      function Gc(j, ee) {
        if (j == "keyword" || j == "variable")
          return z.marked = "type", R(Gc);
        if (ee == "<")
          return R(le(">"), jt(ji, ">"), de);
      }
      ke(Gc, "typename");
      function ai(j, ee) {
        return ee == "@" && R(Ie, ai), j == "spread" ? R(ai) : d && K(ee) ? (z.marked = "keyword", R(ai)) : d && j == "this" ? R(Vi, Ro) : B(gr, Vi, Ro);
      }
      ke(ai, "funarg");
      function ia(j, ee) {
        return j == "variable" ? sa(j, ee) : Fo(j, ee);
      }
      ke(ia, "classExpression");
      function sa(j, ee) {
        if (j == "variable")
          return Q(ee), R(Fo);
      }
      ke(sa, "className");
      function Fo(j, ee) {
        if (ee == "<")
          return R(le(">"), jt(ji, ">"), de, Fo);
        if (ee == "extends" || ee == "implements" || d && j == ",")
          return ee == "implements" && (z.marked = "keyword"), R(d ? Ke : Ie, Fo);
        if (j == "{")
          return R(le("}"), uo, de);
      }
      ke(Fo, "classNameAfter");
      function uo(j, ee) {
        if (j == "async" || j == "variable" && (ee == "static" || ee == "get" || ee == "set" || d && K(ee)) && z.stream.match(/^\s+[\w$\xa1-\uffff]/, !1))
          return z.marked = "keyword", R(uo);
        if (j == "variable" || z.style == "keyword")
          return z.marked = "property", R(Zr, uo);
        if (j == "number" || j == "string")
          return R(Zr, uo);
        if (j == "[")
          return R(Ie, Vi, xe("]"), Zr, uo);
        if (ee == "*")
          return z.marked = "keyword", R(uo);
        if (d && j == "(")
          return B(Xr, uo);
        if (j == ";" || j == ",")
          return R(uo);
        if (j == "}")
          return R();
        if (ee == "@")
          return R(Ie, uo);
      }
      ke(uo, "classBody");
      function Zr(j, ee) {
        if (ee == "!" || ee == "?")
          return R(Zr);
        if (j == ":")
          return R(Ke, Ro);
        if (ee == "=")
          return R(Oe);
        var me = z.state.lexical.prev, Se = me && me.info == "interface";
        return B(Se ? Xr : co);
      }
      ke(Zr, "classfield");
      function gl(j, ee) {
        return ee == "*" ? (z.marked = "keyword", R(vr, xe(";"))) : ee == "default" ? (z.marked = "keyword", R(Ie, xe(";"))) : j == "{" ? R(jt(vl, "}"), vr, xe(";")) : B(ge);
      }
      ke(gl, "afterExport");
      function vl(j, ee) {
        if (ee == "as")
          return z.marked = "keyword", R(xe("variable"));
        if (j == "variable")
          return B(Oe, vl);
      }
      ke(vl, "exportField");
      function Qt(j) {
        return j == "string" ? R() : j == "(" ? B(Ie) : j == "." ? B(At) : B(Pe, Mo, vr);
      }
      ke(Qt, "afterImport");
      function Pe(j, ee) {
        return j == "{" ? ta(Pe, "}") : (j == "variable" && Q(ee), ee == "*" && (z.marked = "keyword"), R(yl));
      }
      ke(Pe, "importSpec");
      function Mo(j) {
        if (j == ",")
          return R(Pe, Mo);
      }
      ke(Mo, "maybeMoreImports");
      function yl(j, ee) {
        if (ee == "as")
          return z.marked = "keyword", R(Pe);
      }
      ke(yl, "maybeAs");
      function vr(j, ee) {
        if (ee == "from")
          return z.marked = "keyword", R(Ie);
      }
      ke(vr, "maybeFrom");
      function yt(j) {
        return j == "]" ? R() : B(jt(Oe, "]"));
      }
      ke(yt, "arrayLiteral");
      function Po() {
        return B(le("form"), gr, xe("{"), le("}"), jt(us, "}"), de, de);
      }
      ke(Po, "enumdef");
      function us() {
        return B(gr, Ro);
      }
      ke(us, "enummember");
      function bl(j, ee) {
        return j.lastType == "operator" || j.lastType == "," || v.test(ee.charAt(0)) || /[,.]/.test(ee.charAt(0));
      }
      ke(bl, "isContinuedStatement");
      function we(j, ee, me) {
        return ee.tokenize == C && /^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(ee.lastType) || ee.lastType == "quasi" && /\{\s*$/.test(j.string.slice(0, j.pos - (me || 0)));
      }
      return ke(we, "expressionAllowed"), {
        startState: function(j) {
          var ee = {
            tokenize: C,
            lastType: "sof",
            cc: [],
            lexical: new $((j || 0) - i, 0, "block", !1),
            localVars: o.localVars,
            context: o.localVars && new Z(null, null, !1),
            indented: j || 0
          };
          return o.globalVars && typeof o.globalVars == "object" && (ee.globalVars = o.globalVars), ee;
        },
        token: function(j, ee) {
          if (j.sol() && (ee.lexical.hasOwnProperty("align") || (ee.lexical.align = !1), ee.indented = j.indentation(), A(j, ee)), ee.tokenize != N && j.eatSpace())
            return null;
          var me = ee.tokenize(j, ee);
          return _ == "comment" ? me : (ee.lastType = _ == "operator" && (S == "++" || S == "--") ? "incdec" : _, H(ee, me, _, S, j));
        },
        indent: function(j, ee) {
          if (j.tokenize == N || j.tokenize == I)
            return n.Pass;
          if (j.tokenize != C)
            return 0;
          var me = ee && ee.charAt(0), Se = j.lexical, Je;
          if (!/^\s*else\b/.test(ee))
            for (var ft = j.cc.length - 1; ft >= 0; --ft) {
              var Re = j.cc[ft];
              if (Re == de)
                Se = Se.prev;
              else if (Re != Hf && Re != ae)
                break;
            }
          for (; (Se.type == "stat" || Se.type == "form") && (me == "}" || (Je = j.cc[j.cc.length - 1]) && (Je == At || Je == hr) && !/^[,\.=+\-*:?[\(]/.test(ee)); )
            Se = Se.prev;
          s && Se.type == ")" && Se.prev.type == "stat" && (Se = Se.prev);
          var Hn = Se.type, eo = me == Hn;
          return Hn == "vardef" ? Se.indented + (j.lastType == "operator" || j.lastType == "," ? Se.info.length + 1 : 0) : Hn == "form" && me == "{" ? Se.indented : Hn == "form" ? Se.indented + i : Hn == "stat" ? Se.indented + (bl(j, ee) ? s || i : 0) : Se.info == "switch" && !eo && o.doubleIndentSwitch != !1 ? Se.indented + (/^(?:case|default)\b/.test(ee) ? i : 2 * i) : Se.align ? Se.column + (eo ? 0 : 1) : Se.indented + (eo ? 0 : i);
        },
        electricInput: /^\s*(?:case .*?:|default:|\{|\})$/,
        blockCommentStart: c ? null : "/*",
        blockCommentEnd: c ? null : "*/",
        blockCommentContinue: c ? null : " * ",
        lineComment: c ? null : "//",
        fold: "brace",
        closeBrackets: "()[]{}''\"\"``",
        helperType: c ? "json" : "javascript",
        jsonldMode: l,
        jsonMode: c,
        expressionAllowed: we,
        skipExpression: function(j) {
          H(j, "atom", "atom", "true", new n.StringStream("", 2, null));
        }
      };
    }), n.registerHelper("wordChars", "javascript", /[\w$]/), n.defineMIME("text/javascript", "javascript"), n.defineMIME("text/ecmascript", "javascript"), n.defineMIME("application/javascript", "javascript"), n.defineMIME("application/x-javascript", "javascript"), n.defineMIME("application/ecmascript", "javascript"), n.defineMIME("application/json", { name: "javascript", json: !0 }), n.defineMIME("application/x-json", { name: "javascript", json: !0 }), n.defineMIME("application/manifest+json", { name: "javascript", json: !0 }), n.defineMIME("application/ld+json", { name: "javascript", jsonld: !0 }), n.defineMIME("text/typescript", { name: "javascript", typescript: !0 }), n.defineMIME("application/typescript", { name: "javascript", typescript: !0 });
  });
})();
var tV = S9e.exports;
const T9e = /* @__PURE__ */ Kr(tV), C9e = /* @__PURE__ */ eV({
  __proto__: null,
  default: T9e
}, [tV]), k9e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  j: C9e
}, Symbol.toStringTag, { value: "Module" }));
var _9e = Object.defineProperty, pv = (e, t) => _9e(e, "name", { value: t, configurable: !0 });
function nV(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" }));
}
pv(nV, "_mergeNamespaces");
var N9e = { exports: {} };
(function(e, t) {
  (function(n) {
    n(Ir());
  })(function(n) {
    var r = {}, o = /[^\s\u00a0]/, i = n.Pos, s = n.cmpPos;
    function l(d) {
      var g = d.search(o);
      return g == -1 ? 0 : g;
    }
    pv(l, "firstNonWS"), n.commands.toggleComment = function(d) {
      d.toggleComment();
    }, n.defineExtension("toggleComment", function(d) {
      d || (d = r);
      for (var g = this, m = 1 / 0, v = this.listSelections(), b = null, w = v.length - 1; w >= 0; w--) {
        var _ = v[w].from(), S = v[w].to();
        _.line >= m || (S.line >= m && (S = i(m, 0)), m = _.line, b == null ? g.uncomment(_, S, d) ? b = "un" : (g.lineComment(_, S, d), b = "line") : b == "un" ? g.uncomment(_, S, d) : g.lineComment(_, S, d));
      }
    });
    function c(d, g, m) {
      return /\bstring\b/.test(d.getTokenTypeAt(i(g.line, 0))) && !/^[\'\"\`]/.test(m);
    }
    pv(c, "probablyInsideString");
    function f(d, g) {
      var m = d.getMode();
      return m.useInnerComments === !1 || !m.innerMode ? m : d.getModeAt(g);
    }
    pv(f, "getMode"), n.defineExtension("lineComment", function(d, g, m) {
      m || (m = r);
      var v = this, b = f(v, d), w = v.getLine(d.line);
      if (!(w == null || c(v, d, w))) {
        var _ = m.lineComment || b.lineComment;
        if (!_) {
          (m.blockCommentStart || b.blockCommentStart) && (m.fullLines = !0, v.blockComment(d, g, m));
          return;
        }
        var S = Math.min(g.ch != 0 || g.line == d.line ? g.line + 1 : g.line, v.lastLine() + 1), x = m.padding == null ? " " : m.padding, C = m.commentBlankLines || d.line == g.line;
        v.operation(function() {
          if (m.indent) {
            for (var E = null, N = d.line; N < S; ++N) {
              var I = v.getLine(N), D = I.slice(0, l(I));
              (E == null || E.length > D.length) && (E = D);
            }
            for (var N = d.line; N < S; ++N) {
              var I = v.getLine(N), A = E.length;
              !C && !o.test(I) || (I.slice(0, A) != E && (A = l(I)), v.replaceRange(E + _ + x, i(N, 0), i(N, A)));
            }
          } else
            for (var N = d.line; N < S; ++N)
              (C || o.test(v.getLine(N))) && v.replaceRange(_ + x, i(N, 0));
        });
      }
    }), n.defineExtension("blockComment", function(d, g, m) {
      m || (m = r);
      var v = this, b = f(v, d), w = m.blockCommentStart || b.blockCommentStart, _ = m.blockCommentEnd || b.blockCommentEnd;
      if (!w || !_) {
        (m.lineComment || b.lineComment) && m.fullLines != !1 && v.lineComment(d, g, m);
        return;
      }
      if (!/\bcomment\b/.test(v.getTokenTypeAt(i(d.line, 0)))) {
        var S = Math.min(g.line, v.lastLine());
        S != d.line && g.ch == 0 && o.test(v.getLine(S)) && --S;
        var x = m.padding == null ? " " : m.padding;
        d.line > S || v.operation(function() {
          if (m.fullLines != !1) {
            var C = o.test(v.getLine(S));
            v.replaceRange(x + _, i(S)), v.replaceRange(w + x, i(d.line, 0));
            var E = m.blockCommentLead || b.blockCommentLead;
            if (E != null)
              for (var N = d.line + 1; N <= S; ++N)
                (N != S || C) && v.replaceRange(E + x, i(N, 0));
          } else {
            var I = s(v.getCursor("to"), g) == 0, D = !v.somethingSelected();
            v.replaceRange(_, g), I && v.setSelection(D ? g : v.getCursor("from"), g), v.replaceRange(w, d);
          }
        });
      }
    }), n.defineExtension("uncomment", function(d, g, m) {
      m || (m = r);
      var v = this, b = f(v, d), w = Math.min(g.ch != 0 || g.line == d.line ? g.line : g.line - 1, v.lastLine()), _ = Math.min(d.line, w), S = m.lineComment || b.lineComment, x = [], C = m.padding == null ? " " : m.padding, E;
      e: {
        if (!S)
          break e;
        for (var N = _; N <= w; ++N) {
          var I = v.getLine(N), D = I.indexOf(S);
          if (D > -1 && !/comment/.test(v.getTokenTypeAt(i(N, D + 1))) && (D = -1), D == -1 && o.test(I) || D > -1 && o.test(I.slice(0, D)))
            break e;
          x.push(I);
        }
        if (v.operation(function() {
          for (var Z = _; Z <= w; ++Z) {
            var re = x[Z - _], J = re.indexOf(S), ie = J + S.length;
            J < 0 || (re.slice(ie, ie + C.length) == C && (ie += C.length), E = !0, v.replaceRange("", i(Z, J), i(Z, ie)));
          }
        }), E)
          return !0;
      }
      var A = m.blockCommentStart || b.blockCommentStart, F = m.blockCommentEnd || b.blockCommentEnd;
      if (!A || !F)
        return !1;
      var $ = m.blockCommentLead || b.blockCommentLead, q = v.getLine(_), H = q.indexOf(A);
      if (H == -1)
        return !1;
      var z = w == _ ? q : v.getLine(w), B = z.indexOf(F, w == _ ? H + A.length : 0), R = i(_, H + 1), te = i(w, B + 1);
      if (B == -1 || !/comment/.test(v.getTokenTypeAt(R)) || !/comment/.test(v.getTokenTypeAt(te)) || v.getRange(R, te, `
`).indexOf(F) > -1)
        return !1;
      var Q = q.lastIndexOf(A, d.ch), Y = Q == -1 ? -1 : q.slice(0, d.ch).indexOf(F, Q + A.length);
      if (Q != -1 && Y != -1 && Y + F.length != d.ch)
        return !1;
      Y = z.indexOf(F, g.ch);
      var K = z.slice(g.ch).lastIndexOf(A, Y - g.ch);
      return Q = Y == -1 || K == -1 ? -1 : g.ch + K, Y != -1 && Q != -1 && Q != g.ch ? !1 : (v.operation(function() {
        v.replaceRange(
          "",
          i(w, B - (C && z.slice(B - C.length, B) == C ? C.length : 0)),
          i(w, B + F.length)
        );
        var Z = H + A.length;
        if (C && q.slice(Z, Z + C.length) == C && (Z += C.length), v.replaceRange("", i(_, H), i(_, Z)), $)
          for (var re = _ + 1; re <= w; ++re) {
            var J = v.getLine(re), ie = J.indexOf($);
            if (!(ie == -1 || o.test(J.slice(0, ie)))) {
              var ne = ie + $.length;
              C && J.slice(ne, ne + C.length) == C && (ne += C.length), v.replaceRange("", i(re, ie), i(re, ne));
            }
          }
      }), !0);
    });
  });
})();
var rV = N9e.exports;
const O9e = /* @__PURE__ */ Kr(rV), A9e = /* @__PURE__ */ nV({
  __proto__: null,
  default: O9e
}, [rV]), D9e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  c: A9e
}, Symbol.toStringTag, { value: "Module" }));
var I9e = Object.defineProperty, qt = (e, t) => I9e(e, "name", { value: t, configurable: !0 });
function oV(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" }));
}
qt(oV, "_mergeNamespaces");
var L9e = { exports: {} };
(function(e, t) {
  (function(n) {
    n(Ir(), S1(), Wh);
  })(function(n) {
    n.defineOption("search", { bottom: !1 });
    function r(A, F) {
      return typeof A == "string" ? A = new RegExp(A.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"), F ? "gi" : "g") : A.global || (A = new RegExp(A.source, A.ignoreCase ? "gi" : "g")), { token: function($) {
        A.lastIndex = $.pos;
        var q = A.exec($.string);
        if (q && q.index == $.pos)
          return $.pos += q[0].length || 1, "searching";
        q ? $.pos = q.index : $.skipToEnd();
      } };
    }
    qt(r, "searchOverlay");
    function o() {
      this.posFrom = this.posTo = this.lastQuery = this.query = null, this.overlay = null;
    }
    qt(o, "SearchState");
    function i(A) {
      return A.state.search || (A.state.search = new o());
    }
    qt(i, "getSearchState");
    function s(A) {
      return typeof A == "string" && A == A.toLowerCase();
    }
    qt(s, "queryCaseInsensitive");
    function l(A, F, $) {
      return A.getSearchCursor(F, $, { caseFold: s(F), multiline: !0 });
    }
    qt(l, "getSearchCursor");
    function c(A, F, $, q, H) {
      A.openDialog(F, q, {
        value: $,
        selectValueOnOpen: !0,
        closeOnEnter: !1,
        onClose: function() {
          _(A);
        },
        onKeyDown: H,
        bottom: A.options.search.bottom
      });
    }
    qt(c, "persistentDialog");
    function f(A, F, $, q, H) {
      A.openDialog ? A.openDialog(F, H, { value: q, selectValueOnOpen: !0, bottom: A.options.search.bottom }) : H(prompt($, q));
    }
    qt(f, "dialog");
    function d(A, F, $, q) {
      A.openConfirm ? A.openConfirm(F, q) : confirm($) && q[0]();
    }
    qt(d, "confirmDialog");
    function g(A) {
      return A.replace(/\\([nrt\\])/g, function(F, $) {
        return $ == "n" ? `
` : $ == "r" ? "\r" : $ == "t" ? "	" : $ == "\\" ? "\\" : F;
      });
    }
    qt(g, "parseString");
    function m(A) {
      var F = A.match(/^\/(.*)\/([a-z]*)$/);
      if (F)
        try {
          A = new RegExp(F[1], F[2].indexOf("i") == -1 ? "" : "i");
        } catch {
        }
      else
        A = g(A);
      return (typeof A == "string" ? A == "" : A.test("")) && (A = /x^/), A;
    }
    qt(m, "parseQuery");
    function v(A, F, $) {
      F.queryText = $, F.query = m($), A.removeOverlay(F.overlay, s(F.query)), F.overlay = r(F.query, s(F.query)), A.addOverlay(F.overlay), A.showMatchesOnScrollbar && (F.annotate && (F.annotate.clear(), F.annotate = null), F.annotate = A.showMatchesOnScrollbar(F.query, s(F.query)));
    }
    qt(v, "startSearch");
    function b(A, F, $, q) {
      var H = i(A);
      if (H.query)
        return w(A, F);
      var z = A.getSelection() || H.lastQuery;
      if (z instanceof RegExp && z.source == "x^" && (z = null), $ && A.openDialog) {
        var B = null, R = /* @__PURE__ */ qt(function(te, Q) {
          n.e_stop(Q), te && (te != H.queryText && (v(A, H, te), H.posFrom = H.posTo = A.getCursor()), B && (B.style.opacity = 1), w(A, Q.shiftKey, function(Y, K) {
            var Z;
            K.line < 3 && document.querySelector && (Z = A.display.wrapper.querySelector(".CodeMirror-dialog")) && Z.getBoundingClientRect().bottom - 4 > A.cursorCoords(K, "window").top && ((B = Z).style.opacity = 0.4);
          }));
        }, "searchNext");
        c(A, x(A), z, R, function(te, Q) {
          var Y = n.keyName(te), K = A.getOption("extraKeys"), Z = K && K[Y] || n.keyMap[A.getOption("keyMap")][Y];
          Z == "findNext" || Z == "findPrev" || Z == "findPersistentNext" || Z == "findPersistentPrev" ? (n.e_stop(te), v(A, i(A), Q), A.execCommand(Z)) : (Z == "find" || Z == "findPersistent") && (n.e_stop(te), R(Q, te));
        }), q && z && (v(A, H, z), w(A, F));
      } else
        f(A, x(A), "Search for:", z, function(te) {
          te && !H.query && A.operation(function() {
            v(A, H, te), H.posFrom = H.posTo = A.getCursor(), w(A, F);
          });
        });
    }
    qt(b, "doSearch");
    function w(A, F, $) {
      A.operation(function() {
        var q = i(A), H = l(A, q.query, F ? q.posFrom : q.posTo);
        !H.find(F) && (H = l(A, q.query, F ? n.Pos(A.lastLine()) : n.Pos(A.firstLine(), 0)), !H.find(F)) || (A.setSelection(H.from(), H.to()), A.scrollIntoView({ from: H.from(), to: H.to() }, 20), q.posFrom = H.from(), q.posTo = H.to(), $ && $(H.from(), H.to()));
      });
    }
    qt(w, "findNext");
    function _(A) {
      A.operation(function() {
        var F = i(A);
        F.lastQuery = F.query, F.query && (F.query = F.queryText = null, A.removeOverlay(F.overlay), F.annotate && (F.annotate.clear(), F.annotate = null));
      });
    }
    qt(_, "clearSearch");
    function S(A, F) {
      var $ = A ? document.createElement(A) : document.createDocumentFragment();
      for (var q in F)
        $[q] = F[q];
      for (var H = 2; H < arguments.length; H++) {
        var z = arguments[H];
        $.appendChild(typeof z == "string" ? document.createTextNode(z) : z);
      }
      return $;
    }
    qt(S, "el");
    function x(A) {
      return S(
        "",
        null,
        S("span", { className: "CodeMirror-search-label" }, A.phrase("Search:")),
        " ",
        S("input", { type: "text", style: "width: 10em", className: "CodeMirror-search-field" }),
        " ",
        S(
          "span",
          { style: "color: #888", className: "CodeMirror-search-hint" },
          A.phrase("(Use /re/ syntax for regexp search)")
        )
      );
    }
    qt(x, "getQueryDialog");
    function C(A) {
      return S(
        "",
        null,
        " ",
        S("input", { type: "text", style: "width: 10em", className: "CodeMirror-search-field" }),
        " ",
        S(
          "span",
          { style: "color: #888", className: "CodeMirror-search-hint" },
          A.phrase("(Use /re/ syntax for regexp search)")
        )
      );
    }
    qt(C, "getReplaceQueryDialog");
    function E(A) {
      return S(
        "",
        null,
        S("span", { className: "CodeMirror-search-label" }, A.phrase("With:")),
        " ",
        S("input", { type: "text", style: "width: 10em", className: "CodeMirror-search-field" })
      );
    }
    qt(E, "getReplacementQueryDialog");
    function N(A) {
      return S(
        "",
        null,
        S("span", { className: "CodeMirror-search-label" }, A.phrase("Replace?")),
        " ",
        S("button", {}, A.phrase("Yes")),
        " ",
        S("button", {}, A.phrase("No")),
        " ",
        S("button", {}, A.phrase("All")),
        " ",
        S("button", {}, A.phrase("Stop"))
      );
    }
    qt(N, "getDoReplaceConfirm");
    function I(A, F, $) {
      A.operation(function() {
        for (var q = l(A, F); q.findNext(); )
          if (typeof F != "string") {
            var H = A.getRange(q.from(), q.to()).match(F);
            q.replace($.replace(/\$(\d)/g, function(z, B) {
              return H[B];
            }));
          } else
            q.replace($);
      });
    }
    qt(I, "replaceAll");
    function D(A, F) {
      if (!A.getOption("readOnly")) {
        var $ = A.getSelection() || i(A).lastQuery, q = F ? A.phrase("Replace all:") : A.phrase("Replace:"), H = S(
          "",
          null,
          S("span", { className: "CodeMirror-search-label" }, q),
          C(A)
        );
        f(A, H, q, $, function(z) {
          z && (z = m(z), f(A, E(A), A.phrase("Replace with:"), "", function(B) {
            if (B = g(B), F)
              I(A, z, B);
            else {
              _(A);
              var R = l(A, z, A.getCursor("from")), te = /* @__PURE__ */ qt(function() {
                var Y = R.from(), K;
                !(K = R.findNext()) && (R = l(A, z), !(K = R.findNext()) || Y && R.from().line == Y.line && R.from().ch == Y.ch) || (A.setSelection(R.from(), R.to()), A.scrollIntoView({ from: R.from(), to: R.to() }), d(
                  A,
                  N(A),
                  A.phrase("Replace?"),
                  [
                    function() {
                      Q(K);
                    },
                    te,
                    function() {
                      I(A, z, B);
                    }
                  ]
                ));
              }, "advance"), Q = /* @__PURE__ */ qt(function(Y) {
                R.replace(typeof z == "string" ? B : B.replace(/\$(\d)/g, function(K, Z) {
                  return Y[Z];
                })), te();
              }, "doReplace");
              te();
            }
          }));
        });
      }
    }
    qt(D, "replace"), n.commands.find = function(A) {
      _(A), b(A);
    }, n.commands.findPersistent = function(A) {
      _(A), b(A, !1, !0);
    }, n.commands.findPersistentNext = function(A) {
      b(A, !1, !0, !0);
    }, n.commands.findPersistentPrev = function(A) {
      b(A, !0, !0, !0);
    }, n.commands.findNext = b, n.commands.findPrev = function(A) {
      b(A, !0);
    }, n.commands.clearSearch = _, n.commands.replace = D, n.commands.replaceAll = function(A) {
      D(A, !0);
    };
  });
})();
var iV = L9e.exports;
const R9e = /* @__PURE__ */ Kr(iV), F9e = /* @__PURE__ */ oV({
  __proto__: null,
  default: R9e
}, [iV]), sV = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  s: F9e
}, Symbol.toStringTag, { value: "Module" }));
tt.registerHelper("hint", "graphql", (e, t) => {
  const { schema: n, externalFragments: r } = t;
  if (!n)
    return;
  const o = e.getCursor(), i = e.getTokenAt(o), s = i.type !== null && /"|\w/.test(i.string[0]) ? i.start : i.end, l = new yc(o.line, s), c = {
    list: Cq(n, e.getValue(), l, i, r).map((f) => ({
      text: f.label,
      type: f.type,
      description: f.documentation,
      isDeprecated: f.isDeprecated,
      deprecationReason: f.deprecationReason
    })),
    from: { line: o.line, ch: s },
    to: { line: o.line, ch: i.end }
  };
  return c != null && c.list && c.list.length > 0 && (c.from = tt.Pos(c.from.line, c.from.ch), c.to = tt.Pos(c.to.line, c.to.ch), tt.signal(e, "hasCompletion", e, c, i)), c;
});
const M9e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null
}, Symbol.toStringTag, { value: "Module" })), DR = ["error", "warning", "information", "hint"], P9e = {
  "GraphQL: Validation": "validation",
  "GraphQL: Deprecation": "deprecation",
  "GraphQL: Syntax": "syntax"
};
tt.registerHelper("lint", "graphql", (e, t) => {
  const { schema: n, validationRules: r, externalFragments: o } = t;
  return Kq(e, n, r, void 0, o).map((i) => ({
    message: i.message,
    severity: i.severity ? DR[i.severity - 1] : DR[0],
    type: i.source ? P9e[i.source] : void 0,
    from: tt.Pos(i.range.start.line, i.range.start.character),
    to: tt.Pos(i.range.end.line, i.range.end.character)
  }));
});
const $9e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null
}, Symbol.toStringTag, { value: "Module" }));
var V9e = Object.defineProperty, j9e = (e, t) => V9e(e, "name", { value: t, configurable: !0 });
function E_(e, t) {
  const n = [];
  let r = e;
  for (; r != null && r.kind; )
    n.push(r), r = r.prevState;
  for (let o = n.length - 1; o >= 0; o--)
    t(n[o]);
}
j9e(E_, "forEachState");
var U9e = Object.defineProperty, Zs = (e, t) => U9e(e, "name", { value: t, configurable: !0 });
function w_(e, t) {
  const n = {
    schema: e,
    type: null,
    parentType: null,
    inputType: null,
    directiveDef: null,
    fieldDef: null,
    argDef: null,
    argDefs: null,
    objectFieldDefs: null
  };
  return E_(t, (r) => {
    var o, i;
    switch (r.kind) {
      case "Query":
      case "ShortQuery":
        n.type = e.getQueryType();
        break;
      case "Mutation":
        n.type = e.getMutationType();
        break;
      case "Subscription":
        n.type = e.getSubscriptionType();
        break;
      case "InlineFragment":
      case "FragmentDefinition":
        r.type && (n.type = e.getType(r.type));
        break;
      case "Field":
      case "AliasedField":
        n.fieldDef = n.type && r.name ? oT(e, n.parentType, r.name) : null, n.type = (o = n.fieldDef) === null || o === void 0 ? void 0 : o.type;
        break;
      case "SelectionSet":
        n.parentType = n.type ? Et(n.type) : null;
        break;
      case "Directive":
        n.directiveDef = r.name ? e.getDirective(r.name) : null;
        break;
      case "Arguments":
        const s = r.prevState ? r.prevState.kind === "Field" ? n.fieldDef : r.prevState.kind === "Directive" ? n.directiveDef : r.prevState.kind === "AliasedField" ? r.prevState.name && oT(e, n.parentType, r.prevState.name) : null : null;
        n.argDefs = s ? s.args : null;
        break;
      case "Argument":
        if (n.argDef = null, n.argDefs) {
          for (let g = 0; g < n.argDefs.length; g++)
            if (n.argDefs[g].name === r.name) {
              n.argDef = n.argDefs[g];
              break;
            }
        }
        n.inputType = (i = n.argDef) === null || i === void 0 ? void 0 : i.type;
        break;
      case "EnumValue":
        const l = n.inputType ? Et(n.inputType) : null;
        n.enumValue = l instanceof Or ? aV(l.getValues(), (g) => g.value === r.name) : null;
        break;
      case "ListValue":
        const c = n.inputType ? ol(n.inputType) : null;
        n.inputType = c instanceof Ht ? c.ofType : null;
        break;
      case "ObjectValue":
        const f = n.inputType ? Et(n.inputType) : null;
        n.objectFieldDefs = f instanceof Gr ? f.getFields() : null;
        break;
      case "ObjectField":
        const d = r.name && n.objectFieldDefs ? n.objectFieldDefs[r.name] : null;
        n.inputType = d == null ? void 0 : d.type;
        break;
      case "NamedType":
        n.type = r.name ? e.getType(r.name) : null;
        break;
    }
  }), n;
}
Zs(w_, "getTypeInfo");
function oT(e, t, n) {
  if (n === ei.name && e.getQueryType() === t)
    return ei;
  if (n === ti.name && e.getQueryType() === t)
    return ti;
  if (n === _o.name && Jt(t))
    return _o;
  if (t && t.getFields)
    return t.getFields()[n];
}
Zs(oT, "getFieldDef");
function aV(e, t) {
  for (let n = 0; n < e.length; n++)
    if (t(e[n]))
      return e[n];
}
Zs(aV, "find");
function x_(e) {
  return {
    kind: "Field",
    schema: e.schema,
    field: e.fieldDef,
    type: k_(e.fieldDef) ? null : e.parentType
  };
}
Zs(x_, "getFieldReference");
function S_(e) {
  return {
    kind: "Directive",
    schema: e.schema,
    directive: e.directiveDef
  };
}
Zs(S_, "getDirectiveReference");
function T_(e) {
  return e.directiveDef ? {
    kind: "Argument",
    schema: e.schema,
    argument: e.argDef,
    directive: e.directiveDef
  } : {
    kind: "Argument",
    schema: e.schema,
    argument: e.argDef,
    field: e.fieldDef,
    type: k_(e.fieldDef) ? null : e.parentType
  };
}
Zs(T_, "getArgumentReference");
function C_(e) {
  return {
    kind: "EnumValue",
    value: e.enumValue || void 0,
    type: e.inputType ? Et(e.inputType) : void 0
  };
}
Zs(C_, "getEnumValueReference");
function T1(e, t) {
  return {
    kind: "Type",
    schema: e.schema,
    type: t || e.type
  };
}
Zs(T1, "getTypeReference");
function k_(e) {
  return e.name.slice(0, 2) === "__";
}
Zs(k_, "isMetaField");
var B9e = Object.defineProperty, Oi = (e, t) => B9e(e, "name", { value: t, configurable: !0 });
tt.defineOption("info", !1, (e, t, n) => {
  if (n && n !== tt.Init) {
    const r = e.state.info.onMouseOver;
    tt.off(e.getWrapperElement(), "mouseover", r), clearTimeout(e.state.info.hoverTimeout), delete e.state.info;
  }
  if (t) {
    const r = e.state.info = lV(t);
    r.onMouseOver = uV.bind(null, e), tt.on(e.getWrapperElement(), "mouseover", r.onMouseOver);
  }
});
function lV(e) {
  return {
    options: e instanceof Function ? { render: e } : e === !0 ? {} : e
  };
}
Oi(lV, "createState");
function cV(e) {
  const { options: t } = e.state.info;
  return (t == null ? void 0 : t.hoverTime) || 500;
}
Oi(cV, "getHoverTime");
function uV(e, t) {
  const n = e.state.info, r = t.target || t.srcElement;
  if (!(r instanceof HTMLElement) || r.nodeName !== "SPAN" || n.hoverTimeout !== void 0)
    return;
  const o = r.getBoundingClientRect(), i = /* @__PURE__ */ Oi(function() {
    clearTimeout(n.hoverTimeout), n.hoverTimeout = setTimeout(l, c);
  }, "onMouseMove"), s = /* @__PURE__ */ Oi(function() {
    tt.off(document, "mousemove", i), tt.off(e.getWrapperElement(), "mouseout", s), clearTimeout(n.hoverTimeout), n.hoverTimeout = void 0;
  }, "onMouseOut"), l = /* @__PURE__ */ Oi(function() {
    tt.off(document, "mousemove", i), tt.off(e.getWrapperElement(), "mouseout", s), n.hoverTimeout = void 0, fV(e, o);
  }, "onHover"), c = cV(e);
  n.hoverTimeout = setTimeout(l, c), tt.on(document, "mousemove", i), tt.on(e.getWrapperElement(), "mouseout", s);
}
Oi(uV, "onMouseOver");
function fV(e, t) {
  const n = e.coordsChar({
    left: (t.left + t.right) / 2,
    top: (t.top + t.bottom) / 2
  }, "window"), r = e.state.info, { options: o } = r, i = o.render || e.getHelper(n, "info");
  if (i) {
    const s = e.getTokenAt(n, !0);
    if (s) {
      const l = i(s, o, e, n);
      l && dV(e, t, l);
    }
  }
}
Oi(fV, "onMouseHover");
function dV(e, t, n) {
  const r = document.createElement("div");
  r.className = "CodeMirror-info", r.append(n), document.body.append(r);
  const o = r.getBoundingClientRect(), i = window.getComputedStyle(r), s = o.right - o.left + parseFloat(i.marginLeft) + parseFloat(i.marginRight), l = o.bottom - o.top + parseFloat(i.marginTop) + parseFloat(i.marginBottom);
  let c = t.bottom;
  l > window.innerHeight - t.bottom - 15 && t.top > window.innerHeight - t.bottom && (c = t.top - l), c < 0 && (c = t.bottom);
  let f = Math.max(0, window.innerWidth - s - 15);
  f > t.left && (f = t.left), r.style.opacity = "1", r.style.top = c + "px", r.style.left = f + "px";
  let d;
  const g = /* @__PURE__ */ Oi(function() {
    clearTimeout(d);
  }, "onMouseOverPopup"), m = /* @__PURE__ */ Oi(function() {
    clearTimeout(d), d = setTimeout(v, 200);
  }, "onMouseOut"), v = /* @__PURE__ */ Oi(function() {
    tt.off(r, "mouseover", g), tt.off(r, "mouseout", m), tt.off(e.getWrapperElement(), "mouseout", m), r.style.opacity ? (r.style.opacity = "0", setTimeout(() => {
      r.parentNode && r.remove();
    }, 600)) : r.parentNode && r.remove();
  }, "hidePopup");
  tt.on(r, "mouseover", g), tt.on(r, "mouseout", m), tt.on(e.getWrapperElement(), "mouseout", m);
}
Oi(dV, "showPopup");
const q9e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null
}, Symbol.toStringTag, { value: "Module" }));
var z9e = Object.defineProperty, ls = (e, t) => z9e(e, "name", { value: t, configurable: !0 });
tt.registerHelper("info", "graphql", (e, t) => {
  if (!t.schema || !e.state)
    return;
  const { kind: n, step: r } = e.state, o = w_(t.schema, e.state);
  if (n === "Field" && r === 0 && o.fieldDef || n === "AliasedField" && r === 2 && o.fieldDef) {
    const i = document.createElement("div");
    i.className = "CodeMirror-info-header", pV(i, o, t);
    const s = document.createElement("div");
    return s.append(i), Lu(s, t, o.fieldDef), s;
  }
  if (n === "Directive" && r === 1 && o.directiveDef) {
    const i = document.createElement("div");
    i.className = "CodeMirror-info-header", mV(i, o, t);
    const s = document.createElement("div");
    return s.append(i), Lu(s, t, o.directiveDef), s;
  }
  if (n === "Argument" && r === 0 && o.argDef) {
    const i = document.createElement("div");
    i.className = "CodeMirror-info-header", gV(i, o, t);
    const s = document.createElement("div");
    return s.append(i), Lu(s, t, o.argDef), s;
  }
  if (n === "EnumValue" && o.enumValue && o.enumValue.description) {
    const i = document.createElement("div");
    i.className = "CodeMirror-info-header", vV(i, o, t);
    const s = document.createElement("div");
    return s.append(i), Lu(s, t, o.enumValue), s;
  }
  if (n === "NamedType" && o.type && o.type.description) {
    const i = document.createElement("div");
    i.className = "CodeMirror-info-header", _c(i, o, t, o.type);
    const s = document.createElement("div");
    return s.append(i), Lu(s, t, o.type), s;
  }
});
function pV(e, t, n) {
  hV(e, t, n), __(e, t, n, t.type);
}
ls(pV, "renderField");
function hV(e, t, n) {
  var r;
  const o = ((r = t.fieldDef) === null || r === void 0 ? void 0 : r.name) || "";
  io(e, o, "field-name", n, x_(t));
}
ls(hV, "renderQualifiedField");
function mV(e, t, n) {
  var r;
  const o = "@" + (((r = t.directiveDef) === null || r === void 0 ? void 0 : r.name) || "");
  io(e, o, "directive-name", n, S_(t));
}
ls(mV, "renderDirective");
function gV(e, t, n) {
  var r;
  const o = ((r = t.argDef) === null || r === void 0 ? void 0 : r.name) || "";
  io(e, o, "arg-name", n, T_(t)), __(e, t, n, t.inputType);
}
ls(gV, "renderArg");
function vV(e, t, n) {
  var r;
  const o = ((r = t.enumValue) === null || r === void 0 ? void 0 : r.name) || "";
  _c(e, t, n, t.inputType), io(e, "."), io(e, o, "enum-value", n, C_(t));
}
ls(vV, "renderEnumValue");
function __(e, t, n, r) {
  const o = document.createElement("span");
  o.className = "type-name-pill", r instanceof et ? (_c(o, t, n, r.ofType), io(o, "!")) : r instanceof Ht ? (io(o, "["), _c(o, t, n, r.ofType), io(o, "]")) : io(o, (r == null ? void 0 : r.name) || "", "type-name", n, T1(t, r)), e.append(o);
}
ls(__, "renderTypeAnnotation");
function _c(e, t, n, r) {
  r instanceof et ? (_c(e, t, n, r.ofType), io(e, "!")) : r instanceof Ht ? (io(e, "["), _c(e, t, n, r.ofType), io(e, "]")) : io(e, (r == null ? void 0 : r.name) || "", "type-name", n, T1(t, r));
}
ls(_c, "renderType");
function Lu(e, t, n) {
  const { description: r } = n;
  if (r) {
    const o = document.createElement("div");
    o.className = "info-description", t.renderDescription ? o.innerHTML = t.renderDescription(r) : o.append(document.createTextNode(r)), e.append(o);
  }
  yV(e, t, n);
}
ls(Lu, "renderDescription");
function yV(e, t, n) {
  const r = n.deprecationReason;
  if (r) {
    const o = document.createElement("div");
    o.className = "info-deprecation", e.append(o);
    const i = document.createElement("span");
    i.className = "info-deprecation-label", i.append(document.createTextNode("Deprecated")), o.append(i);
    const s = document.createElement("div");
    s.className = "info-deprecation-reason", t.renderDescription ? s.innerHTML = t.renderDescription(r) : s.append(document.createTextNode(r)), o.append(s);
  }
}
ls(yV, "renderDeprecation");
function io(e, t, n = "", r = { onClick: null }, o = null) {
  if (n) {
    const { onClick: i } = r;
    let s;
    i ? (s = document.createElement("a"), s.href = "javascript:void 0", s.addEventListener("click", (l) => {
      l.preventDefault(), i(o, l);
    })) : s = document.createElement("span"), s.className = n, s.append(document.createTextNode(t)), e.append(s);
  } else
    e.append(document.createTextNode(t));
}
ls(io, "text");
const H9e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null
}, Symbol.toStringTag, { value: "Module" }));
var W9e = Object.defineProperty, Is = (e, t) => W9e(e, "name", { value: t, configurable: !0 });
tt.defineOption("jump", !1, (e, t, n) => {
  if (n && n !== tt.Init) {
    const r = e.state.jump.onMouseOver;
    tt.off(e.getWrapperElement(), "mouseover", r);
    const o = e.state.jump.onMouseOut;
    tt.off(e.getWrapperElement(), "mouseout", o), tt.off(document, "keydown", e.state.jump.onKeyDown), delete e.state.jump;
  }
  if (t) {
    const r = e.state.jump = {
      options: t,
      onMouseOver: bV.bind(null, e),
      onMouseOut: EV.bind(null, e),
      onKeyDown: wV.bind(null, e)
    };
    tt.on(e.getWrapperElement(), "mouseover", r.onMouseOver), tt.on(e.getWrapperElement(), "mouseout", r.onMouseOut), tt.on(document, "keydown", r.onKeyDown);
  }
});
function bV(e, t) {
  const n = t.target || t.srcElement;
  if (!(n instanceof HTMLElement) || (n == null ? void 0 : n.nodeName) !== "SPAN")
    return;
  const r = n.getBoundingClientRect(), o = {
    left: (r.left + r.right) / 2,
    top: (r.top + r.bottom) / 2
  };
  e.state.jump.cursor = o, e.state.jump.isHoldingModifier && N_(e);
}
Is(bV, "onMouseOver");
function EV(e) {
  if (!e.state.jump.isHoldingModifier && e.state.jump.cursor) {
    e.state.jump.cursor = null;
    return;
  }
  e.state.jump.isHoldingModifier && e.state.jump.marker && O_(e);
}
Is(EV, "onMouseOut");
function wV(e, t) {
  if (e.state.jump.isHoldingModifier || !xV(t.key))
    return;
  e.state.jump.isHoldingModifier = !0, e.state.jump.cursor && N_(e);
  const n = /* @__PURE__ */ Is((i) => {
    i.code === t.code && (e.state.jump.isHoldingModifier = !1, e.state.jump.marker && O_(e), tt.off(document, "keyup", n), tt.off(document, "click", r), e.off("mousedown", o));
  }, "onKeyUp"), r = /* @__PURE__ */ Is((i) => {
    const { destination: s, options: l } = e.state.jump;
    s && l.onClick(s, i);
  }, "onClick"), o = /* @__PURE__ */ Is((i, s) => {
    e.state.jump.destination && (s.codemirrorIgnore = !0);
  }, "onMouseDown");
  tt.on(document, "keyup", n), tt.on(document, "click", r), e.on("mousedown", o);
}
Is(wV, "onKeyDown");
const G9e = typeof navigator < "u" && navigator && navigator.appVersion.includes("Mac");
function xV(e) {
  return e === (G9e ? "Meta" : "Control");
}
Is(xV, "isJumpModifier");
function N_(e) {
  if (e.state.jump.marker)
    return;
  const { cursor: t, options: n } = e.state.jump, r = e.coordsChar(t), o = e.getTokenAt(r, !0), i = n.getDestination || e.getHelper(r, "jump");
  if (i) {
    const s = i(o, n, e);
    if (s) {
      const l = e.markText({ line: r.line, ch: o.start }, { line: r.line, ch: o.end }, { className: "CodeMirror-jump-token" });
      e.state.jump.marker = l, e.state.jump.destination = s;
    }
  }
}
Is(N_, "enableJumpMode");
function O_(e) {
  const { marker: t } = e.state.jump;
  e.state.jump.marker = null, e.state.jump.destination = null, t.clear();
}
Is(O_, "disableJumpMode");
tt.registerHelper("jump", "graphql", (e, t) => {
  if (!t.schema || !t.onClick || !e.state)
    return;
  const { state: n } = e, { kind: r, step: o } = n, i = w_(t.schema, n);
  if (r === "Field" && o === 0 && i.fieldDef || r === "AliasedField" && o === 2 && i.fieldDef)
    return x_(i);
  if (r === "Directive" && o === 1 && i.directiveDef)
    return S_(i);
  if (r === "Argument" && o === 0 && i.argDef)
    return T_(i);
  if (r === "EnumValue" && i.enumValue)
    return C_(i);
  if (r === "NamedType" && i.type)
    return T1(i);
});
const Q9e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null
}, Symbol.toStringTag, { value: "Module" }));
var Y9e = Object.defineProperty, K9e = (e, t) => Y9e(e, "name", { value: t, configurable: !0 });
function C1(e, t) {
  var n, r;
  const { levels: o, indentLevel: i } = e;
  return ((!o || o.length === 0 ? i : o.at(-1) - (!((n = this.electricInput) === null || n === void 0) && n.test(t) ? 1 : 0)) || 0) * (((r = this.config) === null || r === void 0 ? void 0 : r.indentUnit) || 0);
}
K9e(C1, "indent");
var J9e = Object.defineProperty, X9e = (e, t) => J9e(e, "name", { value: t, configurable: !0 });
const Z9e = /* @__PURE__ */ X9e((e) => {
  const t = _h({
    eatWhitespace: (n) => n.eatWhile(w3),
    lexRules: x3,
    parseRules: S3,
    editorConfig: { tabSize: e.tabSize }
  });
  return {
    config: e,
    startState: t.startState,
    token: t.token,
    indent: C1,
    electricInput: /^\s*[})\]]/,
    fold: "brace",
    lineComment: "#",
    closeBrackets: {
      pairs: '()[]{}""',
      explode: "()[]{}"
    }
  };
}, "graphqlModeFactory");
tt.defineMode("graphql", Z9e);
const eje = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null
}, Symbol.toStringTag, { value: "Module" }));
var tje = Object.defineProperty, hl = (e, t) => tje(e, "name", { value: t, configurable: !0 });
function Hl(e, t, n) {
  const r = SV(n, A_(t.string));
  if (!r)
    return;
  const o = t.type !== null && /"|\w/.test(t.string[0]) ? t.start : t.end;
  return {
    list: r,
    from: { line: e.line, ch: o },
    to: { line: e.line, ch: t.end }
  };
}
hl(Hl, "hintList");
function SV(e, t) {
  if (!t)
    return hv(e, (r) => !r.isDeprecated);
  const n = e.map((r) => ({
    proximity: TV(A_(r.text), t),
    entry: r
  }));
  return hv(hv(n, (r) => r.proximity <= 2), (r) => !r.entry.isDeprecated).sort((r, o) => (r.entry.isDeprecated ? 1 : 0) - (o.entry.isDeprecated ? 1 : 0) || r.proximity - o.proximity || r.entry.text.length - o.entry.text.length).map((r) => r.entry);
}
hl(SV, "filterAndSortList");
function hv(e, t) {
  const n = e.filter(t);
  return n.length === 0 ? e : n;
}
hl(hv, "filterNonEmpty");
function A_(e) {
  return e.toLowerCase().replaceAll(/\W/g, "");
}
hl(A_, "normalizeText");
function TV(e, t) {
  let n = CV(t, e);
  return e.length > t.length && (n -= e.length - t.length - 1, n += e.indexOf(t) === 0 ? 0 : 0.5), n;
}
hl(TV, "getProximity");
function CV(e, t) {
  let n, r;
  const o = [], i = e.length, s = t.length;
  for (n = 0; n <= i; n++)
    o[n] = [n];
  for (r = 1; r <= s; r++)
    o[0][r] = r;
  for (n = 1; n <= i; n++)
    for (r = 1; r <= s; r++) {
      const l = e[n - 1] === t[r - 1] ? 0 : 1;
      o[n][r] = Math.min(o[n - 1][r] + 1, o[n][r - 1] + 1, o[n - 1][r - 1] + l), n > 1 && r > 1 && e[n - 1] === t[r - 2] && e[n - 2] === t[r - 1] && (o[n][r] = Math.min(o[n][r], o[n - 2][r - 2] + l));
    }
  return o[i][s];
}
hl(CV, "lexicalDistance");
tt.registerHelper("hint", "graphql-variables", (e, t) => {
  const n = e.getCursor(), r = e.getTokenAt(n), o = kV(n, r, t);
  return o != null && o.list && o.list.length > 0 && (o.from = tt.Pos(o.from.line, o.from.ch), o.to = tt.Pos(o.to.line, o.to.ch), tt.signal(e, "hasCompletion", e, o, r)), o;
});
function kV(e, t, n) {
  const r = t.state.kind === "Invalid" ? t.state.prevState : t.state, { kind: o, step: i } = r;
  if (o === "Document" && i === 0)
    return Hl(e, t, [{ text: "{" }]);
  const { variableToType: s } = n;
  if (!s)
    return;
  const l = _V(s, t.state);
  if (o === "Document" || o === "Variable" && i === 0) {
    const c = Object.keys(s);
    return Hl(e, t, c.map((f) => ({
      text: `"${f}": `,
      type: s[f]
    })));
  }
  if ((o === "ObjectValue" || o === "ObjectField" && i === 0) && l.fields) {
    const c = Object.keys(l.fields).map((f) => l.fields[f]);
    return Hl(e, t, c.map((f) => ({
      text: `"${f.name}": `,
      type: f.type,
      description: f.description
    })));
  }
  if (o === "StringValue" || o === "NumberValue" || o === "BooleanValue" || o === "NullValue" || o === "ListValue" && i === 1 || o === "ObjectField" && i === 2 || o === "Variable" && i === 2) {
    const c = l.type ? Et(l.type) : void 0;
    if (c instanceof Gr)
      return Hl(e, t, [{ text: "{" }]);
    if (c instanceof Or) {
      const f = c.getValues();
      return Hl(e, t, f.map((d) => ({
        text: `"${d.name}"`,
        type: c,
        description: d.description
      })));
    }
    if (c === Wt)
      return Hl(e, t, [
        { text: "true", type: Wt, description: "Not false." },
        { text: "false", type: Wt, description: "Not true." }
      ]);
  }
}
hl(kV, "getVariablesHint");
function _V(e, t) {
  const n = {
    type: null,
    fields: null
  };
  return E_(t, (r) => {
    switch (r.kind) {
      case "Variable": {
        n.type = e[r.name];
        break;
      }
      case "ListValue": {
        const o = n.type ? ol(n.type) : void 0;
        n.type = o instanceof Ht ? o.ofType : null;
        break;
      }
      case "ObjectValue": {
        const o = n.type ? Et(n.type) : void 0;
        n.fields = o instanceof Gr ? o.getFields() : null;
        break;
      }
      case "ObjectField": {
        const o = r.name && n.fields ? n.fields[r.name] : null;
        n.type = o == null ? void 0 : o.type;
        break;
      }
    }
  }), n;
}
hl(_V, "getTypeInfo");
const nje = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null
}, Symbol.toStringTag, { value: "Module" }));
var rje = Object.defineProperty, Tn = (e, t) => rje(e, "name", { value: t, configurable: !0 });
function NV(e) {
  Ki = e, W0 = e.length, Vn = kr = Gh = -1, Dn(), Qh();
  const t = D_();
  return Qs("EOF"), t;
}
Tn(NV, "jsonParse");
let Ki, W0, Vn, kr, Gh, xt, vo;
function D_() {
  const e = Vn, t = [];
  if (Qs("{"), !fh("}")) {
    do
      t.push(OV());
    while (fh(","));
    Qs("}");
  }
  return {
    kind: "Object",
    start: e,
    end: Gh,
    members: t
  };
}
Tn(D_, "parseObj");
function OV() {
  const e = Vn, t = vo === "String" ? L_() : null;
  Qs("String"), Qs(":");
  const n = I_();
  return {
    kind: "Member",
    start: e,
    end: Gh,
    key: t,
    value: n
  };
}
Tn(OV, "parseMember");
function AV() {
  const e = Vn, t = [];
  if (Qs("["), !fh("]")) {
    do
      t.push(I_());
    while (fh(","));
    Qs("]");
  }
  return {
    kind: "Array",
    start: e,
    end: Gh,
    values: t
  };
}
Tn(AV, "parseArr");
function I_() {
  switch (vo) {
    case "[":
      return AV();
    case "{":
      return D_();
    case "String":
    case "Number":
    case "Boolean":
    case "Null":
      const e = L_();
      return Qh(), e;
  }
  Qs("Value");
}
Tn(I_, "parseVal");
function L_() {
  return { kind: vo, start: Vn, end: kr, value: JSON.parse(Ki.slice(Vn, kr)) };
}
Tn(L_, "curToken");
function Qs(e) {
  if (vo === e) {
    Qh();
    return;
  }
  let t;
  if (vo === "EOF")
    t = "[end of file]";
  else if (kr - Vn > 1)
    t = "`" + Ki.slice(Vn, kr) + "`";
  else {
    const n = Ki.slice(Vn).match(/^.+?\b/);
    t = "`" + (n ? n[0] : Ki[Vn]) + "`";
  }
  throw cc(`Expected ${e} but found ${t}.`);
}
Tn(Qs, "expect");
class R_ extends Error {
  constructor(t, n) {
    super(t), this.position = n;
  }
}
Tn(R_, "JSONSyntaxError");
function cc(e) {
  return new R_(e, { start: Vn, end: kr });
}
Tn(cc, "syntaxError");
function fh(e) {
  if (vo === e)
    return Qh(), !0;
}
Tn(fh, "skip");
function Dn() {
  return kr < W0 && (kr++, xt = kr === W0 ? 0 : Ki.charCodeAt(kr)), xt;
}
Tn(Dn, "ch");
function Qh() {
  for (Gh = kr; xt === 9 || xt === 10 || xt === 13 || xt === 32; )
    Dn();
  if (xt === 0) {
    vo = "EOF";
    return;
  }
  switch (Vn = kr, xt) {
    case 34:
      return vo = "String", DV();
    case 45:
    case 48:
    case 49:
    case 50:
    case 51:
    case 52:
    case 53:
    case 54:
    case 55:
    case 56:
    case 57:
      return vo = "Number", IV();
    case 102:
      if (Ki.slice(Vn, Vn + 5) !== "false")
        break;
      kr += 4, Dn(), vo = "Boolean";
      return;
    case 110:
      if (Ki.slice(Vn, Vn + 4) !== "null")
        break;
      kr += 3, Dn(), vo = "Null";
      return;
    case 116:
      if (Ki.slice(Vn, Vn + 4) !== "true")
        break;
      kr += 3, Dn(), vo = "Boolean";
      return;
  }
  vo = Ki[Vn], Dn();
}
Tn(Qh, "lex");
function DV() {
  for (Dn(); xt !== 34 && xt > 31; )
    if (xt === 92)
      switch (xt = Dn(), xt) {
        case 34:
        case 47:
        case 92:
        case 98:
        case 102:
        case 110:
        case 114:
        case 116:
          Dn();
          break;
        case 117:
          Dn(), Gd(), Gd(), Gd(), Gd();
          break;
        default:
          throw cc("Bad character escape sequence.");
      }
    else {
      if (kr === W0)
        throw cc("Unterminated string.");
      Dn();
    }
  if (xt === 34) {
    Dn();
    return;
  }
  throw cc("Unterminated string.");
}
Tn(DV, "readString");
function Gd() {
  if (xt >= 48 && xt <= 57 || xt >= 65 && xt <= 70 || xt >= 97 && xt <= 102)
    return Dn();
  throw cc("Expected hexadecimal digit.");
}
Tn(Gd, "readHex");
function IV() {
  xt === 45 && Dn(), xt === 48 ? Dn() : mv(), xt === 46 && (Dn(), mv()), (xt === 69 || xt === 101) && (xt = Dn(), (xt === 43 || xt === 45) && Dn(), mv());
}
Tn(IV, "readNumber");
function mv() {
  if (xt < 48 || xt > 57)
    throw cc("Expected decimal digit.");
  do
    Dn();
  while (xt >= 48 && xt <= 57);
}
Tn(mv, "readDigits");
tt.registerHelper("lint", "graphql-variables", (e, t, n) => {
  if (!e)
    return [];
  let r;
  try {
    r = NV(e);
  } catch (i) {
    if (i instanceof R_)
      return [G0(n, i.position, i.message)];
    throw i;
  }
  const { variableToType: o } = t;
  return o ? LV(n, o, r) : [];
});
function LV(e, t, n) {
  var r;
  const o = [];
  for (const i of n.members)
    if (i) {
      const s = (r = i.key) === null || r === void 0 ? void 0 : r.value, l = t[s];
      if (l)
        for (const [c, f] of Ku(l, i.value))
          o.push(G0(e, c, f));
      else
        o.push(G0(e, i.key, `Variable "$${s}" does not appear in any GraphQL query.`));
    }
  return o;
}
Tn(LV, "validateVariables");
function Ku(e, t) {
  if (!e || !t)
    return [];
  if (e instanceof et)
    return t.kind === "Null" ? [[t, `Type "${e}" is non-nullable and cannot be null.`]] : Ku(e.ofType, t);
  if (t.kind === "Null")
    return [];
  if (e instanceof Ht) {
    const n = e.ofType;
    if (t.kind === "Array") {
      const r = t.values || [];
      return iT(r, (o) => Ku(n, o));
    }
    return Ku(n, t);
  }
  if (e instanceof Gr) {
    if (t.kind !== "Object")
      return [[t, `Type "${e}" must be an Object.`]];
    const n = /* @__PURE__ */ Object.create(null), r = iT(t.members, (o) => {
      var i;
      const s = (i = o == null ? void 0 : o.key) === null || i === void 0 ? void 0 : i.value;
      n[s] = !0;
      const l = e.getFields()[s];
      if (!l)
        return [
          [
            o.key,
            `Type "${e}" does not have a field "${s}".`
          ]
        ];
      const c = l ? l.type : void 0;
      return Ku(c, o.value);
    });
    for (const o of Object.keys(e.getFields())) {
      const i = e.getFields()[o];
      !n[o] && i.type instanceof et && !i.defaultValue && r.push([
        t,
        `Object of type "${e}" is missing required field "${o}".`
      ]);
    }
    return r;
  }
  return e.name === "Boolean" && t.kind !== "Boolean" || e.name === "String" && t.kind !== "String" || e.name === "ID" && t.kind !== "Number" && t.kind !== "String" || e.name === "Float" && t.kind !== "Number" || e.name === "Int" && (t.kind !== "Number" || (t.value | 0) !== t.value) ? [[t, `Expected value of type "${e}".`]] : (e instanceof Or || e instanceof Zo) && (t.kind !== "String" && t.kind !== "Number" && t.kind !== "Boolean" && t.kind !== "Null" || RV(e.parseValue(t.value))) ? [[t, `Expected value of type "${e}".`]] : [];
}
Tn(Ku, "validateValue");
function G0(e, t, n) {
  return {
    message: n,
    severity: "error",
    type: "validation",
    from: e.posFromIndex(t.start),
    to: e.posFromIndex(t.end)
  };
}
Tn(G0, "lintError");
function RV(e) {
  return e == null || e !== e;
}
Tn(RV, "isNullish");
function iT(e, t) {
  return Array.prototype.concat.apply([], e.map(t));
}
Tn(iT, "mapCat");
const oje = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null
}, Symbol.toStringTag, { value: "Module" }));
var ije = Object.defineProperty, sje = (e, t) => ije(e, "name", { value: t, configurable: !0 });
tt.defineMode("graphql-variables", (e) => {
  const t = _h({
    eatWhitespace: (n) => n.eatSpace(),
    lexRules: aje,
    parseRules: lje,
    editorConfig: { tabSize: e.tabSize }
  });
  return {
    config: e,
    startState: t.startState,
    token: t.token,
    indent: C1,
    electricInput: /^\s*[}\]]/,
    fold: "brace",
    closeBrackets: {
      pairs: '[]{}""',
      explode: "[]{}"
    }
  };
});
const aje = {
  Punctuation: /^\[|]|\{|\}|:|,/,
  Number: /^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,
  String: /^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/,
  Keyword: /^true|false|null/
}, lje = {
  Document: [je("{"), ct("Variable", Yt(je(","))), je("}")],
  Variable: [sT("variable"), je(":"), "Value"],
  Value(e) {
    switch (e.kind) {
      case "Number":
        return "NumberValue";
      case "String":
        return "StringValue";
      case "Punctuation":
        switch (e.value) {
          case "[":
            return "ListValue";
          case "{":
            return "ObjectValue";
        }
        return null;
      case "Keyword":
        switch (e.value) {
          case "true":
          case "false":
            return "BooleanValue";
          case "null":
            return "NullValue";
        }
        return null;
    }
  },
  NumberValue: [yo("Number", "number")],
  StringValue: [yo("String", "string")],
  BooleanValue: [yo("Keyword", "builtin")],
  NullValue: [yo("Keyword", "keyword")],
  ListValue: [je("["), ct("Value", Yt(je(","))), je("]")],
  ObjectValue: [je("{"), ct("ObjectField", Yt(je(","))), je("}")],
  ObjectField: [sT("attribute"), je(":"), "Value"]
};
function sT(e) {
  return {
    style: e,
    match: (t) => t.kind === "String",
    update(t, n) {
      t.name = n.value.slice(1, -1);
    }
  };
}
sje(sT, "namedKey");
const cje = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null
}, Symbol.toStringTag, { value: "Module" }));
tt.defineMode("graphql-results", (e) => {
  const t = _h({
    eatWhitespace: (n) => n.eatSpace(),
    lexRules: uje,
    parseRules: fje,
    editorConfig: { tabSize: e.tabSize }
  });
  return {
    config: e,
    startState: t.startState,
    token: t.token,
    indent: C1,
    electricInput: /^\s*[}\]]/,
    fold: "brace",
    closeBrackets: {
      pairs: '[]{}""',
      explode: "[]{}"
    }
  };
});
const uje = {
  Punctuation: /^\[|]|\{|\}|:|,/,
  Number: /^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,
  String: /^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/,
  Keyword: /^true|false|null/
}, fje = {
  Document: [je("{"), ct("Entry", je(",")), je("}")],
  Entry: [yo("String", "def"), je(":"), "Value"],
  Value(e) {
    switch (e.kind) {
      case "Number":
        return "NumberValue";
      case "String":
        return "StringValue";
      case "Punctuation":
        switch (e.value) {
          case "[":
            return "ListValue";
          case "{":
            return "ObjectValue";
        }
        return null;
      case "Keyword":
        switch (e.value) {
          case "true":
          case "false":
            return "BooleanValue";
          case "null":
            return "NullValue";
        }
        return null;
    }
  },
  NumberValue: [yo("Number", "number")],
  StringValue: [yo("String", "string")],
  BooleanValue: [yo("Keyword", "builtin")],
  NullValue: [yo("Keyword", "keyword")],
  ListValue: [je("["), ct("Value", je(",")), je("]")],
  ObjectValue: [je("{"), ct("ObjectField", je(",")), je("}")],
  ObjectField: [yo("String", "property"), je(":"), "Value"]
}, dje = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null
}, Symbol.toStringTag, { value: "Module" }));
export {
  Sje as renderYogaGraphiQL
};