"use strict";const x=require("./csharp.cjs.js"),A=require("./markup.cjs.js");l.displayName="cshtml";l.aliases=["razor"];function l(c){c.register(x),c.register(A),(function(e){var h=/\/(?![/*])|\/\/.*[\r\n]|\/\*[^*]*(?:\*(?!\/)[^*]*)*\*\//.source,v=/@(?!")|"(?:[^\r\n\\"]|\\.)*"|@"(?:[^\\"]|""|\\[\s\S])*"(?!")/.source+"|"+/'(?:(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'|(?=[^\\](?!')))/.source;function a(o,y){for(var d=0;d<y;d++)o=o.replace(/<self>/g,function(){return"(?:"+o+")"});return o.replace(/<self>/g,"[^\\s\\S]").replace(/<str>/g,"(?:"+v+")").replace(/<comment>/g,"(?:"+h+")")}var r=a(/\((?:[^()'"@/]|<str>|<comment>|<self>)*\)/.source,2),f=a(/\[(?:[^\[\]'"@/]|<str>|<comment>|<self>)*\]/.source,1),s=a(/\{(?:[^{}'"@/]|<str>|<comment>|<self>)*\}/.source,2),m=a(/<(?:[^<>'"@/]|<comment>|<self>)*>/.source,1),g=/@/.source+/(?:await\b\s*)?/.source+"(?:"+/(?!await\b)\w+\b/.source+"|"+r+")(?:"+/[?!]?\.\w+\b/.source+"|(?:"+m+")?"+r+"|"+f+")*"+/(?![?!\.(\[]|<(?!\/))/.source,w=/@(?![\w()])/.source+"|"+g,i="(?:"+/"[^"@]*"|'[^'@]*'|[^\s'"@>=]+(?=[\s>])/.source+`|["'][^"'@]*(?:(?:`+w+`)[^"'@]*)+["'])`,u=/(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*<tagAttrValue>|(?=[\s/>])))+)?/.source.replace(/<tagAttrValue>/,i),t=/(?!\d)[^\s>\/=$<%]+/.source+u+/\s*\/?>/.source,b=/\B@?/.source+"(?:"+/<([a-zA-Z][\w:]*)/.source+u+/\s*>/.source+"(?:"+(/[^<]/.source+"|"+/<\/?(?!\1\b)/.source+t+"|"+a(/<\1/.source+u+/\s*>/.source+"(?:"+(/[^<]/.source+"|"+/<\/?(?!\1\b)/.source+t+"|<self>")+")*"+/<\/\1\s*>/.source,2))+")*"+/<\/\1\s*>/.source+"|"+/</.source+t+")";e.languages.cshtml=e.languages.extend("markup",{});var k=e.languages.insertBefore("csharp","string",{html:{pattern:RegExp(b),greedy:!0,inside:e.languages.cshtml}},{csharp:e.languages.extend("csharp",{})}),n={pattern:/\S[\s\S]*/,alias:"language-csharp",inside:k},p={pattern:RegExp(/(^|[^@])/.source+g),lookbehind:!0,greedy:!0,alias:"variable",inside:{keyword:/^@/,csharp:n}};e.languages.cshtml.tag.pattern=RegExp(/<\/?/.source+t),e.languages.cshtml.tag.inside["attr-value"].pattern=RegExp(/=\s*/.source+i),e.languages.insertBefore("inside","punctuation",{value:p},e.languages.cshtml.tag.inside["attr-value"]),e.languages.insertBefore("cshtml","prolog",{"razor-comment":{pattern:/@\*[\s\S]*?\*@/,greedy:!0,alias:"comment"},block:{pattern:RegExp(/(^|[^@])@/.source+"(?:"+[s,/(?:code|functions)\s*/.source+s,/(?:for|foreach|lock|switch|using|while)\s*/.source+r+/\s*/.source+s,/do\s*/.source+s+/\s*while\s*/.source+r+/(?:\s*;)?/.source,/try\s*/.source+s+/\s*catch\s*/.source+r+/\s*/.source+s+/\s*finally\s*/.source+s,/if\s*/.source+r+/\s*/.source+s+"(?:"+/\s*else/.source+"(?:"+/\s+if\s*/.source+r+")?"+/\s*/.source+s+")*",/helper\s+\w+\s*/.source+r+/\s*/.source+s].join("|")+")"),lookbehind:!0,greedy:!0,inside:{keyword:/^@\w*/,csharp:n}},directive:{pattern:/^([ \t]*)@(?:addTagHelper|attribute|implements|inherits|inject|layout|model|namespace|page|preservewhitespace|removeTagHelper|section|tagHelperPrefix|using)(?=\s).*/m,lookbehind:!0,greedy:!0,inside:{keyword:/^@\w+/,csharp:n}},value:p,"delegate-operator":{pattern:/(^|[^@])@(?=<)/,lookbehind:!0,alias:"operator"}}),e.languages.razor=e.languages.cshtml})(c)}module.exports=l;
//# sourceMappingURL=cshtml.cjs.js.map
