import d from "./markup-templating.es.js";
o.displayName = "soy";
o.aliases = [];
function o(r) {
  r.register(d), (function(e) {
    var n = /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, l = /\b\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b|\b0x[\dA-F]+\b/;
    e.languages.soy = {
      comment: [
        /\/\*[\s\S]*?\*\//,
        {
          pattern: /(\s)\/\/.*/,
          lookbehind: !0,
          greedy: !0
        }
      ],
      "command-arg": {
        pattern: /(\{+\/?\s*(?:alias|call|delcall|delpackage|deltemplate|namespace|template)\s+)\.?[\w.]+/,
        lookbehind: !0,
        alias: "string",
        inside: {
          punctuation: /\./
        }
      },
      parameter: {
        pattern: /(\{+\/?\s*@?param\??\s+)\.?[\w.]+/,
        lookbehind: !0,
        alias: "variable"
      },
      keyword: [
        {
          pattern: /(\{+\/?[^\S\r\n]*)(?:\\[nrt]|alias|call|case|css|default|delcall|delpackage|deltemplate|else(?:if)?|fallbackmsg|for(?:each)?|if(?:empty)?|lb|let|literal|msg|namespace|nil|@?param\??|rb|sp|switch|template|xid)/,
          lookbehind: !0
        },
        /\b(?:any|as|attributes|bool|css|float|html|in|int|js|list|map|null|number|string|uri)\b/
      ],
      delimiter: {
        pattern: /^\{+\/?|\/?\}+$/,
        alias: "punctuation"
      },
      property: /\w+(?==)/,
      variable: {
        pattern: /\$[^\W\d]\w*(?:\??(?:\.\w+|\[[^\]]+\]))*/,
        inside: {
          string: {
            pattern: n,
            greedy: !0
          },
          number: l,
          punctuation: /[\[\].?]/
        }
      },
      string: {
        pattern: n,
        greedy: !0
      },
      function: [
        /\w+(?=\()/,
        {
          pattern: /(\|[^\S\r\n]*)\w+/,
          lookbehind: !0
        }
      ],
      boolean: /\b(?:false|true)\b/,
      number: l,
      operator: /\?:?|<=?|>=?|==?|!=|[+*/%-]|\b(?:and|not|or)\b/,
      punctuation: /[{}()\[\]|.,:]/
    }, e.hooks.add("before-tokenize", function(a) {
      var s = /\{\{.+?\}\}|\{.+?\}|\s\/\/.*|\/\*[\s\S]*?\*\//g, u = "{literal}", p = "{/literal}", t = !1;
      e.languages["markup-templating"].buildPlaceholders(
        a,
        "soy",
        s,
        function(i) {
          return i === p && (t = !1), t ? !1 : (i === u && (t = !0), !0);
        }
      );
    }), e.hooks.add("after-tokenize", function(a) {
      e.languages["markup-templating"].tokenizePlaceholders(a, "soy");
    });
  })(r);
}
export {
  o as default
};
//# sourceMappingURL=soy.es.js.map
