import {
  a as c,
  c as b
} from "./chunk-IO47FP3U.js";

// ../node_modules/highlight.js/lib/languages/java.js
var d = b((l, _) => {
  var n = "[0-9](_*[0-9])*", i = `\\.(${n})`, t = "[0-9a-fA-F](_*[0-9a-fA-F])*", N = {
    className: "number",
    variants: [
      // DecimalFloatingPointLiteral
      // including ExponentPart
      { begin: `(\\b(${n})((${i})|\\.)?|(${i}))[eE][+-]?(${n})[fFdD]?\\b` },
      // excluding ExponentPart
      { begin: `\\b(${n})((${i})[fFdD]?\\b|\\.([fFdD]\\b)?)` },
      { begin: `(${i})[fFdD]?\\b` },
      { begin: `\\b(${n})[fFdD]\\b` },
      // HexadecimalFloatingPointLiteral
      { begin: `\\b0[xX]((${t})\\.?|(${t})?\\.(${t}))[pP][+-]?(${n})[fFdD]?\\b` },
      // DecimalIntegerLiteral
      { begin: "\\b(0|[1-9](_*[0-9])*)[lL]?\\b" },
      // HexIntegerLiteral
      { begin: `\\b0[xX](${t})[lL]?\\b` },
      // OctalIntegerLiteral
      { begin: "\\b0(_*[0-7])*[lL]?\\b" },
      // BinaryIntegerLiteral
      { begin: "\\b0[bB][01](_*[01])*[lL]?\\b" }
    ],
    relevance: 0
  };
  function O(e) {
    var r = "[\xC0-\u02B8a-zA-Z_$][\xC0-\u02B8a-zA-Z_$0-9]*", o = r + "(<" + r + "(\\s*,\\s*" + r + ")*>)?", a = "false synchronized int abstract float private char boolean var static null if const for true while long strictfp finally protected import native final void enum else break transient catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private module requires exports do", s = {
      className: "meta",
      begin: "@" + r,
      contains: [
        {
          begin: /\(/,
          end: /\)/,
          contains: ["self"]
          // allow nested () inside our annotation
        }
      ]
    };
    let E = N;
    return {
      name: "Java",
      aliases: ["jsp"],
      keywords: a,
      illegal: /<\/|#/,
      contains: [
        e.COMMENT(
          "/\\*\\*",
          "\\*/",
          {
            relevance: 0,
            contains: [
              {
                // eat up @'s in emails to prevent them to be recognized as doctags
                begin: /\w+@/,
                relevance: 0
              },
              {
                className: "doctag",
                begin: "@[A-Za-z]+"
              }
            ]
          }
        ),
        // relevance boost
        {
          begin: /import java\.[a-z]+\./,
          keywords: "import",
          relevance: 2
        },
        e.C_LINE_COMMENT_MODE,
        e.C_BLOCK_COMMENT_MODE,
        e.APOS_STRING_MODE,
        e.QUOTE_STRING_MODE,
        {
          className: "class",
          beginKeywords: "class interface enum",
          end: /[{;=]/,
          excludeEnd: !0,
          // TODO: can this be removed somehow?
          // an extra boost because Java is more popular than other languages with
          // this same syntax feature (this is just to preserve our tests passing
          // for now)
          relevance: 1,
          keywords: "class interface enum",
          illegal: /[:"\[\]]/,
          contains: [
            { beginKeywords: "extends implements" },
            e.UNDERSCORE_TITLE_MODE
          ]
        },
        {
          // Expression keywords prevent 'keyword Name(...)' from being
          // recognized as a function definition
          beginKeywords: "new throw return else",
          relevance: 0
        },
        {
          className: "class",
          begin: "record\\s+" + e.UNDERSCORE_IDENT_RE + "\\s*\\(",
          returnBegin: !0,
          excludeEnd: !0,
          end: /[{;=]/,
          keywords: a,
          contains: [
            { beginKeywords: "record" },
            {
              begin: e.UNDERSCORE_IDENT_RE + "\\s*\\(",
              returnBegin: !0,
              relevance: 0,
              contains: [e.UNDERSCORE_TITLE_MODE]
            },
            {
              className: "params",
              begin: /\(/,
              end: /\)/,
              keywords: a,
              relevance: 0,
              contains: [
                e.C_BLOCK_COMMENT_MODE
              ]
            },
            e.C_LINE_COMMENT_MODE,
            e.C_BLOCK_COMMENT_MODE
          ]
        },
        {
          className: "function",
          begin: "(" + o + "\\s+)+" + e.UNDERSCORE_IDENT_RE + "\\s*\\(",
          returnBegin: !0,
          end: /[{;=]/,
          excludeEnd: !0,
          keywords: a,
          contains: [
            {
              begin: e.UNDERSCORE_IDENT_RE + "\\s*\\(",
              returnBegin: !0,
              relevance: 0,
              contains: [e.UNDERSCORE_TITLE_MODE]
            },
            {
              className: "params",
              begin: /\(/,
              end: /\)/,
              keywords: a,
              relevance: 0,
              contains: [
                s,
                e.APOS_STRING_MODE,
                e.QUOTE_STRING_MODE,
                E,
                e.C_BLOCK_COMMENT_MODE
              ]
            },
            e.C_LINE_COMMENT_MODE,
            e.C_BLOCK_COMMENT_MODE
          ]
        },
        E,
        s
      ]
    };
  }
  c(O, "java");
  _.exports = O;
});

export {
  d as a
};
