function it(r) {
  return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
}
var Ue, nn;
function rt() {
  if (nn) return Ue;
  nn = 1;
  function r(e) {
    return e instanceof Map ? e.clear = e.delete = e.set = function() {
      throw new Error("map is read-only");
    } : e instanceof Set && (e.add = e.clear = e.delete = function() {
      throw new Error("set is read-only");
    }), Object.freeze(e), Object.getOwnPropertyNames(e).forEach((n) => {
      const i = e[n], f = typeof i;
      (f === "object" || f === "function") && !Object.isFrozen(i) && r(i);
    }), e;
  }
  class g {
    /**
     * @param {CompiledMode} mode
     */
    constructor(n) {
      n.data === void 0 && (n.data = {}), this.data = n.data, this.isMatchIgnored = !1;
    }
    ignoreMatch() {
      this.isMatchIgnored = !0;
    }
  }
  function p(e) {
    return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#x27;");
  }
  function u(e, ...n) {
    const i = /* @__PURE__ */ Object.create(null);
    for (const f in e)
      i[f] = e[f];
    return n.forEach(function(f) {
      for (const A in f)
        i[A] = f[A];
    }), /** @type {T} */
    i;
  }
  const C = "</span>", B = (e) => !!e.scope, w = (e, { prefix: n }) => {
    if (e.startsWith("language:"))
      return e.replace("language:", "language-");
    if (e.includes(".")) {
      const i = e.split(".");
      return [
        `${n}${i.shift()}`,
        ...i.map((f, A) => `${f}${"_".repeat(A + 1)}`)
      ].join(" ");
    }
    return `${n}${e}`;
  };
  class S {
    /**
     * Creates a new HTMLRenderer
     *
     * @param {Tree} parseTree - the parse tree (must support `walk` API)
     * @param {{classPrefix: string}} options
     */
    constructor(n, i) {
      this.buffer = "", this.classPrefix = i.classPrefix, n.walk(this);
    }
    /**
     * Adds texts to the output stream
     *
     * @param {string} text */
    addText(n) {
      this.buffer += p(n);
    }
    /**
     * Adds a node open to the output stream (if needed)
     *
     * @param {Node} node */
    openNode(n) {
      if (!B(n)) return;
      const i = w(
        n.scope,
        { prefix: this.classPrefix }
      );
      this.span(i);
    }
    /**
     * Adds a node close to the output stream (if needed)
     *
     * @param {Node} node */
    closeNode(n) {
      B(n) && (this.buffer += C);
    }
    /**
     * returns the accumulated buffer
    */
    value() {
      return this.buffer;
    }
    // helpers
    /**
     * Builds a span element
     *
     * @param {string} className */
    span(n) {
      this.buffer += `<span class="${n}">`;
    }
  }
  const P = (e = {}) => {
    const n = { children: [] };
    return Object.assign(n, e), n;
  };
  class M {
    constructor() {
      this.rootNode = P(), this.stack = [this.rootNode];
    }
    get top() {
      return this.stack[this.stack.length - 1];
    }
    get root() {
      return this.rootNode;
    }
    /** @param {Node} node */
    add(n) {
      this.top.children.push(n);
    }
    /** @param {string} scope */
    openNode(n) {
      const i = P({ scope: n });
      this.add(i), this.stack.push(i);
    }
    closeNode() {
      if (this.stack.length > 1)
        return this.stack.pop();
    }
    closeAllNodes() {
      for (; this.closeNode(); ) ;
    }
    toJSON() {
      return JSON.stringify(this.rootNode, null, 4);
    }
    /**
     * @typedef { import("./html_renderer").Renderer } Renderer
     * @param {Renderer} builder
     */
    walk(n) {
      return this.constructor._walk(n, this.rootNode);
    }
    /**
     * @param {Renderer} builder
     * @param {Node} node
     */
    static _walk(n, i) {
      return typeof i == "string" ? n.addText(i) : i.children && (n.openNode(i), i.children.forEach((f) => this._walk(n, f)), n.closeNode(i)), n;
    }
    /**
     * @param {Node} node
     */
    static _collapse(n) {
      typeof n != "string" && n.children && (n.children.every((i) => typeof i == "string") ? n.children = [n.children.join("")] : n.children.forEach((i) => {
        M._collapse(i);
      }));
    }
  }
  class W extends M {
    /**
     * @param {*} options
     */
    constructor(n) {
      super(), this.options = n;
    }
    /**
     * @param {string} text
     */
    addText(n) {
      n !== "" && this.add(n);
    }
    /** @param {string} scope */
    startScope(n) {
      this.openNode(n);
    }
    endScope() {
      this.closeNode();
    }
    /**
     * @param {Emitter & {root: DataNode}} emitter
     * @param {string} name
     */
    __addSublanguage(n, i) {
      const f = n.root;
      i && (f.scope = `language:${i}`), this.add(f);
    }
    toHTML() {
      return new S(this, this.options).value();
    }
    finalize() {
      return this.closeAllNodes(), !0;
    }
  }
  function U(e) {
    return e ? typeof e == "string" ? e : e.source : null;
  }
  function O(e) {
    return x("(?=", e, ")");
  }
  function X(e) {
    return x("(?:", e, ")*");
  }
  function q(e) {
    return x("(?:", e, ")?");
  }
  function x(...e) {
    return e.map((i) => U(i)).join("");
  }
  function J(e) {
    const n = e[e.length - 1];
    return typeof n == "object" && n.constructor === Object ? (e.splice(e.length - 1, 1), n) : {};
  }
  function se(...e) {
    return "(" + (J(e).capture ? "" : "?:") + e.map((f) => U(f)).join("|") + ")";
  }
  function $(e) {
    return new RegExp(e.toString() + "|").exec("").length - 1;
  }
  function V(e, n) {
    const i = e && e.exec(n);
    return i && i.index === 0;
  }
  const ae = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;
  function F(e, { joinWith: n }) {
    let i = 0;
    return e.map((f) => {
      i += 1;
      const A = i;
      let T = U(f), o = "";
      for (; T.length > 0; ) {
        const a = ae.exec(T);
        if (!a) {
          o += T;
          break;
        }
        o += T.substring(0, a.index), T = T.substring(a.index + a[0].length), a[0][0] === "\\" && a[1] ? o += "\\" + String(Number(a[1]) + A) : (o += a[0], a[0] === "(" && i++);
      }
      return o;
    }).map((f) => `(${f})`).join(n);
  }
  const z = /\b\B/, de = "[a-zA-Z]\\w*", Q = "[a-zA-Z_]\\w*", ge = "\\b\\d+(\\.\\d+)?", fe = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", be = "\\b(0b[01]+)", Ee = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", me = (e = {}) => {
    const n = /^#![ ]*\//;
    return e.binary && (e.begin = x(
      n,
      /.*\b/,
      e.binary,
      /\b.*/
    )), u({
      scope: "meta",
      begin: n,
      end: /$/,
      relevance: 0,
      /** @type {ModeCallback} */
      "on:begin": (i, f) => {
        i.index !== 0 && f.ignoreMatch();
      }
    }, e);
  }, ee = {
    begin: "\\\\[\\s\\S]",
    relevance: 0
  }, _e = {
    scope: "string",
    begin: "'",
    end: "'",
    illegal: "\\n",
    contains: [ee]
  }, oe = {
    scope: "string",
    begin: '"',
    end: '"',
    illegal: "\\n",
    contains: [ee]
  }, ye = {
    begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/
  }, m = function(e, n, i = {}) {
    const f = u(
      {
        scope: "comment",
        begin: e,
        end: n,
        contains: []
      },
      i
    );
    f.contains.push({
      scope: "doctag",
      // hack to avoid the space from being included. the space is necessary to
      // match here to prevent the plain text rule below from gobbling up doctags
      begin: "[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",
      end: /(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,
      excludeBegin: !0,
      relevance: 0
    });
    const A = se(
      // list of common 1 and 2 letter words in English
      "I",
      "a",
      "is",
      "so",
      "us",
      "to",
      "at",
      "if",
      "in",
      "it",
      "on",
      // note: this is not an exhaustive list of contractions, just popular ones
      /[A-Za-z]+['](d|ve|re|ll|t|s|n)/,
      // contractions - can't we'd they're let's, etc
      /[A-Za-z]+[-][a-z]+/,
      // `no-way`, etc.
      /[A-Za-z][a-z]{2,}/
      // allow capitalized words at beginning of sentences
    );
    return f.contains.push(
      {
        // TODO: how to include ", (, ) without breaking grammars that use these for
        // comment delimiters?
        // begin: /[ ]+([()"]?([A-Za-z'-]{3,}|is|a|I|so|us|[tT][oO]|at|if|in|it|on)[.]?[()":]?([.][ ]|[ ]|\))){3}/
        // ---
        // this tries to find sequences of 3 english words in a row (without any
        // "programming" type syntax) this gives us a strong signal that we've
        // TRULY found a comment - vs perhaps scanning with the wrong language.
        // It's possible to find something that LOOKS like the start of the
        // comment - but then if there is no readable text - good chance it is a
        // false match and not a comment.
        //
        // for a visual example please see:
        // https://github.com/highlightjs/highlight.js/issues/2827
        begin: x(
          /[ ]+/,
          // necessary to prevent us gobbling up doctags like /* @author Bob Mcgill */
          "(",
          A,
          /[.]?[:]?([.][ ]|[ ])/,
          "){3}"
        )
        // look for 3 words in a row
      }
    ), f;
  }, D = m("//", "$"), G = m("/\\*", "\\*/"), Z = m("#", "$"), ne = {
    scope: "number",
    begin: ge,
    relevance: 0
  }, ce = {
    scope: "number",
    begin: fe,
    relevance: 0
  }, bn = {
    scope: "number",
    begin: be,
    relevance: 0
  }, pn = {
    scope: "regexp",
    begin: /\/(?=[^/\n]*\/)/,
    end: /\/[gimuy]*/,
    contains: [
      ee,
      {
        begin: /\[/,
        end: /\]/,
        relevance: 0,
        contains: [ee]
      }
    ]
  }, hn = {
    scope: "title",
    begin: de,
    relevance: 0
  }, En = {
    scope: "title",
    begin: Q,
    relevance: 0
  }, mn = {
    // excludes method names from keyword processing
    begin: "\\.\\s*" + Q,
    relevance: 0
  };
  var Ae = /* @__PURE__ */ Object.freeze({
    __proto__: null,
    APOS_STRING_MODE: _e,
    BACKSLASH_ESCAPE: ee,
    BINARY_NUMBER_MODE: bn,
    BINARY_NUMBER_RE: be,
    COMMENT: m,
    C_BLOCK_COMMENT_MODE: G,
    C_LINE_COMMENT_MODE: D,
    C_NUMBER_MODE: ce,
    C_NUMBER_RE: fe,
    END_SAME_AS_BEGIN: function(e) {
      return Object.assign(
        e,
        {
          /** @type {ModeCallback} */
          "on:begin": (n, i) => {
            i.data._beginMatch = n[1];
          },
          /** @type {ModeCallback} */
          "on:end": (n, i) => {
            i.data._beginMatch !== n[1] && i.ignoreMatch();
          }
        }
      );
    },
    HASH_COMMENT_MODE: Z,
    IDENT_RE: de,
    MATCH_NOTHING_RE: z,
    METHOD_GUARD: mn,
    NUMBER_MODE: ne,
    NUMBER_RE: ge,
    PHRASAL_WORDS_MODE: ye,
    QUOTE_STRING_MODE: oe,
    REGEXP_MODE: pn,
    RE_STARTERS_RE: Ee,
    SHEBANG: me,
    TITLE_MODE: hn,
    UNDERSCORE_IDENT_RE: Q,
    UNDERSCORE_TITLE_MODE: En
  });
  function _n(e, n) {
    e.input[e.index - 1] === "." && n.ignoreMatch();
  }
  function yn(e, n) {
    e.className !== void 0 && (e.scope = e.className, delete e.className);
  }
  function Nn(e, n) {
    n && e.beginKeywords && (e.begin = "\\b(" + e.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", e.__beforeBegin = _n, e.keywords = e.keywords || e.beginKeywords, delete e.beginKeywords, e.relevance === void 0 && (e.relevance = 0));
  }
  function Sn(e, n) {
    Array.isArray(e.illegal) && (e.illegal = se(...e.illegal));
  }
  function An(e, n) {
    if (e.match) {
      if (e.begin || e.end) throw new Error("begin & end are not supported with match");
      e.begin = e.match, delete e.match;
    }
  }
  function Tn(e, n) {
    e.relevance === void 0 && (e.relevance = 1);
  }
  const wn = (e, n) => {
    if (!e.beforeMatch) return;
    if (e.starts) throw new Error("beforeMatch cannot be used with starts");
    const i = Object.assign({}, e);
    Object.keys(e).forEach((f) => {
      delete e[f];
    }), e.keywords = i.keywords, e.begin = x(i.beforeMatch, O(i.begin)), e.starts = {
      relevance: 0,
      contains: [
        Object.assign(i, { endsParent: !0 })
      ]
    }, e.relevance = 0, delete i.beforeMatch;
  }, xn = [
    "of",
    "and",
    "for",
    "in",
    "not",
    "or",
    "if",
    "then",
    "parent",
    // common variable name
    "list",
    // common variable name
    "value"
    // common variable name
  ], Rn = "keyword";
  function $e(e, n, i = Rn) {
    const f = /* @__PURE__ */ Object.create(null);
    return typeof e == "string" ? A(i, e.split(" ")) : Array.isArray(e) ? A(i, e) : Object.keys(e).forEach(function(T) {
      Object.assign(
        f,
        $e(e[T], n, T)
      );
    }), f;
    function A(T, o) {
      n && (o = o.map((a) => a.toLowerCase())), o.forEach(function(a) {
        const d = a.split("|");
        f[d[0]] = [T, Mn(d[0], d[1])];
      });
    }
  }
  function Mn(e, n) {
    return n ? Number(n) : On(e) ? 0 : 1;
  }
  function On(e) {
    return xn.includes(e.toLowerCase());
  }
  const ze = {}, le = (e) => {
    console.error(e);
  }, Ge = (e, ...n) => {
    console.log(`WARN: ${e}`, ...n);
  }, pe = (e, n) => {
    ze[`${e}/${n}`] || (console.log(`Deprecated as of ${e}. ${n}`), ze[`${e}/${n}`] = !0);
  }, Te = new Error();
  function He(e, n, { key: i }) {
    let f = 0;
    const A = e[i], T = {}, o = {};
    for (let a = 1; a <= n.length; a++)
      o[a + f] = A[a], T[a + f] = !0, f += $(n[a - 1]);
    e[i] = o, e[i]._emit = T, e[i]._multi = !0;
  }
  function kn(e) {
    if (Array.isArray(e.begin)) {
      if (e.skip || e.excludeBegin || e.returnBegin)
        throw le("skip, excludeBegin, returnBegin not compatible with beginScope: {}"), Te;
      if (typeof e.beginScope != "object" || e.beginScope === null)
        throw le("beginScope must be object"), Te;
      He(e, e.begin, { key: "beginScope" }), e.begin = F(e.begin, { joinWith: "" });
    }
  }
  function vn(e) {
    if (Array.isArray(e.end)) {
      if (e.skip || e.excludeEnd || e.returnEnd)
        throw le("skip, excludeEnd, returnEnd not compatible with endScope: {}"), Te;
      if (typeof e.endScope != "object" || e.endScope === null)
        throw le("endScope must be object"), Te;
      He(e, e.end, { key: "endScope" }), e.end = F(e.end, { joinWith: "" });
    }
  }
  function In(e) {
    e.scope && typeof e.scope == "object" && e.scope !== null && (e.beginScope = e.scope, delete e.scope);
  }
  function Cn(e) {
    In(e), typeof e.beginScope == "string" && (e.beginScope = { _wrap: e.beginScope }), typeof e.endScope == "string" && (e.endScope = { _wrap: e.endScope }), kn(e), vn(e);
  }
  function Ln(e) {
    function n(o, a) {
      return new RegExp(
        U(o),
        "m" + (e.case_insensitive ? "i" : "") + (e.unicodeRegex ? "u" : "") + (a ? "g" : "")
      );
    }
    class i {
      constructor() {
        this.matchIndexes = {}, this.regexes = [], this.matchAt = 1, this.position = 0;
      }
      // @ts-ignore
      addRule(a, d) {
        d.position = this.position++, this.matchIndexes[this.matchAt] = d, this.regexes.push([d, a]), this.matchAt += $(a) + 1;
      }
      compile() {
        this.regexes.length === 0 && (this.exec = () => null);
        const a = this.regexes.map((d) => d[1]);
        this.matcherRe = n(F(a, { joinWith: "|" }), !0), this.lastIndex = 0;
      }
      /** @param {string} s */
      exec(a) {
        this.matcherRe.lastIndex = this.lastIndex;
        const d = this.matcherRe.exec(a);
        if (!d)
          return null;
        const v = d.findIndex((Ne, Ie) => Ie > 0 && Ne !== void 0), R = this.matchIndexes[v];
        return d.splice(0, v), Object.assign(d, R);
      }
    }
    class f {
      constructor() {
        this.rules = [], this.multiRegexes = [], this.count = 0, this.lastIndex = 0, this.regexIndex = 0;
      }
      // @ts-ignore
      getMatcher(a) {
        if (this.multiRegexes[a]) return this.multiRegexes[a];
        const d = new i();
        return this.rules.slice(a).forEach(([v, R]) => d.addRule(v, R)), d.compile(), this.multiRegexes[a] = d, d;
      }
      resumingScanAtSamePosition() {
        return this.regexIndex !== 0;
      }
      considerAll() {
        this.regexIndex = 0;
      }
      // @ts-ignore
      addRule(a, d) {
        this.rules.push([a, d]), d.type === "begin" && this.count++;
      }
      /** @param {string} s */
      exec(a) {
        const d = this.getMatcher(this.regexIndex);
        d.lastIndex = this.lastIndex;
        let v = d.exec(a);
        if (this.resumingScanAtSamePosition() && !(v && v.index === this.lastIndex)) {
          const R = this.getMatcher(0);
          R.lastIndex = this.lastIndex + 1, v = R.exec(a);
        }
        return v && (this.regexIndex += v.position + 1, this.regexIndex === this.count && this.considerAll()), v;
      }
    }
    function A(o) {
      const a = new f();
      return o.contains.forEach((d) => a.addRule(d.begin, { rule: d, type: "begin" })), o.terminatorEnd && a.addRule(o.terminatorEnd, { type: "end" }), o.illegal && a.addRule(o.illegal, { type: "illegal" }), a;
    }
    function T(o, a) {
      const d = (
        /** @type CompiledMode */
        o
      );
      if (o.isCompiled) return d;
      [
        yn,
        // do this early so compiler extensions generally don't have to worry about
        // the distinction between match/begin
        An,
        Cn,
        wn
      ].forEach((R) => R(o, a)), e.compilerExtensions.forEach((R) => R(o, a)), o.__beforeBegin = null, [
        Nn,
        // do this later so compiler extensions that come earlier have access to the
        // raw array if they wanted to perhaps manipulate it, etc.
        Sn,
        // default to 1 relevance if not specified
        Tn
      ].forEach((R) => R(o, a)), o.isCompiled = !0;
      let v = null;
      return typeof o.keywords == "object" && o.keywords.$pattern && (o.keywords = Object.assign({}, o.keywords), v = o.keywords.$pattern, delete o.keywords.$pattern), v = v || /\w+/, o.keywords && (o.keywords = $e(o.keywords, e.case_insensitive)), d.keywordPatternRe = n(v, !0), a && (o.begin || (o.begin = /\B|\b/), d.beginRe = n(d.begin), !o.end && !o.endsWithParent && (o.end = /\B|\b/), o.end && (d.endRe = n(d.end)), d.terminatorEnd = U(d.end) || "", o.endsWithParent && a.terminatorEnd && (d.terminatorEnd += (o.end ? "|" : "") + a.terminatorEnd)), o.illegal && (d.illegalRe = n(
        /** @type {RegExp | string} */
        o.illegal
      )), o.contains || (o.contains = []), o.contains = [].concat(...o.contains.map(function(R) {
        return Dn(R === "self" ? o : R);
      })), o.contains.forEach(function(R) {
        T(
          /** @type Mode */
          R,
          d
        );
      }), o.starts && T(o.starts, a), d.matcher = A(d), d;
    }
    if (e.compilerExtensions || (e.compilerExtensions = []), e.contains && e.contains.includes("self"))
      throw new Error("ERR: contains `self` is not supported at the top-level of a language.  See documentation.");
    return e.classNameAliases = u(e.classNameAliases || {}), T(
      /** @type Mode */
      e
    );
  }
  function Fe(e) {
    return e ? e.endsWithParent || Fe(e.starts) : !1;
  }
  function Dn(e) {
    return e.variants && !e.cachedVariants && (e.cachedVariants = e.variants.map(function(n) {
      return u(e, { variants: null }, n);
    })), e.cachedVariants ? e.cachedVariants : Fe(e) ? u(e, { starts: e.starts ? u(e.starts) : null }) : Object.isFrozen(e) ? u(e) : e;
  }
  var Bn = "11.11.1";
  class Pn extends Error {
    constructor(n, i) {
      super(n), this.name = "HTMLInjectionError", this.html = i;
    }
  }
  const ve = p, Ze = u, Ke = Symbol("nomatch"), Un = 7, We = function(e) {
    const n = /* @__PURE__ */ Object.create(null), i = /* @__PURE__ */ Object.create(null), f = [];
    let A = !0;
    const T = "Could not find the language '{}', did you forget to load/include a language module?", o = { disableAutodetect: !0, name: "Plain text", contains: [] };
    let a = {
      ignoreUnescapedHTML: !1,
      throwUnescapedHTML: !1,
      noHighlightRe: /^(no-?highlight)$/i,
      languageDetectRe: /\blang(?:uage)?-([\w-]+)\b/i,
      classPrefix: "hljs-",
      cssSelector: "pre code",
      languages: null,
      // beta configuration options, subject to change, welcome to discuss
      // https://github.com/highlightjs/highlight.js/issues/1086
      __emitter: W
    };
    function d(t) {
      return a.noHighlightRe.test(t);
    }
    function v(t) {
      let l = t.className + " ";
      l += t.parentNode ? t.parentNode.className : "";
      const E = a.languageDetectRe.exec(l);
      if (E) {
        const y = ie(E[1]);
        return y || (Ge(T.replace("{}", E[1])), Ge("Falling back to no-highlight mode for this block.", t)), y ? E[1] : "no-highlight";
      }
      return l.split(/\s+/).find((y) => d(y) || ie(y));
    }
    function R(t, l, E) {
      let y = "", k = "";
      typeof l == "object" ? (y = t, E = l.ignoreIllegals, k = l.language) : (pe("10.7.0", "highlight(lang, code, ...args) has been deprecated."), pe("10.7.0", `Please use highlight(code, options) instead.
https://github.com/highlightjs/highlight.js/issues/2277`), k = t, y = l), E === void 0 && (E = !0);
      const K = {
        code: y,
        language: k
      };
      xe("before:highlight", K);
      const re = K.result ? K.result : Ne(K.language, K.code, E);
      return re.code = K.code, xe("after:highlight", re), re;
    }
    function Ne(t, l, E, y) {
      const k = /* @__PURE__ */ Object.create(null);
      function K(s, c) {
        return s.keywords[c];
      }
      function re() {
        if (!b.keywords) {
          I.addText(N);
          return;
        }
        let s = 0;
        b.keywordPatternRe.lastIndex = 0;
        let c = b.keywordPatternRe.exec(N), h = "";
        for (; c; ) {
          h += N.substring(s, c.index);
          const _ = Y.case_insensitive ? c[0].toLowerCase() : c[0], L = K(b, _);
          if (L) {
            const [te, nt] = L;
            if (I.addText(h), h = "", k[_] = (k[_] || 0) + 1, k[_] <= Un && (Oe += nt), te.startsWith("_"))
              h += c[0];
            else {
              const tt = Y.classNameAliases[te] || te;
              j(c[0], tt);
            }
          } else
            h += c[0];
          s = b.keywordPatternRe.lastIndex, c = b.keywordPatternRe.exec(N);
        }
        h += N.substring(s), I.addText(h);
      }
      function Re() {
        if (N === "") return;
        let s = null;
        if (typeof b.subLanguage == "string") {
          if (!n[b.subLanguage]) {
            I.addText(N);
            return;
          }
          s = Ne(b.subLanguage, N, !0, en[b.subLanguage]), en[b.subLanguage] = /** @type {CompiledMode} */
          s._top;
        } else
          s = Ce(N, b.subLanguage.length ? b.subLanguage : null);
        b.relevance > 0 && (Oe += s.relevance), I.__addSublanguage(s._emitter, s.language);
      }
      function H() {
        b.subLanguage != null ? Re() : re(), N = "";
      }
      function j(s, c) {
        s !== "" && (I.startScope(c), I.addText(s), I.endScope());
      }
      function qe(s, c) {
        let h = 1;
        const _ = c.length - 1;
        for (; h <= _; ) {
          if (!s._emit[h]) {
            h++;
            continue;
          }
          const L = Y.classNameAliases[s[h]] || s[h], te = c[h];
          L ? j(te, L) : (N = te, re(), N = ""), h++;
        }
      }
      function Je(s, c) {
        return s.scope && typeof s.scope == "string" && I.openNode(Y.classNameAliases[s.scope] || s.scope), s.beginScope && (s.beginScope._wrap ? (j(N, Y.classNameAliases[s.beginScope._wrap] || s.beginScope._wrap), N = "") : s.beginScope._multi && (qe(s.beginScope, c), N = "")), b = Object.create(s, { parent: { value: b } }), b;
      }
      function Ve(s, c, h) {
        let _ = V(s.endRe, h);
        if (_) {
          if (s["on:end"]) {
            const L = new g(s);
            s["on:end"](c, L), L.isMatchIgnored && (_ = !1);
          }
          if (_) {
            for (; s.endsParent && s.parent; )
              s = s.parent;
            return s;
          }
        }
        if (s.endsWithParent)
          return Ve(s.parent, c, h);
      }
      function qn(s) {
        return b.matcher.regexIndex === 0 ? (N += s[0], 1) : (Pe = !0, 0);
      }
      function Jn(s) {
        const c = s[0], h = s.rule, _ = new g(h), L = [h.__beforeBegin, h["on:begin"]];
        for (const te of L)
          if (te && (te(s, _), _.isMatchIgnored))
            return qn(c);
        return h.skip ? N += c : (h.excludeBegin && (N += c), H(), !h.returnBegin && !h.excludeBegin && (N = c)), Je(h, s), h.returnBegin ? 0 : c.length;
      }
      function Vn(s) {
        const c = s[0], h = l.substring(s.index), _ = Ve(b, s, h);
        if (!_)
          return Ke;
        const L = b;
        b.endScope && b.endScope._wrap ? (H(), j(c, b.endScope._wrap)) : b.endScope && b.endScope._multi ? (H(), qe(b.endScope, s)) : L.skip ? N += c : (L.returnEnd || L.excludeEnd || (N += c), H(), L.excludeEnd && (N = c));
        do
          b.scope && I.closeNode(), !b.skip && !b.subLanguage && (Oe += b.relevance), b = b.parent;
        while (b !== _.parent);
        return _.starts && Je(_.starts, s), L.returnEnd ? 0 : c.length;
      }
      function Qn() {
        const s = [];
        for (let c = b; c !== Y; c = c.parent)
          c.scope && s.unshift(c.scope);
        s.forEach((c) => I.openNode(c));
      }
      let Me = {};
      function Qe(s, c) {
        const h = c && c[0];
        if (N += s, h == null)
          return H(), 0;
        if (Me.type === "begin" && c.type === "end" && Me.index === c.index && h === "") {
          if (N += l.slice(c.index, c.index + 1), !A) {
            const _ = new Error(`0 width match regex (${t})`);
            throw _.languageName = t, _.badRule = Me.rule, _;
          }
          return 1;
        }
        if (Me = c, c.type === "begin")
          return Jn(c);
        if (c.type === "illegal" && !E) {
          const _ = new Error('Illegal lexeme "' + h + '" for mode "' + (b.scope || "<unnamed>") + '"');
          throw _.mode = b, _;
        } else if (c.type === "end") {
          const _ = Vn(c);
          if (_ !== Ke)
            return _;
        }
        if (c.type === "illegal" && h === "")
          return N += `
`, 1;
        if (Be > 1e5 && Be > c.index * 3)
          throw new Error("potential infinite loop, way more iterations than matches");
        return N += h, h.length;
      }
      const Y = ie(t);
      if (!Y)
        throw le(T.replace("{}", t)), new Error('Unknown language: "' + t + '"');
      const et = Ln(Y);
      let De = "", b = y || et;
      const en = {}, I = new a.__emitter(a);
      Qn();
      let N = "", Oe = 0, ue = 0, Be = 0, Pe = !1;
      try {
        if (Y.__emitTokens)
          Y.__emitTokens(l, I);
        else {
          for (b.matcher.considerAll(); ; ) {
            Be++, Pe ? Pe = !1 : b.matcher.considerAll(), b.matcher.lastIndex = ue;
            const s = b.matcher.exec(l);
            if (!s) break;
            const c = l.substring(ue, s.index), h = Qe(c, s);
            ue = s.index + h;
          }
          Qe(l.substring(ue));
        }
        return I.finalize(), De = I.toHTML(), {
          language: t,
          value: De,
          relevance: Oe,
          illegal: !1,
          _emitter: I,
          _top: b
        };
      } catch (s) {
        if (s.message && s.message.includes("Illegal"))
          return {
            language: t,
            value: ve(l),
            illegal: !0,
            relevance: 0,
            _illegalBy: {
              message: s.message,
              index: ue,
              context: l.slice(ue - 100, ue + 100),
              mode: s.mode,
              resultSoFar: De
            },
            _emitter: I
          };
        if (A)
          return {
            language: t,
            value: ve(l),
            illegal: !1,
            relevance: 0,
            errorRaised: s,
            _emitter: I,
            _top: b
          };
        throw s;
      }
    }
    function Ie(t) {
      const l = {
        value: ve(t),
        illegal: !1,
        relevance: 0,
        _top: o,
        _emitter: new a.__emitter(a)
      };
      return l._emitter.addText(t), l;
    }
    function Ce(t, l) {
      l = l || a.languages || Object.keys(n);
      const E = Ie(t), y = l.filter(ie).filter(Ye).map(
        (H) => Ne(H, t, !1)
      );
      y.unshift(E);
      const k = y.sort((H, j) => {
        if (H.relevance !== j.relevance) return j.relevance - H.relevance;
        if (H.language && j.language) {
          if (ie(H.language).supersetOf === j.language)
            return 1;
          if (ie(j.language).supersetOf === H.language)
            return -1;
        }
        return 0;
      }), [K, re] = k, Re = K;
      return Re.secondBest = re, Re;
    }
    function $n(t, l, E) {
      const y = l && i[l] || E;
      t.classList.add("hljs"), t.classList.add(`language-${y}`);
    }
    function Le(t) {
      let l = null;
      const E = v(t);
      if (d(E)) return;
      if (xe(
        "before:highlightElement",
        { el: t, language: E }
      ), t.dataset.highlighted) {
        console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.", t);
        return;
      }
      if (t.children.length > 0 && (a.ignoreUnescapedHTML || (console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."), console.warn("https://github.com/highlightjs/highlight.js/wiki/security"), console.warn("The element with unescaped HTML:"), console.warn(t)), a.throwUnescapedHTML))
        throw new Pn(
          "One of your code blocks includes unescaped HTML.",
          t.innerHTML
        );
      l = t;
      const y = l.textContent, k = E ? R(y, { language: E, ignoreIllegals: !0 }) : Ce(y);
      t.innerHTML = k.value, t.dataset.highlighted = "yes", $n(t, E, k.language), t.result = {
        language: k.language,
        // TODO: remove with version 11.0
        re: k.relevance,
        relevance: k.relevance
      }, k.secondBest && (t.secondBest = {
        language: k.secondBest.language,
        relevance: k.secondBest.relevance
      }), xe("after:highlightElement", { el: t, result: k, text: y });
    }
    function zn(t) {
      a = Ze(a, t);
    }
    const Gn = () => {
      we(), pe("10.6.0", "initHighlighting() deprecated.  Use highlightAll() now.");
    };
    function Hn() {
      we(), pe("10.6.0", "initHighlightingOnLoad() deprecated.  Use highlightAll() now.");
    }
    let Xe = !1;
    function we() {
      function t() {
        we();
      }
      if (document.readyState === "loading") {
        Xe || window.addEventListener("DOMContentLoaded", t, !1), Xe = !0;
        return;
      }
      document.querySelectorAll(a.cssSelector).forEach(Le);
    }
    function Fn(t, l) {
      let E = null;
      try {
        E = l(e);
      } catch (y) {
        if (le("Language definition for '{}' could not be registered.".replace("{}", t)), A)
          le(y);
        else
          throw y;
        E = o;
      }
      E.name || (E.name = t), n[t] = E, E.rawDefinition = l.bind(null, e), E.aliases && je(E.aliases, { languageName: t });
    }
    function Zn(t) {
      delete n[t];
      for (const l of Object.keys(i))
        i[l] === t && delete i[l];
    }
    function Kn() {
      return Object.keys(n);
    }
    function ie(t) {
      return t = (t || "").toLowerCase(), n[t] || n[i[t]];
    }
    function je(t, { languageName: l }) {
      typeof t == "string" && (t = [t]), t.forEach((E) => {
        i[E.toLowerCase()] = l;
      });
    }
    function Ye(t) {
      const l = ie(t);
      return l && !l.disableAutodetect;
    }
    function Wn(t) {
      t["before:highlightBlock"] && !t["before:highlightElement"] && (t["before:highlightElement"] = (l) => {
        t["before:highlightBlock"](
          Object.assign({ block: l.el }, l)
        );
      }), t["after:highlightBlock"] && !t["after:highlightElement"] && (t["after:highlightElement"] = (l) => {
        t["after:highlightBlock"](
          Object.assign({ block: l.el }, l)
        );
      });
    }
    function Xn(t) {
      Wn(t), f.push(t);
    }
    function jn(t) {
      const l = f.indexOf(t);
      l !== -1 && f.splice(l, 1);
    }
    function xe(t, l) {
      const E = t;
      f.forEach(function(y) {
        y[E] && y[E](l);
      });
    }
    function Yn(t) {
      return pe("10.7.0", "highlightBlock will be removed entirely in v12.0"), pe("10.7.0", "Please use highlightElement now."), Le(t);
    }
    Object.assign(e, {
      highlight: R,
      highlightAuto: Ce,
      highlightAll: we,
      highlightElement: Le,
      // TODO: Remove with v12 API
      highlightBlock: Yn,
      configure: zn,
      initHighlighting: Gn,
      initHighlightingOnLoad: Hn,
      registerLanguage: Fn,
      unregisterLanguage: Zn,
      listLanguages: Kn,
      getLanguage: ie,
      registerAliases: je,
      autoDetection: Ye,
      inherit: Ze,
      addPlugin: Xn,
      removePlugin: jn
    }), e.debugMode = function() {
      A = !1;
    }, e.safeMode = function() {
      A = !0;
    }, e.versionString = Bn, e.regex = {
      concat: x,
      lookahead: O,
      either: se,
      optional: q,
      anyNumberOfTimes: X
    };
    for (const t in Ae)
      typeof Ae[t] == "object" && r(Ae[t]);
    return Object.assign(e, Ae), e;
  }, he = We({});
  return he.newInstance = () => We({}), Ue = he, he.HighlightJS = he, he.default = he, Ue;
}
var st = /* @__PURE__ */ rt();
const Se = /* @__PURE__ */ it(st), tn = "[A-Za-z$_][0-9A-Za-z$_]*", at = [
  "as",
  // for exports
  "in",
  "of",
  "if",
  "for",
  "while",
  "finally",
  "var",
  "new",
  "function",
  "do",
  "return",
  "void",
  "else",
  "break",
  "catch",
  "instanceof",
  "with",
  "throw",
  "case",
  "default",
  "try",
  "switch",
  "continue",
  "typeof",
  "delete",
  "let",
  "yield",
  "const",
  "class",
  // JS handles these with a special rule
  // "get",
  // "set",
  "debugger",
  "async",
  "await",
  "static",
  "import",
  "from",
  "export",
  "extends",
  // It's reached stage 3, which is "recommended for implementation":
  "using"
], ot = [
  "true",
  "false",
  "null",
  "undefined",
  "NaN",
  "Infinity"
], rn = [
  // Fundamental objects
  "Object",
  "Function",
  "Boolean",
  "Symbol",
  // numbers and dates
  "Math",
  "Date",
  "Number",
  "BigInt",
  // text
  "String",
  "RegExp",
  // Indexed collections
  "Array",
  "Float32Array",
  "Float64Array",
  "Int8Array",
  "Uint8Array",
  "Uint8ClampedArray",
  "Int16Array",
  "Int32Array",
  "Uint16Array",
  "Uint32Array",
  "BigInt64Array",
  "BigUint64Array",
  // Keyed collections
  "Set",
  "Map",
  "WeakSet",
  "WeakMap",
  // Structured data
  "ArrayBuffer",
  "SharedArrayBuffer",
  "Atomics",
  "DataView",
  "JSON",
  // Control abstraction objects
  "Promise",
  "Generator",
  "GeneratorFunction",
  "AsyncFunction",
  // Reflection
  "Reflect",
  "Proxy",
  // Internationalization
  "Intl",
  // WebAssembly
  "WebAssembly"
], sn = [
  "Error",
  "EvalError",
  "InternalError",
  "RangeError",
  "ReferenceError",
  "SyntaxError",
  "TypeError",
  "URIError"
], an = [
  "setInterval",
  "setTimeout",
  "clearInterval",
  "clearTimeout",
  "require",
  "exports",
  "eval",
  "isFinite",
  "isNaN",
  "parseFloat",
  "parseInt",
  "decodeURI",
  "decodeURIComponent",
  "encodeURI",
  "encodeURIComponent",
  "escape",
  "unescape"
], ct = [
  "arguments",
  "this",
  "super",
  "console",
  "window",
  "document",
  "localStorage",
  "sessionStorage",
  "module",
  "global"
  // Node.js
], lt = [].concat(
  an,
  rn,
  sn
);
function ut(r) {
  const g = r.regex, p = (m, { after: D }) => {
    const G = "</" + m[0].slice(1);
    return m.input.indexOf(G, D) !== -1;
  }, u = tn, C = {
    begin: "<>",
    end: "</>"
  }, B = /<[A-Za-z0-9\\._:-]+\s*\/>/, w = {
    begin: /<[A-Za-z0-9\\._:-]+/,
    end: /\/[A-Za-z0-9\\._:-]+>|\/>/,
    /**
     * @param {RegExpMatchArray} match
     * @param {CallbackResponse} response
     */
    isTrulyOpeningTag: (m, D) => {
      const G = m[0].length + m.index, Z = m.input[G];
      if (
        // HTML should not include another raw `<` inside a tag
        // nested type?
        // `<Array<Array<number>>`, etc.
        Z === "<" || // the , gives away that this is not HTML
        // `<T, A extends keyof T, V>`
        Z === ","
      ) {
        D.ignoreMatch();
        return;
      }
      Z === ">" && (p(m, { after: G }) || D.ignoreMatch());
      let ne;
      const ce = m.input.substring(G);
      if (ne = ce.match(/^\s*=/)) {
        D.ignoreMatch();
        return;
      }
      if ((ne = ce.match(/^\s+extends\s+/)) && ne.index === 0) {
        D.ignoreMatch();
        return;
      }
    }
  }, S = {
    $pattern: tn,
    keyword: at,
    literal: ot,
    built_in: lt,
    "variable.language": ct
  }, P = "[0-9](_?[0-9])*", M = `\\.(${P})`, W = "0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*", U = {
    className: "number",
    variants: [
      // DecimalLiteral
      { begin: `(\\b(${W})((${M})|\\.)?|(${M}))[eE][+-]?(${P})\\b` },
      { begin: `\\b(${W})\\b((${M})\\b|\\.)?|(${M})\\b` },
      // DecimalBigIntegerLiteral
      { begin: "\\b(0|[1-9](_?[0-9])*)n\\b" },
      // NonDecimalIntegerLiteral
      { begin: "\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b" },
      { begin: "\\b0[bB][0-1](_?[0-1])*n?\\b" },
      { begin: "\\b0[oO][0-7](_?[0-7])*n?\\b" },
      // LegacyOctalIntegerLiteral (does not include underscore separators)
      // https://tc39.es/ecma262/#sec-additional-syntax-numeric-literals
      { begin: "\\b0[0-7]+n?\\b" }
    ],
    relevance: 0
  }, O = {
    className: "subst",
    begin: "\\$\\{",
    end: "\\}",
    keywords: S,
    contains: []
    // defined later
  }, X = {
    begin: ".?html`",
    end: "",
    starts: {
      end: "`",
      returnEnd: !1,
      contains: [
        r.BACKSLASH_ESCAPE,
        O
      ],
      subLanguage: "xml"
    }
  }, q = {
    begin: ".?css`",
    end: "",
    starts: {
      end: "`",
      returnEnd: !1,
      contains: [
        r.BACKSLASH_ESCAPE,
        O
      ],
      subLanguage: "css"
    }
  }, x = {
    begin: ".?gql`",
    end: "",
    starts: {
      end: "`",
      returnEnd: !1,
      contains: [
        r.BACKSLASH_ESCAPE,
        O
      ],
      subLanguage: "graphql"
    }
  }, J = {
    className: "string",
    begin: "`",
    end: "`",
    contains: [
      r.BACKSLASH_ESCAPE,
      O
    ]
  }, $ = {
    className: "comment",
    variants: [
      r.COMMENT(
        /\/\*\*(?!\/)/,
        "\\*/",
        {
          relevance: 0,
          contains: [
            {
              begin: "(?=@[A-Za-z]+)",
              relevance: 0,
              contains: [
                {
                  className: "doctag",
                  begin: "@[A-Za-z]+"
                },
                {
                  className: "type",
                  begin: "\\{",
                  end: "\\}",
                  excludeEnd: !0,
                  excludeBegin: !0,
                  relevance: 0
                },
                {
                  className: "variable",
                  begin: u + "(?=\\s*(-)|$)",
                  endsParent: !0,
                  relevance: 0
                },
                // eat spaces (not newlines) so we can find
                // types or variables
                {
                  begin: /(?=[^\n])\s/,
                  relevance: 0
                }
              ]
            }
          ]
        }
      ),
      r.C_BLOCK_COMMENT_MODE,
      r.C_LINE_COMMENT_MODE
    ]
  }, V = [
    r.APOS_STRING_MODE,
    r.QUOTE_STRING_MODE,
    X,
    q,
    x,
    J,
    // Skip numbers when they are part of a variable name
    { match: /\$\d+/ },
    U
    // This is intentional:
    // See https://github.com/highlightjs/highlight.js/issues/3288
    // hljs.REGEXP_MODE
  ];
  O.contains = V.concat({
    // we need to pair up {} inside our subst to prevent
    // it from ending too early by matching another }
    begin: /\{/,
    end: /\}/,
    keywords: S,
    contains: [
      "self"
    ].concat(V)
  });
  const ae = [].concat($, O.contains), F = ae.concat([
    // eat recursive parens in sub expressions
    {
      begin: /(\s*)\(/,
      end: /\)/,
      keywords: S,
      contains: ["self"].concat(ae)
    }
  ]), z = {
    className: "params",
    // convert this to negative lookbehind in v12
    begin: /(\s*)\(/,
    // to match the parms with
    end: /\)/,
    excludeBegin: !0,
    excludeEnd: !0,
    keywords: S,
    contains: F
  }, de = {
    variants: [
      // class Car extends vehicle
      {
        match: [
          /class/,
          /\s+/,
          u,
          /\s+/,
          /extends/,
          /\s+/,
          g.concat(u, "(", g.concat(/\./, u), ")*")
        ],
        scope: {
          1: "keyword",
          3: "title.class",
          5: "keyword",
          7: "title.class.inherited"
        }
      },
      // class Car
      {
        match: [
          /class/,
          /\s+/,
          u
        ],
        scope: {
          1: "keyword",
          3: "title.class"
        }
      }
    ]
  }, Q = {
    relevance: 0,
    match: g.either(
      // Hard coded exceptions
      /\bJSON/,
      // Float32Array, OutT
      /\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,
      // CSSFactory, CSSFactoryT
      /\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,
      // FPs, FPsT
      /\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/
      // P
      // single letters are not highlighted
      // BLAH
      // this will be flagged as a UPPER_CASE_CONSTANT instead
    ),
    className: "title.class",
    keywords: {
      _: [
        // se we still get relevance credit for JS library classes
        ...rn,
        ...sn
      ]
    }
  }, ge = {
    label: "use_strict",
    className: "meta",
    relevance: 10,
    begin: /^\s*['"]use (strict|asm)['"]/
  }, fe = {
    variants: [
      {
        match: [
          /function/,
          /\s+/,
          u,
          /(?=\s*\()/
        ]
      },
      // anonymous function
      {
        match: [
          /function/,
          /\s*(?=\()/
        ]
      }
    ],
    className: {
      1: "keyword",
      3: "title.function"
    },
    label: "func.def",
    contains: [z],
    illegal: /%/
  }, be = {
    relevance: 0,
    match: /\b[A-Z][A-Z_0-9]+\b/,
    className: "variable.constant"
  };
  function Ee(m) {
    return g.concat("(?!", m.join("|"), ")");
  }
  const me = {
    match: g.concat(
      /\b/,
      Ee([
        ...an,
        "super",
        "import"
      ].map((m) => `${m}\\s*\\(`)),
      u,
      g.lookahead(/\s*\(/)
    ),
    className: "title.function",
    relevance: 0
  }, ee = {
    begin: g.concat(/\./, g.lookahead(
      g.concat(u, /(?![0-9A-Za-z$_(])/)
    )),
    end: u,
    excludeBegin: !0,
    keywords: "prototype",
    className: "property",
    relevance: 0
  }, _e = {
    match: [
      /get|set/,
      /\s+/,
      u,
      /(?=\()/
    ],
    className: {
      1: "keyword",
      3: "title.function"
    },
    contains: [
      {
        // eat to avoid empty params
        begin: /\(\)/
      },
      z
    ]
  }, oe = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + r.UNDERSCORE_IDENT_RE + ")\\s*=>", ye = {
    match: [
      /const|var|let/,
      /\s+/,
      u,
      /\s*/,
      /=\s*/,
      /(async\s*)?/,
      // async is optional
      g.lookahead(oe)
    ],
    keywords: "async",
    className: {
      1: "keyword",
      3: "title.function"
    },
    contains: [
      z
    ]
  };
  return {
    name: "JavaScript",
    aliases: ["js", "jsx", "mjs", "cjs"],
    keywords: S,
    // this will be extended by TypeScript
    exports: { PARAMS_CONTAINS: F, CLASS_REFERENCE: Q },
    illegal: /#(?![$_A-z])/,
    contains: [
      r.SHEBANG({
        label: "shebang",
        binary: "node",
        relevance: 5
      }),
      ge,
      r.APOS_STRING_MODE,
      r.QUOTE_STRING_MODE,
      X,
      q,
      x,
      J,
      $,
      // Skip numbers when they are part of a variable name
      { match: /\$\d+/ },
      U,
      Q,
      {
        scope: "attr",
        match: u + g.lookahead(":"),
        relevance: 0
      },
      ye,
      {
        // "value" container
        begin: "(" + r.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*",
        keywords: "return throw case",
        relevance: 0,
        contains: [
          $,
          r.REGEXP_MODE,
          {
            className: "function",
            // we have to count the parens to make sure we actually have the
            // correct bounding ( ) before the =>.  There could be any number of
            // sub-expressions inside also surrounded by parens.
            begin: oe,
            returnBegin: !0,
            end: "\\s*=>",
            contains: [
              {
                className: "params",
                variants: [
                  {
                    begin: r.UNDERSCORE_IDENT_RE,
                    relevance: 0
                  },
                  {
                    className: null,
                    begin: /\(\s*\)/,
                    skip: !0
                  },
                  {
                    begin: /(\s*)\(/,
                    end: /\)/,
                    excludeBegin: !0,
                    excludeEnd: !0,
                    keywords: S,
                    contains: F
                  }
                ]
              }
            ]
          },
          {
            // could be a comma delimited list of params to a function call
            begin: /,/,
            relevance: 0
          },
          {
            match: /\s+/,
            relevance: 0
          },
          {
            // JSX
            variants: [
              { begin: C.begin, end: C.end },
              { match: B },
              {
                begin: w.begin,
                // we carefully check the opening tag to see if it truly
                // is a tag and not a false positive
                "on:begin": w.isTrulyOpeningTag,
                end: w.end
              }
            ],
            subLanguage: "xml",
            contains: [
              {
                begin: w.begin,
                end: w.end,
                skip: !0,
                contains: ["self"]
              }
            ]
          }
        ]
      },
      fe,
      {
        // prevent this from getting swallowed up by function
        // since they appear "function like"
        beginKeywords: "while if switch catch for"
      },
      {
        // we have to count the parens to make sure we actually have the correct
        // bounding ( ).  There could be any number of sub-expressions inside
        // also surrounded by parens.
        begin: "\\b(?!function)" + r.UNDERSCORE_IDENT_RE + "\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",
        // end parens
        returnBegin: !0,
        label: "func.def",
        contains: [
          z,
          r.inherit(r.TITLE_MODE, { begin: u, className: "title.function" })
        ]
      },
      // catch ... so it won't trigger the property rule below
      {
        match: /\.\.\./,
        relevance: 0
      },
      ee,
      // hack: prevents detection of keywords in some circumstances
      // .keyword()
      // $keyword = x
      {
        match: "\\$" + u,
        relevance: 0
      },
      {
        match: [/\bconstructor(?=\s*\()/],
        className: { 1: "title.function" },
        contains: [z]
      },
      me,
      be,
      de,
      _e,
      {
        match: /\$[(.]/
        // relevance booster for a pattern common to JS libs: `$(something)` and `$.something`
      }
    ]
  };
}
const ke = "[A-Za-z$_][0-9A-Za-z$_]*", on = [
  "as",
  // for exports
  "in",
  "of",
  "if",
  "for",
  "while",
  "finally",
  "var",
  "new",
  "function",
  "do",
  "return",
  "void",
  "else",
  "break",
  "catch",
  "instanceof",
  "with",
  "throw",
  "case",
  "default",
  "try",
  "switch",
  "continue",
  "typeof",
  "delete",
  "let",
  "yield",
  "const",
  "class",
  // JS handles these with a special rule
  // "get",
  // "set",
  "debugger",
  "async",
  "await",
  "static",
  "import",
  "from",
  "export",
  "extends",
  // It's reached stage 3, which is "recommended for implementation":
  "using"
], cn = [
  "true",
  "false",
  "null",
  "undefined",
  "NaN",
  "Infinity"
], ln = [
  // Fundamental objects
  "Object",
  "Function",
  "Boolean",
  "Symbol",
  // numbers and dates
  "Math",
  "Date",
  "Number",
  "BigInt",
  // text
  "String",
  "RegExp",
  // Indexed collections
  "Array",
  "Float32Array",
  "Float64Array",
  "Int8Array",
  "Uint8Array",
  "Uint8ClampedArray",
  "Int16Array",
  "Int32Array",
  "Uint16Array",
  "Uint32Array",
  "BigInt64Array",
  "BigUint64Array",
  // Keyed collections
  "Set",
  "Map",
  "WeakSet",
  "WeakMap",
  // Structured data
  "ArrayBuffer",
  "SharedArrayBuffer",
  "Atomics",
  "DataView",
  "JSON",
  // Control abstraction objects
  "Promise",
  "Generator",
  "GeneratorFunction",
  "AsyncFunction",
  // Reflection
  "Reflect",
  "Proxy",
  // Internationalization
  "Intl",
  // WebAssembly
  "WebAssembly"
], un = [
  "Error",
  "EvalError",
  "InternalError",
  "RangeError",
  "ReferenceError",
  "SyntaxError",
  "TypeError",
  "URIError"
], dn = [
  "setInterval",
  "setTimeout",
  "clearInterval",
  "clearTimeout",
  "require",
  "exports",
  "eval",
  "isFinite",
  "isNaN",
  "parseFloat",
  "parseInt",
  "decodeURI",
  "decodeURIComponent",
  "encodeURI",
  "encodeURIComponent",
  "escape",
  "unescape"
], gn = [
  "arguments",
  "this",
  "super",
  "console",
  "window",
  "document",
  "localStorage",
  "sessionStorage",
  "module",
  "global"
  // Node.js
], fn = [].concat(
  dn,
  ln,
  un
);
function dt(r) {
  const g = r.regex, p = (m, { after: D }) => {
    const G = "</" + m[0].slice(1);
    return m.input.indexOf(G, D) !== -1;
  }, u = ke, C = {
    begin: "<>",
    end: "</>"
  }, B = /<[A-Za-z0-9\\._:-]+\s*\/>/, w = {
    begin: /<[A-Za-z0-9\\._:-]+/,
    end: /\/[A-Za-z0-9\\._:-]+>|\/>/,
    /**
     * @param {RegExpMatchArray} match
     * @param {CallbackResponse} response
     */
    isTrulyOpeningTag: (m, D) => {
      const G = m[0].length + m.index, Z = m.input[G];
      if (
        // HTML should not include another raw `<` inside a tag
        // nested type?
        // `<Array<Array<number>>`, etc.
        Z === "<" || // the , gives away that this is not HTML
        // `<T, A extends keyof T, V>`
        Z === ","
      ) {
        D.ignoreMatch();
        return;
      }
      Z === ">" && (p(m, { after: G }) || D.ignoreMatch());
      let ne;
      const ce = m.input.substring(G);
      if (ne = ce.match(/^\s*=/)) {
        D.ignoreMatch();
        return;
      }
      if ((ne = ce.match(/^\s+extends\s+/)) && ne.index === 0) {
        D.ignoreMatch();
        return;
      }
    }
  }, S = {
    $pattern: ke,
    keyword: on,
    literal: cn,
    built_in: fn,
    "variable.language": gn
  }, P = "[0-9](_?[0-9])*", M = `\\.(${P})`, W = "0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*", U = {
    className: "number",
    variants: [
      // DecimalLiteral
      { begin: `(\\b(${W})((${M})|\\.)?|(${M}))[eE][+-]?(${P})\\b` },
      { begin: `\\b(${W})\\b((${M})\\b|\\.)?|(${M})\\b` },
      // DecimalBigIntegerLiteral
      { begin: "\\b(0|[1-9](_?[0-9])*)n\\b" },
      // NonDecimalIntegerLiteral
      { begin: "\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b" },
      { begin: "\\b0[bB][0-1](_?[0-1])*n?\\b" },
      { begin: "\\b0[oO][0-7](_?[0-7])*n?\\b" },
      // LegacyOctalIntegerLiteral (does not include underscore separators)
      // https://tc39.es/ecma262/#sec-additional-syntax-numeric-literals
      { begin: "\\b0[0-7]+n?\\b" }
    ],
    relevance: 0
  }, O = {
    className: "subst",
    begin: "\\$\\{",
    end: "\\}",
    keywords: S,
    contains: []
    // defined later
  }, X = {
    begin: ".?html`",
    end: "",
    starts: {
      end: "`",
      returnEnd: !1,
      contains: [
        r.BACKSLASH_ESCAPE,
        O
      ],
      subLanguage: "xml"
    }
  }, q = {
    begin: ".?css`",
    end: "",
    starts: {
      end: "`",
      returnEnd: !1,
      contains: [
        r.BACKSLASH_ESCAPE,
        O
      ],
      subLanguage: "css"
    }
  }, x = {
    begin: ".?gql`",
    end: "",
    starts: {
      end: "`",
      returnEnd: !1,
      contains: [
        r.BACKSLASH_ESCAPE,
        O
      ],
      subLanguage: "graphql"
    }
  }, J = {
    className: "string",
    begin: "`",
    end: "`",
    contains: [
      r.BACKSLASH_ESCAPE,
      O
    ]
  }, $ = {
    className: "comment",
    variants: [
      r.COMMENT(
        /\/\*\*(?!\/)/,
        "\\*/",
        {
          relevance: 0,
          contains: [
            {
              begin: "(?=@[A-Za-z]+)",
              relevance: 0,
              contains: [
                {
                  className: "doctag",
                  begin: "@[A-Za-z]+"
                },
                {
                  className: "type",
                  begin: "\\{",
                  end: "\\}",
                  excludeEnd: !0,
                  excludeBegin: !0,
                  relevance: 0
                },
                {
                  className: "variable",
                  begin: u + "(?=\\s*(-)|$)",
                  endsParent: !0,
                  relevance: 0
                },
                // eat spaces (not newlines) so we can find
                // types or variables
                {
                  begin: /(?=[^\n])\s/,
                  relevance: 0
                }
              ]
            }
          ]
        }
      ),
      r.C_BLOCK_COMMENT_MODE,
      r.C_LINE_COMMENT_MODE
    ]
  }, V = [
    r.APOS_STRING_MODE,
    r.QUOTE_STRING_MODE,
    X,
    q,
    x,
    J,
    // Skip numbers when they are part of a variable name
    { match: /\$\d+/ },
    U
    // This is intentional:
    // See https://github.com/highlightjs/highlight.js/issues/3288
    // hljs.REGEXP_MODE
  ];
  O.contains = V.concat({
    // we need to pair up {} inside our subst to prevent
    // it from ending too early by matching another }
    begin: /\{/,
    end: /\}/,
    keywords: S,
    contains: [
      "self"
    ].concat(V)
  });
  const ae = [].concat($, O.contains), F = ae.concat([
    // eat recursive parens in sub expressions
    {
      begin: /(\s*)\(/,
      end: /\)/,
      keywords: S,
      contains: ["self"].concat(ae)
    }
  ]), z = {
    className: "params",
    // convert this to negative lookbehind in v12
    begin: /(\s*)\(/,
    // to match the parms with
    end: /\)/,
    excludeBegin: !0,
    excludeEnd: !0,
    keywords: S,
    contains: F
  }, de = {
    variants: [
      // class Car extends vehicle
      {
        match: [
          /class/,
          /\s+/,
          u,
          /\s+/,
          /extends/,
          /\s+/,
          g.concat(u, "(", g.concat(/\./, u), ")*")
        ],
        scope: {
          1: "keyword",
          3: "title.class",
          5: "keyword",
          7: "title.class.inherited"
        }
      },
      // class Car
      {
        match: [
          /class/,
          /\s+/,
          u
        ],
        scope: {
          1: "keyword",
          3: "title.class"
        }
      }
    ]
  }, Q = {
    relevance: 0,
    match: g.either(
      // Hard coded exceptions
      /\bJSON/,
      // Float32Array, OutT
      /\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,
      // CSSFactory, CSSFactoryT
      /\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,
      // FPs, FPsT
      /\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/
      // P
      // single letters are not highlighted
      // BLAH
      // this will be flagged as a UPPER_CASE_CONSTANT instead
    ),
    className: "title.class",
    keywords: {
      _: [
        // se we still get relevance credit for JS library classes
        ...ln,
        ...un
      ]
    }
  }, ge = {
    label: "use_strict",
    className: "meta",
    relevance: 10,
    begin: /^\s*['"]use (strict|asm)['"]/
  }, fe = {
    variants: [
      {
        match: [
          /function/,
          /\s+/,
          u,
          /(?=\s*\()/
        ]
      },
      // anonymous function
      {
        match: [
          /function/,
          /\s*(?=\()/
        ]
      }
    ],
    className: {
      1: "keyword",
      3: "title.function"
    },
    label: "func.def",
    contains: [z],
    illegal: /%/
  }, be = {
    relevance: 0,
    match: /\b[A-Z][A-Z_0-9]+\b/,
    className: "variable.constant"
  };
  function Ee(m) {
    return g.concat("(?!", m.join("|"), ")");
  }
  const me = {
    match: g.concat(
      /\b/,
      Ee([
        ...dn,
        "super",
        "import"
      ].map((m) => `${m}\\s*\\(`)),
      u,
      g.lookahead(/\s*\(/)
    ),
    className: "title.function",
    relevance: 0
  }, ee = {
    begin: g.concat(/\./, g.lookahead(
      g.concat(u, /(?![0-9A-Za-z$_(])/)
    )),
    end: u,
    excludeBegin: !0,
    keywords: "prototype",
    className: "property",
    relevance: 0
  }, _e = {
    match: [
      /get|set/,
      /\s+/,
      u,
      /(?=\()/
    ],
    className: {
      1: "keyword",
      3: "title.function"
    },
    contains: [
      {
        // eat to avoid empty params
        begin: /\(\)/
      },
      z
    ]
  }, oe = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + r.UNDERSCORE_IDENT_RE + ")\\s*=>", ye = {
    match: [
      /const|var|let/,
      /\s+/,
      u,
      /\s*/,
      /=\s*/,
      /(async\s*)?/,
      // async is optional
      g.lookahead(oe)
    ],
    keywords: "async",
    className: {
      1: "keyword",
      3: "title.function"
    },
    contains: [
      z
    ]
  };
  return {
    name: "JavaScript",
    aliases: ["js", "jsx", "mjs", "cjs"],
    keywords: S,
    // this will be extended by TypeScript
    exports: { PARAMS_CONTAINS: F, CLASS_REFERENCE: Q },
    illegal: /#(?![$_A-z])/,
    contains: [
      r.SHEBANG({
        label: "shebang",
        binary: "node",
        relevance: 5
      }),
      ge,
      r.APOS_STRING_MODE,
      r.QUOTE_STRING_MODE,
      X,
      q,
      x,
      J,
      $,
      // Skip numbers when they are part of a variable name
      { match: /\$\d+/ },
      U,
      Q,
      {
        scope: "attr",
        match: u + g.lookahead(":"),
        relevance: 0
      },
      ye,
      {
        // "value" container
        begin: "(" + r.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*",
        keywords: "return throw case",
        relevance: 0,
        contains: [
          $,
          r.REGEXP_MODE,
          {
            className: "function",
            // we have to count the parens to make sure we actually have the
            // correct bounding ( ) before the =>.  There could be any number of
            // sub-expressions inside also surrounded by parens.
            begin: oe,
            returnBegin: !0,
            end: "\\s*=>",
            contains: [
              {
                className: "params",
                variants: [
                  {
                    begin: r.UNDERSCORE_IDENT_RE,
                    relevance: 0
                  },
                  {
                    className: null,
                    begin: /\(\s*\)/,
                    skip: !0
                  },
                  {
                    begin: /(\s*)\(/,
                    end: /\)/,
                    excludeBegin: !0,
                    excludeEnd: !0,
                    keywords: S,
                    contains: F
                  }
                ]
              }
            ]
          },
          {
            // could be a comma delimited list of params to a function call
            begin: /,/,
            relevance: 0
          },
          {
            match: /\s+/,
            relevance: 0
          },
          {
            // JSX
            variants: [
              { begin: C.begin, end: C.end },
              { match: B },
              {
                begin: w.begin,
                // we carefully check the opening tag to see if it truly
                // is a tag and not a false positive
                "on:begin": w.isTrulyOpeningTag,
                end: w.end
              }
            ],
            subLanguage: "xml",
            contains: [
              {
                begin: w.begin,
                end: w.end,
                skip: !0,
                contains: ["self"]
              }
            ]
          }
        ]
      },
      fe,
      {
        // prevent this from getting swallowed up by function
        // since they appear "function like"
        beginKeywords: "while if switch catch for"
      },
      {
        // we have to count the parens to make sure we actually have the correct
        // bounding ( ).  There could be any number of sub-expressions inside
        // also surrounded by parens.
        begin: "\\b(?!function)" + r.UNDERSCORE_IDENT_RE + "\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",
        // end parens
        returnBegin: !0,
        label: "func.def",
        contains: [
          z,
          r.inherit(r.TITLE_MODE, { begin: u, className: "title.function" })
        ]
      },
      // catch ... so it won't trigger the property rule below
      {
        match: /\.\.\./,
        relevance: 0
      },
      ee,
      // hack: prevents detection of keywords in some circumstances
      // .keyword()
      // $keyword = x
      {
        match: "\\$" + u,
        relevance: 0
      },
      {
        match: [/\bconstructor(?=\s*\()/],
        className: { 1: "title.function" },
        contains: [z]
      },
      me,
      be,
      de,
      _e,
      {
        match: /\$[(.]/
        // relevance booster for a pattern common to JS libs: `$(something)` and `$.something`
      }
    ]
  };
}
function gt(r) {
  const g = r.regex, p = dt(r), u = ke, C = [
    "any",
    "void",
    "number",
    "boolean",
    "string",
    "object",
    "never",
    "symbol",
    "bigint",
    "unknown"
  ], B = {
    begin: [
      /namespace/,
      /\s+/,
      r.IDENT_RE
    ],
    beginScope: {
      1: "keyword",
      3: "title.class"
    }
  }, w = {
    beginKeywords: "interface",
    end: /\{/,
    excludeEnd: !0,
    keywords: {
      keyword: "interface extends",
      built_in: C
    },
    contains: [p.exports.CLASS_REFERENCE]
  }, S = {
    className: "meta",
    relevance: 10,
    begin: /^\s*['"]use strict['"]/
  }, P = [
    "type",
    // "namespace",
    "interface",
    "public",
    "private",
    "protected",
    "implements",
    "declare",
    "abstract",
    "readonly",
    "enum",
    "override",
    "satisfies"
  ], M = {
    $pattern: ke,
    keyword: on.concat(P),
    literal: cn,
    built_in: fn.concat(C),
    "variable.language": gn
  }, W = {
    className: "meta",
    begin: "@" + u
  }, U = (x, J, se) => {
    const $ = x.contains.findIndex((V) => V.label === J);
    if ($ === -1)
      throw new Error("can not find mode to replace");
    x.contains.splice($, 1, se);
  };
  Object.assign(p.keywords, M), p.exports.PARAMS_CONTAINS.push(W);
  const O = p.contains.find((x) => x.scope === "attr"), X = Object.assign(
    {},
    O,
    { match: g.concat(u, g.lookahead(/\s*\?:/)) }
  );
  p.exports.PARAMS_CONTAINS.push([
    p.exports.CLASS_REFERENCE,
    // class reference for highlighting the params types
    O,
    // highlight the params key
    X
    // Added for optional property assignment highlighting
  ]), p.contains = p.contains.concat([
    W,
    B,
    w,
    X
    // Added for optional property assignment highlighting
  ]), U(p, "shebang", r.SHEBANG()), U(p, "use_strict", S);
  const q = p.contains.find((x) => x.label === "func.def");
  return q.relevance = 0, Object.assign(p, {
    name: "TypeScript",
    aliases: [
      "ts",
      "tsx",
      "mts",
      "cts"
    ]
  }), p;
}
function ft(r) {
  const g = r.regex, p = g.concat(/[\p{L}_]/u, g.optional(/[\p{L}0-9_.-]*:/u), /[\p{L}0-9_.-]*/u), u = /[\p{L}0-9._:-]+/u, C = {
    className: "symbol",
    begin: /&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/
  }, B = {
    begin: /\s/,
    contains: [
      {
        className: "keyword",
        begin: /#?[a-z_][a-z1-9_-]+/,
        illegal: /\n/
      }
    ]
  }, w = r.inherit(B, {
    begin: /\(/,
    end: /\)/
  }), S = r.inherit(r.APOS_STRING_MODE, { className: "string" }), P = r.inherit(r.QUOTE_STRING_MODE, { className: "string" }), M = {
    endsWithParent: !0,
    illegal: /</,
    relevance: 0,
    contains: [
      {
        className: "attr",
        begin: u,
        relevance: 0
      },
      {
        begin: /=\s*/,
        relevance: 0,
        contains: [
          {
            className: "string",
            endsParent: !0,
            variants: [
              {
                begin: /"/,
                end: /"/,
                contains: [C]
              },
              {
                begin: /'/,
                end: /'/,
                contains: [C]
              },
              { begin: /[^\s"'=<>`]+/ }
            ]
          }
        ]
      }
    ]
  };
  return {
    name: "HTML, XML",
    aliases: [
      "html",
      "xhtml",
      "rss",
      "atom",
      "xjb",
      "xsd",
      "xsl",
      "plist",
      "wsf",
      "svg"
    ],
    case_insensitive: !0,
    unicodeRegex: !0,
    contains: [
      {
        className: "meta",
        begin: /<![a-z]/,
        end: />/,
        relevance: 10,
        contains: [
          B,
          P,
          S,
          w,
          {
            begin: /\[/,
            end: /\]/,
            contains: [
              {
                className: "meta",
                begin: /<![a-z]/,
                end: />/,
                contains: [
                  B,
                  w,
                  P,
                  S
                ]
              }
            ]
          }
        ]
      },
      r.COMMENT(
        /<!--/,
        /-->/,
        { relevance: 10 }
      ),
      {
        begin: /<!\[CDATA\[/,
        end: /\]\]>/,
        relevance: 10
      },
      C,
      // xml processing instructions
      {
        className: "meta",
        end: /\?>/,
        variants: [
          {
            begin: /<\?xml/,
            relevance: 10,
            contains: [
              P
            ]
          },
          {
            begin: /<\?[a-z][a-z0-9]+/
          }
        ]
      },
      {
        className: "tag",
        /*
        The lookahead pattern (?=...) ensures that 'begin' only matches
        '<style' as a single word, followed by a whitespace or an
        ending bracket.
        */
        begin: /<style(?=\s|>)/,
        end: />/,
        keywords: { name: "style" },
        contains: [M],
        starts: {
          end: /<\/style>/,
          returnEnd: !0,
          subLanguage: [
            "css",
            "xml"
          ]
        }
      },
      {
        className: "tag",
        // See the comment in the <style tag about the lookahead pattern
        begin: /<script(?=\s|>)/,
        end: />/,
        keywords: { name: "script" },
        contains: [M],
        starts: {
          end: /<\/script>/,
          returnEnd: !0,
          subLanguage: [
            "javascript",
            "handlebars",
            "xml"
          ]
        }
      },
      // we need this for now for jSX
      {
        className: "tag",
        begin: /<>|<\/>/
      },
      // open tag
      {
        className: "tag",
        begin: g.concat(
          /</,
          g.lookahead(g.concat(
            p,
            // <tag/>
            // <tag>
            // <tag ...
            g.either(/\/>/, />/, /\s/)
          ))
        ),
        end: /\/?>/,
        contains: [
          {
            className: "name",
            begin: p,
            relevance: 0,
            starts: M
          }
        ]
      },
      // close tag
      {
        className: "tag",
        begin: g.concat(
          /<\//,
          g.lookahead(g.concat(
            p,
            />/
          ))
        ),
        contains: [
          {
            className: "name",
            begin: p,
            relevance: 0
          },
          {
            begin: />/,
            relevance: 0,
            endsParent: !0
          }
        ]
      }
    ]
  };
}
const bt = (r) => ({
  IMPORTANT: {
    scope: "meta",
    begin: "!important"
  },
  BLOCK_COMMENT: r.C_BLOCK_COMMENT_MODE,
  HEXCOLOR: {
    scope: "number",
    begin: /#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/
  },
  FUNCTION_DISPATCH: {
    className: "built_in",
    begin: /[\w-]+(?=\()/
  },
  ATTRIBUTE_SELECTOR_MODE: {
    scope: "selector-attr",
    begin: /\[/,
    end: /\]/,
    illegal: "$",
    contains: [
      r.APOS_STRING_MODE,
      r.QUOTE_STRING_MODE
    ]
  },
  CSS_NUMBER_MODE: {
    scope: "number",
    begin: r.NUMBER_RE + "(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",
    relevance: 0
  },
  CSS_VARIABLE: {
    className: "attr",
    begin: /--[A-Za-z_][A-Za-z0-9_-]*/
  }
}), pt = [
  "a",
  "abbr",
  "address",
  "article",
  "aside",
  "audio",
  "b",
  "blockquote",
  "body",
  "button",
  "canvas",
  "caption",
  "cite",
  "code",
  "dd",
  "del",
  "details",
  "dfn",
  "div",
  "dl",
  "dt",
  "em",
  "fieldset",
  "figcaption",
  "figure",
  "footer",
  "form",
  "h1",
  "h2",
  "h3",
  "h4",
  "h5",
  "h6",
  "header",
  "hgroup",
  "html",
  "i",
  "iframe",
  "img",
  "input",
  "ins",
  "kbd",
  "label",
  "legend",
  "li",
  "main",
  "mark",
  "menu",
  "nav",
  "object",
  "ol",
  "optgroup",
  "option",
  "p",
  "picture",
  "q",
  "quote",
  "samp",
  "section",
  "select",
  "source",
  "span",
  "strong",
  "summary",
  "sup",
  "table",
  "tbody",
  "td",
  "textarea",
  "tfoot",
  "th",
  "thead",
  "time",
  "tr",
  "ul",
  "var",
  "video"
], ht = [
  "defs",
  "g",
  "marker",
  "mask",
  "pattern",
  "svg",
  "switch",
  "symbol",
  "feBlend",
  "feColorMatrix",
  "feComponentTransfer",
  "feComposite",
  "feConvolveMatrix",
  "feDiffuseLighting",
  "feDisplacementMap",
  "feFlood",
  "feGaussianBlur",
  "feImage",
  "feMerge",
  "feMorphology",
  "feOffset",
  "feSpecularLighting",
  "feTile",
  "feTurbulence",
  "linearGradient",
  "radialGradient",
  "stop",
  "circle",
  "ellipse",
  "image",
  "line",
  "path",
  "polygon",
  "polyline",
  "rect",
  "text",
  "use",
  "textPath",
  "tspan",
  "foreignObject",
  "clipPath"
], Et = [
  ...pt,
  ...ht
], mt = [
  "any-hover",
  "any-pointer",
  "aspect-ratio",
  "color",
  "color-gamut",
  "color-index",
  "device-aspect-ratio",
  "device-height",
  "device-width",
  "display-mode",
  "forced-colors",
  "grid",
  "height",
  "hover",
  "inverted-colors",
  "monochrome",
  "orientation",
  "overflow-block",
  "overflow-inline",
  "pointer",
  "prefers-color-scheme",
  "prefers-contrast",
  "prefers-reduced-motion",
  "prefers-reduced-transparency",
  "resolution",
  "scan",
  "scripting",
  "update",
  "width",
  // TODO: find a better solution?
  "min-width",
  "max-width",
  "min-height",
  "max-height"
].sort().reverse(), _t = [
  "active",
  "any-link",
  "blank",
  "checked",
  "current",
  "default",
  "defined",
  "dir",
  // dir()
  "disabled",
  "drop",
  "empty",
  "enabled",
  "first",
  "first-child",
  "first-of-type",
  "fullscreen",
  "future",
  "focus",
  "focus-visible",
  "focus-within",
  "has",
  // has()
  "host",
  // host or host()
  "host-context",
  // host-context()
  "hover",
  "indeterminate",
  "in-range",
  "invalid",
  "is",
  // is()
  "lang",
  // lang()
  "last-child",
  "last-of-type",
  "left",
  "link",
  "local-link",
  "not",
  // not()
  "nth-child",
  // nth-child()
  "nth-col",
  // nth-col()
  "nth-last-child",
  // nth-last-child()
  "nth-last-col",
  // nth-last-col()
  "nth-last-of-type",
  //nth-last-of-type()
  "nth-of-type",
  //nth-of-type()
  "only-child",
  "only-of-type",
  "optional",
  "out-of-range",
  "past",
  "placeholder-shown",
  "read-only",
  "read-write",
  "required",
  "right",
  "root",
  "scope",
  "target",
  "target-within",
  "user-invalid",
  "valid",
  "visited",
  "where"
  // where()
].sort().reverse(), yt = [
  "after",
  "backdrop",
  "before",
  "cue",
  "cue-region",
  "first-letter",
  "first-line",
  "grammar-error",
  "marker",
  "part",
  "placeholder",
  "selection",
  "slotted",
  "spelling-error"
].sort().reverse(), Nt = [
  "accent-color",
  "align-content",
  "align-items",
  "align-self",
  "alignment-baseline",
  "all",
  "anchor-name",
  "animation",
  "animation-composition",
  "animation-delay",
  "animation-direction",
  "animation-duration",
  "animation-fill-mode",
  "animation-iteration-count",
  "animation-name",
  "animation-play-state",
  "animation-range",
  "animation-range-end",
  "animation-range-start",
  "animation-timeline",
  "animation-timing-function",
  "appearance",
  "aspect-ratio",
  "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",
  "block-size",
  "border",
  "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-bottom",
  "border-bottom-color",
  "border-bottom-left-radius",
  "border-bottom-right-radius",
  "border-bottom-style",
  "border-bottom-width",
  "border-collapse",
  "border-color",
  "border-end-end-radius",
  "border-end-start-radius",
  "border-image",
  "border-image-outset",
  "border-image-repeat",
  "border-image-slice",
  "border-image-source",
  "border-image-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",
  "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-start-end-radius",
  "border-start-start-radius",
  "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-align",
  "box-decoration-break",
  "box-direction",
  "box-flex",
  "box-flex-group",
  "box-lines",
  "box-ordinal-group",
  "box-orient",
  "box-pack",
  "box-shadow",
  "box-sizing",
  "break-after",
  "break-before",
  "break-inside",
  "caption-side",
  "caret-color",
  "clear",
  "clip",
  "clip-path",
  "clip-rule",
  "color",
  "color-interpolation",
  "color-interpolation-filters",
  "color-profile",
  "color-rendering",
  "color-scheme",
  "column-count",
  "column-fill",
  "column-gap",
  "column-rule",
  "column-rule-color",
  "column-rule-style",
  "column-rule-width",
  "column-span",
  "column-width",
  "columns",
  "contain",
  "contain-intrinsic-block-size",
  "contain-intrinsic-height",
  "contain-intrinsic-inline-size",
  "contain-intrinsic-size",
  "contain-intrinsic-width",
  "container",
  "container-name",
  "container-type",
  "content",
  "content-visibility",
  "counter-increment",
  "counter-reset",
  "counter-set",
  "cue",
  "cue-after",
  "cue-before",
  "cursor",
  "cx",
  "cy",
  "direction",
  "display",
  "dominant-baseline",
  "empty-cells",
  "enable-background",
  "field-sizing",
  "fill",
  "fill-opacity",
  "fill-rule",
  "filter",
  "flex",
  "flex-basis",
  "flex-direction",
  "flex-flow",
  "flex-grow",
  "flex-shrink",
  "flex-wrap",
  "float",
  "flood-color",
  "flood-opacity",
  "flow",
  "font",
  "font-display",
  "font-family",
  "font-feature-settings",
  "font-kerning",
  "font-language-override",
  "font-optical-sizing",
  "font-palette",
  "font-size",
  "font-size-adjust",
  "font-smooth",
  "font-smoothing",
  "font-stretch",
  "font-style",
  "font-synthesis",
  "font-synthesis-position",
  "font-synthesis-small-caps",
  "font-synthesis-style",
  "font-synthesis-weight",
  "font-variant",
  "font-variant-alternates",
  "font-variant-caps",
  "font-variant-east-asian",
  "font-variant-emoji",
  "font-variant-ligatures",
  "font-variant-numeric",
  "font-variant-position",
  "font-variation-settings",
  "font-weight",
  "forced-color-adjust",
  "gap",
  "glyph-orientation-horizontal",
  "glyph-orientation-vertical",
  "grid",
  "grid-area",
  "grid-auto-columns",
  "grid-auto-flow",
  "grid-auto-rows",
  "grid-column",
  "grid-column-end",
  "grid-column-start",
  "grid-gap",
  "grid-row",
  "grid-row-end",
  "grid-row-start",
  "grid-template",
  "grid-template-areas",
  "grid-template-columns",
  "grid-template-rows",
  "hanging-punctuation",
  "height",
  "hyphenate-character",
  "hyphenate-limit-chars",
  "hyphens",
  "icon",
  "image-orientation",
  "image-rendering",
  "image-resolution",
  "ime-mode",
  "initial-letter",
  "initial-letter-align",
  "inline-size",
  "inset",
  "inset-area",
  "inset-block",
  "inset-block-end",
  "inset-block-start",
  "inset-inline",
  "inset-inline-end",
  "inset-inline-start",
  "isolation",
  "justify-content",
  "justify-items",
  "justify-self",
  "kerning",
  "left",
  "letter-spacing",
  "lighting-color",
  "line-break",
  "line-height",
  "line-height-step",
  "list-style",
  "list-style-image",
  "list-style-position",
  "list-style-type",
  "margin",
  "margin-block",
  "margin-block-end",
  "margin-block-start",
  "margin-bottom",
  "margin-inline",
  "margin-inline-end",
  "margin-inline-start",
  "margin-left",
  "margin-right",
  "margin-top",
  "margin-trim",
  "marker",
  "marker-end",
  "marker-mid",
  "marker-start",
  "marks",
  "mask",
  "mask-border",
  "mask-border-mode",
  "mask-border-outset",
  "mask-border-repeat",
  "mask-border-slice",
  "mask-border-source",
  "mask-border-width",
  "mask-clip",
  "mask-composite",
  "mask-image",
  "mask-mode",
  "mask-origin",
  "mask-position",
  "mask-repeat",
  "mask-size",
  "mask-type",
  "masonry-auto-flow",
  "math-depth",
  "math-shift",
  "math-style",
  "max-block-size",
  "max-height",
  "max-inline-size",
  "max-width",
  "min-block-size",
  "min-height",
  "min-inline-size",
  "min-width",
  "mix-blend-mode",
  "nav-down",
  "nav-index",
  "nav-left",
  "nav-right",
  "nav-up",
  "none",
  "normal",
  "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-anchor",
  "overflow-block",
  "overflow-clip-margin",
  "overflow-inline",
  "overflow-wrap",
  "overflow-x",
  "overflow-y",
  "overlay",
  "overscroll-behavior",
  "overscroll-behavior-block",
  "overscroll-behavior-inline",
  "overscroll-behavior-x",
  "overscroll-behavior-y",
  "padding",
  "padding-block",
  "padding-block-end",
  "padding-block-start",
  "padding-bottom",
  "padding-inline",
  "padding-inline-end",
  "padding-inline-start",
  "padding-left",
  "padding-right",
  "padding-top",
  "page",
  "page-break-after",
  "page-break-before",
  "page-break-inside",
  "paint-order",
  "pause",
  "pause-after",
  "pause-before",
  "perspective",
  "perspective-origin",
  "place-content",
  "place-items",
  "place-self",
  "pointer-events",
  "position",
  "position-anchor",
  "position-visibility",
  "print-color-adjust",
  "quotes",
  "r",
  "resize",
  "rest",
  "rest-after",
  "rest-before",
  "right",
  "rotate",
  "row-gap",
  "ruby-align",
  "ruby-position",
  "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-stop",
  "scroll-snap-type",
  "scroll-timeline",
  "scroll-timeline-axis",
  "scroll-timeline-name",
  "scrollbar-color",
  "scrollbar-gutter",
  "scrollbar-width",
  "shape-image-threshold",
  "shape-margin",
  "shape-outside",
  "shape-rendering",
  "speak",
  "speak-as",
  "src",
  // @font-face
  "stop-color",
  "stop-opacity",
  "stroke",
  "stroke-dasharray",
  "stroke-dashoffset",
  "stroke-linecap",
  "stroke-linejoin",
  "stroke-miterlimit",
  "stroke-opacity",
  "stroke-width",
  "tab-size",
  "table-layout",
  "text-align",
  "text-align-all",
  "text-align-last",
  "text-anchor",
  "text-combine-upright",
  "text-decoration",
  "text-decoration-color",
  "text-decoration-line",
  "text-decoration-skip",
  "text-decoration-skip-ink",
  "text-decoration-style",
  "text-decoration-thickness",
  "text-emphasis",
  "text-emphasis-color",
  "text-emphasis-position",
  "text-emphasis-style",
  "text-indent",
  "text-justify",
  "text-orientation",
  "text-overflow",
  "text-rendering",
  "text-shadow",
  "text-size-adjust",
  "text-transform",
  "text-underline-offset",
  "text-underline-position",
  "text-wrap",
  "text-wrap-mode",
  "text-wrap-style",
  "timeline-scope",
  "top",
  "touch-action",
  "transform",
  "transform-box",
  "transform-origin",
  "transform-style",
  "transition",
  "transition-behavior",
  "transition-delay",
  "transition-duration",
  "transition-property",
  "transition-timing-function",
  "translate",
  "unicode-bidi",
  "user-modify",
  "user-select",
  "vector-effect",
  "vertical-align",
  "view-timeline",
  "view-timeline-axis",
  "view-timeline-inset",
  "view-timeline-name",
  "view-transition-name",
  "visibility",
  "voice-balance",
  "voice-duration",
  "voice-family",
  "voice-pitch",
  "voice-range",
  "voice-rate",
  "voice-stress",
  "voice-volume",
  "white-space",
  "white-space-collapse",
  "widows",
  "width",
  "will-change",
  "word-break",
  "word-spacing",
  "word-wrap",
  "writing-mode",
  "x",
  "y",
  "z-index",
  "zoom"
].sort().reverse();
function St(r) {
  const g = r.regex, p = bt(r), u = { begin: /-(webkit|moz|ms|o)-(?=[a-z])/ }, C = "and or not only", B = /@-?\w[\w]*(-\w+)*/, w = "[a-zA-Z-][a-zA-Z0-9_-]*", S = [
    r.APOS_STRING_MODE,
    r.QUOTE_STRING_MODE
  ];
  return {
    name: "CSS",
    case_insensitive: !0,
    illegal: /[=|'\$]/,
    keywords: { keyframePosition: "from to" },
    classNameAliases: {
      // for visual continuity with `tag {}` and because we
      // don't have a great class for this?
      keyframePosition: "selector-tag"
    },
    contains: [
      p.BLOCK_COMMENT,
      u,
      // to recognize keyframe 40% etc which are outside the scope of our
      // attribute value mode
      p.CSS_NUMBER_MODE,
      {
        className: "selector-id",
        begin: /#[A-Za-z0-9_-]+/,
        relevance: 0
      },
      {
        className: "selector-class",
        begin: "\\." + w,
        relevance: 0
      },
      p.ATTRIBUTE_SELECTOR_MODE,
      {
        className: "selector-pseudo",
        variants: [
          { begin: ":(" + _t.join("|") + ")" },
          { begin: ":(:)?(" + yt.join("|") + ")" }
        ]
      },
      // we may actually need this (12/2020)
      // { // pseudo-selector params
      //   begin: /\(/,
      //   end: /\)/,
      //   contains: [ hljs.CSS_NUMBER_MODE ]
      // },
      p.CSS_VARIABLE,
      {
        className: "attribute",
        begin: "\\b(" + Nt.join("|") + ")\\b"
      },
      // attribute values
      {
        begin: /:/,
        end: /[;}{]/,
        contains: [
          p.BLOCK_COMMENT,
          p.HEXCOLOR,
          p.IMPORTANT,
          p.CSS_NUMBER_MODE,
          ...S,
          // needed to highlight these as strings and to avoid issues with
          // illegal characters that might be inside urls that would tigger the
          // languages illegal stack
          {
            begin: /(url|data-uri)\(/,
            end: /\)/,
            relevance: 0,
            // from keywords
            keywords: { built_in: "url data-uri" },
            contains: [
              ...S,
              {
                className: "string",
                // any character other than `)` as in `url()` will be the start
                // of a string, which ends with `)` (from the parent mode)
                begin: /[^)]/,
                endsWithParent: !0,
                excludeEnd: !0
              }
            ]
          },
          p.FUNCTION_DISPATCH
        ]
      },
      {
        begin: g.lookahead(/@/),
        end: "[{;]",
        relevance: 0,
        illegal: /:/,
        // break on Less variables @var: ...
        contains: [
          {
            className: "keyword",
            begin: B
          },
          {
            begin: /\s/,
            endsWithParent: !0,
            excludeEnd: !0,
            relevance: 0,
            keywords: {
              $pattern: /[a-z-]+/,
              keyword: C,
              attribute: mt.join(" ")
            },
            contains: [
              {
                begin: /[a-z-]+(?=:)/,
                className: "attribute"
              },
              ...S,
              p.CSS_NUMBER_MODE
            ]
          }
        ]
      },
      {
        className: "selector-tag",
        begin: "\\b(" + Et.join("|") + ")\\b"
      }
    ]
  };
}
Se.registerLanguage("javascript", ut);
Se.registerLanguage("typescript", gt);
Se.registerLanguage("xml", ft);
Se.registerLanguage("css", St);
const At = {
  bind: (r, g) => {
    const p = r.querySelectorAll("code");
    p.length > 0 && p.forEach((u) => {
      typeof g.value == "string" && (u.textContent = g.value), Se.highlightElement(u);
    });
  }
}, wt = "clHighlight", xt = () => ({
  deep: !0,
  beforeMount: At.bind
});
export {
  xt as directive,
  wt as name
};
//# sourceMappingURL=Highlight.js.map
