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

// ../node_modules/highlight.js/lib/languages/elm.js
var g = r((d, s) => {
  function l(e) {
    let n = {
      variants: [
        e.COMMENT("--", "$"),
        e.COMMENT(
          /\{-/,
          /-\}/,
          {
            contains: ["self"]
          }
        )
      ]
    }, o = {
      className: "type",
      begin: "\\b[A-Z][\\w']*",
      // TODO: other constructors (built-in, infix).
      relevance: 0
    }, i = {
      begin: "\\(",
      end: "\\)",
      illegal: '"',
      contains: [
        {
          className: "type",
          begin: "\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?"
        },
        n
      ]
    }, a = {
      begin: /\{/,
      end: /\}/,
      contains: i.contains
    }, c = {
      className: "string",
      begin: "'\\\\?.",
      end: "'",
      illegal: "."
    };
    return {
      name: "Elm",
      keywords: "let in if then else case of where module import exposing type alias as infix infixl infixr port effect command subscription",
      contains: [
        // Top-level constructions.
        {
          beginKeywords: "port effect module",
          end: "exposing",
          keywords: "port effect module where command subscription exposing",
          contains: [
            i,
            n
          ],
          illegal: "\\W\\.|;"
        },
        {
          begin: "import",
          end: "$",
          keywords: "import as exposing",
          contains: [
            i,
            n
          ],
          illegal: "\\W\\.|;"
        },
        {
          begin: "type",
          end: "$",
          keywords: "type alias",
          contains: [
            o,
            i,
            a,
            n
          ]
        },
        {
          beginKeywords: "infix infixl infixr",
          end: "$",
          contains: [
            e.C_NUMBER_MODE,
            n
          ]
        },
        {
          begin: "port",
          end: "$",
          keywords: "port",
          contains: [n]
        },
        // Literals and names.
        c,
        e.QUOTE_STRING_MODE,
        e.C_NUMBER_MODE,
        o,
        e.inherit(e.TITLE_MODE, {
          begin: "^[_a-z][\\w']*"
        }),
        n,
        {
          begin: "->|<-"
        }
        // No markup, relevance booster
      ],
      illegal: /;/
    };
  }
  t(l, "elm");
  s.exports = l;
});

export {
  g as a
};
