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

// ../node_modules/highlight.js/lib/languages/yaml.js
var S = _((o, E) => {
  function T(e) {
    var n = "true false yes no null", a = "[\\w#;/?:@&=+$,.~*'()[\\]]+", b = {
      className: "attr",
      variants: [
        { begin: "\\w[\\w :\\/.-]*:(?=[ 	]|$)" },
        { begin: '"\\w[\\w :\\/.-]*":(?=[ 	]|$)' },
        // double quoted keys
        { begin: "'\\w[\\w :\\/.-]*':(?=[ 	]|$)" }
        // single quoted keys
      ]
    }, g = {
      className: "template-variable",
      variants: [
        { begin: /\{\{/, end: /\}\}/ },
        // jinja templates Ansible
        { begin: /%\{/, end: /\}/ }
        // Ruby i18n
      ]
    }, s = {
      className: "string",
      relevance: 0,
      variants: [
        { begin: /'/, end: /'/ },
        { begin: /"/, end: /"/ },
        { begin: /\S+/ }
      ],
      contains: [
        e.BACKSLASH_ESCAPE,
        g
      ]
    }, c = e.inherit(s, {
      variants: [
        { begin: /'/, end: /'/ },
        { begin: /"/, end: /"/ },
        { begin: /[^\s,{}[\]]+/ }
      ]
    }), v = "[0-9]{4}(-[0-9][0-9]){0,2}", N = "([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?", R = "(\\.[0-9]*)?", m = "([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?", A = {
      className: "number",
      begin: "\\b" + v + N + R + m + "\\b"
    }, i = {
      end: ",",
      endsWithParent: !0,
      excludeEnd: !0,
      keywords: n,
      relevance: 0
    }, d = {
      begin: /\{/,
      end: /\}/,
      contains: [i],
      illegal: "\\n",
      relevance: 0
    }, u = {
      begin: "\\[",
      end: "\\]",
      contains: [i],
      illegal: "\\n",
      relevance: 0
    }, t = [
      b,
      {
        className: "meta",
        begin: "^---\\s*$",
        relevance: 10
      },
      {
        // multi line string
        // Blocks start with a | or > followed by a newline
        //
        // Indentation of subsequent lines must be the same to
        // be considered part of the block
        className: "string",
        begin: "[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"
      },
      {
        // Ruby/Rails erb
        begin: "<%[%=-]?",
        end: "[%-]?%>",
        subLanguage: "ruby",
        excludeBegin: !0,
        excludeEnd: !0,
        relevance: 0
      },
      {
        // named tags
        className: "type",
        begin: "!\\w+!" + a
      },
      // https://yaml.org/spec/1.2/spec.html#id2784064
      {
        // verbatim tags
        className: "type",
        begin: "!<" + a + ">"
      },
      {
        // primary tags
        className: "type",
        begin: "!" + a
      },
      {
        // secondary tags
        className: "type",
        begin: "!!" + a
      },
      {
        // fragment id &ref
        className: "meta",
        begin: "&" + e.UNDERSCORE_IDENT_RE + "$"
      },
      {
        // fragment reference *ref
        className: "meta",
        begin: "\\*" + e.UNDERSCORE_IDENT_RE + "$"
      },
      {
        // array listing
        className: "bullet",
        // TODO: remove |$ hack when we have proper look-ahead support
        begin: "-(?=[ ]|$)",
        relevance: 0
      },
      e.HASH_COMMENT_MODE,
      {
        beginKeywords: n,
        keywords: { literal: n }
      },
      A,
      // numbers are any valid C-style number that
      // sit isolated from other words
      {
        className: "number",
        begin: e.C_NUMBER_RE + "\\b",
        relevance: 0
      },
      d,
      u,
      s
    ], r = [...t];
    return r.pop(), r.push(c), i.contains = r, {
      name: "YAML",
      case_insensitive: !0,
      aliases: ["yml"],
      contains: t
    };
  }
  l(T, "yaml");
  E.exports = T;
});

export {
  S as a
};
