(window.webpackJsonp = window.webpackJsonp || []).push([
  [3],
  {
    "+dQi": function (e, t, n) {
      !(function (e) {
        "use strict";
        e.defineMode("javascript", function (t, n) {
          var r,
            i,
            o = t.indentUnit,
            a = n.statementIndent,
            s = n.jsonld,
            l = n.json || s,
            c = n.typescript,
            u = n.wordCharacters || /[\w$\xa1-\uffff]/,
            f = (function () {
              function e(e) {
                return { type: e, style: "keyword" };
              }
              var t = e("keyword a"),
                n = e("keyword b"),
                r = e("keyword c"),
                i = e("keyword d"),
                o = e("operator"),
                a = { type: "atom", style: "atom" };
              return {
                if: e("if"),
                while: t,
                with: t,
                else: n,
                do: n,
                try: n,
                finally: n,
                return: i,
                break: i,
                continue: i,
                new: e("new"),
                delete: r,
                void: r,
                throw: r,
                debugger: e("debugger"),
                var: e("var"),
                const: e("var"),
                let: e("var"),
                function: e("function"),
                catch: e("catch"),
                for: e("for"),
                switch: e("switch"),
                case: e("case"),
                default: e("default"),
                in: o,
                typeof: o,
                instanceof: o,
                true: a,
                false: a,
                null: a,
                undefined: a,
                NaN: a,
                Infinity: a,
                this: e("this"),
                class: e("class"),
                super: e("atom"),
                yield: r,
                export: e("export"),
                import: e("import"),
                extends: r,
                await: r,
              };
            })(),
            p = /[+\-*&%=<>!?|~^@]/,
            d =
              /^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;
          function h(e, t, n) {
            return (r = e), (i = n), t;
          }
          function m(e, t) {
            var n,
              r = e.next();
            if ('"' == r || "'" == r)
              return (
                (t.tokenize =
                  ((n = r),
                  function (e, t) {
                    var r,
                      i = !1;
                    if (s && "@" == e.peek() && e.match(d))
                      return (t.tokenize = m), h("jsonld-keyword", "meta");
                    for (; null != (r = e.next()) && (r != n || i); )
                      i = !i && "\\" == r;
                    return i || (t.tokenize = m), h("string", "string");
                  })),
                t.tokenize(e, t)
              );
            if ("." == r && e.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))
              return h("number", "number");
            if ("." == r && e.match("..")) return h("spread", "meta");
            if (/[\[\]{}\(\),;\:\.]/.test(r)) return h(r);
            if ("=" == r && e.eat(">")) return h("=>", "operator");
            if ("0" == r && e.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))
              return h("number", "number");
            if (/\d/.test(r))
              return (
                e.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),
                h("number", "number")
              );
            if ("/" == r)
              return e.eat("*")
                ? ((t.tokenize = g), g(e, t))
                : e.eat("/")
                ? (e.skipToEnd(), h("comment", "comment"))
                : Ge(e, t, 1)
                ? ((function (e) {
                    for (var t, n = !1, r = !1; null != (t = e.next()); ) {
                      if (!n) {
                        if ("/" == t && !r) return;
                        "[" == t ? (r = !0) : r && "]" == t && (r = !1);
                      }
                      n = !n && "\\" == t;
                    }
                  })(e),
                  e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),
                  h("regexp", "string-2"))
                : (e.eat("="), h("operator", "operator", e.current()));
            if ("`" == r) return (t.tokenize = v), v(e, t);
            if ("#" == r && "!" == e.peek())
              return e.skipToEnd(), h("meta", "meta");
            if ("#" == r && e.eatWhile(u)) return h("variable", "property");
            if (
              ("<" == r && e.match("!--")) ||
              ("-" == r &&
                e.match("->") &&
                !/\S/.test(e.string.slice(0, e.start)))
            )
              return e.skipToEnd(), h("comment", "comment");
            if (p.test(r))
              return (
                (">" == r && t.lexical && ">" == t.lexical.type) ||
                  (e.eat("=")
                    ? ("!" != r && "=" != r) || e.eat("=")
                    : /[<>*+\-]/.test(r) && (e.eat(r), ">" == r && e.eat(r))),
                "?" == r && e.eat(".")
                  ? h(".")
                  : h("operator", "operator", e.current())
              );
            if (u.test(r)) {
              e.eatWhile(u);
              var i = e.current();
              if ("." != t.lastType) {
                if (f.propertyIsEnumerable(i)) {
                  var o = f[i];
                  return h(o.type, o.style, i);
                }
                if ("async" == i && e.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/, !1))
                  return h("async", "keyword", i);
              }
              return h("variable", "variable", i);
            }
          }
          function g(e, t) {
            for (var n, r = !1; (n = e.next()); ) {
              if ("/" == n && r) {
                t.tokenize = m;
                break;
              }
              r = "*" == n;
            }
            return h("comment", "comment");
          }
          function v(e, t) {
            for (var n, r = !1; null != (n = e.next()); ) {
              if (!r && ("`" == n || ("$" == n && e.eat("{")))) {
                t.tokenize = m;
                break;
              }
              r = !r && "\\" == n;
            }
            return h("quasi", "string-2", e.current());
          }
          function b(e, t) {
            t.fatArrowAt && (t.fatArrowAt = null);
            var n = e.string.indexOf("=>", e.start);
            if (!(n < 0)) {
              if (c) {
                var r = /:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(
                  e.string.slice(e.start, n)
                );
                r && (n = r.index);
              }
              for (var i = 0, o = !1, a = n - 1; a >= 0; --a) {
                var s = e.string.charAt(a),
                  l = "([{}])".indexOf(s);
                if (l >= 0 && l < 3) {
                  if (!i) {
                    ++a;
                    break;
                  }
                  if (0 == --i) {
                    "(" == s && (o = !0);
                    break;
                  }
                } else if (l >= 3 && l < 6) ++i;
                else if (u.test(s)) o = !0;
                else if (/["'\/`]/.test(s))
                  for (; ; --a) {
                    if (0 == a) return;
                    if (
                      e.string.charAt(a - 1) == s &&
                      "\\" != e.string.charAt(a - 2)
                    ) {
                      a--;
                      break;
                    }
                  }
                else if (o && !i) {
                  ++a;
                  break;
                }
              }
              o && !i && (t.fatArrowAt = a);
            }
          }
          var y = {
            atom: !0,
            number: !0,
            variable: !0,
            string: !0,
            regexp: !0,
            this: !0,
            "jsonld-keyword": !0,
          };
          function x(e, t, n, r, i, o) {
            (this.indented = e),
              (this.column = t),
              (this.type = n),
              (this.prev = i),
              (this.info = o),
              null != r && (this.align = r);
          }
          function w(e, t) {
            for (var n = e.localVars; n; n = n.next) if (n.name == t) return !0;
            for (var r = e.context; r; r = r.prev)
              for (n = r.vars; n; n = n.next) if (n.name == t) return !0;
          }
          var k = { state: null, column: null, marked: null, cc: null };
          function C() {
            for (var e = arguments.length - 1; e >= 0; e--)
              k.cc.push(arguments[e]);
          }
          function S() {
            return C.apply(null, arguments), !0;
          }
          function T(e, t) {
            for (var n = t; n; n = n.next) if (n.name == e) return !0;
            return !1;
          }
          function L(e) {
            var t = k.state;
            if (((k.marked = "def"), t.context))
              if ("var" == t.lexical.info && t.context && t.context.block) {
                var r = (function e(t, n) {
                  if (n) {
                    if (n.block) {
                      var r = e(t, n.prev);
                      return r
                        ? r == n.prev
                          ? n
                          : new N(r, n.vars, !0)
                        : null;
                    }
                    return T(t, n.vars)
                      ? n
                      : new N(n.prev, new A(t, n.vars), !1);
                  }
                  return null;
                })(e, t.context);
                if (null != r) return void (t.context = r);
              } else if (!T(e, t.localVars))
                return void (t.localVars = new A(e, t.localVars));
            n.globalVars &&
              !T(e, t.globalVars) &&
              (t.globalVars = new A(e, t.globalVars));
          }
          function M(e) {
            return (
              "public" == e ||
              "private" == e ||
              "protected" == e ||
              "abstract" == e ||
              "readonly" == e
            );
          }
          function N(e, t, n) {
            (this.prev = e), (this.vars = t), (this.block = n);
          }
          function A(e, t) {
            (this.name = e), (this.next = t);
          }
          var O = new A("this", new A("arguments", null));
          function E() {
            (k.state.context = new N(k.state.context, k.state.localVars, !1)),
              (k.state.localVars = O);
          }
          function $() {
            (k.state.context = new N(k.state.context, k.state.localVars, !0)),
              (k.state.localVars = null);
          }
          function z() {
            (k.state.localVars = k.state.context.vars),
              (k.state.context = k.state.context.prev);
          }
          function W(e, t) {
            var n = function () {
              var n = k.state,
                r = n.indented;
              if ("stat" == n.lexical.type) r = n.lexical.indented;
              else
                for (
                  var i = n.lexical;
                  i && ")" == i.type && i.align;
                  i = i.prev
                )
                  r = i.indented;
              n.lexical = new x(r, k.stream.column(), e, null, n.lexical, t);
            };
            return (n.lex = !0), n;
          }
          function F() {
            var e = k.state;
            e.lexical.prev &&
              (")" == e.lexical.type && (e.indented = e.lexical.indented),
              (e.lexical = e.lexical.prev));
          }
          function P(e) {
            return function t(n) {
              return n == e
                ? S()
                : ";" == e || "}" == n || ")" == n || "]" == n
                ? C()
                : S(t);
            };
          }
          function D(e, t) {
            return "var" == e
              ? S(W("vardef", t), be, P(";"), F)
              : "keyword a" == e
              ? S(W("form"), R, D, F)
              : "keyword b" == e
              ? S(W("form"), D, F)
              : "keyword d" == e
              ? k.stream.match(/^\s*$/, !1)
                ? S()
                : S(W("stat"), q, P(";"), F)
              : "debugger" == e
              ? S(P(";"))
              : "{" == e
              ? S(W("}"), $, oe, F, z)
              : ";" == e
              ? S()
              : "if" == e
              ? ("else" == k.state.lexical.info &&
                  k.state.cc[k.state.cc.length - 1] == F &&
                  k.state.cc.pop()(),
                S(W("form"), R, D, F, Se))
              : "function" == e
              ? S(Ne)
              : "for" == e
              ? S(W("form"), Te, D, F)
              : "class" == e || (c && "interface" == t)
              ? ((k.marked = "keyword"),
                S(W("form", "class" == e ? e : t), ze, F))
              : "variable" == e
              ? c && "declare" == t
                ? ((k.marked = "keyword"), S(D))
                : c &&
                  ("module" == t || "enum" == t || "type" == t) &&
                  k.stream.match(/^\s*\w/, !1)
                ? ((k.marked = "keyword"),
                  "enum" == t
                    ? S(Ue)
                    : "type" == t
                    ? S(Oe, P("operator"), ue, P(";"))
                    : S(W("form"), ye, P("{"), W("}"), oe, F, F))
                : c && "namespace" == t
                ? ((k.marked = "keyword"), S(W("form"), j, D, F))
                : c && "abstract" == t
                ? ((k.marked = "keyword"), S(D))
                : S(W("stat"), Z)
              : "switch" == e
              ? S(W("form"), R, P("{"), W("}", "switch"), $, oe, F, F, z)
              : "case" == e
              ? S(j, P(":"))
              : "default" == e
              ? S(P(":"))
              : "catch" == e
              ? S(W("form"), E, I, D, F, z)
              : "export" == e
              ? S(W("stat"), De, F)
              : "import" == e
              ? S(W("stat"), je, F)
              : "async" == e
              ? S(D)
              : "@" == t
              ? S(j, D)
              : C(W("stat"), j, P(";"), F);
          }
          function I(e) {
            if ("(" == e) return S(Ee, P(")"));
          }
          function j(e, t) {
            return B(e, t, !1);
          }
          function H(e, t) {
            return B(e, t, !0);
          }
          function R(e) {
            return "(" != e ? C() : S(W(")"), q, P(")"), F);
          }
          function B(e, t, n) {
            if (k.state.fatArrowAt == k.stream.start) {
              var r = n ? X : _;
              if ("(" == e) return S(E, W(")"), re(Ee, ")"), F, P("=>"), r, z);
              if ("variable" == e) return C(E, ye, P("=>"), r, z);
            }
            var i = n ? U : V;
            return y.hasOwnProperty(e)
              ? S(i)
              : "function" == e
              ? S(Ne, i)
              : "class" == e || (c && "interface" == t)
              ? ((k.marked = "keyword"), S(W("form"), $e, F))
              : "keyword c" == e || "async" == e
              ? S(n ? H : j)
              : "(" == e
              ? S(W(")"), q, P(")"), F, i)
              : "operator" == e || "spread" == e
              ? S(n ? H : j)
              : "[" == e
              ? S(W("]"), Ve, F, i)
              : "{" == e
              ? ie(ee, "}", null, i)
              : "quasi" == e
              ? C(K, i)
              : "new" == e
              ? S(
                  (function (e) {
                    return function (t) {
                      return "." == t
                        ? S(e ? Q : Y)
                        : "variable" == t && c
                        ? S(me, e ? U : V)
                        : C(e ? H : j);
                    };
                  })(n)
                )
              : "import" == e
              ? S(j)
              : S();
          }
          function q(e) {
            return e.match(/[;\}\)\],]/) ? C() : C(j);
          }
          function V(e, t) {
            return "," == e ? S(q) : U(e, t, !1);
          }
          function U(e, t, n) {
            var r = 0 == n ? V : U,
              i = 0 == n ? j : H;
            return "=>" == e
              ? S(E, n ? X : _, z)
              : "operator" == e
              ? /\+\+|--/.test(t) || (c && "!" == t)
                ? S(r)
                : c &&
                  "<" == t &&
                  k.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/, !1)
                ? S(W(">"), re(ue, ">"), F, r)
                : "?" == t
                ? S(j, P(":"), i)
                : S(i)
              : "quasi" == e
              ? C(K, r)
              : ";" != e
              ? "(" == e
                ? ie(H, ")", "call", r)
                : "." == e
                ? S(J, r)
                : "[" == e
                ? S(W("]"), q, P("]"), F, r)
                : c && "as" == t
                ? ((k.marked = "keyword"), S(ue, r))
                : "regexp" == e
                ? ((k.state.lastType = k.marked = "operator"),
                  k.stream.backUp(k.stream.pos - k.stream.start - 1),
                  S(i))
                : void 0
              : void 0;
          }
          function K(e, t) {
            return "quasi" != e
              ? C()
              : "${" != t.slice(t.length - 2)
              ? S(K)
              : S(j, G);
          }
          function G(e) {
            if ("}" == e)
              return (k.marked = "string-2"), (k.state.tokenize = v), S(K);
          }
          function _(e) {
            return b(k.stream, k.state), C("{" == e ? D : j);
          }
          function X(e) {
            return b(k.stream, k.state), C("{" == e ? D : H);
          }
          function Y(e, t) {
            if ("target" == t) return (k.marked = "keyword"), S(V);
          }
          function Q(e, t) {
            if ("target" == t) return (k.marked = "keyword"), S(U);
          }
          function Z(e) {
            return ":" == e ? S(F, D) : C(V, P(";"), F);
          }
          function J(e) {
            if ("variable" == e) return (k.marked = "property"), S();
          }
          function ee(e, t) {
            return "async" == e
              ? ((k.marked = "property"), S(ee))
              : "variable" == e || "keyword" == k.style
              ? ((k.marked = "property"),
                "get" == t || "set" == t
                  ? S(te)
                  : (c &&
                      k.state.fatArrowAt == k.stream.start &&
                      (n = k.stream.match(/^\s*:\s*/, !1)) &&
                      (k.state.fatArrowAt = k.stream.pos + n[0].length),
                    S(ne)))
              : "number" == e || "string" == e
              ? ((k.marked = s ? "property" : k.style + " property"), S(ne))
              : "jsonld-keyword" == e
              ? S(ne)
              : c && M(t)
              ? ((k.marked = "keyword"), S(ee))
              : "[" == e
              ? S(j, ae, P("]"), ne)
              : "spread" == e
              ? S(H, ne)
              : "*" == t
              ? ((k.marked = "keyword"), S(ee))
              : ":" == e
              ? C(ne)
              : void 0;
            var n;
          }
          function te(e) {
            return "variable" != e ? C(ne) : ((k.marked = "property"), S(Ne));
          }
          function ne(e) {
            return ":" == e ? S(H) : "(" == e ? C(Ne) : void 0;
          }
          function re(e, t, n) {
            function r(i, o) {
              if (n ? n.indexOf(i) > -1 : "," == i) {
                var a = k.state.lexical;
                return (
                  "call" == a.info && (a.pos = (a.pos || 0) + 1),
                  S(function (n, r) {
                    return n == t || r == t ? C() : C(e);
                  }, r)
                );
              }
              return i == t || o == t
                ? S()
                : n && n.indexOf(";") > -1
                ? C(e)
                : S(P(t));
            }
            return function (n, i) {
              return n == t || i == t ? S() : C(e, r);
            };
          }
          function ie(e, t, n) {
            for (var r = 3; r < arguments.length; r++) k.cc.push(arguments[r]);
            return S(W(t, n), re(e, t), F);
          }
          function oe(e) {
            return "}" == e ? S() : C(D, oe);
          }
          function ae(e, t) {
            if (c) {
              if (":" == e) return S(ue);
              if ("?" == t) return S(ae);
            }
          }
          function se(e, t) {
            if (c && (":" == e || "in" == t)) return S(ue);
          }
          function le(e) {
            if (c && ":" == e)
              return k.stream.match(/^\s*\w+\s+is\b/, !1)
                ? S(j, ce, ue)
                : S(ue);
          }
          function ce(e, t) {
            if ("is" == t) return (k.marked = "keyword"), S();
          }
          function ue(e, t) {
            return "keyof" == t || "typeof" == t || "infer" == t
              ? ((k.marked = "keyword"), S("typeof" == t ? H : ue))
              : "variable" == e || "void" == t
              ? ((k.marked = "type"), S(he))
              : "|" == t || "&" == t
              ? S(ue)
              : "string" == e || "number" == e || "atom" == e
              ? S(he)
              : "[" == e
              ? S(W("]"), re(ue, "]", ","), F, he)
              : "{" == e
              ? S(W("}"), re(pe, "}", ",;"), F, he)
              : "(" == e
              ? S(re(de, ")"), fe, he)
              : "<" == e
              ? S(re(ue, ">"), ue)
              : void 0;
          }
          function fe(e) {
            if ("=>" == e) return S(ue);
          }
          function pe(e, t) {
            return "variable" == e || "keyword" == k.style
              ? ((k.marked = "property"), S(pe))
              : "?" == t || "number" == e || "string" == e
              ? S(pe)
              : ":" == e
              ? S(ue)
              : "[" == e
              ? S(P("variable"), se, P("]"), pe)
              : "(" == e
              ? C(Ae, pe)
              : void 0;
          }
          function de(e, t) {
            return ("variable" == e && k.stream.match(/^\s*[?:]/, !1)) ||
              "?" == t
              ? S(de)
              : ":" == e
              ? S(ue)
              : "spread" == e
              ? S(de)
              : C(ue);
          }
          function he(e, t) {
            return "<" == t
              ? S(W(">"), re(ue, ">"), F, he)
              : "|" == t || "." == e || "&" == t
              ? S(ue)
              : "[" == e
              ? S(ue, P("]"), he)
              : "extends" == t || "implements" == t
              ? ((k.marked = "keyword"), S(ue))
              : "?" == t
              ? S(ue, P(":"), ue)
              : void 0;
          }
          function me(e, t) {
            if ("<" == t) return S(W(">"), re(ue, ">"), F, he);
          }
          function ge() {
            return C(ue, ve);
          }
          function ve(e, t) {
            if ("=" == t) return S(ue);
          }
          function be(e, t) {
            return "enum" == t
              ? ((k.marked = "keyword"), S(Ue))
              : C(ye, ae, ke, Ce);
          }
          function ye(e, t) {
            return c && M(t)
              ? ((k.marked = "keyword"), S(ye))
              : "variable" == e
              ? (L(t), S())
              : "spread" == e
              ? S(ye)
              : "[" == e
              ? ie(we, "]")
              : "{" == e
              ? ie(xe, "}")
              : void 0;
          }
          function xe(e, t) {
            return "variable" != e || k.stream.match(/^\s*:/, !1)
              ? ("variable" == e && (k.marked = "property"),
                "spread" == e
                  ? S(ye)
                  : "}" == e
                  ? C()
                  : "[" == e
                  ? S(j, P("]"), P(":"), xe)
                  : S(P(":"), ye, ke))
              : (L(t), S(ke));
          }
          function we() {
            return C(ye, ke);
          }
          function ke(e, t) {
            if ("=" == t) return S(H);
          }
          function Ce(e) {
            if ("," == e) return S(be);
          }
          function Se(e, t) {
            if ("keyword b" == e && "else" == t)
              return S(W("form", "else"), D, F);
          }
          function Te(e, t) {
            return "await" == t ? S(Te) : "(" == e ? S(W(")"), Le, F) : void 0;
          }
          function Le(e) {
            return "var" == e ? S(be, Me) : "variable" == e ? S(Me) : C(Me);
          }
          function Me(e, t) {
            return ")" == e
              ? S()
              : ";" == e
              ? S(Me)
              : "in" == t || "of" == t
              ? ((k.marked = "keyword"), S(j, Me))
              : C(j, Me);
          }
          function Ne(e, t) {
            return "*" == t
              ? ((k.marked = "keyword"), S(Ne))
              : "variable" == e
              ? (L(t), S(Ne))
              : "(" == e
              ? S(E, W(")"), re(Ee, ")"), F, le, D, z)
              : c && "<" == t
              ? S(W(">"), re(ge, ">"), F, Ne)
              : void 0;
          }
          function Ae(e, t) {
            return "*" == t
              ? ((k.marked = "keyword"), S(Ae))
              : "variable" == e
              ? (L(t), S(Ae))
              : "(" == e
              ? S(E, W(")"), re(Ee, ")"), F, le, z)
              : c && "<" == t
              ? S(W(">"), re(ge, ">"), F, Ae)
              : void 0;
          }
          function Oe(e, t) {
            return "keyword" == e || "variable" == e
              ? ((k.marked = "type"), S(Oe))
              : "<" == t
              ? S(W(">"), re(ge, ">"), F)
              : void 0;
          }
          function Ee(e, t) {
            return (
              "@" == t && S(j, Ee),
              "spread" == e
                ? S(Ee)
                : c && M(t)
                ? ((k.marked = "keyword"), S(Ee))
                : c && "this" == e
                ? S(ae, ke)
                : C(ye, ae, ke)
            );
          }
          function $e(e, t) {
            return "variable" == e ? ze(e, t) : We(e, t);
          }
          function ze(e, t) {
            if ("variable" == e) return L(t), S(We);
          }
          function We(e, t) {
            return "<" == t
              ? S(W(">"), re(ge, ">"), F, We)
              : "extends" == t || "implements" == t || (c && "," == e)
              ? ("implements" == t && (k.marked = "keyword"), S(c ? ue : j, We))
              : "{" == e
              ? S(W("}"), Fe, F)
              : void 0;
          }
          function Fe(e, t) {
            return "async" == e ||
              ("variable" == e &&
                ("static" == t || "get" == t || "set" == t || (c && M(t))) &&
                k.stream.match(/^\s+[\w$\xa1-\uffff]/, !1))
              ? ((k.marked = "keyword"), S(Fe))
              : "variable" == e || "keyword" == k.style
              ? ((k.marked = "property"), S(Pe, Fe))
              : "number" == e || "string" == e
              ? S(Pe, Fe)
              : "[" == e
              ? S(j, ae, P("]"), Pe, Fe)
              : "*" == t
              ? ((k.marked = "keyword"), S(Fe))
              : c && "(" == e
              ? C(Ae, Fe)
              : ";" == e || "," == e
              ? S(Fe)
              : "}" == e
              ? S()
              : "@" == t
              ? S(j, Fe)
              : void 0;
          }
          function Pe(e, t) {
            if ("?" == t) return S(Pe);
            if (":" == e) return S(ue, ke);
            if ("=" == t) return S(H);
            var n = k.state.lexical.prev;
            return C(n && "interface" == n.info ? Ae : Ne);
          }
          function De(e, t) {
            return "*" == t
              ? ((k.marked = "keyword"), S(qe, P(";")))
              : "default" == t
              ? ((k.marked = "keyword"), S(j, P(";")))
              : "{" == e
              ? S(re(Ie, "}"), qe, P(";"))
              : C(D);
          }
          function Ie(e, t) {
            return "as" == t
              ? ((k.marked = "keyword"), S(P("variable")))
              : "variable" == e
              ? C(H, Ie)
              : void 0;
          }
          function je(e) {
            return "string" == e ? S() : "(" == e ? C(j) : C(He, Re, qe);
          }
          function He(e, t) {
            return "{" == e
              ? ie(He, "}")
              : ("variable" == e && L(t),
                "*" == t && (k.marked = "keyword"),
                S(Be));
          }
          function Re(e) {
            if ("," == e) return S(He, Re);
          }
          function Be(e, t) {
            if ("as" == t) return (k.marked = "keyword"), S(He);
          }
          function qe(e, t) {
            if ("from" == t) return (k.marked = "keyword"), S(j);
          }
          function Ve(e) {
            return "]" == e ? S() : C(re(H, "]"));
          }
          function Ue() {
            return C(W("form"), ye, P("{"), W("}"), re(Ke, "}"), F, F);
          }
          function Ke() {
            return C(ye, ke);
          }
          function Ge(e, t, n) {
            return (
              (t.tokenize == m &&
                /^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(
                  t.lastType
                )) ||
              ("quasi" == t.lastType &&
                /\{\s*$/.test(e.string.slice(0, e.pos - (n || 0))))
            );
          }
          return (
            (z.lex = !0),
            (F.lex = !0),
            {
              startState: function (e) {
                var t = {
                  tokenize: m,
                  lastType: "sof",
                  cc: [],
                  lexical: new x((e || 0) - o, 0, "block", !1),
                  localVars: n.localVars,
                  context: n.localVars && new N(null, null, !1),
                  indented: e || 0,
                };
                return (
                  n.globalVars &&
                    "object" == typeof n.globalVars &&
                    (t.globalVars = n.globalVars),
                  t
                );
              },
              token: function (e, t) {
                if (
                  (e.sol() &&
                    (t.lexical.hasOwnProperty("align") ||
                      (t.lexical.align = !1),
                    (t.indented = e.indentation()),
                    b(e, t)),
                  t.tokenize != g && e.eatSpace())
                )
                  return null;
                var n = t.tokenize(e, t);
                return "comment" == r
                  ? n
                  : ((t.lastType =
                      "operator" != r || ("++" != i && "--" != i)
                        ? r
                        : "incdec"),
                    (function (e, t, n, r, i) {
                      var o = e.cc;
                      for (
                        k.state = e,
                          k.stream = i,
                          k.marked = null,
                          k.cc = o,
                          k.style = t,
                          e.lexical.hasOwnProperty("align") ||
                            (e.lexical.align = !0);
                        ;
                      )
                        if ((o.length ? o.pop() : l ? j : D)(n, r)) {
                          for (; o.length && o[o.length - 1].lex; ) o.pop()();
                          return k.marked
                            ? k.marked
                            : "variable" == n && w(e, r)
                            ? "variable-2"
                            : t;
                        }
                    })(t, n, r, i, e));
              },
              indent: function (t, r) {
                if (t.tokenize == g) return e.Pass;
                if (t.tokenize != m) return 0;
                var i,
                  s = r && r.charAt(0),
                  l = t.lexical;
                if (!/^\s*else\b/.test(r))
                  for (var c = t.cc.length - 1; c >= 0; --c) {
                    var u = t.cc[c];
                    if (u == F) l = l.prev;
                    else if (u != Se) break;
                  }
                for (
                  ;
                  ("stat" == l.type || "form" == l.type) &&
                  ("}" == s ||
                    ((i = t.cc[t.cc.length - 1]) &&
                      (i == V || i == U) &&
                      !/^[,\.=+\-*:?[\(]/.test(r)));
                )
                  l = l.prev;
                a && ")" == l.type && "stat" == l.prev.type && (l = l.prev);
                var f = l.type,
                  d = s == f;
                return "vardef" == f
                  ? l.indented +
                      ("operator" == t.lastType || "," == t.lastType
                        ? l.info.length + 1
                        : 0)
                  : "form" == f && "{" == s
                  ? l.indented
                  : "form" == f
                  ? l.indented + o
                  : "stat" == f
                  ? l.indented +
                    ((function (e, t) {
                      return (
                        "operator" == e.lastType ||
                        "," == e.lastType ||
                        p.test(t.charAt(0)) ||
                        /[,.]/.test(t.charAt(0))
                      );
                    })(t, r)
                      ? a || o
                      : 0)
                  : "switch" != l.info || d || 0 == n.doubleIndentSwitch
                  ? l.align
                    ? l.column + (d ? 0 : 1)
                    : l.indented + (d ? 0 : o)
                  : l.indented + (/^(?:case|default)\b/.test(r) ? o : 2 * o);
              },
              electricInput: /^\s*(?:case .*?:|default:|\{|\})$/,
              blockCommentStart: l ? null : "/*",
              blockCommentEnd: l ? null : "*/",
              blockCommentContinue: l ? null : " * ",
              lineComment: l ? null : "//",
              fold: "brace",
              closeBrackets: "()[]{}''\"\"``",
              helperType: l ? "json" : "javascript",
              jsonldMode: s,
              jsonMode: l,
              expressionAllowed: Ge,
              skipExpression: function (e) {
                var t = e.cc[e.cc.length - 1];
                (t != j && t != H) || e.cc.pop();
              },
            }
          );
        }),
          e.registerHelper("wordChars", "javascript", /[\w$]/),
          e.defineMIME("text/javascript", "javascript"),
          e.defineMIME("text/ecmascript", "javascript"),
          e.defineMIME("application/javascript", "javascript"),
          e.defineMIME("application/x-javascript", "javascript"),
          e.defineMIME("application/ecmascript", "javascript"),
          e.defineMIME("application/json", { name: "javascript", json: !0 }),
          e.defineMIME("application/x-json", { name: "javascript", json: !0 }),
          e.defineMIME("application/ld+json", {
            name: "javascript",
            jsonld: !0,
          }),
          e.defineMIME("text/typescript", {
            name: "javascript",
            typescript: !0,
          }),
          e.defineMIME("application/typescript", {
            name: "javascript",
            typescript: !0,
          });
      })(n("VrN/"));
    },
    "1eCo": function (e, t, n) {
      !(function (e) {
        "use strict";
        var t = {
            autoSelfClosers: {
              area: !0,
              base: !0,
              br: !0,
              col: !0,
              command: !0,
              embed: !0,
              frame: !0,
              hr: !0,
              img: !0,
              input: !0,
              keygen: !0,
              link: !0,
              meta: !0,
              param: !0,
              source: !0,
              track: !0,
              wbr: !0,
              menuitem: !0,
            },
            implicitlyClosed: {
              dd: !0,
              li: !0,
              optgroup: !0,
              option: !0,
              p: !0,
              rp: !0,
              rt: !0,
              tbody: !0,
              td: !0,
              tfoot: !0,
              th: !0,
              tr: !0,
            },
            contextGrabbers: {
              dd: { dd: !0, dt: !0 },
              dt: { dd: !0, dt: !0 },
              li: { li: !0 },
              option: { option: !0, optgroup: !0 },
              optgroup: { optgroup: !0 },
              p: {
                address: !0,
                article: !0,
                aside: !0,
                blockquote: !0,
                dir: !0,
                div: !0,
                dl: !0,
                fieldset: !0,
                footer: !0,
                form: !0,
                h1: !0,
                h2: !0,
                h3: !0,
                h4: !0,
                h5: !0,
                h6: !0,
                header: !0,
                hgroup: !0,
                hr: !0,
                menu: !0,
                nav: !0,
                ol: !0,
                p: !0,
                pre: !0,
                section: !0,
                table: !0,
                ul: !0,
              },
              rp: { rp: !0, rt: !0 },
              rt: { rp: !0, rt: !0 },
              tbody: { tbody: !0, tfoot: !0 },
              td: { td: !0, th: !0 },
              tfoot: { tbody: !0 },
              th: { td: !0, th: !0 },
              thead: { tbody: !0, tfoot: !0 },
              tr: { tr: !0 },
            },
            doNotIndent: { pre: !0 },
            allowUnquoted: !0,
            allowMissing: !0,
            caseFold: !0,
          },
          n = {
            autoSelfClosers: {},
            implicitlyClosed: {},
            contextGrabbers: {},
            doNotIndent: {},
            allowUnquoted: !1,
            allowMissing: !1,
            allowMissingTagName: !1,
            caseFold: !1,
          };
        e.defineMode("xml", function (r, i) {
          var o,
            a,
            s = r.indentUnit,
            l = {},
            c = i.htmlMode ? t : n;
          for (var u in c) l[u] = c[u];
          for (var u in i) l[u] = i[u];
          function f(e, t) {
            function n(n) {
              return (t.tokenize = n), n(e, t);
            }
            var r = e.next();
            return "<" == r
              ? e.eat("!")
                ? e.eat("[")
                  ? e.match("CDATA[")
                    ? n(d("atom", "]]>"))
                    : null
                  : e.match("--")
                  ? n(d("comment", "--\x3e"))
                  : e.match("DOCTYPE", !0, !0)
                  ? (e.eatWhile(/[\w\._\-]/),
                    n(
                      (function e(t) {
                        return function (n, r) {
                          for (var i; null != (i = n.next()); ) {
                            if ("<" == i)
                              return (r.tokenize = e(t + 1)), r.tokenize(n, r);
                            if (">" == i) {
                              if (1 == t) {
                                r.tokenize = f;
                                break;
                              }
                              return (r.tokenize = e(t - 1)), r.tokenize(n, r);
                            }
                          }
                          return "meta";
                        };
                      })(1)
                    ))
                  : null
                : e.eat("?")
                ? (e.eatWhile(/[\w\._\-]/),
                  (t.tokenize = d("meta", "?>")),
                  "meta")
                : ((o = e.eat("/") ? "closeTag" : "openTag"),
                  (t.tokenize = p),
                  "tag bracket")
              : "&" == r
              ? (
                  e.eat("#")
                    ? e.eat("x")
                      ? e.eatWhile(/[a-fA-F\d]/) && e.eat(";")
                      : e.eatWhile(/[\d]/) && e.eat(";")
                    : e.eatWhile(/[\w\.\-:]/) && e.eat(";")
                )
                ? "atom"
                : "error"
              : (e.eatWhile(/[^&<]/), null);
          }
          function p(e, t) {
            var n,
              r,
              i = e.next();
            if (">" == i || ("/" == i && e.eat(">")))
              return (
                (t.tokenize = f),
                (o = ">" == i ? "endTag" : "selfcloseTag"),
                "tag bracket"
              );
            if ("=" == i) return (o = "equals"), null;
            if ("<" == i) {
              (t.tokenize = f), (t.state = v), (t.tagName = t.tagStart = null);
              var a = t.tokenize(e, t);
              return a ? a + " tag error" : "tag error";
            }
            return /[\'\"]/.test(i)
              ? ((t.tokenize =
                  ((n = i),
                  ((r = function (e, t) {
                    for (; !e.eol(); )
                      if (e.next() == n) {
                        t.tokenize = p;
                        break;
                      }
                    return "string";
                  }).isInAttribute = !0),
                  r)),
                (t.stringStartCol = e.column()),
                t.tokenize(e, t))
              : (e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/), "word");
          }
          function d(e, t) {
            return function (n, r) {
              for (; !n.eol(); ) {
                if (n.match(t)) {
                  r.tokenize = f;
                  break;
                }
                n.next();
              }
              return e;
            };
          }
          function h(e, t, n) {
            (this.prev = e.context),
              (this.tagName = t),
              (this.indent = e.indented),
              (this.startOfLine = n),
              (l.doNotIndent.hasOwnProperty(t) ||
                (e.context && e.context.noIndent)) &&
                (this.noIndent = !0);
          }
          function m(e) {
            e.context && (e.context = e.context.prev);
          }
          function g(e, t) {
            for (var n; ; ) {
              if (!e.context) return;
              if (
                ((n = e.context.tagName),
                !l.contextGrabbers.hasOwnProperty(n) ||
                  !l.contextGrabbers[n].hasOwnProperty(t))
              )
                return;
              m(e);
            }
          }
          function v(e, t, n) {
            return "openTag" == e
              ? ((n.tagStart = t.column()), b)
              : "closeTag" == e
              ? y
              : v;
          }
          function b(e, t, n) {
            return "word" == e
              ? ((n.tagName = t.current()), (a = "tag"), k)
              : l.allowMissingTagName && "endTag" == e
              ? ((a = "tag bracket"), k(e, 0, n))
              : ((a = "error"), b);
          }
          function y(e, t, n) {
            if ("word" == e) {
              var r = t.current();
              return (
                n.context &&
                  n.context.tagName != r &&
                  l.implicitlyClosed.hasOwnProperty(n.context.tagName) &&
                  m(n),
                (n.context && n.context.tagName == r) || !1 === l.matchClosing
                  ? ((a = "tag"), x)
                  : ((a = "tag error"), w)
              );
            }
            return l.allowMissingTagName && "endTag" == e
              ? ((a = "tag bracket"), x(e, 0, n))
              : ((a = "error"), w);
          }
          function x(e, t, n) {
            return "endTag" != e ? ((a = "error"), x) : (m(n), v);
          }
          function w(e, t, n) {
            return (a = "error"), x(e, 0, n);
          }
          function k(e, t, n) {
            if ("word" == e) return (a = "attribute"), C;
            if ("endTag" == e || "selfcloseTag" == e) {
              var r = n.tagName,
                i = n.tagStart;
              return (
                (n.tagName = n.tagStart = null),
                "selfcloseTag" == e || l.autoSelfClosers.hasOwnProperty(r)
                  ? g(n, r)
                  : (g(n, r), (n.context = new h(n, r, i == n.indented))),
                v
              );
            }
            return (a = "error"), k;
          }
          function C(e, t, n) {
            return "equals" == e
              ? S
              : (l.allowMissing || (a = "error"), k(e, 0, n));
          }
          function S(e, t, n) {
            return "string" == e
              ? T
              : "word" == e && l.allowUnquoted
              ? ((a = "string"), k)
              : ((a = "error"), k(e, 0, n));
          }
          function T(e, t, n) {
            return "string" == e ? T : k(e, 0, n);
          }
          return (
            (f.isInText = !0),
            {
              startState: function (e) {
                var t = {
                  tokenize: f,
                  state: v,
                  indented: e || 0,
                  tagName: null,
                  tagStart: null,
                  context: null,
                };
                return null != e && (t.baseIndent = e), t;
              },
              token: function (e, t) {
                if (
                  (!t.tagName && e.sol() && (t.indented = e.indentation()),
                  e.eatSpace())
                )
                  return null;
                o = null;
                var n = t.tokenize(e, t);
                return (
                  (n || o) &&
                    "comment" != n &&
                    ((a = null),
                    (t.state = t.state(o || n, e, t)),
                    a && (n = "error" == a ? n + " error" : a)),
                  n
                );
              },
              indent: function (t, n, r) {
                var i = t.context;
                if (t.tokenize.isInAttribute)
                  return t.tagStart == t.indented
                    ? t.stringStartCol + 1
                    : t.indented + s;
                if (i && i.noIndent) return e.Pass;
                if (t.tokenize != p && t.tokenize != f)
                  return r ? r.match(/^(\s*)/)[0].length : 0;
                if (t.tagName)
                  return !1 !== l.multilineTagIndentPastTag
                    ? t.tagStart + t.tagName.length + 2
                    : t.tagStart + s * (l.multilineTagIndentFactor || 1);
                if (l.alignCDATA && /<!\[CDATA\[/.test(n)) return 0;
                var o = n && /^<(\/)?([\w_:\.-]*)/.exec(n);
                if (o && o[1])
                  for (; i; ) {
                    if (i.tagName == o[2]) {
                      i = i.prev;
                      break;
                    }
                    if (!l.implicitlyClosed.hasOwnProperty(i.tagName)) break;
                    i = i.prev;
                  }
                else if (o)
                  for (; i; ) {
                    var a = l.contextGrabbers[i.tagName];
                    if (!a || !a.hasOwnProperty(o[2])) break;
                    i = i.prev;
                  }
                for (; i && i.prev && !i.startOfLine; ) i = i.prev;
                return i ? i.indent + s : t.baseIndent || 0;
              },
              electricInput: /<\/[\s\w:]+>$/,
              blockCommentStart: "\x3c!--",
              blockCommentEnd: "--\x3e",
              configuration: l.htmlMode ? "html" : "xml",
              helperType: l.htmlMode ? "html" : "xml",
              skipAttribute: function (e) {
                e.state == S && (e.state = k);
              },
              xmlCurrentTag: function (e) {
                return e.tagName
                  ? { name: e.tagName, close: "closeTag" == e.type }
                  : null;
              },
              xmlCurrentContext: function (e) {
                for (var t = [], n = e.context; n; n = n.prev)
                  n.tagName && t.push(n.tagName);
                return t.reverse();
              },
            }
          );
        }),
          e.defineMIME("text/xml", "xml"),
          e.defineMIME("application/xml", "xml"),
          e.mimeModes.hasOwnProperty("text/html") ||
            e.defineMIME("text/html", { name: "xml", htmlMode: !0 });
      })(n("VrN/"));
    },
    "1p+/": function (e, t, n) {
      !(function (e) {
        "use strict";
        var t = {
            script: [
              ["lang", /(javascript|babel)/i, "javascript"],
              [
                "type",
                /^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,
                "javascript",
              ],
              ["type", /./, "text/plain"],
              [null, null, "javascript"],
            ],
            style: [
              ["lang", /^css$/i, "css"],
              ["type", /^(text\/)?(x-)?(stylesheet|css)$/i, "css"],
              ["type", /./, "text/plain"],
              [null, null, "css"],
            ],
          },
          n = {};
        function r(e, t) {
          var r = e.match(
            (function (e) {
              var t = n[e];
              return (
                t ||
                (n[e] = new RegExp(
                  "\\s+" + e + "\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"
                ))
              );
            })(t)
          );
          return r ? /^\s*(.*?)\s*$/.exec(r[2])[1] : "";
        }
        function i(e, t) {
          return new RegExp((t ? "^" : "") + "</s*" + e + "s*>", "i");
        }
        function o(e, t) {
          for (var n in e)
            for (
              var r = t[n] || (t[n] = []), i = e[n], o = i.length - 1;
              o >= 0;
              o--
            )
              r.unshift(i[o]);
        }
        e.defineMode(
          "htmlmixed",
          function (n, a) {
            var s = e.getMode(n, {
                name: "xml",
                htmlMode: !0,
                multilineTagIndentFactor: a.multilineTagIndentFactor,
                multilineTagIndentPastTag: a.multilineTagIndentPastTag,
              }),
              l = {},
              c = a && a.tags,
              u = a && a.scriptTypes;
            if ((o(t, l), c && o(c, l), u))
              for (var f = u.length - 1; f >= 0; f--)
                l.script.unshift(["type", u[f].matches, u[f].mode]);
            function p(t, o) {
              var a,
                c = s.token(t, o.htmlState),
                u = /\btag\b/.test(c);
              if (
                u &&
                !/[<>\s\/]/.test(t.current()) &&
                (a =
                  o.htmlState.tagName && o.htmlState.tagName.toLowerCase()) &&
                l.hasOwnProperty(a)
              )
                o.inTag = a + " ";
              else if (o.inTag && u && />$/.test(t.current())) {
                var f = /^([\S]+) (.*)/.exec(o.inTag);
                o.inTag = null;
                var d =
                    ">" == t.current() &&
                    (function (e, t) {
                      for (var n = 0; n < e.length; n++) {
                        var i = e[n];
                        if (!i[0] || i[1].test(r(t, i[0]))) return i[2];
                      }
                    })(l[f[1]], f[2]),
                  h = e.getMode(n, d),
                  m = i(f[1], !0),
                  g = i(f[1], !1);
                (o.token = function (e, t) {
                  return e.match(m, !1)
                    ? ((t.token = p), (t.localState = t.localMode = null), null)
                    : (function (e, t, n) {
                        var r = e.current(),
                          i = r.search(t);
                        return (
                          i > -1
                            ? e.backUp(r.length - i)
                            : r.match(/<\/?$/) &&
                              (e.backUp(r.length),
                              e.match(t, !1) || e.match(r)),
                          n
                        );
                      })(e, g, t.localMode.token(e, t.localState));
                }),
                  (o.localMode = h),
                  (o.localState = e.startState(
                    h,
                    s.indent(o.htmlState, "", "")
                  ));
              } else
                o.inTag &&
                  ((o.inTag += t.current()), t.eol() && (o.inTag += " "));
              return c;
            }
            return {
              startState: function () {
                return {
                  token: p,
                  inTag: null,
                  localMode: null,
                  localState: null,
                  htmlState: e.startState(s),
                };
              },
              copyState: function (t) {
                var n;
                return (
                  t.localState && (n = e.copyState(t.localMode, t.localState)),
                  {
                    token: t.token,
                    inTag: t.inTag,
                    localMode: t.localMode,
                    localState: n,
                    htmlState: e.copyState(s, t.htmlState),
                  }
                );
              },
              token: function (e, t) {
                return t.token(e, t);
              },
              indent: function (t, n, r) {
                return !t.localMode || /^\s*<\//.test(n)
                  ? s.indent(t.htmlState, n, r)
                  : t.localMode.indent
                  ? t.localMode.indent(t.localState, n, r)
                  : e.Pass;
              },
              innerMode: function (e) {
                return {
                  state: e.localState || e.htmlState,
                  mode: e.localMode || s,
                };
              },
            };
          },
          "xml",
          "javascript",
          "css"
        ),
          e.defineMIME("text/html", "htmlmixed");
      })(n("VrN/"), n("1eCo"), n("+dQi"), n("ewDg"));
    },
    3: function (e, t, n) {
      e.exports = n("vR+M");
    },
    C2zF: function (e, t, n) {
      !(function (e) {
        "use strict";
        function t() {
          (this.posFrom = this.posTo = this.lastQuery = this.query = null),
            (this.overlay = null);
        }
        function n(e) {
          return e.state.search || (e.state.search = new t());
        }
        function r(e) {
          return "string" == typeof e && e == e.toLowerCase();
        }
        function i(e, t, n) {
          return e.getSearchCursor(t, n, { caseFold: r(t), multiline: !0 });
        }
        function o(e, t, n, r, i) {
          e.openDialog
            ? e.openDialog(t, i, { value: r, selectValueOnOpen: !0 })
            : i(prompt(n, r));
        }
        function a(e) {
          return e.replace(/\\([nrt\\])/g, function (e, t) {
            return "n" == t
              ? "\n"
              : "r" == t
              ? "\r"
              : "t" == t
              ? "\t"
              : "\\" == t
              ? "\\"
              : e;
          });
        }
        function s(e) {
          var t = e.match(/^\/(.*)\/([a-z]*)$/);
          if (t)
            try {
              e = new RegExp(t[1], -1 == t[2].indexOf("i") ? "" : "i");
            } catch (e) {}
          else e = a(e);
          return ("string" == typeof e ? "" == e : e.test("")) && (e = /x^/), e;
        }
        function l(e, t, n) {
          (t.queryText = n),
            (t.query = s(n)),
            e.removeOverlay(t.overlay, r(t.query)),
            (t.overlay = (function (e, t) {
              return (
                "string" == typeof e
                  ? (e = new RegExp(
                      e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"),
                      t ? "gi" : "g"
                    ))
                  : e.global ||
                    (e = new RegExp(e.source, e.ignoreCase ? "gi" : "g")),
                {
                  token: function (t) {
                    e.lastIndex = t.pos;
                    var n = e.exec(t.string);
                    if (n && n.index == t.pos)
                      return (t.pos += n[0].length || 1), "searching";
                    n ? (t.pos = n.index) : t.skipToEnd();
                  },
                }
              );
            })(t.query, r(t.query))),
            e.addOverlay(t.overlay),
            e.showMatchesOnScrollbar &&
              (t.annotate && (t.annotate.clear(), (t.annotate = null)),
              (t.annotate = e.showMatchesOnScrollbar(t.query, r(t.query))));
        }
        function c(t, r, i, a) {
          var s = n(t);
          if (s.query) return u(t, r);
          var c = t.getSelection() || s.lastQuery;
          if (
            (c instanceof RegExp && "x^" == c.source && (c = null),
            i && t.openDialog)
          ) {
            var d = null,
              h = function (n, r) {
                e.e_stop(r),
                  n &&
                    (n != s.queryText &&
                      (l(t, s, n), (s.posFrom = s.posTo = t.getCursor())),
                    d && (d.style.opacity = 1),
                    u(t, r.shiftKey, function (e, n) {
                      var r;
                      n.line < 3 &&
                        document.querySelector &&
                        (r =
                          t.display.wrapper.querySelector(
                            ".CodeMirror-dialog"
                          )) &&
                        r.getBoundingClientRect().bottom - 4 >
                          t.cursorCoords(n, "window").top &&
                        ((d = r).style.opacity = 0.4);
                    }));
              };
            !(function (e, t, n, r, i) {
              e.openDialog(t, r, {
                value: n,
                selectValueOnOpen: !0,
                closeOnEnter: !1,
                onClose: function () {
                  f(e);
                },
                onKeyDown: i,
              });
            })(t, p(t), c, h, function (r, i) {
              var o = e.keyName(r),
                a = t.getOption("extraKeys"),
                s = (a && a[o]) || e.keyMap[t.getOption("keyMap")][o];
              "findNext" == s ||
              "findPrev" == s ||
              "findPersistentNext" == s ||
              "findPersistentPrev" == s
                ? (e.e_stop(r), l(t, n(t), i), t.execCommand(s))
                : ("find" != s && "findPersistent" != s) ||
                  (e.e_stop(r), h(i, r));
            }),
              a && c && (l(t, s, c), u(t, r));
          } else
            o(t, p(t), "Search for:", c, function (e) {
              e &&
                !s.query &&
                t.operation(function () {
                  l(t, s, e), (s.posFrom = s.posTo = t.getCursor()), u(t, r);
                });
            });
        }
        function u(t, r, o) {
          t.operation(function () {
            var a = n(t),
              s = i(t, a.query, r ? a.posFrom : a.posTo);
            (s.find(r) ||
              (s = i(
                t,
                a.query,
                r ? e.Pos(t.lastLine()) : e.Pos(t.firstLine(), 0)
              )).find(r)) &&
              (t.setSelection(s.from(), s.to()),
              t.scrollIntoView({ from: s.from(), to: s.to() }, 20),
              (a.posFrom = s.from()),
              (a.posTo = s.to()),
              o && o(s.from(), s.to()));
          });
        }
        function f(e) {
          e.operation(function () {
            var t = n(e);
            (t.lastQuery = t.query),
              t.query &&
                ((t.query = t.queryText = null),
                e.removeOverlay(t.overlay),
                t.annotate && (t.annotate.clear(), (t.annotate = null)));
          });
        }
        function p(e) {
          return (
            '<span class="CodeMirror-search-label">' +
            e.phrase("Search:") +
            '</span> <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">' +
            e.phrase("(Use /re/ syntax for regexp search)") +
            "</span>"
          );
        }
        function d(e, t, n) {
          e.operation(function () {
            for (var r = i(e, t); r.findNext(); )
              if ("string" != typeof t) {
                var o = e.getRange(r.from(), r.to()).match(t);
                r.replace(
                  n.replace(/\$(\d)/g, function (e, t) {
                    return o[t];
                  })
                );
              } else r.replace(n);
          });
        }
        function h(e, t) {
          if (!e.getOption("readOnly")) {
            var r = e.getSelection() || n(e).lastQuery,
              l =
                '<span class="CodeMirror-search-label">' +
                (t ? e.phrase("Replace all:") : e.phrase("Replace:")) +
                "</span>";
            o(
              e,
              l +
                (function (e) {
                  return (
                    ' <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">' +
                    e.phrase("(Use /re/ syntax for regexp search)") +
                    "</span>"
                  );
                })(e),
              l,
              r,
              function (n) {
                n &&
                  ((n = s(n)),
                  o(
                    e,
                    (function (e) {
                      return (
                        '<span class="CodeMirror-search-label">' +
                        e.phrase("With:") +
                        '</span> <input type="text" style="width: 10em" class="CodeMirror-search-field"/>'
                      );
                    })(e),
                    e.phrase("Replace with:"),
                    "",
                    function (r) {
                      if (((r = a(r)), t)) d(e, n, r);
                      else {
                        f(e);
                        var o = i(e, n, e.getCursor("from")),
                          s = function () {
                            var t,
                              a = o.from();
                            (!(t = o.findNext()) &&
                              ((o = i(e, n)),
                              !(t = o.findNext()) ||
                                (a &&
                                  o.from().line == a.line &&
                                  o.from().ch == a.ch))) ||
                              (e.setSelection(o.from(), o.to()),
                              e.scrollIntoView({ from: o.from(), to: o.to() }),
                              (function (e, t, n, r) {
                                e.openConfirm
                                  ? e.openConfirm(t, r)
                                  : confirm(n) && r[0]();
                              })(
                                e,
                                (function (e) {
                                  return (
                                    '<span class="CodeMirror-search-label">' +
                                    e.phrase("Replace?") +
                                    "</span> <button>" +
                                    e.phrase("Yes") +
                                    "</button> <button>" +
                                    e.phrase("No") +
                                    "</button> <button>" +
                                    e.phrase("All") +
                                    "</button> <button>" +
                                    e.phrase("Stop") +
                                    "</button> "
                                  );
                                })(e),
                                e.phrase("Replace?"),
                                [
                                  function () {
                                    l(t);
                                  },
                                  s,
                                  function () {
                                    d(e, n, r);
                                  },
                                ]
                              ));
                          },
                          l = function (e) {
                            o.replace(
                              "string" == typeof n
                                ? r
                                : r.replace(/\$(\d)/g, function (t, n) {
                                    return e[n];
                                  })
                            ),
                              s();
                          };
                        s();
                      }
                    }
                  ));
              }
            );
          }
        }
        (e.commands.find = function (e) {
          f(e), c(e);
        }),
          (e.commands.findPersistent = function (e) {
            f(e), c(e, !1, !0);
          }),
          (e.commands.findPersistentNext = function (e) {
            c(e, !1, !0, !0);
          }),
          (e.commands.findPersistentPrev = function (e) {
            c(e, !0, !0, !0);
          }),
          (e.commands.findNext = c),
          (e.commands.findPrev = function (e) {
            c(e, !0);
          }),
          (e.commands.clearSearch = f),
          (e.commands.replace = h),
          (e.commands.replaceAll = function (e) {
            h(e, !0);
          });
      })(n("VrN/"), n("uTOq"), n("Ku0u"));
    },
    Ku0u: function (e, t, n) {
      !(function (e) {
        function t(t, n, r) {
          var i,
            o = t.getWrapperElement();
          return (
            ((i = o.appendChild(document.createElement("div"))).className = r
              ? "CodeMirror-dialog CodeMirror-dialog-bottom"
              : "CodeMirror-dialog CodeMirror-dialog-top"),
            "string" == typeof n ? (i.innerHTML = n) : i.appendChild(n),
            e.addClass(o, "dialog-opened"),
            i
          );
        }
        function n(e, t) {
          e.state.currentNotificationClose &&
            e.state.currentNotificationClose(),
            (e.state.currentNotificationClose = t);
        }
        e.defineExtension("openDialog", function (r, i, o) {
          o || (o = {}), n(this, null);
          var a = t(this, r, o.bottom),
            s = !1,
            l = this;
          function c(t) {
            if ("string" == typeof t) f.value = t;
            else {
              if (s) return;
              (s = !0),
                e.rmClass(a.parentNode, "dialog-opened"),
                a.parentNode.removeChild(a),
                l.focus(),
                o.onClose && o.onClose(a);
            }
          }
          var u,
            f = a.getElementsByTagName("input")[0];
          return (
            f
              ? (f.focus(),
                o.value &&
                  ((f.value = o.value),
                  !1 !== o.selectValueOnOpen && f.select()),
                o.onInput &&
                  e.on(f, "input", function (e) {
                    o.onInput(e, f.value, c);
                  }),
                o.onKeyUp &&
                  e.on(f, "keyup", function (e) {
                    o.onKeyUp(e, f.value, c);
                  }),
                e.on(f, "keydown", function (t) {
                  (o && o.onKeyDown && o.onKeyDown(t, f.value, c)) ||
                    ((27 == t.keyCode ||
                      (!1 !== o.closeOnEnter && 13 == t.keyCode)) &&
                      (f.blur(), e.e_stop(t), c()),
                    13 == t.keyCode && i(f.value, t));
                }),
                !1 !== o.closeOnBlur &&
                  e.on(a, "focusout", function (e) {
                    null !== e.relatedTarget && c();
                  }))
              : (u = a.getElementsByTagName("button")[0]) &&
                (e.on(u, "click", function () {
                  c(), l.focus();
                }),
                !1 !== o.closeOnBlur && e.on(u, "blur", c),
                u.focus()),
            c
          );
        }),
          e.defineExtension("openConfirm", function (r, i, o) {
            n(this, null);
            var a = t(this, r, o && o.bottom),
              s = a.getElementsByTagName("button"),
              l = !1,
              c = this,
              u = 1;
            function f() {
              l ||
                ((l = !0),
                e.rmClass(a.parentNode, "dialog-opened"),
                a.parentNode.removeChild(a),
                c.focus());
            }
            s[0].focus();
            for (var p = 0; p < s.length; ++p) {
              var d = s[p];
              !(function (t) {
                e.on(d, "click", function (n) {
                  e.e_preventDefault(n), f(), t && t(c);
                });
              })(i[p]),
                e.on(d, "blur", function () {
                  --u,
                    setTimeout(function () {
                      u <= 0 && f();
                    }, 200);
                }),
                e.on(d, "focus", function () {
                  ++u;
                });
            }
          }),
          e.defineExtension("openNotification", function (r, i) {
            n(this, c);
            var o,
              a = t(this, r, i && i.bottom),
              s = !1,
              l = i && void 0 !== i.duration ? i.duration : 5e3;
            function c() {
              s ||
                ((s = !0),
                clearTimeout(o),
                e.rmClass(a.parentNode, "dialog-opened"),
                a.parentNode.removeChild(a));
            }
            return (
              e.on(a, "click", function (t) {
                e.e_preventDefault(t), c();
              }),
              l && (o = setTimeout(c, l)),
              c
            );
          });
      })(n("VrN/"));
    },
    McUL: function (e, t, n) {
      !(function (e) {
        "use strict";
        var t = "CodeMirror-activeline-background";
        function n(e) {
          for (var n = 0; n < e.state.activeLines.length; n++)
            e.removeLineClass(
              e.state.activeLines[n],
              "wrap",
              "CodeMirror-activeline"
            ),
              e.removeLineClass(e.state.activeLines[n], "background", t),
              e.removeLineClass(
                e.state.activeLines[n],
                "gutter",
                "CodeMirror-activeline-gutter"
              );
        }
        function r(e, r) {
          for (var i = [], o = 0; o < r.length; o++) {
            var a = r[o],
              s = e.getOption("styleActiveLine");
            if (
              "object" == typeof s && s.nonEmpty
                ? a.anchor.line == a.head.line
                : a.empty()
            ) {
              var l = e.getLineHandleVisualStart(a.head.line);
              i[i.length - 1] != l && i.push(l);
            }
          }
          (function (e, t) {
            if (e.length != t.length) return !1;
            for (var n = 0; n < e.length; n++) if (e[n] != t[n]) return !1;
            return !0;
          })(e.state.activeLines, i) ||
            e.operation(function () {
              n(e);
              for (var r = 0; r < i.length; r++)
                e.addLineClass(i[r], "wrap", "CodeMirror-activeline"),
                  e.addLineClass(i[r], "background", t),
                  e.addLineClass(
                    i[r],
                    "gutter",
                    "CodeMirror-activeline-gutter"
                  );
              e.state.activeLines = i;
            });
        }
        function i(e, t) {
          r(e, t.ranges);
        }
        e.defineOption("styleActiveLine", !1, function (t, o, a) {
          var s = a != e.Init && a;
          o != s &&
            (s &&
              (t.off("beforeSelectionChange", i),
              n(t),
              delete t.state.activeLines),
            o &&
              ((t.state.activeLines = []),
              r(t, t.listSelections()),
              t.on("beforeSelectionChange", i)));
        });
      })(n("VrN/"));
    },
    "VrN/": function (e, t, n) {
      e.exports = (function () {
        "use strict";
        var e = navigator.userAgent,
          t = navigator.platform,
          n = /gecko\/\d/i.test(e),
          r = /MSIE \d/.test(e),
          i = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),
          o = /Edge\/(\d+)/.exec(e),
          a = r || i || o,
          s = a && (r ? document.documentMode || 6 : +(o || i)[1]),
          l = !o && /WebKit\//.test(e),
          c = l && /Qt\/\d+\.\d+/.test(e),
          u = !o && /Chrome\//.test(e),
          f = /Opera\//.test(e),
          p = /Apple Computer/.test(navigator.vendor),
          d = /Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),
          h = /PhantomJS/.test(e),
          m = !o && /AppleWebKit/.test(e) && /Mobile\/\w+/.test(e),
          g = /Android/.test(e),
          v =
            m ||
            g ||
            /webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),
          b = m || /Mac/.test(t),
          y = /\bCrOS\b/.test(e),
          x = /win/i.test(t),
          w = f && e.match(/Version\/(\d*\.\d*)/);
        w && (w = Number(w[1])), w && w >= 15 && ((f = !1), (l = !0));
        var k = b && (c || (f && (null == w || w < 12.11))),
          C = n || (a && s >= 9);
        function S(e) {
          return new RegExp("(^|\\s)" + e + "(?:$|\\s)\\s*");
        }
        var T,
          L = function (e, t) {
            var n = e.className,
              r = S(t).exec(n);
            if (r) {
              var i = n.slice(r.index + r[0].length);
              e.className = n.slice(0, r.index) + (i ? r[1] + i : "");
            }
          };
        function M(e) {
          for (var t = e.childNodes.length; t > 0; --t)
            e.removeChild(e.firstChild);
          return e;
        }
        function N(e, t) {
          return M(e).appendChild(t);
        }
        function A(e, t, n, r) {
          var i = document.createElement(e);
          if (
            (n && (i.className = n),
            r && (i.style.cssText = r),
            "string" == typeof t)
          )
            i.appendChild(document.createTextNode(t));
          else if (t) for (var o = 0; o < t.length; ++o) i.appendChild(t[o]);
          return i;
        }
        function O(e, t, n, r) {
          var i = A(e, t, n, r);
          return i.setAttribute("role", "presentation"), i;
        }
        function E(e, t) {
          if ((3 == t.nodeType && (t = t.parentNode), e.contains))
            return e.contains(t);
          do {
            if ((11 == t.nodeType && (t = t.host), t == e)) return !0;
          } while ((t = t.parentNode));
        }
        function $() {
          var e;
          try {
            e = document.activeElement;
          } catch (t) {
            e = document.body || null;
          }
          for (; e && e.shadowRoot && e.shadowRoot.activeElement; )
            e = e.shadowRoot.activeElement;
          return e;
        }
        function z(e, t) {
          var n = e.className;
          S(t).test(n) || (e.className += (n ? " " : "") + t);
        }
        function W(e, t) {
          for (var n = e.split(" "), r = 0; r < n.length; r++)
            n[r] && !S(n[r]).test(t) && (t += " " + n[r]);
          return t;
        }
        T = document.createRange
          ? function (e, t, n, r) {
              var i = document.createRange();
              return i.setEnd(r || e, n), i.setStart(e, t), i;
            }
          : function (e, t, n) {
              var r = document.body.createTextRange();
              try {
                r.moveToElementText(e.parentNode);
              } catch (e) {
                return r;
              }
              return (
                r.collapse(!0),
                r.moveEnd("character", n),
                r.moveStart("character", t),
                r
              );
            };
        var F = function (e) {
          e.select();
        };
        function P(e) {
          var t = Array.prototype.slice.call(arguments, 1);
          return function () {
            return e.apply(null, t);
          };
        }
        function D(e, t, n) {
          for (var r in (t || (t = {}), e))
            !e.hasOwnProperty(r) ||
              (!1 === n && t.hasOwnProperty(r)) ||
              (t[r] = e[r]);
          return t;
        }
        function I(e, t, n, r, i) {
          null == t && -1 == (t = e.search(/[^\s\u00a0]/)) && (t = e.length);
          for (var o = r || 0, a = i || 0; ; ) {
            var s = e.indexOf("\t", o);
            if (s < 0 || s >= t) return a + (t - o);
            (a += s - o), (a += n - (a % n)), (o = s + 1);
          }
        }
        m
          ? (F = function (e) {
              (e.selectionStart = 0), (e.selectionEnd = e.value.length);
            })
          : a &&
            (F = function (e) {
              try {
                e.select();
              } catch (e) {}
            });
        var j = function () {
          (this.id = null),
            (this.f = null),
            (this.time = 0),
            (this.handler = P(this.onTimeout, this));
        };
        function H(e, t) {
          for (var n = 0; n < e.length; ++n) if (e[n] == t) return n;
          return -1;
        }
        (j.prototype.onTimeout = function (e) {
          (e.id = 0),
            e.time <= +new Date()
              ? e.f()
              : setTimeout(e.handler, e.time - +new Date());
        }),
          (j.prototype.set = function (e, t) {
            this.f = t;
            var n = +new Date() + e;
            (!this.id || n < this.time) &&
              (clearTimeout(this.id),
              (this.id = setTimeout(this.handler, e)),
              (this.time = n));
          });
        var R = {
            toString: function () {
              return "CodeMirror.Pass";
            },
          },
          B = { scroll: !1 },
          q = { origin: "*mouse" },
          V = { origin: "+move" };
        function U(e, t, n) {
          for (var r = 0, i = 0; ; ) {
            var o = e.indexOf("\t", r);
            -1 == o && (o = e.length);
            var a = o - r;
            if (o == e.length || i + a >= t) return r + Math.min(a, t - i);
            if (((i += o - r), (r = o + 1), (i += n - (i % n)) >= t)) return r;
          }
        }
        var K = [""];
        function G(e) {
          for (; K.length <= e; ) K.push(_(K) + " ");
          return K[e];
        }
        function _(e) {
          return e[e.length - 1];
        }
        function X(e, t) {
          for (var n = [], r = 0; r < e.length; r++) n[r] = t(e[r], r);
          return n;
        }
        function Y() {}
        function Q(e, t) {
          var n;
          return (
            Object.create
              ? (n = Object.create(e))
              : ((Y.prototype = e), (n = new Y())),
            t && D(t, n),
            n
          );
        }
        var Z =
          /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;
        function J(e) {
          return (
            /\w/.test(e) ||
            (e > "" && (e.toUpperCase() != e.toLowerCase() || Z.test(e)))
          );
        }
        function ee(e, t) {
          return t
            ? !!(t.source.indexOf("\\w") > -1 && J(e)) || t.test(e)
            : J(e);
        }
        function te(e) {
          for (var t in e) if (e.hasOwnProperty(t) && e[t]) return !1;
          return !0;
        }
        var ne =
          /[\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 re(e) {
          return e.charCodeAt(0) >= 768 && ne.test(e);
        }
        function ie(e, t, n) {
          for (; (n < 0 ? t > 0 : t < e.length) && re(e.charAt(t)); ) t += n;
          return t;
        }
        function oe(e, t, n) {
          for (var r = t > n ? -1 : 1; ; ) {
            if (t == n) return t;
            var i = (t + n) / 2,
              o = r < 0 ? Math.ceil(i) : Math.floor(i);
            if (o == t) return e(o) ? t : n;
            e(o) ? (n = o) : (t = o + r);
          }
        }
        var ae = null;
        function se(e, t, n) {
          var r;
          ae = null;
          for (var i = 0; i < e.length; ++i) {
            var o = e[i];
            if (o.from < t && o.to > t) return i;
            o.to == t && (o.from != o.to && "before" == n ? (r = i) : (ae = i)),
              o.from == t &&
                (o.from != o.to && "before" != n ? (r = i) : (ae = i));
          }
          return null != r ? r : ae;
        }
        var le = (function () {
          var e = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,
            t = /[stwN]/,
            n = /[LRr]/,
            r = /[Lb1n]/,
            i = /[1n]/;
          function o(e, t, n) {
            (this.level = e), (this.from = t), (this.to = n);
          }
          return function (a, s) {
            var l = "ltr" == s ? "L" : "R";
            if (0 == a.length || ("ltr" == s && !e.test(a))) return !1;
            for (var c, u = a.length, f = [], p = 0; p < u; ++p)
              f.push(
                (c = a.charCodeAt(p)) <= 247
                  ? "bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN".charAt(
                      c
                    )
                  : 1424 <= c && c <= 1524
                  ? "R"
                  : 1536 <= c && c <= 1785
                  ? "nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111".charAt(
                      c - 1536
                    )
                  : 1774 <= c && c <= 2220
                  ? "r"
                  : 8192 <= c && c <= 8203
                  ? "w"
                  : 8204 == c
                  ? "b"
                  : "L"
              );
            for (var d = 0, h = l; d < u; ++d) {
              var m = f[d];
              "m" == m ? (f[d] = h) : (h = m);
            }
            for (var g = 0, v = l; g < u; ++g) {
              var b = f[g];
              "1" == b && "r" == v
                ? (f[g] = "n")
                : n.test(b) && ((v = b), "r" == b && (f[g] = "R"));
            }
            for (var y = 1, x = f[0]; y < u - 1; ++y) {
              var w = f[y];
              "+" == w && "1" == x && "1" == f[y + 1]
                ? (f[y] = "1")
                : "," != w ||
                  x != f[y + 1] ||
                  ("1" != x && "n" != x) ||
                  (f[y] = x),
                (x = w);
            }
            for (var k = 0; k < u; ++k) {
              var C = f[k];
              if ("," == C) f[k] = "N";
              else if ("%" == C) {
                var S = void 0;
                for (S = k + 1; S < u && "%" == f[S]; ++S);
                for (
                  var T =
                      (k && "!" == f[k - 1]) || (S < u && "1" == f[S])
                        ? "1"
                        : "N",
                    L = k;
                  L < S;
                  ++L
                )
                  f[L] = T;
                k = S - 1;
              }
            }
            for (var M = 0, N = l; M < u; ++M) {
              var A = f[M];
              "L" == N && "1" == A ? (f[M] = "L") : n.test(A) && (N = A);
            }
            for (var O = 0; O < u; ++O)
              if (t.test(f[O])) {
                var E = void 0;
                for (E = O + 1; E < u && t.test(f[E]); ++E);
                for (
                  var $ = "L" == (O ? f[O - 1] : l),
                    z = $ == ("L" == (E < u ? f[E] : l)) ? ($ ? "L" : "R") : l,
                    W = O;
                  W < E;
                  ++W
                )
                  f[W] = z;
                O = E - 1;
              }
            for (var F, P = [], D = 0; D < u; )
              if (r.test(f[D])) {
                var I = D;
                for (++D; D < u && r.test(f[D]); ++D);
                P.push(new o(0, I, D));
              } else {
                var j = D,
                  H = P.length,
                  R = "rtl" == s ? 1 : 0;
                for (++D; D < u && "L" != f[D]; ++D);
                for (var B = j; B < D; )
                  if (i.test(f[B])) {
                    j < B && (P.splice(H, 0, new o(1, j, B)), (H += R));
                    var q = B;
                    for (++B; B < D && i.test(f[B]); ++B);
                    P.splice(H, 0, new o(2, q, B)), (H += R), (j = B);
                  } else ++B;
                j < D && P.splice(H, 0, new o(1, j, D));
              }
            return (
              "ltr" == s &&
                (1 == P[0].level &&
                  (F = a.match(/^\s+/)) &&
                  ((P[0].from = F[0].length),
                  P.unshift(new o(0, 0, F[0].length))),
                1 == _(P).level &&
                  (F = a.match(/\s+$/)) &&
                  ((_(P).to -= F[0].length),
                  P.push(new o(0, u - F[0].length, u)))),
              "rtl" == s ? P.reverse() : P
            );
          };
        })();
        function ce(e, t) {
          var n = e.order;
          return null == n && (n = e.order = le(e.text, t)), n;
        }
        var ue = [],
          fe = function (e, t, n) {
            if (e.addEventListener) e.addEventListener(t, n, !1);
            else if (e.attachEvent) e.attachEvent("on" + t, n);
            else {
              var r = e._handlers || (e._handlers = {});
              r[t] = (r[t] || ue).concat(n);
            }
          };
        function pe(e, t) {
          return (e._handlers && e._handlers[t]) || ue;
        }
        function de(e, t, n) {
          if (e.removeEventListener) e.removeEventListener(t, n, !1);
          else if (e.detachEvent) e.detachEvent("on" + t, n);
          else {
            var r = e._handlers,
              i = r && r[t];
            if (i) {
              var o = H(i, n);
              o > -1 && (r[t] = i.slice(0, o).concat(i.slice(o + 1)));
            }
          }
        }
        function he(e, t) {
          var n = pe(e, t);
          if (n.length)
            for (
              var r = Array.prototype.slice.call(arguments, 2), i = 0;
              i < n.length;
              ++i
            )
              n[i].apply(null, r);
        }
        function me(e, t, n) {
          return (
            "string" == typeof t &&
              (t = {
                type: t,
                preventDefault: function () {
                  this.defaultPrevented = !0;
                },
              }),
            he(e, n || t.type, e, t),
            we(t) || t.codemirrorIgnore
          );
        }
        function ge(e) {
          var t = e._handlers && e._handlers.cursorActivity;
          if (t)
            for (
              var n =
                  e.curOp.cursorActivityHandlers ||
                  (e.curOp.cursorActivityHandlers = []),
                r = 0;
              r < t.length;
              ++r
            )
              -1 == H(n, t[r]) && n.push(t[r]);
        }
        function ve(e, t) {
          return pe(e, t).length > 0;
        }
        function be(e) {
          (e.prototype.on = function (e, t) {
            fe(this, e, t);
          }),
            (e.prototype.off = function (e, t) {
              de(this, e, t);
            });
        }
        function ye(e) {
          e.preventDefault ? e.preventDefault() : (e.returnValue = !1);
        }
        function xe(e) {
          e.stopPropagation ? e.stopPropagation() : (e.cancelBubble = !0);
        }
        function we(e) {
          return null != e.defaultPrevented
            ? e.defaultPrevented
            : 0 == e.returnValue;
        }
        function ke(e) {
          ye(e), xe(e);
        }
        function Ce(e) {
          return e.target || e.srcElement;
        }
        function Se(e) {
          var t = e.which;
          return (
            null == t &&
              (1 & e.button
                ? (t = 1)
                : 2 & e.button
                ? (t = 3)
                : 4 & e.button && (t = 2)),
            b && e.ctrlKey && 1 == t && (t = 3),
            t
          );
        }
        var Te,
          Le,
          Me = (function () {
            if (a && s < 9) return !1;
            var e = A("div");
            return "draggable" in e || "dragDrop" in e;
          })();
        function Ne(e) {
          if (null == Te) {
            var t = A("span", "​");
            N(e, A("span", [t, document.createTextNode("x")])),
              0 != e.firstChild.offsetHeight &&
                (Te =
                  t.offsetWidth <= 1 && t.offsetHeight > 2 && !(a && s < 8));
          }
          var n = Te
            ? A("span", "​")
            : A(
                "span",
                " ",
                null,
                "display: inline-block; width: 1px; margin-right: -1px"
              );
          return n.setAttribute("cm-text", ""), n;
        }
        function Ae(e) {
          if (null != Le) return Le;
          var t = N(e, document.createTextNode("AخA")),
            n = T(t, 0, 1).getBoundingClientRect(),
            r = T(t, 1, 2).getBoundingClientRect();
          return (
            M(e), !(!n || n.left == n.right) && (Le = r.right - n.right < 3)
          );
        }
        var Oe,
          Ee =
            3 != "\n\nb".split(/\n/).length
              ? function (e) {
                  for (var t = 0, n = [], r = e.length; t <= r; ) {
                    var i = e.indexOf("\n", t);
                    -1 == i && (i = e.length);
                    var o = e.slice(t, "\r" == e.charAt(i - 1) ? i - 1 : i),
                      a = o.indexOf("\r");
                    -1 != a
                      ? (n.push(o.slice(0, a)), (t += a + 1))
                      : (n.push(o), (t = i + 1));
                  }
                  return n;
                }
              : function (e) {
                  return e.split(/\r\n?|\n/);
                },
          $e = window.getSelection
            ? function (e) {
                try {
                  return e.selectionStart != e.selectionEnd;
                } catch (e) {
                  return !1;
                }
              }
            : function (e) {
                var t;
                try {
                  t = e.ownerDocument.selection.createRange();
                } catch (e) {}
                return (
                  !(!t || t.parentElement() != e) &&
                  0 != t.compareEndPoints("StartToEnd", t)
                );
              },
          ze =
            "oncopy" in (Oe = A("div")) ||
            (Oe.setAttribute("oncopy", "return;"),
            "function" == typeof Oe.oncopy),
          We = null,
          Fe = {},
          Pe = {};
        function De(e, t) {
          arguments.length > 2 &&
            (t.dependencies = Array.prototype.slice.call(arguments, 2)),
            (Fe[e] = t);
        }
        function Ie(e) {
          if ("string" == typeof e && Pe.hasOwnProperty(e)) e = Pe[e];
          else if (
            e &&
            "string" == typeof e.name &&
            Pe.hasOwnProperty(e.name)
          ) {
            var t = Pe[e.name];
            "string" == typeof t && (t = { name: t }),
              ((e = Q(t, e)).name = t.name);
          } else {
            if ("string" == typeof e && /^[\w\-]+\/[\w\-]+\+xml$/.test(e))
              return Ie("application/xml");
            if ("string" == typeof e && /^[\w\-]+\/[\w\-]+\+json$/.test(e))
              return Ie("application/json");
          }
          return "string" == typeof e ? { name: e } : e || { name: "null" };
        }
        function je(e, t) {
          t = Ie(t);
          var n = Fe[t.name];
          if (!n) return je(e, "text/plain");
          var r = n(e, t);
          if (He.hasOwnProperty(t.name)) {
            var i = He[t.name];
            for (var o in i)
              i.hasOwnProperty(o) &&
                (r.hasOwnProperty(o) && (r["_" + o] = r[o]), (r[o] = i[o]));
          }
          if (
            ((r.name = t.name),
            t.helperType && (r.helperType = t.helperType),
            t.modeProps)
          )
            for (var a in t.modeProps) r[a] = t.modeProps[a];
          return r;
        }
        var He = {};
        function Re(e, t) {
          D(t, He.hasOwnProperty(e) ? He[e] : (He[e] = {}));
        }
        function Be(e, t) {
          if (!0 === t) return t;
          if (e.copyState) return e.copyState(t);
          var n = {};
          for (var r in t) {
            var i = t[r];
            i instanceof Array && (i = i.concat([])), (n[r] = i);
          }
          return n;
        }
        function qe(e, t) {
          for (var n; e.innerMode && (n = e.innerMode(t)) && n.mode != e; )
            (t = n.state), (e = n.mode);
          return n || { mode: e, state: t };
        }
        function Ve(e, t, n) {
          return !e.startState || e.startState(t, n);
        }
        var Ue = function (e, t, n) {
          (this.pos = this.start = 0),
            (this.string = e),
            (this.tabSize = t || 8),
            (this.lastColumnPos = this.lastColumnValue = 0),
            (this.lineStart = 0),
            (this.lineOracle = n);
        };
        function Ke(e, t) {
          if ((t -= e.first) < 0 || t >= e.size)
            throw new Error(
              "There is no line " + (t + e.first) + " in the document."
            );
          for (var n = e; !n.lines; )
            for (var r = 0; ; ++r) {
              var i = n.children[r],
                o = i.chunkSize();
              if (t < o) {
                n = i;
                break;
              }
              t -= o;
            }
          return n.lines[t];
        }
        function Ge(e, t, n) {
          var r = [],
            i = t.line;
          return (
            e.iter(t.line, n.line + 1, function (e) {
              var o = e.text;
              i == n.line && (o = o.slice(0, n.ch)),
                i == t.line && (o = o.slice(t.ch)),
                r.push(o),
                ++i;
            }),
            r
          );
        }
        function _e(e, t, n) {
          var r = [];
          return (
            e.iter(t, n, function (e) {
              r.push(e.text);
            }),
            r
          );
        }
        function Xe(e, t) {
          var n = t - e.height;
          if (n) for (var r = e; r; r = r.parent) r.height += n;
        }
        function Ye(e) {
          if (null == e.parent) return null;
          for (
            var t = e.parent, n = H(t.lines, e), r = t.parent;
            r;
            t = r, r = r.parent
          )
            for (var i = 0; r.children[i] != t; ++i)
              n += r.children[i].chunkSize();
          return n + t.first;
        }
        function Qe(e, t) {
          var n = e.first;
          e: do {
            for (var r = 0; r < e.children.length; ++r) {
              var i = e.children[r],
                o = i.height;
              if (t < o) {
                e = i;
                continue e;
              }
              (t -= o), (n += i.chunkSize());
            }
            return n;
          } while (!e.lines);
          for (var a = 0; a < e.lines.length; ++a) {
            var s = e.lines[a].height;
            if (t < s) break;
            t -= s;
          }
          return n + a;
        }
        function Ze(e, t) {
          return t >= e.first && t < e.first + e.size;
        }
        function Je(e, t) {
          return String(e.lineNumberFormatter(t + e.firstLineNumber));
        }
        function et(e, t, n) {
          if ((void 0 === n && (n = null), !(this instanceof et)))
            return new et(e, t, n);
          (this.line = e), (this.ch = t), (this.sticky = n);
        }
        function tt(e, t) {
          return e.line - t.line || e.ch - t.ch;
        }
        function nt(e, t) {
          return e.sticky == t.sticky && 0 == tt(e, t);
        }
        function rt(e) {
          return et(e.line, e.ch);
        }
        function it(e, t) {
          return tt(e, t) < 0 ? t : e;
        }
        function ot(e, t) {
          return tt(e, t) < 0 ? e : t;
        }
        function at(e, t) {
          return Math.max(e.first, Math.min(t, e.first + e.size - 1));
        }
        function st(e, t) {
          if (t.line < e.first) return et(e.first, 0);
          var n = e.first + e.size - 1;
          return t.line > n
            ? et(n, Ke(e, n).text.length)
            : (function (e, t) {
                var n = e.ch;
                return null == n || n > t
                  ? et(e.line, t)
                  : n < 0
                  ? et(e.line, 0)
                  : e;
              })(t, Ke(e, t.line).text.length);
        }
        function lt(e, t) {
          for (var n = [], r = 0; r < t.length; r++) n[r] = st(e, t[r]);
          return n;
        }
        (Ue.prototype.eol = function () {
          return this.pos >= this.string.length;
        }),
          (Ue.prototype.sol = function () {
            return this.pos == this.lineStart;
          }),
          (Ue.prototype.peek = function () {
            return this.string.charAt(this.pos) || void 0;
          }),
          (Ue.prototype.next = function () {
            if (this.pos < this.string.length)
              return this.string.charAt(this.pos++);
          }),
          (Ue.prototype.eat = function (e) {
            var t = this.string.charAt(this.pos);
            if (
              "string" == typeof e ? t == e : t && (e.test ? e.test(t) : e(t))
            )
              return ++this.pos, t;
          }),
          (Ue.prototype.eatWhile = function (e) {
            for (var t = this.pos; this.eat(e); );
            return this.pos > t;
          }),
          (Ue.prototype.eatSpace = function () {
            for (
              var e = this.pos;
              /[\s\u00a0]/.test(this.string.charAt(this.pos));
            )
              ++this.pos;
            return this.pos > e;
          }),
          (Ue.prototype.skipToEnd = function () {
            this.pos = this.string.length;
          }),
          (Ue.prototype.skipTo = function (e) {
            var t = this.string.indexOf(e, this.pos);
            if (t > -1) return (this.pos = t), !0;
          }),
          (Ue.prototype.backUp = function (e) {
            this.pos -= e;
          }),
          (Ue.prototype.column = function () {
            return (
              this.lastColumnPos < this.start &&
                ((this.lastColumnValue = I(
                  this.string,
                  this.start,
                  this.tabSize,
                  this.lastColumnPos,
                  this.lastColumnValue
                )),
                (this.lastColumnPos = this.start)),
              this.lastColumnValue -
                (this.lineStart
                  ? I(this.string, this.lineStart, this.tabSize)
                  : 0)
            );
          }),
          (Ue.prototype.indentation = function () {
            return (
              I(this.string, null, this.tabSize) -
              (this.lineStart
                ? I(this.string, this.lineStart, this.tabSize)
                : 0)
            );
          }),
          (Ue.prototype.match = function (e, t, n) {
            if ("string" != typeof e) {
              var r = this.string.slice(this.pos).match(e);
              return r && r.index > 0
                ? null
                : (r && !1 !== t && (this.pos += r[0].length), r);
            }
            var i = function (e) {
              return n ? e.toLowerCase() : e;
            };
            if (i(this.string.substr(this.pos, e.length)) == i(e))
              return !1 !== t && (this.pos += e.length), !0;
          }),
          (Ue.prototype.current = function () {
            return this.string.slice(this.start, this.pos);
          }),
          (Ue.prototype.hideFirstChars = function (e, t) {
            this.lineStart += e;
            try {
              return t();
            } finally {
              this.lineStart -= e;
            }
          }),
          (Ue.prototype.lookAhead = function (e) {
            var t = this.lineOracle;
            return t && t.lookAhead(e);
          }),
          (Ue.prototype.baseToken = function () {
            var e = this.lineOracle;
            return e && e.baseToken(this.pos);
          });
        var ct = function (e, t) {
            (this.state = e), (this.lookAhead = t);
          },
          ut = function (e, t, n, r) {
            (this.state = t),
              (this.doc = e),
              (this.line = n),
              (this.maxLookAhead = r || 0),
              (this.baseTokens = null),
              (this.baseTokenPos = 1);
          };
        function ft(e, t, n, r) {
          var i = [e.state.modeGen],
            o = {};
          xt(
            e,
            t.text,
            e.doc.mode,
            n,
            function (e, t) {
              return i.push(e, t);
            },
            o,
            r
          );
          for (
            var a = n.state,
              s = function (r) {
                n.baseTokens = i;
                var s = e.state.overlays[r],
                  l = 1,
                  c = 0;
                (n.state = !0),
                  xt(
                    e,
                    t.text,
                    s.mode,
                    n,
                    function (e, t) {
                      for (var n = l; c < e; ) {
                        var r = i[l];
                        r > e && i.splice(l, 1, e, i[l + 1], r),
                          (l += 2),
                          (c = Math.min(e, r));
                      }
                      if (t)
                        if (s.opaque)
                          i.splice(n, l - n, e, "overlay " + t), (l = n + 2);
                        else
                          for (; n < l; n += 2) {
                            var o = i[n + 1];
                            i[n + 1] = (o ? o + " " : "") + "overlay " + t;
                          }
                    },
                    o
                  ),
                  (n.state = a),
                  (n.baseTokens = null),
                  (n.baseTokenPos = 1);
              },
              l = 0;
            l < e.state.overlays.length;
            ++l
          )
            s(l);
          return { styles: i, classes: o.bgClass || o.textClass ? o : null };
        }
        function pt(e, t, n) {
          if (!t.styles || t.styles[0] != e.state.modeGen) {
            var r = dt(e, Ye(t)),
              i =
                t.text.length > e.options.maxHighlightLength &&
                Be(e.doc.mode, r.state),
              o = ft(e, t, r);
            i && (r.state = i),
              (t.stateAfter = r.save(!i)),
              (t.styles = o.styles),
              o.classes
                ? (t.styleClasses = o.classes)
                : t.styleClasses && (t.styleClasses = null),
              n === e.doc.highlightFrontier &&
                (e.doc.modeFrontier = Math.max(
                  e.doc.modeFrontier,
                  ++e.doc.highlightFrontier
                ));
          }
          return t.styles;
        }
        function dt(e, t, n) {
          var r = e.doc,
            i = e.display;
          if (!r.mode.startState) return new ut(r, !0, t);
          var o = (function (e, t, n) {
              for (
                var r,
                  i,
                  o = e.doc,
                  a = n ? -1 : t - (e.doc.mode.innerMode ? 1e3 : 100),
                  s = t;
                s > a;
                --s
              ) {
                if (s <= o.first) return o.first;
                var l = Ke(o, s - 1),
                  c = l.stateAfter;
                if (
                  c &&
                  (!n ||
                    s + (c instanceof ct ? c.lookAhead : 0) <= o.modeFrontier)
                )
                  return s;
                var u = I(l.text, null, e.options.tabSize);
                (null == i || r > u) && ((i = s - 1), (r = u));
              }
              return i;
            })(e, t, n),
            a = o > r.first && Ke(r, o - 1).stateAfter,
            s = a ? ut.fromSaved(r, a, o) : new ut(r, Ve(r.mode), o);
          return (
            r.iter(o, t, function (n) {
              ht(e, n.text, s);
              var r = s.line;
              (n.stateAfter =
                r == t - 1 || r % 5 == 0 || (r >= i.viewFrom && r < i.viewTo)
                  ? s.save()
                  : null),
                s.nextLine();
            }),
            n && (r.modeFrontier = s.line),
            s
          );
        }
        function ht(e, t, n, r) {
          var i = e.doc.mode,
            o = new Ue(t, e.options.tabSize, n);
          for (o.start = o.pos = r || 0, "" == t && mt(i, n.state); !o.eol(); )
            gt(i, o, n.state), (o.start = o.pos);
        }
        function mt(e, t) {
          if (e.blankLine) return e.blankLine(t);
          if (e.innerMode) {
            var n = qe(e, t);
            return n.mode.blankLine ? n.mode.blankLine(n.state) : void 0;
          }
        }
        function gt(e, t, n, r) {
          for (var i = 0; i < 10; i++) {
            r && (r[0] = qe(e, n).mode);
            var o = e.token(t, n);
            if (t.pos > t.start) return o;
          }
          throw new Error("Mode " + e.name + " failed to advance stream.");
        }
        (ut.prototype.lookAhead = function (e) {
          var t = this.doc.getLine(this.line + e);
          return (
            null != t && e > this.maxLookAhead && (this.maxLookAhead = e), t
          );
        }),
          (ut.prototype.baseToken = function (e) {
            if (!this.baseTokens) return null;
            for (; this.baseTokens[this.baseTokenPos] <= e; )
              this.baseTokenPos += 2;
            var t = this.baseTokens[this.baseTokenPos + 1];
            return {
              type: t && t.replace(/( |^)overlay .*/, ""),
              size: this.baseTokens[this.baseTokenPos] - e,
            };
          }),
          (ut.prototype.nextLine = function () {
            this.line++, this.maxLookAhead > 0 && this.maxLookAhead--;
          }),
          (ut.fromSaved = function (e, t, n) {
            return t instanceof ct
              ? new ut(e, Be(e.mode, t.state), n, t.lookAhead)
              : new ut(e, Be(e.mode, t), n);
          }),
          (ut.prototype.save = function (e) {
            var t = !1 !== e ? Be(this.doc.mode, this.state) : this.state;
            return this.maxLookAhead > 0 ? new ct(t, this.maxLookAhead) : t;
          });
        var vt = function (e, t, n) {
          (this.start = e.start),
            (this.end = e.pos),
            (this.string = e.current()),
            (this.type = t || null),
            (this.state = n);
        };
        function bt(e, t, n, r) {
          var i,
            o,
            a = e.doc,
            s = a.mode,
            l = Ke(a, (t = st(a, t)).line),
            c = dt(e, t.line, n),
            u = new Ue(l.text, e.options.tabSize, c);
          for (r && (o = []); (r || u.pos < t.ch) && !u.eol(); )
            (u.start = u.pos),
              (i = gt(s, u, c.state)),
              r && o.push(new vt(u, i, Be(a.mode, c.state)));
          return r ? o : new vt(u, i, c.state);
        }
        function yt(e, t) {
          if (e)
            for (;;) {
              var n = e.match(/(?:^|\s+)line-(background-)?(\S+)/);
              if (!n) break;
              e = e.slice(0, n.index) + e.slice(n.index + n[0].length);
              var r = n[1] ? "bgClass" : "textClass";
              null == t[r]
                ? (t[r] = n[2])
                : new RegExp("(?:^|\\s)" + n[2] + "(?:$|\\s)").test(t[r]) ||
                  (t[r] += " " + n[2]);
            }
          return e;
        }
        function xt(e, t, n, r, i, o, a) {
          var s = n.flattenSpans;
          null == s && (s = e.options.flattenSpans);
          var l,
            c = 0,
            u = null,
            f = new Ue(t, e.options.tabSize, r),
            p = e.options.addModeClass && [null];
          for ("" == t && yt(mt(n, r.state), o); !f.eol(); ) {
            if (
              (f.pos > e.options.maxHighlightLength
                ? ((s = !1),
                  a && ht(e, t, r, f.pos),
                  (f.pos = t.length),
                  (l = null))
                : (l = yt(gt(n, f, r.state, p), o)),
              p)
            ) {
              var d = p[0].name;
              d && (l = "m-" + (l ? d + " " + l : d));
            }
            if (!s || u != l) {
              for (; c < f.start; ) i((c = Math.min(f.start, c + 5e3)), u);
              u = l;
            }
            f.start = f.pos;
          }
          for (; c < f.pos; ) {
            var h = Math.min(f.pos, c + 5e3);
            i(h, u), (c = h);
          }
        }
        var wt = !1,
          kt = !1;
        function Ct(e, t, n) {
          (this.marker = e), (this.from = t), (this.to = n);
        }
        function St(e, t) {
          if (e)
            for (var n = 0; n < e.length; ++n) {
              var r = e[n];
              if (r.marker == t) return r;
            }
        }
        function Tt(e, t) {
          for (var n, r = 0; r < e.length; ++r)
            e[r] != t && (n || (n = [])).push(e[r]);
          return n;
        }
        function Lt(e, t) {
          if (t.full) return null;
          var n = Ze(e, t.from.line) && Ke(e, t.from.line).markedSpans,
            r = Ze(e, t.to.line) && Ke(e, t.to.line).markedSpans;
          if (!n && !r) return null;
          var i = t.from.ch,
            o = t.to.ch,
            a = 0 == tt(t.from, t.to),
            s = (function (e, t, n) {
              var r;
              if (e)
                for (var i = 0; i < e.length; ++i) {
                  var o = e[i],
                    a = o.marker;
                  if (
                    null == o.from ||
                    (a.inclusiveLeft ? o.from <= t : o.from < t) ||
                    (o.from == t &&
                      "bookmark" == a.type &&
                      (!n || !o.marker.insertLeft))
                  ) {
                    var s =
                      null == o.to || (a.inclusiveRight ? o.to >= t : o.to > t);
                    (r || (r = [])).push(new Ct(a, o.from, s ? null : o.to));
                  }
                }
              return r;
            })(n, i, a),
            l = (function (e, t, n) {
              var r;
              if (e)
                for (var i = 0; i < e.length; ++i) {
                  var o = e[i],
                    a = o.marker;
                  if (
                    null == o.to ||
                    (a.inclusiveRight ? o.to >= t : o.to > t) ||
                    (o.from == t &&
                      "bookmark" == a.type &&
                      (!n || o.marker.insertLeft))
                  ) {
                    var s =
                      null == o.from ||
                      (a.inclusiveLeft ? o.from <= t : o.from < t);
                    (r || (r = [])).push(
                      new Ct(
                        a,
                        s ? null : o.from - t,
                        null == o.to ? null : o.to - t
                      )
                    );
                  }
                }
              return r;
            })(r, o, a),
            c = 1 == t.text.length,
            u = _(t.text).length + (c ? i : 0);
          if (s)
            for (var f = 0; f < s.length; ++f) {
              var p = s[f];
              if (null == p.to) {
                var d = St(l, p.marker);
                d ? c && (p.to = null == d.to ? null : d.to + u) : (p.to = i);
              }
            }
          if (l)
            for (var h = 0; h < l.length; ++h) {
              var m = l[h];
              null != m.to && (m.to += u),
                null == m.from
                  ? St(s, m.marker) ||
                    ((m.from = u), c && (s || (s = [])).push(m))
                  : ((m.from += u), c && (s || (s = [])).push(m));
            }
          s && (s = Mt(s)), l && l != s && (l = Mt(l));
          var g = [s];
          if (!c) {
            var v,
              b = t.text.length - 2;
            if (b > 0 && s)
              for (var y = 0; y < s.length; ++y)
                null == s[y].to &&
                  (v || (v = [])).push(new Ct(s[y].marker, null, null));
            for (var x = 0; x < b; ++x) g.push(v);
            g.push(l);
          }
          return g;
        }
        function Mt(e) {
          for (var t = 0; t < e.length; ++t) {
            var n = e[t];
            null != n.from &&
              n.from == n.to &&
              !1 !== n.marker.clearWhenEmpty &&
              e.splice(t--, 1);
          }
          return e.length ? e : null;
        }
        function Nt(e) {
          var t = e.markedSpans;
          if (t) {
            for (var n = 0; n < t.length; ++n) t[n].marker.detachLine(e);
            e.markedSpans = null;
          }
        }
        function At(e, t) {
          if (t) {
            for (var n = 0; n < t.length; ++n) t[n].marker.attachLine(e);
            e.markedSpans = t;
          }
        }
        function Ot(e) {
          return e.inclusiveLeft ? -1 : 0;
        }
        function Et(e) {
          return e.inclusiveRight ? 1 : 0;
        }
        function $t(e, t) {
          var n = e.lines.length - t.lines.length;
          if (0 != n) return n;
          var r = e.find(),
            i = t.find(),
            o = tt(r.from, i.from) || Ot(e) - Ot(t);
          if (o) return -o;
          var a = tt(r.to, i.to) || Et(e) - Et(t);
          return a || t.id - e.id;
        }
        function zt(e, t) {
          var n,
            r = kt && e.markedSpans;
          if (r)
            for (var i = void 0, o = 0; o < r.length; ++o)
              (i = r[o]).marker.collapsed &&
                null == (t ? i.from : i.to) &&
                (!n || $t(n, i.marker) < 0) &&
                (n = i.marker);
          return n;
        }
        function Wt(e) {
          return zt(e, !0);
        }
        function Ft(e) {
          return zt(e, !1);
        }
        function Pt(e, t) {
          var n,
            r = kt && e.markedSpans;
          if (r)
            for (var i = 0; i < r.length; ++i) {
              var o = r[i];
              o.marker.collapsed &&
                (null == o.from || o.from < t) &&
                (null == o.to || o.to > t) &&
                (!n || $t(n, o.marker) < 0) &&
                (n = o.marker);
            }
          return n;
        }
        function Dt(e, t, n, r, i) {
          var o = Ke(e, t),
            a = kt && o.markedSpans;
          if (a)
            for (var s = 0; s < a.length; ++s) {
              var l = a[s];
              if (l.marker.collapsed) {
                var c = l.marker.find(0),
                  u = tt(c.from, n) || Ot(l.marker) - Ot(i),
                  f = tt(c.to, r) || Et(l.marker) - Et(i);
                if (
                  !((u >= 0 && f <= 0) || (u <= 0 && f >= 0)) &&
                  ((u <= 0 &&
                    (l.marker.inclusiveRight && i.inclusiveLeft
                      ? tt(c.to, n) >= 0
                      : tt(c.to, n) > 0)) ||
                    (u >= 0 &&
                      (l.marker.inclusiveRight && i.inclusiveLeft
                        ? tt(c.from, r) <= 0
                        : tt(c.from, r) < 0)))
                )
                  return !0;
              }
            }
        }
        function It(e) {
          for (var t; (t = Wt(e)); ) e = t.find(-1, !0).line;
          return e;
        }
        function jt(e, t) {
          var n = Ke(e, t),
            r = It(n);
          return n == r ? t : Ye(r);
        }
        function Ht(e, t) {
          if (t > e.lastLine()) return t;
          var n,
            r = Ke(e, t);
          if (!Rt(e, r)) return t;
          for (; (n = Ft(r)); ) r = n.find(1, !0).line;
          return Ye(r) + 1;
        }
        function Rt(e, t) {
          var n = kt && t.markedSpans;
          if (n)
            for (var r = void 0, i = 0; i < n.length; ++i)
              if ((r = n[i]).marker.collapsed) {
                if (null == r.from) return !0;
                if (
                  !r.marker.widgetNode &&
                  0 == r.from &&
                  r.marker.inclusiveLeft &&
                  Bt(e, t, r)
                )
                  return !0;
              }
        }
        function Bt(e, t, n) {
          if (null == n.to) {
            var r = n.marker.find(1, !0);
            return Bt(e, r.line, St(r.line.markedSpans, n.marker));
          }
          if (n.marker.inclusiveRight && n.to == t.text.length) return !0;
          for (var i = void 0, o = 0; o < t.markedSpans.length; ++o)
            if (
              (i = t.markedSpans[o]).marker.collapsed &&
              !i.marker.widgetNode &&
              i.from == n.to &&
              (null == i.to || i.to != n.from) &&
              (i.marker.inclusiveLeft || n.marker.inclusiveRight) &&
              Bt(e, t, i)
            )
              return !0;
        }
        function qt(e) {
          for (
            var t = 0, n = (e = It(e)).parent, r = 0;
            r < n.lines.length;
            ++r
          ) {
            var i = n.lines[r];
            if (i == e) break;
            t += i.height;
          }
          for (var o = n.parent; o; o = (n = o).parent)
            for (var a = 0; a < o.children.length; ++a) {
              var s = o.children[a];
              if (s == n) break;
              t += s.height;
            }
          return t;
        }
        function Vt(e) {
          if (0 == e.height) return 0;
          for (var t, n = e.text.length, r = e; (t = Wt(r)); ) {
            var i = t.find(0, !0);
            (r = i.from.line), (n += i.from.ch - i.to.ch);
          }
          for (r = e; (t = Ft(r)); ) {
            var o = t.find(0, !0);
            (n -= r.text.length - o.from.ch),
              (n += (r = o.to.line).text.length - o.to.ch);
          }
          return n;
        }
        function Ut(e) {
          var t = e.display,
            n = e.doc;
          (t.maxLine = Ke(n, n.first)),
            (t.maxLineLength = Vt(t.maxLine)),
            (t.maxLineChanged = !0),
            n.iter(function (e) {
              var n = Vt(e);
              n > t.maxLineLength && ((t.maxLineLength = n), (t.maxLine = e));
            });
        }
        var Kt = function (e, t, n) {
          (this.text = e), At(this, t), (this.height = n ? n(this) : 1);
        };
        function Gt(e) {
          (e.parent = null), Nt(e);
        }
        (Kt.prototype.lineNo = function () {
          return Ye(this);
        }),
          be(Kt);
        var _t = {},
          Xt = {};
        function Yt(e, t) {
          if (!e || /^\s*$/.test(e)) return null;
          var n = t.addModeClass ? Xt : _t;
          return n[e] || (n[e] = e.replace(/\S+/g, "cm-$&"));
        }
        function Qt(e, t) {
          var n = O("span", null, null, l ? "padding-right: .1px" : null),
            r = {
              pre: O("pre", [n], "CodeMirror-line"),
              content: n,
              col: 0,
              pos: 0,
              cm: e,
              trailingSpace: !1,
              splitSpaces: e.getOption("lineWrapping"),
            };
          t.measure = {};
          for (var i = 0; i <= (t.rest ? t.rest.length : 0); i++) {
            var o = i ? t.rest[i - 1] : t.line,
              a = void 0;
            (r.pos = 0),
              (r.addToken = Jt),
              Ae(e.display.measure) &&
                (a = ce(o, e.doc.direction)) &&
                (r.addToken = en(r.addToken, a)),
              (r.map = []),
              nn(o, r, pt(e, o, t != e.display.externalMeasured && Ye(o))),
              o.styleClasses &&
                (o.styleClasses.bgClass &&
                  (r.bgClass = W(o.styleClasses.bgClass, r.bgClass || "")),
                o.styleClasses.textClass &&
                  (r.textClass = W(
                    o.styleClasses.textClass,
                    r.textClass || ""
                  ))),
              0 == r.map.length &&
                r.map.push(0, 0, r.content.appendChild(Ne(e.display.measure))),
              0 == i
                ? ((t.measure.map = r.map), (t.measure.cache = {}))
                : ((t.measure.maps || (t.measure.maps = [])).push(r.map),
                  (t.measure.caches || (t.measure.caches = [])).push({}));
          }
          if (l) {
            var s = r.content.lastChild;
            (/\bcm-tab\b/.test(s.className) ||
              (s.querySelector && s.querySelector(".cm-tab"))) &&
              (r.content.className = "cm-tab-wrap-hack");
          }
          return (
            he(e, "renderLine", e, t.line, r.pre),
            r.pre.className &&
              (r.textClass = W(r.pre.className, r.textClass || "")),
            r
          );
        }
        function Zt(e) {
          var t = A("span", "•", "cm-invalidchar");
          return (
            (t.title = "\\u" + e.charCodeAt(0).toString(16)),
            t.setAttribute("aria-label", t.title),
            t
          );
        }
        function Jt(e, t, n, r, i, o, l) {
          if (t) {
            var c,
              u = e.splitSpaces
                ? (function (e, t) {
                    if (e.length > 1 && !/  /.test(e)) return e;
                    for (var n = t, r = "", i = 0; i < e.length; i++) {
                      var o = e.charAt(i);
                      " " != o ||
                        !n ||
                        (i != e.length - 1 && 32 != e.charCodeAt(i + 1)) ||
                        (o = " "),
                        (r += o),
                        (n = " " == o);
                    }
                    return r;
                  })(t, e.trailingSpace)
                : t,
              f = e.cm.state.specialChars,
              p = !1;
            if (f.test(t)) {
              c = document.createDocumentFragment();
              for (var d = 0; ; ) {
                f.lastIndex = d;
                var h = f.exec(t),
                  m = h ? h.index - d : t.length - d;
                if (m) {
                  var g = document.createTextNode(u.slice(d, d + m));
                  a && s < 9 ? c.appendChild(A("span", [g])) : c.appendChild(g),
                    e.map.push(e.pos, e.pos + m, g),
                    (e.col += m),
                    (e.pos += m);
                }
                if (!h) break;
                d += m + 1;
                var v = void 0;
                if ("\t" == h[0]) {
                  var b = e.cm.options.tabSize,
                    y = b - (e.col % b);
                  (v = c.appendChild(A("span", G(y), "cm-tab"))).setAttribute(
                    "role",
                    "presentation"
                  ),
                    v.setAttribute("cm-text", "\t"),
                    (e.col += y);
                } else
                  "\r" == h[0] || "\n" == h[0]
                    ? ((v = c.appendChild(
                        A("span", "\r" == h[0] ? "␍" : "␤", "cm-invalidchar")
                      )).setAttribute("cm-text", h[0]),
                      (e.col += 1))
                    : ((v = e.cm.options.specialCharPlaceholder(
                        h[0]
                      )).setAttribute("cm-text", h[0]),
                      a && s < 9
                        ? c.appendChild(A("span", [v]))
                        : c.appendChild(v),
                      (e.col += 1));
                e.map.push(e.pos, e.pos + 1, v), e.pos++;
              }
            } else
              (e.col += t.length),
                (c = document.createTextNode(u)),
                e.map.push(e.pos, e.pos + t.length, c),
                a && s < 9 && (p = !0),
                (e.pos += t.length);
            if (
              ((e.trailingSpace = 32 == u.charCodeAt(t.length - 1)),
              n || r || i || p || o)
            ) {
              var x = n || "";
              r && (x += r), i && (x += i);
              var w = A("span", [c], x, o);
              if (l)
                for (var k in l)
                  l.hasOwnProperty(k) &&
                    "style" != k &&
                    "class" != k &&
                    w.setAttribute(k, l[k]);
              return e.content.appendChild(w);
            }
            e.content.appendChild(c);
          }
        }
        function en(e, t) {
          return function (n, r, i, o, a, s, l) {
            i = i ? i + " cm-force-border" : "cm-force-border";
            for (var c = n.pos, u = c + r.length; ; ) {
              for (
                var f = void 0, p = 0;
                p < t.length && !((f = t[p]).to > c && f.from <= c);
                p++
              );
              if (f.to >= u) return e(n, r, i, o, a, s, l);
              e(n, r.slice(0, f.to - c), i, o, null, s, l),
                (o = null),
                (r = r.slice(f.to - c)),
                (c = f.to);
            }
          };
        }
        function tn(e, t, n, r) {
          var i = !r && n.widgetNode;
          i && e.map.push(e.pos, e.pos + t, i),
            !r &&
              e.cm.display.input.needsContentAttribute &&
              (i || (i = e.content.appendChild(document.createElement("span"))),
              i.setAttribute("cm-marker", n.id)),
            i &&
              (e.cm.display.input.setUneditable(i), e.content.appendChild(i)),
            (e.pos += t),
            (e.trailingSpace = !1);
        }
        function nn(e, t, n) {
          var r = e.markedSpans,
            i = e.text,
            o = 0;
          if (r)
            for (
              var a,
                s,
                l,
                c,
                u,
                f,
                p,
                d = i.length,
                h = 0,
                m = 1,
                g = "",
                v = 0;
              ;
            ) {
              if (v == h) {
                (l = c = u = s = ""), (p = null), (f = null), (v = 1 / 0);
                for (var b = [], y = void 0, x = 0; x < r.length; ++x) {
                  var w = r[x],
                    k = w.marker;
                  if ("bookmark" == k.type && w.from == h && k.widgetNode)
                    b.push(k);
                  else if (
                    w.from <= h &&
                    (null == w.to ||
                      w.to > h ||
                      (k.collapsed && w.to == h && w.from == h))
                  ) {
                    if (
                      (null != w.to &&
                        w.to != h &&
                        v > w.to &&
                        ((v = w.to), (c = "")),
                      k.className && (l += " " + k.className),
                      k.css && (s = (s ? s + ";" : "") + k.css),
                      k.startStyle && w.from == h && (u += " " + k.startStyle),
                      k.endStyle &&
                        w.to == v &&
                        (y || (y = [])).push(k.endStyle, w.to),
                      k.title && ((p || (p = {})).title = k.title),
                      k.attributes)
                    )
                      for (var C in k.attributes)
                        (p || (p = {}))[C] = k.attributes[C];
                    k.collapsed && (!f || $t(f.marker, k) < 0) && (f = w);
                  } else w.from > h && v > w.from && (v = w.from);
                }
                if (y)
                  for (var S = 0; S < y.length; S += 2)
                    y[S + 1] == v && (c += " " + y[S]);
                if (!f || f.from == h)
                  for (var T = 0; T < b.length; ++T) tn(t, 0, b[T]);
                if (f && (f.from || 0) == h) {
                  if (
                    (tn(
                      t,
                      (null == f.to ? d + 1 : f.to) - h,
                      f.marker,
                      null == f.from
                    ),
                    null == f.to)
                  )
                    return;
                  f.to == h && (f = !1);
                }
              }
              if (h >= d) break;
              for (var L = Math.min(d, v); ; ) {
                if (g) {
                  var M = h + g.length;
                  if (!f) {
                    var N = M > L ? g.slice(0, L - h) : g;
                    t.addToken(
                      t,
                      N,
                      a ? a + l : l,
                      u,
                      h + N.length == v ? c : "",
                      s,
                      p
                    );
                  }
                  if (M >= L) {
                    (g = g.slice(L - h)), (h = L);
                    break;
                  }
                  (h = M), (u = "");
                }
                (g = i.slice(o, (o = n[m++]))), (a = Yt(n[m++], t.cm.options));
              }
            }
          else
            for (var A = 1; A < n.length; A += 2)
              t.addToken(t, i.slice(o, (o = n[A])), Yt(n[A + 1], t.cm.options));
        }
        function rn(e, t, n) {
          (this.line = t),
            (this.rest = (function (e) {
              for (var t, n; (t = Ft(e)); )
                (e = t.find(1, !0).line), (n || (n = [])).push(e);
              return n;
            })(t)),
            (this.size = this.rest ? Ye(_(this.rest)) - n + 1 : 1),
            (this.node = this.text = null),
            (this.hidden = Rt(e, t));
        }
        function on(e, t, n) {
          for (var r, i = [], o = t; o < n; o = r) {
            var a = new rn(e.doc, Ke(e.doc, o), o);
            (r = o + a.size), i.push(a);
          }
          return i;
        }
        var an = null,
          sn = null;
        function ln(e, t) {
          var n = pe(e, t);
          if (n.length) {
            var r,
              i = Array.prototype.slice.call(arguments, 2);
            an
              ? (r = an.delayedCallbacks)
              : sn
              ? (r = sn)
              : ((r = sn = []), setTimeout(cn, 0));
            for (
              var o = function (e) {
                  r.push(function () {
                    return n[e].apply(null, i);
                  });
                },
                a = 0;
              a < n.length;
              ++a
            )
              o(a);
          }
        }
        function cn() {
          var e = sn;
          sn = null;
          for (var t = 0; t < e.length; ++t) e[t]();
        }
        function un(e, t, n, r) {
          for (var i = 0; i < t.changes.length; i++) {
            var o = t.changes[i];
            "text" == o
              ? dn(e, t)
              : "gutter" == o
              ? mn(e, t, n, r)
              : "class" == o
              ? hn(e, t)
              : "widget" == o && gn(e, t, r);
          }
          t.changes = null;
        }
        function fn(e) {
          return (
            e.node == e.text &&
              ((e.node = A("div", null, null, "position: relative")),
              e.text.parentNode &&
                e.text.parentNode.replaceChild(e.node, e.text),
              e.node.appendChild(e.text),
              a && s < 8 && (e.node.style.zIndex = 2)),
            e.node
          );
        }
        function pn(e, t) {
          var n = e.display.externalMeasured;
          return n && n.line == t.line
            ? ((e.display.externalMeasured = null),
              (t.measure = n.measure),
              n.built)
            : Qt(e, t);
        }
        function dn(e, t) {
          var n = t.text.className,
            r = pn(e, t);
          t.text == t.node && (t.node = r.pre),
            t.text.parentNode.replaceChild(r.pre, t.text),
            (t.text = r.pre),
            r.bgClass != t.bgClass || r.textClass != t.textClass
              ? ((t.bgClass = r.bgClass), (t.textClass = r.textClass), hn(e, t))
              : n && (t.text.className = n);
        }
        function hn(e, t) {
          !(function (e, t) {
            var n = t.bgClass
              ? t.bgClass + " " + (t.line.bgClass || "")
              : t.line.bgClass;
            if ((n && (n += " CodeMirror-linebackground"), t.background))
              n
                ? (t.background.className = n)
                : (t.background.parentNode.removeChild(t.background),
                  (t.background = null));
            else if (n) {
              var r = fn(t);
              (t.background = r.insertBefore(A("div", null, n), r.firstChild)),
                e.display.input.setUneditable(t.background);
            }
          })(e, t),
            t.line.wrapClass
              ? (fn(t).className = t.line.wrapClass)
              : t.node != t.text && (t.node.className = "");
          var n = t.textClass
            ? t.textClass + " " + (t.line.textClass || "")
            : t.line.textClass;
          t.text.className = n || "";
        }
        function mn(e, t, n, r) {
          if (
            (t.gutter && (t.node.removeChild(t.gutter), (t.gutter = null)),
            t.gutterBackground &&
              (t.node.removeChild(t.gutterBackground),
              (t.gutterBackground = null)),
            t.line.gutterClass)
          ) {
            var i = fn(t);
            (t.gutterBackground = A(
              "div",
              null,
              "CodeMirror-gutter-background " + t.line.gutterClass,
              "left: " +
                (e.options.fixedGutter ? r.fixedPos : -r.gutterTotalWidth) +
                "px; width: " +
                r.gutterTotalWidth +
                "px"
            )),
              e.display.input.setUneditable(t.gutterBackground),
              i.insertBefore(t.gutterBackground, t.text);
          }
          var o = t.line.gutterMarkers;
          if (e.options.lineNumbers || o) {
            var a = fn(t),
              s = (t.gutter = A(
                "div",
                null,
                "CodeMirror-gutter-wrapper",
                "left: " +
                  (e.options.fixedGutter ? r.fixedPos : -r.gutterTotalWidth) +
                  "px"
              ));
            if (
              (e.display.input.setUneditable(s),
              a.insertBefore(s, t.text),
              t.line.gutterClass && (s.className += " " + t.line.gutterClass),
              !e.options.lineNumbers ||
                (o && o["CodeMirror-linenumbers"]) ||
                (t.lineNumber = s.appendChild(
                  A(
                    "div",
                    Je(e.options, n),
                    "CodeMirror-linenumber CodeMirror-gutter-elt",
                    "left: " +
                      r.gutterLeft["CodeMirror-linenumbers"] +
                      "px; width: " +
                      e.display.lineNumInnerWidth +
                      "px"
                  )
                )),
              o)
            )
              for (var l = 0; l < e.display.gutterSpecs.length; ++l) {
                var c = e.display.gutterSpecs[l].className,
                  u = o.hasOwnProperty(c) && o[c];
                u &&
                  s.appendChild(
                    A(
                      "div",
                      [u],
                      "CodeMirror-gutter-elt",
                      "left: " +
                        r.gutterLeft[c] +
                        "px; width: " +
                        r.gutterWidth[c] +
                        "px"
                    )
                  );
              }
          }
        }
        function gn(e, t, n) {
          t.alignable && (t.alignable = null);
          for (
            var r = S("CodeMirror-linewidget"),
              i = t.node.firstChild,
              o = void 0;
            i;
            i = o
          )
            (o = i.nextSibling), r.test(i.className) && t.node.removeChild(i);
          bn(e, t, n);
        }
        function vn(e, t, n, r) {
          var i = pn(e, t);
          return (
            (t.text = t.node = i.pre),
            i.bgClass && (t.bgClass = i.bgClass),
            i.textClass && (t.textClass = i.textClass),
            hn(e, t),
            mn(e, t, n, r),
            bn(e, t, r),
            t.node
          );
        }
        function bn(e, t, n) {
          if ((yn(e, t.line, t, n, !0), t.rest))
            for (var r = 0; r < t.rest.length; r++) yn(e, t.rest[r], t, n, !1);
        }
        function yn(e, t, n, r, i) {
          if (t.widgets)
            for (var o = fn(n), a = 0, s = t.widgets; a < s.length; ++a) {
              var l = s[a],
                c = A(
                  "div",
                  [l.node],
                  "CodeMirror-linewidget" +
                    (l.className ? " " + l.className : "")
                );
              l.handleMouseEvents || c.setAttribute("cm-ignore-events", "true"),
                xn(l, c, n, r),
                e.display.input.setUneditable(c),
                i && l.above
                  ? o.insertBefore(c, n.gutter || n.text)
                  : o.appendChild(c),
                ln(l, "redraw");
            }
        }
        function xn(e, t, n, r) {
          if (e.noHScroll) {
            (n.alignable || (n.alignable = [])).push(t);
            var i = r.wrapperWidth;
            (t.style.left = r.fixedPos + "px"),
              e.coverGutter ||
                ((i -= r.gutterTotalWidth),
                (t.style.paddingLeft = r.gutterTotalWidth + "px")),
              (t.style.width = i + "px");
          }
          e.coverGutter &&
            ((t.style.zIndex = 5),
            (t.style.position = "relative"),
            e.noHScroll || (t.style.marginLeft = -r.gutterTotalWidth + "px"));
        }
        function wn(e) {
          if (null != e.height) return e.height;
          var t = e.doc.cm;
          if (!t) return 0;
          if (!E(document.body, e.node)) {
            var n = "position: relative;";
            e.coverGutter &&
              (n += "margin-left: -" + t.display.gutters.offsetWidth + "px;"),
              e.noHScroll &&
                (n += "width: " + t.display.wrapper.clientWidth + "px;"),
              N(t.display.measure, A("div", [e.node], null, n));
          }
          return (e.height = e.node.parentNode.offsetHeight);
        }
        function kn(e, t) {
          for (var n = Ce(t); n != e.wrapper; n = n.parentNode)
            if (
              !n ||
              (1 == n.nodeType &&
                "true" == n.getAttribute("cm-ignore-events")) ||
              (n.parentNode == e.sizer && n != e.mover)
            )
              return !0;
        }
        function Cn(e) {
          return e.lineSpace.offsetTop;
        }
        function Sn(e) {
          return e.mover.offsetHeight - e.lineSpace.offsetHeight;
        }
        function Tn(e) {
          if (e.cachedPaddingH) return e.cachedPaddingH;
          var t = N(e.measure, A("pre", "x", "CodeMirror-line-like")),
            n = window.getComputedStyle
              ? window.getComputedStyle(t)
              : t.currentStyle,
            r = {
              left: parseInt(n.paddingLeft),
              right: parseInt(n.paddingRight),
            };
          return isNaN(r.left) || isNaN(r.right) || (e.cachedPaddingH = r), r;
        }
        function Ln(e) {
          return 50 - e.display.nativeBarWidth;
        }
        function Mn(e) {
          return e.display.scroller.clientWidth - Ln(e) - e.display.barWidth;
        }
        function Nn(e) {
          return e.display.scroller.clientHeight - Ln(e) - e.display.barHeight;
        }
        function An(e, t, n) {
          if (e.line == t)
            return { map: e.measure.map, cache: e.measure.cache };
          for (var r = 0; r < e.rest.length; r++)
            if (e.rest[r] == t)
              return { map: e.measure.maps[r], cache: e.measure.caches[r] };
          for (var i = 0; i < e.rest.length; i++)
            if (Ye(e.rest[i]) > n)
              return {
                map: e.measure.maps[i],
                cache: e.measure.caches[i],
                before: !0,
              };
        }
        function On(e, t, n, r) {
          return zn(e, $n(e, t), n, r);
        }
        function En(e, t) {
          if (t >= e.display.viewFrom && t < e.display.viewTo)
            return e.display.view[ur(e, t)];
          var n = e.display.externalMeasured;
          return n && t >= n.lineN && t < n.lineN + n.size ? n : void 0;
        }
        function $n(e, t) {
          var n = Ye(t),
            r = En(e, n);
          r && !r.text
            ? (r = null)
            : r &&
              r.changes &&
              (un(e, r, n, or(e)), (e.curOp.forceUpdate = !0)),
            r ||
              (r = (function (e, t) {
                var n = Ye((t = It(t))),
                  r = (e.display.externalMeasured = new rn(e.doc, t, n));
                r.lineN = n;
                var i = (r.built = Qt(e, r));
                return (r.text = i.pre), N(e.display.lineMeasure, i.pre), r;
              })(e, t));
          var i = An(r, t, n);
          return {
            line: t,
            view: r,
            rect: null,
            map: i.map,
            cache: i.cache,
            before: i.before,
            hasHeights: !1,
          };
        }
        function zn(e, t, n, r, i) {
          t.before && (n = -1);
          var o,
            l = n + (r || "");
          return (
            t.cache.hasOwnProperty(l)
              ? (o = t.cache[l])
              : (t.rect || (t.rect = t.view.text.getBoundingClientRect()),
                t.hasHeights ||
                  ((function (e, t, n) {
                    var r = e.options.lineWrapping,
                      i = r && Mn(e);
                    if (!t.measure.heights || (r && t.measure.width != i)) {
                      var o = (t.measure.heights = []);
                      if (r) {
                        t.measure.width = i;
                        for (
                          var a = t.text.firstChild.getClientRects(), s = 0;
                          s < a.length - 1;
                          s++
                        ) {
                          var l = a[s],
                            c = a[s + 1];
                          Math.abs(l.bottom - c.bottom) > 2 &&
                            o.push((l.bottom + c.top) / 2 - n.top);
                        }
                      }
                      o.push(n.bottom - n.top);
                    }
                  })(e, t.view, t.rect),
                  (t.hasHeights = !0)),
                (o = (function (e, t, n, r) {
                  var i,
                    o = Pn(t.map, n, r),
                    l = o.node,
                    c = o.start,
                    u = o.end,
                    f = o.collapse;
                  if (3 == l.nodeType) {
                    for (var p = 0; p < 4; p++) {
                      for (; c && re(t.line.text.charAt(o.coverStart + c)); )
                        --c;
                      for (
                        ;
                        o.coverStart + u < o.coverEnd &&
                        re(t.line.text.charAt(o.coverStart + u));
                      )
                        ++u;
                      if (
                        (i =
                          a && s < 9 && 0 == c && u == o.coverEnd - o.coverStart
                            ? l.parentNode.getBoundingClientRect()
                            : Dn(T(l, c, u).getClientRects(), r)).left ||
                        i.right ||
                        0 == c
                      )
                        break;
                      (u = c), (c -= 1), (f = "right");
                    }
                    a &&
                      s < 11 &&
                      (i = (function (e, t) {
                        if (
                          !window.screen ||
                          null == screen.logicalXDPI ||
                          screen.logicalXDPI == screen.deviceXDPI ||
                          !(function (e) {
                            if (null != We) return We;
                            var t = N(e, A("span", "x")),
                              n = t.getBoundingClientRect(),
                              r = T(t, 0, 1).getBoundingClientRect();
                            return (We = Math.abs(n.left - r.left) > 1);
                          })(e)
                        )
                          return t;
                        var n = screen.logicalXDPI / screen.deviceXDPI,
                          r = screen.logicalYDPI / screen.deviceYDPI;
                        return {
                          left: t.left * n,
                          right: t.right * n,
                          top: t.top * r,
                          bottom: t.bottom * r,
                        };
                      })(e.display.measure, i));
                  } else {
                    var d;
                    c > 0 && (f = r = "right"),
                      (i =
                        e.options.lineWrapping &&
                        (d = l.getClientRects()).length > 1
                          ? d["right" == r ? d.length - 1 : 0]
                          : l.getBoundingClientRect());
                  }
                  if (a && s < 9 && !c && (!i || (!i.left && !i.right))) {
                    var h = l.parentNode.getClientRects()[0];
                    i = h
                      ? {
                          left: h.left,
                          right: h.left + ir(e.display),
                          top: h.top,
                          bottom: h.bottom,
                        }
                      : Fn;
                  }
                  for (
                    var m = i.top - t.rect.top,
                      g = i.bottom - t.rect.top,
                      v = (m + g) / 2,
                      b = t.view.measure.heights,
                      y = 0;
                    y < b.length - 1 && !(v < b[y]);
                    y++
                  );
                  var x = y ? b[y - 1] : 0,
                    w = b[y],
                    k = {
                      left: ("right" == f ? i.right : i.left) - t.rect.left,
                      right: ("left" == f ? i.left : i.right) - t.rect.left,
                      top: x,
                      bottom: w,
                    };
                  return (
                    i.left || i.right || (k.bogus = !0),
                    e.options.singleCursorHeightPerLine ||
                      ((k.rtop = m), (k.rbottom = g)),
                    k
                  );
                })(e, t, n, r)).bogus || (t.cache[l] = o)),
            {
              left: o.left,
              right: o.right,
              top: i ? o.rtop : o.top,
              bottom: i ? o.rbottom : o.bottom,
            }
          );
        }
        var Wn,
          Fn = { left: 0, right: 0, top: 0, bottom: 0 };
        function Pn(e, t, n) {
          for (var r, i, o, a, s, l, c = 0; c < e.length; c += 3)
            if (
              ((s = e[c]),
              (l = e[c + 1]),
              t < s
                ? ((i = 0), (o = 1), (a = "left"))
                : t < l
                ? (o = 1 + (i = t - s))
                : (c == e.length - 3 || (t == l && e[c + 3] > t)) &&
                  ((i = (o = l - s) - 1), t >= l && (a = "right")),
              null != i)
            ) {
              if (
                ((r = e[c + 2]),
                s == l && n == (r.insertLeft ? "left" : "right") && (a = n),
                "left" == n && 0 == i)
              )
                for (; c && e[c - 2] == e[c - 3] && e[c - 1].insertLeft; )
                  (r = e[2 + (c -= 3)]), (a = "left");
              if ("right" == n && i == l - s)
                for (
                  ;
                  c < e.length - 3 &&
                  e[c + 3] == e[c + 4] &&
                  !e[c + 5].insertLeft;
                )
                  (r = e[(c += 3) + 2]), (a = "right");
              break;
            }
          return {
            node: r,
            start: i,
            end: o,
            collapse: a,
            coverStart: s,
            coverEnd: l,
          };
        }
        function Dn(e, t) {
          var n = Fn;
          if ("left" == t)
            for (var r = 0; r < e.length && (n = e[r]).left == n.right; r++);
          else
            for (
              var i = e.length - 1;
              i >= 0 && (n = e[i]).left == n.right;
              i--
            );
          return n;
        }
        function In(e) {
          if (
            e.measure &&
            ((e.measure.cache = {}), (e.measure.heights = null), e.rest)
          )
            for (var t = 0; t < e.rest.length; t++) e.measure.caches[t] = {};
        }
        function jn(e) {
          (e.display.externalMeasure = null), M(e.display.lineMeasure);
          for (var t = 0; t < e.display.view.length; t++) In(e.display.view[t]);
        }
        function Hn(e) {
          jn(e),
            (e.display.cachedCharWidth =
              e.display.cachedTextHeight =
              e.display.cachedPaddingH =
                null),
            e.options.lineWrapping || (e.display.maxLineChanged = !0),
            (e.display.lineNumChars = null);
        }
        function Rn() {
          return u && g
            ? -(
                document.body.getBoundingClientRect().left -
                parseInt(getComputedStyle(document.body).marginLeft)
              )
            : window.pageXOffset ||
                (document.documentElement || document.body).scrollLeft;
        }
        function Bn() {
          return u && g
            ? -(
                document.body.getBoundingClientRect().top -
                parseInt(getComputedStyle(document.body).marginTop)
              )
            : window.pageYOffset ||
                (document.documentElement || document.body).scrollTop;
        }
        function qn(e) {
          var t = 0;
          if (e.widgets)
            for (var n = 0; n < e.widgets.length; ++n)
              e.widgets[n].above && (t += wn(e.widgets[n]));
          return t;
        }
        function Vn(e, t, n, r, i) {
          if (!i) {
            var o = qn(t);
            (n.top += o), (n.bottom += o);
          }
          if ("line" == r) return n;
          r || (r = "local");
          var a = qt(t);
          if (
            ("local" == r ? (a += Cn(e.display)) : (a -= e.display.viewOffset),
            "page" == r || "window" == r)
          ) {
            var s = e.display.lineSpace.getBoundingClientRect();
            a += s.top + ("window" == r ? 0 : Bn());
            var l = s.left + ("window" == r ? 0 : Rn());
            (n.left += l), (n.right += l);
          }
          return (n.top += a), (n.bottom += a), n;
        }
        function Un(e, t, n) {
          if ("div" == n) return t;
          var r = t.left,
            i = t.top;
          if ("page" == n) (r -= Rn()), (i -= Bn());
          else if ("local" == n || !n) {
            var o = e.display.sizer.getBoundingClientRect();
            (r += o.left), (i += o.top);
          }
          var a = e.display.lineSpace.getBoundingClientRect();
          return { left: r - a.left, top: i - a.top };
        }
        function Kn(e, t, n, r, i) {
          return r || (r = Ke(e.doc, t.line)), Vn(e, r, On(e, r, t.ch, i), n);
        }
        function Gn(e, t, n, r, i, o) {
          function a(t, a) {
            var s = zn(e, i, t, a ? "right" : "left", o);
            return a ? (s.left = s.right) : (s.right = s.left), Vn(e, r, s, n);
          }
          (r = r || Ke(e.doc, t.line)), i || (i = $n(e, r));
          var s = ce(r, e.doc.direction),
            l = t.ch,
            c = t.sticky;
          if (
            (l >= r.text.length
              ? ((l = r.text.length), (c = "before"))
              : l <= 0 && ((l = 0), (c = "after")),
            !s)
          )
            return a("before" == c ? l - 1 : l, "before" == c);
          function u(e, t, n) {
            return a(n ? e - 1 : e, (1 == s[t].level) != n);
          }
          var f = se(s, l, c),
            p = ae,
            d = u(l, f, "before" == c);
          return null != p && (d.other = u(l, p, "before" != c)), d;
        }
        function _n(e, t) {
          var n = 0;
          (t = st(e.doc, t)),
            e.options.lineWrapping || (n = ir(e.display) * t.ch);
          var r = Ke(e.doc, t.line),
            i = qt(r) + Cn(e.display);
          return { left: n, right: n, top: i, bottom: i + r.height };
        }
        function Xn(e, t, n, r, i) {
          var o = et(e, t, n);
          return (o.xRel = i), r && (o.outside = r), o;
        }
        function Yn(e, t, n) {
          var r = e.doc;
          if ((n += e.display.viewOffset) < 0)
            return Xn(r.first, 0, null, -1, -1);
          var i = Qe(r, n),
            o = r.first + r.size - 1;
          if (i > o)
            return Xn(r.first + r.size - 1, Ke(r, o).text.length, null, 1, 1);
          t < 0 && (t = 0);
          for (var a = Ke(r, i); ; ) {
            var s = er(e, a, i, t, n),
              l = Pt(a, s.ch + (s.xRel > 0 || s.outside > 0 ? 1 : 0));
            if (!l) return s;
            var c = l.find(1);
            if (c.line == i) return c;
            a = Ke(r, (i = c.line));
          }
        }
        function Qn(e, t, n, r) {
          r -= qn(t);
          var i = t.text.length,
            o = oe(
              function (t) {
                return zn(e, n, t - 1).bottom <= r;
              },
              i,
              0
            );
          return {
            begin: o,
            end: (i = oe(
              function (t) {
                return zn(e, n, t).top > r;
              },
              o,
              i
            )),
          };
        }
        function Zn(e, t, n, r) {
          return (
            n || (n = $n(e, t)), Qn(e, t, n, Vn(e, t, zn(e, n, r), "line").top)
          );
        }
        function Jn(e, t, n, r) {
          return !(e.bottom <= n) && (e.top > n || (r ? e.left : e.right) > t);
        }
        function er(e, t, n, r, i) {
          i -= qt(t);
          var o = $n(e, t),
            a = qn(t),
            s = 0,
            l = t.text.length,
            c = !0,
            u = ce(t, e.doc.direction);
          if (u) {
            var f = (e.options.lineWrapping ? nr : tr)(e, t, n, o, u, r, i);
            (s = (c = 1 != f.level) ? f.from : f.to - 1),
              (l = c ? f.to : f.from - 1);
          }
          var p,
            d,
            h = null,
            m = null,
            g = oe(
              function (t) {
                var n = zn(e, o, t);
                return (
                  (n.top += a),
                  (n.bottom += a),
                  !!Jn(n, r, i, !1) &&
                    (n.top <= i && n.left <= r && ((h = t), (m = n)), !0)
                );
              },
              s,
              l
            ),
            v = !1;
          if (m) {
            var b = r - m.left < m.right - r,
              y = b == c;
            (g = h + (y ? 0 : 1)),
              (d = y ? "after" : "before"),
              (p = b ? m.left : m.right);
          } else {
            c || (g != l && g != s) || g++,
              (d =
                0 == g
                  ? "after"
                  : g == t.text.length
                  ? "before"
                  : zn(e, o, g - (c ? 1 : 0)).bottom + a <= i == c
                  ? "after"
                  : "before");
            var x = Gn(e, et(n, g, d), "line", t, o);
            (p = x.left), (v = i < x.top ? -1 : i >= x.bottom ? 1 : 0);
          }
          return Xn(n, (g = ie(t.text, g, 1)), d, v, r - p);
        }
        function tr(e, t, n, r, i, o, a) {
          var s = oe(
              function (s) {
                var l = i[s],
                  c = 1 != l.level;
                return Jn(
                  Gn(
                    e,
                    et(n, c ? l.to : l.from, c ? "before" : "after"),
                    "line",
                    t,
                    r
                  ),
                  o,
                  a,
                  !0
                );
              },
              0,
              i.length - 1
            ),
            l = i[s];
          if (s > 0) {
            var c = 1 != l.level,
              u = Gn(
                e,
                et(n, c ? l.from : l.to, c ? "after" : "before"),
                "line",
                t,
                r
              );
            Jn(u, o, a, !0) && u.top > a && (l = i[s - 1]);
          }
          return l;
        }
        function nr(e, t, n, r, i, o, a) {
          var s = Qn(e, t, r, a),
            l = s.begin,
            c = s.end;
          /\s/.test(t.text.charAt(c - 1)) && c--;
          for (var u = null, f = null, p = 0; p < i.length; p++) {
            var d = i[p];
            if (!(d.from >= c || d.to <= l)) {
              var h = zn(
                  e,
                  r,
                  1 != d.level ? Math.min(c, d.to) - 1 : Math.max(l, d.from)
                ).right,
                m = h < o ? o - h + 1e9 : h - o;
              (!u || f > m) && ((u = d), (f = m));
            }
          }
          return (
            u || (u = i[i.length - 1]),
            u.from < l && (u = { from: l, to: u.to, level: u.level }),
            u.to > c && (u = { from: u.from, to: c, level: u.level }),
            u
          );
        }
        function rr(e) {
          if (null != e.cachedTextHeight) return e.cachedTextHeight;
          if (null == Wn) {
            Wn = A("pre", null, "CodeMirror-line-like");
            for (var t = 0; t < 49; ++t)
              Wn.appendChild(document.createTextNode("x")),
                Wn.appendChild(A("br"));
            Wn.appendChild(document.createTextNode("x"));
          }
          N(e.measure, Wn);
          var n = Wn.offsetHeight / 50;
          return n > 3 && (e.cachedTextHeight = n), M(e.measure), n || 1;
        }
        function ir(e) {
          if (null != e.cachedCharWidth) return e.cachedCharWidth;
          var t = A("span", "xxxxxxxxxx"),
            n = A("pre", [t], "CodeMirror-line-like");
          N(e.measure, n);
          var r = t.getBoundingClientRect(),
            i = (r.right - r.left) / 10;
          return i > 2 && (e.cachedCharWidth = i), i || 10;
        }
        function or(e) {
          for (
            var t = e.display,
              n = {},
              r = {},
              i = t.gutters.clientLeft,
              o = t.gutters.firstChild,
              a = 0;
            o;
            o = o.nextSibling, ++a
          ) {
            var s = e.display.gutterSpecs[a].className;
            (n[s] = o.offsetLeft + o.clientLeft + i), (r[s] = o.clientWidth);
          }
          return {
            fixedPos: ar(t),
            gutterTotalWidth: t.gutters.offsetWidth,
            gutterLeft: n,
            gutterWidth: r,
            wrapperWidth: t.wrapper.clientWidth,
          };
        }
        function ar(e) {
          return (
            e.scroller.getBoundingClientRect().left -
            e.sizer.getBoundingClientRect().left
          );
        }
        function sr(e) {
          var t = rr(e.display),
            n = e.options.lineWrapping,
            r =
              n &&
              Math.max(5, e.display.scroller.clientWidth / ir(e.display) - 3);
          return function (i) {
            if (Rt(e.doc, i)) return 0;
            var o = 0;
            if (i.widgets)
              for (var a = 0; a < i.widgets.length; a++)
                i.widgets[a].height && (o += i.widgets[a].height);
            return n ? o + (Math.ceil(i.text.length / r) || 1) * t : o + t;
          };
        }
        function lr(e) {
          var t = e.doc,
            n = sr(e);
          t.iter(function (e) {
            var t = n(e);
            t != e.height && Xe(e, t);
          });
        }
        function cr(e, t, n, r) {
          var i = e.display;
          if (!n && "true" == Ce(t).getAttribute("cm-not-content")) return null;
          var o,
            a,
            s = i.lineSpace.getBoundingClientRect();
          try {
            (o = t.clientX - s.left), (a = t.clientY - s.top);
          } catch (e) {
            return null;
          }
          var l,
            c = Yn(e, o, a);
          if (r && c.xRel > 0 && (l = Ke(e.doc, c.line).text).length == c.ch) {
            var u = I(l, l.length, e.options.tabSize) - l.length;
            c = et(
              c.line,
              Math.max(
                0,
                Math.round((o - Tn(e.display).left) / ir(e.display)) - u
              )
            );
          }
          return c;
        }
        function ur(e, t) {
          if (t >= e.display.viewTo) return null;
          if ((t -= e.display.viewFrom) < 0) return null;
          for (var n = e.display.view, r = 0; r < n.length; r++)
            if ((t -= n[r].size) < 0) return r;
        }
        function fr(e, t, n, r) {
          null == t && (t = e.doc.first),
            null == n && (n = e.doc.first + e.doc.size),
            r || (r = 0);
          var i = e.display;
          if (
            (r &&
              n < i.viewTo &&
              (null == i.updateLineNumbers || i.updateLineNumbers > t) &&
              (i.updateLineNumbers = t),
            (e.curOp.viewChanged = !0),
            t >= i.viewTo)
          )
            kt && jt(e.doc, t) < i.viewTo && dr(e);
          else if (n <= i.viewFrom)
            kt && Ht(e.doc, n + r) > i.viewFrom
              ? dr(e)
              : ((i.viewFrom += r), (i.viewTo += r));
          else if (t <= i.viewFrom && n >= i.viewTo) dr(e);
          else if (t <= i.viewFrom) {
            var o = hr(e, n, n + r, 1);
            o
              ? ((i.view = i.view.slice(o.index)),
                (i.viewFrom = o.lineN),
                (i.viewTo += r))
              : dr(e);
          } else if (n >= i.viewTo) {
            var a = hr(e, t, t, -1);
            a
              ? ((i.view = i.view.slice(0, a.index)), (i.viewTo = a.lineN))
              : dr(e);
          } else {
            var s = hr(e, t, t, -1),
              l = hr(e, n, n + r, 1);
            s && l
              ? ((i.view = i.view
                  .slice(0, s.index)
                  .concat(on(e, s.lineN, l.lineN))
                  .concat(i.view.slice(l.index))),
                (i.viewTo += r))
              : dr(e);
          }
          var c = i.externalMeasured;
          c &&
            (n < c.lineN
              ? (c.lineN += r)
              : t < c.lineN + c.size && (i.externalMeasured = null));
        }
        function pr(e, t, n) {
          e.curOp.viewChanged = !0;
          var r = e.display,
            i = e.display.externalMeasured;
          if (
            (i &&
              t >= i.lineN &&
              t < i.lineN + i.size &&
              (r.externalMeasured = null),
            !(t < r.viewFrom || t >= r.viewTo))
          ) {
            var o = r.view[ur(e, t)];
            if (null != o.node) {
              var a = o.changes || (o.changes = []);
              -1 == H(a, n) && a.push(n);
            }
          }
        }
        function dr(e) {
          (e.display.viewFrom = e.display.viewTo = e.doc.first),
            (e.display.view = []),
            (e.display.viewOffset = 0);
        }
        function hr(e, t, n, r) {
          var i,
            o = ur(e, t),
            a = e.display.view;
          if (!kt || n == e.doc.first + e.doc.size)
            return { index: o, lineN: n };
          for (var s = e.display.viewFrom, l = 0; l < o; l++) s += a[l].size;
          if (s != t) {
            if (r > 0) {
              if (o == a.length - 1) return null;
              (i = s + a[o].size - t), o++;
            } else i = s - t;
            (t += i), (n += i);
          }
          for (; jt(e.doc, n) != n; ) {
            if (o == (r < 0 ? 0 : a.length - 1)) return null;
            (n += r * a[o - (r < 0 ? 1 : 0)].size), (o += r);
          }
          return { index: o, lineN: n };
        }
        function mr(e) {
          for (var t = e.display.view, n = 0, r = 0; r < t.length; r++) {
            var i = t[r];
            i.hidden || (i.node && !i.changes) || ++n;
          }
          return n;
        }
        function gr(e) {
          e.display.input.showSelection(e.display.input.prepareSelection());
        }
        function vr(e, t) {
          void 0 === t && (t = !0);
          for (
            var n = e.doc,
              r = {},
              i = (r.cursors = document.createDocumentFragment()),
              o = (r.selection = document.createDocumentFragment()),
              a = 0;
            a < n.sel.ranges.length;
            a++
          )
            if (t || a != n.sel.primIndex) {
              var s = n.sel.ranges[a];
              if (
                !(
                  s.from().line >= e.display.viewTo ||
                  s.to().line < e.display.viewFrom
                )
              ) {
                var l = s.empty();
                (l || e.options.showCursorWhenSelecting) && br(e, s.head, i),
                  l || xr(e, s, o);
              }
            }
          return r;
        }
        function br(e, t, n) {
          var r = Gn(
              e,
              t,
              "div",
              null,
              null,
              !e.options.singleCursorHeightPerLine
            ),
            i = n.appendChild(A("div", " ", "CodeMirror-cursor"));
          if (
            ((i.style.left = r.left + "px"),
            (i.style.top = r.top + "px"),
            (i.style.height =
              Math.max(0, r.bottom - r.top) * e.options.cursorHeight + "px"),
            r.other)
          ) {
            var o = n.appendChild(
              A("div", " ", "CodeMirror-cursor CodeMirror-secondarycursor")
            );
            (o.style.display = ""),
              (o.style.left = r.other.left + "px"),
              (o.style.top = r.other.top + "px"),
              (o.style.height = 0.85 * (r.other.bottom - r.other.top) + "px");
          }
        }
        function yr(e, t) {
          return e.top - t.top || e.left - t.left;
        }
        function xr(e, t, n) {
          var r = e.display,
            i = e.doc,
            o = document.createDocumentFragment(),
            a = Tn(e.display),
            s = a.left,
            l = Math.max(r.sizerWidth, Mn(e) - r.sizer.offsetLeft) - a.right,
            c = "ltr" == i.direction;
          function u(e, t, n, r) {
            t < 0 && (t = 0),
              (t = Math.round(t)),
              (r = Math.round(r)),
              o.appendChild(
                A(
                  "div",
                  null,
                  "CodeMirror-selected",
                  "position: absolute; left: " +
                    e +
                    "px;\n                             top: " +
                    t +
                    "px; width: " +
                    (null == n ? l - e : n) +
                    "px;\n                             height: " +
                    (r - t) +
                    "px"
                )
              );
          }
          function f(t, n, r) {
            var o,
              a,
              f = Ke(i, t),
              p = f.text.length;
            function d(n, r) {
              return Kn(e, et(t, n), "div", f, r);
            }
            function h(t, n, r) {
              var i = Zn(e, f, null, t),
                o = ("ltr" == n) == ("after" == r) ? "left" : "right";
              return d(
                "after" == r
                  ? i.begin
                  : i.end - (/\s/.test(f.text.charAt(i.end - 1)) ? 2 : 1),
                o
              )[o];
            }
            var m = ce(f, i.direction);
            return (
              (function (e, t, n, r) {
                if (!e) return r(t, n, "ltr", 0);
                for (var i = !1, o = 0; o < e.length; ++o) {
                  var a = e[o];
                  ((a.from < n && a.to > t) || (t == n && a.to == t)) &&
                    (r(
                      Math.max(a.from, t),
                      Math.min(a.to, n),
                      1 == a.level ? "rtl" : "ltr",
                      o
                    ),
                    (i = !0));
                }
                i || r(t, n, "ltr");
              })(m, n || 0, null == r ? p : r, function (e, t, i, f) {
                var g = "ltr" == i,
                  v = d(e, g ? "left" : "right"),
                  b = d(t - 1, g ? "right" : "left"),
                  y = null == n && 0 == e,
                  x = null == r && t == p,
                  w = 0 == f,
                  k = !m || f == m.length - 1;
                if (b.top - v.top <= 3) {
                  var C = (c ? x : y) && k,
                    S = (c ? y : x) && w ? s : (g ? v : b).left,
                    T = C ? l : (g ? b : v).right;
                  u(S, v.top, T - S, v.bottom);
                } else {
                  var L, M, N, A;
                  g
                    ? ((L = c && y && w ? s : v.left),
                      (M = c ? l : h(e, i, "before")),
                      (N = c ? s : h(t, i, "after")),
                      (A = c && x && k ? l : b.right))
                    : ((L = c ? h(e, i, "before") : s),
                      (M = !c && y && w ? l : v.right),
                      (N = !c && x && k ? s : b.left),
                      (A = c ? h(t, i, "after") : l)),
                    u(L, v.top, M - L, v.bottom),
                    v.bottom < b.top && u(s, v.bottom, null, b.top),
                    u(N, b.top, A - N, b.bottom);
                }
                (!o || yr(v, o) < 0) && (o = v),
                  yr(b, o) < 0 && (o = b),
                  (!a || yr(v, a) < 0) && (a = v),
                  yr(b, a) < 0 && (a = b);
              }),
              { start: o, end: a }
            );
          }
          var p = t.from(),
            d = t.to();
          if (p.line == d.line) f(p.line, p.ch, d.ch);
          else {
            var h = Ke(i, p.line),
              m = Ke(i, d.line),
              g = It(h) == It(m),
              v = f(p.line, p.ch, g ? h.text.length + 1 : null).end,
              b = f(d.line, g ? 0 : null, d.ch).start;
            g &&
              (v.top < b.top - 2
                ? (u(v.right, v.top, null, v.bottom),
                  u(s, b.top, b.left, b.bottom))
                : u(v.right, v.top, b.left - v.right, v.bottom)),
              v.bottom < b.top && u(s, v.bottom, null, b.top);
          }
          n.appendChild(o);
        }
        function wr(e) {
          if (e.state.focused) {
            var t = e.display;
            clearInterval(t.blinker);
            var n = !0;
            (t.cursorDiv.style.visibility = ""),
              e.options.cursorBlinkRate > 0
                ? (t.blinker = setInterval(function () {
                    return (t.cursorDiv.style.visibility = (n = !n)
                      ? ""
                      : "hidden");
                  }, e.options.cursorBlinkRate))
                : e.options.cursorBlinkRate < 0 &&
                  (t.cursorDiv.style.visibility = "hidden");
          }
        }
        function kr(e) {
          e.state.focused || (e.display.input.focus(), Sr(e));
        }
        function Cr(e) {
          (e.state.delayingBlurEvent = !0),
            setTimeout(function () {
              e.state.delayingBlurEvent &&
                ((e.state.delayingBlurEvent = !1), Tr(e));
            }, 100);
        }
        function Sr(e, t) {
          e.state.delayingBlurEvent && (e.state.delayingBlurEvent = !1),
            "nocursor" != e.options.readOnly &&
              (e.state.focused ||
                (he(e, "focus", e, t),
                (e.state.focused = !0),
                z(e.display.wrapper, "CodeMirror-focused"),
                e.curOp ||
                  e.display.selForContextMenu == e.doc.sel ||
                  (e.display.input.reset(),
                  l &&
                    setTimeout(function () {
                      return e.display.input.reset(!0);
                    }, 20)),
                e.display.input.receivedFocus()),
              wr(e));
        }
        function Tr(e, t) {
          e.state.delayingBlurEvent ||
            (e.state.focused &&
              (he(e, "blur", e, t),
              (e.state.focused = !1),
              L(e.display.wrapper, "CodeMirror-focused")),
            clearInterval(e.display.blinker),
            setTimeout(function () {
              e.state.focused || (e.display.shift = !1);
            }, 150));
        }
        function Lr(e) {
          for (
            var t = e.display, n = t.lineDiv.offsetTop, r = 0;
            r < t.view.length;
            r++
          ) {
            var i = t.view[r],
              o = e.options.lineWrapping,
              l = void 0,
              c = 0;
            if (!i.hidden) {
              if (a && s < 8) {
                var u = i.node.offsetTop + i.node.offsetHeight;
                (l = u - n), (n = u);
              } else {
                var f = i.node.getBoundingClientRect();
                (l = f.bottom - f.top),
                  !o &&
                    i.text.firstChild &&
                    (c =
                      i.text.firstChild.getBoundingClientRect().right -
                      f.left -
                      1);
              }
              var p = i.line.height - l;
              if (
                (p > 0.005 || p < -0.005) &&
                (Xe(i.line, l), Mr(i.line), i.rest)
              )
                for (var d = 0; d < i.rest.length; d++) Mr(i.rest[d]);
              if (c > e.display.sizerWidth) {
                var h = Math.ceil(c / ir(e.display));
                h > e.display.maxLineLength &&
                  ((e.display.maxLineLength = h),
                  (e.display.maxLine = i.line),
                  (e.display.maxLineChanged = !0));
              }
            }
          }
        }
        function Mr(e) {
          if (e.widgets)
            for (var t = 0; t < e.widgets.length; ++t) {
              var n = e.widgets[t],
                r = n.node.parentNode;
              r && (n.height = r.offsetHeight);
            }
        }
        function Nr(e, t, n) {
          var r =
            n && null != n.top ? Math.max(0, n.top) : e.scroller.scrollTop;
          r = Math.floor(r - Cn(e));
          var i = n && null != n.bottom ? n.bottom : r + e.wrapper.clientHeight,
            o = Qe(t, r),
            a = Qe(t, i);
          if (n && n.ensure) {
            var s = n.ensure.from.line,
              l = n.ensure.to.line;
            s < o
              ? ((o = s), (a = Qe(t, qt(Ke(t, s)) + e.wrapper.clientHeight)))
              : Math.min(l, t.lastLine()) >= a &&
                ((o = Qe(t, qt(Ke(t, l)) - e.wrapper.clientHeight)), (a = l));
          }
          return { from: o, to: Math.max(a, o + 1) };
        }
        function Ar(e, t) {
          var n = e.display,
            r = rr(e.display);
          t.top < 0 && (t.top = 0);
          var i =
              e.curOp && null != e.curOp.scrollTop
                ? e.curOp.scrollTop
                : n.scroller.scrollTop,
            o = Nn(e),
            a = {};
          t.bottom - t.top > o && (t.bottom = t.top + o);
          var s = e.doc.height + Sn(n),
            l = t.top < r,
            c = t.bottom > s - r;
          if (t.top < i) a.scrollTop = l ? 0 : t.top;
          else if (t.bottom > i + o) {
            var u = Math.min(t.top, (c ? s : t.bottom) - o);
            u != i && (a.scrollTop = u);
          }
          var f =
              e.curOp && null != e.curOp.scrollLeft
                ? e.curOp.scrollLeft
                : n.scroller.scrollLeft,
            p = Mn(e) - (e.options.fixedGutter ? n.gutters.offsetWidth : 0),
            d = t.right - t.left > p;
          return (
            d && (t.right = t.left + p),
            t.left < 10
              ? (a.scrollLeft = 0)
              : t.left < f
              ? (a.scrollLeft = Math.max(0, t.left - (d ? 0 : 10)))
              : t.right > p + f - 3 &&
                (a.scrollLeft = t.right + (d ? 0 : 10) - p),
            a
          );
        }
        function Or(e, t) {
          null != t &&
            (zr(e),
            (e.curOp.scrollTop =
              (null == e.curOp.scrollTop
                ? e.doc.scrollTop
                : e.curOp.scrollTop) + t));
        }
        function Er(e) {
          zr(e);
          var t = e.getCursor();
          e.curOp.scrollToPos = {
            from: t,
            to: t,
            margin: e.options.cursorScrollMargin,
          };
        }
        function $r(e, t, n) {
          (null == t && null == n) || zr(e),
            null != t && (e.curOp.scrollLeft = t),
            null != n && (e.curOp.scrollTop = n);
        }
        function zr(e) {
          var t = e.curOp.scrollToPos;
          t &&
            ((e.curOp.scrollToPos = null),
            Wr(e, _n(e, t.from), _n(e, t.to), t.margin));
        }
        function Wr(e, t, n, r) {
          var i = Ar(e, {
            left: Math.min(t.left, n.left),
            top: Math.min(t.top, n.top) - r,
            right: Math.max(t.right, n.right),
            bottom: Math.max(t.bottom, n.bottom) + r,
          });
          $r(e, i.scrollLeft, i.scrollTop);
        }
        function Fr(e, t) {
          Math.abs(e.doc.scrollTop - t) < 2 ||
            (n || li(e, { top: t }), Pr(e, t, !0), n && li(e), ri(e, 100));
        }
        function Pr(e, t, n) {
          (t = Math.max(
            0,
            Math.min(
              e.display.scroller.scrollHeight - e.display.scroller.clientHeight,
              t
            )
          )),
            (e.display.scroller.scrollTop != t || n) &&
              ((e.doc.scrollTop = t),
              e.display.scrollbars.setScrollTop(t),
              e.display.scroller.scrollTop != t &&
                (e.display.scroller.scrollTop = t));
        }
        function Dr(e, t, n, r) {
          (t = Math.max(
            0,
            Math.min(
              t,
              e.display.scroller.scrollWidth - e.display.scroller.clientWidth
            )
          )),
            ((n ? t == e.doc.scrollLeft : Math.abs(e.doc.scrollLeft - t) < 2) &&
              !r) ||
              ((e.doc.scrollLeft = t),
              fi(e),
              e.display.scroller.scrollLeft != t &&
                (e.display.scroller.scrollLeft = t),
              e.display.scrollbars.setScrollLeft(t));
        }
        function Ir(e) {
          var t = e.display,
            n = t.gutters.offsetWidth,
            r = Math.round(e.doc.height + Sn(e.display));
          return {
            clientHeight: t.scroller.clientHeight,
            viewHeight: t.wrapper.clientHeight,
            scrollWidth: t.scroller.scrollWidth,
            clientWidth: t.scroller.clientWidth,
            viewWidth: t.wrapper.clientWidth,
            barLeft: e.options.fixedGutter ? n : 0,
            docHeight: r,
            scrollHeight: r + Ln(e) + t.barHeight,
            nativeBarWidth: t.nativeBarWidth,
            gutterWidth: n,
          };
        }
        var jr = function (e, t, n) {
          this.cm = n;
          var r = (this.vert = A(
              "div",
              [A("div", null, null, "min-width: 1px")],
              "CodeMirror-vscrollbar"
            )),
            i = (this.horiz = A(
              "div",
              [A("div", null, null, "height: 100%; min-height: 1px")],
              "CodeMirror-hscrollbar"
            ));
          (r.tabIndex = i.tabIndex = -1),
            e(r),
            e(i),
            fe(r, "scroll", function () {
              r.clientHeight && t(r.scrollTop, "vertical");
            }),
            fe(i, "scroll", function () {
              i.clientWidth && t(i.scrollLeft, "horizontal");
            }),
            (this.checkedZeroWidth = !1),
            a &&
              s < 8 &&
              (this.horiz.style.minHeight = this.vert.style.minWidth = "18px");
        };
        (jr.prototype.update = function (e) {
          var t = e.scrollWidth > e.clientWidth + 1,
            n = e.scrollHeight > e.clientHeight + 1,
            r = e.nativeBarWidth;
          if (n) {
            (this.vert.style.display = "block"),
              (this.vert.style.bottom = t ? r + "px" : "0");
            var i = e.viewHeight - (t ? r : 0);
            this.vert.firstChild.style.height =
              Math.max(0, e.scrollHeight - e.clientHeight + i) + "px";
          } else
            (this.vert.style.display = ""),
              (this.vert.firstChild.style.height = "0");
          if (t) {
            (this.horiz.style.display = "block"),
              (this.horiz.style.right = n ? r + "px" : "0"),
              (this.horiz.style.left = e.barLeft + "px");
            var o = e.viewWidth - e.barLeft - (n ? r : 0);
            this.horiz.firstChild.style.width =
              Math.max(0, e.scrollWidth - e.clientWidth + o) + "px";
          } else
            (this.horiz.style.display = ""),
              (this.horiz.firstChild.style.width = "0");
          return (
            !this.checkedZeroWidth &&
              e.clientHeight > 0 &&
              (0 == r && this.zeroWidthHack(), (this.checkedZeroWidth = !0)),
            { right: n ? r : 0, bottom: t ? r : 0 }
          );
        }),
          (jr.prototype.setScrollLeft = function (e) {
            this.horiz.scrollLeft != e && (this.horiz.scrollLeft = e),
              this.disableHoriz &&
                this.enableZeroWidthBar(this.horiz, this.disableHoriz, "horiz");
          }),
          (jr.prototype.setScrollTop = function (e) {
            this.vert.scrollTop != e && (this.vert.scrollTop = e),
              this.disableVert &&
                this.enableZeroWidthBar(this.vert, this.disableVert, "vert");
          }),
          (jr.prototype.zeroWidthHack = function () {
            var e = b && !d ? "12px" : "18px";
            (this.horiz.style.height = this.vert.style.width = e),
              (this.horiz.style.pointerEvents = this.vert.style.pointerEvents =
                "none"),
              (this.disableHoriz = new j()),
              (this.disableVert = new j());
          }),
          (jr.prototype.enableZeroWidthBar = function (e, t, n) {
            (e.style.pointerEvents = "auto"),
              t.set(1e3, function r() {
                var i = e.getBoundingClientRect();
                ("vert" == n
                  ? document.elementFromPoint(
                      i.right - 1,
                      (i.top + i.bottom) / 2
                    )
                  : document.elementFromPoint(
                      (i.right + i.left) / 2,
                      i.bottom - 1
                    )) != e
                  ? (e.style.pointerEvents = "none")
                  : t.set(1e3, r);
              });
          }),
          (jr.prototype.clear = function () {
            var e = this.horiz.parentNode;
            e.removeChild(this.horiz), e.removeChild(this.vert);
          });
        var Hr = function () {};
        function Rr(e, t) {
          t || (t = Ir(e));
          var n = e.display.barWidth,
            r = e.display.barHeight;
          Br(e, t);
          for (
            var i = 0;
            (i < 4 && n != e.display.barWidth) || r != e.display.barHeight;
            i++
          )
            n != e.display.barWidth && e.options.lineWrapping && Lr(e),
              Br(e, Ir(e)),
              (n = e.display.barWidth),
              (r = e.display.barHeight);
        }
        function Br(e, t) {
          var n = e.display,
            r = n.scrollbars.update(t);
          (n.sizer.style.paddingRight = (n.barWidth = r.right) + "px"),
            (n.sizer.style.paddingBottom = (n.barHeight = r.bottom) + "px"),
            (n.heightForcer.style.borderBottom =
              r.bottom + "px solid transparent"),
            r.right && r.bottom
              ? ((n.scrollbarFiller.style.display = "block"),
                (n.scrollbarFiller.style.height = r.bottom + "px"),
                (n.scrollbarFiller.style.width = r.right + "px"))
              : (n.scrollbarFiller.style.display = ""),
            r.bottom &&
            e.options.coverGutterNextToScrollbar &&
            e.options.fixedGutter
              ? ((n.gutterFiller.style.display = "block"),
                (n.gutterFiller.style.height = r.bottom + "px"),
                (n.gutterFiller.style.width = t.gutterWidth + "px"))
              : (n.gutterFiller.style.display = "");
        }
        (Hr.prototype.update = function () {
          return { bottom: 0, right: 0 };
        }),
          (Hr.prototype.setScrollLeft = function () {}),
          (Hr.prototype.setScrollTop = function () {}),
          (Hr.prototype.clear = function () {});
        var qr = { native: jr, null: Hr };
        function Vr(e) {
          e.display.scrollbars &&
            (e.display.scrollbars.clear(),
            e.display.scrollbars.addClass &&
              L(e.display.wrapper, e.display.scrollbars.addClass)),
            (e.display.scrollbars = new qr[e.options.scrollbarStyle](
              function (t) {
                e.display.wrapper.insertBefore(t, e.display.scrollbarFiller),
                  fe(t, "mousedown", function () {
                    e.state.focused &&
                      setTimeout(function () {
                        return e.display.input.focus();
                      }, 0);
                  }),
                  t.setAttribute("cm-not-content", "true");
              },
              function (t, n) {
                "horizontal" == n ? Dr(e, t) : Fr(e, t);
              },
              e
            )),
            e.display.scrollbars.addClass &&
              z(e.display.wrapper, e.display.scrollbars.addClass);
        }
        var Ur = 0;
        function Kr(e) {
          var t;
          (e.curOp = {
            cm: e,
            viewChanged: !1,
            startHeight: e.doc.height,
            forceUpdate: !1,
            updateInput: 0,
            typing: !1,
            changeObjs: null,
            cursorActivityHandlers: null,
            cursorActivityCalled: 0,
            selectionChanged: !1,
            updateMaxLine: !1,
            scrollLeft: null,
            scrollTop: null,
            scrollToPos: null,
            focus: !1,
            id: ++Ur,
          }),
            (t = e.curOp),
            an
              ? an.ops.push(t)
              : (t.ownsGroup = an = { ops: [t], delayedCallbacks: [] });
        }
        function Gr(e) {
          var t = e.curOp;
          t &&
            (function (e, t) {
              var n = e.ownsGroup;
              if (n)
                try {
                  !(function (e) {
                    var t = e.delayedCallbacks,
                      n = 0;
                    do {
                      for (; n < t.length; n++) t[n].call(null);
                      for (var r = 0; r < e.ops.length; r++) {
                        var i = e.ops[r];
                        if (i.cursorActivityHandlers)
                          for (
                            ;
                            i.cursorActivityCalled <
                            i.cursorActivityHandlers.length;
                          )
                            i.cursorActivityHandlers[
                              i.cursorActivityCalled++
                            ].call(null, i.cm);
                      }
                    } while (n < t.length);
                  })(n);
                } finally {
                  (an = null), t(n);
                }
            })(t, function (e) {
              for (var t = 0; t < e.ops.length; t++) e.ops[t].cm.curOp = null;
              !(function (e) {
                for (var t = e.ops, n = 0; n < t.length; n++) _r(t[n]);
                for (var r = 0; r < t.length; r++) Xr(t[r]);
                for (var i = 0; i < t.length; i++) Yr(t[i]);
                for (var o = 0; o < t.length; o++) Qr(t[o]);
                for (var a = 0; a < t.length; a++) Zr(t[a]);
              })(e);
            });
        }
        function _r(e) {
          var t = e.cm,
            n = t.display;
          !(function (e) {
            var t = e.display;
            !t.scrollbarsClipped &&
              t.scroller.offsetWidth &&
              ((t.nativeBarWidth =
                t.scroller.offsetWidth - t.scroller.clientWidth),
              (t.heightForcer.style.height = Ln(e) + "px"),
              (t.sizer.style.marginBottom = -t.nativeBarWidth + "px"),
              (t.sizer.style.borderRightWidth = Ln(e) + "px"),
              (t.scrollbarsClipped = !0));
          })(t),
            e.updateMaxLine && Ut(t),
            (e.mustUpdate =
              e.viewChanged ||
              e.forceUpdate ||
              null != e.scrollTop ||
              (e.scrollToPos &&
                (e.scrollToPos.from.line < n.viewFrom ||
                  e.scrollToPos.to.line >= n.viewTo)) ||
              (n.maxLineChanged && t.options.lineWrapping)),
            (e.update =
              e.mustUpdate &&
              new oi(
                t,
                e.mustUpdate && { top: e.scrollTop, ensure: e.scrollToPos },
                e.forceUpdate
              ));
        }
        function Xr(e) {
          e.updatedDisplay = e.mustUpdate && ai(e.cm, e.update);
        }
        function Yr(e) {
          var t = e.cm,
            n = t.display;
          e.updatedDisplay && Lr(t),
            (e.barMeasure = Ir(t)),
            n.maxLineChanged &&
              !t.options.lineWrapping &&
              ((e.adjustWidthTo =
                On(t, n.maxLine, n.maxLine.text.length).left + 3),
              (t.display.sizerWidth = e.adjustWidthTo),
              (e.barMeasure.scrollWidth = Math.max(
                n.scroller.clientWidth,
                n.sizer.offsetLeft +
                  e.adjustWidthTo +
                  Ln(t) +
                  t.display.barWidth
              )),
              (e.maxScrollLeft = Math.max(
                0,
                n.sizer.offsetLeft + e.adjustWidthTo - Mn(t)
              ))),
            (e.updatedDisplay || e.selectionChanged) &&
              (e.preparedSelection = n.input.prepareSelection());
        }
        function Qr(e) {
          var t = e.cm;
          null != e.adjustWidthTo &&
            ((t.display.sizer.style.minWidth = e.adjustWidthTo + "px"),
            e.maxScrollLeft < t.doc.scrollLeft &&
              Dr(
                t,
                Math.min(t.display.scroller.scrollLeft, e.maxScrollLeft),
                !0
              ),
            (t.display.maxLineChanged = !1));
          var n = e.focus && e.focus == $();
          e.preparedSelection &&
            t.display.input.showSelection(e.preparedSelection, n),
            (e.updatedDisplay || e.startHeight != t.doc.height) &&
              Rr(t, e.barMeasure),
            e.updatedDisplay && ui(t, e.barMeasure),
            e.selectionChanged && wr(t),
            t.state.focused && e.updateInput && t.display.input.reset(e.typing),
            n && kr(e.cm);
        }
        function Zr(e) {
          var t = e.cm,
            n = t.display,
            r = t.doc;
          e.updatedDisplay && si(t, e.update),
            null == n.wheelStartX ||
              (null == e.scrollTop && null == e.scrollLeft && !e.scrollToPos) ||
              (n.wheelStartX = n.wheelStartY = null),
            null != e.scrollTop && Pr(t, e.scrollTop, e.forceScroll),
            null != e.scrollLeft && Dr(t, e.scrollLeft, !0, !0),
            e.scrollToPos &&
              (function (e, t) {
                if (!me(e, "scrollCursorIntoView")) {
                  var n = e.display,
                    r = n.sizer.getBoundingClientRect(),
                    i = null;
                  if (
                    (t.top + r.top < 0
                      ? (i = !0)
                      : t.bottom + r.top >
                          (window.innerHeight ||
                            document.documentElement.clientHeight) && (i = !1),
                    null != i && !h)
                  ) {
                    var o = A(
                      "div",
                      "​",
                      null,
                      "position: absolute;\n                         top: " +
                        (t.top - n.viewOffset - Cn(e.display)) +
                        "px;\n                         height: " +
                        (t.bottom - t.top + Ln(e) + n.barHeight) +
                        "px;\n                         left: " +
                        t.left +
                        "px; width: " +
                        Math.max(2, t.right - t.left) +
                        "px;"
                    );
                    e.display.lineSpace.appendChild(o),
                      o.scrollIntoView(i),
                      e.display.lineSpace.removeChild(o);
                  }
                }
              })(
                t,
                (function (e, t, n, r) {
                  var i;
                  null == r && (r = 0),
                    e.options.lineWrapping ||
                      t != n ||
                      (n =
                        "before" ==
                        (t = t.ch
                          ? et(
                              t.line,
                              "before" == t.sticky ? t.ch - 1 : t.ch,
                              "after"
                            )
                          : t).sticky
                          ? et(t.line, t.ch + 1, "before")
                          : t);
                  for (var o = 0; o < 5; o++) {
                    var a = !1,
                      s = Gn(e, t),
                      l = n && n != t ? Gn(e, n) : s,
                      c = Ar(
                        e,
                        (i = {
                          left: Math.min(s.left, l.left),
                          top: Math.min(s.top, l.top) - r,
                          right: Math.max(s.left, l.left),
                          bottom: Math.max(s.bottom, l.bottom) + r,
                        })
                      ),
                      u = e.doc.scrollTop,
                      f = e.doc.scrollLeft;
                    if (
                      (null != c.scrollTop &&
                        (Fr(e, c.scrollTop),
                        Math.abs(e.doc.scrollTop - u) > 1 && (a = !0)),
                      null != c.scrollLeft &&
                        (Dr(e, c.scrollLeft),
                        Math.abs(e.doc.scrollLeft - f) > 1 && (a = !0)),
                      !a)
                    )
                      break;
                  }
                  return i;
                })(
                  t,
                  st(r, e.scrollToPos.from),
                  st(r, e.scrollToPos.to),
                  e.scrollToPos.margin
                )
              );
          var i = e.maybeHiddenMarkers,
            o = e.maybeUnhiddenMarkers;
          if (i)
            for (var a = 0; a < i.length; ++a)
              i[a].lines.length || he(i[a], "hide");
          if (o)
            for (var s = 0; s < o.length; ++s)
              o[s].lines.length && he(o[s], "unhide");
          n.wrapper.offsetHeight &&
            (r.scrollTop = t.display.scroller.scrollTop),
            e.changeObjs && he(t, "changes", t, e.changeObjs),
            e.update && e.update.finish();
        }
        function Jr(e, t) {
          if (e.curOp) return t();
          Kr(e);
          try {
            return t();
          } finally {
            Gr(e);
          }
        }
        function ei(e, t) {
          return function () {
            if (e.curOp) return t.apply(e, arguments);
            Kr(e);
            try {
              return t.apply(e, arguments);
            } finally {
              Gr(e);
            }
          };
        }
        function ti(e) {
          return function () {
            if (this.curOp) return e.apply(this, arguments);
            Kr(this);
            try {
              return e.apply(this, arguments);
            } finally {
              Gr(this);
            }
          };
        }
        function ni(e) {
          return function () {
            var t = this.cm;
            if (!t || t.curOp) return e.apply(this, arguments);
            Kr(t);
            try {
              return e.apply(this, arguments);
            } finally {
              Gr(t);
            }
          };
        }
        function ri(e, t) {
          e.doc.highlightFrontier < e.display.viewTo &&
            e.state.highlight.set(t, P(ii, e));
        }
        function ii(e) {
          var t = e.doc;
          if (!(t.highlightFrontier >= e.display.viewTo)) {
            var n = +new Date() + e.options.workTime,
              r = dt(e, t.highlightFrontier),
              i = [];
            t.iter(
              r.line,
              Math.min(t.first + t.size, e.display.viewTo + 500),
              function (o) {
                if (r.line >= e.display.viewFrom) {
                  var a = o.styles,
                    s =
                      o.text.length > e.options.maxHighlightLength
                        ? Be(t.mode, r.state)
                        : null,
                    l = ft(e, o, r, !0);
                  s && (r.state = s), (o.styles = l.styles);
                  var c = o.styleClasses,
                    u = l.classes;
                  u ? (o.styleClasses = u) : c && (o.styleClasses = null);
                  for (
                    var f =
                        !a ||
                        a.length != o.styles.length ||
                        (c != u &&
                          (!c ||
                            !u ||
                            c.bgClass != u.bgClass ||
                            c.textClass != u.textClass)),
                      p = 0;
                    !f && p < a.length;
                    ++p
                  )
                    f = a[p] != o.styles[p];
                  f && i.push(r.line), (o.stateAfter = r.save()), r.nextLine();
                } else
                  o.text.length <= e.options.maxHighlightLength &&
                    ht(e, o.text, r),
                    (o.stateAfter = r.line % 5 == 0 ? r.save() : null),
                    r.nextLine();
                if (+new Date() > n) return ri(e, e.options.workDelay), !0;
              }
            ),
              (t.highlightFrontier = r.line),
              (t.modeFrontier = Math.max(t.modeFrontier, r.line)),
              i.length &&
                Jr(e, function () {
                  for (var t = 0; t < i.length; t++) pr(e, i[t], "text");
                });
          }
        }
        var oi = function (e, t, n) {
          var r = e.display;
          (this.viewport = t),
            (this.visible = Nr(r, e.doc, t)),
            (this.editorIsHidden = !r.wrapper.offsetWidth),
            (this.wrapperHeight = r.wrapper.clientHeight),
            (this.wrapperWidth = r.wrapper.clientWidth),
            (this.oldDisplayWidth = Mn(e)),
            (this.force = n),
            (this.dims = or(e)),
            (this.events = []);
        };
        function ai(e, t) {
          var n = e.display,
            r = e.doc;
          if (t.editorIsHidden) return dr(e), !1;
          if (
            !t.force &&
            t.visible.from >= n.viewFrom &&
            t.visible.to <= n.viewTo &&
            (null == n.updateLineNumbers || n.updateLineNumbers >= n.viewTo) &&
            n.renderedView == n.view &&
            0 == mr(e)
          )
            return !1;
          pi(e) && (dr(e), (t.dims = or(e)));
          var i = r.first + r.size,
            o = Math.max(t.visible.from - e.options.viewportMargin, r.first),
            a = Math.min(i, t.visible.to + e.options.viewportMargin);
          n.viewFrom < o &&
            o - n.viewFrom < 20 &&
            (o = Math.max(r.first, n.viewFrom)),
            n.viewTo > a && n.viewTo - a < 20 && (a = Math.min(i, n.viewTo)),
            kt && ((o = jt(e.doc, o)), (a = Ht(e.doc, a)));
          var s =
            o != n.viewFrom ||
            a != n.viewTo ||
            n.lastWrapHeight != t.wrapperHeight ||
            n.lastWrapWidth != t.wrapperWidth;
          !(function (e, t, n) {
            var r = e.display;
            0 == r.view.length || t >= r.viewTo || n <= r.viewFrom
              ? ((r.view = on(e, t, n)), (r.viewFrom = t))
              : (r.viewFrom > t
                  ? (r.view = on(e, t, r.viewFrom).concat(r.view))
                  : r.viewFrom < t && (r.view = r.view.slice(ur(e, t))),
                (r.viewFrom = t),
                r.viewTo < n
                  ? (r.view = r.view.concat(on(e, r.viewTo, n)))
                  : r.viewTo > n && (r.view = r.view.slice(0, ur(e, n)))),
              (r.viewTo = n);
          })(e, o, a),
            (n.viewOffset = qt(Ke(e.doc, n.viewFrom))),
            (e.display.mover.style.top = n.viewOffset + "px");
          var c = mr(e);
          if (
            !s &&
            0 == c &&
            !t.force &&
            n.renderedView == n.view &&
            (null == n.updateLineNumbers || n.updateLineNumbers >= n.viewTo)
          )
            return !1;
          var u = (function (e) {
            if (e.hasFocus()) return null;
            var t = $();
            if (!t || !E(e.display.lineDiv, t)) return null;
            var n = { activeElt: t };
            if (window.getSelection) {
              var r = window.getSelection();
              r.anchorNode &&
                r.extend &&
                E(e.display.lineDiv, r.anchorNode) &&
                ((n.anchorNode = r.anchorNode),
                (n.anchorOffset = r.anchorOffset),
                (n.focusNode = r.focusNode),
                (n.focusOffset = r.focusOffset));
            }
            return n;
          })(e);
          return (
            c > 4 && (n.lineDiv.style.display = "none"),
            (function (e, t, n) {
              var r = e.display,
                i = e.options.lineNumbers,
                o = r.lineDiv,
                a = o.firstChild;
              function s(t) {
                var n = t.nextSibling;
                return (
                  l && b && e.display.currentWheelTarget == t
                    ? (t.style.display = "none")
                    : t.parentNode.removeChild(t),
                  n
                );
              }
              for (var c = r.view, u = r.viewFrom, f = 0; f < c.length; f++) {
                var p = c[f];
                if (p.hidden);
                else if (p.node && p.node.parentNode == o) {
                  for (; a != p.node; ) a = s(a);
                  var d = i && null != t && t <= u && p.lineNumber;
                  p.changes &&
                    (H(p.changes, "gutter") > -1 && (d = !1), un(e, p, u, n)),
                    d &&
                      (M(p.lineNumber),
                      p.lineNumber.appendChild(
                        document.createTextNode(Je(e.options, u))
                      )),
                    (a = p.node.nextSibling);
                } else {
                  var h = vn(e, p, u, n);
                  o.insertBefore(h, a);
                }
                u += p.size;
              }
              for (; a; ) a = s(a);
            })(e, n.updateLineNumbers, t.dims),
            c > 4 && (n.lineDiv.style.display = ""),
            (n.renderedView = n.view),
            (function (e) {
              if (
                e &&
                e.activeElt &&
                e.activeElt != $() &&
                (e.activeElt.focus(),
                !/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName) &&
                  e.anchorNode &&
                  E(document.body, e.anchorNode) &&
                  E(document.body, e.focusNode))
              ) {
                var t = window.getSelection(),
                  n = document.createRange();
                n.setEnd(e.anchorNode, e.anchorOffset),
                  n.collapse(!1),
                  t.removeAllRanges(),
                  t.addRange(n),
                  t.extend(e.focusNode, e.focusOffset);
              }
            })(u),
            M(n.cursorDiv),
            M(n.selectionDiv),
            (n.gutters.style.height = n.sizer.style.minHeight = 0),
            s &&
              ((n.lastWrapHeight = t.wrapperHeight),
              (n.lastWrapWidth = t.wrapperWidth),
              ri(e, 400)),
            (n.updateLineNumbers = null),
            !0
          );
        }
        function si(e, t) {
          for (var n = t.viewport, r = !0; ; r = !1) {
            if (r && e.options.lineWrapping && t.oldDisplayWidth != Mn(e))
              r && (t.visible = Nr(e.display, e.doc, n));
            else if (
              (n &&
                null != n.top &&
                (n = {
                  top: Math.min(e.doc.height + Sn(e.display) - Nn(e), n.top),
                }),
              (t.visible = Nr(e.display, e.doc, n)),
              t.visible.from >= e.display.viewFrom &&
                t.visible.to <= e.display.viewTo)
            )
              break;
            if (!ai(e, t)) break;
            Lr(e);
            var i = Ir(e);
            gr(e), Rr(e, i), ui(e, i), (t.force = !1);
          }
          t.signal(e, "update", e),
            (e.display.viewFrom == e.display.reportedViewFrom &&
              e.display.viewTo == e.display.reportedViewTo) ||
              (t.signal(
                e,
                "viewportChange",
                e,
                e.display.viewFrom,
                e.display.viewTo
              ),
              (e.display.reportedViewFrom = e.display.viewFrom),
              (e.display.reportedViewTo = e.display.viewTo));
        }
        function li(e, t) {
          var n = new oi(e, t);
          if (ai(e, n)) {
            Lr(e), si(e, n);
            var r = Ir(e);
            gr(e), Rr(e, r), ui(e, r), n.finish();
          }
        }
        function ci(e) {
          var t = e.gutters.offsetWidth;
          e.sizer.style.marginLeft = t + "px";
        }
        function ui(e, t) {
          (e.display.sizer.style.minHeight = t.docHeight + "px"),
            (e.display.heightForcer.style.top = t.docHeight + "px"),
            (e.display.gutters.style.height =
              t.docHeight + e.display.barHeight + Ln(e) + "px");
        }
        function fi(e) {
          var t = e.display,
            n = t.view;
          if (
            t.alignWidgets ||
            (t.gutters.firstChild && e.options.fixedGutter)
          ) {
            for (
              var r = ar(t) - t.scroller.scrollLeft + e.doc.scrollLeft,
                i = t.gutters.offsetWidth,
                o = r + "px",
                a = 0;
              a < n.length;
              a++
            )
              if (!n[a].hidden) {
                e.options.fixedGutter &&
                  (n[a].gutter && (n[a].gutter.style.left = o),
                  n[a].gutterBackground &&
                    (n[a].gutterBackground.style.left = o));
                var s = n[a].alignable;
                if (s) for (var l = 0; l < s.length; l++) s[l].style.left = o;
              }
            e.options.fixedGutter && (t.gutters.style.left = r + i + "px");
          }
        }
        function pi(e) {
          if (!e.options.lineNumbers) return !1;
          var t = e.doc,
            n = Je(e.options, t.first + t.size - 1),
            r = e.display;
          if (n.length != r.lineNumChars) {
            var i = r.measure.appendChild(
                A(
                  "div",
                  [A("div", n)],
                  "CodeMirror-linenumber CodeMirror-gutter-elt"
                )
              ),
              o = i.firstChild.offsetWidth,
              a = i.offsetWidth - o;
            return (
              (r.lineGutter.style.width = ""),
              (r.lineNumInnerWidth =
                Math.max(o, r.lineGutter.offsetWidth - a) + 1),
              (r.lineNumWidth = r.lineNumInnerWidth + a),
              (r.lineNumChars = r.lineNumInnerWidth ? n.length : -1),
              (r.lineGutter.style.width = r.lineNumWidth + "px"),
              ci(e.display),
              !0
            );
          }
          return !1;
        }
        function di(e, t) {
          for (var n = [], r = !1, i = 0; i < e.length; i++) {
            var o = e[i],
              a = null;
            if (
              ("string" != typeof o && ((a = o.style), (o = o.className)),
              "CodeMirror-linenumbers" == o)
            ) {
              if (!t) continue;
              r = !0;
            }
            n.push({ className: o, style: a });
          }
          return (
            t &&
              !r &&
              n.push({ className: "CodeMirror-linenumbers", style: null }),
            n
          );
        }
        function hi(e) {
          var t = e.gutters,
            n = e.gutterSpecs;
          M(t), (e.lineGutter = null);
          for (var r = 0; r < n.length; ++r) {
            var i = n[r],
              o = i.className,
              a = i.style,
              s = t.appendChild(A("div", null, "CodeMirror-gutter " + o));
            a && (s.style.cssText = a),
              "CodeMirror-linenumbers" == o &&
                ((e.lineGutter = s),
                (s.style.width = (e.lineNumWidth || 1) + "px"));
          }
          (t.style.display = n.length ? "" : "none"), ci(e);
        }
        function mi(e) {
          hi(e.display), fr(e), fi(e);
        }
        function gi(e, t, r, i) {
          var o = this;
          (this.input = r),
            (o.scrollbarFiller = A("div", null, "CodeMirror-scrollbar-filler")),
            o.scrollbarFiller.setAttribute("cm-not-content", "true"),
            (o.gutterFiller = A("div", null, "CodeMirror-gutter-filler")),
            o.gutterFiller.setAttribute("cm-not-content", "true"),
            (o.lineDiv = O("div", null, "CodeMirror-code")),
            (o.selectionDiv = A(
              "div",
              null,
              null,
              "position: relative; z-index: 1"
            )),
            (o.cursorDiv = A("div", null, "CodeMirror-cursors")),
            (o.measure = A("div", null, "CodeMirror-measure")),
            (o.lineMeasure = A("div", null, "CodeMirror-measure")),
            (o.lineSpace = O(
              "div",
              [
                o.measure,
                o.lineMeasure,
                o.selectionDiv,
                o.cursorDiv,
                o.lineDiv,
              ],
              null,
              "position: relative; outline: none"
            ));
          var c = O("div", [o.lineSpace], "CodeMirror-lines");
          (o.mover = A("div", [c], null, "position: relative")),
            (o.sizer = A("div", [o.mover], "CodeMirror-sizer")),
            (o.sizerWidth = null),
            (o.heightForcer = A(
              "div",
              null,
              null,
              "position: absolute; height: 50px; width: 1px;"
            )),
            (o.gutters = A("div", null, "CodeMirror-gutters")),
            (o.lineGutter = null),
            (o.scroller = A(
              "div",
              [o.sizer, o.heightForcer, o.gutters],
              "CodeMirror-scroll"
            )),
            o.scroller.setAttribute("tabIndex", "-1"),
            (o.wrapper = A(
              "div",
              [o.scrollbarFiller, o.gutterFiller, o.scroller],
              "CodeMirror"
            )),
            a &&
              s < 8 &&
              ((o.gutters.style.zIndex = -1),
              (o.scroller.style.paddingRight = 0)),
            l || (n && v) || (o.scroller.draggable = !0),
            e && (e.appendChild ? e.appendChild(o.wrapper) : e(o.wrapper)),
            (o.viewFrom = o.viewTo = t.first),
            (o.reportedViewFrom = o.reportedViewTo = t.first),
            (o.view = []),
            (o.renderedView = null),
            (o.externalMeasured = null),
            (o.viewOffset = 0),
            (o.lastWrapHeight = o.lastWrapWidth = 0),
            (o.updateLineNumbers = null),
            (o.nativeBarWidth = o.barHeight = o.barWidth = 0),
            (o.scrollbarsClipped = !1),
            (o.lineNumWidth = o.lineNumInnerWidth = o.lineNumChars = null),
            (o.alignWidgets = !1),
            (o.cachedCharWidth = o.cachedTextHeight = o.cachedPaddingH = null),
            (o.maxLine = null),
            (o.maxLineLength = 0),
            (o.maxLineChanged = !1),
            (o.wheelDX = o.wheelDY = o.wheelStartX = o.wheelStartY = null),
            (o.shift = !1),
            (o.selForContextMenu = null),
            (o.activeTouch = null),
            (o.gutterSpecs = di(i.gutters, i.lineNumbers)),
            hi(o),
            r.init(o);
        }
        (oi.prototype.signal = function (e, t) {
          ve(e, t) && this.events.push(arguments);
        }),
          (oi.prototype.finish = function () {
            for (var e = 0; e < this.events.length; e++)
              he.apply(null, this.events[e]);
          });
        var vi = 0,
          bi = null;
        function yi(e) {
          var t = e.wheelDeltaX,
            n = e.wheelDeltaY;
          return (
            null == t &&
              e.detail &&
              e.axis == e.HORIZONTAL_AXIS &&
              (t = e.detail),
            null == n && e.detail && e.axis == e.VERTICAL_AXIS
              ? (n = e.detail)
              : null == n && (n = e.wheelDelta),
            { x: t, y: n }
          );
        }
        function xi(e) {
          var t = yi(e);
          return (t.x *= bi), (t.y *= bi), t;
        }
        function wi(e, t) {
          var r = yi(t),
            i = r.x,
            o = r.y,
            a = e.display,
            s = a.scroller,
            c = s.scrollWidth > s.clientWidth,
            u = s.scrollHeight > s.clientHeight;
          if ((i && c) || (o && u)) {
            if (o && b && l)
              e: for (var p = t.target, d = a.view; p != s; p = p.parentNode)
                for (var h = 0; h < d.length; h++)
                  if (d[h].node == p) {
                    e.display.currentWheelTarget = p;
                    break e;
                  }
            if (i && !n && !f && null != bi)
              return (
                o && u && Fr(e, Math.max(0, s.scrollTop + o * bi)),
                Dr(e, Math.max(0, s.scrollLeft + i * bi)),
                (!o || (o && u)) && ye(t),
                void (a.wheelStartX = null)
              );
            if (o && null != bi) {
              var m = o * bi,
                g = e.doc.scrollTop,
                v = g + a.wrapper.clientHeight;
              m < 0
                ? (g = Math.max(0, g + m - 50))
                : (v = Math.min(e.doc.height, v + m + 50)),
                li(e, { top: g, bottom: v });
            }
            vi < 20 &&
              (null == a.wheelStartX
                ? ((a.wheelStartX = s.scrollLeft),
                  (a.wheelStartY = s.scrollTop),
                  (a.wheelDX = i),
                  (a.wheelDY = o),
                  setTimeout(function () {
                    if (null != a.wheelStartX) {
                      var e = s.scrollLeft - a.wheelStartX,
                        t = s.scrollTop - a.wheelStartY,
                        n =
                          (t && a.wheelDY && t / a.wheelDY) ||
                          (e && a.wheelDX && e / a.wheelDX);
                      (a.wheelStartX = a.wheelStartY = null),
                        n && ((bi = (bi * vi + n) / (vi + 1)), ++vi);
                    }
                  }, 200))
                : ((a.wheelDX += i), (a.wheelDY += o)));
          }
        }
        a ? (bi = -0.53) : n ? (bi = 15) : u ? (bi = -0.7) : p && (bi = -1 / 3);
        var ki = function (e, t) {
          (this.ranges = e), (this.primIndex = t);
        };
        (ki.prototype.primary = function () {
          return this.ranges[this.primIndex];
        }),
          (ki.prototype.equals = function (e) {
            if (e == this) return !0;
            if (
              e.primIndex != this.primIndex ||
              e.ranges.length != this.ranges.length
            )
              return !1;
            for (var t = 0; t < this.ranges.length; t++) {
              var n = this.ranges[t],
                r = e.ranges[t];
              if (!nt(n.anchor, r.anchor) || !nt(n.head, r.head)) return !1;
            }
            return !0;
          }),
          (ki.prototype.deepCopy = function () {
            for (var e = [], t = 0; t < this.ranges.length; t++)
              e[t] = new Ci(rt(this.ranges[t].anchor), rt(this.ranges[t].head));
            return new ki(e, this.primIndex);
          }),
          (ki.prototype.somethingSelected = function () {
            for (var e = 0; e < this.ranges.length; e++)
              if (!this.ranges[e].empty()) return !0;
            return !1;
          }),
          (ki.prototype.contains = function (e, t) {
            t || (t = e);
            for (var n = 0; n < this.ranges.length; n++) {
              var r = this.ranges[n];
              if (tt(t, r.from()) >= 0 && tt(e, r.to()) <= 0) return n;
            }
            return -1;
          });
        var Ci = function (e, t) {
          (this.anchor = e), (this.head = t);
        };
        function Si(e, t, n) {
          var r = e && e.options.selectionsMayTouch,
            i = t[n];
          t.sort(function (e, t) {
            return tt(e.from(), t.from());
          }),
            (n = H(t, i));
          for (var o = 1; o < t.length; o++) {
            var a = t[o],
              s = t[o - 1],
              l = tt(s.to(), a.from());
            if (r && !a.empty() ? l > 0 : l >= 0) {
              var c = ot(s.from(), a.from()),
                u = it(s.to(), a.to()),
                f = s.empty() ? a.from() == a.head : s.from() == s.head;
              o <= n && --n, t.splice(--o, 2, new Ci(f ? u : c, f ? c : u));
            }
          }
          return new ki(t, n);
        }
        function Ti(e, t) {
          return new ki([new Ci(e, t || e)], 0);
        }
        function Li(e) {
          return e.text
            ? et(
                e.from.line + e.text.length - 1,
                _(e.text).length + (1 == e.text.length ? e.from.ch : 0)
              )
            : e.to;
        }
        function Mi(e, t) {
          if (tt(e, t.from) < 0) return e;
          if (tt(e, t.to) <= 0) return Li(t);
          var n = e.line + t.text.length - (t.to.line - t.from.line) - 1,
            r = e.ch;
          return e.line == t.to.line && (r += Li(t).ch - t.to.ch), et(n, r);
        }
        function Ni(e, t) {
          for (var n = [], r = 0; r < e.sel.ranges.length; r++) {
            var i = e.sel.ranges[r];
            n.push(new Ci(Mi(i.anchor, t), Mi(i.head, t)));
          }
          return Si(e.cm, n, e.sel.primIndex);
        }
        function Ai(e, t, n) {
          return e.line == t.line
            ? et(n.line, e.ch - t.ch + n.ch)
            : et(n.line + (e.line - t.line), e.ch);
        }
        function Oi(e) {
          (e.doc.mode = je(e.options, e.doc.modeOption)), Ei(e);
        }
        function Ei(e) {
          e.doc.iter(function (e) {
            e.stateAfter && (e.stateAfter = null),
              e.styles && (e.styles = null);
          }),
            (e.doc.modeFrontier = e.doc.highlightFrontier = e.doc.first),
            ri(e, 100),
            e.state.modeGen++,
            e.curOp && fr(e);
        }
        function $i(e, t) {
          return (
            0 == t.from.ch &&
            0 == t.to.ch &&
            "" == _(t.text) &&
            (!e.cm || e.cm.options.wholeLineUpdateBefore)
          );
        }
        function zi(e, t, n, r) {
          function i(e) {
            return n ? n[e] : null;
          }
          function o(e, n, i) {
            !(function (e, t, n, r) {
              (e.text = t),
                e.stateAfter && (e.stateAfter = null),
                e.styles && (e.styles = null),
                null != e.order && (e.order = null),
                Nt(e),
                At(e, n);
              var i = r ? r(e) : 1;
              i != e.height && Xe(e, i);
            })(e, n, i, r),
              ln(e, "change", e, t);
          }
          function a(e, t) {
            for (var n = [], o = e; o < t; ++o) n.push(new Kt(c[o], i(o), r));
            return n;
          }
          var s = t.from,
            l = t.to,
            c = t.text,
            u = Ke(e, s.line),
            f = Ke(e, l.line),
            p = _(c),
            d = i(c.length - 1),
            h = l.line - s.line;
          if (t.full)
            e.insert(0, a(0, c.length)), e.remove(c.length, e.size - c.length);
          else if ($i(e, t)) {
            var m = a(0, c.length - 1);
            o(f, f.text, d),
              h && e.remove(s.line, h),
              m.length && e.insert(s.line, m);
          } else if (u == f)
            if (1 == c.length)
              o(u, u.text.slice(0, s.ch) + p + u.text.slice(l.ch), d);
            else {
              var g = a(1, c.length - 1);
              g.push(new Kt(p + u.text.slice(l.ch), d, r)),
                o(u, u.text.slice(0, s.ch) + c[0], i(0)),
                e.insert(s.line + 1, g);
            }
          else if (1 == c.length)
            o(u, u.text.slice(0, s.ch) + c[0] + f.text.slice(l.ch), i(0)),
              e.remove(s.line + 1, h);
          else {
            o(u, u.text.slice(0, s.ch) + c[0], i(0)),
              o(f, p + f.text.slice(l.ch), d);
            var v = a(1, c.length - 1);
            h > 1 && e.remove(s.line + 1, h - 1), e.insert(s.line + 1, v);
          }
          ln(e, "change", e, t);
        }
        function Wi(e, t, n) {
          !(function e(r, i, o) {
            if (r.linked)
              for (var a = 0; a < r.linked.length; ++a) {
                var s = r.linked[a];
                if (s.doc != i) {
                  var l = o && s.sharedHist;
                  (n && !l) || (t(s.doc, l), e(s.doc, r, l));
                }
              }
          })(e, null, !0);
        }
        function Fi(e, t) {
          if (t.cm) throw new Error("This document is already in use.");
          (e.doc = t),
            (t.cm = e),
            lr(e),
            Oi(e),
            Pi(e),
            e.options.lineWrapping || Ut(e),
            (e.options.mode = t.modeOption),
            fr(e);
        }
        function Pi(e) {
          ("rtl" == e.doc.direction ? z : L)(
            e.display.lineDiv,
            "CodeMirror-rtl"
          );
        }
        function Di(e) {
          (this.done = []),
            (this.undone = []),
            (this.undoDepth = 1 / 0),
            (this.lastModTime = this.lastSelTime = 0),
            (this.lastOp = this.lastSelOp = null),
            (this.lastOrigin = this.lastSelOrigin = null),
            (this.generation = this.maxGeneration = e || 1);
        }
        function Ii(e, t) {
          var n = { from: rt(t.from), to: Li(t), text: Ge(e, t.from, t.to) };
          return (
            qi(e, n, t.from.line, t.to.line + 1),
            Wi(
              e,
              function (e) {
                return qi(e, n, t.from.line, t.to.line + 1);
              },
              !0
            ),
            n
          );
        }
        function ji(e) {
          for (; e.length && _(e).ranges; ) e.pop();
        }
        function Hi(e, t, n, r) {
          var i = e.history;
          i.undone.length = 0;
          var o,
            a,
            s = +new Date();
          if (
            (i.lastOp == r ||
              (i.lastOrigin == t.origin &&
                t.origin &&
                (("+" == t.origin.charAt(0) &&
                  i.lastModTime >
                    s - (e.cm ? e.cm.options.historyEventDelay : 500)) ||
                  "*" == t.origin.charAt(0)))) &&
            (o = (function (e, t) {
              return t
                ? (ji(e.done), _(e.done))
                : e.done.length && !_(e.done).ranges
                ? _(e.done)
                : e.done.length > 1 && !e.done[e.done.length - 2].ranges
                ? (e.done.pop(), _(e.done))
                : void 0;
            })(i, i.lastOp == r))
          )
            (a = _(o.changes)),
              0 == tt(t.from, t.to) && 0 == tt(t.from, a.to)
                ? (a.to = Li(t))
                : o.changes.push(Ii(e, t));
          else {
            var l = _(i.done);
            for (
              (l && l.ranges) || Bi(e.sel, i.done),
                o = { changes: [Ii(e, t)], generation: i.generation },
                i.done.push(o);
              i.done.length > i.undoDepth;
            )
              i.done.shift(), i.done[0].ranges || i.done.shift();
          }
          i.done.push(n),
            (i.generation = ++i.maxGeneration),
            (i.lastModTime = i.lastSelTime = s),
            (i.lastOp = i.lastSelOp = r),
            (i.lastOrigin = i.lastSelOrigin = t.origin),
            a || he(e, "historyAdded");
        }
        function Ri(e, t, n, r) {
          var i = e.history,
            o = r && r.origin;
          n == i.lastSelOp ||
          (o &&
            i.lastSelOrigin == o &&
            ((i.lastModTime == i.lastSelTime && i.lastOrigin == o) ||
              (function (e, t, n, r) {
                var i = t.charAt(0);
                return (
                  "*" == i ||
                  ("+" == i &&
                    n.ranges.length == r.ranges.length &&
                    n.somethingSelected() == r.somethingSelected() &&
                    new Date() - e.history.lastSelTime <=
                      (e.cm ? e.cm.options.historyEventDelay : 500))
                );
              })(e, o, _(i.done), t)))
            ? (i.done[i.done.length - 1] = t)
            : Bi(t, i.done),
            (i.lastSelTime = +new Date()),
            (i.lastSelOrigin = o),
            (i.lastSelOp = n),
            r && !1 !== r.clearRedo && ji(i.undone);
        }
        function Bi(e, t) {
          var n = _(t);
          (n && n.ranges && n.equals(e)) || t.push(e);
        }
        function qi(e, t, n, r) {
          var i = t["spans_" + e.id],
            o = 0;
          e.iter(
            Math.max(e.first, n),
            Math.min(e.first + e.size, r),
            function (n) {
              n.markedSpans &&
                ((i || (i = t["spans_" + e.id] = {}))[o] = n.markedSpans),
                ++o;
            }
          );
        }
        function Vi(e) {
          if (!e) return null;
          for (var t, n = 0; n < e.length; ++n)
            e[n].marker.explicitlyCleared
              ? t || (t = e.slice(0, n))
              : t && t.push(e[n]);
          return t ? (t.length ? t : null) : e;
        }
        function Ui(e, t) {
          var n = (function (e, t) {
              var n = t["spans_" + e.id];
              if (!n) return null;
              for (var r = [], i = 0; i < t.text.length; ++i) r.push(Vi(n[i]));
              return r;
            })(e, t),
            r = Lt(e, t);
          if (!n) return r;
          if (!r) return n;
          for (var i = 0; i < n.length; ++i) {
            var o = n[i],
              a = r[i];
            if (o && a)
              e: for (var s = 0; s < a.length; ++s) {
                for (var l = a[s], c = 0; c < o.length; ++c)
                  if (o[c].marker == l.marker) continue e;
                o.push(l);
              }
            else a && (n[i] = a);
          }
          return n;
        }
        function Ki(e, t, n) {
          for (var r = [], i = 0; i < e.length; ++i) {
            var o = e[i];
            if (o.ranges) r.push(n ? ki.prototype.deepCopy.call(o) : o);
            else {
              var a = o.changes,
                s = [];
              r.push({ changes: s });
              for (var l = 0; l < a.length; ++l) {
                var c = a[l],
                  u = void 0;
                if ((s.push({ from: c.from, to: c.to, text: c.text }), t))
                  for (var f in c)
                    (u = f.match(/^spans_(\d+)$/)) &&
                      H(t, Number(u[1])) > -1 &&
                      ((_(s)[f] = c[f]), delete c[f]);
              }
            }
          }
          return r;
        }
        function Gi(e, t, n, r) {
          if (r) {
            var i = e.anchor;
            if (n) {
              var o = tt(t, i) < 0;
              o != tt(n, i) < 0
                ? ((i = t), (t = n))
                : o != tt(t, n) < 0 && (t = n);
            }
            return new Ci(i, t);
          }
          return new Ci(n || t, t);
        }
        function _i(e, t, n, r, i) {
          null == i && (i = e.cm && (e.cm.display.shift || e.extend)),
            Ji(e, new ki([Gi(e.sel.primary(), t, n, i)], 0), r);
        }
        function Xi(e, t, n) {
          for (
            var r = [], i = e.cm && (e.cm.display.shift || e.extend), o = 0;
            o < e.sel.ranges.length;
            o++
          )
            r[o] = Gi(e.sel.ranges[o], t[o], null, i);
          Ji(e, Si(e.cm, r, e.sel.primIndex), n);
        }
        function Yi(e, t, n, r) {
          var i = e.sel.ranges.slice(0);
          (i[t] = n), Ji(e, Si(e.cm, i, e.sel.primIndex), r);
        }
        function Qi(e, t, n, r) {
          Ji(e, Ti(t, n), r);
        }
        function Zi(e, t, n) {
          var r = e.history.done,
            i = _(r);
          i && i.ranges ? ((r[r.length - 1] = t), eo(e, t, n)) : Ji(e, t, n);
        }
        function Ji(e, t, n) {
          eo(e, t, n), Ri(e, e.sel, e.cm ? e.cm.curOp.id : NaN, n);
        }
        function eo(e, t, n) {
          (ve(e, "beforeSelectionChange") ||
            (e.cm && ve(e.cm, "beforeSelectionChange"))) &&
            (t = (function (e, t, n) {
              var r = {
                ranges: t.ranges,
                update: function (t) {
                  this.ranges = [];
                  for (var n = 0; n < t.length; n++)
                    this.ranges[n] = new Ci(
                      st(e, t[n].anchor),
                      st(e, t[n].head)
                    );
                },
                origin: n && n.origin,
              };
              return (
                he(e, "beforeSelectionChange", e, r),
                e.cm && he(e.cm, "beforeSelectionChange", e.cm, r),
                r.ranges != t.ranges
                  ? Si(e.cm, r.ranges, r.ranges.length - 1)
                  : t
              );
            })(e, t, n));
          var r =
            (n && n.bias) ||
            (tt(t.primary().head, e.sel.primary().head) < 0 ? -1 : 1);
          to(e, ro(e, t, r, !0)), (n && !1 === n.scroll) || !e.cm || Er(e.cm);
        }
        function to(e, t) {
          t.equals(e.sel) ||
            ((e.sel = t),
            e.cm &&
              ((e.cm.curOp.updateInput = 1),
              (e.cm.curOp.selectionChanged = !0),
              ge(e.cm)),
            ln(e, "cursorActivity", e));
        }
        function no(e) {
          to(e, ro(e, e.sel, null, !1));
        }
        function ro(e, t, n, r) {
          for (var i, o = 0; o < t.ranges.length; o++) {
            var a = t.ranges[o],
              s = t.ranges.length == e.sel.ranges.length && e.sel.ranges[o],
              l = oo(e, a.anchor, s && s.anchor, n, r),
              c = oo(e, a.head, s && s.head, n, r);
            (i || l != a.anchor || c != a.head) &&
              (i || (i = t.ranges.slice(0, o)), (i[o] = new Ci(l, c)));
          }
          return i ? Si(e.cm, i, t.primIndex) : t;
        }
        function io(e, t, n, r, i) {
          var o = Ke(e, t.line);
          if (o.markedSpans)
            for (var a = 0; a < o.markedSpans.length; ++a) {
              var s = o.markedSpans[a],
                l = s.marker,
                c = "selectLeft" in l ? !l.selectLeft : l.inclusiveLeft,
                u = "selectRight" in l ? !l.selectRight : l.inclusiveRight;
              if (
                (null == s.from || (c ? s.from <= t.ch : s.from < t.ch)) &&
                (null == s.to || (u ? s.to >= t.ch : s.to > t.ch))
              ) {
                if (i && (he(l, "beforeCursorEnter"), l.explicitlyCleared)) {
                  if (o.markedSpans) {
                    --a;
                    continue;
                  }
                  break;
                }
                if (!l.atomic) continue;
                if (n) {
                  var f = l.find(r < 0 ? 1 : -1),
                    p = void 0;
                  if (
                    ((r < 0 ? u : c) &&
                      (f = ao(e, f, -r, f && f.line == t.line ? o : null)),
                    f &&
                      f.line == t.line &&
                      (p = tt(f, n)) &&
                      (r < 0 ? p < 0 : p > 0))
                  )
                    return io(e, f, t, r, i);
                }
                var d = l.find(r < 0 ? -1 : 1);
                return (
                  (r < 0 ? c : u) &&
                    (d = ao(e, d, r, d.line == t.line ? o : null)),
                  d ? io(e, d, t, r, i) : null
                );
              }
            }
          return t;
        }
        function oo(e, t, n, r, i) {
          var o = r || 1,
            a =
              io(e, t, n, o, i) ||
              (!i && io(e, t, n, o, !0)) ||
              io(e, t, n, -o, i) ||
              (!i && io(e, t, n, -o, !0));
          return a || ((e.cantEdit = !0), et(e.first, 0));
        }
        function ao(e, t, n, r) {
          return n < 0 && 0 == t.ch
            ? t.line > e.first
              ? st(e, et(t.line - 1))
              : null
            : n > 0 && t.ch == (r || Ke(e, t.line)).text.length
            ? t.line < e.first + e.size - 1
              ? et(t.line + 1, 0)
              : null
            : new et(t.line, t.ch + n);
        }
        function so(e) {
          e.setSelection(et(e.firstLine(), 0), et(e.lastLine()), B);
        }
        function lo(e, t, n) {
          var r = {
            canceled: !1,
            from: t.from,
            to: t.to,
            text: t.text,
            origin: t.origin,
            cancel: function () {
              return (r.canceled = !0);
            },
          };
          return (
            n &&
              (r.update = function (t, n, i, o) {
                t && (r.from = st(e, t)),
                  n && (r.to = st(e, n)),
                  i && (r.text = i),
                  void 0 !== o && (r.origin = o);
              }),
            he(e, "beforeChange", e, r),
            e.cm && he(e.cm, "beforeChange", e.cm, r),
            r.canceled
              ? (e.cm && (e.cm.curOp.updateInput = 2), null)
              : { from: r.from, to: r.to, text: r.text, origin: r.origin }
          );
        }
        function co(e, t, n) {
          if (e.cm) {
            if (!e.cm.curOp) return ei(e.cm, co)(e, t, n);
            if (e.cm.state.suppressEdits) return;
          }
          if (
            !(ve(e, "beforeChange") || (e.cm && ve(e.cm, "beforeChange"))) ||
            (t = lo(e, t, !0))
          ) {
            var r =
              wt &&
              !n &&
              (function (e, t, n) {
                var r = null;
                if (
                  (e.iter(t.line, n.line + 1, function (e) {
                    if (e.markedSpans)
                      for (var t = 0; t < e.markedSpans.length; ++t) {
                        var n = e.markedSpans[t].marker;
                        !n.readOnly ||
                          (r && -1 != H(r, n)) ||
                          (r || (r = [])).push(n);
                      }
                  }),
                  !r)
                )
                  return null;
                for (var i = [{ from: t, to: n }], o = 0; o < r.length; ++o)
                  for (var a = r[o], s = a.find(0), l = 0; l < i.length; ++l) {
                    var c = i[l];
                    if (!(tt(c.to, s.from) < 0 || tt(c.from, s.to) > 0)) {
                      var u = [l, 1],
                        f = tt(c.from, s.from),
                        p = tt(c.to, s.to);
                      (f < 0 || (!a.inclusiveLeft && !f)) &&
                        u.push({ from: c.from, to: s.from }),
                        (p > 0 || (!a.inclusiveRight && !p)) &&
                          u.push({ from: s.to, to: c.to }),
                        i.splice.apply(i, u),
                        (l += u.length - 3);
                    }
                  }
                return i;
              })(e, t.from, t.to);
            if (r)
              for (var i = r.length - 1; i >= 0; --i)
                uo(e, {
                  from: r[i].from,
                  to: r[i].to,
                  text: i ? [""] : t.text,
                  origin: t.origin,
                });
            else uo(e, t);
          }
        }
        function uo(e, t) {
          if (1 != t.text.length || "" != t.text[0] || 0 != tt(t.from, t.to)) {
            var n = Ni(e, t);
            Hi(e, t, n, e.cm ? e.cm.curOp.id : NaN), ho(e, t, n, Lt(e, t));
            var r = [];
            Wi(e, function (e, n) {
              n ||
                -1 != H(r, e.history) ||
                (bo(e.history, t), r.push(e.history)),
                ho(e, t, null, Lt(e, t));
            });
          }
        }
        function fo(e, t, n) {
          var r = e.cm && e.cm.state.suppressEdits;
          if (!r || n) {
            for (
              var i,
                o = e.history,
                a = e.sel,
                s = "undo" == t ? o.done : o.undone,
                l = "undo" == t ? o.undone : o.done,
                c = 0;
              c < s.length &&
              ((i = s[c]), n ? !i.ranges || i.equals(e.sel) : i.ranges);
              c++
            );
            if (c != s.length) {
              for (o.lastOrigin = o.lastSelOrigin = null; ; ) {
                if (!(i = s.pop()).ranges) {
                  if (r) return void s.push(i);
                  break;
                }
                if ((Bi(i, l), n && !i.equals(e.sel)))
                  return void Ji(e, i, { clearRedo: !1 });
                a = i;
              }
              var u = [];
              Bi(a, l),
                l.push({ changes: u, generation: o.generation }),
                (o.generation = i.generation || ++o.maxGeneration);
              for (
                var f =
                    ve(e, "beforeChange") || (e.cm && ve(e.cm, "beforeChange")),
                  p = function (n) {
                    var r = i.changes[n];
                    if (((r.origin = t), f && !lo(e, r, !1)))
                      return (s.length = 0), {};
                    u.push(Ii(e, r));
                    var o = n ? Ni(e, r) : _(s);
                    ho(e, r, o, Ui(e, r)),
                      !n &&
                        e.cm &&
                        e.cm.scrollIntoView({ from: r.from, to: Li(r) });
                    var a = [];
                    Wi(e, function (e, t) {
                      t ||
                        -1 != H(a, e.history) ||
                        (bo(e.history, r), a.push(e.history)),
                        ho(e, r, null, Ui(e, r));
                    });
                  },
                  d = i.changes.length - 1;
                d >= 0;
                --d
              ) {
                var h = p(d);
                if (h) return h.v;
              }
            }
          }
        }
        function po(e, t) {
          if (
            0 != t &&
            ((e.first += t),
            (e.sel = new ki(
              X(e.sel.ranges, function (e) {
                return new Ci(
                  et(e.anchor.line + t, e.anchor.ch),
                  et(e.head.line + t, e.head.ch)
                );
              }),
              e.sel.primIndex
            )),
            e.cm)
          ) {
            fr(e.cm, e.first, e.first - t, t);
            for (var n = e.cm.display, r = n.viewFrom; r < n.viewTo; r++)
              pr(e.cm, r, "gutter");
          }
        }
        function ho(e, t, n, r) {
          if (e.cm && !e.cm.curOp) return ei(e.cm, ho)(e, t, n, r);
          if (t.to.line < e.first)
            po(e, t.text.length - 1 - (t.to.line - t.from.line));
          else if (!(t.from.line > e.lastLine())) {
            if (t.from.line < e.first) {
              var i = t.text.length - 1 - (e.first - t.from.line);
              po(e, i),
                (t = {
                  from: et(e.first, 0),
                  to: et(t.to.line + i, t.to.ch),
                  text: [_(t.text)],
                  origin: t.origin,
                });
            }
            var o = e.lastLine();
            t.to.line > o &&
              (t = {
                from: t.from,
                to: et(o, Ke(e, o).text.length),
                text: [t.text[0]],
                origin: t.origin,
              }),
              (t.removed = Ge(e, t.from, t.to)),
              n || (n = Ni(e, t)),
              e.cm
                ? (function (e, t, n) {
                    var r = e.doc,
                      i = e.display,
                      o = t.from,
                      a = t.to,
                      s = !1,
                      l = o.line;
                    e.options.lineWrapping ||
                      ((l = Ye(It(Ke(r, o.line)))),
                      r.iter(l, a.line + 1, function (e) {
                        if (e == i.maxLine) return (s = !0), !0;
                      })),
                      r.sel.contains(t.from, t.to) > -1 && ge(e),
                      zi(r, t, n, sr(e)),
                      e.options.lineWrapping ||
                        (r.iter(l, o.line + t.text.length, function (e) {
                          var t = Vt(e);
                          t > i.maxLineLength &&
                            ((i.maxLine = e),
                            (i.maxLineLength = t),
                            (i.maxLineChanged = !0),
                            (s = !1));
                        }),
                        s && (e.curOp.updateMaxLine = !0)),
                      (function (e, t) {
                        if (
                          ((e.modeFrontier = Math.min(e.modeFrontier, t)),
                          !(e.highlightFrontier < t - 10))
                        ) {
                          for (var n = e.first, r = t - 1; r > n; r--) {
                            var i = Ke(e, r).stateAfter;
                            if (
                              i &&
                              (!(i instanceof ct) || r + i.lookAhead < t)
                            ) {
                              n = r + 1;
                              break;
                            }
                          }
                          e.highlightFrontier = Math.min(
                            e.highlightFrontier,
                            n
                          );
                        }
                      })(r, o.line),
                      ri(e, 400);
                    var c = t.text.length - (a.line - o.line) - 1;
                    t.full
                      ? fr(e)
                      : o.line != a.line || 1 != t.text.length || $i(e.doc, t)
                      ? fr(e, o.line, a.line + 1, c)
                      : pr(e, o.line, "text");
                    var u = ve(e, "changes"),
                      f = ve(e, "change");
                    if (f || u) {
                      var p = {
                        from: o,
                        to: a,
                        text: t.text,
                        removed: t.removed,
                        origin: t.origin,
                      };
                      f && ln(e, "change", e, p),
                        u &&
                          (
                            e.curOp.changeObjs || (e.curOp.changeObjs = [])
                          ).push(p);
                    }
                    e.display.selForContextMenu = null;
                  })(e.cm, t, r)
                : zi(e, t, r),
              eo(e, n, B),
              e.cantEdit && oo(e, et(e.firstLine(), 0)) && (e.cantEdit = !1);
          }
        }
        function mo(e, t, n, r, i) {
          var o;
          r || (r = n),
            tt(r, n) < 0 && ((n = (o = [r, n])[0]), (r = o[1])),
            "string" == typeof t && (t = e.splitLines(t)),
            co(e, { from: n, to: r, text: t, origin: i });
        }
        function go(e, t, n, r) {
          n < e.line ? (e.line += r) : t < e.line && ((e.line = t), (e.ch = 0));
        }
        function vo(e, t, n, r) {
          for (var i = 0; i < e.length; ++i) {
            var o = e[i],
              a = !0;
            if (o.ranges) {
              o.copied || ((o = e[i] = o.deepCopy()).copied = !0);
              for (var s = 0; s < o.ranges.length; s++)
                go(o.ranges[s].anchor, t, n, r), go(o.ranges[s].head, t, n, r);
            } else {
              for (var l = 0; l < o.changes.length; ++l) {
                var c = o.changes[l];
                if (n < c.from.line)
                  (c.from = et(c.from.line + r, c.from.ch)),
                    (c.to = et(c.to.line + r, c.to.ch));
                else if (t <= c.to.line) {
                  a = !1;
                  break;
                }
              }
              a || (e.splice(0, i + 1), (i = 0));
            }
          }
        }
        function bo(e, t) {
          var n = t.from.line,
            r = t.to.line,
            i = t.text.length - (r - n) - 1;
          vo(e.done, n, r, i), vo(e.undone, n, r, i);
        }
        function yo(e, t, n, r) {
          var i = t,
            o = t;
          return (
            "number" == typeof t ? (o = Ke(e, at(e, t))) : (i = Ye(t)),
            null == i ? null : (r(o, i) && e.cm && pr(e.cm, i, n), o)
          );
        }
        function xo(e) {
          (this.lines = e), (this.parent = null);
          for (var t = 0, n = 0; n < e.length; ++n)
            (e[n].parent = this), (t += e[n].height);
          this.height = t;
        }
        function wo(e) {
          this.children = e;
          for (var t = 0, n = 0, r = 0; r < e.length; ++r) {
            var i = e[r];
            (t += i.chunkSize()), (n += i.height), (i.parent = this);
          }
          (this.size = t), (this.height = n), (this.parent = null);
        }
        (Ci.prototype.from = function () {
          return ot(this.anchor, this.head);
        }),
          (Ci.prototype.to = function () {
            return it(this.anchor, this.head);
          }),
          (Ci.prototype.empty = function () {
            return (
              this.head.line == this.anchor.line &&
              this.head.ch == this.anchor.ch
            );
          }),
          (xo.prototype = {
            chunkSize: function () {
              return this.lines.length;
            },
            removeInner: function (e, t) {
              for (var n = e, r = e + t; n < r; ++n) {
                var i = this.lines[n];
                (this.height -= i.height), Gt(i), ln(i, "delete");
              }
              this.lines.splice(e, t);
            },
            collapse: function (e) {
              e.push.apply(e, this.lines);
            },
            insertInner: function (e, t, n) {
              (this.height += n),
                (this.lines = this.lines
                  .slice(0, e)
                  .concat(t)
                  .concat(this.lines.slice(e)));
              for (var r = 0; r < t.length; ++r) t[r].parent = this;
            },
            iterN: function (e, t, n) {
              for (var r = e + t; e < r; ++e) if (n(this.lines[e])) return !0;
            },
          }),
          (wo.prototype = {
            chunkSize: function () {
              return this.size;
            },
            removeInner: function (e, t) {
              this.size -= t;
              for (var n = 0; n < this.children.length; ++n) {
                var r = this.children[n],
                  i = r.chunkSize();
                if (e < i) {
                  var o = Math.min(t, i - e),
                    a = r.height;
                  if (
                    (r.removeInner(e, o),
                    (this.height -= a - r.height),
                    i == o && (this.children.splice(n--, 1), (r.parent = null)),
                    0 == (t -= o))
                  )
                    break;
                  e = 0;
                } else e -= i;
              }
              if (
                this.size - t < 25 &&
                (this.children.length > 1 || !(this.children[0] instanceof xo))
              ) {
                var s = [];
                this.collapse(s),
                  (this.children = [new xo(s)]),
                  (this.children[0].parent = this);
              }
            },
            collapse: function (e) {
              for (var t = 0; t < this.children.length; ++t)
                this.children[t].collapse(e);
            },
            insertInner: function (e, t, n) {
              (this.size += t.length), (this.height += n);
              for (var r = 0; r < this.children.length; ++r) {
                var i = this.children[r],
                  o = i.chunkSize();
                if (e <= o) {
                  if (
                    (i.insertInner(e, t, n), i.lines && i.lines.length > 50)
                  ) {
                    for (
                      var a = (i.lines.length % 25) + 25, s = a;
                      s < i.lines.length;
                    ) {
                      var l = new xo(i.lines.slice(s, (s += 25)));
                      (i.height -= l.height),
                        this.children.splice(++r, 0, l),
                        (l.parent = this);
                    }
                    (i.lines = i.lines.slice(0, a)), this.maybeSpill();
                  }
                  break;
                }
                e -= o;
              }
            },
            maybeSpill: function () {
              if (!(this.children.length <= 10)) {
                var e = this;
                do {
                  var t = new wo(e.children.splice(e.children.length - 5, 5));
                  if (e.parent) {
                    (e.size -= t.size), (e.height -= t.height);
                    var n = H(e.parent.children, e);
                    e.parent.children.splice(n + 1, 0, t);
                  } else {
                    var r = new wo(e.children);
                    (r.parent = e), (e.children = [r, t]), (e = r);
                  }
                  t.parent = e.parent;
                } while (e.children.length > 10);
                e.parent.maybeSpill();
              }
            },
            iterN: function (e, t, n) {
              for (var r = 0; r < this.children.length; ++r) {
                var i = this.children[r],
                  o = i.chunkSize();
                if (e < o) {
                  var a = Math.min(t, o - e);
                  if (i.iterN(e, a, n)) return !0;
                  if (0 == (t -= a)) break;
                  e = 0;
                } else e -= o;
              }
            },
          });
        var ko = function (e, t, n) {
          if (n) for (var r in n) n.hasOwnProperty(r) && (this[r] = n[r]);
          (this.doc = e), (this.node = t);
        };
        function Co(e, t, n) {
          qt(t) < ((e.curOp && e.curOp.scrollTop) || e.doc.scrollTop) &&
            Or(e, n);
        }
        (ko.prototype.clear = function () {
          var e = this.doc.cm,
            t = this.line.widgets,
            n = this.line,
            r = Ye(n);
          if (null != r && t) {
            for (var i = 0; i < t.length; ++i) t[i] == this && t.splice(i--, 1);
            t.length || (n.widgets = null);
            var o = wn(this);
            Xe(n, Math.max(0, n.height - o)),
              e &&
                (Jr(e, function () {
                  Co(e, n, -o), pr(e, r, "widget");
                }),
                ln(e, "lineWidgetCleared", e, this, r));
          }
        }),
          (ko.prototype.changed = function () {
            var e = this,
              t = this.height,
              n = this.doc.cm,
              r = this.line;
            this.height = null;
            var i = wn(this) - t;
            i &&
              (Rt(this.doc, r) || Xe(r, r.height + i),
              n &&
                Jr(n, function () {
                  (n.curOp.forceUpdate = !0),
                    Co(n, r, i),
                    ln(n, "lineWidgetChanged", n, e, Ye(r));
                }));
          }),
          be(ko);
        var So = 0,
          To = function (e, t) {
            (this.lines = []),
              (this.type = t),
              (this.doc = e),
              (this.id = ++So);
          };
        function Lo(e, t, n, r, i) {
          if (r && r.shared)
            return (function (e, t, n, r, i) {
              (r = D(r)).shared = !1;
              var o = [Lo(e, t, n, r, i)],
                a = o[0],
                s = r.widgetNode;
              return (
                Wi(e, function (e) {
                  s && (r.widgetNode = s.cloneNode(!0)),
                    o.push(Lo(e, st(e, t), st(e, n), r, i));
                  for (var l = 0; l < e.linked.length; ++l)
                    if (e.linked[l].isParent) return;
                  a = _(o);
                }),
                new Mo(o, a)
              );
            })(e, t, n, r, i);
          if (e.cm && !e.cm.curOp) return ei(e.cm, Lo)(e, t, n, r, i);
          var o = new To(e, i),
            a = tt(t, n);
          if ((r && D(r, o, !1), a > 0 || (0 == a && !1 !== o.clearWhenEmpty)))
            return o;
          if (
            (o.replacedWith &&
              ((o.collapsed = !0),
              (o.widgetNode = O("span", [o.replacedWith], "CodeMirror-widget")),
              r.handleMouseEvents ||
                o.widgetNode.setAttribute("cm-ignore-events", "true"),
              r.insertLeft && (o.widgetNode.insertLeft = !0)),
            o.collapsed)
          ) {
            if (
              Dt(e, t.line, t, n, o) ||
              (t.line != n.line && Dt(e, n.line, t, n, o))
            )
              throw new Error(
                "Inserting collapsed marker partially overlapping an existing one"
              );
            kt = !0;
          }
          o.addToHistory &&
            Hi(e, { from: t, to: n, origin: "markText" }, e.sel, NaN);
          var s,
            l = t.line,
            c = e.cm;
          if (
            (e.iter(l, n.line + 1, function (e) {
              c &&
                o.collapsed &&
                !c.options.lineWrapping &&
                It(e) == c.display.maxLine &&
                (s = !0),
                o.collapsed && l != t.line && Xe(e, 0),
                (function (e, t) {
                  (e.markedSpans = e.markedSpans
                    ? e.markedSpans.concat([t])
                    : [t]),
                    t.marker.attachLine(e);
                })(
                  e,
                  new Ct(
                    o,
                    l == t.line ? t.ch : null,
                    l == n.line ? n.ch : null
                  )
                ),
                ++l;
            }),
            o.collapsed &&
              e.iter(t.line, n.line + 1, function (t) {
                Rt(e, t) && Xe(t, 0);
              }),
            o.clearOnEnter &&
              fe(o, "beforeCursorEnter", function () {
                return o.clear();
              }),
            o.readOnly &&
              ((wt = !0),
              (e.history.done.length || e.history.undone.length) &&
                e.clearHistory()),
            o.collapsed && ((o.id = ++So), (o.atomic = !0)),
            c)
          ) {
            if ((s && (c.curOp.updateMaxLine = !0), o.collapsed))
              fr(c, t.line, n.line + 1);
            else if (
              o.className ||
              o.startStyle ||
              o.endStyle ||
              o.css ||
              o.attributes ||
              o.title
            )
              for (var u = t.line; u <= n.line; u++) pr(c, u, "text");
            o.atomic && no(c.doc), ln(c, "markerAdded", c, o);
          }
          return o;
        }
        (To.prototype.clear = function () {
          if (!this.explicitlyCleared) {
            var e = this.doc.cm,
              t = e && !e.curOp;
            if ((t && Kr(e), ve(this, "clear"))) {
              var n = this.find();
              n && ln(this, "clear", n.from, n.to);
            }
            for (var r = null, i = null, o = 0; o < this.lines.length; ++o) {
              var a = this.lines[o],
                s = St(a.markedSpans, this);
              e && !this.collapsed
                ? pr(e, Ye(a), "text")
                : e &&
                  (null != s.to && (i = Ye(a)), null != s.from && (r = Ye(a))),
                (a.markedSpans = Tt(a.markedSpans, s)),
                null == s.from &&
                  this.collapsed &&
                  !Rt(this.doc, a) &&
                  e &&
                  Xe(a, rr(e.display));
            }
            if (e && this.collapsed && !e.options.lineWrapping)
              for (var l = 0; l < this.lines.length; ++l) {
                var c = It(this.lines[l]),
                  u = Vt(c);
                u > e.display.maxLineLength &&
                  ((e.display.maxLine = c),
                  (e.display.maxLineLength = u),
                  (e.display.maxLineChanged = !0));
              }
            null != r && e && this.collapsed && fr(e, r, i + 1),
              (this.lines.length = 0),
              (this.explicitlyCleared = !0),
              this.atomic &&
                this.doc.cantEdit &&
                ((this.doc.cantEdit = !1), e && no(e.doc)),
              e && ln(e, "markerCleared", e, this, r, i),
              t && Gr(e),
              this.parent && this.parent.clear();
          }
        }),
          (To.prototype.find = function (e, t) {
            var n, r;
            null == e && "bookmark" == this.type && (e = 1);
            for (var i = 0; i < this.lines.length; ++i) {
              var o = this.lines[i],
                a = St(o.markedSpans, this);
              if (null != a.from && ((n = et(t ? o : Ye(o), a.from)), -1 == e))
                return n;
              if (null != a.to && ((r = et(t ? o : Ye(o), a.to)), 1 == e))
                return r;
            }
            return n && { from: n, to: r };
          }),
          (To.prototype.changed = function () {
            var e = this,
              t = this.find(-1, !0),
              n = this,
              r = this.doc.cm;
            t &&
              r &&
              Jr(r, function () {
                var i = t.line,
                  o = Ye(t.line),
                  a = En(r, o);
                if (
                  (a &&
                    (In(a),
                    (r.curOp.selectionChanged = r.curOp.forceUpdate = !0)),
                  (r.curOp.updateMaxLine = !0),
                  !Rt(n.doc, i) && null != n.height)
                ) {
                  var s = n.height;
                  n.height = null;
                  var l = wn(n) - s;
                  l && Xe(i, i.height + l);
                }
                ln(r, "markerChanged", r, e);
              });
          }),
          (To.prototype.attachLine = function (e) {
            if (!this.lines.length && this.doc.cm) {
              var t = this.doc.cm.curOp;
              (t.maybeHiddenMarkers && -1 != H(t.maybeHiddenMarkers, this)) ||
                (t.maybeUnhiddenMarkers || (t.maybeUnhiddenMarkers = [])).push(
                  this
                );
            }
            this.lines.push(e);
          }),
          (To.prototype.detachLine = function (e) {
            if (
              (this.lines.splice(H(this.lines, e), 1),
              !this.lines.length && this.doc.cm)
            ) {
              var t = this.doc.cm.curOp;
              (t.maybeHiddenMarkers || (t.maybeHiddenMarkers = [])).push(this);
            }
          }),
          be(To);
        var Mo = function (e, t) {
          (this.markers = e), (this.primary = t);
          for (var n = 0; n < e.length; ++n) e[n].parent = this;
        };
        function No(e) {
          return e.findMarks(
            et(e.first, 0),
            e.clipPos(et(e.lastLine())),
            function (e) {
              return e.parent;
            }
          );
        }
        function Ao(e) {
          for (
            var t = function (t) {
                var n = e[t],
                  r = [n.primary.doc];
                Wi(n.primary.doc, function (e) {
                  return r.push(e);
                });
                for (var i = 0; i < n.markers.length; i++) {
                  var o = n.markers[i];
                  -1 == H(r, o.doc) &&
                    ((o.parent = null), n.markers.splice(i--, 1));
                }
              },
              n = 0;
            n < e.length;
            n++
          )
            t(n);
        }
        (Mo.prototype.clear = function () {
          if (!this.explicitlyCleared) {
            this.explicitlyCleared = !0;
            for (var e = 0; e < this.markers.length; ++e)
              this.markers[e].clear();
            ln(this, "clear");
          }
        }),
          (Mo.prototype.find = function (e, t) {
            return this.primary.find(e, t);
          }),
          be(Mo);
        var Oo = 0,
          Eo = function (e, t, n, r, i) {
            if (!(this instanceof Eo)) return new Eo(e, t, n, r, i);
            null == n && (n = 0),
              wo.call(this, [new xo([new Kt("", null)])]),
              (this.first = n),
              (this.scrollTop = this.scrollLeft = 0),
              (this.cantEdit = !1),
              (this.cleanGeneration = 1),
              (this.modeFrontier = this.highlightFrontier = n);
            var o = et(n, 0);
            (this.sel = Ti(o)),
              (this.history = new Di(null)),
              (this.id = ++Oo),
              (this.modeOption = t),
              (this.lineSep = r),
              (this.direction = "rtl" == i ? "rtl" : "ltr"),
              (this.extend = !1),
              "string" == typeof e && (e = this.splitLines(e)),
              zi(this, { from: o, to: o, text: e }),
              Ji(this, Ti(o), B);
          };
        (Eo.prototype = Q(wo.prototype, {
          constructor: Eo,
          iter: function (e, t, n) {
            n
              ? this.iterN(e - this.first, t - e, n)
              : this.iterN(this.first, this.first + this.size, e);
          },
          insert: function (e, t) {
            for (var n = 0, r = 0; r < t.length; ++r) n += t[r].height;
            this.insertInner(e - this.first, t, n);
          },
          remove: function (e, t) {
            this.removeInner(e - this.first, t);
          },
          getValue: function (e) {
            var t = _e(this, this.first, this.first + this.size);
            return !1 === e ? t : t.join(e || this.lineSeparator());
          },
          setValue: ni(function (e) {
            var t = et(this.first, 0),
              n = this.first + this.size - 1;
            co(
              this,
              {
                from: t,
                to: et(n, Ke(this, n).text.length),
                text: this.splitLines(e),
                origin: "setValue",
                full: !0,
              },
              !0
            ),
              this.cm && $r(this.cm, 0, 0),
              Ji(this, Ti(t), B);
          }),
          replaceRange: function (e, t, n, r) {
            mo(this, e, (t = st(this, t)), (n = n ? st(this, n) : t), r);
          },
          getRange: function (e, t, n) {
            var r = Ge(this, st(this, e), st(this, t));
            return !1 === n ? r : r.join(n || this.lineSeparator());
          },
          getLine: function (e) {
            var t = this.getLineHandle(e);
            return t && t.text;
          },
          getLineHandle: function (e) {
            if (Ze(this, e)) return Ke(this, e);
          },
          getLineNumber: function (e) {
            return Ye(e);
          },
          getLineHandleVisualStart: function (e) {
            return "number" == typeof e && (e = Ke(this, e)), It(e);
          },
          lineCount: function () {
            return this.size;
          },
          firstLine: function () {
            return this.first;
          },
          lastLine: function () {
            return this.first + this.size - 1;
          },
          clipPos: function (e) {
            return st(this, e);
          },
          getCursor: function (e) {
            var t = this.sel.primary();
            return null == e || "head" == e
              ? t.head
              : "anchor" == e
              ? t.anchor
              : "end" == e || "to" == e || !1 === e
              ? t.to()
              : t.from();
          },
          listSelections: function () {
            return this.sel.ranges;
          },
          somethingSelected: function () {
            return this.sel.somethingSelected();
          },
          setCursor: ni(function (e, t, n) {
            Qi(
              this,
              st(this, "number" == typeof e ? et(e, t || 0) : e),
              null,
              n
            );
          }),
          setSelection: ni(function (e, t, n) {
            Qi(this, st(this, e), st(this, t || e), n);
          }),
          extendSelection: ni(function (e, t, n) {
            _i(this, st(this, e), t && st(this, t), n);
          }),
          extendSelections: ni(function (e, t) {
            Xi(this, lt(this, e), t);
          }),
          extendSelectionsBy: ni(function (e, t) {
            Xi(this, lt(this, X(this.sel.ranges, e)), t);
          }),
          setSelections: ni(function (e, t, n) {
            if (e.length) {
              for (var r = [], i = 0; i < e.length; i++)
                r[i] = new Ci(st(this, e[i].anchor), st(this, e[i].head));
              null == t && (t = Math.min(e.length - 1, this.sel.primIndex)),
                Ji(this, Si(this.cm, r, t), n);
            }
          }),
          addSelection: ni(function (e, t, n) {
            var r = this.sel.ranges.slice(0);
            r.push(new Ci(st(this, e), st(this, t || e))),
              Ji(this, Si(this.cm, r, r.length - 1), n);
          }),
          getSelection: function (e) {
            for (var t, n = this.sel.ranges, r = 0; r < n.length; r++) {
              var i = Ge(this, n[r].from(), n[r].to());
              t = t ? t.concat(i) : i;
            }
            return !1 === e ? t : t.join(e || this.lineSeparator());
          },
          getSelections: function (e) {
            for (var t = [], n = this.sel.ranges, r = 0; r < n.length; r++) {
              var i = Ge(this, n[r].from(), n[r].to());
              !1 !== e && (i = i.join(e || this.lineSeparator())), (t[r] = i);
            }
            return t;
          },
          replaceSelection: function (e, t, n) {
            for (var r = [], i = 0; i < this.sel.ranges.length; i++) r[i] = e;
            this.replaceSelections(r, t, n || "+input");
          },
          replaceSelections: ni(function (e, t, n) {
            for (var r = [], i = this.sel, o = 0; o < i.ranges.length; o++) {
              var a = i.ranges[o];
              r[o] = {
                from: a.from(),
                to: a.to(),
                text: this.splitLines(e[o]),
                origin: n,
              };
            }
            for (
              var s =
                  t &&
                  "end" != t &&
                  (function (e, t, n) {
                    for (
                      var r = [], i = et(e.first, 0), o = i, a = 0;
                      a < t.length;
                      a++
                    ) {
                      var s = t[a],
                        l = Ai(s.from, i, o),
                        c = Ai(Li(s), i, o);
                      if (((i = s.to), (o = c), "around" == n)) {
                        var u = e.sel.ranges[a],
                          f = tt(u.head, u.anchor) < 0;
                        r[a] = new Ci(f ? c : l, f ? l : c);
                      } else r[a] = new Ci(l, l);
                    }
                    return new ki(r, e.sel.primIndex);
                  })(this, r, t),
                l = r.length - 1;
              l >= 0;
              l--
            )
              co(this, r[l]);
            s ? Zi(this, s) : this.cm && Er(this.cm);
          }),
          undo: ni(function () {
            fo(this, "undo");
          }),
          redo: ni(function () {
            fo(this, "redo");
          }),
          undoSelection: ni(function () {
            fo(this, "undo", !0);
          }),
          redoSelection: ni(function () {
            fo(this, "redo", !0);
          }),
          setExtending: function (e) {
            this.extend = e;
          },
          getExtending: function () {
            return this.extend;
          },
          historySize: function () {
            for (
              var e = this.history, t = 0, n = 0, r = 0;
              r < e.done.length;
              r++
            )
              e.done[r].ranges || ++t;
            for (var i = 0; i < e.undone.length; i++) e.undone[i].ranges || ++n;
            return { undo: t, redo: n };
          },
          clearHistory: function () {
            var e = this;
            (this.history = new Di(this.history.maxGeneration)),
              Wi(
                this,
                function (t) {
                  return (t.history = e.history);
                },
                !0
              );
          },
          markClean: function () {
            this.cleanGeneration = this.changeGeneration(!0);
          },
          changeGeneration: function (e) {
            return (
              e &&
                (this.history.lastOp =
                  this.history.lastSelOp =
                  this.history.lastOrigin =
                    null),
              this.history.generation
            );
          },
          isClean: function (e) {
            return this.history.generation == (e || this.cleanGeneration);
          },
          getHistory: function () {
            return {
              done: Ki(this.history.done),
              undone: Ki(this.history.undone),
            };
          },
          setHistory: function (e) {
            var t = (this.history = new Di(this.history.maxGeneration));
            (t.done = Ki(e.done.slice(0), null, !0)),
              (t.undone = Ki(e.undone.slice(0), null, !0));
          },
          setGutterMarker: ni(function (e, t, n) {
            return yo(this, e, "gutter", function (e) {
              var r = e.gutterMarkers || (e.gutterMarkers = {});
              return (r[t] = n), !n && te(r) && (e.gutterMarkers = null), !0;
            });
          }),
          clearGutter: ni(function (e) {
            var t = this;
            this.iter(function (n) {
              n.gutterMarkers &&
                n.gutterMarkers[e] &&
                yo(t, n, "gutter", function () {
                  return (
                    (n.gutterMarkers[e] = null),
                    te(n.gutterMarkers) && (n.gutterMarkers = null),
                    !0
                  );
                });
            });
          }),
          lineInfo: function (e) {
            var t;
            if ("number" == typeof e) {
              if (!Ze(this, e)) return null;
              if (((t = e), !(e = Ke(this, e)))) return null;
            } else if (null == (t = Ye(e))) return null;
            return {
              line: t,
              handle: e,
              text: e.text,
              gutterMarkers: e.gutterMarkers,
              textClass: e.textClass,
              bgClass: e.bgClass,
              wrapClass: e.wrapClass,
              widgets: e.widgets,
            };
          },
          addLineClass: ni(function (e, t, n) {
            return yo(
              this,
              e,
              "gutter" == t ? "gutter" : "class",
              function (e) {
                var r =
                  "text" == t
                    ? "textClass"
                    : "background" == t
                    ? "bgClass"
                    : "gutter" == t
                    ? "gutterClass"
                    : "wrapClass";
                if (e[r]) {
                  if (S(n).test(e[r])) return !1;
                  e[r] += " " + n;
                } else e[r] = n;
                return !0;
              }
            );
          }),
          removeLineClass: ni(function (e, t, n) {
            return yo(
              this,
              e,
              "gutter" == t ? "gutter" : "class",
              function (e) {
                var r =
                    "text" == t
                      ? "textClass"
                      : "background" == t
                      ? "bgClass"
                      : "gutter" == t
                      ? "gutterClass"
                      : "wrapClass",
                  i = e[r];
                if (!i) return !1;
                if (null == n) e[r] = null;
                else {
                  var o = i.match(S(n));
                  if (!o) return !1;
                  var a = o.index + o[0].length;
                  e[r] =
                    i.slice(0, o.index) +
                      (o.index && a != i.length ? " " : "") +
                      i.slice(a) || null;
                }
                return !0;
              }
            );
          }),
          addLineWidget: ni(function (e, t, n) {
            return (function (e, t, n, r) {
              var i = new ko(e, n, r),
                o = e.cm;
              return (
                o && i.noHScroll && (o.display.alignWidgets = !0),
                yo(e, t, "widget", function (t) {
                  var n = t.widgets || (t.widgets = []);
                  if (
                    (null == i.insertAt
                      ? n.push(i)
                      : n.splice(
                          Math.min(n.length - 1, Math.max(0, i.insertAt)),
                          0,
                          i
                        ),
                    (i.line = t),
                    o && !Rt(e, t))
                  ) {
                    var r = qt(t) < e.scrollTop;
                    Xe(t, t.height + wn(i)),
                      r && Or(o, i.height),
                      (o.curOp.forceUpdate = !0);
                  }
                  return !0;
                }),
                o &&
                  ln(
                    o,
                    "lineWidgetAdded",
                    o,
                    i,
                    "number" == typeof t ? t : Ye(t)
                  ),
                i
              );
            })(this, e, t, n);
          }),
          removeLineWidget: function (e) {
            e.clear();
          },
          markText: function (e, t, n) {
            return Lo(
              this,
              st(this, e),
              st(this, t),
              n,
              (n && n.type) || "range"
            );
          },
          setBookmark: function (e, t) {
            var n = {
              replacedWith: t && (null == t.nodeType ? t.widget : t),
              insertLeft: t && t.insertLeft,
              clearWhenEmpty: !1,
              shared: t && t.shared,
              handleMouseEvents: t && t.handleMouseEvents,
            };
            return Lo(this, (e = st(this, e)), e, n, "bookmark");
          },
          findMarksAt: function (e) {
            var t = [],
              n = Ke(this, (e = st(this, e)).line).markedSpans;
            if (n)
              for (var r = 0; r < n.length; ++r) {
                var i = n[r];
                (null == i.from || i.from <= e.ch) &&
                  (null == i.to || i.to >= e.ch) &&
                  t.push(i.marker.parent || i.marker);
              }
            return t;
          },
          findMarks: function (e, t, n) {
            (e = st(this, e)), (t = st(this, t));
            var r = [],
              i = e.line;
            return (
              this.iter(e.line, t.line + 1, function (o) {
                var a = o.markedSpans;
                if (a)
                  for (var s = 0; s < a.length; s++) {
                    var l = a[s];
                    (null != l.to && i == e.line && e.ch >= l.to) ||
                      (null == l.from && i != e.line) ||
                      (null != l.from && i == t.line && l.from >= t.ch) ||
                      (n && !n(l.marker)) ||
                      r.push(l.marker.parent || l.marker);
                  }
                ++i;
              }),
              r
            );
          },
          getAllMarks: function () {
            var e = [];
            return (
              this.iter(function (t) {
                var n = t.markedSpans;
                if (n)
                  for (var r = 0; r < n.length; ++r)
                    null != n[r].from && e.push(n[r].marker);
              }),
              e
            );
          },
          posFromIndex: function (e) {
            var t,
              n = this.first,
              r = this.lineSeparator().length;
            return (
              this.iter(function (i) {
                var o = i.text.length + r;
                if (o > e) return (t = e), !0;
                (e -= o), ++n;
              }),
              st(this, et(n, t))
            );
          },
          indexFromPos: function (e) {
            var t = (e = st(this, e)).ch;
            if (e.line < this.first || e.ch < 0) return 0;
            var n = this.lineSeparator().length;
            return (
              this.iter(this.first, e.line, function (e) {
                t += e.text.length + n;
              }),
              t
            );
          },
          copy: function (e) {
            var t = new Eo(
              _e(this, this.first, this.first + this.size),
              this.modeOption,
              this.first,
              this.lineSep,
              this.direction
            );
            return (
              (t.scrollTop = this.scrollTop),
              (t.scrollLeft = this.scrollLeft),
              (t.sel = this.sel),
              (t.extend = !1),
              e &&
                ((t.history.undoDepth = this.history.undoDepth),
                t.setHistory(this.getHistory())),
              t
            );
          },
          linkedDoc: function (e) {
            e || (e = {});
            var t = this.first,
              n = this.first + this.size;
            null != e.from && e.from > t && (t = e.from),
              null != e.to && e.to < n && (n = e.to);
            var r = new Eo(
              _e(this, t, n),
              e.mode || this.modeOption,
              t,
              this.lineSep,
              this.direction
            );
            return (
              e.sharedHist && (r.history = this.history),
              (this.linked || (this.linked = [])).push({
                doc: r,
                sharedHist: e.sharedHist,
              }),
              (r.linked = [
                { doc: this, isParent: !0, sharedHist: e.sharedHist },
              ]),
              (function (e, t) {
                for (var n = 0; n < t.length; n++) {
                  var r = t[n],
                    i = r.find(),
                    o = e.clipPos(i.from),
                    a = e.clipPos(i.to);
                  if (tt(o, a)) {
                    var s = Lo(e, o, a, r.primary, r.primary.type);
                    r.markers.push(s), (s.parent = r);
                  }
                }
              })(r, No(this)),
              r
            );
          },
          unlinkDoc: function (e) {
            if ((e instanceof Ma && (e = e.doc), this.linked))
              for (var t = 0; t < this.linked.length; ++t)
                if (this.linked[t].doc == e) {
                  this.linked.splice(t, 1), e.unlinkDoc(this), Ao(No(this));
                  break;
                }
            if (e.history == this.history) {
              var n = [e.id];
              Wi(
                e,
                function (e) {
                  return n.push(e.id);
                },
                !0
              ),
                (e.history = new Di(null)),
                (e.history.done = Ki(this.history.done, n)),
                (e.history.undone = Ki(this.history.undone, n));
            }
          },
          iterLinkedDocs: function (e) {
            Wi(this, e);
          },
          getMode: function () {
            return this.mode;
          },
          getEditor: function () {
            return this.cm;
          },
          splitLines: function (e) {
            return this.lineSep ? e.split(this.lineSep) : Ee(e);
          },
          lineSeparator: function () {
            return this.lineSep || "\n";
          },
          setDirection: ni(function (e) {
            var t;
            "rtl" != e && (e = "ltr"),
              e != this.direction &&
                ((this.direction = e),
                this.iter(function (e) {
                  return (e.order = null);
                }),
                this.cm &&
                  Jr((t = this.cm), function () {
                    Pi(t), fr(t);
                  }));
          }),
        })),
          (Eo.prototype.eachLine = Eo.prototype.iter);
        var $o = 0;
        function zo(e) {
          var t = this;
          if ((Wo(t), !me(t, e) && !kn(t.display, e))) {
            ye(e), a && ($o = +new Date());
            var n = cr(t, e, !0),
              r = e.dataTransfer.files;
            if (n && !t.isReadOnly())
              if (r && r.length && window.FileReader && window.File)
                for (
                  var i = r.length,
                    o = Array(i),
                    s = 0,
                    l = function () {
                      ++s == i &&
                        ei(t, function () {
                          var e = {
                            from: (n = st(t.doc, n)),
                            to: n,
                            text: t.doc.splitLines(
                              o
                                .filter(function (e) {
                                  return null != e;
                                })
                                .join(t.doc.lineSeparator())
                            ),
                            origin: "paste",
                          };
                          co(t.doc, e),
                            Zi(t.doc, Ti(st(t.doc, n), st(t.doc, Li(e))));
                        })();
                    },
                    c = function (e, n) {
                      if (
                        t.options.allowDropFileTypes &&
                        -1 == H(t.options.allowDropFileTypes, e.type)
                      )
                        l();
                      else {
                        var r = new FileReader();
                        (r.onerror = function () {
                          return l();
                        }),
                          (r.onload = function () {
                            var e = r.result;
                            /[\x00-\x08\x0e-\x1f]{2}/.test(e) || (o[n] = e),
                              l();
                          }),
                          r.readAsText(e);
                      }
                    },
                    u = 0;
                  u < r.length;
                  u++
                )
                  c(r[u], u);
              else {
                if (t.state.draggingText && t.doc.sel.contains(n) > -1)
                  return (
                    t.state.draggingText(e),
                    void setTimeout(function () {
                      return t.display.input.focus();
                    }, 20)
                  );
                try {
                  var f = e.dataTransfer.getData("Text");
                  if (f) {
                    var p;
                    if (
                      (t.state.draggingText &&
                        !t.state.draggingText.copy &&
                        (p = t.listSelections()),
                      eo(t.doc, Ti(n, n)),
                      p)
                    )
                      for (var d = 0; d < p.length; ++d)
                        mo(t.doc, "", p[d].anchor, p[d].head, "drag");
                    t.replaceSelection(f, "around", "paste"),
                      t.display.input.focus();
                  }
                } catch (e) {}
              }
          }
        }
        function Wo(e) {
          e.display.dragCursor &&
            (e.display.lineSpace.removeChild(e.display.dragCursor),
            (e.display.dragCursor = null));
        }
        function Fo(e) {
          if (document.getElementsByClassName) {
            for (
              var t = document.getElementsByClassName("CodeMirror"),
                n = [],
                r = 0;
              r < t.length;
              r++
            ) {
              var i = t[r].CodeMirror;
              i && n.push(i);
            }
            n.length &&
              n[0].operation(function () {
                for (var t = 0; t < n.length; t++) e(n[t]);
              });
          }
        }
        var Po = !1;
        function Do() {
          var e;
          Po ||
            (fe(window, "resize", function () {
              null == e &&
                (e = setTimeout(function () {
                  (e = null), Fo(Io);
                }, 100));
            }),
            fe(window, "blur", function () {
              return Fo(Tr);
            }),
            (Po = !0));
        }
        function Io(e) {
          var t = e.display;
          (t.cachedCharWidth = t.cachedTextHeight = t.cachedPaddingH = null),
            (t.scrollbarsClipped = !1),
            e.setSize();
        }
        for (
          var jo = {
              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: "'",
              63232: "Up",
              63233: "Down",
              63234: "Left",
              63235: "Right",
              63272: "Delete",
              63273: "Home",
              63275: "End",
              63276: "PageUp",
              63277: "PageDown",
              63302: "Insert",
            },
            Ho = 0;
          Ho < 10;
          Ho++
        )
          jo[Ho + 48] = jo[Ho + 96] = String(Ho);
        for (var Ro = 65; Ro <= 90; Ro++) jo[Ro] = String.fromCharCode(Ro);
        for (var Bo = 1; Bo <= 12; Bo++)
          jo[Bo + 111] = jo[Bo + 63235] = "F" + Bo;
        var qo = {};
        function Vo(e) {
          var t,
            n,
            r,
            i,
            o = e.split(/-(?!$)/);
          e = o[o.length - 1];
          for (var a = 0; a < o.length - 1; a++) {
            var s = o[a];
            if (/^(cmd|meta|m)$/i.test(s)) i = !0;
            else if (/^a(lt)?$/i.test(s)) t = !0;
            else if (/^(c|ctrl|control)$/i.test(s)) n = !0;
            else {
              if (!/^s(hift)?$/i.test(s))
                throw new Error("Unrecognized modifier name: " + s);
              r = !0;
            }
          }
          return (
            t && (e = "Alt-" + e),
            n && (e = "Ctrl-" + e),
            i && (e = "Cmd-" + e),
            r && (e = "Shift-" + e),
            e
          );
        }
        function Uo(e) {
          var t = {};
          for (var n in e)
            if (e.hasOwnProperty(n)) {
              var r = e[n];
              if (/^(name|fallthrough|(de|at)tach)$/.test(n)) continue;
              if ("..." == r) {
                delete e[n];
                continue;
              }
              for (var i = X(n.split(" "), Vo), o = 0; o < i.length; o++) {
                var a = void 0,
                  s = void 0;
                o == i.length - 1
                  ? ((s = i.join(" ")), (a = r))
                  : ((s = i.slice(0, o + 1).join(" ")), (a = "..."));
                var l = t[s];
                if (l) {
                  if (l != a) throw new Error("Inconsistent bindings for " + s);
                } else t[s] = a;
              }
              delete e[n];
            }
          for (var c in t) e[c] = t[c];
          return e;
        }
        function Ko(e, t, n, r) {
          var i = (t = Yo(t)).call ? t.call(e, r) : t[e];
          if (!1 === i) return "nothing";
          if ("..." === i) return "multi";
          if (null != i && n(i)) return "handled";
          if (t.fallthrough) {
            if (
              "[object Array]" != Object.prototype.toString.call(t.fallthrough)
            )
              return Ko(e, t.fallthrough, n, r);
            for (var o = 0; o < t.fallthrough.length; o++) {
              var a = Ko(e, t.fallthrough[o], n, r);
              if (a) return a;
            }
          }
        }
        function Go(e) {
          var t = "string" == typeof e ? e : jo[e.keyCode];
          return "Ctrl" == t || "Alt" == t || "Shift" == t || "Mod" == t;
        }
        function _o(e, t, n) {
          var r = e;
          return (
            t.altKey && "Alt" != r && (e = "Alt-" + e),
            (k ? t.metaKey : t.ctrlKey) && "Ctrl" != r && (e = "Ctrl-" + e),
            (k ? t.ctrlKey : t.metaKey) && "Cmd" != r && (e = "Cmd-" + e),
            !n && t.shiftKey && "Shift" != r && (e = "Shift-" + e),
            e
          );
        }
        function Xo(e, t) {
          if (f && 34 == e.keyCode && e.char) return !1;
          var n = jo[e.keyCode];
          return (
            null != n &&
            !e.altGraphKey &&
            (3 == e.keyCode && e.code && (n = e.code), _o(n, e, t))
          );
        }
        function Yo(e) {
          return "string" == typeof e ? qo[e] : e;
        }
        function Qo(e, t) {
          for (var n = e.doc.sel.ranges, r = [], i = 0; i < n.length; i++) {
            for (var o = t(n[i]); r.length && tt(o.from, _(r).to) <= 0; ) {
              var a = r.pop();
              if (tt(a.from, o.from) < 0) {
                o.from = a.from;
                break;
              }
            }
            r.push(o);
          }
          Jr(e, function () {
            for (var t = r.length - 1; t >= 0; t--)
              mo(e.doc, "", r[t].from, r[t].to, "+delete");
            Er(e);
          });
        }
        function Zo(e, t, n) {
          var r = ie(e.text, t + n, n);
          return r < 0 || r > e.text.length ? null : r;
        }
        function Jo(e, t, n) {
          var r = Zo(e, t.ch, n);
          return null == r
            ? null
            : new et(t.line, r, n < 0 ? "after" : "before");
        }
        function ea(e, t, n, r, i) {
          if (e) {
            "rtl" == t.doc.direction && (i = -i);
            var o = ce(n, t.doc.direction);
            if (o) {
              var a,
                s = i < 0 ? _(o) : o[0],
                l = i < 0 == (1 == s.level) ? "after" : "before";
              if (s.level > 0 || "rtl" == t.doc.direction) {
                var c = $n(t, n);
                a = i < 0 ? n.text.length - 1 : 0;
                var u = zn(t, c, a).top;
                (a = oe(
                  function (e) {
                    return zn(t, c, e).top == u;
                  },
                  i < 0 == (1 == s.level) ? s.from : s.to - 1,
                  a
                )),
                  "before" == l && (a = Zo(n, a, 1));
              } else a = i < 0 ? s.to : s.from;
              return new et(r, a, l);
            }
          }
          return new et(
            r,
            i < 0 ? n.text.length : 0,
            i < 0 ? "before" : "after"
          );
        }
        (qo.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",
        }),
          (qo.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",
          }),
          (qo.emacsy = {
            "Ctrl-F": "goCharRight",
            "Ctrl-B": "goCharLeft",
            "Ctrl-P": "goLineUp",
            "Ctrl-N": "goLineDown",
            "Alt-F": "goWordRight",
            "Alt-B": "goWordLeft",
            "Ctrl-A": "goLineStart",
            "Ctrl-E": "goLineEnd",
            "Ctrl-V": "goPageDown",
            "Shift-Ctrl-V": "goPageUp",
            "Ctrl-D": "delCharAfter",
            "Ctrl-H": "delCharBefore",
            "Alt-D": "delWordAfter",
            "Alt-Backspace": "delWordBefore",
            "Ctrl-K": "killLine",
            "Ctrl-T": "transposeChars",
            "Ctrl-O": "openLine",
          }),
          (qo.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"],
          }),
          (qo.default = b ? qo.macDefault : qo.pcDefault);
        var ta = {
          selectAll: so,
          singleSelection: function (e) {
            return e.setSelection(
              e.getCursor("anchor"),
              e.getCursor("head"),
              B
            );
          },
          killLine: function (e) {
            return Qo(e, function (t) {
              if (t.empty()) {
                var n = Ke(e.doc, t.head.line).text.length;
                return t.head.ch == n && t.head.line < e.lastLine()
                  ? { from: t.head, to: et(t.head.line + 1, 0) }
                  : { from: t.head, to: et(t.head.line, n) };
              }
              return { from: t.from(), to: t.to() };
            });
          },
          deleteLine: function (e) {
            return Qo(e, function (t) {
              return {
                from: et(t.from().line, 0),
                to: st(e.doc, et(t.to().line + 1, 0)),
              };
            });
          },
          delLineLeft: function (e) {
            return Qo(e, function (e) {
              return { from: et(e.from().line, 0), to: e.from() };
            });
          },
          delWrappedLineLeft: function (e) {
            return Qo(e, function (t) {
              var n = e.charCoords(t.head, "div").top + 5;
              return {
                from: e.coordsChar({ left: 0, top: n }, "div"),
                to: t.from(),
              };
            });
          },
          delWrappedLineRight: function (e) {
            return Qo(e, function (t) {
              var n = e.charCoords(t.head, "div").top + 5,
                r = e.coordsChar(
                  { left: e.display.lineDiv.offsetWidth + 100, top: n },
                  "div"
                );
              return { from: t.from(), to: r };
            });
          },
          undo: function (e) {
            return e.undo();
          },
          redo: function (e) {
            return e.redo();
          },
          undoSelection: function (e) {
            return e.undoSelection();
          },
          redoSelection: function (e) {
            return e.redoSelection();
          },
          goDocStart: function (e) {
            return e.extendSelection(et(e.firstLine(), 0));
          },
          goDocEnd: function (e) {
            return e.extendSelection(et(e.lastLine()));
          },
          goLineStart: function (e) {
            return e.extendSelectionsBy(
              function (t) {
                return na(e, t.head.line);
              },
              { origin: "+move", bias: 1 }
            );
          },
          goLineStartSmart: function (e) {
            return e.extendSelectionsBy(
              function (t) {
                return ra(e, t.head);
              },
              { origin: "+move", bias: 1 }
            );
          },
          goLineEnd: function (e) {
            return e.extendSelectionsBy(
              function (t) {
                return (function (e, t) {
                  var n = Ke(e.doc, t),
                    r = (function (e) {
                      for (var t; (t = Ft(e)); ) e = t.find(1, !0).line;
                      return e;
                    })(n);
                  return r != n && (t = Ye(r)), ea(!0, e, n, t, -1);
                })(e, t.head.line);
              },
              { origin: "+move", bias: -1 }
            );
          },
          goLineRight: function (e) {
            return e.extendSelectionsBy(function (t) {
              var n = e.cursorCoords(t.head, "div").top + 5;
              return e.coordsChar(
                { left: e.display.lineDiv.offsetWidth + 100, top: n },
                "div"
              );
            }, V);
          },
          goLineLeft: function (e) {
            return e.extendSelectionsBy(function (t) {
              var n = e.cursorCoords(t.head, "div").top + 5;
              return e.coordsChar({ left: 0, top: n }, "div");
            }, V);
          },
          goLineLeftSmart: function (e) {
            return e.extendSelectionsBy(function (t) {
              var n = e.cursorCoords(t.head, "div").top + 5,
                r = e.coordsChar({ left: 0, top: n }, "div");
              return r.ch < e.getLine(r.line).search(/\S/) ? ra(e, t.head) : r;
            }, V);
          },
          goLineUp: function (e) {
            return e.moveV(-1, "line");
          },
          goLineDown: function (e) {
            return e.moveV(1, "line");
          },
          goPageUp: function (e) {
            return e.moveV(-1, "page");
          },
          goPageDown: function (e) {
            return e.moveV(1, "page");
          },
          goCharLeft: function (e) {
            return e.moveH(-1, "char");
          },
          goCharRight: function (e) {
            return e.moveH(1, "char");
          },
          goColumnLeft: function (e) {
            return e.moveH(-1, "column");
          },
          goColumnRight: function (e) {
            return e.moveH(1, "column");
          },
          goWordLeft: function (e) {
            return e.moveH(-1, "word");
          },
          goGroupRight: function (e) {
            return e.moveH(1, "group");
          },
          goGroupLeft: function (e) {
            return e.moveH(-1, "group");
          },
          goWordRight: function (e) {
            return e.moveH(1, "word");
          },
          delCharBefore: function (e) {
            return e.deleteH(-1, "char");
          },
          delCharAfter: function (e) {
            return e.deleteH(1, "char");
          },
          delWordBefore: function (e) {
            return e.deleteH(-1, "word");
          },
          delWordAfter: function (e) {
            return e.deleteH(1, "word");
          },
          delGroupBefore: function (e) {
            return e.deleteH(-1, "group");
          },
          delGroupAfter: function (e) {
            return e.deleteH(1, "group");
          },
          indentAuto: function (e) {
            return e.indentSelection("smart");
          },
          indentMore: function (e) {
            return e.indentSelection("add");
          },
          indentLess: function (e) {
            return e.indentSelection("subtract");
          },
          insertTab: function (e) {
            return e.replaceSelection("\t");
          },
          insertSoftTab: function (e) {
            for (
              var t = [], n = e.listSelections(), r = e.options.tabSize, i = 0;
              i < n.length;
              i++
            ) {
              var o = n[i].from(),
                a = I(e.getLine(o.line), o.ch, r);
              t.push(G(r - (a % r)));
            }
            e.replaceSelections(t);
          },
          defaultTab: function (e) {
            e.somethingSelected()
              ? e.indentSelection("add")
              : e.execCommand("insertTab");
          },
          transposeChars: function (e) {
            return Jr(e, function () {
              for (var t = e.listSelections(), n = [], r = 0; r < t.length; r++)
                if (t[r].empty()) {
                  var i = t[r].head,
                    o = Ke(e.doc, i.line).text;
                  if (o)
                    if (
                      (i.ch == o.length && (i = new et(i.line, i.ch - 1)),
                      i.ch > 0)
                    )
                      (i = new et(i.line, i.ch + 1)),
                        e.replaceRange(
                          o.charAt(i.ch - 1) + o.charAt(i.ch - 2),
                          et(i.line, i.ch - 2),
                          i,
                          "+transpose"
                        );
                    else if (i.line > e.doc.first) {
                      var a = Ke(e.doc, i.line - 1).text;
                      a &&
                        ((i = new et(i.line, 1)),
                        e.replaceRange(
                          o.charAt(0) +
                            e.doc.lineSeparator() +
                            a.charAt(a.length - 1),
                          et(i.line - 1, a.length - 1),
                          i,
                          "+transpose"
                        ));
                    }
                  n.push(new Ci(i, i));
                }
              e.setSelections(n);
            });
          },
          newlineAndIndent: function (e) {
            return Jr(e, function () {
              for (var t = e.listSelections(), n = t.length - 1; n >= 0; n--)
                e.replaceRange(
                  e.doc.lineSeparator(),
                  t[n].anchor,
                  t[n].head,
                  "+input"
                );
              t = e.listSelections();
              for (var r = 0; r < t.length; r++)
                e.indentLine(t[r].from().line, null, !0);
              Er(e);
            });
          },
          openLine: function (e) {
            return e.replaceSelection("\n", "start");
          },
          toggleOverwrite: function (e) {
            return e.toggleOverwrite();
          },
        };
        function na(e, t) {
          var n = Ke(e.doc, t),
            r = It(n);
          return r != n && (t = Ye(r)), ea(!0, e, r, t, 1);
        }
        function ra(e, t) {
          var n = na(e, t.line),
            r = Ke(e.doc, n.line),
            i = ce(r, e.doc.direction);
          if (!i || 0 == i[0].level) {
            var o = Math.max(n.ch, r.text.search(/\S/)),
              a = t.line == n.line && t.ch <= o && t.ch;
            return et(n.line, a ? 0 : o, n.sticky);
          }
          return n;
        }
        function ia(e, t, n) {
          if ("string" == typeof t && !(t = ta[t])) return !1;
          e.display.input.ensurePolled();
          var r = e.display.shift,
            i = !1;
          try {
            e.isReadOnly() && (e.state.suppressEdits = !0),
              n && (e.display.shift = !1),
              (i = t(e) != R);
          } finally {
            (e.display.shift = r), (e.state.suppressEdits = !1);
          }
          return i;
        }
        var oa = new j();
        function aa(e, t, n, r) {
          var i = e.state.keySeq;
          if (i) {
            if (Go(t)) return "handled";
            if (
              (/\'$/.test(t)
                ? (e.state.keySeq = null)
                : oa.set(50, function () {
                    e.state.keySeq == i &&
                      ((e.state.keySeq = null), e.display.input.reset());
                  }),
              sa(e, i + " " + t, n, r))
            )
              return !0;
          }
          return sa(e, t, n, r);
        }
        function sa(e, t, n, r) {
          var i = (function (e, t, n) {
            for (var r = 0; r < e.state.keyMaps.length; r++) {
              var i = Ko(t, e.state.keyMaps[r], n, e);
              if (i) return i;
            }
            return (
              (e.options.extraKeys && Ko(t, e.options.extraKeys, n, e)) ||
              Ko(t, e.options.keyMap, n, e)
            );
          })(e, t, r);
          return (
            "multi" == i && (e.state.keySeq = t),
            "handled" == i && ln(e, "keyHandled", e, t, n),
            ("handled" != i && "multi" != i) || (ye(n), wr(e)),
            !!i
          );
        }
        function la(e, t) {
          var n = Xo(t, !0);
          return (
            !!n &&
            (t.shiftKey && !e.state.keySeq
              ? aa(e, "Shift-" + n, t, function (t) {
                  return ia(e, t, !0);
                }) ||
                aa(e, n, t, function (t) {
                  if ("string" == typeof t ? /^go[A-Z]/.test(t) : t.motion)
                    return ia(e, t);
                })
              : aa(e, n, t, function (t) {
                  return ia(e, t);
                }))
          );
        }
        var ca = null;
        function ua(e) {
          var t = this;
          if (
            !(
              (e.target && e.target != t.display.input.getField()) ||
              ((t.curOp.focus = $()), me(t, e))
            )
          ) {
            a && s < 11 && 27 == e.keyCode && (e.returnValue = !1);
            var r = e.keyCode;
            t.display.shift = 16 == r || e.shiftKey;
            var i = la(t, e);
            f &&
              ((ca = i ? r : null),
              i ||
                88 != r ||
                ze ||
                !(b ? e.metaKey : e.ctrlKey) ||
                t.replaceSelection("", null, "cut")),
              n &&
                !b &&
                !i &&
                46 == r &&
                e.shiftKey &&
                !e.ctrlKey &&
                document.execCommand &&
                document.execCommand("cut"),
              18 != r ||
                /\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className) ||
                (function (e) {
                  var t = e.display.lineDiv;
                  function n(e) {
                    (18 != e.keyCode && e.altKey) ||
                      (L(t, "CodeMirror-crosshair"),
                      de(document, "keyup", n),
                      de(document, "mouseover", n));
                  }
                  z(t, "CodeMirror-crosshair"),
                    fe(document, "keyup", n),
                    fe(document, "mouseover", n);
                })(t);
          }
        }
        function fa(e) {
          16 == e.keyCode && (this.doc.sel.shift = !1), me(this, e);
        }
        function pa(e) {
          var t = this;
          if (
            !(
              (e.target && e.target != t.display.input.getField()) ||
              kn(t.display, e) ||
              me(t, e) ||
              (e.ctrlKey && !e.altKey) ||
              (b && e.metaKey)
            )
          ) {
            var n = e.keyCode,
              r = e.charCode;
            if (f && n == ca) return (ca = null), void ye(e);
            if (!f || (e.which && !(e.which < 10)) || !la(t, e)) {
              var i = String.fromCharCode(null == r ? n : r);
              "\b" != i &&
                ((function (e, t, n) {
                  return aa(e, "'" + n + "'", t, function (t) {
                    return ia(e, t, !0);
                  });
                })(t, e, i) ||
                  t.display.input.onKeyPress(e));
            }
          }
        }
        var da,
          ha,
          ma = function (e, t, n) {
            (this.time = e), (this.pos = t), (this.button = n);
          };
        function ga(e) {
          var t = this,
            n = t.display;
          if (!(me(t, e) || (n.activeTouch && n.input.supportsTouch())))
            if ((n.input.ensurePolled(), (n.shift = e.shiftKey), kn(n, e)))
              l ||
                ((n.scroller.draggable = !1),
                setTimeout(function () {
                  return (n.scroller.draggable = !0);
                }, 100));
            else if (!ya(t, e)) {
              var r = cr(t, e),
                i = Se(e),
                o = r
                  ? (function (e, t) {
                      var n = +new Date();
                      return ha && ha.compare(n, e, t)
                        ? ((da = ha = null), "triple")
                        : da && da.compare(n, e, t)
                        ? ((ha = new ma(n, e, t)), (da = null), "double")
                        : ((da = new ma(n, e, t)), (ha = null), "single");
                    })(r, i)
                  : "single";
              window.focus(),
                1 == i && t.state.selectingText && t.state.selectingText(e),
                (r &&
                  (function (e, t, n, r, i) {
                    var o = "Click";
                    return (
                      "double" == r
                        ? (o = "Double" + o)
                        : "triple" == r && (o = "Triple" + o),
                      aa(
                        e,
                        _o(
                          (o =
                            (1 == t ? "Left" : 2 == t ? "Middle" : "Right") +
                            o),
                          i
                        ),
                        i,
                        function (t) {
                          if (("string" == typeof t && (t = ta[t]), !t))
                            return !1;
                          var r = !1;
                          try {
                            e.isReadOnly() && (e.state.suppressEdits = !0),
                              (r = t(e, n) != R);
                          } finally {
                            e.state.suppressEdits = !1;
                          }
                          return r;
                        }
                      )
                    );
                  })(t, i, r, o, e)) ||
                  (1 == i
                    ? r
                      ? (function (e, t, n, r) {
                          a ? setTimeout(P(kr, e), 0) : (e.curOp.focus = $());
                          var i,
                            o = (function (e, t, n) {
                              var r = e.getOption("configureMouse"),
                                i = r ? r(e, t, n) : {};
                              if (null == i.unit) {
                                var o = y ? n.shiftKey && n.metaKey : n.altKey;
                                i.unit = o
                                  ? "rectangle"
                                  : "single" == t
                                  ? "char"
                                  : "double" == t
                                  ? "word"
                                  : "line";
                              }
                              return (
                                (null == i.extend || e.doc.extend) &&
                                  (i.extend = e.doc.extend || n.shiftKey),
                                null == i.addNew &&
                                  (i.addNew = b ? n.metaKey : n.ctrlKey),
                                null == i.moveOnDrag &&
                                  (i.moveOnDrag = !(b ? n.altKey : n.ctrlKey)),
                                i
                              );
                            })(e, n, r),
                            c = e.doc.sel;
                          e.options.dragDrop &&
                          Me &&
                          !e.isReadOnly() &&
                          "single" == n &&
                          (i = c.contains(t)) > -1 &&
                          (tt((i = c.ranges[i]).from(), t) < 0 || t.xRel > 0) &&
                          (tt(i.to(), t) > 0 || t.xRel < 0)
                            ? (function (e, t, n, r) {
                                var i = e.display,
                                  o = !1,
                                  c = ei(e, function (t) {
                                    l && (i.scroller.draggable = !1),
                                      (e.state.draggingText = !1),
                                      de(i.wrapper.ownerDocument, "mouseup", c),
                                      de(
                                        i.wrapper.ownerDocument,
                                        "mousemove",
                                        u
                                      ),
                                      de(i.scroller, "dragstart", f),
                                      de(i.scroller, "drop", c),
                                      o ||
                                        (ye(t),
                                        r.addNew ||
                                          _i(e.doc, n, null, null, r.extend),
                                        (l && !p) || (a && 9 == s)
                                          ? setTimeout(function () {
                                              i.wrapper.ownerDocument.body.focus(
                                                { preventScroll: !0 }
                                              ),
                                                i.input.focus();
                                            }, 20)
                                          : i.input.focus());
                                  }),
                                  u = function (e) {
                                    o =
                                      o ||
                                      Math.abs(t.clientX - e.clientX) +
                                        Math.abs(t.clientY - e.clientY) >=
                                        10;
                                  },
                                  f = function () {
                                    return (o = !0);
                                  };
                                l && (i.scroller.draggable = !0),
                                  (e.state.draggingText = c),
                                  (c.copy = !r.moveOnDrag),
                                  i.scroller.dragDrop && i.scroller.dragDrop(),
                                  fe(i.wrapper.ownerDocument, "mouseup", c),
                                  fe(i.wrapper.ownerDocument, "mousemove", u),
                                  fe(i.scroller, "dragstart", f),
                                  fe(i.scroller, "drop", c),
                                  Cr(e),
                                  setTimeout(function () {
                                    return i.input.focus();
                                  }, 20);
                              })(e, r, t, o)
                            : (function (e, t, n, r) {
                                var i = e.display,
                                  o = e.doc;
                                ye(t);
                                var a,
                                  s,
                                  l = o.sel,
                                  c = l.ranges;
                                if (
                                  (r.addNew && !r.extend
                                    ? ((s = o.sel.contains(n)),
                                      (a = s > -1 ? c[s] : new Ci(n, n)))
                                    : ((a = o.sel.primary()),
                                      (s = o.sel.primIndex)),
                                  "rectangle" == r.unit)
                                )
                                  r.addNew || (a = new Ci(n, n)),
                                    (n = cr(e, t, !0, !0)),
                                    (s = -1);
                                else {
                                  var u = va(e, n, r.unit);
                                  a = r.extend
                                    ? Gi(a, u.anchor, u.head, r.extend)
                                    : u;
                                }
                                r.addNew
                                  ? -1 == s
                                    ? ((s = c.length),
                                      Ji(o, Si(e, c.concat([a]), s), {
                                        scroll: !1,
                                        origin: "*mouse",
                                      }))
                                    : c.length > 1 &&
                                      c[s].empty() &&
                                      "char" == r.unit &&
                                      !r.extend
                                    ? (Ji(
                                        o,
                                        Si(
                                          e,
                                          c.slice(0, s).concat(c.slice(s + 1)),
                                          0
                                        ),
                                        { scroll: !1, origin: "*mouse" }
                                      ),
                                      (l = o.sel))
                                    : Yi(o, s, a, q)
                                  : ((s = 0),
                                    Ji(o, new ki([a], 0), q),
                                    (l = o.sel));
                                var f = n;
                                function p(t) {
                                  if (0 != tt(f, t))
                                    if (((f = t), "rectangle" == r.unit)) {
                                      for (
                                        var i = [],
                                          c = e.options.tabSize,
                                          u = I(Ke(o, n.line).text, n.ch, c),
                                          p = I(Ke(o, t.line).text, t.ch, c),
                                          d = Math.min(u, p),
                                          h = Math.max(u, p),
                                          m = Math.min(n.line, t.line),
                                          g = Math.min(
                                            e.lastLine(),
                                            Math.max(n.line, t.line)
                                          );
                                        m <= g;
                                        m++
                                      ) {
                                        var v = Ke(o, m).text,
                                          b = U(v, d, c);
                                        d == h
                                          ? i.push(new Ci(et(m, b), et(m, b)))
                                          : v.length > b &&
                                            i.push(
                                              new Ci(
                                                et(m, b),
                                                et(m, U(v, h, c))
                                              )
                                            );
                                      }
                                      i.length || i.push(new Ci(n, n)),
                                        Ji(
                                          o,
                                          Si(
                                            e,
                                            l.ranges.slice(0, s).concat(i),
                                            s
                                          ),
                                          { origin: "*mouse", scroll: !1 }
                                        ),
                                        e.scrollIntoView(t);
                                    } else {
                                      var y,
                                        x = a,
                                        w = va(e, t, r.unit),
                                        k = x.anchor;
                                      tt(w.anchor, k) > 0
                                        ? ((y = w.head),
                                          (k = ot(x.from(), w.anchor)))
                                        : ((y = w.anchor),
                                          (k = it(x.to(), w.head)));
                                      var C = l.ranges.slice(0);
                                      (C[s] = (function (e, t) {
                                        var n = t.anchor,
                                          r = t.head,
                                          i = Ke(e.doc, n.line);
                                        if (
                                          0 == tt(n, r) &&
                                          n.sticky == r.sticky
                                        )
                                          return t;
                                        var o = ce(i);
                                        if (!o) return t;
                                        var a = se(o, n.ch, n.sticky),
                                          s = o[a];
                                        if (s.from != n.ch && s.to != n.ch)
                                          return t;
                                        var l,
                                          c =
                                            a +
                                            ((s.from == n.ch) == (1 != s.level)
                                              ? 0
                                              : 1);
                                        if (0 == c || c == o.length) return t;
                                        if (r.line != n.line)
                                          l =
                                            (r.line - n.line) *
                                              ("ltr" == e.doc.direction
                                                ? 1
                                                : -1) >
                                            0;
                                        else {
                                          var u = se(o, r.ch, r.sticky),
                                            f =
                                              u - a ||
                                              (r.ch - n.ch) *
                                                (1 == s.level ? -1 : 1);
                                          l =
                                            u == c - 1 || u == c
                                              ? f < 0
                                              : f > 0;
                                        }
                                        var p = o[c + (l ? -1 : 0)],
                                          d = l == (1 == p.level),
                                          h = d ? p.from : p.to,
                                          m = d ? "after" : "before";
                                        return n.ch == h && n.sticky == m
                                          ? t
                                          : new Ci(new et(n.line, h, m), r);
                                      })(e, new Ci(st(o, k), y))),
                                        Ji(o, Si(e, C, s), q);
                                    }
                                }
                                var d = i.wrapper.getBoundingClientRect(),
                                  h = 0;
                                function m(t) {
                                  (e.state.selectingText = !1),
                                    (h = 1 / 0),
                                    t && (ye(t), i.input.focus()),
                                    de(i.wrapper.ownerDocument, "mousemove", g),
                                    de(i.wrapper.ownerDocument, "mouseup", v),
                                    (o.history.lastSelOrigin = null);
                                }
                                var g = ei(e, function (t) {
                                    0 !== t.buttons && Se(t)
                                      ? (function t(n) {
                                          var a = ++h,
                                            s = cr(
                                              e,
                                              n,
                                              !0,
                                              "rectangle" == r.unit
                                            );
                                          if (s)
                                            if (0 != tt(s, f)) {
                                              (e.curOp.focus = $()), p(s);
                                              var l = Nr(i, o);
                                              (s.line >= l.to ||
                                                s.line < l.from) &&
                                                setTimeout(
                                                  ei(e, function () {
                                                    h == a && t(n);
                                                  }),
                                                  150
                                                );
                                            } else {
                                              var c =
                                                n.clientY < d.top
                                                  ? -20
                                                  : n.clientY > d.bottom
                                                  ? 20
                                                  : 0;
                                              c &&
                                                setTimeout(
                                                  ei(e, function () {
                                                    h == a &&
                                                      ((i.scroller.scrollTop +=
                                                        c),
                                                      t(n));
                                                  }),
                                                  50
                                                );
                                            }
                                        })(t)
                                      : m(t);
                                  }),
                                  v = ei(e, m);
                                (e.state.selectingText = v),
                                  fe(i.wrapper.ownerDocument, "mousemove", g),
                                  fe(i.wrapper.ownerDocument, "mouseup", v);
                              })(e, r, t, o);
                        })(t, r, o, e)
                      : Ce(e) == n.scroller && ye(e)
                    : 2 == i
                    ? (r && _i(t.doc, r),
                      setTimeout(function () {
                        return n.input.focus();
                      }, 20))
                    : 3 == i && (C ? t.display.input.onContextMenu(e) : Cr(t)));
            }
        }
        function va(e, t, n) {
          if ("char" == n) return new Ci(t, t);
          if ("word" == n) return e.findWordAt(t);
          if ("line" == n)
            return new Ci(et(t.line, 0), st(e.doc, et(t.line + 1, 0)));
          var r = n(e, t);
          return new Ci(r.from, r.to);
        }
        function ba(e, t, n, r) {
          var i, o;
          if (t.touches) (i = t.touches[0].clientX), (o = t.touches[0].clientY);
          else
            try {
              (i = t.clientX), (o = t.clientY);
            } catch (e) {
              return !1;
            }
          if (i >= Math.floor(e.display.gutters.getBoundingClientRect().right))
            return !1;
          r && ye(t);
          var a = e.display,
            s = a.lineDiv.getBoundingClientRect();
          if (o > s.bottom || !ve(e, n)) return we(t);
          o -= s.top - a.viewOffset;
          for (var l = 0; l < e.display.gutterSpecs.length; ++l) {
            var c = a.gutters.childNodes[l];
            if (c && c.getBoundingClientRect().right >= i)
              return (
                he(
                  e,
                  n,
                  e,
                  Qe(e.doc, o),
                  e.display.gutterSpecs[l].className,
                  t
                ),
                we(t)
              );
          }
        }
        function ya(e, t) {
          return ba(e, t, "gutterClick", !0);
        }
        function xa(e, t) {
          kn(e.display, t) ||
            (function (e, t) {
              return (
                !!ve(e, "gutterContextMenu") &&
                ba(e, t, "gutterContextMenu", !1)
              );
            })(e, t) ||
            me(e, t, "contextmenu") ||
            C ||
            e.display.input.onContextMenu(t);
        }
        function wa(e) {
          (e.display.wrapper.className =
            e.display.wrapper.className.replace(/\s*cm-s-\S+/g, "") +
            e.options.theme.replace(/(^|\s)\s*/g, " cm-s-")),
            Hn(e);
        }
        ma.prototype.compare = function (e, t, n) {
          return (
            this.time + 400 > e && 0 == tt(t, this.pos) && n == this.button
          );
        };
        var ka = {
            toString: function () {
              return "CodeMirror.Init";
            },
          },
          Ca = {},
          Sa = {};
        function Ta(e, t, n) {
          if (!t != !(n && n != ka)) {
            var r = e.display.dragFunctions,
              i = t ? fe : de;
            i(e.display.scroller, "dragstart", r.start),
              i(e.display.scroller, "dragenter", r.enter),
              i(e.display.scroller, "dragover", r.over),
              i(e.display.scroller, "dragleave", r.leave),
              i(e.display.scroller, "drop", r.drop);
          }
        }
        function La(e) {
          e.options.lineWrapping
            ? (z(e.display.wrapper, "CodeMirror-wrap"),
              (e.display.sizer.style.minWidth = ""),
              (e.display.sizerWidth = null))
            : (L(e.display.wrapper, "CodeMirror-wrap"), Ut(e)),
            lr(e),
            fr(e),
            Hn(e),
            setTimeout(function () {
              return Rr(e);
            }, 100);
        }
        function Ma(e, t) {
          var n = this;
          if (!(this instanceof Ma)) return new Ma(e, t);
          (this.options = t = t ? D(t) : {}), D(Ca, t, !1);
          var r = t.value;
          "string" == typeof r
            ? (r = new Eo(r, t.mode, null, t.lineSeparator, t.direction))
            : t.mode && (r.modeOption = t.mode),
            (this.doc = r);
          var i = new Ma.inputStyles[t.inputStyle](this),
            o = (this.display = new gi(e, r, i, t));
          for (var c in ((o.wrapper.CodeMirror = this),
          wa(this),
          t.lineWrapping &&
            (this.display.wrapper.className += " CodeMirror-wrap"),
          Vr(this),
          (this.state = {
            keyMaps: [],
            overlays: [],
            modeGen: 0,
            overwrite: !1,
            delayingBlurEvent: !1,
            focused: !1,
            suppressEdits: !1,
            pasteIncoming: -1,
            cutIncoming: -1,
            selectingText: !1,
            draggingText: !1,
            highlight: new j(),
            keySeq: null,
            specialChars: null,
          }),
          t.autofocus && !v && o.input.focus(),
          a &&
            s < 11 &&
            setTimeout(function () {
              return n.display.input.reset(!0);
            }, 20),
          (function (e) {
            var t = e.display;
            fe(t.scroller, "mousedown", ei(e, ga)),
              fe(
                t.scroller,
                "dblclick",
                a && s < 11
                  ? ei(e, function (t) {
                      if (!me(e, t)) {
                        var n = cr(e, t);
                        if (n && !ya(e, t) && !kn(e.display, t)) {
                          ye(t);
                          var r = e.findWordAt(n);
                          _i(e.doc, r.anchor, r.head);
                        }
                      }
                    })
                  : function (t) {
                      return me(e, t) || ye(t);
                    }
              ),
              fe(t.scroller, "contextmenu", function (t) {
                return xa(e, t);
              }),
              fe(t.input.getField(), "contextmenu", function (n) {
                t.scroller.contains(n.target) || xa(e, n);
              });
            var n,
              r = { end: 0 };
            function i() {
              t.activeTouch &&
                ((n = setTimeout(function () {
                  return (t.activeTouch = null);
                }, 1e3)),
                ((r = t.activeTouch).end = +new Date()));
            }
            function o(e, t) {
              if (null == t.left) return !0;
              var n = t.left - e.left,
                r = t.top - e.top;
              return n * n + r * r > 400;
            }
            fe(t.scroller, "touchstart", function (i) {
              if (
                !me(e, i) &&
                !(function (e) {
                  if (1 != e.touches.length) return !1;
                  var t = e.touches[0];
                  return t.radiusX <= 1 && t.radiusY <= 1;
                })(i) &&
                !ya(e, i)
              ) {
                t.input.ensurePolled(), clearTimeout(n);
                var o = +new Date();
                (t.activeTouch = {
                  start: o,
                  moved: !1,
                  prev: o - r.end <= 300 ? r : null,
                }),
                  1 == i.touches.length &&
                    ((t.activeTouch.left = i.touches[0].pageX),
                    (t.activeTouch.top = i.touches[0].pageY));
              }
            }),
              fe(t.scroller, "touchmove", function () {
                t.activeTouch && (t.activeTouch.moved = !0);
              }),
              fe(t.scroller, "touchend", function (n) {
                var r = t.activeTouch;
                if (
                  r &&
                  !kn(t, n) &&
                  null != r.left &&
                  !r.moved &&
                  new Date() - r.start < 300
                ) {
                  var a,
                    s = e.coordsChar(t.activeTouch, "page");
                  (a =
                    !r.prev || o(r, r.prev)
                      ? new Ci(s, s)
                      : !r.prev.prev || o(r, r.prev.prev)
                      ? e.findWordAt(s)
                      : new Ci(et(s.line, 0), st(e.doc, et(s.line + 1, 0)))),
                    e.setSelection(a.anchor, a.head),
                    e.focus(),
                    ye(n);
                }
                i();
              }),
              fe(t.scroller, "touchcancel", i),
              fe(t.scroller, "scroll", function () {
                t.scroller.clientHeight &&
                  (Fr(e, t.scroller.scrollTop),
                  Dr(e, t.scroller.scrollLeft, !0),
                  he(e, "scroll", e));
              }),
              fe(t.scroller, "mousewheel", function (t) {
                return wi(e, t);
              }),
              fe(t.scroller, "DOMMouseScroll", function (t) {
                return wi(e, t);
              }),
              fe(t.wrapper, "scroll", function () {
                return (t.wrapper.scrollTop = t.wrapper.scrollLeft = 0);
              }),
              (t.dragFunctions = {
                enter: function (t) {
                  me(e, t) || ke(t);
                },
                over: function (t) {
                  me(e, t) ||
                    ((function (e, t) {
                      var n = cr(e, t);
                      if (n) {
                        var r = document.createDocumentFragment();
                        br(e, n, r),
                          e.display.dragCursor ||
                            ((e.display.dragCursor = A(
                              "div",
                              null,
                              "CodeMirror-cursors CodeMirror-dragcursors"
                            )),
                            e.display.lineSpace.insertBefore(
                              e.display.dragCursor,
                              e.display.cursorDiv
                            )),
                          N(e.display.dragCursor, r);
                      }
                    })(e, t),
                    ke(t));
                },
                start: function (t) {
                  return (function (e, t) {
                    if (a && (!e.state.draggingText || +new Date() - $o < 100))
                      ke(t);
                    else if (
                      !me(e, t) &&
                      !kn(e.display, t) &&
                      (t.dataTransfer.setData("Text", e.getSelection()),
                      (t.dataTransfer.effectAllowed = "copyMove"),
                      t.dataTransfer.setDragImage && !p)
                    ) {
                      var n = A(
                        "img",
                        null,
                        null,
                        "position: fixed; left: 0; top: 0;"
                      );
                      (n.src =
                        "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),
                        f &&
                          ((n.width = n.height = 1),
                          e.display.wrapper.appendChild(n),
                          (n._top = n.offsetTop)),
                        t.dataTransfer.setDragImage(n, 0, 0),
                        f && n.parentNode.removeChild(n);
                    }
                  })(e, t);
                },
                drop: ei(e, zo),
                leave: function (t) {
                  me(e, t) || Wo(e);
                },
              });
            var l = t.input.getField();
            fe(l, "keyup", function (t) {
              return fa.call(e, t);
            }),
              fe(l, "keydown", ei(e, ua)),
              fe(l, "keypress", ei(e, pa)),
              fe(l, "focus", function (t) {
                return Sr(e, t);
              }),
              fe(l, "blur", function (t) {
                return Tr(e, t);
              });
          })(this),
          Do(),
          Kr(this),
          (this.curOp.forceUpdate = !0),
          Fi(this, r),
          (t.autofocus && !v) || this.hasFocus()
            ? setTimeout(P(Sr, this), 20)
            : Tr(this),
          Sa))
            Sa.hasOwnProperty(c) && Sa[c](this, t[c], ka);
          pi(this), t.finishInit && t.finishInit(this);
          for (var u = 0; u < Na.length; ++u) Na[u](this);
          Gr(this),
            l &&
              t.lineWrapping &&
              "optimizelegibility" ==
                getComputedStyle(o.lineDiv).textRendering &&
              (o.lineDiv.style.textRendering = "auto");
        }
        (Ma.defaults = Ca), (Ma.optionHandlers = Sa);
        var Na = [];
        function Aa(e, t, n, r) {
          var i,
            o = e.doc;
          null == n && (n = "add"),
            "smart" == n &&
              (o.mode.indent ? (i = dt(e, t).state) : (n = "prev"));
          var a = e.options.tabSize,
            s = Ke(o, t),
            l = I(s.text, null, a);
          s.stateAfter && (s.stateAfter = null);
          var c,
            u = s.text.match(/^\s*/)[0];
          if (r || /\S/.test(s.text)) {
            if (
              "smart" == n &&
              ((c = o.mode.indent(i, s.text.slice(u.length), s.text)) == R ||
                c > 150)
            ) {
              if (!r) return;
              n = "prev";
            }
          } else (c = 0), (n = "not");
          "prev" == n
            ? (c = t > o.first ? I(Ke(o, t - 1).text, null, a) : 0)
            : "add" == n
            ? (c = l + e.options.indentUnit)
            : "subtract" == n
            ? (c = l - e.options.indentUnit)
            : "number" == typeof n && (c = l + n),
            (c = Math.max(0, c));
          var f = "",
            p = 0;
          if (e.options.indentWithTabs)
            for (var d = Math.floor(c / a); d; --d) (p += a), (f += "\t");
          if ((p < c && (f += G(c - p)), f != u))
            return (
              mo(o, f, et(t, 0), et(t, u.length), "+input"),
              (s.stateAfter = null),
              !0
            );
          for (var h = 0; h < o.sel.ranges.length; h++) {
            var m = o.sel.ranges[h];
            if (m.head.line == t && m.head.ch < u.length) {
              var g = et(t, u.length);
              Yi(o, h, new Ci(g, g));
              break;
            }
          }
        }
        Ma.defineInitHook = function (e) {
          return Na.push(e);
        };
        var Oa = null;
        function Ea(e) {
          Oa = e;
        }
        function $a(e, t, n, r, i) {
          var o = e.doc;
          (e.display.shift = !1), r || (r = o.sel);
          var a = +new Date() - 200,
            s = "paste" == i || e.state.pasteIncoming > a,
            l = Ee(t),
            c = null;
          if (s && r.ranges.length > 1)
            if (Oa && Oa.text.join("\n") == t) {
              if (r.ranges.length % Oa.text.length == 0) {
                c = [];
                for (var u = 0; u < Oa.text.length; u++)
                  c.push(o.splitLines(Oa.text[u]));
              }
            } else
              l.length == r.ranges.length &&
                e.options.pasteLinesPerSelection &&
                (c = X(l, function (e) {
                  return [e];
                }));
          for (
            var f = e.curOp.updateInput, p = r.ranges.length - 1;
            p >= 0;
            p--
          ) {
            var d = r.ranges[p],
              h = d.from(),
              m = d.to();
            d.empty() &&
              (n && n > 0
                ? (h = et(h.line, h.ch - n))
                : e.state.overwrite && !s
                ? (m = et(
                    m.line,
                    Math.min(Ke(o, m.line).text.length, m.ch + _(l).length)
                  ))
                : s &&
                  Oa &&
                  Oa.lineWise &&
                  Oa.text.join("\n") == l.join("\n") &&
                  (h = m = et(h.line, 0)));
            var g = {
              from: h,
              to: m,
              text: c ? c[p % c.length] : l,
              origin:
                i || (s ? "paste" : e.state.cutIncoming > a ? "cut" : "+input"),
            };
            co(e.doc, g), ln(e, "inputRead", e, g);
          }
          t && !s && Wa(e, t),
            Er(e),
            e.curOp.updateInput < 2 && (e.curOp.updateInput = f),
            (e.curOp.typing = !0),
            (e.state.pasteIncoming = e.state.cutIncoming = -1);
        }
        function za(e, t) {
          var n = e.clipboardData && e.clipboardData.getData("Text");
          if (n)
            return (
              e.preventDefault(),
              t.isReadOnly() ||
                t.options.disableInput ||
                Jr(t, function () {
                  return $a(t, n, 0, null, "paste");
                }),
              !0
            );
        }
        function Wa(e, t) {
          if (e.options.electricChars && e.options.smartIndent)
            for (var n = e.doc.sel, r = n.ranges.length - 1; r >= 0; r--) {
              var i = n.ranges[r];
              if (
                !(
                  i.head.ch > 100 ||
                  (r && n.ranges[r - 1].head.line == i.head.line)
                )
              ) {
                var o = e.getModeAt(i.head),
                  a = !1;
                if (o.electricChars) {
                  for (var s = 0; s < o.electricChars.length; s++)
                    if (t.indexOf(o.electricChars.charAt(s)) > -1) {
                      a = Aa(e, i.head.line, "smart");
                      break;
                    }
                } else
                  o.electricInput &&
                    o.electricInput.test(
                      Ke(e.doc, i.head.line).text.slice(0, i.head.ch)
                    ) &&
                    (a = Aa(e, i.head.line, "smart"));
                a && ln(e, "electricInput", e, i.head.line);
              }
            }
        }
        function Fa(e) {
          for (var t = [], n = [], r = 0; r < e.doc.sel.ranges.length; r++) {
            var i = e.doc.sel.ranges[r].head.line,
              o = { anchor: et(i, 0), head: et(i + 1, 0) };
            n.push(o), t.push(e.getRange(o.anchor, o.head));
          }
          return { text: t, ranges: n };
        }
        function Pa(e, t, n, r) {
          e.setAttribute("autocorrect", n ? "" : "off"),
            e.setAttribute("autocapitalize", r ? "" : "off"),
            e.setAttribute("spellcheck", !!t);
        }
        function Da() {
          var e = A(
              "textarea",
              null,
              null,
              "position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"
            ),
            t = A(
              "div",
              [e],
              null,
              "overflow: hidden; position: relative; width: 3px; height: 0px;"
            );
          return (
            l ? (e.style.width = "1000px") : e.setAttribute("wrap", "off"),
            m && (e.style.border = "1px solid black"),
            Pa(e),
            t
          );
        }
        function Ia(e, t, n, r, i) {
          var o = t,
            a = n,
            s = Ke(e, t.line),
            l = i && "rtl" == e.direction ? -n : n;
          function c(r) {
            var o, a;
            if (
              null ==
              (o = i
                ? (function (e, t, n, r) {
                    var i = ce(t, e.doc.direction);
                    if (!i) return Jo(t, n, r);
                    n.ch >= t.text.length
                      ? ((n.ch = t.text.length), (n.sticky = "before"))
                      : n.ch <= 0 && ((n.ch = 0), (n.sticky = "after"));
                    var o = se(i, n.ch, n.sticky),
                      a = i[o];
                    if (
                      "ltr" == e.doc.direction &&
                      a.level % 2 == 0 &&
                      (r > 0 ? a.to > n.ch : a.from < n.ch)
                    )
                      return Jo(t, n, r);
                    var s,
                      l = function (e, n) {
                        return Zo(t, e instanceof et ? e.ch : e, n);
                      },
                      c = function (n) {
                        return e.options.lineWrapping
                          ? ((s = s || $n(e, t)), Zn(e, t, s, n))
                          : { begin: 0, end: t.text.length };
                      },
                      u = c("before" == n.sticky ? l(n, -1) : n.ch);
                    if ("rtl" == e.doc.direction || 1 == a.level) {
                      var f = (1 == a.level) == r < 0,
                        p = l(n, f ? 1 : -1);
                      if (
                        null != p &&
                        (f
                          ? p <= a.to && p <= u.end
                          : p >= a.from && p >= u.begin)
                      ) {
                        var d = f ? "before" : "after";
                        return new et(n.line, p, d);
                      }
                    }
                    var h = function (e, t, r) {
                        for (
                          var o = function (e, t) {
                            return t
                              ? new et(n.line, l(e, 1), "before")
                              : new et(n.line, e, "after");
                          };
                          e >= 0 && e < i.length;
                          e += t
                        ) {
                          var a = i[e],
                            s = t > 0 == (1 != a.level),
                            c = s ? r.begin : l(r.end, -1);
                          if (a.from <= c && c < a.to) return o(c, s);
                          if (
                            ((c = s ? a.from : l(a.to, -1)),
                            r.begin <= c && c < r.end)
                          )
                            return o(c, s);
                        }
                      },
                      m = h(o + r, r, u);
                    if (m) return m;
                    var g = r > 0 ? u.end : l(u.begin, -1);
                    return null == g ||
                      (r > 0 && g == t.text.length) ||
                      !(m = h(r > 0 ? 0 : i.length - 1, r, c(g)))
                      ? null
                      : m;
                  })(e.cm, s, t, n)
                : Jo(s, t, n))
            ) {
              if (
                r ||
                (a = t.line + l) < e.first ||
                a >= e.first + e.size ||
                ((t = new et(a, t.ch, t.sticky)), !(s = Ke(e, a)))
              )
                return !1;
              t = ea(i, e.cm, s, t.line, l);
            } else t = o;
            return !0;
          }
          if ("char" == r) c();
          else if ("column" == r) c(!0);
          else if ("word" == r || "group" == r)
            for (
              var u = null,
                f = "group" == r,
                p = e.cm && e.cm.getHelper(t, "wordChars"),
                d = !0;
              !(n < 0) || c(!d);
              d = !1
            ) {
              var h = s.text.charAt(t.ch) || "\n",
                m = ee(h, p)
                  ? "w"
                  : f && "\n" == h
                  ? "n"
                  : !f || /\s/.test(h)
                  ? null
                  : "p";
              if ((!f || d || m || (m = "s"), u && u != m)) {
                n < 0 && ((n = 1), c(), (t.sticky = "after"));
                break;
              }
              if ((m && (u = m), n > 0 && !c(!d))) break;
            }
          var g = oo(e, t, o, a, !0);
          return nt(o, g) && (g.hitSide = !0), g;
        }
        function ja(e, t, n, r) {
          var i,
            o,
            a = e.doc,
            s = t.left;
          if ("page" == r) {
            var l = Math.min(
                e.display.wrapper.clientHeight,
                window.innerHeight || document.documentElement.clientHeight
              ),
              c = Math.max(l - 0.5 * rr(e.display), 3);
            i = (n > 0 ? t.bottom : t.top) + n * c;
          } else "line" == r && (i = n > 0 ? t.bottom + 3 : t.top - 3);
          for (; (o = Yn(e, s, i)).outside; ) {
            if (n < 0 ? i <= 0 : i >= a.height) {
              o.hitSide = !0;
              break;
            }
            i += 5 * n;
          }
          return o;
        }
        var Ha = function (e) {
          (this.cm = e),
            (this.lastAnchorNode =
              this.lastAnchorOffset =
              this.lastFocusNode =
              this.lastFocusOffset =
                null),
            (this.polling = new j()),
            (this.composing = null),
            (this.gracePeriod = !1),
            (this.readDOMTimeout = null);
        };
        function Ra(e, t) {
          var n = En(e, t.line);
          if (!n || n.hidden) return null;
          var r = Ke(e.doc, t.line),
            i = An(n, r, t.line),
            o = ce(r, e.doc.direction),
            a = "left";
          o && (a = se(o, t.ch) % 2 ? "right" : "left");
          var s = Pn(i.map, t.ch, a);
          return (s.offset = "right" == s.collapse ? s.end : s.start), s;
        }
        function Ba(e, t) {
          return t && (e.bad = !0), e;
        }
        function qa(e, t, n) {
          var r;
          if (t == e.display.lineDiv) {
            if (!(r = e.display.lineDiv.childNodes[n]))
              return Ba(e.clipPos(et(e.display.viewTo - 1)), !0);
            (t = null), (n = 0);
          } else
            for (r = t; ; r = r.parentNode) {
              if (!r || r == e.display.lineDiv) return null;
              if (r.parentNode && r.parentNode == e.display.lineDiv) break;
            }
          for (var i = 0; i < e.display.view.length; i++) {
            var o = e.display.view[i];
            if (o.node == r) return Va(o, t, n);
          }
        }
        function Va(e, t, n) {
          var r = e.text.firstChild,
            i = !1;
          if (!t || !E(r, t)) return Ba(et(Ye(e.line), 0), !0);
          if (t == r && ((i = !0), (t = r.childNodes[n]), (n = 0), !t)) {
            var o = e.rest ? _(e.rest) : e.line;
            return Ba(et(Ye(o), o.text.length), i);
          }
          var a = 3 == t.nodeType ? t : null,
            s = t;
          for (
            a ||
            1 != t.childNodes.length ||
            3 != t.firstChild.nodeType ||
            ((a = t.firstChild), n && (n = a.nodeValue.length));
            s.parentNode != r;
          )
            s = s.parentNode;
          var l = e.measure,
            c = l.maps;
          function u(t, n, r) {
            for (var i = -1; i < (c ? c.length : 0); i++)
              for (var o = i < 0 ? l.map : c[i], a = 0; a < o.length; a += 3) {
                var s = o[a + 2];
                if (s == t || s == n) {
                  var u = Ye(i < 0 ? e.line : e.rest[i]),
                    f = o[a] + r;
                  return (
                    (r < 0 || s != t) && (f = o[a + (r ? 1 : 0)]), et(u, f)
                  );
                }
              }
          }
          var f = u(a, s, n);
          if (f) return Ba(f, i);
          for (
            var p = s.nextSibling, d = a ? a.nodeValue.length - n : 0;
            p;
            p = p.nextSibling
          ) {
            if ((f = u(p, p.firstChild, 0))) return Ba(et(f.line, f.ch - d), i);
            d += p.textContent.length;
          }
          for (var h = s.previousSibling, m = n; h; h = h.previousSibling) {
            if ((f = u(h, h.firstChild, -1)))
              return Ba(et(f.line, f.ch + m), i);
            m += h.textContent.length;
          }
        }
        (Ha.prototype.init = function (e) {
          var t = this,
            n = this,
            r = n.cm,
            i = (n.div = e.lineDiv);
          function o(e) {
            for (var t = e.target; t; t = t.parentNode) {
              if (t == i) return !0;
              if (/\bCodeMirror-(?:line)?widget\b/.test(t.className)) break;
            }
            return !1;
          }
          function a(e) {
            if (o(e) && !me(r, e)) {
              if (r.somethingSelected())
                Ea({ lineWise: !1, text: r.getSelections() }),
                  "cut" == e.type && r.replaceSelection("", null, "cut");
              else {
                if (!r.options.lineWiseCopyCut) return;
                var t = Fa(r);
                Ea({ lineWise: !0, text: t.text }),
                  "cut" == e.type &&
                    r.operation(function () {
                      r.setSelections(t.ranges, 0, B),
                        r.replaceSelection("", null, "cut");
                    });
              }
              if (e.clipboardData) {
                e.clipboardData.clearData();
                var a = Oa.text.join("\n");
                if (
                  (e.clipboardData.setData("Text", a),
                  e.clipboardData.getData("Text") == a)
                )
                  return void e.preventDefault();
              }
              var s = Da(),
                l = s.firstChild;
              r.display.lineSpace.insertBefore(
                s,
                r.display.lineSpace.firstChild
              ),
                (l.value = Oa.text.join("\n"));
              var c = document.activeElement;
              F(l),
                setTimeout(function () {
                  r.display.lineSpace.removeChild(s),
                    c.focus(),
                    c == i && n.showPrimarySelection();
                }, 50);
            }
          }
          Pa(
            i,
            r.options.spellcheck,
            r.options.autocorrect,
            r.options.autocapitalize
          ),
            fe(i, "paste", function (e) {
              !o(e) ||
                me(r, e) ||
                za(e, r) ||
                (s <= 11 &&
                  setTimeout(
                    ei(r, function () {
                      return t.updateFromDOM();
                    }),
                    20
                  ));
            }),
            fe(i, "compositionstart", function (e) {
              t.composing = { data: e.data, done: !1 };
            }),
            fe(i, "compositionupdate", function (e) {
              t.composing || (t.composing = { data: e.data, done: !1 });
            }),
            fe(i, "compositionend", function (e) {
              t.composing &&
                (e.data != t.composing.data && t.readFromDOMSoon(),
                (t.composing.done = !0));
            }),
            fe(i, "touchstart", function () {
              return n.forceCompositionEnd();
            }),
            fe(i, "input", function () {
              t.composing || t.readFromDOMSoon();
            }),
            fe(i, "copy", a),
            fe(i, "cut", a);
        }),
          (Ha.prototype.screenReaderLabelChanged = function (e) {
            e
              ? this.div.setAttribute("aria-label", e)
              : this.div.removeAttribute("aria-label");
          }),
          (Ha.prototype.prepareSelection = function () {
            var e = vr(this.cm, !1);
            return (e.focus = document.activeElement == this.div), e;
          }),
          (Ha.prototype.showSelection = function (e, t) {
            e &&
              this.cm.display.view.length &&
              ((e.focus || t) && this.showPrimarySelection(),
              this.showMultipleSelections(e));
          }),
          (Ha.prototype.getSelection = function () {
            return this.cm.display.wrapper.ownerDocument.getSelection();
          }),
          (Ha.prototype.showPrimarySelection = function () {
            var e = this.getSelection(),
              t = this.cm,
              r = t.doc.sel.primary(),
              i = r.from(),
              o = r.to();
            if (
              t.display.viewTo == t.display.viewFrom ||
              i.line >= t.display.viewTo ||
              o.line < t.display.viewFrom
            )
              e.removeAllRanges();
            else {
              var a = qa(t, e.anchorNode, e.anchorOffset),
                s = qa(t, e.focusNode, e.focusOffset);
              if (
                !a ||
                a.bad ||
                !s ||
                s.bad ||
                0 != tt(ot(a, s), i) ||
                0 != tt(it(a, s), o)
              ) {
                var l = t.display.view,
                  c = (i.line >= t.display.viewFrom && Ra(t, i)) || {
                    node: l[0].measure.map[2],
                    offset: 0,
                  },
                  u = o.line < t.display.viewTo && Ra(t, o);
                if (!u) {
                  var f = l[l.length - 1].measure,
                    p = f.maps ? f.maps[f.maps.length - 1] : f.map;
                  u = {
                    node: p[p.length - 1],
                    offset: p[p.length - 2] - p[p.length - 3],
                  };
                }
                if (c && u) {
                  var d,
                    h = e.rangeCount && e.getRangeAt(0);
                  try {
                    d = T(c.node, c.offset, u.offset, u.node);
                  } catch (e) {}
                  d &&
                    (!n && t.state.focused
                      ? (e.collapse(c.node, c.offset),
                        d.collapsed || (e.removeAllRanges(), e.addRange(d)))
                      : (e.removeAllRanges(), e.addRange(d)),
                    h && null == e.anchorNode
                      ? e.addRange(h)
                      : n && this.startGracePeriod()),
                    this.rememberSelection();
                } else e.removeAllRanges();
              }
            }
          }),
          (Ha.prototype.startGracePeriod = function () {
            var e = this;
            clearTimeout(this.gracePeriod),
              (this.gracePeriod = setTimeout(function () {
                (e.gracePeriod = !1),
                  e.selectionChanged() &&
                    e.cm.operation(function () {
                      return (e.cm.curOp.selectionChanged = !0);
                    });
              }, 20));
          }),
          (Ha.prototype.showMultipleSelections = function (e) {
            N(this.cm.display.cursorDiv, e.cursors),
              N(this.cm.display.selectionDiv, e.selection);
          }),
          (Ha.prototype.rememberSelection = function () {
            var e = this.getSelection();
            (this.lastAnchorNode = e.anchorNode),
              (this.lastAnchorOffset = e.anchorOffset),
              (this.lastFocusNode = e.focusNode),
              (this.lastFocusOffset = e.focusOffset);
          }),
          (Ha.prototype.selectionInEditor = function () {
            var e = this.getSelection();
            if (!e.rangeCount) return !1;
            var t = e.getRangeAt(0).commonAncestorContainer;
            return E(this.div, t);
          }),
          (Ha.prototype.focus = function () {
            "nocursor" != this.cm.options.readOnly &&
              ((this.selectionInEditor() &&
                document.activeElement == this.div) ||
                this.showSelection(this.prepareSelection(), !0),
              this.div.focus());
          }),
          (Ha.prototype.blur = function () {
            this.div.blur();
          }),
          (Ha.prototype.getField = function () {
            return this.div;
          }),
          (Ha.prototype.supportsTouch = function () {
            return !0;
          }),
          (Ha.prototype.receivedFocus = function () {
            var e = this;
            this.selectionInEditor()
              ? this.pollSelection()
              : Jr(this.cm, function () {
                  return (e.cm.curOp.selectionChanged = !0);
                }),
              this.polling.set(this.cm.options.pollInterval, function t() {
                e.cm.state.focused &&
                  (e.pollSelection(),
                  e.polling.set(e.cm.options.pollInterval, t));
              });
          }),
          (Ha.prototype.selectionChanged = function () {
            var e = this.getSelection();
            return (
              e.anchorNode != this.lastAnchorNode ||
              e.anchorOffset != this.lastAnchorOffset ||
              e.focusNode != this.lastFocusNode ||
              e.focusOffset != this.lastFocusOffset
            );
          }),
          (Ha.prototype.pollSelection = function () {
            if (
              null == this.readDOMTimeout &&
              !this.gracePeriod &&
              this.selectionChanged()
            ) {
              var e = this.getSelection(),
                t = this.cm;
              if (
                g &&
                u &&
                this.cm.display.gutterSpecs.length &&
                (function (e) {
                  for (var t = e; t; t = t.parentNode)
                    if (/CodeMirror-gutter-wrapper/.test(t.className))
                      return !0;
                  return !1;
                })(e.anchorNode)
              )
                return (
                  this.cm.triggerOnKeyDown({
                    type: "keydown",
                    keyCode: 8,
                    preventDefault: Math.abs,
                  }),
                  this.blur(),
                  void this.focus()
                );
              if (!this.composing) {
                this.rememberSelection();
                var n = qa(t, e.anchorNode, e.anchorOffset),
                  r = qa(t, e.focusNode, e.focusOffset);
                n &&
                  r &&
                  Jr(t, function () {
                    Ji(t.doc, Ti(n, r), B),
                      (n.bad || r.bad) && (t.curOp.selectionChanged = !0);
                  });
              }
            }
          }),
          (Ha.prototype.pollContent = function () {
            null != this.readDOMTimeout &&
              (clearTimeout(this.readDOMTimeout), (this.readDOMTimeout = null));
            var e,
              t,
              n,
              r = this.cm,
              i = r.display,
              o = r.doc.sel.primary(),
              a = o.from(),
              s = o.to();
            if (
              (0 == a.ch &&
                a.line > r.firstLine() &&
                (a = et(a.line - 1, Ke(r.doc, a.line - 1).length)),
              s.ch == Ke(r.doc, s.line).text.length &&
                s.line < r.lastLine() &&
                (s = et(s.line + 1, 0)),
              a.line < i.viewFrom || s.line > i.viewTo - 1)
            )
              return !1;
            a.line == i.viewFrom || 0 == (e = ur(r, a.line))
              ? ((t = Ye(i.view[0].line)), (n = i.view[0].node))
              : ((t = Ye(i.view[e].line)),
                (n = i.view[e - 1].node.nextSibling));
            var l,
              c,
              u = ur(r, s.line);
            if (
              (u == i.view.length - 1
                ? ((l = i.viewTo - 1), (c = i.lineDiv.lastChild))
                : ((l = Ye(i.view[u + 1].line) - 1),
                  (c = i.view[u + 1].node.previousSibling)),
              !n)
            )
              return !1;
            for (
              var f = r.doc.splitLines(
                  (function (e, t, n, r, i) {
                    var o = "",
                      a = !1,
                      s = e.doc.lineSeparator(),
                      l = !1;
                    function c() {
                      a && ((o += s), l && (o += s), (a = l = !1));
                    }
                    function u(e) {
                      e && (c(), (o += e));
                    }
                    function f(t) {
                      if (1 == t.nodeType) {
                        var n = t.getAttribute("cm-text");
                        if (n) return void u(n);
                        var o,
                          p = t.getAttribute("cm-marker");
                        if (p) {
                          var d = e.findMarks(
                            et(r, 0),
                            et(i + 1, 0),
                            ((g = +p),
                            function (e) {
                              return e.id == g;
                            })
                          );
                          return void (
                            d.length &&
                            (o = d[0].find(0)) &&
                            u(Ge(e.doc, o.from, o.to).join(s))
                          );
                        }
                        if ("false" == t.getAttribute("contenteditable"))
                          return;
                        var h = /^(pre|div|p|li|table|br)$/i.test(t.nodeName);
                        if (
                          !/^br$/i.test(t.nodeName) &&
                          0 == t.textContent.length
                        )
                          return;
                        h && c();
                        for (var m = 0; m < t.childNodes.length; m++)
                          f(t.childNodes[m]);
                        /^(pre|p)$/i.test(t.nodeName) && (l = !0),
                          h && (a = !0);
                      } else
                        3 == t.nodeType &&
                          u(
                            t.nodeValue
                              .replace(/\u200b/g, "")
                              .replace(/\u00a0/g, " ")
                          );
                      var g;
                    }
                    for (; f(t), t != n; ) (t = t.nextSibling), (l = !1);
                    return o;
                  })(r, n, c, t, l)
                ),
                p = Ge(r.doc, et(t, 0), et(l, Ke(r.doc, l).text.length));
              f.length > 1 && p.length > 1;
            )
              if (_(f) == _(p)) f.pop(), p.pop(), l--;
              else {
                if (f[0] != p[0]) break;
                f.shift(), p.shift(), t++;
              }
            for (
              var d = 0,
                h = 0,
                m = f[0],
                g = p[0],
                v = Math.min(m.length, g.length);
              d < v && m.charCodeAt(d) == g.charCodeAt(d);
            )
              ++d;
            for (
              var b = _(f),
                y = _(p),
                x = Math.min(
                  b.length - (1 == f.length ? d : 0),
                  y.length - (1 == p.length ? d : 0)
                );
              h < x &&
              b.charCodeAt(b.length - h - 1) == y.charCodeAt(y.length - h - 1);
            )
              ++h;
            if (1 == f.length && 1 == p.length && t == a.line)
              for (
                ;
                d &&
                d > a.ch &&
                b.charCodeAt(b.length - h - 1) ==
                  y.charCodeAt(y.length - h - 1);
              )
                d--, h++;
            (f[f.length - 1] = b
              .slice(0, b.length - h)
              .replace(/^\u200b+/, "")),
              (f[0] = f[0].slice(d).replace(/\u200b+$/, ""));
            var w = et(t, d),
              k = et(l, p.length ? _(p).length - h : 0);
            return f.length > 1 || f[0] || tt(w, k)
              ? (mo(r.doc, f, w, k, "+input"), !0)
              : void 0;
          }),
          (Ha.prototype.ensurePolled = function () {
            this.forceCompositionEnd();
          }),
          (Ha.prototype.reset = function () {
            this.forceCompositionEnd();
          }),
          (Ha.prototype.forceCompositionEnd = function () {
            this.composing &&
              (clearTimeout(this.readDOMTimeout),
              (this.composing = null),
              this.updateFromDOM(),
              this.div.blur(),
              this.div.focus());
          }),
          (Ha.prototype.readFromDOMSoon = function () {
            var e = this;
            null == this.readDOMTimeout &&
              (this.readDOMTimeout = setTimeout(function () {
                if (((e.readDOMTimeout = null), e.composing)) {
                  if (!e.composing.done) return;
                  e.composing = null;
                }
                e.updateFromDOM();
              }, 80));
          }),
          (Ha.prototype.updateFromDOM = function () {
            var e = this;
            (!this.cm.isReadOnly() && this.pollContent()) ||
              Jr(this.cm, function () {
                return fr(e.cm);
              });
          }),
          (Ha.prototype.setUneditable = function (e) {
            e.contentEditable = "false";
          }),
          (Ha.prototype.onKeyPress = function (e) {
            0 == e.charCode ||
              this.composing ||
              (e.preventDefault(),
              this.cm.isReadOnly() ||
                ei(this.cm, $a)(
                  this.cm,
                  String.fromCharCode(
                    null == e.charCode ? e.keyCode : e.charCode
                  ),
                  0
                ));
          }),
          (Ha.prototype.readOnlyChanged = function (e) {
            this.div.contentEditable = String("nocursor" != e);
          }),
          (Ha.prototype.onContextMenu = function () {}),
          (Ha.prototype.resetPosition = function () {}),
          (Ha.prototype.needsContentAttribute = !0);
        var Ua = function (e) {
          (this.cm = e),
            (this.prevInput = ""),
            (this.pollingFast = !1),
            (this.polling = new j()),
            (this.hasSelection = !1),
            (this.composing = null);
        };
        (Ua.prototype.init = function (e) {
          var t = this,
            n = this,
            r = this.cm;
          this.createField(e);
          var i = this.textarea;
          function o(e) {
            if (!me(r, e)) {
              if (r.somethingSelected())
                Ea({ lineWise: !1, text: r.getSelections() });
              else {
                if (!r.options.lineWiseCopyCut) return;
                var t = Fa(r);
                Ea({ lineWise: !0, text: t.text }),
                  "cut" == e.type
                    ? r.setSelections(t.ranges, null, B)
                    : ((n.prevInput = ""), (i.value = t.text.join("\n")), F(i));
              }
              "cut" == e.type && (r.state.cutIncoming = +new Date());
            }
          }
          e.wrapper.insertBefore(this.wrapper, e.wrapper.firstChild),
            m && (i.style.width = "0px"),
            fe(i, "input", function () {
              a && s >= 9 && t.hasSelection && (t.hasSelection = null),
                n.poll();
            }),
            fe(i, "paste", function (e) {
              me(r, e) ||
                za(e, r) ||
                ((r.state.pasteIncoming = +new Date()), n.fastPoll());
            }),
            fe(i, "cut", o),
            fe(i, "copy", o),
            fe(e.scroller, "paste", function (t) {
              if (!kn(e, t) && !me(r, t)) {
                if (!i.dispatchEvent)
                  return (r.state.pasteIncoming = +new Date()), void n.focus();
                var o = new Event("paste");
                (o.clipboardData = t.clipboardData), i.dispatchEvent(o);
              }
            }),
            fe(e.lineSpace, "selectstart", function (t) {
              kn(e, t) || ye(t);
            }),
            fe(i, "compositionstart", function () {
              var e = r.getCursor("from");
              n.composing && n.composing.range.clear(),
                (n.composing = {
                  start: e,
                  range: r.markText(e, r.getCursor("to"), {
                    className: "CodeMirror-composing",
                  }),
                });
            }),
            fe(i, "compositionend", function () {
              n.composing &&
                (n.poll(), n.composing.range.clear(), (n.composing = null));
            });
        }),
          (Ua.prototype.createField = function (e) {
            (this.wrapper = Da()), (this.textarea = this.wrapper.firstChild);
          }),
          (Ua.prototype.screenReaderLabelChanged = function (e) {
            e
              ? this.textarea.setAttribute("aria-label", e)
              : this.textarea.removeAttribute("aria-label");
          }),
          (Ua.prototype.prepareSelection = function () {
            var e = this.cm,
              t = e.display,
              n = e.doc,
              r = vr(e);
            if (e.options.moveInputWithCursor) {
              var i = Gn(e, n.sel.primary().head, "div"),
                o = t.wrapper.getBoundingClientRect(),
                a = t.lineDiv.getBoundingClientRect();
              (r.teTop = Math.max(
                0,
                Math.min(t.wrapper.clientHeight - 10, i.top + a.top - o.top)
              )),
                (r.teLeft = Math.max(
                  0,
                  Math.min(t.wrapper.clientWidth - 10, i.left + a.left - o.left)
                ));
            }
            return r;
          }),
          (Ua.prototype.showSelection = function (e) {
            var t = this.cm.display;
            N(t.cursorDiv, e.cursors),
              N(t.selectionDiv, e.selection),
              null != e.teTop &&
                ((this.wrapper.style.top = e.teTop + "px"),
                (this.wrapper.style.left = e.teLeft + "px"));
          }),
          (Ua.prototype.reset = function (e) {
            if (!this.contextMenuPending && !this.composing) {
              var t = this.cm;
              if (t.somethingSelected()) {
                this.prevInput = "";
                var n = t.getSelection();
                (this.textarea.value = n),
                  t.state.focused && F(this.textarea),
                  a && s >= 9 && (this.hasSelection = n);
              } else
                e ||
                  ((this.prevInput = this.textarea.value = ""),
                  a && s >= 9 && (this.hasSelection = null));
            }
          }),
          (Ua.prototype.getField = function () {
            return this.textarea;
          }),
          (Ua.prototype.supportsTouch = function () {
            return !1;
          }),
          (Ua.prototype.focus = function () {
            if (
              "nocursor" != this.cm.options.readOnly &&
              (!v || $() != this.textarea)
            )
              try {
                this.textarea.focus();
              } catch (e) {}
          }),
          (Ua.prototype.blur = function () {
            this.textarea.blur();
          }),
          (Ua.prototype.resetPosition = function () {
            this.wrapper.style.top = this.wrapper.style.left = 0;
          }),
          (Ua.prototype.receivedFocus = function () {
            this.slowPoll();
          }),
          (Ua.prototype.slowPoll = function () {
            var e = this;
            this.pollingFast ||
              this.polling.set(this.cm.options.pollInterval, function () {
                e.poll(), e.cm.state.focused && e.slowPoll();
              });
          }),
          (Ua.prototype.fastPoll = function () {
            var e = !1,
              t = this;
            (t.pollingFast = !0),
              t.polling.set(20, function n() {
                t.poll() || e
                  ? ((t.pollingFast = !1), t.slowPoll())
                  : ((e = !0), t.polling.set(60, n));
              });
          }),
          (Ua.prototype.poll = function () {
            var e = this,
              t = this.cm,
              n = this.textarea,
              r = this.prevInput;
            if (
              this.contextMenuPending ||
              !t.state.focused ||
              ($e(n) && !r && !this.composing) ||
              t.isReadOnly() ||
              t.options.disableInput ||
              t.state.keySeq
            )
              return !1;
            var i = n.value;
            if (i == r && !t.somethingSelected()) return !1;
            if (
              (a && s >= 9 && this.hasSelection === i) ||
              (b && /[\uf700-\uf7ff]/.test(i))
            )
              return t.display.input.reset(), !1;
            if (t.doc.sel == t.display.selForContextMenu) {
              var o = i.charCodeAt(0);
              if ((8203 != o || r || (r = "​"), 8666 == o))
                return this.reset(), this.cm.execCommand("undo");
            }
            for (
              var l = 0, c = Math.min(r.length, i.length);
              l < c && r.charCodeAt(l) == i.charCodeAt(l);
            )
              ++l;
            return (
              Jr(t, function () {
                $a(
                  t,
                  i.slice(l),
                  r.length - l,
                  null,
                  e.composing ? "*compose" : null
                ),
                  i.length > 1e3 || i.indexOf("\n") > -1
                    ? (n.value = e.prevInput = "")
                    : (e.prevInput = i),
                  e.composing &&
                    (e.composing.range.clear(),
                    (e.composing.range = t.markText(
                      e.composing.start,
                      t.getCursor("to"),
                      { className: "CodeMirror-composing" }
                    )));
              }),
              !0
            );
          }),
          (Ua.prototype.ensurePolled = function () {
            this.pollingFast && this.poll() && (this.pollingFast = !1);
          }),
          (Ua.prototype.onKeyPress = function () {
            a && s >= 9 && (this.hasSelection = null), this.fastPoll();
          }),
          (Ua.prototype.onContextMenu = function (e) {
            var t = this,
              n = t.cm,
              r = n.display,
              i = t.textarea;
            t.contextMenuPending && t.contextMenuPending();
            var o = cr(n, e),
              c = r.scroller.scrollTop;
            if (o && !f) {
              n.options.resetSelectionOnContextMenu &&
                -1 == n.doc.sel.contains(o) &&
                ei(n, Ji)(n.doc, Ti(o), B);
              var u,
                p = i.style.cssText,
                d = t.wrapper.style.cssText,
                h = t.wrapper.offsetParent.getBoundingClientRect();
              if (
                ((t.wrapper.style.cssText = "position: static"),
                (i.style.cssText =
                  "position: absolute; width: 30px; height: 30px;\n      top: " +
                  (e.clientY - h.top - 5) +
                  "px; left: " +
                  (e.clientX - h.left - 5) +
                  "px;\n      z-index: 1000; background: " +
                  (a ? "rgba(255, 255, 255, .05)" : "transparent") +
                  ";\n      outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);"),
                l && (u = window.scrollY),
                r.input.focus(),
                l && window.scrollTo(null, u),
                r.input.reset(),
                n.somethingSelected() || (i.value = t.prevInput = " "),
                (t.contextMenuPending = v),
                (r.selForContextMenu = n.doc.sel),
                clearTimeout(r.detectingSelectAll),
                a && s >= 9 && g(),
                C)
              ) {
                ke(e);
                var m = function () {
                  de(window, "mouseup", m), setTimeout(v, 20);
                };
                fe(window, "mouseup", m);
              } else setTimeout(v, 50);
            }
            function g() {
              if (null != i.selectionStart) {
                var e = n.somethingSelected(),
                  o = "​" + (e ? i.value : "");
                (i.value = "⇚"),
                  (i.value = o),
                  (t.prevInput = e ? "" : "​"),
                  (i.selectionStart = 1),
                  (i.selectionEnd = o.length),
                  (r.selForContextMenu = n.doc.sel);
              }
            }
            function v() {
              if (
                t.contextMenuPending == v &&
                ((t.contextMenuPending = !1),
                (t.wrapper.style.cssText = d),
                (i.style.cssText = p),
                a &&
                  s < 9 &&
                  r.scrollbars.setScrollTop((r.scroller.scrollTop = c)),
                null != i.selectionStart)
              ) {
                (!a || (a && s < 9)) && g();
                var e = 0,
                  o = function () {
                    r.selForContextMenu == n.doc.sel &&
                    0 == i.selectionStart &&
                    i.selectionEnd > 0 &&
                    "​" == t.prevInput
                      ? ei(n, so)(n)
                      : e++ < 10
                      ? (r.detectingSelectAll = setTimeout(o, 500))
                      : ((r.selForContextMenu = null), r.input.reset());
                  };
                r.detectingSelectAll = setTimeout(o, 200);
              }
            }
          }),
          (Ua.prototype.readOnlyChanged = function (e) {
            e || this.reset(), (this.textarea.disabled = "nocursor" == e);
          }),
          (Ua.prototype.setUneditable = function () {}),
          (Ua.prototype.needsContentAttribute = !1),
          (function (e) {
            var t = e.optionHandlers;
            function n(n, r, i, o) {
              (e.defaults[n] = r),
                i &&
                  (t[n] = o
                    ? function (e, t, n) {
                        n != ka && i(e, t, n);
                      }
                    : i);
            }
            (e.defineOption = n),
              (e.Init = ka),
              n(
                "value",
                "",
                function (e, t) {
                  return e.setValue(t);
                },
                !0
              ),
              n(
                "mode",
                null,
                function (e, t) {
                  (e.doc.modeOption = t), Oi(e);
                },
                !0
              ),
              n("indentUnit", 2, Oi, !0),
              n("indentWithTabs", !1),
              n("smartIndent", !0),
              n(
                "tabSize",
                4,
                function (e) {
                  Ei(e), Hn(e), fr(e);
                },
                !0
              ),
              n("lineSeparator", null, function (e, t) {
                if (((e.doc.lineSep = t), t)) {
                  var n = [],
                    r = e.doc.first;
                  e.doc.iter(function (e) {
                    for (var i = 0; ; ) {
                      var o = e.text.indexOf(t, i);
                      if (-1 == o) break;
                      (i = o + t.length), n.push(et(r, o));
                    }
                    r++;
                  });
                  for (var i = n.length - 1; i >= 0; i--)
                    mo(e.doc, t, n[i], et(n[i].line, n[i].ch + t.length));
                }
              }),
              n(
                "specialChars",
                /[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,
                function (e, t, n) {
                  (e.state.specialChars = new RegExp(
                    t.source + (t.test("\t") ? "" : "|\t"),
                    "g"
                  )),
                    n != ka && e.refresh();
                }
              ),
              n(
                "specialCharPlaceholder",
                Zt,
                function (e) {
                  return e.refresh();
                },
                !0
              ),
              n("electricChars", !0),
              n(
                "inputStyle",
                v ? "contenteditable" : "textarea",
                function () {
                  throw new Error(
                    "inputStyle can not (yet) be changed in a running editor"
                  );
                },
                !0
              ),
              n(
                "spellcheck",
                !1,
                function (e, t) {
                  return (e.getInputField().spellcheck = t);
                },
                !0
              ),
              n(
                "autocorrect",
                !1,
                function (e, t) {
                  return (e.getInputField().autocorrect = t);
                },
                !0
              ),
              n(
                "autocapitalize",
                !1,
                function (e, t) {
                  return (e.getInputField().autocapitalize = t);
                },
                !0
              ),
              n("rtlMoveVisually", !x),
              n("wholeLineUpdateBefore", !0),
              n(
                "theme",
                "default",
                function (e) {
                  wa(e), mi(e);
                },
                !0
              ),
              n("keyMap", "default", function (e, t, n) {
                var r = Yo(t),
                  i = n != ka && Yo(n);
                i && i.detach && i.detach(e, r),
                  r.attach && r.attach(e, i || null);
              }),
              n("extraKeys", null),
              n("configureMouse", null),
              n("lineWrapping", !1, La, !0),
              n(
                "gutters",
                [],
                function (e, t) {
                  (e.display.gutterSpecs = di(t, e.options.lineNumbers)), mi(e);
                },
                !0
              ),
              n(
                "fixedGutter",
                !0,
                function (e, t) {
                  (e.display.gutters.style.left = t
                    ? ar(e.display) + "px"
                    : "0"),
                    e.refresh();
                },
                !0
              ),
              n(
                "coverGutterNextToScrollbar",
                !1,
                function (e) {
                  return Rr(e);
                },
                !0
              ),
              n(
                "scrollbarStyle",
                "native",
                function (e) {
                  Vr(e),
                    Rr(e),
                    e.display.scrollbars.setScrollTop(e.doc.scrollTop),
                    e.display.scrollbars.setScrollLeft(e.doc.scrollLeft);
                },
                !0
              ),
              n(
                "lineNumbers",
                !1,
                function (e, t) {
                  (e.display.gutterSpecs = di(e.options.gutters, t)), mi(e);
                },
                !0
              ),
              n("firstLineNumber", 1, mi, !0),
              n(
                "lineNumberFormatter",
                function (e) {
                  return e;
                },
                mi,
                !0
              ),
              n("showCursorWhenSelecting", !1, gr, !0),
              n("resetSelectionOnContextMenu", !0),
              n("lineWiseCopyCut", !0),
              n("pasteLinesPerSelection", !0),
              n("selectionsMayTouch", !1),
              n("readOnly", !1, function (e, t) {
                "nocursor" == t && (Tr(e), e.display.input.blur()),
                  e.display.input.readOnlyChanged(t);
              }),
              n("screenReaderLabel", null, function (e, t) {
                (t = "" === t ? null : t),
                  e.display.input.screenReaderLabelChanged(t);
              }),
              n(
                "disableInput",
                !1,
                function (e, t) {
                  t || e.display.input.reset();
                },
                !0
              ),
              n("dragDrop", !0, Ta),
              n("allowDropFileTypes", null),
              n("cursorBlinkRate", 530),
              n("cursorScrollMargin", 0),
              n("cursorHeight", 1, gr, !0),
              n("singleCursorHeightPerLine", !0, gr, !0),
              n("workTime", 100),
              n("workDelay", 100),
              n("flattenSpans", !0, Ei, !0),
              n("addModeClass", !1, Ei, !0),
              n("pollInterval", 100),
              n("undoDepth", 200, function (e, t) {
                return (e.doc.history.undoDepth = t);
              }),
              n("historyEventDelay", 1250),
              n(
                "viewportMargin",
                10,
                function (e) {
                  return e.refresh();
                },
                !0
              ),
              n("maxHighlightLength", 1e4, Ei, !0),
              n("moveInputWithCursor", !0, function (e, t) {
                t || e.display.input.resetPosition();
              }),
              n("tabindex", null, function (e, t) {
                return (e.display.input.getField().tabIndex = t || "");
              }),
              n("autofocus", null),
              n(
                "direction",
                "ltr",
                function (e, t) {
                  return e.doc.setDirection(t);
                },
                !0
              ),
              n("phrases", null);
          })(Ma),
          (function (e) {
            var t = e.optionHandlers,
              n = (e.helpers = {});
            (e.prototype = {
              constructor: e,
              focus: function () {
                window.focus(), this.display.input.focus();
              },
              setOption: function (e, n) {
                var r = this.options,
                  i = r[e];
                (r[e] == n && "mode" != e) ||
                  ((r[e] = n),
                  t.hasOwnProperty(e) && ei(this, t[e])(this, n, i),
                  he(this, "optionChange", this, e));
              },
              getOption: function (e) {
                return this.options[e];
              },
              getDoc: function () {
                return this.doc;
              },
              addKeyMap: function (e, t) {
                this.state.keyMaps[t ? "push" : "unshift"](Yo(e));
              },
              removeKeyMap: function (e) {
                for (var t = this.state.keyMaps, n = 0; n < t.length; ++n)
                  if (t[n] == e || t[n].name == e) return t.splice(n, 1), !0;
              },
              addOverlay: ti(function (t, n) {
                var r = t.token ? t : e.getMode(this.options, t);
                if (r.startState)
                  throw new Error("Overlays may not be stateful.");
                !(function (e, t, n) {
                  for (var r = 0, i = n(t); r < e.length && n(e[r]) <= i; ) r++;
                  e.splice(r, 0, t);
                })(
                  this.state.overlays,
                  {
                    mode: r,
                    modeSpec: t,
                    opaque: n && n.opaque,
                    priority: (n && n.priority) || 0,
                  },
                  function (e) {
                    return e.priority;
                  }
                ),
                  this.state.modeGen++,
                  fr(this);
              }),
              removeOverlay: ti(function (e) {
                for (var t = this.state.overlays, n = 0; n < t.length; ++n) {
                  var r = t[n].modeSpec;
                  if (r == e || ("string" == typeof e && r.name == e))
                    return t.splice(n, 1), this.state.modeGen++, void fr(this);
                }
              }),
              indentLine: ti(function (e, t, n) {
                "string" != typeof t &&
                  "number" != typeof t &&
                  (t =
                    null == t
                      ? this.options.smartIndent
                        ? "smart"
                        : "prev"
                      : t
                      ? "add"
                      : "subtract"),
                  Ze(this.doc, e) && Aa(this, e, t, n);
              }),
              indentSelection: ti(function (e) {
                for (
                  var t = this.doc.sel.ranges, n = -1, r = 0;
                  r < t.length;
                  r++
                ) {
                  var i = t[r];
                  if (i.empty())
                    i.head.line > n &&
                      (Aa(this, i.head.line, e, !0),
                      (n = i.head.line),
                      r == this.doc.sel.primIndex && Er(this));
                  else {
                    var o = i.from(),
                      a = i.to(),
                      s = Math.max(n, o.line);
                    n = Math.min(this.lastLine(), a.line - (a.ch ? 0 : 1)) + 1;
                    for (var l = s; l < n; ++l) Aa(this, l, e);
                    var c = this.doc.sel.ranges;
                    0 == o.ch &&
                      t.length == c.length &&
                      c[r].from().ch > 0 &&
                      Yi(this.doc, r, new Ci(o, c[r].to()), B);
                  }
                }
              }),
              getTokenAt: function (e, t) {
                return bt(this, e, t);
              },
              getLineTokens: function (e, t) {
                return bt(this, et(e), t, !0);
              },
              getTokenTypeAt: function (e) {
                e = st(this.doc, e);
                var t,
                  n = pt(this, Ke(this.doc, e.line)),
                  r = 0,
                  i = (n.length - 1) / 2,
                  o = e.ch;
                if (0 == o) t = n[2];
                else
                  for (;;) {
                    var a = (r + i) >> 1;
                    if ((a ? n[2 * a - 1] : 0) >= o) i = a;
                    else {
                      if (!(n[2 * a + 1] < o)) {
                        t = n[2 * a + 2];
                        break;
                      }
                      r = a + 1;
                    }
                  }
                var s = t ? t.indexOf("overlay ") : -1;
                return s < 0 ? t : 0 == s ? null : t.slice(0, s - 1);
              },
              getModeAt: function (t) {
                var n = this.doc.mode;
                return n.innerMode
                  ? e.innerMode(n, this.getTokenAt(t).state).mode
                  : n;
              },
              getHelper: function (e, t) {
                return this.getHelpers(e, t)[0];
              },
              getHelpers: function (e, t) {
                var r = [];
                if (!n.hasOwnProperty(t)) return r;
                var i = n[t],
                  o = this.getModeAt(e);
                if ("string" == typeof o[t]) i[o[t]] && r.push(i[o[t]]);
                else if (o[t])
                  for (var a = 0; a < o[t].length; a++) {
                    var s = i[o[t][a]];
                    s && r.push(s);
                  }
                else
                  o.helperType && i[o.helperType]
                    ? r.push(i[o.helperType])
                    : i[o.name] && r.push(i[o.name]);
                for (var l = 0; l < i._global.length; l++) {
                  var c = i._global[l];
                  c.pred(o, this) && -1 == H(r, c.val) && r.push(c.val);
                }
                return r;
              },
              getStateAfter: function (e, t) {
                var n = this.doc;
                return dt(
                  this,
                  (e = at(n, null == e ? n.first + n.size - 1 : e)) + 1,
                  t
                ).state;
              },
              cursorCoords: function (e, t) {
                var n = this.doc.sel.primary();
                return Gn(
                  this,
                  null == e
                    ? n.head
                    : "object" == typeof e
                    ? st(this.doc, e)
                    : e
                    ? n.from()
                    : n.to(),
                  t || "page"
                );
              },
              charCoords: function (e, t) {
                return Kn(this, st(this.doc, e), t || "page");
              },
              coordsChar: function (e, t) {
                return Yn(this, (e = Un(this, e, t || "page")).left, e.top);
              },
              lineAtHeight: function (e, t) {
                return (
                  (e = Un(this, { top: e, left: 0 }, t || "page").top),
                  Qe(this.doc, e + this.display.viewOffset)
                );
              },
              heightAtLine: function (e, t, n) {
                var r,
                  i = !1;
                if ("number" == typeof e) {
                  var o = this.doc.first + this.doc.size - 1;
                  e < this.doc.first
                    ? (e = this.doc.first)
                    : e > o && ((e = o), (i = !0)),
                    (r = Ke(this.doc, e));
                } else r = e;
                return (
                  Vn(this, r, { top: 0, left: 0 }, t || "page", n || i).top +
                  (i ? this.doc.height - qt(r) : 0)
                );
              },
              defaultTextHeight: function () {
                return rr(this.display);
              },
              defaultCharWidth: function () {
                return ir(this.display);
              },
              getViewport: function () {
                return { from: this.display.viewFrom, to: this.display.viewTo };
              },
              addWidget: function (e, t, n, r, i) {
                var o,
                  a,
                  s,
                  l = this.display,
                  c = (e = Gn(this, st(this.doc, e))).bottom,
                  u = e.left;
                if (
                  ((t.style.position = "absolute"),
                  t.setAttribute("cm-ignore-events", "true"),
                  this.display.input.setUneditable(t),
                  l.sizer.appendChild(t),
                  "over" == r)
                )
                  c = e.top;
                else if ("above" == r || "near" == r) {
                  var f = Math.max(l.wrapper.clientHeight, this.doc.height),
                    p = Math.max(l.sizer.clientWidth, l.lineSpace.clientWidth);
                  ("above" == r || e.bottom + t.offsetHeight > f) &&
                  e.top > t.offsetHeight
                    ? (c = e.top - t.offsetHeight)
                    : e.bottom + t.offsetHeight <= f && (c = e.bottom),
                    u + t.offsetWidth > p && (u = p - t.offsetWidth);
                }
                (t.style.top = c + "px"),
                  (t.style.left = t.style.right = ""),
                  "right" == i
                    ? ((u = l.sizer.clientWidth - t.offsetWidth),
                      (t.style.right = "0px"))
                    : ("left" == i
                        ? (u = 0)
                        : "middle" == i &&
                          (u = (l.sizer.clientWidth - t.offsetWidth) / 2),
                      (t.style.left = u + "px")),
                  n &&
                    ((o = this),
                    (a = {
                      left: u,
                      top: c,
                      right: u + t.offsetWidth,
                      bottom: c + t.offsetHeight,
                    }),
                    null != (s = Ar(o, a)).scrollTop && Fr(o, s.scrollTop),
                    null != s.scrollLeft && Dr(o, s.scrollLeft));
              },
              triggerOnKeyDown: ti(ua),
              triggerOnKeyPress: ti(pa),
              triggerOnKeyUp: fa,
              triggerOnMouseDown: ti(ga),
              execCommand: function (e) {
                if (ta.hasOwnProperty(e)) return ta[e].call(null, this);
              },
              triggerElectric: ti(function (e) {
                Wa(this, e);
              }),
              findPosH: function (e, t, n, r) {
                var i = 1;
                t < 0 && ((i = -1), (t = -t));
                for (
                  var o = st(this.doc, e), a = 0;
                  a < t && !(o = Ia(this.doc, o, i, n, r)).hitSide;
                  ++a
                );
                return o;
              },
              moveH: ti(function (e, t) {
                var n = this;
                this.extendSelectionsBy(function (r) {
                  return n.display.shift || n.doc.extend || r.empty()
                    ? Ia(n.doc, r.head, e, t, n.options.rtlMoveVisually)
                    : e < 0
                    ? r.from()
                    : r.to();
                }, V);
              }),
              deleteH: ti(function (e, t) {
                var n = this.doc.sel,
                  r = this.doc;
                n.somethingSelected()
                  ? r.replaceSelection("", null, "+delete")
                  : Qo(this, function (n) {
                      var i = Ia(r, n.head, e, t, !1);
                      return e < 0
                        ? { from: i, to: n.head }
                        : { from: n.head, to: i };
                    });
              }),
              findPosV: function (e, t, n, r) {
                var i = 1,
                  o = r;
                t < 0 && ((i = -1), (t = -t));
                for (var a = st(this.doc, e), s = 0; s < t; ++s) {
                  var l = Gn(this, a, "div");
                  if (
                    (null == o ? (o = l.left) : (l.left = o),
                    (a = ja(this, l, i, n)).hitSide)
                  )
                    break;
                }
                return a;
              },
              moveV: ti(function (e, t) {
                var n = this,
                  r = this.doc,
                  i = [],
                  o =
                    !this.display.shift &&
                    !r.extend &&
                    r.sel.somethingSelected();
                if (
                  (r.extendSelectionsBy(function (a) {
                    if (o) return e < 0 ? a.from() : a.to();
                    var s = Gn(n, a.head, "div");
                    null != a.goalColumn && (s.left = a.goalColumn),
                      i.push(s.left);
                    var l = ja(n, s, e, t);
                    return (
                      "page" == t &&
                        a == r.sel.primary() &&
                        Or(n, Kn(n, l, "div").top - s.top),
                      l
                    );
                  }, V),
                  i.length)
                )
                  for (var a = 0; a < r.sel.ranges.length; a++)
                    r.sel.ranges[a].goalColumn = i[a];
              }),
              findWordAt: function (e) {
                var t = Ke(this.doc, e.line).text,
                  n = e.ch,
                  r = e.ch;
                if (t) {
                  var i = this.getHelper(e, "wordChars");
                  ("before" != e.sticky && r != t.length) || !n ? ++r : --n;
                  for (
                    var o = t.charAt(n),
                      a = ee(o, i)
                        ? function (e) {
                            return ee(e, i);
                          }
                        : /\s/.test(o)
                        ? function (e) {
                            return /\s/.test(e);
                          }
                        : function (e) {
                            return !/\s/.test(e) && !ee(e);
                          };
                    n > 0 && a(t.charAt(n - 1));
                  )
                    --n;
                  for (; r < t.length && a(t.charAt(r)); ) ++r;
                }
                return new Ci(et(e.line, n), et(e.line, r));
              },
              toggleOverwrite: function (e) {
                (null != e && e == this.state.overwrite) ||
                  ((this.state.overwrite = !this.state.overwrite)
                    ? z(this.display.cursorDiv, "CodeMirror-overwrite")
                    : L(this.display.cursorDiv, "CodeMirror-overwrite"),
                  he(this, "overwriteToggle", this, this.state.overwrite));
              },
              hasFocus: function () {
                return this.display.input.getField() == $();
              },
              isReadOnly: function () {
                return !(!this.options.readOnly && !this.doc.cantEdit);
              },
              scrollTo: ti(function (e, t) {
                $r(this, e, t);
              }),
              getScrollInfo: function () {
                var e = this.display.scroller;
                return {
                  left: e.scrollLeft,
                  top: e.scrollTop,
                  height: e.scrollHeight - Ln(this) - this.display.barHeight,
                  width: e.scrollWidth - Ln(this) - this.display.barWidth,
                  clientHeight: Nn(this),
                  clientWidth: Mn(this),
                };
              },
              scrollIntoView: ti(function (e, t) {
                null == e
                  ? ((e = { from: this.doc.sel.primary().head, to: null }),
                    null == t && (t = this.options.cursorScrollMargin))
                  : "number" == typeof e
                  ? (e = { from: et(e, 0), to: null })
                  : null == e.from && (e = { from: e, to: null }),
                  e.to || (e.to = e.from),
                  (e.margin = t || 0),
                  null != e.from.line
                    ? (function (e, t) {
                        zr(e), (e.curOp.scrollToPos = t);
                      })(this, e)
                    : Wr(this, e.from, e.to, e.margin);
              }),
              setSize: ti(function (e, t) {
                var n = this,
                  r = function (e) {
                    return "number" == typeof e || /^\d+$/.test(String(e))
                      ? e + "px"
                      : e;
                  };
                null != e && (this.display.wrapper.style.width = r(e)),
                  null != t && (this.display.wrapper.style.height = r(t)),
                  this.options.lineWrapping && jn(this);
                var i = this.display.viewFrom;
                this.doc.iter(i, this.display.viewTo, function (e) {
                  if (e.widgets)
                    for (var t = 0; t < e.widgets.length; t++)
                      if (e.widgets[t].noHScroll) {
                        pr(n, i, "widget");
                        break;
                      }
                  ++i;
                }),
                  (this.curOp.forceUpdate = !0),
                  he(this, "refresh", this);
              }),
              operation: function (e) {
                return Jr(this, e);
              },
              startOperation: function () {
                return Kr(this);
              },
              endOperation: function () {
                return Gr(this);
              },
              refresh: ti(function () {
                var e = this.display.cachedTextHeight;
                fr(this),
                  (this.curOp.forceUpdate = !0),
                  Hn(this),
                  $r(this, this.doc.scrollLeft, this.doc.scrollTop),
                  ci(this.display),
                  (null == e ||
                    Math.abs(e - rr(this.display)) > 0.5 ||
                    this.options.lineWrapping) &&
                    lr(this),
                  he(this, "refresh", this);
              }),
              swapDoc: ti(function (e) {
                var t = this.doc;
                return (
                  (t.cm = null),
                  this.state.selectingText && this.state.selectingText(),
                  Fi(this, e),
                  Hn(this),
                  this.display.input.reset(),
                  $r(this, e.scrollLeft, e.scrollTop),
                  (this.curOp.forceScroll = !0),
                  ln(this, "swapDoc", this, t),
                  t
                );
              }),
              phrase: function (e) {
                var t = this.options.phrases;
                return t && Object.prototype.hasOwnProperty.call(t, e)
                  ? t[e]
                  : e;
              },
              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;
              },
            }),
              be(e),
              (e.registerHelper = function (t, r, i) {
                n.hasOwnProperty(t) || (n[t] = e[t] = { _global: [] }),
                  (n[t][r] = i);
              }),
              (e.registerGlobalHelper = function (t, r, i, o) {
                e.registerHelper(t, r, o),
                  n[t]._global.push({ pred: i, val: o });
              });
          })(Ma);
        var Ka = "iter insert remove copy getEditor constructor".split(" ");
        for (var Ga in Eo.prototype)
          Eo.prototype.hasOwnProperty(Ga) &&
            H(Ka, Ga) < 0 &&
            (Ma.prototype[Ga] = (function (e) {
              return function () {
                return e.apply(this.doc, arguments);
              };
            })(Eo.prototype[Ga]));
        return (
          be(Eo),
          (Ma.inputStyles = { textarea: Ua, contenteditable: Ha }),
          (Ma.defineMode = function (e) {
            Ma.defaults.mode || "null" == e || (Ma.defaults.mode = e),
              De.apply(this, arguments);
          }),
          (Ma.defineMIME = function (e, t) {
            Pe[e] = t;
          }),
          Ma.defineMode("null", function () {
            return {
              token: function (e) {
                return e.skipToEnd();
              },
            };
          }),
          Ma.defineMIME("text/plain", "null"),
          (Ma.defineExtension = function (e, t) {
            Ma.prototype[e] = t;
          }),
          (Ma.defineDocExtension = function (e, t) {
            Eo.prototype[e] = t;
          }),
          (Ma.fromTextArea = function (e, t) {
            if (
              (((t = t ? D(t) : {}).value = e.value),
              !t.tabindex && e.tabIndex && (t.tabindex = e.tabIndex),
              !t.placeholder &&
                e.placeholder &&
                (t.placeholder = e.placeholder),
              null == t.autofocus)
            ) {
              var n = $();
              t.autofocus =
                n == e ||
                (null != e.getAttribute("autofocus") && n == document.body);
            }
            function r() {
              e.value = s.getValue();
            }
            var i;
            if (
              e.form &&
              (fe(e.form, "submit", r), !t.leaveSubmitMethodAlone)
            ) {
              var o = e.form;
              i = o.submit;
              try {
                var a = (o.submit = function () {
                  r(), (o.submit = i), o.submit(), (o.submit = a);
                });
              } catch (e) {}
            }
            (t.finishInit = function (n) {
              (n.save = r),
                (n.getTextArea = function () {
                  return e;
                }),
                (n.toTextArea = function () {
                  (n.toTextArea = isNaN),
                    r(),
                    e.parentNode.removeChild(n.getWrapperElement()),
                    (e.style.display = ""),
                    e.form &&
                      (de(e.form, "submit", r),
                      t.leaveSubmitMethodAlone ||
                        "function" != typeof e.form.submit ||
                        (e.form.submit = i));
                });
            }),
              (e.style.display = "none");
            var s = Ma(function (t) {
              return e.parentNode.insertBefore(t, e.nextSibling);
            }, t);
            return s;
          }),
          (function (e) {
            (e.off = de),
              (e.on = fe),
              (e.wheelEventPixels = xi),
              (e.Doc = Eo),
              (e.splitLines = Ee),
              (e.countColumn = I),
              (e.findColumn = U),
              (e.isWordChar = J),
              (e.Pass = R),
              (e.signal = he),
              (e.Line = Kt),
              (e.changeEnd = Li),
              (e.scrollbarModel = qr),
              (e.Pos = et),
              (e.cmpPos = tt),
              (e.modes = Fe),
              (e.mimeModes = Pe),
              (e.resolveMode = Ie),
              (e.getMode = je),
              (e.modeExtensions = He),
              (e.extendMode = Re),
              (e.copyState = Be),
              (e.startState = Ve),
              (e.innerMode = qe),
              (e.commands = ta),
              (e.keyMap = qo),
              (e.keyName = Xo),
              (e.isModifierKey = Go),
              (e.lookupKey = Ko),
              (e.normalizeKeyMap = Uo),
              (e.StringStream = Ue),
              (e.SharedTextMarker = Mo),
              (e.TextMarker = To),
              (e.LineWidget = ko),
              (e.e_preventDefault = ye),
              (e.e_stopPropagation = xe),
              (e.e_stop = ke),
              (e.addClass = z),
              (e.contains = E),
              (e.rmClass = L),
              (e.keyNames = jo);
          })(Ma),
          (Ma.version = "5.56.0"),
          Ma
        );
      })();
    },
    bXjK: function (e, t, n) {
      !(function (e) {
        "use strict";
        e.defineOption("fullScreen", !1, function (t, n, r) {
          r == e.Init && (r = !1),
            !r != !n &&
              (n
                ? (function (e) {
                    var t = e.getWrapperElement();
                    (e.state.fullScreenRestore = {
                      scrollTop: window.pageYOffset,
                      scrollLeft: window.pageXOffset,
                      width: t.style.width,
                      height: t.style.height,
                    }),
                      (t.style.width = ""),
                      (t.style.height = "auto"),
                      (t.className += " CodeMirror-fullscreen"),
                      (document.documentElement.style.overflow = "hidden"),
                      e.refresh();
                  })(t)
                : (function (e) {
                    var t = e.getWrapperElement();
                    (t.className = t.className.replace(
                      /\s*CodeMirror-fullscreen\b/,
                      ""
                    )),
                      (document.documentElement.style.overflow = "");
                    var n = e.state.fullScreenRestore;
                    (t.style.width = n.width),
                      (t.style.height = n.height),
                      window.scrollTo(n.scrollLeft, n.scrollTop),
                      e.refresh();
                  })(t));
        });
      })(n("VrN/"));
    },
    ewDg: function (e, t, n) {
      !(function (e) {
        "use strict";
        function t(e) {
          for (var t = {}, n = 0; n < e.length; ++n) t[e[n].toLowerCase()] = !0;
          return t;
        }
        e.defineMode("css", function (t, n) {
          var r = n.inline;
          n.propertyKeywords || (n = e.resolveMode("text/css"));
          var i,
            o,
            a = t.indentUnit,
            s = n.tokenHooks,
            l = n.documentTypes || {},
            c = n.mediaTypes || {},
            u = n.mediaFeatures || {},
            f = n.mediaValueKeywords || {},
            p = n.propertyKeywords || {},
            d = n.nonStandardPropertyKeywords || {},
            h = n.fontProperties || {},
            m = n.counterDescriptors || {},
            g = n.colorKeywords || {},
            v = n.valueKeywords || {},
            b = n.allowNested,
            y = n.lineComment,
            x = !0 === n.supportsAtComponent;
          function w(e, t) {
            return (i = t), e;
          }
          function k(e, t) {
            var n = e.next();
            if (s[n]) {
              var r = s[n](e, t);
              if (!1 !== r) return r;
            }
            return "@" == n
              ? (e.eatWhile(/[\w\\\-]/), w("def", e.current()))
              : "=" == n || (("~" == n || "|" == n) && e.eat("="))
              ? w(null, "compare")
              : '"' == n || "'" == n
              ? ((t.tokenize = C(n)), t.tokenize(e, t))
              : "#" == n
              ? (e.eatWhile(/[\w\\\-]/), w("atom", "hash"))
              : "!" == n
              ? (e.match(/^\s*\w*/), w("keyword", "important"))
              : /\d/.test(n) || ("." == n && e.eat(/\d/))
              ? (e.eatWhile(/[\w.%]/), w("number", "unit"))
              : "-" !== n
              ? /[,+>*\/]/.test(n)
                ? w(null, "select-op")
                : "." == n && e.match(/^-?[_a-z][_a-z0-9-]*/i)
                ? w("qualifier", "qualifier")
                : /[:;{}\[\]\(\)]/.test(n)
                ? w(null, n)
                : e.match(/[\w-.]+(?=\()/)
                ? (/^(url(-prefix)?|domain|regexp)$/.test(
                    e.current().toLowerCase()
                  ) && (t.tokenize = S),
                  w("variable callee", "variable"))
                : /[\w\\\-]/.test(n)
                ? (e.eatWhile(/[\w\\\-]/), w("property", "word"))
                : w(null, null)
              : /[\d.]/.test(e.peek())
              ? (e.eatWhile(/[\w.%]/), w("number", "unit"))
              : e.match(/^-[\w\\\-]*/)
              ? (e.eatWhile(/[\w\\\-]/),
                e.match(/^\s*:/, !1)
                  ? w("variable-2", "variable-definition")
                  : w("variable-2", "variable"))
              : e.match(/^\w+-/)
              ? w("meta", "meta")
              : void 0;
          }
          function C(e) {
            return function (t, n) {
              for (var r, i = !1; null != (r = t.next()); ) {
                if (r == e && !i) {
                  ")" == e && t.backUp(1);
                  break;
                }
                i = !i && "\\" == r;
              }
              return (
                (r == e || (!i && ")" != e)) && (n.tokenize = null),
                w("string", "string")
              );
            };
          }
          function S(e, t) {
            return (
              e.next(),
              e.match(/\s*[\"\')]/, !1)
                ? (t.tokenize = null)
                : (t.tokenize = C(")")),
              w(null, "(")
            );
          }
          function T(e, t, n) {
            (this.type = e), (this.indent = t), (this.prev = n);
          }
          function L(e, t, n, r) {
            return (
              (e.context = new T(
                n,
                t.indentation() + (!1 === r ? 0 : a),
                e.context
              )),
              n
            );
          }
          function M(e) {
            return (
              e.context.prev && (e.context = e.context.prev), e.context.type
            );
          }
          function N(e, t, n) {
            return E[n.context.type](e, t, n);
          }
          function A(e, t, n, r) {
            for (var i = r || 1; i > 0; i--) n.context = n.context.prev;
            return N(e, t, n);
          }
          function O(e) {
            var t = e.current().toLowerCase();
            o = v.hasOwnProperty(t)
              ? "atom"
              : g.hasOwnProperty(t)
              ? "keyword"
              : "variable";
          }
          var E = {
            top: function (e, t, n) {
              if ("{" == e) return L(n, t, "block");
              if ("}" == e && n.context.prev) return M(n);
              if (x && /@component/i.test(e))
                return L(n, t, "atComponentBlock");
              if (/^@(-moz-)?document$/i.test(e))
                return L(n, t, "documentTypes");
              if (/^@(media|supports|(-moz-)?document|import)$/i.test(e))
                return L(n, t, "atBlock");
              if (/^@(font-face|counter-style)/i.test(e))
                return (n.stateArg = e), "restricted_atBlock_before";
              if (/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(e))
                return "keyframes";
              if (e && "@" == e.charAt(0)) return L(n, t, "at");
              if ("hash" == e) o = "builtin";
              else if ("word" == e) o = "tag";
              else {
                if ("variable-definition" == e) return "maybeprop";
                if ("interpolation" == e) return L(n, t, "interpolation");
                if (":" == e) return "pseudo";
                if (b && "(" == e) return L(n, t, "parens");
              }
              return n.context.type;
            },
            block: function (e, t, n) {
              if ("word" == e) {
                var r = t.current().toLowerCase();
                return p.hasOwnProperty(r)
                  ? ((o = "property"), "maybeprop")
                  : d.hasOwnProperty(r)
                  ? ((o = "string-2"), "maybeprop")
                  : b
                  ? ((o = t.match(/^\s*:(?:\s|$)/, !1) ? "property" : "tag"),
                    "block")
                  : ((o += " error"), "maybeprop");
              }
              return "meta" == e
                ? "block"
                : b || ("hash" != e && "qualifier" != e)
                ? E.top(e, t, n)
                : ((o = "error"), "block");
            },
            maybeprop: function (e, t, n) {
              return ":" == e ? L(n, t, "prop") : N(e, t, n);
            },
            prop: function (e, t, n) {
              if (";" == e) return M(n);
              if ("{" == e && b) return L(n, t, "propBlock");
              if ("}" == e || "{" == e) return A(e, t, n);
              if ("(" == e) return L(n, t, "parens");
              if (
                "hash" != e ||
                /^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(
                  t.current()
                )
              ) {
                if ("word" == e) O(t);
                else if ("interpolation" == e) return L(n, t, "interpolation");
              } else o += " error";
              return "prop";
            },
            propBlock: function (e, t, n) {
              return "}" == e
                ? M(n)
                : "word" == e
                ? ((o = "property"), "maybeprop")
                : n.context.type;
            },
            parens: function (e, t, n) {
              return "{" == e || "}" == e
                ? A(e, t, n)
                : ")" == e
                ? M(n)
                : "(" == e
                ? L(n, t, "parens")
                : "interpolation" == e
                ? L(n, t, "interpolation")
                : ("word" == e && O(t), "parens");
            },
            pseudo: function (e, t, n) {
              return "meta" == e
                ? "pseudo"
                : "word" == e
                ? ((o = "variable-3"), n.context.type)
                : N(e, t, n);
            },
            documentTypes: function (e, t, n) {
              return "word" == e && l.hasOwnProperty(t.current())
                ? ((o = "tag"), n.context.type)
                : E.atBlock(e, t, n);
            },
            atBlock: function (e, t, n) {
              if ("(" == e) return L(n, t, "atBlock_parens");
              if ("}" == e || ";" == e) return A(e, t, n);
              if ("{" == e) return M(n) && L(n, t, b ? "block" : "top");
              if ("interpolation" == e) return L(n, t, "interpolation");
              if ("word" == e) {
                var r = t.current().toLowerCase();
                o =
                  "only" == r || "not" == r || "and" == r || "or" == r
                    ? "keyword"
                    : c.hasOwnProperty(r)
                    ? "attribute"
                    : u.hasOwnProperty(r)
                    ? "property"
                    : f.hasOwnProperty(r)
                    ? "keyword"
                    : p.hasOwnProperty(r)
                    ? "property"
                    : d.hasOwnProperty(r)
                    ? "string-2"
                    : v.hasOwnProperty(r)
                    ? "atom"
                    : g.hasOwnProperty(r)
                    ? "keyword"
                    : "error";
              }
              return n.context.type;
            },
            atComponentBlock: function (e, t, n) {
              return "}" == e
                ? A(e, t, n)
                : "{" == e
                ? M(n) && L(n, t, b ? "block" : "top", !1)
                : ("word" == e && (o = "error"), n.context.type);
            },
            atBlock_parens: function (e, t, n) {
              return ")" == e
                ? M(n)
                : "{" == e || "}" == e
                ? A(e, t, n, 2)
                : E.atBlock(e, t, n);
            },
            restricted_atBlock_before: function (e, t, n) {
              return "{" == e
                ? L(n, t, "restricted_atBlock")
                : "word" == e && "@counter-style" == n.stateArg
                ? ((o = "variable"), "restricted_atBlock_before")
                : N(e, t, n);
            },
            restricted_atBlock: function (e, t, n) {
              return "}" == e
                ? ((n.stateArg = null), M(n))
                : "word" == e
                ? ((o =
                    ("@font-face" == n.stateArg &&
                      !h.hasOwnProperty(t.current().toLowerCase())) ||
                    ("@counter-style" == n.stateArg &&
                      !m.hasOwnProperty(t.current().toLowerCase()))
                      ? "error"
                      : "property"),
                  "maybeprop")
                : "restricted_atBlock";
            },
            keyframes: function (e, t, n) {
              return "word" == e
                ? ((o = "variable"), "keyframes")
                : "{" == e
                ? L(n, t, "top")
                : N(e, t, n);
            },
            at: function (e, t, n) {
              return ";" == e
                ? M(n)
                : "{" == e || "}" == e
                ? A(e, t, n)
                : ("word" == e ? (o = "tag") : "hash" == e && (o = "builtin"),
                  "at");
            },
            interpolation: function (e, t, n) {
              return "}" == e
                ? M(n)
                : "{" == e || ";" == e
                ? A(e, t, n)
                : ("word" == e
                    ? (o = "variable")
                    : "variable" != e && "(" != e && ")" != e && (o = "error"),
                  "interpolation");
            },
          };
          return {
            startState: function (e) {
              return {
                tokenize: null,
                state: r ? "block" : "top",
                stateArg: null,
                context: new T(r ? "block" : "top", e || 0, null),
              };
            },
            token: function (e, t) {
              if (!t.tokenize && e.eatSpace()) return null;
              var n = (t.tokenize || k)(e, t);
              return (
                n && "object" == typeof n && ((i = n[1]), (n = n[0])),
                (o = n),
                "comment" != i && (t.state = E[t.state](i, e, t)),
                o
              );
            },
            indent: function (e, t) {
              var n = e.context,
                r = t && t.charAt(0),
                i = n.indent;
              return (
                "prop" != n.type || ("}" != r && ")" != r) || (n = n.prev),
                n.prev &&
                  ("}" != r ||
                  ("block" != n.type &&
                    "top" != n.type &&
                    "interpolation" != n.type &&
                    "restricted_atBlock" != n.type)
                    ? ((")" != r ||
                        ("parens" != n.type && "atBlock_parens" != n.type)) &&
                        ("{" != r ||
                          ("at" != n.type && "atBlock" != n.type))) ||
                      (i = Math.max(0, n.indent - a))
                    : (i = (n = n.prev).indent)),
                i
              );
            },
            electricChars: "}",
            blockCommentStart: "/*",
            blockCommentEnd: "*/",
            blockCommentContinue: " * ",
            lineComment: y,
            fold: "brace",
          };
        });
        var n = ["domain", "regexp", "url", "url-prefix"],
          r = t(n),
          i = [
            "all",
            "aural",
            "braille",
            "handheld",
            "print",
            "projection",
            "screen",
            "tty",
            "tv",
            "embossed",
          ],
          o = t(i),
          a = [
            "width",
            "min-width",
            "max-width",
            "height",
            "min-height",
            "max-height",
            "device-width",
            "min-device-width",
            "max-device-width",
            "device-height",
            "min-device-height",
            "max-device-height",
            "aspect-ratio",
            "min-aspect-ratio",
            "max-aspect-ratio",
            "device-aspect-ratio",
            "min-device-aspect-ratio",
            "max-device-aspect-ratio",
            "color",
            "min-color",
            "max-color",
            "color-index",
            "min-color-index",
            "max-color-index",
            "monochrome",
            "min-monochrome",
            "max-monochrome",
            "resolution",
            "min-resolution",
            "max-resolution",
            "scan",
            "grid",
            "orientation",
            "device-pixel-ratio",
            "min-device-pixel-ratio",
            "max-device-pixel-ratio",
            "pointer",
            "any-pointer",
            "hover",
            "any-hover",
          ],
          s = t(a),
          l = [
            "landscape",
            "portrait",
            "none",
            "coarse",
            "fine",
            "on-demand",
            "hover",
            "interlace",
            "progressive",
          ],
          c = t(l),
          u = [
            "align-content",
            "align-items",
            "align-self",
            "alignment-adjust",
            "alignment-baseline",
            "anchor-point",
            "animation",
            "animation-delay",
            "animation-direction",
            "animation-duration",
            "animation-fill-mode",
            "animation-iteration-count",
            "animation-name",
            "animation-play-state",
            "animation-timing-function",
            "appearance",
            "azimuth",
            "backdrop-filter",
            "backface-visibility",
            "background",
            "background-attachment",
            "background-blend-mode",
            "background-clip",
            "background-color",
            "background-image",
            "background-origin",
            "background-position",
            "background-position-x",
            "background-position-y",
            "background-repeat",
            "background-size",
            "baseline-shift",
            "binding",
            "bleed",
            "block-size",
            "bookmark-label",
            "bookmark-level",
            "bookmark-state",
            "bookmark-target",
            "border",
            "border-bottom",
            "border-bottom-color",
            "border-bottom-left-radius",
            "border-bottom-right-radius",
            "border-bottom-style",
            "border-bottom-width",
            "border-collapse",
            "border-color",
            "border-image",
            "border-image-outset",
            "border-image-repeat",
            "border-image-slice",
            "border-image-source",
            "border-image-width",
            "border-left",
            "border-left-color",
            "border-left-style",
            "border-left-width",
            "border-radius",
            "border-right",
            "border-right-color",
            "border-right-style",
            "border-right-width",
            "border-spacing",
            "border-style",
            "border-top",
            "border-top-color",
            "border-top-left-radius",
            "border-top-right-radius",
            "border-top-style",
            "border-top-width",
            "border-width",
            "bottom",
            "box-decoration-break",
            "box-shadow",
            "box-sizing",
            "break-after",
            "break-before",
            "break-inside",
            "caption-side",
            "caret-color",
            "clear",
            "clip",
            "color",
            "color-profile",
            "column-count",
            "column-fill",
            "column-gap",
            "column-rule",
            "column-rule-color",
            "column-rule-style",
            "column-rule-width",
            "column-span",
            "column-width",
            "columns",
            "contain",
            "content",
            "counter-increment",
            "counter-reset",
            "crop",
            "cue",
            "cue-after",
            "cue-before",
            "cursor",
            "direction",
            "display",
            "dominant-baseline",
            "drop-initial-after-adjust",
            "drop-initial-after-align",
            "drop-initial-before-adjust",
            "drop-initial-before-align",
            "drop-initial-size",
            "drop-initial-value",
            "elevation",
            "empty-cells",
            "fit",
            "fit-position",
            "flex",
            "flex-basis",
            "flex-direction",
            "flex-flow",
            "flex-grow",
            "flex-shrink",
            "flex-wrap",
            "float",
            "float-offset",
            "flow-from",
            "flow-into",
            "font",
            "font-family",
            "font-feature-settings",
            "font-kerning",
            "font-language-override",
            "font-optical-sizing",
            "font-size",
            "font-size-adjust",
            "font-stretch",
            "font-style",
            "font-synthesis",
            "font-variant",
            "font-variant-alternates",
            "font-variant-caps",
            "font-variant-east-asian",
            "font-variant-ligatures",
            "font-variant-numeric",
            "font-variant-position",
            "font-variation-settings",
            "font-weight",
            "gap",
            "grid",
            "grid-area",
            "grid-auto-columns",
            "grid-auto-flow",
            "grid-auto-rows",
            "grid-column",
            "grid-column-end",
            "grid-column-gap",
            "grid-column-start",
            "grid-gap",
            "grid-row",
            "grid-row-end",
            "grid-row-gap",
            "grid-row-start",
            "grid-template",
            "grid-template-areas",
            "grid-template-columns",
            "grid-template-rows",
            "hanging-punctuation",
            "height",
            "hyphens",
            "icon",
            "image-orientation",
            "image-rendering",
            "image-resolution",
            "inline-box-align",
            "inset",
            "inset-block",
            "inset-block-end",
            "inset-block-start",
            "inset-inline",
            "inset-inline-end",
            "inset-inline-start",
            "isolation",
            "justify-content",
            "justify-items",
            "justify-self",
            "left",
            "letter-spacing",
            "line-break",
            "line-height",
            "line-height-step",
            "line-stacking",
            "line-stacking-ruby",
            "line-stacking-shift",
            "line-stacking-strategy",
            "list-style",
            "list-style-image",
            "list-style-position",
            "list-style-type",
            "margin",
            "margin-bottom",
            "margin-left",
            "margin-right",
            "margin-top",
            "marks",
            "marquee-direction",
            "marquee-loop",
            "marquee-play-count",
            "marquee-speed",
            "marquee-style",
            "max-block-size",
            "max-height",
            "max-inline-size",
            "max-width",
            "min-block-size",
            "min-height",
            "min-inline-size",
            "min-width",
            "mix-blend-mode",
            "move-to",
            "nav-down",
            "nav-index",
            "nav-left",
            "nav-right",
            "nav-up",
            "object-fit",
            "object-position",
            "offset",
            "offset-anchor",
            "offset-distance",
            "offset-path",
            "offset-position",
            "offset-rotate",
            "opacity",
            "order",
            "orphans",
            "outline",
            "outline-color",
            "outline-offset",
            "outline-style",
            "outline-width",
            "overflow",
            "overflow-style",
            "overflow-wrap",
            "overflow-x",
            "overflow-y",
            "padding",
            "padding-bottom",
            "padding-left",
            "padding-right",
            "padding-top",
            "page",
            "page-break-after",
            "page-break-before",
            "page-break-inside",
            "page-policy",
            "pause",
            "pause-after",
            "pause-before",
            "perspective",
            "perspective-origin",
            "pitch",
            "pitch-range",
            "place-content",
            "place-items",
            "place-self",
            "play-during",
            "position",
            "presentation-level",
            "punctuation-trim",
            "quotes",
            "region-break-after",
            "region-break-before",
            "region-break-inside",
            "region-fragment",
            "rendering-intent",
            "resize",
            "rest",
            "rest-after",
            "rest-before",
            "richness",
            "right",
            "rotate",
            "rotation",
            "rotation-point",
            "row-gap",
            "ruby-align",
            "ruby-overhang",
            "ruby-position",
            "ruby-span",
            "scale",
            "scroll-behavior",
            "scroll-margin",
            "scroll-margin-block",
            "scroll-margin-block-end",
            "scroll-margin-block-start",
            "scroll-margin-bottom",
            "scroll-margin-inline",
            "scroll-margin-inline-end",
            "scroll-margin-inline-start",
            "scroll-margin-left",
            "scroll-margin-right",
            "scroll-margin-top",
            "scroll-padding",
            "scroll-padding-block",
            "scroll-padding-block-end",
            "scroll-padding-block-start",
            "scroll-padding-bottom",
            "scroll-padding-inline",
            "scroll-padding-inline-end",
            "scroll-padding-inline-start",
            "scroll-padding-left",
            "scroll-padding-right",
            "scroll-padding-top",
            "scroll-snap-align",
            "scroll-snap-type",
            "shape-image-threshold",
            "shape-inside",
            "shape-margin",
            "shape-outside",
            "size",
            "speak",
            "speak-as",
            "speak-header",
            "speak-numeral",
            "speak-punctuation",
            "speech-rate",
            "stress",
            "string-set",
            "tab-size",
            "table-layout",
            "target",
            "target-name",
            "target-new",
            "target-position",
            "text-align",
            "text-align-last",
            "text-combine-upright",
            "text-decoration",
            "text-decoration-color",
            "text-decoration-line",
            "text-decoration-skip",
            "text-decoration-skip-ink",
            "text-decoration-style",
            "text-emphasis",
            "text-emphasis-color",
            "text-emphasis-position",
            "text-emphasis-style",
            "text-height",
            "text-indent",
            "text-justify",
            "text-orientation",
            "text-outline",
            "text-overflow",
            "text-rendering",
            "text-shadow",
            "text-size-adjust",
            "text-space-collapse",
            "text-transform",
            "text-underline-position",
            "text-wrap",
            "top",
            "transform",
            "transform-origin",
            "transform-style",
            "transition",
            "transition-delay",
            "transition-duration",
            "transition-property",
            "transition-timing-function",
            "translate",
            "unicode-bidi",
            "user-select",
            "vertical-align",
            "visibility",
            "voice-balance",
            "voice-duration",
            "voice-family",
            "voice-pitch",
            "voice-range",
            "voice-rate",
            "voice-stress",
            "voice-volume",
            "volume",
            "white-space",
            "widows",
            "width",
            "will-change",
            "word-break",
            "word-spacing",
            "word-wrap",
            "writing-mode",
            "z-index",
            "clip-path",
            "clip-rule",
            "mask",
            "enable-background",
            "filter",
            "flood-color",
            "flood-opacity",
            "lighting-color",
            "stop-color",
            "stop-opacity",
            "pointer-events",
            "color-interpolation",
            "color-interpolation-filters",
            "color-rendering",
            "fill",
            "fill-opacity",
            "fill-rule",
            "image-rendering",
            "marker",
            "marker-end",
            "marker-mid",
            "marker-start",
            "shape-rendering",
            "stroke",
            "stroke-dasharray",
            "stroke-dashoffset",
            "stroke-linecap",
            "stroke-linejoin",
            "stroke-miterlimit",
            "stroke-opacity",
            "stroke-width",
            "text-rendering",
            "baseline-shift",
            "dominant-baseline",
            "glyph-orientation-horizontal",
            "glyph-orientation-vertical",
            "text-anchor",
            "writing-mode",
          ],
          f = t(u),
          p = [
            "border-block",
            "border-block-color",
            "border-block-end",
            "border-block-end-color",
            "border-block-end-style",
            "border-block-end-width",
            "border-block-start",
            "border-block-start-color",
            "border-block-start-style",
            "border-block-start-width",
            "border-block-style",
            "border-block-width",
            "border-inline",
            "border-inline-color",
            "border-inline-end",
            "border-inline-end-color",
            "border-inline-end-style",
            "border-inline-end-width",
            "border-inline-start",
            "border-inline-start-color",
            "border-inline-start-style",
            "border-inline-start-width",
            "border-inline-style",
            "border-inline-width",
            "margin-block",
            "margin-block-end",
            "margin-block-start",
            "margin-inline",
            "margin-inline-end",
            "margin-inline-start",
            "padding-block",
            "padding-block-end",
            "padding-block-start",
            "padding-inline",
            "padding-inline-end",
            "padding-inline-start",
            "scroll-snap-stop",
            "scrollbar-3d-light-color",
            "scrollbar-arrow-color",
            "scrollbar-base-color",
            "scrollbar-dark-shadow-color",
            "scrollbar-face-color",
            "scrollbar-highlight-color",
            "scrollbar-shadow-color",
            "scrollbar-track-color",
            "searchfield-cancel-button",
            "searchfield-decoration",
            "searchfield-results-button",
            "searchfield-results-decoration",
            "shape-inside",
            "zoom",
          ],
          d = t(p),
          h = t([
            "font-display",
            "font-family",
            "src",
            "unicode-range",
            "font-variant",
            "font-feature-settings",
            "font-stretch",
            "font-weight",
            "font-style",
          ]),
          m = t([
            "additive-symbols",
            "fallback",
            "negative",
            "pad",
            "prefix",
            "range",
            "speak-as",
            "suffix",
            "symbols",
            "system",
          ]),
          g = [
            "aliceblue",
            "antiquewhite",
            "aqua",
            "aquamarine",
            "azure",
            "beige",
            "bisque",
            "black",
            "blanchedalmond",
            "blue",
            "blueviolet",
            "brown",
            "burlywood",
            "cadetblue",
            "chartreuse",
            "chocolate",
            "coral",
            "cornflowerblue",
            "cornsilk",
            "crimson",
            "cyan",
            "darkblue",
            "darkcyan",
            "darkgoldenrod",
            "darkgray",
            "darkgreen",
            "darkkhaki",
            "darkmagenta",
            "darkolivegreen",
            "darkorange",
            "darkorchid",
            "darkred",
            "darksalmon",
            "darkseagreen",
            "darkslateblue",
            "darkslategray",
            "darkturquoise",
            "darkviolet",
            "deeppink",
            "deepskyblue",
            "dimgray",
            "dodgerblue",
            "firebrick",
            "floralwhite",
            "forestgreen",
            "fuchsia",
            "gainsboro",
            "ghostwhite",
            "gold",
            "goldenrod",
            "gray",
            "grey",
            "green",
            "greenyellow",
            "honeydew",
            "hotpink",
            "indianred",
            "indigo",
            "ivory",
            "khaki",
            "lavender",
            "lavenderblush",
            "lawngreen",
            "lemonchiffon",
            "lightblue",
            "lightcoral",
            "lightcyan",
            "lightgoldenrodyellow",
            "lightgray",
            "lightgreen",
            "lightpink",
            "lightsalmon",
            "lightseagreen",
            "lightskyblue",
            "lightslategray",
            "lightsteelblue",
            "lightyellow",
            "lime",
            "limegreen",
            "linen",
            "magenta",
            "maroon",
            "mediumaquamarine",
            "mediumblue",
            "mediumorchid",
            "mediumpurple",
            "mediumseagreen",
            "mediumslateblue",
            "mediumspringgreen",
            "mediumturquoise",
            "mediumvioletred",
            "midnightblue",
            "mintcream",
            "mistyrose",
            "moccasin",
            "navajowhite",
            "navy",
            "oldlace",
            "olive",
            "olivedrab",
            "orange",
            "orangered",
            "orchid",
            "palegoldenrod",
            "palegreen",
            "paleturquoise",
            "palevioletred",
            "papayawhip",
            "peachpuff",
            "peru",
            "pink",
            "plum",
            "powderblue",
            "purple",
            "rebeccapurple",
            "red",
            "rosybrown",
            "royalblue",
            "saddlebrown",
            "salmon",
            "sandybrown",
            "seagreen",
            "seashell",
            "sienna",
            "silver",
            "skyblue",
            "slateblue",
            "slategray",
            "snow",
            "springgreen",
            "steelblue",
            "tan",
            "teal",
            "thistle",
            "tomato",
            "turquoise",
            "violet",
            "wheat",
            "white",
            "whitesmoke",
            "yellow",
            "yellowgreen",
          ],
          v = t(g),
          b = [
            "above",
            "absolute",
            "activeborder",
            "additive",
            "activecaption",
            "afar",
            "after-white-space",
            "ahead",
            "alias",
            "all",
            "all-scroll",
            "alphabetic",
            "alternate",
            "always",
            "amharic",
            "amharic-abegede",
            "antialiased",
            "appworkspace",
            "arabic-indic",
            "armenian",
            "asterisks",
            "attr",
            "auto",
            "auto-flow",
            "avoid",
            "avoid-column",
            "avoid-page",
            "avoid-region",
            "background",
            "backwards",
            "baseline",
            "below",
            "bidi-override",
            "binary",
            "bengali",
            "blink",
            "block",
            "block-axis",
            "bold",
            "bolder",
            "border",
            "border-box",
            "both",
            "bottom",
            "break",
            "break-all",
            "break-word",
            "bullets",
            "button",
            "button-bevel",
            "buttonface",
            "buttonhighlight",
            "buttonshadow",
            "buttontext",
            "calc",
            "cambodian",
            "capitalize",
            "caps-lock-indicator",
            "caption",
            "captiontext",
            "caret",
            "cell",
            "center",
            "checkbox",
            "circle",
            "cjk-decimal",
            "cjk-earthly-branch",
            "cjk-heavenly-stem",
            "cjk-ideographic",
            "clear",
            "clip",
            "close-quote",
            "col-resize",
            "collapse",
            "color",
            "color-burn",
            "color-dodge",
            "column",
            "column-reverse",
            "compact",
            "condensed",
            "contain",
            "content",
            "contents",
            "content-box",
            "context-menu",
            "continuous",
            "copy",
            "counter",
            "counters",
            "cover",
            "crop",
            "cross",
            "crosshair",
            "currentcolor",
            "cursive",
            "cyclic",
            "darken",
            "dashed",
            "decimal",
            "decimal-leading-zero",
            "default",
            "default-button",
            "dense",
            "destination-atop",
            "destination-in",
            "destination-out",
            "destination-over",
            "devanagari",
            "difference",
            "disc",
            "discard",
            "disclosure-closed",
            "disclosure-open",
            "document",
            "dot-dash",
            "dot-dot-dash",
            "dotted",
            "double",
            "down",
            "e-resize",
            "ease",
            "ease-in",
            "ease-in-out",
            "ease-out",
            "element",
            "ellipse",
            "ellipsis",
            "embed",
            "end",
            "ethiopic",
            "ethiopic-abegede",
            "ethiopic-abegede-am-et",
            "ethiopic-abegede-gez",
            "ethiopic-abegede-ti-er",
            "ethiopic-abegede-ti-et",
            "ethiopic-halehame-aa-er",
            "ethiopic-halehame-aa-et",
            "ethiopic-halehame-am-et",
            "ethiopic-halehame-gez",
            "ethiopic-halehame-om-et",
            "ethiopic-halehame-sid-et",
            "ethiopic-halehame-so-et",
            "ethiopic-halehame-ti-er",
            "ethiopic-halehame-ti-et",
            "ethiopic-halehame-tig",
            "ethiopic-numeric",
            "ew-resize",
            "exclusion",
            "expanded",
            "extends",
            "extra-condensed",
            "extra-expanded",
            "fantasy",
            "fast",
            "fill",
            "fixed",
            "flat",
            "flex",
            "flex-end",
            "flex-start",
            "footnotes",
            "forwards",
            "from",
            "geometricPrecision",
            "georgian",
            "graytext",
            "grid",
            "groove",
            "gujarati",
            "gurmukhi",
            "hand",
            "hangul",
            "hangul-consonant",
            "hard-light",
            "hebrew",
            "help",
            "hidden",
            "hide",
            "higher",
            "highlight",
            "highlighttext",
            "hiragana",
            "hiragana-iroha",
            "horizontal",
            "hsl",
            "hsla",
            "hue",
            "icon",
            "ignore",
            "inactiveborder",
            "inactivecaption",
            "inactivecaptiontext",
            "infinite",
            "infobackground",
            "infotext",
            "inherit",
            "initial",
            "inline",
            "inline-axis",
            "inline-block",
            "inline-flex",
            "inline-grid",
            "inline-table",
            "inset",
            "inside",
            "intrinsic",
            "invert",
            "italic",
            "japanese-formal",
            "japanese-informal",
            "justify",
            "kannada",
            "katakana",
            "katakana-iroha",
            "keep-all",
            "khmer",
            "korean-hangul-formal",
            "korean-hanja-formal",
            "korean-hanja-informal",
            "landscape",
            "lao",
            "large",
            "larger",
            "left",
            "level",
            "lighter",
            "lighten",
            "line-through",
            "linear",
            "linear-gradient",
            "lines",
            "list-item",
            "listbox",
            "listitem",
            "local",
            "logical",
            "loud",
            "lower",
            "lower-alpha",
            "lower-armenian",
            "lower-greek",
            "lower-hexadecimal",
            "lower-latin",
            "lower-norwegian",
            "lower-roman",
            "lowercase",
            "ltr",
            "luminosity",
            "malayalam",
            "match",
            "matrix",
            "matrix3d",
            "media-controls-background",
            "media-current-time-display",
            "media-fullscreen-button",
            "media-mute-button",
            "media-play-button",
            "media-return-to-realtime-button",
            "media-rewind-button",
            "media-seek-back-button",
            "media-seek-forward-button",
            "media-slider",
            "media-sliderthumb",
            "media-time-remaining-display",
            "media-volume-slider",
            "media-volume-slider-container",
            "media-volume-sliderthumb",
            "medium",
            "menu",
            "menulist",
            "menulist-button",
            "menulist-text",
            "menulist-textfield",
            "menutext",
            "message-box",
            "middle",
            "min-intrinsic",
            "mix",
            "mongolian",
            "monospace",
            "move",
            "multiple",
            "multiply",
            "myanmar",
            "n-resize",
            "narrower",
            "ne-resize",
            "nesw-resize",
            "no-close-quote",
            "no-drop",
            "no-open-quote",
            "no-repeat",
            "none",
            "normal",
            "not-allowed",
            "nowrap",
            "ns-resize",
            "numbers",
            "numeric",
            "nw-resize",
            "nwse-resize",
            "oblique",
            "octal",
            "opacity",
            "open-quote",
            "optimizeLegibility",
            "optimizeSpeed",
            "oriya",
            "oromo",
            "outset",
            "outside",
            "outside-shape",
            "overlay",
            "overline",
            "padding",
            "padding-box",
            "painted",
            "page",
            "paused",
            "persian",
            "perspective",
            "plus-darker",
            "plus-lighter",
            "pointer",
            "polygon",
            "portrait",
            "pre",
            "pre-line",
            "pre-wrap",
            "preserve-3d",
            "progress",
            "push-button",
            "radial-gradient",
            "radio",
            "read-only",
            "read-write",
            "read-write-plaintext-only",
            "rectangle",
            "region",
            "relative",
            "repeat",
            "repeating-linear-gradient",
            "repeating-radial-gradient",
            "repeat-x",
            "repeat-y",
            "reset",
            "reverse",
            "rgb",
            "rgba",
            "ridge",
            "right",
            "rotate",
            "rotate3d",
            "rotateX",
            "rotateY",
            "rotateZ",
            "round",
            "row",
            "row-resize",
            "row-reverse",
            "rtl",
            "run-in",
            "running",
            "s-resize",
            "sans-serif",
            "saturation",
            "scale",
            "scale3d",
            "scaleX",
            "scaleY",
            "scaleZ",
            "screen",
            "scroll",
            "scrollbar",
            "scroll-position",
            "se-resize",
            "searchfield",
            "searchfield-cancel-button",
            "searchfield-decoration",
            "searchfield-results-button",
            "searchfield-results-decoration",
            "self-start",
            "self-end",
            "semi-condensed",
            "semi-expanded",
            "separate",
            "serif",
            "show",
            "sidama",
            "simp-chinese-formal",
            "simp-chinese-informal",
            "single",
            "skew",
            "skewX",
            "skewY",
            "skip-white-space",
            "slide",
            "slider-horizontal",
            "slider-vertical",
            "sliderthumb-horizontal",
            "sliderthumb-vertical",
            "slow",
            "small",
            "small-caps",
            "small-caption",
            "smaller",
            "soft-light",
            "solid",
            "somali",
            "source-atop",
            "source-in",
            "source-out",
            "source-over",
            "space",
            "space-around",
            "space-between",
            "space-evenly",
            "spell-out",
            "square",
            "square-button",
            "start",
            "static",
            "status-bar",
            "stretch",
            "stroke",
            "sub",
            "subpixel-antialiased",
            "super",
            "sw-resize",
            "symbolic",
            "symbols",
            "system-ui",
            "table",
            "table-caption",
            "table-cell",
            "table-column",
            "table-column-group",
            "table-footer-group",
            "table-header-group",
            "table-row",
            "table-row-group",
            "tamil",
            "telugu",
            "text",
            "text-bottom",
            "text-top",
            "textarea",
            "textfield",
            "thai",
            "thick",
            "thin",
            "threeddarkshadow",
            "threedface",
            "threedhighlight",
            "threedlightshadow",
            "threedshadow",
            "tibetan",
            "tigre",
            "tigrinya-er",
            "tigrinya-er-abegede",
            "tigrinya-et",
            "tigrinya-et-abegede",
            "to",
            "top",
            "trad-chinese-formal",
            "trad-chinese-informal",
            "transform",
            "translate",
            "translate3d",
            "translateX",
            "translateY",
            "translateZ",
            "transparent",
            "ultra-condensed",
            "ultra-expanded",
            "underline",
            "unset",
            "up",
            "upper-alpha",
            "upper-armenian",
            "upper-greek",
            "upper-hexadecimal",
            "upper-latin",
            "upper-norwegian",
            "upper-roman",
            "uppercase",
            "urdu",
            "url",
            "var",
            "vertical",
            "vertical-text",
            "visible",
            "visibleFill",
            "visiblePainted",
            "visibleStroke",
            "visual",
            "w-resize",
            "wait",
            "wave",
            "wider",
            "window",
            "windowframe",
            "windowtext",
            "words",
            "wrap",
            "wrap-reverse",
            "x-large",
            "x-small",
            "xor",
            "xx-large",
            "xx-small",
          ],
          y = t(b),
          x = n
            .concat(i)
            .concat(a)
            .concat(l)
            .concat(u)
            .concat(p)
            .concat(g)
            .concat(b);
        function w(e, t) {
          for (var n, r = !1; null != (n = e.next()); ) {
            if (r && "/" == n) {
              t.tokenize = null;
              break;
            }
            r = "*" == n;
          }
          return ["comment", "comment"];
        }
        e.registerHelper("hintWords", "css", x),
          e.defineMIME("text/css", {
            documentTypes: r,
            mediaTypes: o,
            mediaFeatures: s,
            mediaValueKeywords: c,
            propertyKeywords: f,
            nonStandardPropertyKeywords: d,
            fontProperties: h,
            counterDescriptors: m,
            colorKeywords: v,
            valueKeywords: y,
            tokenHooks: {
              "/": function (e, t) {
                return !!e.eat("*") && ((t.tokenize = w), w(e, t));
              },
            },
            name: "css",
          }),
          e.defineMIME("text/x-scss", {
            mediaTypes: o,
            mediaFeatures: s,
            mediaValueKeywords: c,
            propertyKeywords: f,
            nonStandardPropertyKeywords: d,
            colorKeywords: v,
            valueKeywords: y,
            fontProperties: h,
            allowNested: !0,
            lineComment: "//",
            tokenHooks: {
              "/": function (e, t) {
                return e.eat("/")
                  ? (e.skipToEnd(), ["comment", "comment"])
                  : e.eat("*")
                  ? ((t.tokenize = w), w(e, t))
                  : ["operator", "operator"];
              },
              ":": function (e) {
                return !!e.match(/\s*\{/, !1) && [null, null];
              },
              $: function (e) {
                return (
                  e.match(/^[\w-]+/),
                  e.match(/^\s*:/, !1)
                    ? ["variable-2", "variable-definition"]
                    : ["variable-2", "variable"]
                );
              },
              "#": function (e) {
                return !!e.eat("{") && [null, "interpolation"];
              },
            },
            name: "css",
            helperType: "scss",
          }),
          e.defineMIME("text/x-less", {
            mediaTypes: o,
            mediaFeatures: s,
            mediaValueKeywords: c,
            propertyKeywords: f,
            nonStandardPropertyKeywords: d,
            colorKeywords: v,
            valueKeywords: y,
            fontProperties: h,
            allowNested: !0,
            lineComment: "//",
            tokenHooks: {
              "/": function (e, t) {
                return e.eat("/")
                  ? (e.skipToEnd(), ["comment", "comment"])
                  : e.eat("*")
                  ? ((t.tokenize = w), w(e, t))
                  : ["operator", "operator"];
              },
              "@": function (e) {
                return e.eat("{")
                  ? [null, "interpolation"]
                  : !e.match(
                      /^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,
                      !1
                    ) &&
                      (e.eatWhile(/[\w\\\-]/),
                      e.match(/^\s*:/, !1)
                        ? ["variable-2", "variable-definition"]
                        : ["variable-2", "variable"]);
              },
              "&": function () {
                return ["atom", "atom"];
              },
            },
            name: "css",
            helperType: "less",
          }),
          e.defineMIME("text/x-gss", {
            documentTypes: r,
            mediaTypes: o,
            mediaFeatures: s,
            propertyKeywords: f,
            nonStandardPropertyKeywords: d,
            fontProperties: h,
            counterDescriptors: m,
            colorKeywords: v,
            valueKeywords: y,
            supportsAtComponent: !0,
            tokenHooks: {
              "/": function (e, t) {
                return !!e.eat("*") && ((t.tokenize = w), w(e, t));
              },
            },
            name: "css",
            helperType: "gss",
          });
      })(n("VrN/"));
    },
    i0CS: function (module, exports) {
      jQuery &&
        (function ($) {
          $.extend($.fn, {
            ngFileTree: function ngFileTree(o, h) {
              if (!o) var o = {};
              null == o.root && (o.root = "/"),
                null == o.script && (o.script = "/engine/rpc.php"),
                null == o.methodName &&
                  (o.methodName = "admin.templates.listFiles"),
                null == o.templateName && (o.templateName = "default"),
                null == o.folderEvent && (o.folderEvent = "click"),
                null == o.expandSpeed && (o.expandSpeed = 500),
                null == o.securityToken && (o.seurityToken = ""),
                null == o.collapseSpeed && (o.collapseSpeed = 500),
                null == o.expandEasing && (o.expandEasing = null),
                null == o.collapseEasing && (o.collapseEasing = null),
                null == o.multiFolder && (o.multiFolder = !0),
                null == o.loadMessage && (o.loadMessage = "Loading..."),
                $(this).each(function () {
                  function showTree(c, t) {
                    $(c).addClass("wait"),
                      $(".jqueryFileTree.start").remove(),
                      $.post(
                        o.script,
                        {
                          json: 1,
                          methodName: o.methodName,
                          rndval: new Date().getTime(),
                          params: json_encode({
                            dir: t,
                            template: o.templateName,
                            token: o.securityToken,
                          }),
                        },
                        function (data) {
                          try {
                            resTX = eval("(" + data + ")");
                          } catch (e) {
                            alert(
                              "Error parsing JSON output (ngFileTree.js). Result: " +
                                data
                            );
                          }
                          resTX.status ||
                            alert(
                              "Error [" +
                                resTX.errorCode +
                                "]: " +
                                resTX.errorText
                            ),
                            $(c).find(".start").html(""),
                            $(c).removeClass("wait").append(resTX.content),
                            o.root == t
                              ? $(c).find("UL:hidden").show()
                              : $(c)
                                  .find("UL:hidden")
                                  .slideDown({
                                    duration: o.expandSpeed,
                                    easing: o.expandEasing,
                                  }),
                            bindTree(c);
                        },
                        "text"
                      );
                  }
                  function bindTree(e) {
                    $(e)
                      .find("LI A")
                      .bind(o.folderEvent, function () {
                        return (
                          $(this).parent().hasClass("directory")
                            ? $(this).parent().hasClass("collapsed")
                              ? (o.multiFolder ||
                                  ($(this)
                                    .parent()
                                    .parent()
                                    .find("UL")
                                    .slideUp({
                                      duration: o.collapseSpeed,
                                      easing: o.collapseEasing,
                                    }),
                                  $(this)
                                    .parent()
                                    .parent()
                                    .find("LI.directory")
                                    .removeClass("expanded")
                                    .addClass("collapsed")),
                                $(this).parent().find("UL").remove(),
                                showTree(
                                  $(this).parent(),
                                  escape($(this).attr("rel").match(/.*\//))
                                ),
                                $(this)
                                  .parent()
                                  .removeClass("collapsed")
                                  .addClass("expanded"))
                              : ($(this)
                                  .parent()
                                  .find("UL")
                                  .slideUp({
                                    duration: o.collapseSpeed,
                                    easing: o.collapseEasing,
                                  }),
                                $(this)
                                  .parent()
                                  .removeClass("expanded")
                                  .addClass("collapsed"))
                            : h($(this).attr("rel")),
                          !1
                        );
                      }),
                      "click" != o.folderEvent.toLowerCase &&
                        $(e)
                          .find("LI A")
                          .bind("click", function () {
                            return !1;
                          });
                  }
                  $(this).html(
                    '<ul class="jqueryFileTree start"><li class="wait">' +
                      o.loadMessage +
                      "<li></ul>"
                  ),
                    showTree($(this), escape(o.root));
                });
            },
          });
        })(jQuery);
    },
    uTOq: function (e, t, n) {
      !(function (e) {
        "use strict";
        var t,
          n,
          r = e.Pos;
        function i(e, t) {
          for (
            var n = (function (e) {
                var t = e.flags;
                return null != t
                  ? t
                  : (e.ignoreCase ? "i" : "") +
                      (e.global ? "g" : "") +
                      (e.multiline ? "m" : "");
              })(e),
              r = n,
              i = 0;
            i < t.length;
            i++
          )
            -1 == r.indexOf(t.charAt(i)) && (r += t.charAt(i));
          return n == r ? e : new RegExp(e.source, r);
        }
        function o(e) {
          return /\\s|\\n|\n|\\W|\\D|\[\^/.test(e.source);
        }
        function a(e, t, n) {
          t = i(t, "g");
          for (var o = n.line, a = n.ch, s = e.lastLine(); o <= s; o++, a = 0) {
            t.lastIndex = a;
            var l = e.getLine(o),
              c = t.exec(l);
            if (c)
              return {
                from: r(o, c.index),
                to: r(o, c.index + c[0].length),
                match: c,
              };
          }
        }
        function s(e, t, n) {
          if (!o(t)) return a(e, t, n);
          t = i(t, "gm");
          for (var s, l = 1, c = n.line, u = e.lastLine(); c <= u; ) {
            for (var f = 0; f < l && !(c > u); f++) {
              var p = e.getLine(c++);
              s = null == s ? p : s + "\n" + p;
            }
            (l *= 2), (t.lastIndex = n.ch);
            var d = t.exec(s);
            if (d) {
              var h = s.slice(0, d.index).split("\n"),
                m = d[0].split("\n"),
                g = n.line + h.length - 1,
                v = h[h.length - 1].length;
              return {
                from: r(g, v),
                to: r(
                  g + m.length - 1,
                  1 == m.length ? v + m[0].length : m[m.length - 1].length
                ),
                match: d,
              };
            }
          }
        }
        function l(e, t, n) {
          for (var r, i = 0; i <= e.length; ) {
            t.lastIndex = i;
            var o = t.exec(e);
            if (!o) break;
            var a = o.index + o[0].length;
            if (a > e.length - n) break;
            (!r || a > r.index + r[0].length) && (r = o), (i = o.index + 1);
          }
          return r;
        }
        function c(e, t, n) {
          t = i(t, "g");
          for (
            var o = n.line, a = n.ch, s = e.firstLine();
            o >= s;
            o--, a = -1
          ) {
            var c = e.getLine(o),
              u = l(c, t, a < 0 ? 0 : c.length - a);
            if (u)
              return {
                from: r(o, u.index),
                to: r(o, u.index + u[0].length),
                match: u,
              };
          }
        }
        function u(e, t, n) {
          if (!o(t)) return c(e, t, n);
          t = i(t, "gm");
          for (
            var a,
              s = 1,
              u = e.getLine(n.line).length - n.ch,
              f = n.line,
              p = e.firstLine();
            f >= p;
          ) {
            for (var d = 0; d < s && f >= p; d++) {
              var h = e.getLine(f--);
              a = null == a ? h : h + "\n" + a;
            }
            s *= 2;
            var m = l(a, t, u);
            if (m) {
              var g = a.slice(0, m.index).split("\n"),
                v = m[0].split("\n"),
                b = f + g.length,
                y = g[g.length - 1].length;
              return {
                from: r(b, y),
                to: r(
                  b + v.length - 1,
                  1 == v.length ? y + v[0].length : v[v.length - 1].length
                ),
                match: m,
              };
            }
          }
        }
        function f(e, t, n, r) {
          if (e.length == t.length) return n;
          for (var i = 0, o = n + Math.max(0, e.length - t.length); ; ) {
            if (i == o) return i;
            var a = (i + o) >> 1,
              s = r(e.slice(0, a)).length;
            if (s == n) return a;
            s > n ? (o = a) : (i = a + 1);
          }
        }
        function p(e, i, o, a) {
          if (!i.length) return null;
          var s = a ? t : n,
            l = s(i).split(/\r|\n\r?/);
          e: for (
            var c = o.line, u = o.ch, p = e.lastLine() + 1 - l.length;
            c <= p;
            c++, u = 0
          ) {
            var d = e.getLine(c).slice(u),
              h = s(d);
            if (1 == l.length) {
              var m = h.indexOf(l[0]);
              if (-1 == m) continue e;
              return (
                (o = f(d, h, m, s) + u),
                {
                  from: r(c, f(d, h, m, s) + u),
                  to: r(c, f(d, h, m + l[0].length, s) + u),
                }
              );
            }
            var g = h.length - l[0].length;
            if (h.slice(g) == l[0]) {
              for (var v = 1; v < l.length - 1; v++)
                if (s(e.getLine(c + v)) != l[v]) continue e;
              var b = e.getLine(c + l.length - 1),
                y = s(b),
                x = l[l.length - 1];
              if (y.slice(0, x.length) == x)
                return {
                  from: r(c, f(d, h, g, s) + u),
                  to: r(c + l.length - 1, f(b, y, x.length, s)),
                };
            }
          }
        }
        function d(e, i, o, a) {
          if (!i.length) return null;
          var s = a ? t : n,
            l = s(i).split(/\r|\n\r?/);
          e: for (
            var c = o.line, u = o.ch, p = e.firstLine() - 1 + l.length;
            c >= p;
            c--, u = -1
          ) {
            var d = e.getLine(c);
            u > -1 && (d = d.slice(0, u));
            var h = s(d);
            if (1 == l.length) {
              var m = h.lastIndexOf(l[0]);
              if (-1 == m) continue e;
              return {
                from: r(c, f(d, h, m, s)),
                to: r(c, f(d, h, m + l[0].length, s)),
              };
            }
            var g = l[l.length - 1];
            if (h.slice(0, g.length) == g) {
              var v = 1;
              for (o = c - l.length + 1; v < l.length - 1; v++)
                if (s(e.getLine(o + v)) != l[v]) continue e;
              var b = e.getLine(c + 1 - l.length),
                y = s(b);
              if (y.slice(y.length - l[0].length) == l[0])
                return {
                  from: r(c + 1 - l.length, f(b, y, b.length - l[0].length, s)),
                  to: r(c, f(d, h, g.length, s)),
                };
            }
          }
        }
        function h(e, t, n, o) {
          var l;
          (this.atOccurrence = !1),
            (this.doc = e),
            (n = n ? e.clipPos(n) : r(0, 0)),
            (this.pos = { from: n, to: n }),
            "object" == typeof o ? (l = o.caseFold) : ((l = o), (o = null)),
            "string" == typeof t
              ? (null == l && (l = !1),
                (this.matches = function (n, r) {
                  return (n ? d : p)(e, t, r, l);
                }))
              : ((t = i(t, "gm")),
                o && !1 === o.multiline
                  ? (this.matches = function (n, r) {
                      return (n ? c : a)(e, t, r);
                    })
                  : (this.matches = function (n, r) {
                      return (n ? u : s)(e, t, r);
                    }));
        }
        String.prototype.normalize
          ? ((t = function (e) {
              return e.normalize("NFD").toLowerCase();
            }),
            (n = function (e) {
              return e.normalize("NFD");
            }))
          : ((t = function (e) {
              return e.toLowerCase();
            }),
            (n = function (e) {
              return e;
            })),
          (h.prototype = {
            findNext: function () {
              return this.find(!1);
            },
            findPrevious: function () {
              return this.find(!0);
            },
            find: function (t) {
              for (
                var n = this.matches(
                  t,
                  this.doc.clipPos(t ? this.pos.from : this.pos.to)
                );
                n && 0 == e.cmpPos(n.from, n.to);
              )
                t
                  ? n.from.ch
                    ? (n.from = r(n.from.line, n.from.ch - 1))
                    : (n =
                        n.from.line == this.doc.firstLine()
                          ? null
                          : this.matches(
                              t,
                              this.doc.clipPos(r(n.from.line - 1))
                            ))
                  : n.to.ch < this.doc.getLine(n.to.line).length
                  ? (n.to = r(n.to.line, n.to.ch + 1))
                  : (n =
                      n.to.line == this.doc.lastLine()
                        ? null
                        : this.matches(t, r(n.to.line + 1, 0)));
              if (n)
                return (
                  (this.pos = n), (this.atOccurrence = !0), this.pos.match || !0
                );
              var i = r(t ? this.doc.firstLine() : this.doc.lastLine() + 1, 0);
              return (this.pos = { from: i, to: i }), (this.atOccurrence = !1);
            },
            from: function () {
              if (this.atOccurrence) return this.pos.from;
            },
            to: function () {
              if (this.atOccurrence) return this.pos.to;
            },
            replace: function (t, n) {
              if (this.atOccurrence) {
                var i = e.splitLines(t);
                this.doc.replaceRange(i, this.pos.from, this.pos.to, n),
                  (this.pos.to = r(
                    this.pos.from.line + i.length - 1,
                    i[i.length - 1].length +
                      (1 == i.length ? this.pos.from.ch : 0)
                  ));
              }
            },
          }),
          e.defineExtension("getSearchCursor", function (e, t, n) {
            return new h(this.doc, e, t, n);
          }),
          e.defineDocExtension("getSearchCursor", function (e, t, n) {
            return new h(this, e, t, n);
          }),
          e.defineExtension("selectMatches", function (t, n) {
            for (
              var r = [],
                i = this.getSearchCursor(t, this.getCursor("from"), n);
              i.findNext() && !(e.cmpPos(i.to(), this.getCursor("to")) > 0);
            )
              r.push({ anchor: i.from(), head: i.to() });
            r.length && this.setSelections(r, 0);
          });
      })(n("VrN/"));
    },
    "vR+M": function (e, t, n) {
      "use strict";
      n.r(t);
      var r = n("VrN/"),
        i = n.n(r);
      const o = { escape: 92, throws: !1 };
      function a(e) {
        return e > 47 && e < 58;
      }
      function s(e, t, n) {
        return (n = n || 90), (e &= -33) >= (t = t || 65) && e <= n;
      }
      function l(e) {
        return a(e) || c(e);
      }
      function c(e) {
        return 95 === e || s(e);
      }
      function u(e) {
        return 32 === e || 9 === e || 160 === e;
      }
      function f(e) {
        return u(e) || 10 === e || 13 === e;
      }
      function p(e, t) {
        t = Object.assign(Object.assign({}, o), t);
        const n = e.pos,
          r = e.peek();
        if (e.eat(d)) {
          for (; !e.eof(); )
            switch (e.next()) {
              case r:
                return (e.start = n), !0;
              case t.escape:
                e.next();
            }
          if (((e.pos = n), t.throws))
            throw e.error("Unable to consume quoted string");
        }
        return !1;
      }
      function d(e) {
        return 39 === e || 34 === e;
      }
      function h(e, t, n, r) {
        r = Object.assign(Object.assign({}, o), r);
        const i = e.pos;
        if (e.eat(t)) {
          let o,
            a = 1;
          for (; !e.eof(); )
            if (!p(e, r))
              if (((o = e.next()), o === t)) a++;
              else if (o === n) {
                if ((a--, !a)) return (e.start = i), !0;
              } else o === r.escape && e.next();
          if (((e.pos = i), r.throws))
            throw e.error(
              "Unable to find matching pair for " + String.fromCharCode(t)
            );
        }
        return !1;
      }
      class m {
        constructor(e, t, n) {
          null == n && "string" == typeof e && (n = e.length),
            (this.string = e),
            (this.pos = this.start = t || 0),
            (this.end = n || 0);
        }
        eof() {
          return this.pos >= this.end;
        }
        limit(e, t) {
          return new m(this.string, e, t);
        }
        peek() {
          return this.string.charCodeAt(this.pos);
        }
        next() {
          if (this.pos < this.string.length)
            return this.string.charCodeAt(this.pos++);
        }
        eat(e) {
          const t = this.peek(),
            n = "function" == typeof e ? e(t) : t === e;
          return n && this.next(), n;
        }
        eatWhile(e) {
          const t = this.pos;
          for (; !this.eof() && this.eat(e); );
          return this.pos !== t;
        }
        backUp(e) {
          this.pos -= e || 1;
        }
        current() {
          return this.substring(this.start, this.pos);
        }
        substring(e, t) {
          return this.string.slice(e, t);
        }
        error(e, t = this.pos) {
          return new g(`${e} at ${t + 1}`, t, this.string);
        }
      }
      class g extends Error {
        constructor(e, t, n) {
          super(e), (this.pos = t), (this.string = n);
        }
      }
      function v(e) {
        return e.tokens[e.pos];
      }
      function b(e) {
        return e.tokens[e.pos++];
      }
      function y(e, t = e.start, n = e.pos) {
        return e.tokens.slice(t, n);
      }
      function x(e) {
        return e.pos < e.size;
      }
      function w(e, t) {
        const n = v(e);
        return !(!n || !t(n)) && (e.pos++, !0);
      }
      function k(e, t, n = v(e)) {
        n && null != n.start && (t += " at " + n.start);
        const r = new Error(t);
        return (r.pos = n && n.start), r;
      }
      function C(e, t = {}) {
        const n = { tokens: (r = e), start: 0, pos: 0, size: r.length };
        var r;
        const i = S(n, t);
        if (x(n)) throw k(n, "Unexpected character");
        return i;
      }
      function S(e, t) {
        const n = { type: "TokenGroup", elements: [] };
        let r,
          i = n;
        const o = [];
        for (; x(e) && (r = L(e, t) || T(e, t)); )
          if ((i.elements.push(r), w(e, X))) o.push(i), (i = r);
          else {
            if (w(e, Y)) continue;
            if (w(e, Q))
              do {
                o.length && (i = o.pop());
              } while (w(e, Q));
          }
        return n;
      }
      function T(e, t) {
        if (w(e, G)) {
          const n = S(e, t);
          return (
            F(b(e), "group", !1) &&
              (n.repeat = (function (e) {
                return H(v(e)) ? e.tokens[e.pos++] : void 0;
              })(e)),
            n
          );
        }
      }
      function L(e, t) {
        let n;
        const r = {
          type: "TokenElement",
          name: void 0,
          attributes: void 0,
          value: void 0,
          repeat: void 0,
          selfClose: !1,
          elements: [],
        };
        for (
          (function (e, t) {
            const n = e.pos;
            if (t.jsx && w(e, R))
              for (; x(e); ) {
                const { pos: t } = e;
                if (!w(e, q) || !w(e, R)) {
                  e.pos = t;
                  break;
                }
              }
            for (; x(e) && w(e, B); );
            if (e.pos !== n) return (e.start = n), !0;
            return !1;
          })(e, t) && (r.name = y(e));
          x(e);
        )
          if (((e.start = e.pos), r.repeat || _(r) || !w(e, H)))
            if (!r.value && z(e)) r.value = W(e);
            else {
              if (!(n = N(e, "id", t) || N(e, "class", t) || M(e))) {
                !_(r) &&
                  w(e, Z) &&
                  ((r.selfClose = !0),
                  !r.repeat && w(e, H) && (r.repeat = e.tokens[e.pos - 1]));
                break;
              }
              r.attributes
                ? (r.attributes = r.attributes.concat(n))
                : (r.attributes = Array.isArray(n) ? n.slice() : [n]);
            }
          else r.repeat = e.tokens[e.pos - 1];
        return _(r) ? void 0 : r;
      }
      function M(e) {
        if (w(e, V)) {
          const t = [];
          let n;
          for (; x(e); )
            if ((n = A(e))) t.push(n);
            else {
              if (w(e, U)) break;
              if (!w(e, I)) throw k(e, `Unexpected "${v(e).type}" token`);
            }
          return t;
        }
      }
      function N(e, t, n) {
        if (P(v(e), t)) {
          e.pos++;
          const i = { name: [((r = t), { type: "Literal", value: r })] };
          return (
            n.jsx && z(e)
              ? ((i.value = W(e)), (i.expression = !0))
              : (i.value = E(e) ? y(e) : void 0),
            i
          );
        }
        var r;
      }
      function A(e) {
        return O(e)
          ? { value: y(e) }
          : E(e, !0)
          ? { name: y(e), value: w(e, j) && (O(e) || E(e, !0)) ? y(e) : void 0 }
          : void 0;
      }
      function O(e) {
        const t = e.pos,
          n = v(e);
        if (D(n)) {
          for (e.pos++; x(e); ) if (D(b(e), n.single)) return (e.start = t), !0;
          throw k(e, "Unclosed quote", n);
        }
        return !1;
      }
      function E(e, t) {
        const n = e.pos,
          r = { attribute: 0, expression: 0, group: 0 };
        for (; x(e); ) {
          const n = v(e);
          if (r.expression)
            F(n, "expression") && (r[n.context] += n.open ? 1 : -1);
          else {
            if (D(n) || P(n) || I(n) || H(n)) break;
            if (F(n)) {
              if (!t) break;
              if (n.open) r[n.context]++;
              else {
                if (!r[n.context]) break;
                r[n.context]--;
              }
            }
          }
          e.pos++;
        }
        return n !== e.pos && ((e.start = n), !0);
      }
      function z(e) {
        const t = e.pos;
        if (w(e, K)) {
          let n = 0;
          for (; x(e); ) {
            const t = b(e);
            if (F(t, "expression"))
              if (t.open) n++;
              else {
                if (!n) break;
                n--;
              }
          }
          return (e.start = t), !0;
        }
        return !1;
      }
      function W(e) {
        let t = e.start,
          n = e.pos;
        return (
          F(e.tokens[t], "expression", !0) && t++,
          F(e.tokens[n - 1], "expression", !1) && n--,
          y(e, t, n)
        );
      }
      function F(e, t, n) {
        return Boolean(
          e &&
            "Bracket" === e.type &&
            (!t || e.context === t) &&
            (null == n || e.open === n)
        );
      }
      function P(e, t) {
        return Boolean(e && "Operator" === e.type && (!t || e.operator === t));
      }
      function D(e, t) {
        return Boolean(
          e && "Quote" === e.type && (null == t || e.single === t)
        );
      }
      function I(e) {
        return Boolean(e && "WhiteSpace" === e.type);
      }
      function j(e) {
        return P(e, "equal");
      }
      function H(e) {
        return Boolean(e && "Repeater" === e.type);
      }
      function R(e) {
        if (
          (function (e) {
            return "Literal" === e.type;
          })(e)
        ) {
          const t = e.value.charCodeAt(0);
          return t >= 65 && t <= 90;
        }
        return !1;
      }
      function B(e) {
        return (
          "Literal" === e.type ||
          "RepeaterNumber" === e.type ||
          "RepeaterPlaceholder" === e.type
        );
      }
      function q(e) {
        return P(e, "class");
      }
      function V(e) {
        return F(e, "attribute", !0);
      }
      function U(e) {
        return F(e, "attribute", !1);
      }
      function K(e) {
        return F(e, "expression", !0);
      }
      function G(e) {
        return F(e, "group", !0);
      }
      function _(e) {
        return !e.name && !e.value && !e.attributes;
      }
      function X(e) {
        return P(e, "child");
      }
      function Y(e) {
        return P(e, "sibling");
      }
      function Q(e) {
        return P(e, "climb");
      }
      function Z(e) {
        return P(e, "close");
      }
      function J(e) {
        return !!e.eat(92) && ((e.start = e.pos), e.eof() || e.pos++, !0);
      }
      function ee(e) {
        const t = new m(e),
          n = [],
          r = { group: 0, attribute: 0, expression: 0, quote: 0 };
        let i,
          o = 0;
        for (; !t.eof(); ) {
          if (((o = t.peek()), (i = te(t, r)), !i))
            throw t.error("Unexpected character");
          n.push(i),
            "Quote" === i.type
              ? (r.quote = o === r.quote ? 0 : o)
              : "Bracket" === i.type && (r[i.context] += i.open ? 1 : -1);
        }
        return n;
      }
      function te(e, t) {
        return (
          (function (e, t) {
            const n = e.pos;
            if ((t.expression || t.attribute) && e.eat(36) && e.eat(123)) {
              let t;
              e.start = e.pos;
              let r = "";
              if (
                (e.eatWhile(a)
                  ? ((t = Number(e.current())), (r = e.eat(58) ? ne(e) : ""))
                  : s(e.peek()) && (r = ne(e)),
                e.eat(125))
              )
                return {
                  type: "Field",
                  index: t,
                  name: r,
                  start: n,
                  end: e.pos,
                };
              throw e.error("Expecting }");
            }
            e.pos = n;
          })(e, t) ||
          (function (e) {
            const t = e.pos;
            if (e.eat(36) && e.eat(35))
              return {
                type: "RepeaterPlaceholder",
                value: void 0,
                start: t,
                end: e.pos,
              };
            e.pos = t;
          })(e) ||
          (function (e) {
            const t = e.pos;
            if (e.eatWhile(36)) {
              const n = e.pos - t;
              let r = !1,
                i = 1,
                o = 0;
              if (e.eat(64)) {
                for (; e.eat(94); ) o++;
                (r = e.eat(45)),
                  (e.start = e.pos),
                  e.eatWhile(a) && (i = Number(e.current()));
              }
              return (
                (e.start = t),
                {
                  type: "RepeaterNumber",
                  size: n,
                  reverse: r,
                  base: i,
                  parent: o,
                  start: t,
                  end: e.pos,
                }
              );
            }
          })(e) ||
          (function (e) {
            const t = e.pos;
            if (e.eat(42)) {
              e.start = e.pos;
              let n = 1,
                r = !1;
              return (
                e.eatWhile(a) ? (n = Number(e.current())) : (r = !0),
                {
                  type: "Repeater",
                  count: n,
                  value: 0,
                  implicit: r,
                  start: t,
                  end: e.pos,
                }
              );
            }
          })(e) ||
          (function (e) {
            const t = e.pos;
            if (e.eatWhile(f))
              return { type: "WhiteSpace", start: t, end: e.pos };
          })(e) ||
          (function (e, t) {
            const n = e.pos;
            let r = "";
            for (; !e.eof(); ) {
              if (J(e)) {
                r += e.current();
                continue;
              }
              const n = e.peek();
              if (n === t.quote || 36 === n || re(n, t)) break;
              if (t.expression && 125 === n) break;
              if (!t.quote && !t.expression) {
                if (!t.attribute && !ce(n)) break;
                if (ie(n, t) || oe(n, t) || d(n) || ae(n)) break;
              }
              r += e.string[e.pos++];
            }
            if (n !== e.pos)
              return (
                (e.start = n),
                { type: "Literal", value: r, start: n, end: e.pos }
              );
          })(e, t) ||
          (function (e) {
            const t = se(e.peek());
            if (t)
              return {
                type: "Operator",
                operator: t,
                start: e.pos++,
                end: e.pos,
              };
          })(e) ||
          (function (e) {
            const t = e.peek();
            if (d(t))
              return {
                type: "Quote",
                single: 39 === t,
                start: e.pos++,
                end: e.pos,
              };
          })(e) ||
          (function (e) {
            const t = e.peek(),
              n = ae(t);
            if (n)
              return {
                type: "Bracket",
                open: le(t),
                context: n,
                start: e.pos++,
                end: e.pos,
              };
          })(e)
        );
      }
      function ne(e) {
        const t = [];
        for (e.start = e.pos; !e.eof(); )
          if (e.eat(123)) t.push(e.pos);
          else if (e.eat(125)) {
            if (!t.length) {
              e.pos--;
              break;
            }
            t.pop();
          } else e.pos++;
        if (t.length) throw ((e.pos = t.pop()), e.error("Expecting }"));
        return e.current();
      }
      function re(e, t) {
        const n = se(e);
        return (
          !(!n || t.quote || t.expression) && (!t.attribute || "equal" === n)
        );
      }
      function ie(e, t) {
        return f(e) && !t.expression;
      }
      function oe(e, t) {
        return 42 === e && !t.attribute && !t.expression;
      }
      function ae(e) {
        return 40 === e || 41 === e
          ? "group"
          : 91 === e || 93 === e
          ? "attribute"
          : 123 === e || 125 === e
          ? "expression"
          : void 0;
      }
      function se(e) {
        return (
          (62 === e ? "child" : 43 === e && "sibling") ||
          (94 === e && "climb") ||
          (46 === e && "class") ||
          (35 === e && "id") ||
          (47 === e && "close") ||
          (61 === e && "equal") ||
          void 0
        );
      }
      function le(e) {
        return 123 === e || 91 === e || 40 === e;
      }
      function ce(e) {
        return l(e) || 45 === e || 58 === e || 33 === e;
      }
      const ue = {
          child: ">",
          class: ".",
          climb: "^",
          id: "#",
          equal: "=",
          close: "/",
          sibling: "+",
        },
        fe = {
          Literal: (e) => e.value,
          Quote: (e) => (e.single ? "'" : '"'),
          Bracket: (e) =>
            "attribute" === e.context
              ? e.open
                ? "["
                : "]"
              : "expression" === e.context
              ? e.open
                ? "{"
                : "}"
              : e.open
              ? "("
              : "}",
          Operator: (e) => ue[e.operator],
          Field: (e, t) =>
            null != e.index
              ? e.name
                ? `\${${e.index}:${e.name}}`
                : "${" + e.index
              : e.name
              ? t.getVariable(e.name)
              : "",
          RepeaterPlaceholder(e, t) {
            let n;
            for (let e = t.repeaters.length - 1; e >= 0; e--)
              if (t.repeaters[e].implicit) {
                n = t.repeaters[e];
                break;
              }
            return (t.inserted = !0), t.getText(n && n.value);
          },
          RepeaterNumber(e, t) {
            let n = 1;
            const r = t.repeaters.length - 1,
              i = t.repeaters[r];
            if (
              i &&
              ((n = e.reverse
                ? e.base + i.count - i.value - 1
                : e.base + i.value),
              e.parent)
            ) {
              const o = Math.max(0, r - e.parent);
              if (o !== r) {
                const e = t.repeaters[o];
                n += i.count * e.value;
              }
            }
            let o = String(n);
            for (; o.length < e.size; ) o = "0" + o;
            return o;
          },
          WhiteSpace: () => " ",
        };
      function pe(e, t) {
        if (!fe[e.type]) throw new Error("Unknown token " + e.type);
        return fe[e.type](e, t);
      }
      function de(e, t) {
        let n = [];
        if (e.repeat) {
          const r = e.repeat,
            i = Object.assign({}, r);
          let o;
          (i.count =
            i.implicit && Array.isArray(t.text) ? t.text.length : i.count || 1),
            t.repeaters.push(i);
          for (let r = 0; r < i.count; r++) {
            if (
              ((i.value = r),
              (e.repeat = i),
              (o = ye(e) ? me(e, t) : he(e, t)),
              i.implicit && !t.inserted)
            ) {
              const e = we(o),
                n = e && ke(e);
              n && Ce(n, t.getText(i.value));
            }
            if (((n = n.concat(o)), --t.repeatGuard <= 0)) break;
          }
          t.repeaters.pop(), (e.repeat = r), i.implicit && (t.inserted = !0);
        } else n = n.concat(ye(e) ? me(e, t) : he(e, t));
        return n;
      }
      function he(e, t) {
        let n = [];
        const r = {
          type: "AbbreviationNode",
          name: e.name && ve(e.name, t),
          value: e.value && be(e.value, t),
          attributes: void 0,
          children: n,
          repeat: e.repeat && Object.assign({}, e.repeat),
          selfClosing: e.selfClose,
        };
        let i = [r];
        for (const r of e.elements) n = n.concat(de(r, t));
        if (e.attributes) {
          r.attributes = [];
          for (const n of e.attributes) r.attributes.push(ge(n, t));
        }
        return (
          r.name || r.attributes || !r.value || r.value.some(xe)
            ? (r.children = n)
            : (i = i.concat(n)),
          i
        );
      }
      function me(e, t) {
        let n = [];
        for (const r of e.elements) n = n.concat(de(r, t));
        return (
          e.repeat &&
            (n = (function (e, t) {
              for (const n of e) n.repeat || (n.repeat = Object.assign({}, t));
              return e;
            })(n, e.repeat)),
          n
        );
      }
      function ge(e, t) {
        let n,
          r = !1,
          i = !1,
          o = e.expression ? "expression" : "raw";
        const a = e.name && ve(e.name, t);
        if (
          (a && "!" === a[0] && (r = !0),
          a && "." === a[a.length - 1] && (i = !0),
          e.value)
        ) {
          const r = e.value.slice();
          if (D(r[0])) {
            const e = r.shift();
            r.length && we(r).type === e.type && r.pop(),
              (o = e.single ? "singleQuote" : "doubleQuote");
          } else
            F(r[0], "expression", !0) &&
              ((o = "expression"),
              r.shift(),
              F(we(r), "expression", !1) && r.pop());
          n = be(r, t);
        }
        return {
          name: i || r ? a.slice(r ? 1 : 0, i ? -1 : void 0) : a,
          value: n,
          boolean: i,
          implied: r,
          valueType: o,
        };
      }
      function ve(e, t) {
        let n = "";
        for (let r = 0; r < e.length; r++) n += pe(e[r], t);
        return n;
      }
      function be(e, t) {
        const n = [];
        let r = "";
        for (let i, o = 0; o < e.length; o++)
          (i = e[o]),
            xe(i) ? (r && (n.push(r), (r = "")), n.push(i)) : (r += pe(i, t));
        return r && n.push(r), n;
      }
      function ye(e) {
        return "TokenGroup" === e.type;
      }
      function xe(e) {
        return "object" == typeof e && "Field" === e.type && null != e.index;
      }
      function we(e) {
        return e[e.length - 1];
      }
      function ke(e) {
        return e.children.length ? ke(we(e.children)) : e;
      }
      function Ce(e, t) {
        if (e.value) {
          "string" == typeof we(e.value)
            ? (e.value[e.value.length - 1] += t)
            : e.value.push(t);
        } else e.value = [t];
      }
      function Se(e, t) {
        try {
          return (function (e, t = {}) {
            let n = !1;
            const r = {
              type: "Abbreviation",
              children: me(e, {
                inserted: !1,
                repeaters: [],
                text: t.text,
                repeatGuard: t.maxRepeat || Number.POSITIVE_INFINITY,
                getText(e) {
                  n = !0;
                  const r = Array.isArray(t.text)
                    ? null != e
                      ? t.text[e]
                      : t.text.join("\n")
                    : t.text;
                  return null != r ? r : "";
                },
                getVariable(e) {
                  const n = t.variables && t.variables[e];
                  return null != n ? n : e;
                },
              }),
            };
            if (null != t.text && !n) {
              const e = ke(we(r.children));
              if (e) {
                Ce(e, Array.isArray(t.text) ? t.text.join("\n") : t.text);
              }
            }
            return r;
          })(C("string" == typeof e ? ee(e) : e, t), t);
        } catch (t) {
          throw (
            (t instanceof g &&
              "string" == typeof e &&
              (t.message += `\n${e}\n${"-".repeat(t.pos)}^`),
            t)
          );
        }
      }
      function Te(e, t) {
        let n,
          r = 0;
        const i = new m(e),
          o = [];
        for (; !i.eof(); ) {
          if (((n = Le(i, 0 === r && !t)), !n))
            throw i.error("Unexpected character");
          if (
            "Bracket" === n.type &&
            (!r && n.open && Pe(i, o), (r += n.open ? 1 : -1), r < 0)
          )
            throw i.error("Unexpected bracket", n.start);
          o.push(n), Fe(n) && (n = Oe(i)) && o.push(n);
        }
        return o;
      }
      function Le(e, t) {
        return (
          (function (e) {
            const t = e.pos;
            if (e.eat(36) && e.eat(123)) {
              let n;
              e.start = e.pos;
              let r = "";
              if (
                (e.eatWhile(a)
                  ? ((n = Number(e.current())), (r = e.eat(58) ? Me(e) : ""))
                  : s(e.peek()) && (r = Me(e)),
                e.eat(125))
              )
                return {
                  type: "Field",
                  index: n,
                  name: r,
                  start: t,
                  end: e.pos,
                };
              throw e.error("Expecting }");
            }
            e.pos = t;
          })(e) ||
          (function (e) {
            const t = e.pos;
            if (
              (function (e) {
                const t = e.pos;
                e.eat(45);
                const n = e.pos,
                  r = e.eatWhile(a),
                  i = e.pos;
                if (e.eat(46)) {
                  const t = e.eatWhile(a);
                  r || t || (e.pos = i);
                }
                e.pos === n && (e.pos = t);
                return e.pos !== t;
              })(e)
            ) {
              e.start = t;
              const n = e.current();
              return (
                (e.start = e.pos),
                e.eat(37) || e.eatWhile(c),
                {
                  type: "NumberValue",
                  value: Number(n),
                  rawValue: n,
                  unit: e.current(),
                  start: t,
                  end: e.pos,
                }
              );
            }
          })(e) ||
          (function (e) {
            const t = e.pos;
            if (e.eat(35)) {
              const n = e.pos;
              let r = "",
                i = "";
              if (
                (e.eatWhile($e)
                  ? ((r = e.substring(n, e.pos)), (i = Ae(e)))
                  : e.eat(116)
                  ? ((r = "0"), (i = Ae(e) || "0"))
                  : (i = Ae(e)),
                r || i || e.eof())
              ) {
                const {
                  r: n,
                  g: o,
                  b: a,
                  a: s,
                } = (function (e, t) {
                  let n = "0",
                    r = "0",
                    i = "0",
                    o = Number(null != t && "" !== t ? t : 1);
                  if ("t" === e) o = 0;
                  else
                    switch (e.length) {
                      case 0:
                        break;
                      case 1:
                        n = r = i = e + e;
                        break;
                      case 2:
                        n = r = i = e;
                        break;
                      case 3:
                        (n = e[0] + e[0]), (r = e[1] + e[1]), (i = e[2] + e[2]);
                        break;
                      default:
                        (n = (e += e).slice(0, 2)),
                          (r = e.slice(2, 4)),
                          (i = e.slice(4, 6));
                    }
                  return {
                    r: parseInt(n, 16),
                    g: parseInt(r, 16),
                    b: parseInt(i, 16),
                    a: o,
                  };
                })(r, i);
                return {
                  type: "ColorValue",
                  r: n,
                  g: o,
                  b: a,
                  a: s,
                  raw: e.substring(t + 1, e.pos),
                  start: t,
                  end: e.pos,
                };
              }
              return Ne(e, t);
            }
            e.pos = t;
          })(e) ||
          (function (e) {
            const t = e.peek(),
              n = e.pos;
            let r = !1;
            if (d(t)) {
              for (e.pos++; !e.eof(); ) {
                if (e.eat(t)) {
                  r = !0;
                  break;
                }
                e.pos++;
              }
              return (
                (e.start = n),
                {
                  type: "StringValue",
                  value: e.substring(n + 1, e.pos - (r ? 1 : 0)),
                  quote: 39 === t ? "single" : "double",
                  start: n,
                  end: e.pos,
                }
              );
            }
          })(e) ||
          (function (e) {
            const t = e.peek();
            if (
              (function (e) {
                return 40 === e || 41 === e;
              })(t)
            )
              return {
                type: "Bracket",
                open: 40 === t,
                start: e.pos++,
                end: e.pos,
              };
          })(e) ||
          Oe(e) ||
          (function (e) {
            const t = e.pos;
            if (e.eatWhile(f))
              return { type: "WhiteSpace", start: t, end: e.pos };
          })(e) ||
          (function (e, t) {
            const n = e.pos;
            e.eat(Ee)
              ? e.eatWhile(n ? ze : We)
              : e.eat(c)
              ? e.eatWhile(t ? We : ze)
              : (e.eat(46), e.eatWhile(We));
            if (n !== e.pos) return (e.start = n), Ne(e, (e.start = n));
          })(e, t)
        );
      }
      function Me(e) {
        const t = [];
        for (e.start = e.pos; !e.eof(); )
          if (e.eat(123)) t.push(e.pos);
          else if (e.eat(125)) {
            if (!t.length) {
              e.pos--;
              break;
            }
            t.pop();
          } else e.pos++;
        if (t.length) throw ((e.pos = t.pop()), e.error("Expecting }"));
        return e.current();
      }
      function Ne(e, t = e.start, n = e.pos) {
        return { type: "Literal", value: e.substring(t, n), start: t, end: n };
      }
      function Ae(e) {
        const t = e.pos;
        return e.eat(46)
          ? ((e.start = t), e.eatWhile(a) ? e.current() : "1")
          : "";
      }
      function Oe(e) {
        const t =
          (43 === (n = e.peek()) ? "+" : 33 === n && "!") ||
          (44 === n && ",") ||
          (58 === n && ":") ||
          (45 === n && "-") ||
          void 0;
        var n;
        if (t)
          return { type: "Operator", operator: t, start: e.pos++, end: e.pos };
      }
      function Ee(e) {
        return 64 === e || 36 === e;
      }
      function $e(e) {
        return a(e) || s(e, 65, 70);
      }
      function ze(e) {
        return l(e) || 45 === e;
      }
      function We(e) {
        return c(e) || 37 === e;
      }
      function Fe(e) {
        return "ColorValue" === e.type || ("NumberValue" === e.type && !e.unit);
      }
      function Pe(e, t) {
        let n = 0,
          r = 0;
        for (; t.length; ) {
          const e = (i = t)[i.length - 1];
          if ("Literal" !== e.type && "NumberValue" !== e.type) break;
          (n = e.start), r || (r = e.end), t.pop();
        }
        var i;
        n !== r && t.push(Ne(e, n, r));
      }
      function De(e) {
        return e.tokens[e.pos];
      }
      function Ie(e) {
        return e.pos < e.size;
      }
      function je(e, t) {
        return !!t(De(e)) && (e.pos++, !0);
      }
      function He(e, t, n = De(e)) {
        n && null != n.start && (t += " at " + n.start);
        const r = new Error(t);
        return (r.pos = n && n.start), r;
      }
      function Re(e, t = {}) {
        const n = (function (e) {
            return { tokens: e, start: 0, pos: 0, size: e.length };
          })(e),
          r = [];
        let i;
        for (; Ie(n); )
          if ((i = Be(n, t))) r.push(i);
          else if (!je(n, Qe)) throw He(n, "Unexpected token");
        return r;
      }
      function Be(e, t) {
        let n,
          r,
          i = !1;
        const o = [],
          a = De(e),
          s = !!t.value;
        for (
          s ||
            !Ue(a) ||
            (function (e) {
              const t = e.tokens[e.pos],
                n = e.tokens[e.pos + 1];
              return t && n && Ue(t) && "Bracket" === n.type;
            })(e) ||
            (e.pos++, (n = a.value), je(e, nt)),
            s && je(e, Xe);
          Ie(e);
        )
          if (je(e, et)) i = !0;
          else if ((r = qe(e, s))) o.push(r);
          else if (!je(e, Je)) break;
        if (n || o.length || i) return { name: n, value: o, important: i };
      }
      function qe(e, t) {
        const n = [];
        let r, i;
        for (; Ie(e); )
          if (((r = De(e)), tt(r)))
            e.pos++,
              Ue(r) && (i = Ve(e))
                ? n.push({ type: "FunctionCall", name: r.value, arguments: i })
                : n.push(r);
          else {
            if (!(nt(r) || (t && Xe(r)))) break;
            e.pos++;
          }
        return n.length ? { type: "CSSValue", value: n } : void 0;
      }
      function Ve(e) {
        const t = e.pos;
        if (je(e, Ge)) {
          const n = [];
          let r;
          for (; Ie(e) && !je(e, _e); )
            if ((r = qe(e, !0))) n.push(r);
            else if (!je(e, Xe) && !je(e, Ze)) throw He(e, "Unexpected token");
          return (e.start = t), n;
        }
      }
      function Ue(e) {
        return e && "Literal" === e.type;
      }
      function Ke(e, t) {
        return e && "Bracket" === e.type && (null == t || e.open === t);
      }
      function Ge(e) {
        return Ke(e, !0);
      }
      function _e(e) {
        return Ke(e, !1);
      }
      function Xe(e) {
        return e && "WhiteSpace" === e.type;
      }
      function Ye(e, t) {
        return e && "Operator" === e.type && (!t || e.operator === t);
      }
      function Qe(e) {
        return Ye(e, "+");
      }
      function Ze(e) {
        return Ye(e, ",");
      }
      function Je(e) {
        return Ze(e);
      }
      function et(e) {
        return Ye(e, "!");
      }
      function tt(e) {
        return (
          "StringValue" === e.type ||
          "ColorValue" === e.type ||
          "NumberValue" === e.type ||
          "Literal" === e.type ||
          "Field" === e.type
        );
      }
      function nt(e) {
        return Ye(e, ":") || Ye(e, "-");
      }
      function rt(e, t) {
        try {
          return Re("string" == typeof e ? Te(e, t && t.value) : e, t);
        } catch (t) {
          throw (
            (t instanceof g &&
              "string" == typeof e &&
              (t.message += `\n${e}\n${"-".repeat(t.pos)}^`),
            t)
          );
        }
      }
      const it = {
        mark: !0,
        preview: !0,
        autoRenameTags: !0,
        markTagPairs: !0,
        previewOpenTag: !1,
        attributeQuotes: "double",
        markupStyle: "html",
        comments: !1,
        commentsTemplate: "\x3c!-- /[#ID][.CLASS] --\x3e",
        bem: !1,
      };
      function ot(e, t) {
        return (
          t || (t = e.getOption("emmet")),
          Object.assign(Object.assign({}, it), t)
        );
      }
      const at = {
          xml: !1,
          allTokens: !1,
          special: {
            style: null,
            script: [
              "",
              "text/javascript",
              "application/x-javascript",
              "javascript",
              "typescript",
              "ts",
              "coffee",
              "coffeescript",
            ],
          },
          empty: [
            "img",
            "meta",
            "link",
            "br",
            "base",
            "hr",
            "area",
            "wbr",
            "col",
            "embed",
            "input",
            "param",
            "source",
            "track",
          ],
        },
        st = { throws: !1 };
      function lt(e = {}) {
        return Object.assign(Object.assign({}, at), e);
      }
      function ct(e) {
        return e.split("").map((e) => e.charCodeAt(0));
      }
      function ut(e, t) {
        const n = e.pos;
        for (let r = 0; r < t.length; r++)
          if (!e.eat(t[r])) return (e.pos = n), !1;
        return (e.start = n), !0;
      }
      function ft(e, t, n, r) {
        const i = e.pos;
        if (ut(e, t)) {
          for (; !e.eof(); ) {
            if (ut(e, n)) return (e.start = i), !0;
            e.pos++;
          }
          return r ? ((e.start = i), !0) : ((e.pos = i), !1);
        }
        return (e.pos = i), !1;
      }
      function pt(e) {
        return (
          s(e) ||
          58 === e ||
          95 === e ||
          (e >= 192 && e <= 214) ||
          (e >= 216 && e <= 246) ||
          (e >= 248 && e <= 767) ||
          (e >= 880 && e <= 893) ||
          (e >= 895 && e <= 8191)
        );
      }
      function dt(e) {
        return (
          pt(e) ||
          45 === e ||
          46 === e ||
          a(e) ||
          183 === e ||
          (e >= 768 && e <= 879)
        );
      }
      function ht(e) {
        const t = e.pos;
        return !!e.eat(pt) && (e.eatWhile(dt), (e.start = t), !0);
      }
      function mt(e) {
        return 62 === e || 47 === e;
      }
      function gt(e) {
        return !(isNaN(e) || d(e) || f(e) || mt(e));
      }
      function vt(e) {
        return (
          h(e, 60, 62, st) ||
          h(e, 40, 41, st) ||
          h(e, 91, 93, st) ||
          h(e, 123, 125, st)
        );
      }
      function bt(e, t) {
        const n = [];
        let r = 0,
          i = e.length;
        t && ((r = t.length + 1), (i -= "/>" === e.slice(-2) ? 2 : 1));
        const o = new m(e, r, i);
        for (; !o.eof(); )
          if ((o.eatWhile(f), yt(o))) {
            const e = { name: o.current(), nameStart: o.start, nameEnd: o.pos };
            o.eat(61) &&
              xt(o) &&
              ((e.value = o.current()),
              (e.valueStart = o.start),
              (e.valueEnd = o.pos)),
              n.push(e);
          } else o.pos++;
        return n;
      }
      function yt(e) {
        const t = e.pos;
        return e.eat(42) || e.eat(35)
          ? (ht(e), (e.start = t), !0)
          : vt(e) || ht(e);
      }
      function xt(e) {
        return (
          p(e, st) ||
          vt(e) ||
          (function (e) {
            const t = e.pos;
            if (e.eatWhile(gt)) return (e.start = t), !0;
          })(e)
        );
      }
      const wt = ct("<![CDATA["),
        kt = ct("]]>"),
        Ct = ct("\x3c!--"),
        St = ct("--\x3e"),
        Tt = ct("<?"),
        Lt = ct("?>"),
        Mt = ct("<%"),
        Nt = ct("%>");
      function At(e, t, n) {
        const r = new m(e),
          i = n ? n.special : null,
          o = !!n && n.allTokens;
        let a,
          s,
          l,
          c,
          u,
          p = !1,
          d = null;
        for (; !r.eof(); ) {
          const n = r.pos;
          if ($t(r)) {
            if (o && !1 === t("#cdata", 4, r.start, r.pos)) break;
          } else if (zt(r)) {
            if (o && !1 === t("#comment", 6, r.start, r.pos)) break;
          } else if (Ft(r)) {
            if (o && !1 === t("#erb", 7, r.start, r.pos)) break;
          } else if ((d = Wt(r))) {
            if (o && !1 === t(d, 5, r.start, r.pos)) break;
          } else if (r.eat(60)) {
            if (
              ((a = r.eat(47) ? 2 : 1),
              (l = r.pos),
              ht(r) &&
                ((c = r.pos),
                2 !== a && (Ot(r), r.eatWhile(f), r.eat(47) && (a = 3)),
                r.eat(62)))
            ) {
              if (((s = r.substring(l, c)), !1 === t(s, a, n, r.pos))) break;
              if (1 === a && i && Pt(i, s, e, n, r.pos)) {
                for (u = ct(s), p = !1; !r.eof(); ) {
                  if (Et(r, u)) {
                    p = !0;
                    break;
                  }
                  r.pos++;
                }
                if (p && !1 === t(s, 2, r.start, r.pos)) break;
              }
            }
          } else r.pos++;
        }
      }
      function Ot(e) {
        for (; !e.eof(); )
          if ((e.eatWhile(f), yt(e))) e.eat(61) && xt(e);
          else {
            if (mt(e.peek())) break;
            e.pos++;
          }
      }
      function Et(e, t) {
        const n = e.pos;
        return e.eat(60) && e.eat(47) && ut(e, t) && e.eat(62)
          ? ((e.start = n), !0)
          : ((e.pos = n), !1);
      }
      function $t(e) {
        return ft(e, wt, kt, !0);
      }
      function zt(e) {
        return ft(e, Ct, St, !0);
      }
      function Wt(e) {
        const t = e.pos;
        if (ut(e, Tt) && ht(e)) {
          const n = e.current();
          for (; !e.eof() && !ut(e, Lt); ) p(e) || e.pos++;
          return (e.start = t), n;
        }
        return (e.pos = t), null;
      }
      function Ft(e) {
        const t = e.pos;
        if (ut(e, Mt)) {
          for (; !e.eof() && !ut(e, Nt); ) p(e) || e.pos++;
          return (e.start = t), !0;
        }
        return (e.pos = t), !1;
      }
      function Pt(e, t, n, r, i) {
        if (t in e) {
          const o = e[t];
          if (!Array.isArray(o)) return !0;
          const a = bt(n.substring(r + t.length + 1, i - 1));
          return o.includes(
            (function (e, t) {
              for (let r = 0; r < e.length; r++) {
                const i = e[r];
                if (i.name === t)
                  return (
                    i.value &&
                    (d((n = i.value).charCodeAt(0)) && (n = n.slice(1)),
                    d(n.charCodeAt(n.length - 1)) && (n = n.slice(0, -1)),
                    n)
                  );
              }
              var n;
            })(a, "type") || ""
          );
        }
        return !1;
      }
      function Dt(e, t, n, r) {
        if (e.length) {
          const i = e.pop();
          return (i.name = t), (i.start = n), (i.end = r), i;
        }
        return { name: t, start: n, end: r };
      }
      function It(e, t) {
        e.push(t);
      }
      function jt(e, t, n, r) {
        const i = bt(e.slice(t, n), r);
        return (
          i.forEach((e) => {
            (e.nameStart += t),
              (e.nameEnd += t),
              null != e.value && ((e.valueStart += t), (e.valueEnd += t));
          }),
          i
        );
      }
      function Ht(e, t) {
        return !t.xml && t.empty.includes(e);
      }
      function Rt(e) {
        return e.length ? e[e.length - 1] : null;
      }
      function Bt(e, t) {
        const n = new m(e),
          r = {
            start: -1,
            end: -1,
            propertyStart: -1,
            propertyEnd: -1,
            propertyDelimiter: -1,
            expression: 0,
          };
        let i;
        const o = (e, i = n.start, o = r.start, a = r.end) =>
          !1 === t(e, o, a, i);
        for (; !n.eof(); )
          if (!Vt(n) && !qt(n))
            if (((n.start = n.pos), (i = n.eat(125)) || n.eat(59))) {
              if (-1 !== r.propertyStart) {
                if (
                  o(
                    "propertyName",
                    r.propertyDelimiter,
                    r.propertyStart,
                    r.propertyEnd
                  )
                )
                  return;
                if (
                  (-1 === r.start && (r.start = r.end = n.start),
                  o("propertyValue"))
                )
                  return;
              } else if (-1 !== r.start && o("propertyName")) return;
              if (i && ((r.start = n.start), (r.end = n.pos), o("blockEnd")))
                return;
              Kt(r);
            } else if (n.eat(123)) {
              if (
                (-1 === r.start &&
                  -1 === r.propertyStart &&
                  (r.start = r.end = n.pos),
                -1 !== r.propertyStart && (r.start = r.propertyStart),
                o("selector"))
              )
                return;
              Kt(r);
            } else
              n.eat(58) && !Gt(n, r)
                ? (-1 === r.propertyStart && (r.propertyStart = r.start),
                  (r.propertyEnd = r.end),
                  (r.propertyDelimiter = n.pos - 1),
                  (r.start = r.end = -1))
                : (-1 === r.start && (r.start = n.pos),
                  n.eat(40)
                    ? r.expression++
                    : n.eat(41)
                    ? r.expression--
                    : Ut(n) || n.pos++,
                  (r.end = n.pos));
        (-1 !== r.propertyStart &&
          o(
            "propertyName",
            r.propertyDelimiter,
            r.propertyStart,
            r.propertyEnd
          )) ||
          (-1 !== r.start &&
            o(-1 !== r.propertyStart ? "propertyValue" : "propertyName", -1));
      }
      function qt(e) {
        return e.eatWhile(f);
      }
      function Vt(e) {
        const t = e.pos;
        if (e.eat(47) && e.eat(42)) {
          for (e.start = t; !e.eof(); )
            if (e.eat(42)) {
              if (e.eat(47)) return !0;
            } else e.pos++;
          return !0;
        }
        return (e.pos = t), !1;
      }
      function Ut(e) {
        const t = e.peek();
        if (d(t)) {
          for (
            e.start = e.pos++;
            !e.eof() && !(e.eat(t) || e.eat(10) || e.eat(13));
          )
            e.eat(92), e.pos++;
          return !0;
        }
      }
      function Kt(e) {
        e.start =
          e.end =
          e.propertyStart =
          e.propertyEnd =
          e.propertyDelimiter =
            -1;
      }
      function Gt(e, t) {
        return t.expression || e.eatWhile(58);
      }
      const _t = [43, 47, 42, 44];
      function Xt(e, t = 0) {
        let n = -1,
          r = 0,
          i = 0;
        const o = [],
          a = new m(e);
        for (; !a.eof(); )
          (i = a.pos),
            a.eat(f) || a.eat(Yt) || Qt(a)
              ? (r || -1 === n || (o.push([t + n, t + i]), (n = -1)),
                a.eatWhile(f))
              : (-1 === n && (n = a.pos),
                a.eat(40) ? r++ : a.eat(41) ? r-- : Ut(a) || a.pos++);
        return -1 !== n && n !== a.pos && o.push([t + n, t + a.pos]), o;
      }
      function Yt(e) {
        return _t.includes(e);
      }
      function Qt(e) {
        const t = e.pos;
        return !(!e.eat(45) || !e.eat(f)) || ((e.pos = t), !1);
      }
      function Zt(e, t) {
        const n = [],
          r = [],
          i = [];
        let o = null;
        const a = (e, t, r) => {
            if (n.length) {
              const i = n.pop();
              return (i.start = e), (i.end = t), (i.delimiter = r), i;
            }
            return { start: e, end: t, delimiter: r, firstChild: null };
          },
          s = (e) => {
            (e.firstChild = null), n.push(e);
          },
          l = () => {
            o && (s(o), (o = null));
          };
        return (
          Bt(e, (n, c, u, f) => {
            if ("blockEnd" === n) {
              l();
              let n = r.pop();
              if (!n) return;
              if (n.start <= t && t <= u) {
                let t = Jt(e, n.delimiter + 1, c);
                for (nn(i, [n.start, u]), t && nn(i, t); n.firstChild; ) {
                  const r = n.firstChild;
                  (t = Jt(e, r.delimiter + 1, r.end - 1)),
                    nn(i, [r.start, r.end]),
                    t && nn(i, t),
                    (n = r);
                }
                return !1;
              }
              {
                const e = rn(r);
                e && !e.firstChild ? ((n.end = u), (e.firstChild = n)) : s(n);
              }
            } else if ("propertyName" === n)
              l(),
                (o = a(c, u, f)),
                ((e, t, n) => {
                  const i = rn(r);
                  i && !i.firstChild && (i.firstChild = a(e, t, n));
                })(c, u, f);
            else if ("propertyValue" === n) {
              if (o) {
                if (o.start <= t && u >= t)
                  return nn(i, [o.start, f + 1]), nn(i, [c, u]), l(), !1;
                const e = rn(r);
                e &&
                  e.firstChild &&
                  e.firstChild.start === o.start &&
                  (e.firstChild.end = -1 !== f ? f + 1 : u),
                  l();
              }
            } else r.push(a(c, u, f)), l();
          }),
          (r.length = n.length = 0),
          i
        );
      }
      function Jt(e, t, n) {
        for (; t < n && f(e.charCodeAt(t)); ) t++;
        for (; n > t && f(e.charCodeAt(n - 1)); ) n--;
        return t !== n ? [t, n] : null;
      }
      function en(e, t, n, r) {
        if (e.length) {
          const i = e.pop();
          return (i[0] = t), (i[1] = n), (i[2] = r), i;
        }
        return [t, n, r];
      }
      function tn(e, t) {
        return t && e.push(t), null;
      }
      function nn(e, t) {
        const n = e.length ? e[e.length - 1] : null;
        (n && n[0] === t[0] && n[1] === t[1]) || t[0] === t[1] || e.push(t);
      }
      function rn(e) {
        return e.length ? e[e.length - 1] : null;
      }
      function on(e, t, n) {
        if (e && t) {
          e.length && n && sn(e, n);
          for (const n of t) sn(e, n);
          return e;
        }
        const r = e || t;
        return r && r.slice();
      }
      function an(e, t, n) {
        return (
          (e.name = t.name),
          n.options["output.reverseAttributes"] || (e.value = t.value),
          e.implied || (e.implied = t.implied),
          e.boolean || (e.boolean = t.boolean),
          "expression" !== e.valueType && (e.valueType = t.valueType),
          e
        );
      }
      function sn(e, t) {
        const n = e.length - 1;
        "string" == typeof e[n] && "string" == typeof t
          ? (e[n] += t)
          : e.push(t);
      }
      function ln(e) {
        let t;
        for (; e.children.length; )
          (t = e), (e = e.children[e.children.length - 1]);
        return { parent: t, node: e };
      }
      function cn(e) {
        return "AbbreviationNode" === e.type;
      }
      function un(e, t, n) {
        let r = [];
        for (const n of e.children) {
          const e = t(n);
          if (e) {
            r = r.concat(e.children);
            const i = ln(e);
            cn(i.node) && (i.node.children = i.node.children.concat(un(n, t)));
          } else r.push(n), (n.children = un(n, t));
        }
        return (e.children = r);
      }
      function fn(e, t) {
        e.selfClosing && (t.selfClosing = !0),
          null != e.value && (t.value = e.value),
          e.repeat && (t.repeat = e.repeat);
      }
      function pn(e, t = 0) {
        return {
          options: e,
          value: "",
          level: t,
          offset: 0,
          line: 0,
          column: 0,
        };
      }
      function dn(e, t) {
        wn(e, (0, e.options["output.text"])(t, e.offset, e.line, e.column));
      }
      function hn(e, t) {
        const n = t.split(/\r\n|\r|\n/g);
        for (let t = 0, r = n.length - 1; t <= r; t++)
          dn(e, n[t]), t !== r && mn(e, !0);
      }
      function mn(e, t) {
        const n = e.options["output.baseIndent"];
        dn(e, e.options["output.newline"] + n),
          e.line++,
          (e.column = n.length),
          t &&
            (function (e, t = e.level) {
              const n = e.options["output.indent"];
              dn(e, n.repeat(Math.max(t, 0)));
            })(e, !0 === t ? e.level : t);
      }
      function gn(e, t, n) {
        wn(e, (0, e.options["output.field"])(t, n, e.offset, e.line, e.column));
      }
      function vn(e, t) {
        return kn(e, t.options["output.attributeCase"]);
      }
      function bn(e, t, n) {
        return "expression" === e.valueType
          ? n
            ? "{"
            : "}"
          : "single" === t.options["output.attributeQuotes"]
          ? "'"
          : '"';
      }
      function yn(e, t) {
        return (
          e.boolean ||
          t.options["output.booleanAttributes"].includes(
            (e.name || "").toLowerCase()
          )
        );
      }
      function xn(e, t) {
        return "string" == typeof e
          ? t.options.inlineElements.includes(e.toLowerCase())
          : e.name
          ? xn(e.name, t)
          : Boolean(e.value && !e.attributes);
      }
      function wn(e, t) {
        (e.value += t), (e.offset += t.length), (e.column += t.length);
      }
      function kn(e, t) {
        return t ? ("upper" === t ? e.toUpperCase() : e.toLowerCase()) : e;
      }
      const Cn = {
        p: "span",
        ul: "li",
        ol: "li",
        table: "tr",
        tr: "td",
        tbody: "tr",
        thead: "tr",
        tfoot: "tr",
        colgroup: "col",
        select: "option",
        optgroup: "option",
        audio: "source",
        video: "source",
        object: "param",
        map: "area",
      };
      function Sn(e, t, n) {
        const r = (function (e) {
            for (let t = e.length - 1; t >= 0; t--) {
              const n = e[t];
              if (cn(n)) return n;
            }
          })(t),
          i = n.context ? n.context.name : "",
          o = ((r ? r.name : i) || "").toLowerCase();
        e.name = Cn[o] || (xn(o, n) ? "span" : "div");
      }
      const Tn = {
          ru: {
            common: [
              "далеко-далеко",
              "за",
              "словесными",
              "горами",
              "в стране",
              "гласных",
              "и согласных",
              "живут",
              "рыбные",
              "тексты",
            ],
            words: [
              "вдали",
              "от всех",
              "они",
              "буквенных",
              "домах",
              "на берегу",
              "семантика",
              "большого",
              "языкового",
              "океана",
              "маленький",
              "ручеек",
              "даль",
              "журчит",
              "по всей",
              "обеспечивает",
              "ее",
              "всеми",
              "необходимыми",
              "правилами",
              "эта",
              "парадигматическая",
              "страна",
              "которой",
              "жаренные",
              "предложения",
              "залетают",
              "прямо",
              "рот",
              "даже",
              "всемогущая",
              "пунктуация",
              "не",
              "имеет",
              "власти",
              "над",
              "рыбными",
              "текстами",
              "ведущими",
              "безорфографичный",
              "образ",
              "жизни",
              "однажды",
              "одна",
              "маленькая",
              "строчка",
              "рыбного",
              "текста",
              "имени",
              "lorem",
              "ipsum",
              "решила",
              "выйти",
              "большой",
              "мир",
              "грамматики",
              "великий",
              "оксмокс",
              "предупреждал",
              "о",
              "злых",
              "запятых",
              "диких",
              "знаках",
              "вопроса",
              "коварных",
              "точках",
              "запятой",
              "но",
              "текст",
              "дал",
              "сбить",
              "себя",
              "толку",
              "он",
              "собрал",
              "семь",
              "своих",
              "заглавных",
              "букв",
              "подпоясал",
              "инициал",
              "за",
              "пояс",
              "пустился",
              "дорогу",
              "взобравшись",
              "первую",
              "вершину",
              "курсивных",
              "гор",
              "бросил",
              "последний",
              "взгляд",
              "назад",
              "силуэт",
              "своего",
              "родного",
              "города",
              "буквоград",
              "заголовок",
              "деревни",
              "алфавит",
              "подзаголовок",
              "своего",
              "переулка",
              "грустный",
              "реторический",
              "вопрос",
              "скатился",
              "его",
              "щеке",
              "продолжил",
              "свой",
              "путь",
              "дороге",
              "встретил",
              "рукопись",
              "она",
              "предупредила",
              "моей",
              "все",
              "переписывается",
              "несколько",
              "раз",
              "единственное",
              "что",
              "меня",
              "осталось",
              "это",
              "приставка",
              "возвращайся",
              "ты",
              "лучше",
              "свою",
              "безопасную",
              "страну",
              "послушавшись",
              "рукописи",
              "наш",
              "продолжил",
              "свой",
              "путь",
              "вскоре",
              "ему",
              "повстречался",
              "коварный",
              "составитель",
              "рекламных",
              "текстов",
              "напоивший",
              "языком",
              "речью",
              "заманивший",
              "свое",
              "агентство",
              "которое",
              "использовало",
              "снова",
              "снова",
              "своих",
              "проектах",
              "если",
              "переписали",
              "то",
              "живет",
              "там",
              "до",
              "сих",
              "пор",
            ],
          },
          sp: {
            common: [
              "mujer",
              "uno",
              "dolor",
              "más",
              "de",
              "poder",
              "mismo",
              "si",
            ],
            words: [
              "ejercicio",
              "preferencia",
              "perspicacia",
              "laboral",
              "paño",
              "suntuoso",
              "molde",
              "namibia",
              "planeador",
              "mirar",
              "demás",
              "oficinista",
              "excepción",
              "odio",
              "consecuencia",
              "casi",
              "auto",
              "chicharra",
              "velo",
              "elixir",
              "ataque",
              "no",
              "odio",
              "temporal",
              "cuórum",
              "dignísimo",
              "facilismo",
              "letra",
              "nihilista",
              "expedición",
              "alma",
              "alveolar",
              "aparte",
              "león",
              "animal",
              "como",
              "paria",
              "belleza",
              "modo",
              "natividad",
              "justo",
              "ataque",
              "séquito",
              "pillo",
              "sed",
              "ex",
              "y",
              "voluminoso",
              "temporalidad",
              "verdades",
              "racional",
              "asunción",
              "incidente",
              "marejada",
              "placenta",
              "amanecer",
              "fuga",
              "previsor",
              "presentación",
              "lejos",
              "necesariamente",
              "sospechoso",
              "adiposidad",
              "quindío",
              "pócima",
              "voluble",
              "débito",
              "sintió",
              "accesorio",
              "falda",
              "sapiencia",
              "volutas",
              "queso",
              "permacultura",
              "laudo",
              "soluciones",
              "entero",
              "pan",
              "litro",
              "tonelada",
              "culpa",
              "libertario",
              "mosca",
              "dictado",
              "reincidente",
              "nascimiento",
              "dolor",
              "escolar",
              "impedimento",
              "mínima",
              "mayores",
              "repugnante",
              "dulce",
              "obcecado",
              "montaña",
              "enigma",
              "total",
              "deletéreo",
              "décima",
              "cábala",
              "fotografía",
              "dolores",
              "molesto",
              "olvido",
              "paciencia",
              "resiliencia",
              "voluntad",
              "molestias",
              "magnífico",
              "distinción",
              "ovni",
              "marejada",
              "cerro",
              "torre",
              "y",
              "abogada",
              "manantial",
              "corporal",
              "agua",
              "crepúsculo",
              "ataque",
              "desierto",
              "laboriosamente",
              "angustia",
              "afortunado",
              "alma",
              "encefalograma",
              "materialidad",
              "cosas",
              "o",
              "renuncia",
              "error",
              "menos",
              "conejo",
              "abadía",
              "analfabeto",
              "remo",
              "fugacidad",
              "oficio",
              "en",
              "almácigo",
              "vos",
              "pan",
              "represión",
              "números",
              "triste",
              "refugiado",
              "trote",
              "inventor",
              "corchea",
              "repelente",
              "magma",
              "recusado",
              "patrón",
              "explícito",
              "paloma",
              "síndrome",
              "inmune",
              "autoinmune",
              "comodidad",
              "ley",
              "vietnamita",
              "demonio",
              "tasmania",
              "repeler",
              "apéndice",
              "arquitecto",
              "columna",
              "yugo",
              "computador",
              "mula",
              "a",
              "propósito",
              "fantasía",
              "alias",
              "rayo",
              "tenedor",
              "deleznable",
              "ventana",
              "cara",
              "anemia",
              "corrupto",
            ],
          },
          latin: {
            common: [
              "lorem",
              "ipsum",
              "dolor",
              "sit",
              "amet",
              "consectetur",
              "adipisicing",
              "elit",
            ],
            words: [
              "exercitationem",
              "perferendis",
              "perspiciatis",
              "laborum",
              "eveniet",
              "sunt",
              "iure",
              "nam",
              "nobis",
              "eum",
              "cum",
              "officiis",
              "excepturi",
              "odio",
              "consectetur",
              "quasi",
              "aut",
              "quisquam",
              "vel",
              "eligendi",
              "itaque",
              "non",
              "odit",
              "tempore",
              "quaerat",
              "dignissimos",
              "facilis",
              "neque",
              "nihil",
              "expedita",
              "vitae",
              "vero",
              "ipsum",
              "nisi",
              "animi",
              "cumque",
              "pariatur",
              "velit",
              "modi",
              "natus",
              "iusto",
              "eaque",
              "sequi",
              "illo",
              "sed",
              "ex",
              "et",
              "voluptatibus",
              "tempora",
              "veritatis",
              "ratione",
              "assumenda",
              "incidunt",
              "nostrum",
              "placeat",
              "aliquid",
              "fuga",
              "provident",
              "praesentium",
              "rem",
              "necessitatibus",
              "suscipit",
              "adipisci",
              "quidem",
              "possimus",
              "voluptas",
              "debitis",
              "sint",
              "accusantium",
              "unde",
              "sapiente",
              "voluptate",
              "qui",
              "aspernatur",
              "laudantium",
              "soluta",
              "amet",
              "quo",
              "aliquam",
              "saepe",
              "culpa",
              "libero",
              "ipsa",
              "dicta",
              "reiciendis",
              "nesciunt",
              "doloribus",
              "autem",
              "impedit",
              "minima",
              "maiores",
              "repudiandae",
              "ipsam",
              "obcaecati",
              "ullam",
              "enim",
              "totam",
              "delectus",
              "ducimus",
              "quis",
              "voluptates",
              "dolores",
              "molestiae",
              "harum",
              "dolorem",
              "quia",
              "voluptatem",
              "molestias",
              "magni",
              "distinctio",
              "omnis",
              "illum",
              "dolorum",
              "voluptatum",
              "ea",
              "quas",
              "quam",
              "corporis",
              "quae",
              "blanditiis",
              "atque",
              "deserunt",
              "laboriosam",
              "earum",
              "consequuntur",
              "hic",
              "cupiditate",
              "quibusdam",
              "accusamus",
              "ut",
              "rerum",
              "error",
              "minus",
              "eius",
              "ab",
              "ad",
              "nemo",
              "fugit",
              "officia",
              "at",
              "in",
              "id",
              "quos",
              "reprehenderit",
              "numquam",
              "iste",
              "fugiat",
              "sit",
              "inventore",
              "beatae",
              "repellendus",
              "magnam",
              "recusandae",
              "quod",
              "explicabo",
              "doloremque",
              "aperiam",
              "consequatur",
              "asperiores",
              "commodi",
              "optio",
              "dolor",
              "labore",
              "temporibus",
              "repellat",
              "veniam",
              "architecto",
              "est",
              "esse",
              "mollitia",
              "nulla",
              "a",
              "similique",
              "eos",
              "alias",
              "dolore",
              "tenetur",
              "deleniti",
              "porro",
              "facere",
              "maxime",
              "corrupti",
            ],
          },
        },
        Ln = /^lorem([a-z]*)(\d*)(-\d*)?$/i;
      function Mn(e, t) {
        return Math.floor(Math.random() * (t - e) + e);
      }
      function Nn(e, t) {
        const n = e.length,
          r = Math.min(n, t),
          i = [];
        for (; i.length < r; ) {
          const t = e[Mn(0, n)];
          i.includes(t) || i.push(t);
        }
        return i;
      }
      function An(e, t) {
        var n, r;
        return (
          e.length &&
            (e = [((n = e[0]), n[0].toUpperCase() + n.slice(1))].concat(
              e.slice(1)
            )),
          e.join(" ") + (t || (r = "?!...")[Mn(0, r.length - 1)])
        );
      }
      function On(e) {
        if (e.length < 2) return e;
        const t = (e = e.slice()).length,
          n = /,$/;
        let r = 0;
        r = t > 3 && t <= 6 ? Mn(0, 1) : t > 6 && t <= 12 ? Mn(0, 2) : Mn(1, 4);
        for (let i, o = 0; o < r; o++)
          (i = Mn(0, t - 2)), n.test(e[i]) || (e[i] += ",");
        return e;
      }
      function En(e, t, n) {
        const r = [];
        let i,
          o = 0;
        for (
          n &&
          e.common &&
          ((i = e.common.slice(0, t)), (o += i.length), r.push(An(On(i), ".")));
          o < t;
        )
          (i = Nn(e.words, Math.min(Mn(2, 30), t - o))),
            (o += i.length),
            r.push(An(On(i)));
        return r.join(" ");
      }
      function $n(e) {
        "class" === e.name
          ? (e.name = "className")
          : "for" === e.name && (e.name = "htmlFor");
      }
      function zn(e) {
        return "select" !== e.name;
      }
      const Wn = /^(-+)([a-z0-9]+[a-z0-9-]*)/i,
        Fn = /^(_+)([a-z0-9]+[a-z0-9-_]*)/i,
        Pn = (e) => /^[a-z]\-/i.test(e),
        Dn = (e) => /^[a-z]/i.test(e);
      function In(e, t, n) {
        !(function (e) {
          const t = jn(e),
            n = [];
          for (const e of t.classNames) {
            const t = e.indexOf("_");
            t > 0 && !e.startsWith("-")
              ? (n.push(e.slice(0, t)), n.push(e.slice(t)))
              : n.push(e);
          }
          n.length &&
            ((t.classNames = n.filter(Kn)),
            (t.block = Bn(t.classNames)),
            Vn(e, t.classNames.join(" ")));
        })(e),
          (function (e, t, n) {
            const r = jn(e),
              i = [],
              { options: o } = n,
              a = t.slice(1).concat(e);
            for (let e of r.classNames) {
              let t,
                r = "";
              const s = e;
              (t = e.match(Wn)) &&
                ((r = Rn(a, t[1].length, n.context) + o["bem.element"] + t[2]),
                i.push(r),
                (e = e.slice(t[0].length))),
                (t = e.match(Fn)) &&
                  (r || ((r = Rn(a, t[1].length)), i.push(r)),
                  i.push(`${r}${o["bem.modifier"]}${t[2]}`),
                  (e = e.slice(t[0].length))),
                e === s && i.push(s);
            }
            const s = i.filter(Kn);
            s.length && Vn(e, s.join(" "));
          })(e, t, n);
      }
      function jn(e) {
        if (!e._bem) {
          let t = "";
          if (e.attributes)
            for (const n of e.attributes)
              if ("class" === n.name && n.value) {
                t = Un(n.value);
                break;
              }
          e._bem = Hn(t);
        }
        return e._bem;
      }
      function Hn(e) {
        const t = e ? e.split(/\s+/) : [];
        return { classNames: t, block: Bn(t) };
      }
      function Rn(e, t = 0, n) {
        let r = Math.max(e.length - t, 0);
        do {
          const t = e[r];
          if (t) {
            const e = jn(t);
            if (e.block) return e.block;
          }
        } while (0 < r--);
        if (n) {
          const e = (function (e) {
            return (
              e._bem ||
                (e._bem = Hn((e.attributes && e.attributes.class) || "")),
              e._bem
            );
          })(n);
          if (e.block) return e.block;
        }
        return "";
      }
      function Bn(e) {
        return qn(e, Pn) || qn(e, Dn) || void 0;
      }
      function qn(e, t) {
        for (const n of e) {
          if (Wn.test(n) || Fn.test(n)) break;
          if (t(n)) return n;
        }
      }
      function Vn(e, t) {
        for (const n of e.attributes)
          if ("class" === n.name) {
            n.value = [t];
            break;
          }
      }
      function Un(e) {
        let t = "";
        for (const n of e) t += "string" == typeof n ? n : n.name;
        return t;
      }
      function Kn(e, t, n) {
        return !!e && n.indexOf(e) === t;
      }
      function Gn(e, t, n) {
        const r = (e, r, o) => {
            const { parent: a, current: s } = n;
            (n.parent = s),
              (n.current = e),
              t(e, r, o, n, i),
              (n.current = s),
              (n.parent = a);
          },
          i = (e, t, i) => {
            n.ancestors.push(n.current), r(e, t, i), n.ancestors.pop();
          };
        e.children.forEach(r);
      }
      function _n(e) {
        return {
          current: null,
          parent: void 0,
          ancestors: [],
          config: e,
          field: 1,
          out: pn(e.options),
        };
      }
      const Xn = [{ type: "Field", index: 0, name: "" }];
      function Yn(e) {
        return !!e && !e.name && !e.attributes;
      }
      function Qn(e, t) {
        return !!e && xn(e, t);
      }
      function Zn(e) {
        return "object" == typeof e && "Field" === e.type;
      }
      function Jn(e, t) {
        const { out: n } = t;
        let r = -1;
        for (const i of e)
          "string" == typeof i
            ? hn(n, i)
            : (gn(n, t.field + i.index, i.name), i.index > r && (r = i.index));
        -1 !== r && (t.field += r + 1);
      }
      function er(e) {
        return (
          !e.implied ||
          "raw" !== e.valueType ||
          (!!e.value && e.value.length > 0)
        );
      }
      function tr(e) {
        const t = [],
          n = { pos: 0, text: e };
        let r,
          i = n.pos,
          o = n.pos;
        for (; n.pos < n.text.length; )
          (o = n.pos),
            (r = nr(n))
              ? (i !== n.pos && t.push(e.slice(i, o)), t.push(r), (i = n.pos))
              : n.pos++;
        return i !== n.pos && t.push(e.slice(i)), t;
      }
      function nr(e) {
        if (91 === rr(e)) {
          const t = ++e.pos;
          let n = t,
            r = t,
            i = 1;
          for (; e.pos < e.text.length; ) {
            const o = rr(e);
            if (ir(o)) {
              for (n = e.pos; or(rr(e)); ) e.pos++;
              r = e.pos;
            } else {
              if (91 === o) i++;
              else if (93 === o && 0 == --i)
                return {
                  before: e.text.slice(t, n),
                  after: e.text.slice(r, e.pos++),
                  name: e.text.slice(n, r),
                };
              e.pos++;
            }
          }
        }
      }
      function rr(e, t = e.pos) {
        return e.text.charCodeAt(t);
      }
      function ir(e) {
        return e >= 65 && e <= 90;
      }
      function or(e) {
        return ir(e) || (e > 47 && e < 58) || 95 === e || 45 === e;
      }
      function ar(e, t) {
        const { comment: n } = t;
        if (!(n.enabled && n.trigger && e.name && e.attributes)) return !1;
        for (const t of e.attributes)
          if (t.name && n.trigger.includes(t.name)) return !0;
        return !1;
      }
      function sr(e, t, n) {
        const r = {},
          { out: i } = n;
        for (const t of e.attributes)
          t.name && t.value && (r[t.name.toUpperCase()] = t.value);
        for (const e of t)
          "string" == typeof e
            ? hn(i, e)
            : r[e.name] && (hn(i, e.before), Jn(r[e.name], n), hn(i, e.after));
      }
      function lr(e, t) {
        const n = _n(t);
        return (
          (n.comment = (function (e) {
            const { options: t } = e;
            return {
              enabled: t["comment.enabled"],
              trigger: t["comment.trigger"],
              before: t["comment.before"] ? tr(t["comment.before"]) : void 0,
              after: t["comment.after"] ? tr(t["comment.after"]) : void 0,
            };
          })(t)),
          Gn(e, cr, n),
          n.out.value
        );
      }
      function cr(e, t, n, r, i) {
        const { out: o, config: a } = r,
          s = (function e(t, n, r, i) {
            const { config: o, parent: a } = i;
            if (!o.options["output.format"]) return !1;
            if (0 === n && !a) return !1;
            if (a && Yn(a) && 1 === r.length) return !1;
            if (Yn(t)) {
              if (
                Yn(r[n - 1]) ||
                Yn(r[n + 1]) ||
                t.value.some(pr) ||
                (t.value.some(Zn) && t.children.length)
              )
                return !0;
            }
            if (xn(t, o)) {
              if (0 === n) {
                for (let e = 0; e < r.length; e++) if (!xn(r[e], o)) return !0;
              } else if (!xn(r[n - 1], o)) return !0;
              if (o.options["output.inlineBreak"]) {
                let e = 1,
                  t = n,
                  i = n;
                for (; Qn(r[--t], o); ) e++;
                for (; Qn(r[++i], o); ) e++;
                if (e >= o.options["output.inlineBreak"]) return !0;
              }
              for (let n = 0, r = t.children.length; n < r; n++)
                if (e(t.children[n], n, t.children, i)) return !0;
              return !1;
            }
            return !0;
          })(e, t, n, r),
          l = (function (e) {
            const { config: t, parent: n } = e;
            if (
              !n ||
              Yn(n) ||
              (n.name && t.options["output.formatSkip"].includes(n.name))
            )
              return 0;
            return 1;
          })(r);
        if (((o.level += l), s && mn(o, !0), e.name)) {
          const t = (function (e, t) {
            return kn(e, t.options["output.tagCase"]);
          })(e.name, a);
          if (
            ((function (e, t) {
              ar(e, t) && t.comment.before && sr(e, t.comment.before, t);
            })(e, r),
            hn(o, "<" + t),
            e.attributes)
          )
            for (const t of e.attributes) er(t) && ur(t, r);
          if (!e.selfClosing || e.children.length || e.value) {
            if ((hn(o, ">"), !fr(e, r, i))) {
              if (e.value) {
                const t = e.value.some(pr);
                t && mn(r.out, ++o.level),
                  Jn(e.value, r),
                  t && mn(r.out, --o.level);
              }
              if ((e.children.forEach(i), !e.value && !e.children.length)) {
                const t =
                  a.options["output.formatLeafNode"] ||
                  a.options["output.formatForce"].includes(e.name);
                t && mn(r.out, ++o.level), Jn(Xn, r), t && mn(r.out, --o.level);
              }
            }
            hn(o, `</${t}>`),
              (function (e, t) {
                ar(e, t) && t.comment.after && sr(e, t.comment.after, t);
              })(e, r);
          } else
            hn(
              o,
              (function (e) {
                switch (e.options["output.selfClosingStyle"]) {
                  case "xhtml":
                    return " /";
                  case "xml":
                    return "/";
                  default:
                    return "";
                }
              })(a) + ">"
            );
        } else
          !fr(e, r, i) && e.value && (Jn(e.value, r), e.children.forEach(i));
        if (s && t === n.length - 1 && r.parent) {
          const e = Yn(r.parent) ? 0 : 1;
          mn(o, o.level - e);
        }
        o.level -= l;
      }
      function ur(e, t) {
        const { out: n, config: r } = t;
        if (e.name) {
          const i = vn(e.name, r),
            o = bn(e, r, !0),
            a = bn(e, r);
          let s = e.value;
          yn(e, r) && !s
            ? r.options["output.compactBoolean"] || (s = [i])
            : s || (s = Xn),
            hn(n, " " + i),
            s
              ? (hn(n, "=" + o), Jn(s, t), hn(n, a))
              : "html" !== r.options["output.selfClosingStyle"] &&
                hn(n, "=" + o + a);
        }
      }
      function fr(e, t, n) {
        if (e.value && e.children.length) {
          const r = e.value.findIndex(Zn);
          if (-1 !== r) {
            Jn(e.value.slice(0, r), t);
            const i = t.out.line;
            let o = r + 1;
            return (
              e.children.forEach(n),
              t.out.line !== i &&
                "string" == typeof e.value[o] &&
                hn(t.out, e.value[o++].trimLeft()),
              Jn(e.value.slice(o), t),
              !0
            );
          }
        }
        return !1;
      }
      function pr(e) {
        return "string" == typeof e && /\r|\n/.test(e);
      }
      function dr(e, t, n) {
        const r = _n(t);
        return (r.options = n || {}), Gn(e, hr, r), r.out.value;
      }
      function hr(e, t, n, r, i) {
        const { out: o, options: a } = r,
          { primary: s, secondary: l } = (function (e) {
            const t = [],
              n = [];
            if (e.attributes)
              for (const r of e.attributes) mr(r) ? t.push(r) : n.push(r);
            return { primary: t, secondary: n };
          })(e),
          c = r.parent ? 1 : 0;
        (o.level += c),
          (function (e, t, n, r) {
            if (!r.parent && 0 === t) return !1;
            return !Yn(e);
          })(e, t, 0, r) && mn(o, !0),
          !e.name ||
            ("div" === e.name && s.length) ||
            hn(o, (a.beforeName || "") + e.name + (a.afterName || "")),
          (function (e, t) {
            for (const n of e)
              if (n.value)
                if ("class" === n.name) {
                  hn(t.out, ".");
                  Jn(
                    n.value.map((e) =>
                      "string" == typeof e ? e.replace(/\s+/g, ".") : e
                    ),
                    t
                  );
                } else hn(t.out, "#"), Jn(n.value, t);
          })(s, r),
          (function (e, t) {
            if (e.length) {
              const { out: n, config: r, options: i } = t;
              i.beforeAttribute && hn(n, i.beforeAttribute);
              for (let o = 0; o < e.length; o++) {
                const a = e[o];
                hn(n, vn(a.name || "", r)),
                  yn(a, r) && !a.value
                    ? !r.options["output.compactBoolean"] &&
                      i.booleanValue &&
                      hn(n, "=" + i.booleanValue)
                    : (hn(n, "=" + bn(a, r, !0)),
                      Jn(a.value || Xn, t),
                      hn(n, bn(a, r))),
                  o !== e.length - 1 &&
                    i.glueAttribute &&
                    hn(n, i.glueAttribute);
              }
              i.afterAttribute && hn(n, i.afterAttribute);
            }
          })(l.filter(er), r),
          !e.selfClosing || e.value || e.children.length
            ? (!(function (e, t) {
                if (!e.value && e.children.length) return;
                const n = e.value || Xn,
                  r = (function (e) {
                    const t = [];
                    let n = [];
                    for (const r of e)
                      if ("string" == typeof r) {
                        const e = r.split(/\r\n?|\n/g);
                        for (n.push(e.shift() || ""); e.length; )
                          t.push(n), (n = [e.shift() || ""]);
                      } else n.push(r);
                    return n.length && t.push(n), t;
                  })(n),
                  { out: i, options: o } = t;
                if (1 === r.length)
                  (e.name || e.attributes) && dn(i, " "), Jn(n, t);
                else {
                  const e = [];
                  let n = 0;
                  for (const t of r) {
                    const r = gr(t);
                    e.push(r), r > n && (n = r);
                  }
                  i.level++;
                  for (let a = 0; a < r.length; a++)
                    mn(i, !0),
                      o.beforeTextLine && dn(i, o.beforeTextLine),
                      Jn(r[a], t),
                      o.afterTextLine &&
                        (dn(i, " ".repeat(n - e[a])), dn(i, o.afterTextLine));
                  i.level--;
                }
              })(e, r),
              e.children.forEach(i))
            : r.options.selfClose && hn(o, r.options.selfClose),
          (o.level -= c);
      }
      function mr(e) {
        return "class" === e.name || "id" === e.name;
      }
      function gr(e) {
        let t = 0;
        for (const n of e) t += "string" == typeof n ? n.length : n.name.length;
        return t;
      }
      const vr = {
        html: lr,
        haml: function (e, t) {
          return dr(e, t, {
            beforeName: "%",
            beforeAttribute: "(",
            afterAttribute: ")",
            glueAttribute: " ",
            afterTextLine: " |",
            booleanValue: "true",
            selfClose: "/",
          });
        },
        slim: function (e, t) {
          return dr(e, t, {
            beforeAttribute: " ",
            glueAttribute: " ",
            beforeTextLine: "| ",
            selfClose: "/",
          });
        },
        pug: function (e, t) {
          return dr(e, t, {
            beforeAttribute: "(",
            afterAttribute: ")",
            glueAttribute: ", ",
            beforeTextLine: "| ",
            selfClose:
              "xml" === t.options["output.selfClosingStyle"] ? "/" : "",
          });
        },
      };
      function br(e, t) {
        if ("string" == typeof e) {
          let n = t;
          t.options["jsx.enabled"] &&
            (n = Object.assign(Object.assign({}, n), { jsx: !0 })),
            (e = Se(e, n));
        }
        return (
          (function (e, t, n) {
            const r = [e],
              i = (e) => {
                t(e, r, n), r.push(e), e.children.forEach(i), r.pop();
              };
            e.children.forEach(i);
          })(
            (e = (function (e, t) {
              const n = [],
                r = t.options["output.reverseAttributes"],
                i = (e) => {
                  const o = e.name && t.snippets[e.name];
                  if (!o || n.includes(o)) return null;
                  const a = Se(o, t);
                  n.push(o), un(a, i), n.pop();
                  for (const t of a.children) {
                    if (e.attributes) {
                      const n = t.attributes || [],
                        i = e.attributes || [];
                      t.attributes = r ? i.concat(n) : n.concat(i);
                    }
                    fn(e, t);
                  }
                  return a;
                };
              return un(e, i), e;
            })(e, t)),
            yr,
            t
          ),
          e
        );
      }
      function yr(e, t, n) {
        !(function (e, t, n) {
          !e.name && e.attributes && Sn(e, t, n);
        })(e, t, n),
          (function (e, t) {
            if (!e.attributes) return;
            const n = [],
              r = {};
            for (const i of e.attributes)
              if (i.name) {
                const e = i.name;
                if (e in r) {
                  const n = r[e];
                  "class" === e
                    ? (n.value = on(n.value, i.value, " "))
                    : an(n, i, t);
                } else n.push((r[e] = Object.assign({}, i)));
              } else n.push(i);
            e.attributes = n;
          })(e, n),
          (function (e, t, n) {
            let r;
            if (e.name && (r = e.name.match(Ln))) {
              const i = Tn[r[1]] || Tn.latin,
                o = r[2] ? Math.max(1, Number(r[2])) : 30,
                a = Mn(o, r[3] ? Math.max(o, Number(r[3].slice(1))) : o),
                s =
                  e.repeat ||
                  (function (e) {
                    for (let t = e.length - 1; t >= 0; t--) {
                      const n = e[t];
                      if ("AbbreviationNode" === n.type && n.repeat)
                        return n.repeat;
                    }
                  })(t);
              (e.name = e.attributes = void 0),
                (e.value = [En(i, a, !s || 0 === s.value)]),
                e.repeat && t.length > 1 && Sn(e, t, n);
            }
          })(e, t, n),
          "xsl" === n.syntax &&
            (function (e) {
              var t;
              ("xsl:variable" !== (t = e.name) && "xsl:with-param" !== t) ||
                !e.attributes ||
                (!e.children.length && !e.value) ||
                (e.attributes = e.attributes.filter(zn));
            })(e),
          n.options["jsx.enabled"] &&
            (function (e) {
              e.attributes && e.attributes.forEach($n);
            })(e),
          n.options["bem.enabled"] && In(e, t, n);
      }
      const xr = /^([a-z-]+)(?:\s*:\s*([^\n\r;]+?);*)?$/,
        wr = { value: !0 };
      function kr(e, t) {
        const n = t.match(xr);
        if (n) {
          const t = {},
            r = n[2] ? n[2].split("|").map(Sr) : [];
          for (const e of r) for (const n of e) Lr(n, t);
          return {
            type: "Property",
            key: e,
            property: n[1],
            value: r,
            keywords: t,
            dependencies: [],
          };
        }
        return { type: "Raw", key: e, value: t };
      }
      function Cr(e, t) {
        return e.key === t.key ? 0 : e.key < t.key ? -1 : 1;
      }
      function Sr(e) {
        return rt(e.trim(), wr)[0].value;
      }
      function Tr(e) {
        return "Property" === e.type;
      }
      function Lr(e, t) {
        for (const n of e.value)
          if ("Literal" === n.type) t[n.value] = n;
          else if ("FunctionCall" === n.type) t[n.name] = n;
          else if ("Field" === n.type) {
            const e = n.name.trim();
            e && (t[e] = { type: "Literal", value: e });
          }
      }
      function Mr(e, t, n = !1) {
        if ((e = e.toLowerCase()) === (t = t.toLowerCase())) return 1;
        if (!e || !t || e.charCodeAt(0) !== t.charCodeAt(0)) return 0;
        const r = e.length,
          i = t.length;
        if (!n && r > i) return 0;
        const o = Math.min(r, i),
          a = Math.max(r, i);
        let s = 1,
          l = 1,
          c = a,
          u = 0,
          f = 0,
          p = !1,
          d = !1;
        for (; s < r; ) {
          for (u = e.charCodeAt(s), p = !1, d = !1; l < i; ) {
            if (((f = t.charCodeAt(l)), u === f)) {
              (p = !0), (c += a - (d ? s : l));
              break;
            }
            (d = 45 === f), l++;
          }
          if (!p) {
            if (!n) return 0;
            break;
          }
          s++;
        }
        const h = a - o;
        return (c * (s / a)) / (Nr(a) - Nr(h));
      }
      function Nr(e) {
        return (e * (e + 1)) / 2;
      }
      function Ar(e, t) {
        return e.r || e.g || e.b || e.a
          ? 1 === e.a
            ? (function (e, t) {
                const n = t && Er(e.r) && Er(e.g) && Er(e.b) ? $r : zr;
                return "#" + n(e.r) + n(e.g) + n(e.b);
              })(e, t)
            : (function (e) {
                const t = [e.r, e.g, e.b];
                1 !== e.a && t.push(Or(e.a, 8));
                return `${3 === t.length ? "rgb" : "rgba"}(${t.join(", ")})`;
              })(e)
          : "transparent";
      }
      function Or(e, t = 4) {
        return e.toFixed(t).replace(/\.?0+$/, "");
      }
      function Er(e) {
        return !(e % 17);
      }
      function $r(e) {
        return (e >> 4).toString(16);
      }
      function zr(e) {
        return (function (e, t) {
          for (; e.length < t; ) e = "0" + e;
          return e;
        })(e.toString(16), 2);
      }
      function Wr(e, t, n) {
        const r = n.options["stylesheet.json"];
        if (e.name) {
          hn(
            t,
            (r
              ? e.name.replace(/\-(\w)/g, (e, t) => t.toUpperCase())
              : e.name) + n.options["stylesheet.between"]
          ),
            e.value.length
              ? (function (e, t, n) {
                  const r = n.options["stylesheet.json"],
                    i = r
                      ? (function (e) {
                          if (1 === e.value.length) {
                            const t = e.value[0];
                            if (
                              1 === t.value.length &&
                              "NumberValue" === t.value[0].type
                            )
                              return t.value[0];
                          }
                        })(e)
                      : null;
                  if (!i || (i.unit && "px" !== i.unit)) {
                    const i = (function (e) {
                      return e.options["stylesheet.jsonDoubleQuotes"]
                        ? '"'
                        : "'";
                    })(n);
                    r && dn(t, i);
                    for (let r = 0; r < e.value.length; r++)
                      0 !== r && dn(t, ", "), Pr(e.value[r], t, n);
                    r && dn(t, i);
                  } else dn(t, String(i.value));
                })(e, t, n)
              : gn(t, 0, ""),
            r
              ? dn(t, ",")
              : (Fr(e, t, !0), dn(t, n.options["stylesheet.after"]));
        } else {
          for (const r of e.value) for (const e of r.value) Dr(e, t, n);
          Fr(e, t, e.value.length > 0);
        }
      }
      function Fr(e, t, n) {
        e.important && (n && dn(t, " "), dn(t, "!important"));
      }
      function Pr(e, t, n) {
        for (let r = 0, i = -1; r < e.value.length; r++) {
          const o = e.value[r];
          0 === r || ("Field" === o.type && o.start === i) || dn(t, " "),
            Dr(o, t, n),
            (i = o.end);
        }
      }
      function Dr(e, t, n) {
        if ("ColorValue" === e.type)
          dn(t, Ar(e, n.options["stylesheet.shortHex"]));
        else if ("Literal" === e.type) hn(t, e.value);
        else if ("NumberValue" === e.type) hn(t, Or(e.value, 4) + e.unit);
        else if ("StringValue" === e.type) {
          const n = "double" === e.quote ? '"' : "'";
          hn(t, n + e.value + n);
        } else if ("Field" === e.type) gn(t, e.index, e.name);
        else if ("FunctionCall" === e.type) {
          dn(t, e.name + "(");
          for (let r = 0; r < e.arguments.length; r++)
            r && dn(t, ", "), Pr(e.arguments[r], t, n);
          dn(t, ")");
        }
      }
      function Ir(e, t) {
        var n;
        const r =
          (null === (n = t.cache) || void 0 === n
            ? void 0
            : n.stylesheetSnippets) ||
          (function (e) {
            const t = [];
            for (const n of Object.keys(e)) t.push(kr(n, e[n]));
            return (function (e) {
              e = e.slice().sort(Cr);
              const t = [];
              let n;
              for (const r of e.filter(Tr)) {
                for (; t.length; ) {
                  if (
                    ((n = t[t.length - 1]),
                    r.property.startsWith(n.property) &&
                      45 === r.property.charCodeAt(n.property.length))
                  ) {
                    n.dependencies.push(r), t.push(r);
                    break;
                  }
                  t.pop();
                }
                t.length || t.push(r);
              }
              return e;
            })(t);
          })(t.snippets);
        t.cache && (t.cache.stylesheetSnippets = r),
          "string" == typeof e && (e = rt(e, { value: _r(t) }));
        const i = (function (e, t) {
          if (t.context) {
            if ("@@section" === t.context.name)
              return e.filter((e) => "Raw" === e.type);
            if ("@@property" === t.context.name)
              return e.filter((e) => "Property" === e.type);
          }
          return e;
        })(r, t);
        for (const n of e) jr(n, i, t);
        return e;
      }
      function jr(e, t, n) {
        if (
          !(function (e, t) {
            let n = null;
            const r = 1 === e.value.length ? e.value[0] : null;
            if (r && 1 === r.value.length) {
              const e = r.value[0];
              "FunctionCall" === e.type && "lg" === e.name && (n = e);
            }
            if (n || "lg" === e.name)
              return (
                (n = n
                  ? Object.assign(Object.assign({}, n), {
                      name: "linear-gradient",
                    })
                  : {
                      type: "FunctionCall",
                      name: "linear-gradient",
                      arguments: [Vr(Kr(0, ""))],
                    }),
                t.context || (e.name = "background-image"),
                (e.value = [Vr(n)]),
                !0
              );
            return !1;
          })(e, n)
        ) {
          const r = n.options["stylesheet.fuzzySearchMinScore"];
          if (_r(n)) {
            const i = n.context.name;
            Hr(
              e,
              n,
              t.find((e) => "Property" === e.type && e.property === i),
              r
            );
          } else if (e.name) {
            const i = Rr(e.name, t, r, !0);
            i &&
              ("Property" === i.type
                ? (function (e, t, n) {
                    const r = (function (e, t) {
                      for (let n = 0, r = 0; n < e.length; n++) {
                        if (((r = t.indexOf(e[n], r)), -1 === r))
                          return e.slice(n);
                        r++;
                      }
                      return "";
                    })(e.name, t.key);
                    if (r) {
                      if (e.value.length) return e;
                      const i = qr(r, n, t);
                      if (!i) return e;
                      e.value.push(Vr(i));
                    }
                    if (((e.name = t.property), e.value.length)) Hr(e, n, t);
                    else if (t.value.length) {
                      const r = t.value[0];
                      e.value =
                        1 === t.value.length || r.some(Gr)
                          ? r
                          : r.map((e) =>
                              (function e(t, n, r = { index: 1 }) {
                                let i = [];
                                for (const o of t.value)
                                  switch (o.type) {
                                    case "ColorValue":
                                      i.push(
                                        Kr(
                                          r.index++,
                                          Ar(
                                            o,
                                            n.options["stylesheet.shortHex"]
                                          )
                                        )
                                      );
                                      break;
                                    case "Literal":
                                      i.push(Kr(r.index++, o.value));
                                      break;
                                    case "NumberValue":
                                      i.push(
                                        Kr(r.index++, `${o.value}${o.unit}`)
                                      );
                                      break;
                                    case "StringValue":
                                      const t =
                                        "single" === o.quote ? "'" : '"';
                                      i.push(Kr(r.index++, t + o.value + t));
                                      break;
                                    case "FunctionCall":
                                      i.push(Kr(r.index++, o.name), Ur("("));
                                      for (
                                        let t = 0, a = o.arguments.length;
                                        t < a;
                                        t++
                                      )
                                        (i = i.concat(
                                          e(o.arguments[t], n, r).value
                                        )),
                                          t !== a - 1 && i.push(Ur(", "));
                                      i.push(Ur(")"));
                                      break;
                                    default:
                                      i.push(o);
                                  }
                                return Object.assign(Object.assign({}, t), {
                                  value: i,
                                });
                              })(e, n)
                            );
                    }
                  })(e, i, n)
                : (function (e, t) {
                    let n,
                      r = 0;
                    const i = /\$\{(\d+)(:[^}]+)?\}/g,
                      o = e.value[0],
                      a = [];
                    for (; (n = i.exec(t.value)); )
                      r !== n.index && a.push(Ur(t.value.slice(r, n.index))),
                        (r = n.index + n[0].length),
                        o && o.value.length
                          ? a.push(o.value.shift())
                          : a.push(Kr(Number(n[1]), n[2] ? n[2].slice(1) : ""));
                    const s = t.value.slice(r);
                    s && a.push(Ur(s));
                    (e.name = void 0), (e.value = [Vr(...a)]);
                  })(e, i));
          }
        }
        return (
          (e.name || n.context) &&
            (function (e, t) {
              const n = t.options["stylesheet.unitAliases"],
                r = t.options["stylesheet.unitless"];
              for (const i of e.value)
                for (const o of i.value)
                  "NumberValue" === o.type &&
                    (o.unit
                      ? (o.unit = n[o.unit] || o.unit)
                      : 0 === o.value ||
                        r.includes(e.name) ||
                        (o.unit = o.rawValue.includes(".")
                          ? t.options["stylesheet.floatUnit"]
                          : t.options["stylesheet.intUnit"]));
            })(e, n),
          e
        );
      }
      function Hr(e, t, n, r) {
        for (const i of e.value) {
          const e = [];
          for (const o of i.value)
            if ("Literal" === o.type) e.push(qr(o.value, t, n, r) || o);
            else if ("FunctionCall" === o.type) {
              const i = qr(o.name, t, n, r);
              i && "FunctionCall" === i.type
                ? e.push(
                    Object.assign(Object.assign({}, i), {
                      arguments: o.arguments.concat(
                        i.arguments.slice(o.arguments.length)
                      ),
                    })
                  )
                : e.push(o);
            } else e.push(o);
          i.value = e;
        }
      }
      function Rr(e, t, n = 0, r = !1) {
        let i = null,
          o = 0;
        for (const n of t) {
          const t = Mr(e, Br(n), r);
          if (1 === t) return n;
          t && t >= o && ((o = t), (i = n));
        }
        return o >= n ? i : null;
      }
      function Br(e) {
        return "string" == typeof e ? e : e.key;
      }
      function qr(e, t, n, r) {
        let i;
        if (n) {
          if ((i = Rr(e, Object.keys(n.keywords), r))) return n.keywords[i];
          for (const t of n.dependencies)
            if ((i = Rr(e, Object.keys(t.keywords), r))) return t.keywords[i];
        }
        return (i = Rr(e, t.options["stylesheet.keywords"], r)) ? Ur(i) : null;
      }
      function Vr(...e) {
        return { type: "CSSValue", value: e };
      }
      function Ur(e) {
        return { type: "Literal", value: e };
      }
      function Kr(e, t) {
        return { type: "Field", index: e, name: t };
      }
      function Gr(e) {
        for (const t of e.value)
          if (
            "Field" === t.type ||
            ("FunctionCall" === t.type && t.arguments.some(Gr))
          )
            return !0;
        return !1;
      }
      function _r(e) {
        return (
          !!e.context &&
          ("@@value" === e.context.name || !e.context.name.startsWith("@@"))
        );
      }
      const Xr = { markup: "html", stylesheet: "css" },
        Yr = {
          type: "markup",
          syntax: "html",
          variables: {
            lang: "en",
            locale: "en-US",
            charset: "UTF-8",
            indentation: "\t",
            newline: "\n",
          },
          snippets: {},
          options: {
            inlineElements: [
              "a",
              "abbr",
              "acronym",
              "applet",
              "b",
              "basefont",
              "bdo",
              "big",
              "br",
              "button",
              "cite",
              "code",
              "del",
              "dfn",
              "em",
              "font",
              "i",
              "iframe",
              "img",
              "input",
              "ins",
              "kbd",
              "label",
              "map",
              "object",
              "q",
              "s",
              "samp",
              "select",
              "small",
              "span",
              "strike",
              "strong",
              "sub",
              "sup",
              "textarea",
              "tt",
              "u",
              "var",
            ],
            "output.indent": "\t",
            "output.baseIndent": "",
            "output.newline": "\n",
            "output.tagCase": "",
            "output.attributeCase": "",
            "output.attributeQuotes": "double",
            "output.format": !0,
            "output.formatLeafNode": !1,
            "output.formatSkip": ["html"],
            "output.formatForce": ["body"],
            "output.inlineBreak": 3,
            "output.compactBoolean": !1,
            "output.booleanAttributes": [
              "contenteditable",
              "seamless",
              "async",
              "autofocus",
              "autoplay",
              "checked",
              "controls",
              "defer",
              "disabled",
              "formnovalidate",
              "hidden",
              "ismap",
              "loop",
              "multiple",
              "muted",
              "novalidate",
              "readonly",
              "required",
              "reversed",
              "selected",
              "typemustmatch",
            ],
            "output.reverseAttributes": !1,
            "output.selfClosingStyle": "html",
            "output.field": (e, t) => t,
            "output.text": (e) => e,
            "comment.enabled": !1,
            "comment.trigger": ["id", "class"],
            "comment.before": "",
            "comment.after": "\n\x3c!-- /[#ID][.CLASS] --\x3e",
            "bem.enabled": !1,
            "bem.element": "__",
            "bem.modifier": "_",
            "jsx.enabled": !1,
            "stylesheet.keywords": ["auto", "inherit", "unset"],
            "stylesheet.unitless": [
              "z-index",
              "line-height",
              "opacity",
              "font-weight",
              "zoom",
              "flex",
              "flex-grow",
              "flex-shrink",
            ],
            "stylesheet.shortHex": !0,
            "stylesheet.between": ": ",
            "stylesheet.after": ";",
            "stylesheet.intUnit": "px",
            "stylesheet.floatUnit": "em",
            "stylesheet.unitAliases": { e: "em", p: "%", x: "ex", r: "rem" },
            "stylesheet.json": !1,
            "stylesheet.jsonDoubleQuotes": !1,
            "stylesheet.fuzzySearchMinScore": 0,
          },
        },
        Qr = {
          markup: {
            snippets: Zr({
              a: "a[href]",
              "a:blank":
                "a[href='http://${0}' target='_blank' rel='noopener noreferrer']",
              "a:link": "a[href='http://${0}']",
              "a:mail": "a[href='mailto:${0}']",
              "a:tel": "a[href='tel:+${0}']",
              abbr: "abbr[title]",
              "acr|acronym": "acronym[title]",
              base: "base[href]/",
              basefont: "basefont/",
              br: "br/",
              frame: "frame/",
              hr: "hr/",
              bdo: "bdo[dir]",
              "bdo:r": "bdo[dir=rtl]",
              "bdo:l": "bdo[dir=ltr]",
              col: "col/",
              link: "link[rel=stylesheet href]/",
              "link:css": "link[href='${1:style}.css']",
              "link:print": "link[href='${1:print}.css' media=print]",
              "link:favicon":
                "link[rel='shortcut icon' type=image/x-icon href='${1:favicon.ico}']",
              "link:mf|link:manifest":
                "link[rel='manifest' href='${1:manifest.json}']",
              "link:touch":
                "link[rel=apple-touch-icon href='${1:favicon.png}']",
              "link:rss":
                "link[rel=alternate type=application/rss+xml title=RSS href='${1:rss.xml}']",
              "link:atom":
                "link[rel=alternate type=application/atom+xml title=Atom href='${1:atom.xml}']",
              "link:im|link:import":
                "link[rel=import href='${1:component}.html']",
              meta: "meta/",
              "meta:utf":
                "meta[http-equiv=Content-Type content='text/html;charset=UTF-8']",
              "meta:vp":
                "meta[name=viewport content='width=${1:device-width}, initial-scale=${2:1.0}']",
              "meta:compat":
                "meta[http-equiv=X-UA-Compatible content='${1:IE=7}']",
              "meta:edge": "meta:compat[content='${1:ie=edge}']",
              "meta:redirect":
                "meta[http-equiv=refresh content='0; url=${1:http://example.com}']",
              "meta:kw": "meta[name=keywords content]",
              "meta:desc": "meta[name=description content]",
              style: "style",
              script: "script",
              "script:src": "script[src]",
              img: "img[src alt]/",
              "img:s|img:srcset": "img[srcset src alt]",
              "img:z|img:sizes": "img[sizes srcset src alt]",
              picture: "picture",
              "src|source": "source/",
              "src:sc|source:src": "source[src type]",
              "src:s|source:srcset": "source[srcset]",
              "src:t|source:type": "source[srcset type='${1:image/}']",
              "src:z|source:sizes": "source[sizes srcset]",
              "src:m|source:media": "source[media='(${1:min-width: })' srcset]",
              "src:mt|source:media:type": "source:media[type='${2:image/}']",
              "src:mz|source:media:sizes": "source:media[sizes srcset]",
              "src:zt|source:sizes:type":
                "source[sizes srcset type='${1:image/}']",
              iframe: "iframe[src frameborder=0]",
              embed: "embed[src type]/",
              object: "object[data type]",
              param: "param[name value]/",
              map: "map[name]",
              area: "area[shape coords href alt]/",
              "area:d": "area[shape=default]",
              "area:c": "area[shape=circle]",
              "area:r": "area[shape=rect]",
              "area:p": "area[shape=poly]",
              form: "form[action]",
              "form:get": "form[method=get]",
              "form:post": "form[method=post]",
              label: "label[for]",
              input: "input[type=${1:text}]/",
              inp: "input[name=${1} id=${1}]",
              "input:h|input:hidden": "input[type=hidden name]",
              "input:t|input:text": "inp[type=text]",
              "input:search": "inp[type=search]",
              "input:email": "inp[type=email]",
              "input:url": "inp[type=url]",
              "input:p|input:password": "inp[type=password]",
              "input:datetime": "inp[type=datetime]",
              "input:date": "inp[type=date]",
              "input:datetime-local": "inp[type=datetime-local]",
              "input:month": "inp[type=month]",
              "input:week": "inp[type=week]",
              "input:time": "inp[type=time]",
              "input:tel": "inp[type=tel]",
              "input:number": "inp[type=number]",
              "input:color": "inp[type=color]",
              "input:c|input:checkbox": "inp[type=checkbox]",
              "input:r|input:radio": "inp[type=radio]",
              "input:range": "inp[type=range]",
              "input:f|input:file": "inp[type=file]",
              "input:s|input:submit": "input[type=submit value]",
              "input:i|input:image": "input[type=image src alt]",
              "input:b|input:button": "input[type=button value]",
              "input:reset": "input:button[type=reset]",
              isindex: "isindex/",
              select: "select[name=${1} id=${1}]",
              "select:d|select:disabled": "select[disabled.]",
              "opt|option": "option[value]",
              textarea: "textarea[name=${1} id=${1} cols=${2:30} rows=${3:10}]",
              marquee: "marquee[behavior direction]",
              "menu:c|menu:context": "menu[type=context]",
              "menu:t|menu:toolbar": "menu[type=toolbar]",
              video: "video[src]",
              audio: "audio[src]",
              "html:xml": "html[xmlns=http://www.w3.org/1999/xhtml]",
              keygen: "keygen/",
              command: "command/",
              "btn:s|button:s|button:submit": "button[type=submit]",
              "btn:r|button:r|button:reset": "button[type=reset]",
              "btn:d|button:d|button:disabled": "button[disabled.]",
              "fst:d|fset:d|fieldset:d|fieldset:disabled":
                "fieldset[disabled.]",
              bq: "blockquote",
              fig: "figure",
              figc: "figcaption",
              pic: "picture",
              ifr: "iframe",
              emb: "embed",
              obj: "object",
              cap: "caption",
              colg: "colgroup",
              fst: "fieldset",
              btn: "button",
              optg: "optgroup",
              tarea: "textarea",
              leg: "legend",
              sect: "section",
              art: "article",
              hdr: "header",
              ftr: "footer",
              adr: "address",
              dlg: "dialog",
              str: "strong",
              prog: "progress",
              mn: "main",
              tem: "template",
              fset: "fieldset",
              datag: "datagrid",
              datal: "datalist",
              kg: "keygen",
              out: "output",
              det: "details",
              sum: "summary",
              cmd: "command",
              "ri:d|ri:dpr": "img:s",
              "ri:v|ri:viewport": "img:z",
              "ri:a|ri:art": "pic>src:m+img",
              "ri:t|ri:type": "pic>src:t+img",
              "!!!": "{<!DOCTYPE html>}",
              doc: "html[lang=${lang}]>(head>meta[charset=${charset}]+meta:vp+title{${1:Document}})+body",
              "!|html:5": "!!!+doc",
              c: "{\x3c!-- ${0} --\x3e}",
              "cc:ie": "{\x3c!--[if IE]>${0}<![endif]--\x3e}",
              "cc:noie":
                "{\x3c!--[if !IE]>\x3c!--\x3e${0}\x3c!--<![endif]--\x3e}",
            }),
          },
          xhtml: { options: { "output.selfClosingStyle": "xhtml" } },
          xml: { options: { "output.selfClosingStyle": "xml" } },
          xsl: {
            snippets: Zr({
              "tm|tmatch": "xsl:template[match mode]",
              "tn|tname": "xsl:template[name]",
              call: "xsl:call-template[name]",
              ap: "xsl:apply-templates[select mode]",
              api: "xsl:apply-imports",
              imp: "xsl:import[href]",
              inc: "xsl:include[href]",
              ch: "xsl:choose",
              "wh|xsl:when": "xsl:when[test]",
              ot: "xsl:otherwise",
              if: "xsl:if[test]",
              par: "xsl:param[name]",
              pare: "xsl:param[name select]",
              var: "xsl:variable[name]",
              vare: "xsl:variable[name select]",
              wp: "xsl:with-param[name select]",
              key: "xsl:key[name match use]",
              elem: "xsl:element[name]",
              attr: "xsl:attribute[name]",
              attrs: "xsl:attribute-set[name]",
              cp: "xsl:copy[select]",
              co: "xsl:copy-of[select]",
              val: "xsl:value-of[select]",
              "for|each": "xsl:for-each[select]",
              tex: "xsl:text",
              com: "xsl:comment",
              msg: "xsl:message[terminate=no]",
              fall: "xsl:fallback",
              num: "xsl:number[value]",
              nam: "namespace-alias[stylesheet-prefix result-prefix]",
              pres: "xsl:preserve-space[elements]",
              strip: "xsl:strip-space[elements]",
              proc: "xsl:processing-instruction[name]",
              sort: "xsl:sort[select order]",
              choose: "xsl:choose>xsl:when+xsl:otherwise",
              xsl: "!!!+xsl:stylesheet[version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform]>{\n|}",
              "!!!": '{<?xml version="1.0" encoding="UTF-8"?>}',
            }),
            options: { "output.selfClosingStyle": "xml" },
          },
          jsx: { options: { "jsx.enabled": !0 } },
          pug: { snippets: Zr({ "!!!": "{doctype html}" }) },
          stylesheet: {
            snippets: Zr({
              "@f": "@font-face {\n\tfont-family: ${1};\n\tsrc: url(${1});\n}",
              "@ff":
                "@font-face {\n\tfont-family: '${1:FontName}';\n\tsrc: url('${2:FileName}.eot');\n\tsrc: url('${2:FileName}.eot?#iefix') format('embedded-opentype'),\n\t\t url('${2:FileName}.woff') format('woff'),\n\t\t url('${2:FileName}.ttf') format('truetype'),\n\t\t url('${2:FileName}.svg#${1:FontName}') format('svg');\n\tfont-style: ${3:normal};\n\tfont-weight: ${4:normal};\n}",
              "@i|@import": "@import url(${0});",
              "@kf": "@keyframes ${1:identifier} {\n\t${2}\n}",
              "@m|@media": "@media ${1:screen} {\n\t${0}\n}",
              ac: "align-content:start|end|flex-start|flex-end|center|space-between|space-around|stretch|space-evenly",
              ai: "align-items:start|end|flex-start|flex-end|center|baseline|stretch",
              anim: "animation:${1:name} ${2:duration} ${3:timing-function} ${4:delay} ${5:iteration-count} ${6:direction} ${7:fill-mode}",
              animdel: "animation-delay:time",
              animdir:
                "animation-direction:normal|reverse|alternate|alternate-reverse",
              animdur: "animation-duration:${1:0}s",
              animfm: "animation-fill-mode:both|forwards|backwards",
              animic: "animation-iteration-count:1|infinite",
              animn: "animation-name",
              animps: "animation-play-state:running|paused",
              animtf:
                "animation-timing-function:linear|ease|ease-in|ease-out|ease-in-out|cubic-bezier(${1:0.1}, ${2:0.7}, ${3:1.0}, ${3:0.1})",
              ap: "appearance:none",
              as: "align-self:start|end|auto|flex-start|flex-end|center|baseline|stretch",
              b: "bottom",
              bd: "border:${1:1px} ${2:solid} ${3:#000}",
              bdb: "border-bottom:${1:1px} ${2:solid} ${3:#000}",
              bdbc: "border-bottom-color:${1:#000}",
              bdbi: "border-bottom-image:url(${0})",
              bdbk: "border-break:close",
              bdbli: "border-bottom-left-image:url(${0})|continue",
              bdblrs: "border-bottom-left-radius",
              bdbri: "border-bottom-right-image:url(${0})|continue",
              bdbrrs: "border-bottom-right-radius",
              bdbs: "border-bottom-style",
              bdbw: "border-bottom-width",
              bdc: "border-color:${1:#000}",
              bdci: "border-corner-image:url(${0})|continue",
              bdcl: "border-collapse:collapse|separate",
              bdf: "border-fit:repeat|clip|scale|stretch|overwrite|overflow|space",
              bdi: "border-image:url(${0})",
              bdl: "border-left:${1:1px} ${2:solid} ${3:#000}",
              bdlc: "border-left-color:${1:#000}",
              bdlen: "border-length",
              bdli: "border-left-image:url(${0})",
              bdls: "border-left-style",
              bdlw: "border-left-width",
              bdr: "border-right:${1:1px} ${2:solid} ${3:#000}",
              bdrc: "border-right-color:${1:#000}",
              bdri: "border-right-image:url(${0})",
              bdrs: "border-radius",
              bdrst: "border-right-style",
              bdrw: "border-right-width",
              bds: "border-style:none|hidden|dotted|dashed|solid|double|dot-dash|dot-dot-dash|wave|groove|ridge|inset|outset",
              bdsp: "border-spacing",
              bdt: "border-top:${1:1px} ${2:solid} ${3:#000}",
              bdtc: "border-top-color:${1:#000}",
              bdti: "border-top-image:url(${0})",
              bdtli: "border-top-left-image:url(${0})|continue",
              bdtlrs: "border-top-left-radius",
              bdtri: "border-top-right-image:url(${0})|continue",
              bdtrrs: "border-top-right-radius",
              bdts: "border-top-style",
              bdtw: "border-top-width",
              bdw: "border-width",
              bfv: "backface-visibility:hidden|visible",
              bg: "background:${1:#000}",
              bga: "background-attachment:fixed|scroll",
              bgbk: "background-break:bounding-box|each-box|continuous",
              bgc: "background-color:#${1:fff}",
              bgcp: "background-clip:padding-box|border-box|content-box|no-clip",
              bgi: "background-image:url(${0})",
              bgo: "background-origin:padding-box|border-box|content-box",
              bgp: "background-position:${1:0} ${2:0}",
              bgpx: "background-position-x",
              bgpy: "background-position-y",
              bgr: "background-repeat:no-repeat|repeat-x|repeat-y|space|round",
              bgsz: "background-size:contain|cover",
              bxsh: "box-shadow:${1:inset }${2:hoff} ${3:voff} ${4:blur} ${5:#000}|none",
              bxsz: "box-sizing:border-box|content-box|border-box",
              c: "color:${1:#000}",
              cl: "clear:both|left|right|none",
              cm: "/* ${0} */",
              cnt: "content:'${0}'|normal|open-quote|no-open-quote|close-quote|no-close-quote|attr(${0})|counter(${0})|counters(${0})",
              coi: "counter-increment",
              colm: "columns",
              colmc: "column-count",
              colmf: "column-fill",
              colmg: "column-gap",
              colmr: "column-rule",
              colmrc: "column-rule-color",
              colmrs: "column-rule-style",
              colmrw: "column-rule-width",
              colms: "column-span",
              colmw: "column-width",
              cor: "counter-reset",
              cp: "clip:auto|rect(${1:top} ${2:right} ${3:bottom} ${4:left})",
              cps: "caption-side:top|bottom",
              cur: "cursor:pointer|auto|default|crosshair|hand|help|move|pointer|text",
              d: "display:grid|inline-grid|subgrid|block|none|flex|inline-flex|inline|inline-block|list-item|run-in|compact|table|inline-table|table-caption|table-column|table-column-group|table-header-group|table-footer-group|table-row|table-row-group|table-cell|ruby|ruby-base|ruby-base-group|ruby-text|ruby-text-group",
              ec: "empty-cells:show|hide",
              f: "font:${1:1em} ${2:sans-serif}",
              fd: "font-display:auto|block|swap|fallback|optional",
              fef: "font-effect:none|engrave|emboss|outline",
              fem: "font-emphasize",
              femp: "font-emphasize-position:before|after",
              fems: "font-emphasize-style:none|accent|dot|circle|disc",
              ff: "font-family:serif|sans-serif|cursive|fantasy|monospace",
              fft: 'font-family:"Times New Roman", Times, Baskerville, Georgia, serif',
              ffa: 'font-family:Arial, "Helvetica Neue", Helvetica, sans-serif',
              ffv: "font-family:Verdana, Geneva, sans-serif",
              fl: "float:left|right|none",
              fs: "font-style:italic|normal|oblique",
              fsm: "font-smoothing:antialiased|subpixel-antialiased|none",
              fst: "font-stretch:normal|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded",
              fv: "font-variant:normal|small-caps",
              fvs: "font-variation-settings:normal|inherit|initial|unset",
              fw: "font-weight:normal|bold|bolder|lighter",
              fx: "flex",
              fxb: "flex-basis:fill|max-content|min-content|fit-content|content",
              fxd: "flex-direction:row|row-reverse|column|column-reverse",
              fxf: "flex-flow",
              fxg: "flex-grow",
              fxsh: "flex-shrink",
              fxw: "flex-wrap:nowrap|wrap|wrap-reverse",
              fsz: "font-size",
              fsza: "font-size-adjust",
              gtc: "grid-template-columns:repeat()|minmax()",
              gtr: "grid-template-rows:repeat()|minmax()",
              gta: "grid-template-areas",
              gt: "grid-template",
              gg: "grid-gap",
              gcg: "grid-column-gap",
              grg: "grid-row-gap",
              gac: "grid-auto-columns:auto|minmax()",
              gar: "grid-auto-rows:auto|minmax()",
              gaf: "grid-auto-flow:row|column|dense|inherit|initial|unset",
              gd: "grid",
              gc: "grid-column",
              gcs: "grid-column-start",
              gce: "grid-column-end",
              gr: "grid-row",
              grs: "grid-row-start",
              gre: "grid-row-end",
              ga: "grid-area",
              h: "height",
              jc: "justify-content:start|end|stretch|flex-start|flex-end|center|space-between|space-around|space-evenly",
              ji: "justify-items:start|end|center|stretch",
              js: "justify-self:start|end|center|stretch",
              l: "left",
              lg: "background-image:linear-gradient(${1})",
              lh: "line-height",
              lis: "list-style",
              lisi: "list-style-image",
              lisp: "list-style-position:inside|outside",
              list: "list-style-type:disc|circle|square|decimal|decimal-leading-zero|lower-roman|upper-roman",
              lts: "letter-spacing:normal",
              m: "margin",
              mah: "max-height",
              mar: "max-resolution",
              maw: "max-width",
              mb: "margin-bottom",
              mih: "min-height",
              mir: "min-resolution",
              miw: "min-width",
              ml: "margin-left",
              mr: "margin-right",
              mt: "margin-top",
              ol: "outline",
              olc: "outline-color:${1:#000}|invert",
              olo: "outline-offset",
              ols: "outline-style:none|dotted|dashed|solid|double|groove|ridge|inset|outset",
              olw: "outline-width|thin|medium|thick",
              op: "opacity",
              ord: "order",
              ori: "orientation:landscape|portrait",
              orp: "orphans",
              ov: "overflow:hidden|visible|hidden|scroll|auto",
              ovs: "overflow-style:scrollbar|auto|scrollbar|panner|move|marquee",
              ovx: "overflow-x:hidden|visible|hidden|scroll|auto",
              ovy: "overflow-y:hidden|visible|hidden|scroll|auto",
              p: "padding",
              pb: "padding-bottom",
              pgba: "page-break-after:auto|always|left|right",
              pgbb: "page-break-before:auto|always|left|right",
              pgbi: "page-break-inside:auto|avoid",
              pl: "padding-left",
              pos: "position:relative|absolute|relative|fixed|static",
              pr: "padding-right",
              pt: "padding-top",
              q: "quotes",
              qen: "quotes:'\\201C' '\\201D' '\\2018' '\\2019'",
              qru: "quotes:'\\00AB' '\\00BB' '\\201E' '\\201C'",
              r: "right",
              rsz: "resize:none|both|horizontal|vertical",
              t: "top",
              ta: "text-align:left|center|right|justify",
              tal: "text-align-last:left|center|right",
              tbl: "table-layout:fixed",
              td: "text-decoration:none|underline|overline|line-through",
              te: "text-emphasis:none|accent|dot|circle|disc|before|after",
              th: "text-height:auto|font-size|text-size|max-size",
              ti: "text-indent",
              tj: "text-justify:auto|inter-word|inter-ideograph|inter-cluster|distribute|kashida|tibetan",
              to: "text-outline:${1:0} ${2:0} ${3:#000}",
              tov: "text-overflow:ellipsis|clip",
              tr: "text-replace",
              trf: "transform:${1}|skewX(${1:angle})|skewY(${1:angle})|scale(${1:x}, ${2:y})|scaleX(${1:x})|scaleY(${1:y})|scaleZ(${1:z})|scale3d(${1:x}, ${2:y}, ${3:z})|rotate(${1:angle})|rotateX(${1:angle})|rotateY(${1:angle})|rotateZ(${1:angle})|translate(${1:x}, ${2:y})|translateX(${1:x})|translateY(${1:y})|translateZ(${1:z})|translate3d(${1:tx}, ${2:ty}, ${3:tz})",
              trfo: "transform-origin",
              trfs: "transform-style:preserve-3d",
              trs: "transition:${1:prop} ${2:time}",
              trsde: "transition-delay:${1:time}",
              trsdu: "transition-duration:${1:time}",
              trsp: "transition-property:${1:prop}",
              trstf: "transition-timing-function:${1:fn}",
              tsh: "text-shadow:${1:hoff} ${2:voff} ${3:blur} ${4:#000}",
              tt: "text-transform:uppercase|lowercase|capitalize|none",
              tw: "text-wrap:none|normal|unrestricted|suppress",
              us: "user-select:none",
              v: "visibility:hidden|visible|collapse",
              va: "vertical-align:top|super|text-top|middle|baseline|bottom|text-bottom|sub",
              w: "width",
              whs: "white-space:nowrap|pre|pre-wrap|pre-line|normal",
              whsc: "white-space-collapse:normal|keep-all|loose|break-strict|break-all",
              wid: "widows",
              wm: "writing-mode:lr-tb|lr-tb|lr-bt|rl-tb|rl-bt|tb-rl|tb-lr|bt-lr|bt-rl",
              wob: "word-break:normal|keep-all|break-all",
              wos: "word-spacing",
              wow: "word-wrap:none|unrestricted|suppress|break-word|normal",
              z: "z-index",
              zom: "zoom:1",
            }),
          },
          sass: { options: { "stylesheet.after": "" } },
          stylus: {
            options: { "stylesheet.between": " ", "stylesheet.after": "" },
          },
        };
      function Zr(e) {
        const t = {};
        return (
          Object.keys(e).forEach((n) => {
            for (const r of n.split("|")) t[r] = e[n];
          }),
          t
        );
      }
      function Jr(e = {}, t = {}) {
        const n = e.type || "markup",
          r = e.syntax || Xr[n];
        return Object.assign(Object.assign(Object.assign({}, Yr), e), {
          type: n,
          syntax: r,
          variables: ei(n, r, "variables", e, t),
          snippets: ei(n, r, "snippets", e, t),
          options: ei(n, r, "options", e, t),
        });
      }
      function ei(e, t, n, r, i = {}) {
        const o = Qr[e],
          a = i[e],
          s = Qr[t],
          l = i[t];
        return Object.assign(
          Object.assign(
            Object.assign(
              Object.assign(
                Object.assign(Object.assign({}, Yr[n]), o && o[n]),
                s && s[n]
              ),
              a && a[n]
            ),
            l && l[n]
          ),
          r[n]
        );
      }
      function ti(e, t = 0) {
        return { text: e, start: t, pos: e.length };
      }
      function ni(e) {
        return e.pos === e.start;
      }
      function ri(e, t = 0) {
        return e.text.charCodeAt(e.pos - 1 + t);
      }
      function ii(e) {
        if (!ni(e)) return e.text.charCodeAt(--e.pos);
      }
      function oi(e, t) {
        if (ni(e)) return !1;
        const n = "function" == typeof t ? t(ri(e)) : t === ri(e);
        return n && e.pos--, !!n;
      }
      function ai(e, t) {
        const n = e.pos;
        for (; oi(e, t); );
        return e.pos < n;
      }
      function si(e) {
        return 39 === e || 34 === e;
      }
      const li = { 91: 93, 40: 41, 123: 125 };
      function ci(e) {
        const t = e.pos;
        if (!oi(e, 62)) return !1;
        let n = !1;
        for (oi(e, 47); !ni(e); ) {
          if ((ai(e, hi), pi(e))) {
            if (oi(e, 47)) {
              n = oi(e, 60);
              break;
            }
            if (oi(e, 60)) {
              n = !0;
              break;
            }
            if (oi(e, hi)) continue;
            if (oi(e, 61)) {
              if (pi(e)) continue;
              break;
            }
            if (fi(e)) {
              n = !0;
              break;
            }
            break;
          }
          if (!ui(e)) break;
        }
        return (e.pos = t), n;
      }
      function ui(e) {
        return (
          (function (e) {
            const t = e.pos;
            if (
              (function (e) {
                const t = e.pos,
                  n = ii(e);
                if (si(n))
                  for (; !ni(e); ) if (ii(e) === n && 92 !== ri(e)) return !0;
                return (e.pos = t), !1;
              })(e) &&
              oi(e, 61) &&
              pi(e)
            )
              return !0;
            return (e.pos = t), !1;
          })(e) || fi(e)
        );
      }
      function fi(e) {
        const t = e.pos,
          n = [];
        for (; !ni(e); ) {
          const t = ri(e);
          if (vi(t)) n.push(t);
          else if (gi(t)) {
            if (n.pop() !== li[t]) break;
          } else if (!mi(t)) break;
          e.pos--;
        }
        return !(t === e.pos || !oi(e, 61) || !pi(e)) || ((e.pos = t), !1);
      }
      function pi(e) {
        return ai(e, di);
      }
      function di(e) {
        return (
          58 === e ||
          45 === e ||
          (function (e) {
            return (e &= -33) >= 65 && e <= 90;
          })(e) ||
          (function (e) {
            return e > 47 && e < 58;
          })(e)
        );
      }
      function hi(e) {
        return 32 === e || 9 === e;
      }
      function mi(e) {
        return !isNaN(e) && 61 !== e && !hi(e) && !si(e);
      }
      function gi(e) {
        return 123 === e || 40 === e || 91 === e;
      }
      function vi(e) {
        return 125 === e || 41 === e || 93 === e;
      }
      const bi = (e) => e.charCodeAt(0),
        yi = "#.*:$-_!@%^+>/".split("").map(bi),
        xi = { type: "markup", lookAhead: !0, prefix: "" };
      function wi(e, t = e.length, n = {}) {
        const r = Object.assign(Object.assign({}, xi), n);
        let i;
        (t = Math.min(e.length, Math.max(0, null == t ? e.length : t))),
          r.lookAhead &&
            (t = (function (e, t, n) {
              si(e.charCodeAt(t)) && t++;
              for (; Li(e.charCodeAt(t), n.type); ) t++;
              return t;
            })(e, t, r));
        const o = (function (e, t, n) {
          if (!n) return 0;
          const r = ti(e),
            i = n.split("").map(bi);
          let o;
          r.pos = t;
          for (; !ni(r); )
            if (!ki(r, 93, 91) && !ki(r, 125, 123)) {
              if (((o = r.pos), Ci(r, i))) return o;
              r.pos--;
            }
          return -1;
        })(e, t, r.prefix || "");
        if (-1 === o) return;
        const a = ti(e, o);
        a.pos = t;
        const s = [];
        for (; !ni(a); ) {
          if (((i = ri(a)), s.includes(125))) {
            if (125 === i) {
              s.push(i), a.pos--;
              continue;
            }
            if (123 !== i) {
              a.pos--;
              continue;
            }
          }
          if (Li(i, r.type)) s.push(i);
          else if (Ti(i, r.type)) {
            if (s.pop() !== li[i]) break;
          } else {
            if (s.includes(93) || s.includes(125)) {
              a.pos--;
              continue;
            }
            if (ci(a) || !Si(i)) break;
          }
          a.pos--;
        }
        if (!s.length && a.pos !== t) {
          const r = e.slice(a.pos, t).replace(/^[*+>^]+/, "");
          return {
            abbreviation: r,
            location: t - r.length,
            start: n.prefix ? o - n.prefix.length : t - r.length,
            end: t,
          };
        }
      }
      function ki(e, t, n) {
        const r = e.pos;
        if (oi(e, t))
          for (; !ni(e); ) {
            if (oi(e, n)) return !0;
            e.pos--;
          }
        return (e.pos = r), !1;
      }
      function Ci(e, t) {
        const n = e.pos;
        let r = !1;
        for (let n = t.length - 1; n >= 0 && !ni(e) && oi(e, t[n]); n--)
          r = 0 === n;
        return r || (e.pos = n), r;
      }
      function Si(e) {
        return (
          (e > 64 && e < 91) ||
          (e > 96 && e < 123) ||
          (e > 47 && e < 58) ||
          yi.includes(e)
        );
      }
      function Ti(e, t) {
        return 40 === e || ("markup" === t && (91 === e || 123 === e));
      }
      function Li(e, t) {
        return 41 === e || ("markup" === t && (93 === e || 125 === e));
      }
      function Mi(e, t) {
        const n = Jr(t);
        return "stylesheet" === n.type
          ? (function (e, t) {
              return (function (e, t) {
                const n = pn(t.options),
                  r = t.options["output.format"];
                for (let i = 0; i < e.length; i++)
                  r && 0 !== i && mn(n, !0), Wr(e[i], n, t);
                return n.value;
              })(Ir(e, t), t);
            })(e, n)
          : (function (e, t) {
              return (function (e, t) {
                return (vr[t.syntax] || lr)(e, t);
              })(br(e, t), t);
            })(e, n);
      }
      const Ni = { "{": "}", "[": "]", "(": ")" },
        Ai = [];
      for (const e of Object.keys(Ni)) Ai.push(Ni[e]);
      function Oi(e) {
        return 32 === e || 9 === e || 160 === e || 10 === e || 13 === e;
      }
      function Ei(e, t) {
        const n = e[e.length - 1];
        !t ||
          t[0] === t[1] ||
          (n && n[0] === t[0] && n[1] === t[1]) ||
          e.push(t);
      }
      function $i(e, t = 0) {
        const n = [],
          r = e.length;
        let i = 0,
          o = 0,
          a = 0;
        for (; i < r; ) {
          a = i;
          if (Oi(e.charCodeAt(i++))) {
            for (o !== a && n.push([t + o, t + a]); Oi(e.charCodeAt(i)); ) i++;
            o = i;
          }
        }
        return o !== i && n.push([t + o, t + i]), n;
      }
      function zi(e) {
        return '"' === e || "'" === e;
      }
      function Wi(e) {
        const { value: t } = e;
        return t &&
          (function (e) {
            return (
              !!e &&
              ((t = e),
              (t.length > 1 && zi(t[0]) && t[0] === t.slice(-1)) ||
                (function (e) {
                  return "{" === e[0] && "}" === e.slice(-1);
                })(e))
            );
            var t;
          })(t)
          ? t.slice(1, -1)
          : t;
      }
      function Fi(e) {
        return e.length > 0 ? e[e.length - 1] : void 0;
      }
      function Pi(e, t) {
        const n = lt(t),
          r = [],
          i = [];
        return (
          At(
            e,
            (e, t, n, o) => {
              if (3 === t) i.push({ name: e, open: [n, o] });
              else if (1 === t) {
                const t = { name: e, open: [n, o] };
                r.push(t), i.push(t);
              } else
                for (; r.length; ) {
                  const t = r.pop();
                  if (t.name === e) {
                    t.close = [n, o];
                    break;
                  }
                }
            },
            n
          ),
          i
        );
      }
      function Di(e, t, n) {
        return n
          ? (function (e, t) {
              let n = null,
                r = "",
                i = -1,
                o = -1;
              if (
                (At(e, (e, a, s, l) => {
                  if (s >= t) return !1;
                  (1 !== a && 3 !== a) || ((r = e), (n = a), (i = s), (o = l));
                }),
                null !== n)
              )
                return Ii(e, r, i, o);
            })(e, t)
          : (function (e, t) {
              let n = void 0;
              return (
                At(e, (r, i, o, a) => {
                  if ((1 === i || 3 === i) && a > t)
                    return (n = Ii(e, r, o, a)), !1;
                }),
                n
              );
            })(e, t);
      }
      function Ii(e, t, n, r) {
        const i = [[n + 1, n + 1 + t.length]],
          o = e.slice(n, r);
        for (const e of bt(o, t))
          if (null != e.value) {
            Ei(i, [n + e.nameStart, n + e.valueEnd]);
            const t = ji(e);
            if (
              t[0] !== t[1] &&
              (Ei(i, [n + t[0], n + t[1]]), "class" === e.name)
            ) {
              const e = $i(o.slice(t[0], t[1]), n + t[0]);
              for (const t of e) Ei(i, t);
            }
          } else Ei(i, [n + e.nameStart, n + e.nameEnd]);
        return { start: n, end: r, ranges: i };
      }
      function ji(e) {
        const t = e.value,
          n = t[0],
          r = t[t.length - 1];
        return '"' === n || "'" === n
          ? [e.valueStart + 1, e.valueEnd - (r === n ? 1 : 0)]
          : "{" === n && "}" === r
          ? [e.valueStart + 1, e.valueEnd - 1]
          : [e.valueStart, e.valueEnd];
      }
      function Hi(e, t, n) {
        return n
          ? (function (e, t) {
              const n = {
                type: null,
                start: -1,
                end: -1,
                valueStart: -1,
                valueEnd: -1,
                valueDelimiter: -1,
              };
              if (
                (Bt(e, (e, r, i, o) => {
                  if (r >= t && "propertyValue" !== e) return !1;
                  "selector" === e || "propertyName" === e
                    ? ((n.start = r),
                      (n.end = i),
                      (n.type = e),
                      (n.valueStart = n.valueEnd = n.valueDelimiter = -1))
                    : "propertyValue" === e &&
                      ((n.valueStart = r),
                      (n.valueEnd = i),
                      (n.valueDelimiter = o));
                }),
                "selector" === n.type)
              )
                return {
                  start: n.start,
                  end: n.end,
                  ranges: [[n.start, n.end]],
                };
              if ("propertyName" === n.type) {
                const t = { start: n.start, end: n.end, ranges: [] };
                if (-1 !== n.valueStart) {
                  (t.end =
                    -1 !== n.valueDelimiter
                      ? n.valueDelimiter + 1
                      : n.valueEnd),
                    Ei(t.ranges, [n.start, t.end]),
                    Ei(t.ranges, [n.valueStart, n.valueEnd]);
                  for (const r of Xt(e.substring(n.valueStart, n.valueEnd)))
                    Ei(t.ranges, [r[0] + n.valueStart, r[1] + n.valueStart]);
                } else Ei(t.ranges, [n.start, n.end]);
                return t;
              }
            })(e, t)
          : (function (e, t) {
              let n = void 0,
                r = void 0;
              return (
                Bt(e, (i, o, a, s) => {
                  if (!(o < t)) {
                    if ("selector" === i)
                      return (n = { start: o, end: a, ranges: [[o, a]] }), !1;
                    if ("propertyName" === i) r = [o, a, s];
                    else {
                      if ("propertyValue" === i) {
                        (n = {
                          start: o,
                          end: -1 !== s ? s + 1 : a,
                          ranges: [],
                        }),
                          r && ((n.start = r[0]), Ei(n.ranges, [r[0], n.end])),
                          Ei(n.ranges, [o, a]);
                        for (const t of Xt(e.substring(o, a)))
                          Ei(n.ranges, [t[0] + o, t[1] + o]);
                        return !1;
                      }
                      if (r)
                        return (
                          (n = {
                            start: r[0],
                            end: r[1],
                            ranges: [[r[0], r[1]]],
                          }),
                          !1
                        );
                    }
                  }
                }),
                n
              );
            })(e, t);
      }
      function Ri(e, t, n = {}) {
        const r = { type: "html", ancestors: [], current: null, css: null },
          i = [],
          o = [],
          a = lt({ xml: n.xml, allTokens: !0 });
        return (
          At(
            e,
            (e, n, s, l) =>
              !(s >= t) &&
              (s < t && t < l
                ? ((r.current = { name: e, type: n, range: [s, l] }), !1)
                : (1 === n &&
                    (function (e, t) {
                      return !t.xml && t.empty.includes(e);
                    })(e, a) &&
                    (n = 3),
                  void (1 === n
                    ? o.push(Ui(i, e, n, s, l))
                    : 2 === n &&
                      o.length &&
                      Fi(o).name === e &&
                      (function (e, t) {
                        e.push(t);
                      })(i, o.pop())))),
            a
          ),
          o.forEach((e) => {
            r.ancestors.push({ name: e.name, range: [e.start, e.end] });
          }),
          n.skipCSS ||
            (r.css = (function (e, t, n) {
              let r = null;
              if (n.current) {
                const i = n.current;
                if (1 === i.type || 2 === i.type) {
                  const n = e.slice(i.range[0], i.range[1]);
                  bt(n, i.name).some((o) => {
                    if ("style" === o.name && null != o.value) {
                      const [a, s] = (function (e, t, n = 0) {
                        let r = t.valueStart,
                          i = t.valueEnd;
                        return (
                          zi(e[r]) && r++,
                          zi(e[i - 1]) && i > r && i--,
                          [n + r, n + i]
                        );
                      })(n, o, i.range[0]);
                      if (t >= a && t <= s)
                        return (
                          (r = Bi(e.slice(a, s), t - a, [a, s])),
                          Ki(r, a),
                          (r.inline = !0),
                          !0
                        );
                    }
                  });
                }
              } else if (n.ancestors.length) {
                const i = Fi(n.ancestors);
                if ("style" === i.name) {
                  const n = i.range[1];
                  let o = e.length;
                  At(e.slice(i.range[1]), (e, t, r) => {
                    if (e === i.name && 2 === t) return (o = r + n), !1;
                  }),
                    (r = Bi(e.slice(n, o), t - n, [n, o])),
                    Ki(r, n);
                }
              }
              return r;
            })(e, t, r)),
          r
        );
      }
      function Bi(e, t, n) {
        const r = {
            type: "css",
            ancestors: [],
            current: null,
            inline: !1,
            embedded: n,
          },
          i = [],
          o = [];
        return (
          Bt(e, (n, a, s) => {
            if (a >= t) return !1;
            if (a < t && t <= s)
              return (
                (r.current = { name: e.slice(a, s), type: n, range: [a, s] }),
                !1
              );
            switch (n) {
              case "selector":
              case "propertyName":
                o.push(Ui(i, e.slice(a, s), n, a, s));
                break;
              case "propertyValue":
              case "blockEnd":
                o.pop();
            }
          }),
          o.forEach((e) => {
            r.ancestors.push({
              name: e.name,
              type: e.type,
              range: [e.start, e.end],
            });
          }),
          r
        );
      }
      function qi(e, t) {
        const n = Fi(t.ancestors);
        if (n) {
          const t = {};
          for (const r of bt(e.slice(n.range[0], n.range[1]), n.name))
            t[r.name] = Wi(r) || "";
          return { name: n.name, attributes: t };
        }
      }
      function Vi(e) {
        if (e.inline) return { name: "@@property" };
        const t = Fi(e.ancestors);
        let n = "@@global";
        return (
          e.current &&
            ("propertyValue" === e.current.type && t
              ? (n = t.name)
              : ("selector" !== e.current.type &&
                  "propertyName" !== e.current.type) ||
                t ||
                (n = "@@section")),
          { name: n }
        );
      }
      function Ui(e, t, n, r, i) {
        if (e.length) {
          const o = e.pop();
          return (o.name = t), (o.type = n), (o.start = r), (o.end = i), o;
        }
        return { name: t, type: n, start: r, end: i };
      }
      function Ki(e, t) {
        e.ancestors.forEach((e) => {
          Gi(e.range, t);
        }),
          e.current && Gi(e.current.range, t);
      }
      function Gi(e, t) {
        (e[0] += t), (e[1] += t);
      }
      const _i = /^[a-zA-Z.#\[\(]$/,
        Xi = /^[\s>;"\']?[a-zA-Z.#!@\[\(]$/,
        Yi = /^[\s;"\']?[a-zA-Z!@]$/;
      const Qi = String.fromCodePoint(65520),
        Zi = String.fromCodePoint(65521),
        Ji = { "{": "}", "[": "]", "(": ")" };
      for (const e of Object.keys(Ji));
      let eo = 0;
      function to(e, t) {
        const n = oo(e, t);
        let r = 0,
          i = n.length;
        for (; r < i && uo(n[r]); ) r++;
        for (; i > r && uo(n[i - 1]); ) i--;
        return [t[0] + r, t[0] + i];
      }
      function no(e, t, n) {
        let r,
          i,
          o = n.indexOf(Qi),
          a = n.indexOf(Zi);
        return (
          -1 !== o && -1 !== a
            ? ((r = t[0] + o),
              (i = t[0] + a - Qi.length),
              (n =
                n.slice(0, o) +
                n.slice(o + Qi.length, a) +
                n.slice(a + Zi.length)))
            : -1 !== o &&
              ((r = t[0] + o), (n = n.slice(0, o) + n.slice(o + Qi.length))),
          e.operation(() => {
            const [o, a] = ao(e, t);
            if ((e.replaceRange(n, o, a), null != r)) {
              const t = e.posFromIndex(r),
                n = null != i ? e.posFromIndex(i) : void 0;
              n ? e.setSelection(t, n) : e.setCursor(t);
            }
            return !0;
          })
        );
      }
      function ro(e) {
        const t = e.getCursor();
        return e.indexFromPos(t);
      }
      function io(e) {
        return e.getValue();
      }
      function oo(e, t) {
        const [n, r] = ao(e, t);
        return e.getRange(n, r);
      }
      function ao(e, t) {
        return [e.posFromIndex(t[0]), e.posFromIndex(t[1])];
      }
      function so(e) {
        const { value: t } = e;
        return t &&
          (function (e) {
            return (
              !!e && (co(e) || ((t = e), "{" === t[0] && "}" === t.slice(-1)))
            );
            var t;
          })(t)
          ? t.slice(1, -1)
          : t;
      }
      function lo(e) {
        return '"' === e || "'" === e;
      }
      function co(e) {
        return e.length > 1 && lo(e[0]) && e[0] === e.slice(-1);
      }
      function uo(e) {
        return /^[\s\n\r]+$/.test(e);
      }
      function fo(e) {
        return e.constructor.Pass;
      }
      function po(e, t) {
        const n = e.indexFromPos(t.head),
          r = e.indexFromPos(t.anchor);
        return [Math.min(n, r), Math.max(n, r)];
      }
      function ho(e, t) {
        return e[0] === t[0] && e[1] === t[1];
      }
      function mo(e, t) {
        return e[0] <= t[0] && e[1] >= t[1];
      }
      function go(e) {
        return e[0] === e[1];
      }
      function vo(e, t = "emmet-error-snippet") {
        const n = e.message.split("\n")[0];
        return `<div class="${t}">\n        <div class="${t}-ptr">\n            <div class="${t}-line"></div>\n            <div class="${t}-tip"></div>\n            <div class="${t}-spacer">${" ".repeat(
          e.pos || 0
        )}</div>\n        </div>\n        <div class="${t}-message">${(function (
          e
        ) {
          const t = { "<": "&lt;", ">": "&gt;", "&": "&amp;" };
          return e.replace(/[<>&]/g, (e) => t[e]);
        })(n.replace(/\s+at\s+\d+$/, ""))}</div>\n    </div>`;
      }
      function bo(e) {
        return e.length > 0 ? e[e.length - 1] : void 0;
      }
      function yo(e) {
        return "$$emmet" in e;
      }
      function xo(e) {
        return yo(e) || (e.$$emmet = { id: String(eo++) }), e.$$emmet;
      }
      const wo = ["xml", "xsl", "jsx"],
        ko = ["html", "htmlmixed", "vue"],
        Co = ["css", "scss", "less"],
        So = ["jsx", "tsx"],
        To = ["haml", "jade", "pug", "slim"].concat(ko, wo, So),
        Lo = ["sass", "sss", "stylus", "postcss"].concat(Co);
      function Mo(e, t) {
        let n,
          r,
          i = No(e);
        if (Eo(i)) {
          const o = io(e);
          (r = Ri(o, t, { xml: Oo(i) })),
            r.css &&
              ((i =
                (function (e, t) {
                  const n = bo(t.ancestors);
                  if (n && "style" === n.name)
                    for (const t of bt(e.slice(n.range[0], n.range[1]), n.name))
                      if ("type" === t.name) return so(t);
                })(o, r) || "css"),
              (n = r.css.inline),
              (r = r.css));
        } else $o(i) && (r = Bi(io(e), t));
        return { type: Ao(i), syntax: i, inline: n, context: r };
      }
      function No(e) {
        const t = e.getMode();
        return t ? ("htmlmixed" === t.name ? "html" : t.name || "") : "";
      }
      function Ao(e) {
        return e && Lo.includes(e) ? "stylesheet" : "markup";
      }
      function Oo(e) {
        return !!e && wo.includes(e);
      }
      function Eo(e) {
        return !!e && (ko.includes(e) || Oo(e));
      }
      function $o(e) {
        return !!e && Co.includes(e);
      }
      function zo(e) {
        return !!e && So.includes(e);
      }
      function Wo(e, t) {
        if (!0 === e) return !0;
        if (Array.isArray(e)) {
          const n = [t.type, t.syntax];
          return (
            t.inline && n.push(t.type + "-inline", t.syntax + "-inline"),
            n.some((t) => e.includes(t))
          );
        }
        return !1;
      }
      const Fo = Vo("null", 0);
      function Po(e) {
        const t = e.pos;
        return (
          !(!e.eat(46) || !e.eatWhile(a)) ||
          !(!e.eatWhile(a) || (e.eat(46) && !e.eatWhile(a))) ||
          ((e.pos = t), !1)
        );
      }
      function Do(e, t) {
        return Vo("num", parseFloat(e), t);
      }
      function Io(e, t = 0) {
        return 45 === e && (t += 2), Vo("op1", e, t);
      }
      function jo(e, t = 0) {
        return (
          42 === e ? (t += 1) : (47 !== e && 92 !== e) || (t += 2),
          Vo("op2", e, t)
        );
      }
      function Ho(e, t) {
        throw (t && (e += ` at column ${t.pos} of expression`), new Error(e));
      }
      function Ro(e) {
        return (
          (function (e) {
            return 43 === e;
          })(e) || Bo(e)
        );
      }
      function Bo(e) {
        return 45 === e;
      }
      function qo(e) {
        return 43 === e || 45 === e || 42 === e || 47 === e || 92 === e;
      }
      function Vo(e, t, n = 0) {
        return { type: e, value: t, priority: n };
      }
      const Uo = { lookAhead: !0, whitespace: !0 };
      function Ko(e) {
        if (a(Go(e))) {
          e.pos--;
          let t,
            n = !1;
          for (; e.pos >= 0; ) {
            if (((t = Go(e)), 46 === t)) {
              if (n) break;
              n = !0;
            } else if (!a(t)) break;
            e.pos--;
          }
          return !0;
        }
        return !1;
      }
      function Go(e) {
        return e.text.charCodeAt(e.pos - 1);
      }
      function _o(e) {
        return e.text.charCodeAt(e.pos);
      }
      const Xo = { 45: (e) => -e },
        Yo = {
          43: (e, t) => e + t,
          45: (e, t) => e - t,
          42: (e, t) => e * t,
          47: (e, t) => e / t,
          92: (e, t) => Math.floor(e / t),
        };
      function Qo(e) {
        if (
          (Array.isArray(e) ||
            (e = (function (e) {
              const t = "string" == typeof e ? new m(e) : e;
              let n,
                r = 0,
                i = 21;
              const o = [];
              for (; !t.eof(); )
                t.eatWhile(u),
                  (t.start = t.pos),
                  Po(t)
                    ? (0 == (1 & i) && Ho("Unexpected number", t),
                      o.push(Do(t.current())),
                      (i = 10))
                    : qo(t.peek())
                    ? ((n = t.next()),
                      Ro(n) && 16 & i
                        ? (Bo(n) && o.push(Io(n, r)), (i = 21))
                        : (0 == (2 & i) && Ho("Unexpected operator", t),
                          o.push(jo(n, r)),
                          (i = 21)))
                    : t.eat(40)
                    ? (0 == (4 & i) && Ho('Unexpected "("', t),
                      (r += 10),
                      (i = 53))
                    : t.eat(41)
                    ? ((r -= 10),
                      32 & i
                        ? o.push(Fo)
                        : 0 == (8 & i) && Ho('Unexpected ")"', t),
                      (i = 14))
                    : Ho("Unknown character", t);
              (r < 0 || r >= 10) && Ho('Unmatched "()"', t);
              const a = (function (e) {
                const t = [],
                  n = [];
                let r = 0;
                for (let i = 0; i < e.length; i++) {
                  const o = e[i];
                  if ("num" === o.type) n.push(o);
                  else {
                    for (
                      r += "op1" === o.type ? 1 : 2;
                      t.length && o.priority <= t[t.length - 1].priority;
                    )
                      n.push(t.pop());
                    t.push(o);
                  }
                }
                return r + 1 === n.length + t.length
                  ? n.concat(t.reverse())
                  : null;
              })(o);
              return null === a && Ho("Parity", t), a;
            })(e)),
          !e || !e.length)
        )
          return null;
        const t = [];
        let n, r, i;
        for (let o = 0, a = e.length; o < a; o++) {
          const a = e[o];
          if ("num" === a.type) t.push(a.value);
          else if ("op2" === a.type)
            (r = t.pop()), (n = t.pop()), (i = Yo[a.value]), t.push(i(n, r));
          else {
            if ("op1" !== a.type) throw new Error("Invalid expression");
            (n = t.pop()), (i = Xo[a.value]), t.push(i(n));
          }
        }
        if (t.length > 1) throw new Error("Invalid Expression (parity)");
        return t[0];
      }
      function Zo(e, t, n) {
        const r = null != t ? e.posFromIndex(t) : e.getCursor(),
          i = No(e) || "html",
          o = ot(e),
          a = {
            "output.baseIndent": ea(e, r.line),
            "output.indent": ta(e),
            "output.field": Jo(),
            "output.format": !n,
            "output.attributeQuotes": o.attributeQuotes,
          };
        return (
          "html" === i &&
            ((a["output.selfClosingStyle"] = o.markupStyle),
            (a["output.compactBoolean"] = "html" === o.markupStyle)),
          Eo(i) &&
            (o.comments &&
              ((a["comment.enabled"] = !0),
              o.commentsTemplate && (a["comment.after"] = o.commentsTemplate)),
            (a["bem.enabled"] = o.bem),
            (a["stylesheet.shortHex"] = o.shortHex)),
          a
        );
      }
      function Jo() {
        let e = !1;
        return (t, n) => (e ? "" : ((e = !0), n ? Qi + n + Zi : Qi));
      }
      function ea(e, t) {
        const n = e.getLine(t).match(/^\s+/);
        return n ? n[0] : "";
      }
      function ta(e) {
        return e.getOption("indentWithTabs")
          ? "\t"
          : " ".repeat(e.getOption("indentUnit") || 0);
      }
      let na = {};
      function ra(e, t, n) {
        let r = { cache: na };
        const i = { "output.field": Jo(), "output.format": !n || !n.inline };
        n && (Object.assign(r, n), n.options && Object.assign(i, n.options)),
          (r.options = i);
        const o = ot(e);
        return o.config && (r = Jr(r, o.config)), Mi(t, r);
      }
      function ia(e, t, n = "markup", r) {
        return wi(
          e,
          t,
          Object.assign({ lookAhead: "stylesheet" !== n, type: n }, r)
        );
      }
      function oa(e, t, n = !1, r = !1) {
        const i = { xml: r };
        return n
          ? (function (e, t, n) {
              const r = [],
                i = [],
                o = lt(n),
                a = [],
                s = (e, t, n) => {
                  if (r.length) {
                    const i = r.pop();
                    return (i.name = e), i.ranges.push(t, n), i;
                  }
                  return { name: e, ranges: [t, n] };
                },
                l = (e) => {
                  (e.ranges.length = 0), (e.firstChild = void 0), r.push(e);
                };
              return (
                At(
                  e,
                  (e, n, r, c) => {
                    if (2 === n) {
                      if (!i.length) return;
                      let n = Rt(i);
                      if (n.name === e) {
                        if (n.ranges[0] <= t && t <= c) {
                          for (
                            a.push({
                              name: e,
                              open: n.ranges.slice(0, 2),
                              close: [r, c],
                            });
                            n.firstChild;
                          ) {
                            const e = n.firstChild,
                              t = { name: e.name, open: e.ranges.slice(0, 2) };
                            e.ranges.length > 2 &&
                              (t.close = e.ranges.slice(2, 4)),
                              a.push(t),
                              l(n),
                              (n = e);
                          }
                          return !1;
                        }
                        {
                          i.pop();
                          const e = Rt(i);
                          e && !e.firstChild
                            ? (n.ranges.push(r, c), (e.firstChild = n))
                            : l(n);
                        }
                      }
                    } else if (3 === n || Ht(e, o)) {
                      if (r < t && t < c)
                        return a.push({ name: e, open: [r, c] }), !1;
                      const n = Rt(i);
                      n && !n.firstChild && (n.firstChild = s(e, r, c));
                    } else i.push(s(e, r, c));
                  },
                  o
                ),
                (i.length = r.length = 0),
                a
              );
            })(e, t, i)
          : (function (e, t, n) {
              const r = [],
                i = [],
                o = lt(n),
                a = [];
              return (
                At(
                  e,
                  (e, n, s, l) => {
                    if (2 === n) {
                      const n = Rt(i);
                      n &&
                        n.name === e &&
                        (n.start < t &&
                          t < l &&
                          a.push({
                            name: e,
                            open: [n.start, n.end],
                            close: [s, l],
                          }),
                        It(r, i.pop()));
                    } else
                      3 === n || Ht(e, o)
                        ? s < t && t < l && a.push({ name: e, open: [s, l] })
                        : i.push(Dt(r, e, s, l));
                  },
                  o
                ),
                (i.length = r.length = 0),
                a
              );
            })(e, t, i);
      }
      function aa(e, t, n) {
        return n
          ? Zt(e, t)
          : (function (e, t) {
              const n = [],
                r = [],
                i = [];
              let o = null;
              return (
                Bt(e, (a, s, l, c) => {
                  if ("selector" === a) r.push(en(n, s, l, c));
                  else if ("blockEnd" === a) {
                    const o = r.pop();
                    if (o && o[0] < t && l > t) {
                      const t = Jt(e, o[2] + 1, s);
                      t && nn(i, t), nn(i, [o[0], l]);
                    }
                    if ((o && tn(n, o), !r.length)) return !1;
                  } else
                    "propertyName" === a
                      ? (o && tn(n, o), (o = en(n, s, l, c)))
                      : "propertyValue" === a &&
                        o &&
                        o[0] < t &&
                        Math.max(c, l) > t &&
                        (nn(i, [s, l]), nn(i, [o[0], -1 !== c ? c + 1 : l]));
                  "propertyName" !== a && o && (tn(n, o), (o = null));
                }),
                i
              );
            })(e, t);
      }
      function sa(e, t, n, r) {
        return n ? Hi(e, t, r) : Di(e, t, r);
      }
      function la(e, t, n) {
        const r = (function (e, t = e.length, n) {
          const r = Object.assign(Object.assign({}, Uo), n),
            i = { text: e, pos: t };
          let o;
          if (r.lookAhead && 41 === _o(i)) {
            i.pos++;
            const t = e.length;
            for (
              ;
              i.pos < t && ((o = _o(i)), 41 === o || (r.whitespace && f(o)));
            )
              i.pos++;
          }
          const a = i.pos;
          let s = 0;
          for (; i.pos >= 0; )
            if (!Ko(i)) {
              if (((o = Go(i)), 41 === o)) s++;
              else if (40 === o) {
                if (!s) break;
                s--;
              } else if (!((r.whitespace && f(o)) || Ro(o) || qo(o))) break;
              i.pos--;
            }
          if (i.pos !== a && !s) {
            for (; f(_o(i)); ) i.pos++;
            return [i.pos, a];
          }
          return null;
        })(e, t, n);
        if (r)
          try {
            const [t, n] = r,
              i = Qo(e.slice(t, n));
            if (i)
              return {
                start: t,
                end: n,
                result: i,
                snippet: i.toFixed(4).replace(/\.?0+$/, ""),
              };
          } catch (e) {
            console.error(e);
          }
      }
      function ca(e, t, n) {
        const r = io(e);
        let i;
        if (null == n) {
          const t = e.getMode();
          n = !!t && Oo(t.name);
        }
        const o = (function (e, t, n) {
          const r = [],
            i = [],
            o = lt(n);
          let a = null;
          return (
            At(
              e,
              (n, s, l, c) => {
                if ((1 === s && Ht(n, o) && (s = 3), 1 === s))
                  i.push(Dt(r, n, l, c));
                else if (3 === s) {
                  if (l < t && t < c)
                    return (
                      (a = {
                        name: n,
                        attributes: jt(e, l, c, n),
                        open: [l, c],
                      }),
                      !1
                    );
                } else {
                  const o = Rt(i);
                  if (o && o.name === n) {
                    if (o.start < t && t < c)
                      return (
                        (a = {
                          name: n,
                          attributes: jt(e, o.start, o.end, n),
                          open: [o.start, o.end],
                          close: [l, c],
                        }),
                        !1
                      );
                    i.length && It(r, i.pop());
                  }
                }
              },
              o
            ),
            (i.length = r.length = 0),
            a
          );
        })(r, t, { xml: n });
        if (o) {
          const { open: e, close: t } = o;
          (i = { name: o.name, open: e, close: t }),
            o.attributes &&
              ((i.attributes = {}),
              o.attributes.forEach((e) => {
                let t = e.value;
                t && co(t) && (t = t.slice(1, -1)),
                  (i.attributes[e.name] = null == t ? null : t);
              }));
        }
        return i;
      }
      function ua(e, t) {
        const n = Mo(e, t),
          { context: r } = n,
          i = {
            type: n.type,
            syntax: n.syntax || "html",
            options: Zo(e, t, n.inline),
          };
        if (r) {
          const t = io(e);
          "html" === r.type && r.ancestors.length
            ? (i.context = (function (e, t) {
                const n = bo(t.ancestors);
                if (n) {
                  const t = {};
                  for (const r of bt(e.slice(n.range[0], n.range[1]), n.name))
                    t[r.name] = so(r) || "";
                  return { name: n.name, attributes: t };
                }
              })(t, r))
            : "css" === r.type &&
              (i.context = (function (e) {
                if (e.inline) return { name: "@@property" };
                const t = bo(e.ancestors);
                let n = "@@global";
                return (
                  e.current &&
                    ("propertyValue" === e.current.type && t
                      ? (n = t.name)
                      : ("selector" !== e.current.type &&
                          "propertyName" !== e.current.type) ||
                        t ||
                        (n = "@@section")),
                  { name: n }
                );
              })(r));
        }
        return i;
      }
      const fa = "emmet-abbreviation-preview";
      function pa(e, t) {
        return t;
      }
      const da = new (class {
          constructor() {
            (this.marker = null),
              (this.preview = null),
              (this.forcedMarker = null);
          }
          get id() {
            return xo(this.cm).id;
          }
          substr(e, t) {
            const n = this.cm.getValue();
            return void 0 === e && void 0 === t ? n : n.slice(e || 0, t);
          }
          replace(e, t, n) {
            this.cm.replaceRange(
              e,
              this.cm.posFromIndex(t),
              this.cm.posFromIndex(n)
            );
          }
          syntax() {
            return No(this.cm);
          }
          size() {
            return this.cm.getValue().length;
          }
          config(e) {
            return ua(this.cm, e);
          }
          outputOptions(e, t) {
            return Zo(this.cm, e, t);
          }
          previewConfig(e) {
            return Object.assign(Object.assign({}, e), {
              options: Object.assign(Object.assign({}, e.options), {
                "output.field": pa,
                "output.indent": "  ",
                "output.baseIndent": "",
              }),
            });
          }
          allowTracking(e) {
            return ma(this.cm, e);
          }
          mark(e) {
            const { cm: t } = this;
            this.disposeMarker();
            const [n, r] = ao(t, e.range);
            (this.marker = t.markText(n, r, {
              inclusiveLeft: !0,
              inclusiveRight: !0,
              clearWhenEmpty: !1,
              className: "emmet-abbreviation",
            })),
              e.forced &&
                !this.forcedMarker &&
                ((this.forcedMarker = document.createElement("div")),
                (this.forcedMarker.className = "emmet-abbreviation-marker"),
                t.addWidget(n, this.forcedMarker, !1));
          }
          unmark() {
            this.disposeMarker(), this.hidePreview();
          }
          showPreview(e) {
            const { cm: t } = this,
              n = ot(t);
            if (!Wo(n.preview, Mo(t, e.range[0]))) return;
            let r,
              i = !1;
            if (
              ("error" === e.type
                ? ((r = vo(e.error)), (i = !0))
                : (!e.forced && e.simple) || (r = e.preview),
              r)
            ) {
              if (!this.preview) {
                const r = document.createElement("div");
                r.className = fa;
                const i = t.posFromIndex(e.range[0]);
                n.attachPreview
                  ? n.attachPreview(t, r, i)
                  : t.addWidget(i, r, !1),
                  (this.preview = new this.cm.constructor(r, {
                    mode: t.getOption("mode"),
                    readOnly: "nocursor",
                    lineNumbers: !1,
                  }));
                const o = document.createElement("div");
                (o.className = fa + "-error"), r.appendChild(o);
              }
              const o = this.preview.getWrapperElement().parentElement;
              o.classList.toggle("has-error", i),
                i
                  ? (o.querySelector(`.${fa}-error`).innerHTML = r)
                  : this.preview.setValue(r);
            } else this.hidePreview();
          }
          hidePreview() {
            this.preview &&
              (this.preview.getWrapperElement().parentElement.remove(),
              (this.preview = null));
          }
          isCSS(e) {
            return $o(e);
          }
          syntaxType(e) {
            return Ao(e);
          }
          isHTML(e) {
            return Eo(e);
          }
          isXML(e) {
            return Oo(e);
          }
          isJSX(e) {
            return zo(e);
          }
          run(e, t) {
            const { cm: n } = this;
            this.cm = e;
            const r = t();
            return (this.cm = n), r;
          }
          disposeMarker() {
            this.marker && (this.marker.clear(), (this.marker = null)),
              this.forcedMarker &&
                (this.forcedMarker.remove(), (this.forcedMarker = null));
          }
        })(),
        ha = new (class {
          constructor() {
            (this.cache = new Map()),
              (this.trackers = new Map()),
              (this.lastPos = new Map());
          }
          getLastPost(e) {
            return this.lastPos.get(e.id);
          }
          setLastPos(e, t) {
            this.lastPos.set(e.id, t);
          }
          getTracker(e) {
            return this.trackers.get(e.id);
          }
          typingAbbreviation(e, t) {
            var n;
            const r = e.substr(Math.max(0, t - 2), t),
              i = e.syntax();
            let o = -1,
              a = t,
              s = 0;
            if (
              (e.isJSX(i)
                ? 2 === r.length &&
                  "<" === r[0] &&
                  _i.test(r[1]) &&
                  ((o = t - 2), (s = "<".length))
                : Xi.test(r) && (o = t - 1),
              o >= 0)
            ) {
              const i = r[r.length - 1];
              i in Ni && e.substr(t, t + 1) === Ni[i] && a++;
              const l = this.getActivationContext(e, t);
              if (l) {
                if ("stylesheet" === l.type && !Yi.test(r)) return;
                const t = this.startTracking(e, o, a, { offset: s, config: l });
                if (
                  t &&
                  "abbreviation" === t.type &&
                  "@@section" ===
                    (null === (n = l.context) || void 0 === n ? void 0 : n.name)
                ) {
                  const { abbreviation: n, preview: r } = t;
                  if (r.startsWith(n) && /^:\s*;?$/.test(r.slice(n.length)))
                    return void this.stopTracking(e);
                }
                return t;
              }
            }
          }
          startTracking(e, t, n, r) {
            const i = (null == r ? void 0 : r.config) || e.config(t),
              o = this.createTracker(
                e,
                [t, n],
                Object.assign({ config: i }, r)
              );
            if (o) return this.trackers.set(e.id, o), o;
            this.trackers.delete(e.id);
          }
          stopTracking(e, t) {
            const n = this.getTracker(e);
            n &&
              (e.unmark(n),
              n.forced &&
                !(null == t ? void 0 : t.skipRemove) &&
                e.replace("", n.range[0], n.range[1]),
              (null == t ? void 0 : t.force)
                ? this.cache.delete(e.id)
                : this.storeTracker(e, n),
              this.trackers.delete(e.id));
          }
          createTracker(e, t, n) {
            if (t[0] >= t[1]) return null;
            let r = e.substr(t[0], t[1]);
            const { config: i } = n;
            if ((n.offset && (r = r.slice(n.offset)), !r || /[\r\n]/.test(r)))
              return null;
            const o = {
              abbreviation: r,
              range: t,
              config: i,
              forced: !!n.forced,
              offset: n.offset || 0,
              lastPos: t[1],
              lastLength: e.size(),
            };
            try {
              let t,
                n = !1;
              "stylesheet" === i.type
                ? (t = rt(r))
                : ((t = Se(r, { jsx: "jsx" === i.syntax })),
                  (n = this.isSimpleMarkupAbbreviation(t)));
              const a = e.previewConfig(i);
              return Object.assign(Object.assign({}, o), {
                type: "abbreviation",
                simple: n,
                preview: Mi(t, a),
              });
            } catch (e) {
              return Object.assign(Object.assign({}, o), {
                type: "error",
                error: e,
              });
            }
          }
          storeTracker(e, t) {
            this.cache.set(e.id, t);
          }
          getStoredTracker(e) {
            return this.cache.get(e.id);
          }
          restoreTracker(e, t) {
            const n = this.getStoredTracker(e);
            if (n && n.range[0] <= t && n.range[1] >= t) {
              this.cache.delete(e.id);
              const [t, r] = n.range;
              if (e.substr(t + n.offset, r) === n.abbreviation)
                return this.trackers.set(e.id, n), n;
            }
          }
          handleChange(e, t) {
            const n = this.getTracker(e),
              r = this.getLastPost(e);
            if ((this.setLastPos(e, t), !n))
              return null != r && r === t - 1 && e.allowTracking(t)
                ? this.typingAbbreviation(e, t)
                : void 0;
            const { lastPos: i } = n;
            let { range: o } = n;
            if (i < o[0] || i > o[1]) return void this.stopTracking(e);
            const a = e.size() - n.lastLength;
            if (
              ((o = o.slice()),
              (function (e, t, n) {
                t < 0
                  ? n === e[0]
                    ? ((e[0] += t), (e[1] += t))
                    : e[0] < n && n <= e[1] && (e[1] += t)
                  : t > 0 && e[0] <= n && n <= e[1] && (e[1] += t);
              })(o, a, i),
              o[0] === o[1] && n.forced)
            )
              return (n.abbreviation = ""), n;
            const s = this.createTracker(e, o, n);
            if (
              s &&
              (n.forced ||
                (function (e, t, n) {
                  if ("error" === e.type) {
                    if (t[1] === n) return !1;
                    const { abbreviation: r } = e,
                      i = t[0];
                    let o = t[1];
                    for (; o > i && Ai.includes(r[o - i - 1]); ) o--;
                    return o !== n;
                  }
                  return !0;
                })(s, o, t))
            )
              return (s.lastPos = t), this.trackers.set(e.id, s), e.mark(s), s;
            this.stopTracking(e);
          }
          handleSelectionChange(e, t) {
            this.setLastPos(e, t);
            const n = this.getTracker(e) || this.restoreTracker(e, t);
            if (n) return (n.lastPos = t), n;
          }
          getActivationContext(e, t) {
            const n = e.syntax(),
              r = e.substr();
            if (e.isCSS(n))
              return this.getCSSActivationContext(e, t, n, Bi(r, t));
            if (!e.isHTML(n)) return { syntax: n, type: e.syntaxType(n) };
            {
              const i = Ri(r, t, { xml: e.isXML(n) });
              if (i.css)
                return this.getCSSActivationContext(
                  e,
                  t,
                  (function (e, t) {
                    const n = Fi(t.ancestors);
                    if (n && "style" === n.name)
                      for (const t of bt(
                        e.slice(n.range[0], n.range[1]),
                        n.name
                      ))
                        if ("type" === t.name) return Wi(t);
                  })(r, i) || "css",
                  i.css
                );
              if (!i.current)
                return {
                  syntax: n,
                  type: "markup",
                  context: qi(r, i),
                  options: e.outputOptions(t),
                };
            }
          }
          getCSSActivationContext(e, t, n, r) {
            if (!r.current) return;
            return "propertyName" === r.current.type ||
              "propertyValue" === r.current.type ||
              this.isTypingBeforeSelector(e, t, r)
              ? {
                  syntax: n,
                  type: "stylesheet",
                  context: Vi(r),
                  options: e.outputOptions(t, r.inline),
                }
              : void 0;
          }
          isTypingBeforeSelector(e, t, { current: n }) {
            if (n && "selector" === n.type && n.range[0] === t - 1) {
              return (
                1 ===
                e
                  .substr(n.range[0], n.range[1])
                  .split(/[\n\r]/)[0]
                  .trim().length
              );
            }
            return !1;
          }
          isSimpleMarkupAbbreviation(e) {
            if (1 === e.children.length && !e.children[0].children.length) {
              const t = e.children[0];
              return !t.name || /^[a-z]/i.test(t.name);
            }
            return !e.children.length;
          }
          disposeEditor(e) {
            this.cache.delete(e.id),
              this.trackers.delete(e.id),
              this.lastPos.delete(e.id);
          }
        })();
      function ma(e, t) {
        if (ga(e, t)) {
          const n = (function (e, t) {
            const n = e.posFromIndex(t),
              r = e.getModeAt(n);
            return r && "xml" === r.name
              ? r.configuration || r.name
              : r && r.name;
          })(e, t);
          return (
            !!n &&
            ((function (e) {
              return !!e && (To.includes(e) || Lo.includes(e));
            })(n) ||
              zo(n))
          );
        }
        return !1;
      }
      function ga(e, t) {
        return Wo(ot(e).mark, Mo(e, t));
      }
      function va(e, t) {
        return da.run(e, () => {
          const e = da.syntax(),
            n = da.isJSX(e) ? "<" : "",
            r = ha.getActivationContext(da, t),
            i = ia(da.substr(), t, Ao(null == r ? void 0 : r.syntax), {
              prefix: n,
            });
          if (i) {
            const e = ha.startTracking(da, i.start, i.end, {
              offset: n.length,
              config: r,
            });
            return e && da.showPreview(e), e;
          }
        });
      }
      function ba(e) {
        return da.run(e, () => ha.getTracker(da));
      }
      function ya(e, t) {
        return da.run(e, () => ha.stopTracking(da, t));
      }
      function xa(e, t) {
        return t >= e.range[0] && t <= e.range[1];
      }
      function wa(e) {
        let t,
          n = null,
          r = null;
        function i(e, t, n) {
          (r && r.dataset.pos === String(t)) ||
            (o(),
            (r = (function (e, t, n) {
              const r = document.createElement("div");
              return (
                (r.className = "emmet-tag-preview"),
                (r.innerText = n),
                (r.dataset.pos = String(t)),
                e.addWidget(e.posFromIndex(t), r, !1),
                r
              );
            })(e, t, n)));
        }
        function o() {
          r && (r.remove(), (r = null));
        }
        const a = (e) => {
            n || (n = Pi(e.getValue()));
            const r = ro(e);
            let a = (function (e, t, n) {
              let r;
              return (
                "string" == typeof e && (e = Pi(e, n)),
                e.some((e) => {
                  const n = e.open[0],
                    i = e.close ? e.close[1] : e.open[1];
                  if (t < n) return !0;
                  t > n && t < i && (r = e);
                }),
                r
              );
            })(n, r);
            if (a) {
              a.preview ||
                (a.preview = (function (e, t) {
                  let n = "",
                    r = "";
                  const i = [];
                  bt(oo(e, t.open), t.name).forEach((e) => {
                    "class" === e.name && e.value
                      ? (n = "." + La(e.value).replace(/\s+/g, "."))
                      : "id" === e.name && e.value
                      ? (r = "#" + La(e.value))
                      : i.push(e.value ? `${e.name}=${e.value}` : e.name);
                  });
                  const o = i.length ? `[${i.join(" ")}]` : "",
                    a = r + n + o;
                  return a ? t.name + a : "";
                })(e, a)),
                !(function (e, t, n) {
                  return (
                    t.close &&
                    t.preview &&
                    ot(e).previewOpenTag &&
                    n > t.close[0] &&
                    n < t.close[1]
                  );
                })(e, a, r)
                  ? o()
                  : i(e, a.close[1], a.preview);
              const t = a.name.length;
              (a = Object.assign(Object.assign({}, a), {
                open: [a.open[0] + 1, a.open[0] + 1 + t],
              })),
                a.close && (a.close = [a.close[0] + 2, a.close[0] + 2 + t]);
            }
            !a || (t && ho(t.open, a.open))
              ? !a && t && ka(e)
              : (ka(e),
                (function (e, { open: t, close: n, preview: r }) {
                  Sa(
                    e,
                    e.posFromIndex(t[0]),
                    e.posFromIndex(t[1]),
                    "emmet-open-tag"
                  ),
                    n &&
                      Sa(
                        e,
                        e.posFromIndex(n[0]),
                        e.posFromIndex(n[1]),
                        "emmet-close-tag"
                      );
                })(e, a)),
              (t = a);
          },
          s = (e) => {
            if (((n = null), ot(e).autoRenameTags)) {
              const { open: n, close: r } = Ca(e);
              if (n && r) {
                const i = e.getCursor(),
                  o = n.find(),
                  a = r.find();
                let s = !1;
                Ma(o, i) ? (s = Ta(e, o, a)) : Ma(a, i) && (s = Ta(e, a, o)),
                  s && (ka(e), (t = null));
              }
            }
          };
        return (
          e.on("cursorActivity", a),
          e.on("change", s),
          () => {
            ka(e),
              o(),
              e.off("cursorActivity", a),
              e.off("cursorActivity", s),
              (n = t = null);
          }
        );
      }
      function ka(e) {
        const { open: t, close: n } = Ca(e);
        t && t.clear(), n && n.clear();
      }
      function Ca(e) {
        let t, n;
        return (
          e.getAllMarks().forEach((e) => {
            "emmet-open-tag" === e.className
              ? (t = e)
              : "emmet-close-tag" === e.className && (n = e);
          }),
          { open: t, close: n }
        );
      }
      function Sa(e, t, n, r, i) {
        return e.markText(t, n, {
          className: r,
          inclusiveLeft: !0,
          inclusiveRight: !0,
          clearWhenEmpty: !1,
          attributes: i,
        });
      }
      function Ta(e, t, n) {
        const r = e.getRange(t.from, t.to),
          i = r.match(/[\w:.-]+/),
          o = i ? i[0] : "";
        return (
          e.getRange(n.from, n.to) !== o && e.replaceRange(o, n.from, n.to),
          r !== o
        );
      }
      function La(e) {
        return co(e) ? e.slice(1, -1) : e;
      }
      function Ma(e, t, n) {
        return n
          ? Na(t, e.from) > 0 && Na(t, e.to) < 0
          : Na(t, e.from) >= 0 && Na(t, e.to) <= 0;
      }
      function Na(e, t) {
        return e.line - t.line || e.ch - t.ch;
      }
      function Aa(e, t) {
        const n = new Error(e);
        return (n.ch = t.pos), n;
      }
      function Oa(e, t, n = "Unexpected character") {
        return (
          (t.parseError = Aa(n.replace(/\s+at\s+\d+$/, ""), e)),
          e.skipToEnd(),
          "invalidchar"
        );
      }
      function Ea(e) {
        return e[e.length - 1];
      }
      function $a() {
        return {
          startState: () => ({
            attribute: 0,
            expression: 0,
            group: 0,
            quote: 0,
            braces: [],
            tokens: [],
            scanner: new m(""),
          }),
          token(e, t) {
            const { scanner: n } = t;
            (n.string = e.string),
              (n.pos = e.pos),
              (n.start = e.start),
              (n.end = e.string.length);
            const r = n.peek(),
              i = te(n, t);
            if (!i) return Oa(e, t);
            if (((e.pos = n.pos), "Quote" === i.type))
              t.quote = r === t.quote ? 0 : r;
            else if ("Bracket" === i.type)
              if (i.open) t[i.context]++, t.braces.push(i);
              else {
                t[i.context]--;
                const e = Ea(t.braces);
                e && e.context === i.context && t.braces.pop();
              }
            if (e.eol() && t.braces.length && !t.parseError) {
              const n = Ea(t.braces).start;
              return (t.parseError = Aa("No closing brace at " + n, e)), null;
            }
            const o = (function (e, t) {
              const n = Ea(t.tokens);
              switch (e.type) {
                case "Bracket":
                  return "bracket";
                case "Field":
                  return "variable-2";
                case "Literal":
                  if (t.attribute)
                    return n && "Operator" === n.type && "equal" === n.operator
                      ? "string-2"
                      : t.quote
                      ? "string"
                      : "attribute";
                  if (t.quote) return "string";
                  if (n && "Operator" === n.type) {
                    if ("class" === n.operator) return "variable-2";
                    if ("id" === n.operator) return "variable-3";
                  }
                  return "tag";
                case "Operator":
                  return "class" === e.operator
                    ? "variable-2"
                    : "id" === e.operator
                    ? "variable-3"
                    : "operator " + e.operator;
                case "Repeater":
                case "RepeaterPlaceholder":
                  return "meta";
                case "Quote":
                  return "string";
                case "RepeaterNumber":
                  return "number";
              }
              return "";
            })(i, t);
            return t.tokens.push(i), o;
          },
        };
      }
      function za() {
        return {
          startState: () => ({ brackets: 0, tokens: [], scanner: new m("") }),
          token(e, t) {
            const { scanner: n } = t;
            (n.string = e.string),
              (n.pos = e.pos),
              (n.start = e.start),
              (n.end = e.string.length);
            const r = Le(n, 0 === t.brackets);
            if (!r) return Oa(e, t);
            if (
              "Bracket" === r.type &&
              ((t.brackets += r.open ? 1 : -1), t.brackets < 0)
            )
              return Oa(e, t, "Unexpected bracket");
            e.pos = n.pos;
            const i = (function (e, t) {
              switch (e.type) {
                case "Bracket":
                  return "bracket";
                case "Field":
                  return "variable-2";
                case "Literal":
                  return "tag";
                case "Operator":
                  return "operator " + e.operator;
                case "ColorValue":
                  return "variable-3";
                case "NumberValue":
                  return "number";
                case "StringValue":
                  return "string";
              }
              return null;
            })(r);
            return t.tokens.push(r), i;
          },
        };
      }
      function Wa() {
        return {
          token: (e) =>
            e.eatWhile(Fa)
              ? "tag"
              : e.eat(Pa)
              ? "operator"
              : (e.skipToEnd(), "invalidchar"),
        };
      }
      function Fa(e) {
        return /[a-zA-Z0-9-_$@!:]/.test(e);
      }
      function Pa(e) {
        return "|" === e;
      }
      function Da(e, t) {
        if (e.somethingSelected()) return fo(e);
        if (t)
          return (function (e) {
            const t = ro(e);
            if (ot(e).mark) {
              const n = ba(e);
              return n && xa(n, t) && "abbreviation" === n.type
                ? (Ia(e, n.abbreviation, n.range, n.config),
                  void ya(e, { skipRemove: !0 }))
                : fo(e);
            }
            return (function (e, t) {
              return da.run(e, () => t(ha, da));
            })(e, (n, r) => {
              const i = n.getActivationContext(r, t);
              if (i) {
                const n = e.posFromIndex(t),
                  r = ia(e.getLine(n.line), n.ch, Ao(i.syntax));
                if (r) {
                  const o = t - n.ch;
                  return void Ia(
                    e,
                    r.abbreviation,
                    [r.start + o, r.end + o],
                    i
                  );
                }
              }
              return fo(e);
            });
          })(e);
        const n = ro(e),
          r = e.posFromIndex(n),
          i = e.getLine(r.line),
          o = ua(e, n),
          a = ia(i, r.ch, Ao(o.syntax));
        if (a) {
          const t = n - r.ch;
          Ia(e, a.abbreviation, [a.start + t, a.end + t], o);
        }
      }
      function Ia(e, t, n, r) {
        no(e, n, ra(e, t, r));
      }
      function ja(e) {
        if (!ba(e)) return fo(e);
        ya(e, { force: !0 });
      }
      function Ha(e) {
        ya(e), va(e, ro(e));
      }
      function Ra(e) {
        let t = ba(e);
        if ((ya(e), t && t.forced)) return;
        const [n, r] = po(e, e.listSelections()[0]);
        (t = (function (e, t, n, r) {
          return da.run(e, () => {
            const e = ha.startTracking(da, t, n, r);
            return e && da.showPreview(e), e;
          });
        })(e, n, r, { forced: !0 })),
          n !== r && e.setSelection(e.posFromIndex(r));
      }
      function Ba(e) {
        const t = e.listSelections().map((t) =>
          (function (e, t, n) {
            if (
              ((r = t),
              (i = n),
              r.sticky === i.sticky &&
                0 ===
                  (function (e, t) {
                    return e.line - t.line || e.ch - t.ch;
                  })(r, i))
            ) {
              if ("xml" === e.getModeAt(t).name) {
                const n = e.getTokenAt(t),
                  r = e.getTokenAt(Object.assign({}, t, { ch: t.ch + 1 }));
                return (
                  "tag bracket" === n.type &&
                  ">" === n.string &&
                  "tag bracket" === r.type &&
                  "</" === r.string
                );
              }
            }
            var r, i;
          })(e, t.anchor, t.head)
        );
        if (!t.some(Boolean)) return fo(e);
        e.operation(() => {
          const n = e.listSelections(),
            r = e.getDoc().lineSeparator(),
            i = ta(e),
            o = [];
          for (let a = n.length - 1; a >= 0; a--) {
            const s = n[a],
              l = ea(e, s.anchor.line);
            let c = l;
            t[a]
              ? ((c += i), e.replaceRange(r + c + r + l, s.anchor, s.head))
              : e.replaceRange(r + l, s.anchor, s.head);
            const u = { line: s.anchor.line + 1, ch: c.length };
            o.unshift({ anchor: u, head: u });
          }
          e.setSelections(o);
        });
      }
      function qa(e) {
        const t = No(e),
          n = ro(e),
          r = ca(e, n, Oo(t)),
          i = (function (e, t, n) {
            if (t[0] === t[1] && n) {
              const { open: r, close: i } = n,
                o = t[0];
              if (Va(r, o) || (i && Va(i, o))) return [r[0], i ? i[1] : r[1]];
              if (i) return to(e, [r[1], i[0]]);
            }
            return t;
          })(
            e,
            (function (e) {
              return po(e, e.listSelections()[0]);
            })(e),
            r
          ),
          o = ua(e, i[0]);
        o.text = (function (e, t, n = !1) {
          const r = e.posFromIndex(t[0]),
            i = ea(e, r.line),
            o = oo(e, t)
              .split("\n")
              .map((e) => (e.startsWith(i) ? e.slice(i.length) : e));
          return n ? o : o.join("\n");
        })(e, i, !0);
        let a = (function () {
            const e = document.createElement("div");
            return (
              (e.className = "emmet-panel"),
              (e.innerHTML =
                '<div class="emmet-panel-wrapper">\n        <input type="text" placeholder="Enter abbreviation" autofocus />\n        <div class="emmet-panel-error"></div>\n    </div>'),
              e
            );
          })(),
          s = a.querySelector("input"),
          l = a.querySelector(".emmet-panel-error"),
          c = !1;
        function u(t) {
          t && t.stopPropagation(), p();
          const n = s.value.trim();
          if (n)
            try {
              const t = ra(e, n, o);
              no(e, i, t),
                (c = !0),
                a.classList.contains("emmet-error") &&
                  ((l.innerHTML = ""), a.classList.remove("emmet-error"));
            } catch (e) {
              (c = !1),
                a.classList.add("emmet-error"),
                (l.innerHTML = vo(e)),
                console.error(e);
            }
        }
        function f(e) {
          27 === e.keyCode
            ? (e.stopPropagation(), e.preventDefault(), d())
            : 13 === e.keyCode &&
              (e.stopPropagation(), e.preventDefault(), h());
        }
        function p() {
          c && e.undo();
        }
        function d() {
          p(), m(), e.focus();
        }
        function h() {
          m(), e.focus();
        }
        function m() {
          s.removeEventListener("input", u),
            s.removeEventListener("change", u),
            s.removeEventListener("paste", u),
            s.removeEventListener("keydown", f),
            s.removeEventListener("blur", d),
            a.remove(),
            (a = s = l = null);
        }
        (a.emmet = { submit: h, cancel: d, update: u }),
          s.addEventListener("input", u),
          s.addEventListener("change", u),
          s.addEventListener("paste", u),
          s.addEventListener("keydown", f),
          e.getWrapperElement().appendChild(a),
          s.focus();
      }
      function Va(e, t) {
        return e[0] < t && t < e[1];
      }
      function Ua(e, t) {
        const n = No(e);
        if (!Eo(n) && !$o(n)) return fo(e);
        {
          const r = t
            ? (function (e, t) {
                const n = [];
                for (const r of e.listSelections()) {
                  const i = po(e, r),
                    o = Ga(e, i[0], t, !0);
                  let a,
                    s = o.findIndex((e) => ho(i, e));
                  s < o.length - 1
                    ? (a = o[s + 1])
                    : -1 !== s && (a = o.find((e) => mo(e, i))),
                    n.push(a || i);
                }
                return n;
              })(e, n)
            : (function (e, t) {
                const n = [];
                for (const r of e.listSelections()) {
                  const i = po(e, r),
                    o = Ga(e, i[0], t).find((e) => mo(e, i) && e[1] > i[1]);
                  n.push(o || i);
                }
                return n;
              })(e, n);
          e.setSelections(
            r.map((t) => ({
              anchor: e.posFromIndex(t[0]),
              head: e.posFromIndex(t[1]),
            }))
          );
        }
      }
      function Ka(e, t) {
        const n = e[e.length - 1];
        (n && ho(n, t)) || e.push(t);
      }
      function Ga(e, t, n, r) {
        const i = io(e);
        if ($o(n)) return aa(i, t, r);
        const o = [],
          a = oa(i, t, r, Oo(n));
        for (const e of a)
          e.close
            ? (Ka(o, [e.open[1], e.close[0]]), Ka(o, [e.open[0], e.close[1]]))
            : Ka(o, [e.open[0], e.open[1]]);
        return o.sort((e, t) => (r ? e[0] - t[0] : t[0] - e[0]));
      }
      const _a = ["\x3c!--", "--\x3e"],
        Xa = ["/*", "*/"];
      function Ya(e) {
        const t = e.listSelections().slice().reverse();
        e.operation(() => {
          for (const n of t) {
            const t = po(e, n),
              { syntax: r } = Mo(e, t[0]),
              i = r && $o(r) ? Xa : _a,
              o = es(e, t[0]);
            if (o && o.commentStart) Qa(e, o);
            else if (o && go(t)) {
              let t = 0;
              for (const n of Ja(e, o.range, i).reverse()) t += Qa(e, n);
              Za(e, [o.range[0], o.range[1] - t], i);
            } else if (go(t)) {
              const t = e.getLine(n.anchor.line),
                r = po(e, {
                  anchor: { line: n.anchor.line, ch: 0 },
                  head: { line: n.anchor.line, ch: t.length },
                });
              Za(e, to(e, r), i);
            } else Za(e, t, i);
          }
        });
      }
      function Qa(e, { range: t, commentStart: n, commentEnd: r }) {
        const i = oo(e, t);
        if (n && i.startsWith(n)) {
          let o = n.length,
            a = r && i.endsWith(r) ? r.length : 0;
          uo(i[o]) && (o += 1), a && uo(i[i.length - a - 1]) && (a += 1);
          const s = ao(e, [t[1] - a, t[1]]),
            l = ao(e, [t[0], t[0] + o]);
          return (
            e.replaceRange("", s[0], s[1]),
            e.replaceRange("", l[0], l[1]),
            o + a
          );
        }
        return 0;
      }
      function Za(e, t, n) {
        const [r, i] = ao(e, t);
        e.replaceRange(" " + n[1], i, i), e.replaceRange(n[0] + " ", r, r);
      }
      function Ja(e, t, n) {
        const r = [],
          i = oo(e, t);
        let o = t[0],
          a = 0;
        for (;;) {
          const e = i.indexOf(n[0], a);
          if (-1 === e) break;
          {
            a = e + n[0].length;
            const t = i.indexOf(n[1], a);
            -1 !== t &&
              ((a = t + n[1].length),
              r.push({
                range: [o + e, o + a],
                commentStart: n[0],
                commentEnd: n[1],
              }));
          }
        }
        return r;
      }
      function es(e, t) {
        const { syntax: n } = Mo(e, t);
        if (n) {
          if (Eo(n))
            return (function (e, t, n = !1) {
              const r = [],
                i = [],
                o = lt({ xml: n, allTokens: !0 });
              let a;
              return (
                At(
                  e,
                  (e, n, s, l) => {
                    if (
                      (1 === n &&
                        (function (e, t) {
                          return !t.xml && t.empty.includes(e);
                        })(e, o) &&
                        (n = 3),
                      1 === n)
                    )
                      i.push(
                        (function (e, t, n, r) {
                          if (e.length) {
                            const i = e.pop();
                            return (i.name = t), (i.start = n), (i.end = r), i;
                          }
                          return { name: t, start: n, end: r };
                        })(r, e, s, l)
                      );
                    else if (3 === n) {
                      if (s < t && t < l) return (a = { range: [s, l] }), !1;
                    } else if (2 === n) {
                      const n = (c = i).length ? c[c.length - 1] : null;
                      if (n && n.name === e) {
                        if (n.start < t && t < l)
                          return (a = { range: [n.start, l] }), !1;
                        i.length &&
                          (function (e, t) {
                            e.push(t);
                          })(r, i.pop());
                      }
                    } else if (s < t && t < l)
                      return (
                        (a = { range: [s, l] }),
                        6 === n &&
                          ((a.commentStart = _a[0]), (a.commentEnd = _a[1])),
                        !1
                      );
                    var c;
                  },
                  o
                ),
                (i.length = r.length = 0),
                a
              );
            })(io(e), t, Oo(n));
          if ($o(n)) {
            const n = io(e),
              r = (function (e, t) {
                const n = new m(e);
                for (; !n.eof() && t > n.pos; ) {
                  const e = n.pos;
                  if (ts(n, 47, 42)) {
                    for (; !n.eof() && !ts(n, 42, 47); ) n.pos++;
                    if (e < t && t < n.pos)
                      return {
                        range: [e, n.pos],
                        commentStart: Xa[0],
                        commentEnd: Xa[1],
                      };
                  } else if (ts(n, 47, 47)) {
                    for (; !n.eof() && !n.eat(13) && !n.eat(10); ) n.pos++;
                    if (e < t && t < n.pos)
                      return { range: [e, n.pos], commentStart: "//" };
                  } else n.pos++;
                }
              })(n, t);
            if (r) return r;
            const i = (function (e, t) {
              const n = [],
                r = [];
              let i = null,
                o = null;
              const a = () => {
                o && (tn(n, o), (o = null));
              };
              return (
                Bt(e, (e, s, l, c) => {
                  if ("selector" === e) a(), r.push(en(n, s, l, c));
                  else if ("blockEnd" === e) {
                    a();
                    const e = r.pop();
                    if (e && e[0] < t && t < l)
                      return (
                        (i = {
                          type: "selector",
                          start: e[0],
                          end: l,
                          bodyStart: e[2] + 1,
                          bodyEnd: s,
                        }),
                        !1
                      );
                  } else if ("propertyName" === e) a(), (o = en(n, s, l, c));
                  else if ("propertyValue" === e) {
                    if (o && o[0] < t && t < l)
                      return (
                        (i = {
                          type: "property",
                          start: o[0],
                          end: c + 1,
                          bodyStart: s,
                          bodyEnd: l,
                        }),
                        !1
                      );
                    a();
                  }
                }),
                i
              );
            })(n, t);
            if (i) return { range: [i.start, i.end] };
          }
        }
      }
      function ts(e, t, n) {
        const { pos: r } = e;
        return !(!e.eat(t) || !e.eat(n)) || ((e.pos = r), !1);
      }
      function ns(e) {
        const t = e.getCursor(),
          n = la(e.getLine(t.line), t.ch);
        if (n) {
          const r = { line: t.line, ch: n.start },
            i = { line: t.line, ch: n.end };
          e.replaceRange(n.snippet, r, i);
        }
      }
      function rs(e, t) {
        const n = (function (e, t, n) {
          const r = io(e),
            i = r.length;
          let o = t;
          for (; o < i && o >= 0; ) {
            o += n;
            const t = r[o],
              i = r[o + 1],
              s = r[o - 1];
            if (lo(t) && i === t && "=" === s) return o + 1;
            if ("<" === t && ">" === s) return o;
            if ("\r" === (a = t) || "\n" === a) {
              const t = e.posFromIndex(o),
                n = e.getLine(t.line);
              if (!n || uo(n))
                return e.indexFromPos({ line: t.line, ch: n.length });
            }
          }
          var a;
        })(e, ro(e) + t, t);
        null != n && e.setCursor(e.posFromIndex(n));
      }
      function is(e) {
        let t = ro(e);
        const n = [t, Math.min(t + 1, e.getValue().length)];
        "<" === oo(e, n) && t++;
        const { syntax: r } = Mo(e, t);
        if (Eo(r)) {
          const n = ca(e, t, Oo(r));
          if (n && n.open && n.close) {
            const { open: r, close: i } = n,
              o = r[0] <= t && t < r[1] ? i[0] : r[0];
            e.setCursor(e.posFromIndex(o));
          }
        }
      }
      function os(e, t = 1) {
        e.operation(() => {
          const n = e
            .listSelections()
            .slice()
            .reverse()
            .map((n) => {
              let r = po(e, n);
              if (go(r)) {
                const t = e.getLine(n.anchor.line),
                  i = n.anchor.ch,
                  o = (function (e, t) {
                    let n,
                      r = !1,
                      i = t,
                      o = t;
                    const s = e.length;
                    for (; i < s; ) {
                      if (((n = e.charCodeAt(i)), as(n))) {
                        if (r) break;
                        r = !0;
                      } else if (!a(n)) break;
                      i++;
                    }
                    for (; o >= 0; ) {
                      if (((n = e.charCodeAt(o - 1)), as(n))) {
                        if (r) break;
                        r = !0;
                      } else if (!a(n)) break;
                      o--;
                    }
                    o > 0 && "-" === e[o - 1] && o--;
                    if (o !== i) return [o, i];
                  })(t, i);
                o && (r = [r[0] - i + o[0], r[0] - i + o[1]]);
              }
              if (!go(r)) {
                let i = (function (e, t, n = 3) {
                  const r = parseFloat(e) + t;
                  if (isNaN(r)) return e;
                  const i = r < 0;
                  let o = Math.abs(r).toFixed(n);
                  (o = o.replace(/\.?0+$/, "")),
                    ("." !== e[0] && !e.startsWith("-.")) ||
                      "0" !== o[0] ||
                      (o = o.slice(1));
                  return (i ? "-" : "") + o;
                })(oo(e, r), t);
                no(e, r, i),
                  (n = {
                    anchor: e.posFromIndex(r[0]),
                    head: e.posFromIndex(r[0] + i.length),
                  });
              }
              return n;
            });
          e.setSelections(n);
        });
      }
      function as(e) {
        return 46 === e;
      }
      function ss(e) {
        e.operation(() => {
          const t = e
            .listSelections()
            .slice()
            .reverse()
            .map((t) => {
              const n = ca(e, e.indexFromPos(t.anchor));
              if (n) {
                !(function (e, { open: t, close: n }) {
                  if (n) {
                    const r = to(e, [t[1], n[0]]);
                    if (go(r)) no(e, [t[0], n[1]], "");
                    else {
                      no(e, [r[1], n[1]], "");
                      const i = e.posFromIndex(t[0]),
                        o = e.posFromIndex(n[1]);
                      if (i.line !== o.line) {
                        let n = i.line + 2;
                        const a = ls(e, t[0]),
                          s = ls(e, r[0]);
                        for (; n <= o.line; ) {
                          const t = e.indexFromPos({ line: n, ch: 0 }),
                            r = [t, t + s.length];
                          uo(oo(e, r)) &&
                            (console.log('replace "%s" with "%s"', oo(e, r), a),
                            no(e, r, a)),
                            n++;
                        }
                      }
                      no(e, [t[0], r[0]], "");
                    }
                  } else no(e, t, "");
                })(e, n);
                const t = e.posFromIndex(n.open[0]);
                return { anchor: t, head: t };
              }
              return t;
            });
          e.setSelections(t);
        });
      }
      function ls(e, t) {
        return ea(e, e.posFromIndex(t).line);
      }
      function cs(e, t = !1) {
        const n = No(e);
        if (!$o(n) && !Eo(n)) return;
        const r = e.listSelections()[0],
          i = po(e, r),
          o = io(e);
        let a = sa(o, i[0], $o(n), t);
        if (a) {
          let r = us(i, a.ranges, t);
          if (!r) {
            (a = sa(o, t ? a.start : a.end, $o(n), t)),
              a && (r = us(i, a.ranges, t));
          }
          if (r) {
            const [t, n] = ao(e, r);
            e.setSelection(t, n);
          }
        }
      }
      function us(e, t, n = !1) {
        n && (t = t.slice().reverse());
        let r,
          i = !1;
        for (const o of t) {
          if (i) return o;
          ho(o, e)
            ? (i = !0)
            : !r &&
              (mo(o, e) || (n && o[0] <= e[0]) || (!n && o[0] >= e[0])) &&
              (r = o);
        }
        if (!i) return r;
      }
      function fs(e) {
        const t = e.listSelections().slice().reverse(),
          n = [];
        e.operation(() => {
          for (const r of t) {
            const t = e.indexFromPos(r.anchor),
              { syntax: i } = Mo(e, t),
              o = ca(e, t, Oo(i));
            if (o) {
              const { open: t, close: r } = o;
              if (r) {
                no(e, [t[1], r[1]], "");
                let i = uo(ps(e, t[1] - 2)) ? "/" : " /";
                no(e, [t[1] - 1, t[1] - 1], i), n.push(ds(e, t[1] + i.length));
              } else {
                const r = `</${o.name}>`;
                if ((no(e, [t[1], t[1]], r), "/" === ps(e, t[1] - 2))) {
                  let r = t[1] - 2,
                    i = t[1] - 1;
                  uo(ps(e, r - 1)) && r--,
                    no(e, [r, i], ""),
                    n.push(ds(e, t[1] - i + r));
                } else n.push(ds(e, t[1]));
              }
            } else n.push(r);
          }
          e.setSelections(n);
        });
      }
      function ps(e, t) {
        return oo(e, [t, t + 1]);
      }
      function ds(e, t) {
        const n = e.posFromIndex(t);
        return { anchor: n, head: n };
      }
      function hs(e, t) {
        if ("undo" === t.origin && 1 === t.text.length) {
          const n = e.indexFromPos(t.from);
          !(function (e, t, n) {
            da.run(e, () => {
              const e = ha.getStoredTracker(da);
              if (e) {
                "abbreviation" === e.type &&
                  n === e.abbreviation &&
                  e.range[0] === t &&
                  ha.restoreTracker(da, t);
              }
            });
          })(e, n, t.text[0]);
        }
      }
      function ms(e, t) {
        if (
          "paste" === t.origin &&
          1 === t.text.length &&
          ma(e, e.indexFromPos(t.from))
        ) {
          const n = e.indexFromPos(t.from) + t.text[0].length;
          va(e, n);
        }
      }
      var gs = function (e) {
        Object.assign(e.commands, {
          emmetExpandAbbreviation: (e) => Da(e, !0),
          emmetExpandAbbreviationAll: (e) => Da(e, !1),
          emmetCaptureAbbreviation: Ha,
          emmetResetAbbreviation: ja,
          emmetEnterAbbreviationMode: Ra,
          emmetInsertLineBreak: Ba,
          emmetWrapWithAbbreviation: qa,
          emmetBalance: Ua,
          emmetBalanceInward: (e) => Ua(e, !0),
          emmetToggleComment: Ya,
          emmetEvaluateMath: ns,
          emmetGoToNextEditPoint: (e) => rs(e, 1),
          emmetGoToPreviousEditPoint: (e) => rs(e, -1),
          emmetGoToTagPair: is,
          emmetIncrementNumber1: (e) => os(e, 1),
          emmetIncrementNumber01: (e) => os(e, 0.1),
          emmetIncrementNumber10: (e) => os(e, 10),
          emmetDecrementNumber1: (e) => os(e, -1),
          emmetDecrementNumber01: (e) => os(e, -0.1),
          emmetDecrementNumber10: (e) => os(e, -10),
          emmetRemoveTag: ss,
          emmetSelectNextItem: (e) => cs(e),
          emmetSelectPreviousItem: (e) => cs(e, !0),
          emmetSplitJoinTag: fs,
        }),
          e.defineOption("emmet", it, (e, t) => {
            yo(e) || (e.on("change", hs), e.on("change", ms));
            const n = xo(e);
            (t = ot(e, t)).mark && !n.tracker
              ? (n.tracker = (function (e) {
                  const t = (e) => {
                      da.run(e, () => {
                        ha.handleChange(da, ro(e));
                      });
                    },
                    n = (e) => {
                      da.run(e, () => {
                        const t = ro(e);
                        if (!ga(e, t)) return;
                        const n = ha.handleSelectionChange(da, t);
                        n && (xa(n, t) ? da.showPreview(n) : da.hidePreview());
                      });
                    };
                  return (
                    e.on("change", t),
                    e.on("focus", n),
                    e.on("cursorActivity", n),
                    () => {
                      da.run(e, () => ha.disposeEditor(da)),
                        e.off("change", t),
                        e.off("focus", n),
                        e.off("cursorActivity", n);
                    }
                  );
                })(e))
              : !t.mark && n.tracker && (n.tracker(), (n.tracker = null)),
              t.markTagPairs && !n.tagMatch
                ? (n.tagMatch = wa(e))
                : !t.markTagPairs &&
                  n.tagMatch &&
                  (n.tagMatch(), (n.tagMatch = null));
          }),
          e.defineMode("emmet-abbreviation", $a),
          e.defineMode("emmet-css-abbreviation", za),
          e.defineMode("emmet-snippet", Wa),
          e.defineExtension(
            "expandAbbreviation",
            function (e, t = ua(this, 0)) {
              return ra(this, e, t);
            }
          ),
          e.defineExtension("emmetOptions", function (e = 0) {
            return ua(this, e);
          }),
          e.defineExtension("parseAbbreviation", function (e, t) {
            return "stylesheet" === t
              ? Re(Te(e))
              : C(ee(e), { jsx: "jsx" === t });
          }),
          e.defineExtension("getEmmetCompletion", function (e) {
            return (
              "number" != typeof e && (e = this.indexFromPos(e)),
              (function (e, t) {
                const n = ba(e) || va(e, t);
                if (n && xa(n, t) && "abbreviation" === n.type) {
                  const { abbreviation: t, preview: r } = n;
                  return {
                    text: t,
                    displayText: r,
                    hint: () => {
                      ya(e);
                      const r = ra(e, t, n.config);
                      no(e, n.range, r);
                    },
                    from: e.posFromIndex(n.range[0]),
                    to: e.posFromIndex(n.range[1]),
                  };
                }
              })(this, e)
            );
          });
      };
      n("1p+/"),
        n("ewDg"),
        n("+dQi"),
        n("bXjK"),
        n("Ku0u"),
        n("C2zF"),
        n("uTOq"),
        n("McUL");
      n("i0CS"), gs(i.a);
      var vs = "default",
        bs = "",
        ys = "";
      function xs(e) {
        (bs = e),
          post(
            "admin.templates.getFile",
            { token: $('input[name="token"]').val(), template: vs, file: e },
            !1
          ).then(function (e) {
            if (
              ($(".CodeMirror").remove(),
              "",
              (ys = e.type),
              $("#fileEditorInfo").html(
                ("image" == ys ? "Image" : "File") +
                  " name: <b>" +
                  bs +
                  "</b> (" +
                  e.size +
                  " bytes)<br/>Last change time: " +
                  e.lastChange
              ),
              "image" == e.type)
            )
              $("#imageViewContainer").show(),
                $("#fileEditorSelector").hide(),
                $("#fileEditorButtonLine").hide(),
                $("#imageViewContainer").html(e.content);
            else {
              $("#imageViewContainer").hide(),
                $("#fileEditorSelector").show(),
                $("#fileEditorButtonLine").show(),
                $("#fileEditorSelector").val(e.content);
              var t = $("#fileEditorSelector").width(),
                n = $("#fileEditorSelector").height(),
                r = i.a.fromTextArea(
                  document.getElementById("fileEditorSelector"),
                  {
                    lineNumbers: !0,
                    lineWrapping: !0,
                    styleActiveLine: !0,
                    indentUnit: 4,
                    tabMode: "shift",
                    enterMode: "indent",
                    theme: "default",
                    extraKeys: {
                      Tab: "indentMore",
                      "Shift-Tab": "indentLess",
                      "Ctrl-E": "emmetExpandAbbreviation",
                      F11: function (e) {
                        e.setOption("fullScreen", !e.getOption("fullScreen"));
                      },
                      Esc: function (e) {
                        e.getOption("fullScreen") &&
                          e.setOption("fullScreen", !1);
                      },
                    },
                  }
                );
              r.setSize(t, n),
                r.on("change", function (e) {
                  $("#fileEditorSelector").val(e.getValue());
                }),
                e.content;
            }
          });
      }
      $(document).ready(function () {
        var e = {
          root: "/",
          script: "".concat(NGCMS.admin_url, "/rpc.php"),
          securityToken: $('input[name="token"]').val(),
          templateName: vs,
        };
        $("[data-teplate-mode]").on("click", function (t) {
          t.preventDefault(),
            $("#fileEditorInfo").html(""),
            $("#imageViewContainer").html(""),
            $("#fileEditorSelector").val(""),
            (bs = ""),
            "template" == $(this).attr("data-teplate-mode")
              ? ((vs = $(this).attr("data-teplate-name")),
                (e.templateName = vs),
                $("#fileTreeSelector").ngFileTree(e, xs),
                $("#templateNameArea").text(vs))
              : ((vs = "#plugins"),
                (e.templateName = vs),
                $("#fileTreeSelector").ngFileTree(e, xs),
                $("#templateNameArea").text(" PLUGIN TEMPLATES "));
        }),
          $("#submitTemplateEdit").on("click", function (e) {
            e.preventDefault(),
              post(
                "admin.templates.updateFile",
                {
                  token: $('input[name="token"]').val(),
                  template: vs,
                  file: bs,
                  content: $("#fileEditorSelector").val(),
                },
                !1
              ).then(function (e) {
                e.content && ngNotifySticker(e.content, { closeBTN: !0 });
              });
          }),
          $("#fileTreeSelector").ngFileTree(e, xs);
      });
    },
  },
  [[3, 0]],
]);
