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

// ../node_modules/refractor/lang/docker.js
var P = l((O, s) => {
  s.exports = o;
  o.displayName = "docker";
  o.aliases = ["dockerfile"];
  function o(c) {
    (function(r) {
      var S = /\\[\r\n](?:\s|\\[\r\n]|#.*(?!.))*(?![\s#]|\\[\r\n])/.source, p = /(?:[ \t]+(?![ \t])(?:<SP_BS>)?|<SP_BS>)/.source.replace(
        /<SP_BS>/g,
        function() {
          return S;
        }
      ), u = /"(?:[^"\\\r\n]|\\(?:\r\n|[\s\S]))*"|'(?:[^'\\\r\n]|\\(?:\r\n|[\s\S]))*'/.source, d = /--[\w-]+=(?:<STR>|(?!["'])(?:[^\s\\]|\\.)+)/.source.replace(
        /<STR>/g,
        function() {
          return u;
        }
      ), a = {
        pattern: RegExp(u),
        greedy: !0
      }, i = {
        pattern: /(^[ \t]*)#.*/m,
        lookbehind: !0,
        greedy: !0
      };
      function e(t, g) {
        return t = t.replace(/<OPT>/g, function() {
          return d;
        }).replace(/<SP>/g, function() {
          return p;
        }), RegExp(t, g);
      }
      n(e, "re"), r.languages.docker = {
        instruction: {
          pattern: /(^[ \t]*)(?:ADD|ARG|CMD|COPY|ENTRYPOINT|ENV|EXPOSE|FROM|HEALTHCHECK|LABEL|MAINTAINER|ONBUILD|RUN|SHELL|STOPSIGNAL|USER|VOLUME|WORKDIR)(?=\s)(?:\\.|[^\r\n\\])*(?:\\$(?:\s|#.*$)*(?![\s#])(?:\\.|[^\r\n\\])*)*/im,
          lookbehind: !0,
          greedy: !0,
          inside: {
            options: {
              pattern: e(
                /(^(?:ONBUILD<SP>)?\w+<SP>)<OPT>(?:<SP><OPT>)*/.source,
                "i"
              ),
              lookbehind: !0,
              greedy: !0,
              inside: {
                property: {
                  pattern: /(^|\s)--[\w-]+/,
                  lookbehind: !0
                },
                string: [
                  a,
                  {
                    pattern: /(=)(?!["'])(?:[^\s\\]|\\.)+/,
                    lookbehind: !0
                  }
                ],
                operator: /\\$/m,
                punctuation: /=/
              }
            },
            keyword: [
              {
                // https://docs.docker.com/engine/reference/builder/#healthcheck
                pattern: e(
                  /(^(?:ONBUILD<SP>)?HEALTHCHECK<SP>(?:<OPT><SP>)*)(?:CMD|NONE)\b/.source,
                  "i"
                ),
                lookbehind: !0,
                greedy: !0
              },
              {
                // https://docs.docker.com/engine/reference/builder/#from
                pattern: e(
                  /(^(?:ONBUILD<SP>)?FROM<SP>(?:<OPT><SP>)*(?!--)[^ \t\\]+<SP>)AS/.source,
                  "i"
                ),
                lookbehind: !0,
                greedy: !0
              },
              {
                // https://docs.docker.com/engine/reference/builder/#onbuild
                pattern: e(/(^ONBUILD<SP>)\w+/.source, "i"),
                lookbehind: !0,
                greedy: !0
              },
              {
                pattern: /^\w+/,
                greedy: !0
              }
            ],
            comment: i,
            string: a,
            variable: /\$(?:\w+|\{[^{}"'\\]*\})/,
            operator: /\\$/m
          }
        },
        comment: i
      }, r.languages.dockerfile = r.languages.docker;
    })(c);
  }
  n(o, "docker");
});

export {
  P as a
};
