var y, A;
function z() {
  if (A)
    return y;
  A = 1, y = u, u.displayName = "graphql", u.aliases = [];
  function u(s) {
    s.languages.graphql = {
      comment: /#.*/,
      description: {
        pattern: /(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,
        greedy: !0,
        alias: "string",
        inside: {
          "language-markdown": {
            pattern: /(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,
            lookbehind: !0,
            inside: s.languages.markdown
          }
        }
      },
      string: {
        pattern: /"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,
        greedy: !0
      },
      number: /(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,
      boolean: /\b(?:false|true)\b/,
      variable: /\$[a-z_]\w*/i,
      directive: {
        pattern: /@[a-z_]\w*/i,
        alias: "function"
      },
      "attr-name": {
        pattern: /\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,
        greedy: !0
      },
      "atom-input": {
        pattern: /\b[A-Z]\w*Input\b/,
        alias: "class-name"
      },
      scalar: /\b(?:Boolean|Float|ID|Int|String)\b/,
      constant: /\b[A-Z][A-Z_\d]*\b/,
      "class-name": {
        pattern: /(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,
        lookbehind: !0
      },
      fragment: {
        pattern: /(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,
        lookbehind: !0,
        alias: "function"
      },
      "definition-mutation": {
        pattern: /(\bmutation\s+)[a-zA-Z_]\w*/,
        lookbehind: !0,
        alias: "function"
      },
      "definition-query": {
        pattern: /(\bquery\s+)[a-zA-Z_]\w*/,
        lookbehind: !0,
        alias: "function"
      },
      keyword: /\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,
      operator: /[!=|&]|\.{3}/,
      "property-query": /\w+(?=\s*\()/,
      object: /\w+(?=\s*\{)/,
      punctuation: /[!(){}\[\]:=,]/,
      property: /\w+/
    }, s.hooks.add("after-tokenize", function(m) {
      if (m.language !== "graphql")
        return;
      var i = m.tokens.filter(function(t) {
        return typeof t != "string" && t.type !== "comment" && t.type !== "scalar";
      }), a = 0;
      function o(t) {
        return i[a + t];
      }
      function h(t, r) {
        r = r || 0;
        for (var e = 0; e < t.length; e++) {
          var n = o(e + r);
          if (!n || n.type !== t[e])
            return !1;
        }
        return !0;
      }
      function v(t, r) {
        for (var e = 1, n = a; n < i.length; n++) {
          var _ = i[n], d = _.content;
          if (_.type === "punctuation" && typeof d == "string") {
            if (t.test(d))
              e++;
            else if (r.test(d) && (e--, e === 0))
              return n;
          }
        }
        return -1;
      }
      function l(t, r) {
        var e = t.alias;
        e ? Array.isArray(e) || (t.alias = e = [e]) : t.alias = e = [], e.push(r);
      }
      for (; a < i.length; ) {
        var q = i[a++];
        if (q.type === "keyword" && q.content === "mutation") {
          var p = [];
          if (h(["definition-mutation", "punctuation"]) && o(1).content === "(") {
            a += 2;
            var f = v(/^\($/, /^\)$/);
            if (f === -1)
              continue;
            for (; a < f; a++) {
              var c = o(0);
              c.type === "variable" && (l(c, "variable-input"), p.push(c.content));
            }
            a = f + 1;
          }
          if (h(["punctuation", "property-query"]) && o(0).content === "{" && (a++, l(o(0), "property-mutation"), p.length > 0)) {
            var w = v(/^\{$/, /^\}$/);
            if (w === -1)
              continue;
            for (var b = a; b < w; b++) {
              var g = i[b];
              g.type === "variable" && p.indexOf(g.content) >= 0 && l(g, "variable-input");
            }
          }
        }
      }
    });
  }
  return y;
}
export {
  z as __require
};
