6 | `,n}raise(){throw this.toError()}},xr=Me;(()=>{$(Me,br,"Diagnostic",16)})();var kr=Symbol(),Be=class{constructor(e,t){this.cache={},this.rules=e,this.matcher=t,N(this,kr)}convert(e){for(let t=0,r=I(this.rules),n=r.length;t<n;t++){let i=r[t];if(this.matcher&&this.matcher(i[0],e))return e[1]}return 0}},wr=Be;(()=>{$(Be,kr,"Converter",16)})();function ye(s,e,t=1e5){let r=s;for(;r&&t>0;){if(r.match(e))return r;t--,r=r.prev}return null}function ze(s,e,t){t===void 0&&(t=0);for(var r=e?[t]:[],n=0;n<s.length;){var i=s.charCodeAt(n);(i===13||i===10)&&(i===13&&n+1<s.length&&s.charCodeAt(n+1)===10&&n++,r.push(t+n+1)),n++}return r}function $r(s){var e=s.start,t=s.end;return e.line>t.line||e.line===t.line&&e.character>t.character?new H(t,e):R(s,H)?s:new H(e,t)}function vr(s){return s!=null&&typeof s.text=="string"&&s.range===void 0}function Sr(s){let e=s.split(/\n/),t=[],r={indent:-1,children:[]},n=r,i,a=Date.now();for(let o=0,p=I(e),c=p.length;o<c;o++){let l=p[o];if(l.match(/^\s*$/))continue;let f=l.match(/^\t*/)[0].length;for(;r.indent>=f;)r=r.parent||n;if(i=l.match(/^(\t*((?:export )?(?:static )?(?:extend )?)(class|tag|def|get|set|prop|attr) )(\@?[\w\-\$\:]+(?:\.[\w\-\$]+)?)/),i){let u=i[3],h=i[4],v=r.name?r.name+".":"",S=i[2].trim().split(/\s+/),E="",y={start:{line:o,character:i[1].length},end:{line:o,character:i[0].length}},m={kind:u,ownName:h,name:v+h,span:y,indent:f,modifiers:S,children:[],parent:r==n?null:r,type:u,data:{},static:S.indexOf("static")>=0,extends:S.indexOf("extend")>=0};m.static&&(m.containerName="static"),m.containerName=i[2]+i[3],u=="tag"&&(i=l.match(/\<\s+([\w\-\$\:]+(?:\.[\w\-\$]+)?)/))&&(m.superclass=i[1]),r.type=="tag"&&(E="```html\n<"+r.name+" "+h+">\n```\n",m.description={kind:"markdown",value:E}),r.children.push(m),r=m,t.push(m)}}return n.all=t,console.log("fast outline",s.length,Date.now()-a),n}var Le=[/^/,{token:"@rematch",next:"@pop"}],Cr={token:"@rematch",next:"@pop"},Ir={token:"white.indent",next:"@>illegal_indent"};function hn(s,e="#"){typeof s=="string"&&(s=s.split(" "));let t=s.slice().sort(function(r,n){return n.length-r.length});return t=t.map(function(r){let n=r.replace(/[.*+\-?^${}()|[\]\\]/g,"\\$&");return e.replace("#",n)}),new RegExp("(?:"+t.join("|")+")")}function A(s,e,t,r={}){var o;var n;s==null?s=Ir:s==1?s={next:"@>"}:s==2?s={next:"@>_indent&-_indent"}:typeof s=="string"&&(s={next:s}),e==-1&&(e=Cr),t==-1?t=Cr:t==0&&((o=r.comment)!=null||(r.comment=!0),t={}),s=Object.assign({token:"white.tabs"},s||{}),t=Object.assign({token:"white.tabs"},t||{}),e=Object.assign({token:"@rematch",next:"@pop"},e||{});let i={"$1==$S2 ":s,"$1==$S2":{cases:{"$1==$S6":t,"@default":{token:"@rematch",switchTo:"@*$1"}}},"@default":e};n=0;for(let p of["next","switchTo"]){let c=n++;s[p]&&s[p].indexOf("*")==-1&&(s[p]+="*$1")}let a=[/^(\t*)(?=[^ \t\n])/,{cases:i}];if(r.comment){let p={};for(let c=0,l=Object.keys(i),f=l.length,u,h;c<f;c++){u=l[c],h=i[u];let v=Object.assign({},h);!v.next&&!v.switchTo&&(v.next="@>_comment"),p[u]=v}return[[/^(\t*)(?=#\s|#$)/,{cases:p}],a]}return a}var Pe={root:[[/^@comment/,"comment","@>_comment"],[/^(\t+)(?=[^\t\n])/,{cases:{"$1==$S2 ":{token:"white.indent",next:"@>_indent*$1"},"@default":"white.indent"}}],"block_"],_comment:[[/^([\t\s\n]*)$/,"comment"],[/^(\t*)([\S\s]*)/,{cases:{"$1~$S2 *":{token:"comment"},"@default":{token:"@rematch",next:"@pop"}}}],[/[\S\s]+/,"comment"]],illegal_indent:[A()],identifier_:[[/\$\w+\$/,"identifier.env"],[/\$\d+/,"identifier.special"],[/\#+@id/,"identifier.symbol"],[/\¶@id/,"ivar"],[/@id\!?/,{cases:{this:"this",self:"self","@keywords":"keyword.$#","$0~[A-Z].*":"identifier.uppercase.$F","@default":"identifier.$F"}}]],block_:[[/^(\t+)(?=[\r\n]|$)/,"white.tabs"],"class_","tagclass_","var_","func_","import_","export_","flow_","for_","try_","catch_","while_","css_","tag_","do_","block_comment_","expr_",[/[ ]+/,"white"],"common_"],indentable_:[[/^[ ]+/,"white"],A("@>_paren_indent&-_indent",null,null),[/^(\t+)(?=[\r\n]|$)/,"white.tabs"],"whitespace"],_indent:[A(2,-1,0),"block_"],_paren_indent:[A(2,-1,0),"block_",[/\)|\}|\]/,"@rematch","@pop"]],block:[A("@>",-1,0),"block_"],bool_:[[/(true|false|yes|no|undefined|null)(?![\:\-\w\.\_])/,"boolean"]],op_:[[/\s+\:\s+/,"operator.ternary"],[/(@unspaced_ops)/,{cases:{"@spread":"operator.spread","@access":"operator.access","@default":"operator"}}],[/\/(?!\/)/,"operator.math"],[/\&(?=[,\)])/,"operator.special.blockparam"],[/(\s*)(@symbols)(\s*)/,{cases:{"$2@assignments":"operator.assign","$2@math":"operator.math","$2@operators":"operator","$2@logic":"operator.logic","$2@access":"operator.access","@default":"delimiter"}}],[/\&\b/,"operator"]],keyword_:[[/new@B/,"keyword.new"],[/isa@B/,"keyword.isa"],[/is@B/,"keyword.is"],[/(switch|when|throw|continue|break|then|await|typeof|by)@B/,"keyword.$1"],[/delete@B/,"keyword.delete"],[/and@B|or@B/,"operator.flow"]],return_:[[/return@B/,"keyword.new"]],primitive_:["string_","number_","regexp_","bool_"],value_:["primitive_","keyword_","implicit_call_","parens_","key_","access_","identifier_","array_","object_"],expr_:["comment_","inline_var_","return_","value_","tag_","op_","type_","spread_"],attr_expr_:["primitive_","parens_","access_","identifier_","array_","object_","tag_","op_"],access_:[[/(\.\.?)(@propid\!?)/,{cases:{"$2~[A-Z].*":["operator.access","accessor.uppercase"],"$2~#.*":["operator.access","accessor.symbol"],"@default":["operator.access","accessor"]}}]],call_:[[/\(/,"(","@call_body"]],key_:[[/(\#+@id)(\:\s*)/,["key.symbol","operator.assign.key-value"]],[/(@propid)(\:\s*)/,{cases:{"@default":["key","operator.assign.key-value"]}}]],implicit_call_:[[/(\.\.?)(@propid)@implicitCall/,{cases:{"$2~[A-Z].*":["operator.access","accessor.uppercase","@implicit_call_body"],"@default":["operator.access","accessor","@implicit_call_body"]}}],[/(@propid)@implicitCall/,{cases:{"$2~[A-Z].*":["identifier.uppercase","@implicit_call_body"],"@default":["identifier","@implicit_call_body"]}}]],implicit_call_body:[Le,[/\)|\}|\]|\>/,"@rematch","@pop"],"arglist_","whitespace"],arglist_:["do_","expr_",[/\s*\,\s*/,"delimiter.comma"]],params_:[[/\[/,"array.[","@array_var_body=decl-param"],[/\{/,"object.{","@object_body=decl-param"],[/(@variable)/,"identifier.decl-param"],"spread_","type_",[/\s*\=\s*/,"operator","@var_value="],[/\s*\,\s*/,"separator"]],object_:[[/\{/,"object.{","@object_body"]],parens_:[[/\(/,"parens.(","@parens_body"]],parens_body:[[/\)/,")","@pop"],"indentable_","arglist_"],array_:[[/\[/,"array.[","@array_body"]],array_body:[[/\]@implicitCall/,{token:"]",switchTo:"@implicit_call_body="}],[/\]/,"]","@pop"],[/\)|\}/,"invalid"],"indentable_","expr_",[",","delimiter"]],object_body:[[/\}/,"}","@pop"],[/(@id)(\s*:\s*)/,["key","operator.assign.key-value","@object_value"]],[/(@id)/,"identifier.$F"],[/\[/,"[","@object_dynamic_key="],[/\s*=\s*/,"operator.assign","@object_value="],[/:/,"operator.assign.key-value","@object_value="],[/\,/,"delimiter.comma"],"indentable_","expr_"],object_value:[Le,[/,|\}|\]|\)/,"@rematch","@pop"],"expr_"],object_dynamic_key:[["]","]","@pop"],"expr_"],comment_:[[/#(\s.*)?(\n|$)/,"comment"]],block_comment_:[[/###/,"comment.start","@_block_comment"]],_block_comment:[[/###/,"comment.end","@pop"],[/[^#]+/,"comment"],[/#(?!##)/,"comment"]],try_:[[/try@B/,"keyword.try","@>_try&try"]],catch_:[[/(catch\s+)(?=@id(\s|$))/,"keyword.catch","@catch_start&catch"],[/catch@B/,"keyword.catch","@catch_start&catch"]],catch_start:[[/@id/,"identifier.decl-const",{switchTo:"@>_catch"}],[/.?/,"@rematch",{switchTo:"@>_catch"}]],_catch:[A("@>block",-1,0),"block_"],_try:[A("@>block",-1,0),"block_"],do_:[[/do(?=\()/,"keyword.do","@>do_start&do"],[/do(?=\s*\|)/,"keyword.do","@>do_piped&do"],[/do@B/,"keyword.do","@>_do&do"]],do_start:[A(null,-1,-1),[/\(/,"(",{switchTo:"@_do_params"}],[/./,"@rematch",{switchTo:"@_do"}]],do_piped:[A(null,-1,-1),[/\s*\|/,"args.open",{switchTo:"@_do_piped_params"}],[/./,"@rematch",{switchTo:"@_do"}]],_do_piped_params:[[/\|/,"args.close",{switchTo:"@_do"}],"params_"],_do_params:[[/\)/,")",{switchTo:"@_do"}],"params_"],_do:[A(2,-1,0),[/(\}|\)|\])/,"@rematch","@pop"],"block_"],class_:[[/(extend)(?=\s+class )/,"keyword.$1"],[/(global)(?=\s+class )/,"keyword.$1"],[/(class)(\s)(@id)/,["keyword.$1","white.$1name","entity.name.class.decl-const","@class_start="]],[/(class)(?=\n)/,"keyword.$1","@>_class&class="]],class_start:[[/(\s+\<\s+)(@id)/,["keyword.extends","identifier.superclass"]],[/@comment/,"comment"],[/^/,"@rematch",{switchTo:"@>_class&class="}]],tagclass_:[[/(extend)(?=\s+tag )/,"keyword.$1"],[/(global)(?=\s+tag )/,"keyword.$1"],[/(tag)(\s)(@constant)/,["keyword.tag","white.tagname","entity.name.component.local","@tagclass_start="]],[/(tag)(\s)(@id)/,["keyword.tag","white.tagname","entity.name.component.global","@tagclass_start="]]],tagclass_start:[[/(\s+\<\s+)(@id)/,["keyword.extends","identifier.superclass"]],[/@comment/,"comment"],[/^/,"@rematch",{switchTo:"@>_tagclass&component="}]],import_:[[/(import)(?=\s+['"])/,"keyword.import","@>import_source"],[/(import)(\s+type)(?=\s[\w\$\@\{])/,["keyword.import","keyword.type","@>import_body&-_imports=decl-import/part"]],[/(import)@B/,"keyword.import","@>import_body&-_imports=decl-import/part"]],import_body:[A(null,-1,0),[/(@esmIdentifier)( +from)/,["identifier.$F.default","keyword.from",{switchTo:"@import_source"}]],[/(\*)(\s+as\s+)(@esmIdentifier)(\s+from)/,["keyword.star","keyword.as","identifier.$F.ns","keyword.from",{switchTo:"@import_source"}]],[/(@esmIdentifier)(\s*,\s*)(\*)(\s+as\s+)(@esmIdentifier)(from)/,["identifier.$F.default","delimiter.comma","keyword.star","keyword.as","identifier.$F.ns","keyword.from",{switchTo:"@import_source"}]],[/\ *from/,"keyword.from",{switchTo:"@import_source"}],[/\{/,"specifiers.{","@esm_specifiers/part"],[/(@esmIdentifier)/,"identifier.$F",{switchTo:"@/delim"}],[/\s*\,\s*/,"delimiter.comma",{switchTo:"@/part"}],"comma_","common_"],import_source:[A(null,-1,0),[/["']/,"path.open","@_path=$#"],Le],export_:[[/(export)( +)(default)@B/,["keyword.export","white","keyword.default"]],[/(export)(?= +(let|const|var|class|tag)@B)/,"keyword.export"],[/(export)( +)(global)@B/,["keyword.export","white","keyword.global"]],[/(export)(\s+\*\s+)(from)@B/,["keyword.export","operator.star","keyword.from","@>import_source"]],[/(export)@B/,"keyword.export","@>export_body"]],export_body:[A(null,-1,0),[/(\*)(\s+as\s+)(@esmIdentifier)/,["keyword.star","keyword.as","identifier.const.export"]],[/(@esmIdentifier)(\s+as\s+)(default)/,["alias","keyword.as","alias.default"]],[/(@esmIdentifier)(\s+as\s+)(@esmIdentifier)/,["alias","keyword.as","identifier.const.export"]],[/from/,"keyword.from",{switchTo:"@import_source"}],[/\{/,"{","@esm_specifiers=export/part"],[/(@esmIdentifier)/,"identifier.const.export"],[/\*/,"operator.star"],"comma_","common_"],esm_specifiers:[[/\}/,"}","@pop"],[/(@esmIdentifier)(\s+as\s+)(@esmIdentifier)/,["alias","keyword.as","identifier.const.$F",{switchTo:"@/delim"}]],[/@esmIdentifier/,{cases:{"$/==part":{token:"identifier.const.$S4",switchTo:"@/delim"},"@default":{token:"invalid"}}}],[/\s*\,\s*/,"delimiter.comma",{switchTo:"@/part"}],"whitespace"],_path:[[/[^"'\`\{\\]+/,"path"],[/@escapes/,"path.escape"],[/\./,"path.escape.invalid"],[/\{/,"invalid"],[/["'`]/,{cases:{"$#==$F":{token:"path.close",next:"@pop"},"@default":"path"}}]],member_:[[/(constructor)@B/,"entity.name.constructor","@>def_params&def/def"],[/(def|get|set)(\s)(@defid)/,["keyword.$1","white.entity","entity.name.$1","@>def_params&$1/$1"]],[/(def|get|set)(\s)(\[)/,["keyword.$1","white.entity","$$","@>def_dynamic_name/$1"]]],func_:[[/export(?=\s+(get|set|def|global) )/,"keyword.export"],[/global(?=\s+(get|set|def) )/,"keyword.global"],[/(def)(\s)(@id)(\.)(@defid)/,["keyword.$1","white.entity","identifier.target","operator","entity.name.def","@>def_params&$1/$1"]],[/(def)(\s)(@defid)/,["keyword.$1","white.entity","entity.name.function.decl-const-func","@>def_params&$1/$1"]]],flow_:[[/(if|else|elif|unless)(?=\s|$)/,["keyword.$1","@flow_start=$1"]]],flow_start:[A({switchTo:"@>_flow&$F"},-1,-1),[/[ \t]+/,"white"],"expr_"],for_:[[/for(?: own)?@B/,"keyword.$#","@for_start&forscope=decl-for"]],while_:[[/(while|until)@B/,"keyword.$#","@>while_body"]],while_body:[A(2,-1,0),"block_"],for_start:[A({switchTo:"@>for_body"},-1,-1),[/\[/,"array.[","@array_var_body"],[/\{/,"object.{","@object_body"],[/(@variable)/,"identifier.$F"],[/(\s*\,\s*)/,"separator","@=decl-for-index"],[/\s(in|of)@B/,"keyword.$1",{switchTo:"@>for_source="}],[/[ \t]+/,"white"],"type_"],for_source:[A({switchTo:"@>for_body"},-1,{switchTo:"@for_body"}),"expr_",[/[ \t]+/,"white"]],for_body:[A(2,-1,0),"block_"],decorator_:[[/(@decid)(\()/,["decorator","$2","@_decorator_params"]],[/(@decid)/,"decorator"]],_decorator_params:[[/\)/,")","@pop"],"params_"],field_:[[/((?:lazy )?)((?:static )?)(const|let|attr)(?=\s|$)/,["keyword.lazy","keyword.static","keyword.$1","@_vardecl=field-$3"]],[/(static\s+)(?=@fieldid)/,"keyword.static"],[/(@fieldid)(?=$)/,"entity.name.field"],[/(@fieldid)/,["entity.name.field","@_field_1"]]],_field_1:[A(null,-1,-1),"type_",[/(\s*=)(?!\=)/,["operator.assign","@>_field_value&field"]],[/(\s*(?:\@)set\s*)/,["keyword.spy","@>_def&spy"]]],_field_value:[A(2,-1,0),"block_",[/(\s*(?:\@)set\s*)/,["@rematch","@pop"]]],var_:[[/((?:export )?)(const|let)(?=\s[\[\{\$a-zA-Z]|\s*$)/,["keyword.export","keyword.$1","@_vardecl=decl-$2"]],[/((?:export )?)(const|let)(?=\s|$)/,["keyword.export","keyword.$1"]]],inline_var_:[[/(const|let)(?=\s[\[\{\$a-zA-Z]|\s*$)/,["keyword.$1","@inline_var_body=decl-$1"]]],string_:[[/"""/,"string",'@_herestring="""'],[/'''/,"string","@_herestring='''"],[/["'`]/,"string.open","@_string=$#"]],number_:[[/0[xX][0-9a-fA-F_]+/,"number.hex"],[/0[b][01_]+/,"number.binary"],[/0[o][0-9_]+/,"number.octal"],[/(\d+)([a-z]+|\%)/,["number","unit"]],[/(\d*\.\d+(?:[eE][\-+]?\d+)?)([a-z]+|\%)/,["number.float","unit"]],[/\d+[eE]([\-+]?\d+)?/,"number.float"],[/\d[\d_]*\.\d[\d_]*([eE][\-+]?\d+)?/,"number.float"],[/\d[\d_]*/,"number.integer"],[/0[0-7]+(?!\d)/,"number.octal"],[/\d+/,"number"]],_string:[[/[^"'\`\{\\]+/,"string"],[/@escapes/,"string.escape"],[/\./,"string.escape.invalid"],[/\{/,{cases:{"$F=='":"string","@default":{token:"string.bracket.open",next:"@interpolation_body"}}}],[/["'`]/,{cases:{"$#==$F":{token:"string.close",next:"@pop"},"@default":"string"}}],[/#/,"string"]],_herestring:[[/("""|''')/,{cases:{"$1==$F":{token:"string",next:"@pop"},"@default":"string"}}],[/[^#\\'"\{]+/,"string"],[/['"]+/,"string"],[/@escapes/,"string.escape"],[/\./,"string.escape.invalid"],[/\{/,{cases:{'$F=="""':{token:"string",next:"@interpolation_body"},"@default":"string"}}],[/#/,"string"]],interpolation_body:[[/\}/,"string.bracket.close","@pop"],"expr_"],_class:[A(Ir,-1,0),"css_","member_","comment_","decorator_",[/(get|set|def|static|prop|attr)@B/,"keyword.$0"],"field_","common_"],_tagclass:["_class",[/(?=\<self)/,"entity.name.def.render","@_render&def"]],def_params:[[/\(/,"(","@def_parens"],[/^/,"@rematch",{switchTo:"@_def"}],[/do@B/,"keyword.do",{switchTo:"@_def"}],"params_",[/@comment/,"comment"]],def_parens:[[/\)/,")","@pop"],"params_"],def_dynamic_name:[["]",{token:"square.close",switchTo:"@def_params&$/"}],"expr_"],_render:[A(2,-1,-1),"block_"],_def:[A(2,-1,0),"block_"],_flow:[A(2,-1,0),"block_"],_varblock:[A(1,-1,-1),[/\[/,"array.[","@array_var_body"],[/\{/,"object.{","@object_body"],[/(@variable)/,"identifier.$F"],[/\s*\,\s*/,"separator"],[/(\s*\=\s*)(?=(for|while|until|if|unless|try)\s)/,"operator","@pop"],[/(\s*\=\s*)/,"operator","@var_value="],"type_",[/#(\s.*)?\n?$/,"comment"]],_vardecl:[A(null,-1,-1),[/\[/,"array.[","@array_var_body"],[/\{/,"object.{","@object_body"],[/(@variable)(?=\n|,|$)/,"identifier.$F","@pop"],[/(@variable)/,"identifier.$F"],[/(\s*\=\s*)/,"operator.declval",{switchTo:"@var_value&value="}],"type_"],array_var_body:[[/\]/,"]","@pop"],[/\{/,"object.{","@object_body"],[/\[/,"array.[","@array_var_body"],"spread_",[/(@variable)/,"identifier.$F"],[/(\s*\=\s*)/,"operator.assign","@array_var_body_value="],[",","delimiter"]],array_var_body_value:[[/(?=,|\)|]|})/,"delimiter","@pop"],"expr_"],inline_var_body:[[/\[/,"array.[","@array_var_body"],[/\{/,"object.{","@object_body"],[/(@variable)/,"identifier.$F"],[/(\s*\=\s*)/,"operator","@pop"],"type_"],var_value:[[/(?=,|\)|]|})/,"delimiter","@pop"],A({switchTo:"@>block"},-1,-1),"block_"],common_:[[/^(\t+)(?=\n|$)/,"white.tabs"],"whitespace"],comma_:[[/\s*,\s*/,"delimiter.comma"]],spread_:[[/\.\.\./,"operator.spread"]],type_:[[/\\/,"@rematch","@_type&-_type/0"]],_type:[A(-1,-1,-1),[/\\/,"delimiter.type.prefix"],[/\[/,"delimiter.type","@/]"],[/\(/,"delimiter.type","@/)"],[/\{/,"delimiter.type","@/}"],[/\</,"delimiter.type","@/>"],[/\|/,"delimiter.type.union"],[/\,|\s|\=|\./,{cases:{"$/==0":{token:"@rematch",next:"@pop"},"@default":"type"}}],[/[\]\}\)\>]/,{cases:{"$#==$/":{token:"delimiter.type",next:"@pop"},"@default":{token:"@rematch",next:"@pop"}}}],[/[\w\-\$]+/,"type"]],css_:[[/global(?=\s+css@B)/,"keyword.$#"],[/css(?:\s+)?/,"keyword.css","@>css_selector&rule-_sel"]],sel_:[[/(\%)((?:@id)?)/,["style.selector.mixin.prefix","style.selector.mixin"]],[/(\@)(\.{0,2}[\w\-\<\>\!]*\+?)/,"style.selector.modifier"],[/(\@)(\.{0,2}[\w\-\<\>\!]*)/,"style.selector.modifier"],[/\.([\w\-]+)/,"style.selector.class-name"],[/\#([\w\-]+)/,"style.selector.id"],[/([\w\-]+)/,"style.selector.element"],[/(>+|~|\+)/,"style.selector.operator"],[/(\*+)/,"style.selector.element.any"],[/(\$)((?:@id)?)/,["style.selector.reference.prefix","style.selector.reference"]],[/\&/,"style.selector.context"],[/\(/,"delimiter.selector.parens.open","@css_selector_parens"],[/\[/,"delimiter.selector.attr.open","@css_selector_attr"],[/\s+/,"white"],[/,/,"style.selector.delimiter"],[/#(\s.*)?\n?$/,"comment"]],css_props:[A(null,-1,0),[/(?=@cssPropertyKey)/,"","@css_property&-_styleprop-_stylepropkey"],[/#(\s.*)?\n?$/,"comment"],[/(?=[\%\*\w\&\$\>\.\[\@\!]|\#[\w\-])/,"","@>css_selector&rule-_sel"],[/\s+/,"white"]],css_selector:[A({switchTo:"@css_props"},-1,{token:"@rematch",switchTo:"@css_props&_props"}),[/(\}|\)|\])/,"@rematch","@pop"],[/(?=\s*@cssPropertyKey)/,"",{switchTo:"@css_props&_props"}],[/\s*#\s/,"@rematch",{switchTo:"@css_props&_props"}],"sel_"],css_inline:[[/\]/,"style.close","@pop"],[/(?=@cssPropertyKey)/,"","@css_property&-_styleprop-_stylepropkey"],[/(?=@cssPropertyPath\])/,"","@css_property&-_styleprop-_stylepropkey"]],css_selector_parens:[[/\)/,"delimiter.selector.parens.close","@pop"],"sel_"],css_selector_attr:[[/\]/,"delimiter.selector.parens.close","@pop"],"sel_"],css_property:[A(null,-1,-1),[/\]/,"@rematch","@pop"],[/(\d+)(@id)/,["style.property.unit.number","style.property.unit.name"]],[/((--|\$)@id)/,"style.property.var"],[/(-*@id)/,"style.property.name"],[/@cssModifier/,"style.property.modifier"],[/(\@+|\.+)(@id\-?)/,["style.property.modifier.start","style.property.modifier"]],[/\+(@id)/,"style.property.scope"],[/\s*([\:\=]\s*)(?=@br|$)/,"style.property.operator",{switchTo:"@>css_multiline_value&_stylevalue"}],[/\s*([\:\=]\s*)/,"style.property.operator",{switchTo:"@>css_value&_stylevalue"}]],css_value_:[[/(x?xs|sm\-?|md\-?|lg\-?|xx*l|\dxl|hg|x+h)\b/,"style.value.size"],[/\#[0-9a-fA-F]+/,"style.value.color.hex"],[/((--|\$)@id)/,"style.value.var"],[/(@optid)(\@+|\.+)(@optid)/,["style.property.name","style.property.modifier.prefix","style.property.modifier"]],"op_","string_","number_","comment_",[/\s+/,"style.value.white"],[/\(/,"delimiter.style.parens.open","@css_expressions"],[/\{/,"delimiter.style.curly.open","@css_interpolation&-_styleinterpolation"],[/(@id)/,"style.value"]],css_value:[A({switchTo:"@>css_multiline_value"},-1,-1),[/@cssPropertyKey/,"@rematch","@pop"],[/;/,"style.delimiter","@pop"],[/(\}|\)|\])/,"@rematch","@pop"],"css_value_"],css_multiline_value:[A(null,-1,0),[/@cssPropertyKey/,"invalid"],"css_value_"],css_expressions:[[/\)/,"delimiter.style.parens.close","@pop"],[/\(/,"delimiter.style.parens.open","@css_expressions"],"css_value"],css_interpolation:[[/\}/,"delimiter.style.curly.close","@pop"],"expr_"],expressions:[[/\,/,"delimiter.comma"]],whitespace:[[/[\r\n]+/,"br"],[/[ \t\r\n]+/,"white"]],space:[[/[ \t]+/,"white"]],tag_:[[/(\s*)(<)(?=\.)/,["white","tag.open","@_tag/flag"]],[/(\s*)(<)(?=\w|\{|\[|\%|\#|>)/,["white","tag.open","@_tag/name"]]],tag_content:[A(2,-1,0),[/\)|\}|\]/,"@rematch","@pop"],"common_","flow_","var_","for_","css_","expr_","do_"],tag_children:[],_tag:[[/\/>/,"tag.close","@pop"],[/>/,"tag.close",{switchTo:"@>tag_content=&-_tagcontent"}],[/>/,"tag.close","@pop"],[/(\-?\d+)/,"tag.$S3"],[/(\%)(@id)/,["tag.mixin.prefix","tag.mixin"]],[/\#@id/,"tag.id"],[/\./,{cases:{"$/==event":{token:"tag.event-modifier.start",switchTo:"@/event-modifier"},"$/==event-modifier":{token:"tag.event-modifier.start",switchTo:"@/event-modifier"},"$/==modifier":{token:"tag.modifier.start",switchTo:"@/modifier"},"$/==rule":{token:"tag.rule-modifier.start",switchTo:"@/rule-modifier"},"$/==rule-modifier":{token:"tag.rule-modifier.start",switchTo:"@/rule-modifier"},"@default":{token:"tag.flag.start",switchTo:"@/flag"}}}],[/(\$@id)/,{cases:{"$/==name":"tag.reference","@default":"tag.$/"}}],[/\{/,"tag.$/.interpolation.open","@_tag_interpolation"],[/\[/,"style.open","@css_inline"],[/(\s*\=\s*)/,"operator.equals.tagop.tag-$/","@_tag_value&-value"],[/\:/,{token:"tag.event.start",switchTo:"@/event"}],"tag_event_",[/(\-?@tagIdentifier)(\:@id)?/,{cases:{"$/==attr":{token:"@rematch",next:"@_tag_attr&-_tagattr"},"@default":{token:"tag.$/"}}}],[/\(/,{token:"tag.$/.parens.open",next:"@_tag_parens/0"}],[/\s+/,{token:"tag.white",switchTo:"@/attr"}],"comment_"],tag_event_:[[/(?=\@@optid)/,"","@_tag_event&-_listener"]],_tag_part:[[/\)|\}|\]|\>/,"@rematch","@pop"]],_tag_event:["_tag_part",[/(\@)(@optid)/,["tag.event.start","tag.event.name"]],[/(\.)(@optid)/,["tag.event-modifier.start","tag.event-modifier.name"]],[/\(/,{token:"tag.$/.parens.open",next:"@_tag_parens/0"}],[/(\s*\=\s*)/,"operator.equals.tagop.tag-$/","@_tag_value&handler"],[/\s+/,"@rematch","@pop"]],tag_attr_:[[/(?=@tagIdentifier(\:@id)?)/,"","@_tag_attr&-_attribute"]],_tag_attr:["_tag_part",[/(\-?@tagIdentifier)(\:@id)?/,"tag.attr"],[/\.(@optid)/,"tag.event-modifierzz"],[/\(/,{token:"tag.parens.open.$/",next:"@_tag_parens/0"}],[/(\s*\=\s*)/,"operator.equals.tagop.tag-$/","@_tag_value&-tagattrvalue"],[/\s+/,"@rematch","@pop"]],_tag_interpolation:[[/\}/,"tag.$/.interpolation.close","@pop"],"expr_",[/\)|\]/,"invalid"]],_tag_parens:[[/\)/,"tag.$/.parens.close","@pop"],"arglist_",[/\]|\}/,"invalid"]],_tag_value:[[/(?=(\/?\>|\s))/,"","@pop"],"attr_expr_"],regexp_:[[/\/(?!\ )(?=([^\\\/]|\\.)+\/)/,{token:"regexp.slash.open",bracket:"@open",next:"@_regexp"}],[/\/\/\//,{token:"regexp.slash.open",bracket:"@open",next:"@_hereregexp"}],[/(\/)(\/)/,["regexp.slash.open","regexp.slash.close"]]],_regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,["regexp.escape.control",{token:"regexp.escape.control",next:"@_regexrange"}]],[/(\()(\?:|\?=|\?!)/,["regexp.escape.control","regexp.escape.control"]],[/[()]/,"regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\:/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/(\/)(\w+)/,[{token:"regexp.slash.close"},{token:"regexp.flags",next:"@pop"}]],["/",{token:"regexp.slash.close",next:"@pop"}],[/./,"regexp.invalid"]],_regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,"regexp.escape.control","@pop"]],_hereregexp:[[/[^\\\/#]/,"regexp"],[/\\./,"regexp"],[/#.*$/,"comment"],["///[igm]*","regexp","@pop"],[/\//,"regexp"],"comment_"]};function _e(s){let e=["$S1","$S2","$S3","$S4","$S5","$S6"];if(s.match(/\@(pop|push|popall)/)||(s[0]=="@"&&(s=s.slice(1)),s.indexOf(".")>=0))return s;s=be(s),s[0]==">"&&(e[1]="$S6 ",s=s.slice(1));for(let t=0,r=I(s.split(/(?=[\/\&\=\*])/)),n=r.length;t<n;t++){let i=r[t];i[0]=="&"?i[1]=="-"||i[1]=="_"?e[2]="$S3"+i.slice(1):e[2]="$S3-"+i.slice(1):i[0]=="+"?e[3]="$S4-"+i.slice(1):i[0]=="="?e[3]=i.slice(1):i[0]=="/"?e[4]=i.slice(1):i[0]=="*"?e[5]=i.slice(1):e[0]=i}return e.join(".")}function be(s){let e=s;return s=s.replace("$/","$S5"),s=s.replace("$F","$S4"),s=s.replace("$&","$S3"),s=s.replace("$I","$S2"),s=s.replace("$T","$S2"),s}function Fe(s,e){if(typeof s=="string"&&(s={token:s}),s&&s.token!=null)s.token=be(s.token),typeof e=="string"?s.next=e:e&&Object.assign(s,e),s.next&&(s.next=_e(s.next)),s.switchTo&&(s.switchTo=_e(s.switchTo));else if(s&&s.cases){let t={};for(let r=s.cases,n=0,i=Object.keys(r),a=i.length,o,p;n<a;n++){o=i[n],p=r[o];let c=be(o);t[c]=Fe(p)}s.cases=t}else if(R(s,Array)){let t=[],r=null;for(let n=0,i=I(s),a=i.length;n<a;n++){let o=i[n];o[0]=="@"&&n==s.length-1&&r&&(o={next:o}),typeof o=="object"?o.token!=null||o.cases?t.push(r=Object.assign({},o)):Object.assign(r,o):typeof o=="string"&&t.push(r={token:be(o)})}s=t}if(R(s,Array))for(let t=0,r=I(s),n=r.length;t<n;t++){let i=r[t];i.token&&i.token.indexOf("$$")>=0&&(i.token=i.token.replace("$$","$"+(t+1))),i.next&&(i.next=_e(i.next)),i.switchTo&&(i.switchTo=_e(i.switchTo))}return s}for(let s=0,e=Object.keys(Pe),t=e.length,r,n;s<t;s++){r=e[s],n=Pe[r];let i=0;for(;i<n.length;){let a=n[i];if(R(a[0],Array)){n.splice(i,1,...a);continue}else typeof a=="string"?n[i]={include:a}:R(a[1],Array)?a[1]=Fe(a[1]):R(a,Array)&&a.splice(1,2,Fe(a[1],a[2]));i++}}var Re={defaultToken:"invalid",ignoreCase:!1,tokenPostfix:"",brackets:[{open:"{",close:"}",token:"bracket.curly"},{open:"[",close:"]",token:"bracket.square"},{open:"(",close:")",token:"bracket.parenthesis"}],keywords:["def","and","or","is","isnt","not","on","yes","@","no","off","true","false","null","this","self","as","new","delete","typeof","in","instanceof","return","throw","break","continue","debugger","if","elif","else","switch","for","while","do","try","catch","finally","class","extends","super","undefined","then","unless","until","loop","of","by","when","tag","prop","attr","export","import","extend","var","let","const","require","isa","await"],boolean:["true","false","yes","no","undefined","null"],operators:["=","!","~","?",":","!!","??","&","|","^","%","<<","!&",">>",">>>","+=","-=","*=","/=","&=","|=","??=","^=","%=","~=","<<=",">>=",">>>=","..","...","||=","&&=","**=","**","|=?","~=?","^=?","=?","and","or"],assignments:["=","|=?","~=?","^=?","=?","^=","%=","~=","<<=",">>=",">>>=","||=","&&=","??=","+=","-=","*=","/=","&=","|=","**="],logic:[">","<","==","<=",">=","!=","&&","||","===","!=="],ranges:["..","..."],spread:["..."],dot:["."],access:[".",".."],math:["+","-","*","/","++","--"],unspaced_ops:hn("... . .. + * ++ --"),comment:/#(\s.*)?(\n|$)/,symbols:/[=><!~?&%|+\-*\^,]+/,escapes:/\\(?:[abfnrtv\\"'$]|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,postaccess:/(:(?=\w))?/,ivar:/\@[a-zA-Z_]\w*/,B:/(?=\s|$)/,br:/[\r\n]+/,constant:/[A-Z][\w\$]*(?:\-+[\w\$]+)*/,id:/[A-Za-z_\$][\w\$]*(?:\-+[\w\$]+)*\??/,plainid:/[A-Za-z_\$][\w\$]*(?:\-+[\w\$]+)*\??/,fieldid:/[\@\#]*@plainid/,propid:/[\@\#]*@plainid/,defid:/[\@\#]*@plainid/,decid:/\@@plainid/,symid:/\#+@plainid/,symref:/\#\#@plainid/,optid:/(?:@id)?/,esmIdentifier:/[A-Za-z_\$\@][\w\$]*(?:\-+[\w\$]+)*\??/,propertyPath:/(?:[A-Za-z_\$][A-Za-z\d\-\_\$]*\.)?(?:[A-Za-z_\$][A-Za-z\d\-\_\$]*)/,tagNameIdentifier:/(?:[\w\-]+\:)?\w+(?:\-\w+)*/,variable:/[\w\$]+(?:-[\w\$]*)*\??/,varKeyword:/var|let|const/,tagIdentifier:/-*[a-zA-Z][\w\-]*/,implicitCall:/(?!\s(?:and|or|is|isa)\s)(?=\s[\w\'\"\/\[\{])/,cssModifier:/(?:\@+[\<\>\!]?[\w\-]+\+?|\.+@id\-?)/,cssPropertyPath:/[\@\.]*[\w\-\$]+(?:[\@\.]+[\w\-\$]+)*/,cssVariable:/(?:--|\$)[\w\-\$]+/,cssPropertyName:/[\w\-\$]+/,cssPropertyKey:/(?:@cssPropertyName(?:@cssModifier)*|@cssModifier+)(?:\s*[\:\=])/,cssUpModifier:/\.\.[\w\-\$]+/,cssIsModifier:/\.[\w\-\$]+/,regEx:/\/(?!\/\/)(?:[^\/\\]|\\.)*\/[igm]*/,regexpctl:/[(){}\[\]\$\^|\-*+?\.]/,regexpesc:/\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/,tokenizer:Pe};function mn(s){return Array.isArray(s)}function Or(s){return!mn(s)}function je(s){return typeof s=="string"}function Ar(s){return!je(s)}function Er(s){return!s}function Y(s,e){return s.ignoreCase&&e?e.toLowerCase():e}function Ve(s){return s.replace(/[&<>'"_]/g,"-")}function Mr(s,e){console.log(`${s.languageId}: ${e}`)}function M(s,e){return new Error(`${s.languageId}: ${e}`)}var zr={};function dn(s){let e=[],t=0,r=s.length,n="",i=0;for(;t<r;){let a=s[t++];if(a=="$"){let o=s[t++];if(o=="$"){n+="$";continue}n&&e.push(n),n="",o=="#"?e.push(0):o=="S"?e.push(parseInt(s[t++])+100):e.push(parseInt(o)+1)}else n+=a}return n&&e.push(n),zr[s]=e,e}function Z(s,e,t,r,n){let i=null,a=zr[e]||dn(e),o="";for(let p=0;p<a.length;p++){let c=a[p];typeof c=="string"?o+=c:c>100?(i===null&&(i=n.split(".")),o+=i[c-101]||""):c===100?o+=n:c===0?o+=t:c>0&&(o+=r[c-1])}return o}var Ne={};function xe(s,e){let t=e;if(Ne[t])return s.tokenizer[Ne[t]];for(;t&&t.length>0;){let r=s.tokenizer[t];if(r)return Ne[e]=t,r;let n=t.lastIndexOf(".");n<0?t=null:t=t.substr(0,n)}return null}function Br(s,e){let t=e;for(;t&&t.length>0;){if(s.stateNames[t])return!0;let n=t.lastIndexOf(".");n<0?t=null:t=t.substr(0,n)}return!1}function yn(s,e){if(!e||!Array.isArray(e))return!1;for(let t of e)if(!s(t))return!1;return!0}function Pr(s,e){return typeof s=="boolean"?s:e}function Fr(s,e){return typeof s=="string"?s:e}function _n(s){let e={};for(let t of s)e[t]=!0;return e}function Rr(s,e=!1){e&&(s=s.map(function(r){return r.toLowerCase()}));let t=_n(s);return e?function(r){return t[r.toLowerCase()]!==void 0&&t.hasOwnProperty(r.toLowerCase())}:function(r){return t[r]!==void 0&&t.hasOwnProperty(r)}}function De(s,e){let t=0;for(;e.indexOf("@")>=0&&t<5;)t++,e=e.replace(/@(\w+)/g,function(r,n){let i="";if(typeof s[n]=="string")i=s[n];else if(s[n]&&s[n]instanceof RegExp)i=s[n].source;else throw s[n]===void 0?M(s,"language definition does not contain attribute '"+n+"', used at: "+e):M(s,"attribute reference '"+n+"' must be a string, used at: "+e);return Er(i)?"":"(?:"+i+")"});return new RegExp(e,s.ignoreCase?"i":"")}function bn(s,e,t,r){if(r<0)return s;if(r<e.length)return e[r];if(r>=100){r=r-100;let n=t.split(".");if(n.unshift(t),r<n.length)return n[r]}return null}function xn(s,e,t,r){let n=-1,i=t,a=t.match(/^\$(([sS]?)(\d\d?)|#)(.*)$/);a&&(a[3]&&(n=parseInt(a[3]),a[2]&&(n=n+100)),i=a[4]);let o="~",p=i;!i||i.length===0?(o="!=",p=""):/^\w*$/.test(p)?o="==":(a=i.match(/^(@|!@|~|!~|==|!=)(.*)$/),a&&(o=a[1],p=a[2]));let c;if((o==="~"||o==="!~")&&/^(\w|\|)*$/.test(p)){let l=Rr(p.split("|"),s.ignoreCase);c=function(f){return o==="~"?l(f):!l(f)}}else if(o==="@"||o==="!@"){let l=s[p];if(!l)throw M(s,"the @ match target '"+p+"' is not defined, in rule: "+e);if(!yn(function(u){return typeof u=="string"},l))throw M(s,"the @ match target '"+p+"' must be an array of strings, in rule: "+e);let f=Rr(l,s.ignoreCase);c=function(u){return o==="@"?f(u):!f(u)}}else if(o==="~"||o==="!~")if(p.indexOf("$")<0){let l=De(s,"^"+p+"$");c=function(f){return o==="~"?l.test(f):!l.test(f)}}else c=function(l,f,u,h){return De(s,"^"+Z(s,p,f,u,h)+"$").test(l)};else if(p.indexOf("$")<0){let l=Y(s,p);c=function(f){return o==="=="?f===l:f!==l}}else{let l=Y(s,p);c=function(f,u,h,v,S){let E=Z(s,l,u,h,v);return o==="=="?f===E:f!==E}}return n===-1?{name:t,value:r,test:function(l,f,u,h){return c(l,l,f,u,h)}}:{name:t,value:r,test:function(l,f,u,h){let v=bn(l,f,u,n);return c(v||"",l,f,u,h)}}}function Ke(s,e,t){if(t){if(typeof t=="string")return t;if(t.token||t.token===""){if(typeof t.token!="string")throw M(s,"a 'token' attribute must be of type string, in rule: "+e);{let r={token:t.token};if(t.token.indexOf("$")>=0&&(r.tokenSubst=!0),typeof t.bracket=="string")if(t.bracket==="@open")r.bracket=1;else if(t.bracket==="@close")r.bracket=-1;else throw M(s,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+e);if(t.next){if(typeof t.next!="string")throw M(s,"the next state must be a string value in rule: "+e);{let n=t.next;if(!/^(@pop|@push|@popall)$/.test(n)&&(n[0]==="@"&&(n=n.substr(1)),n.indexOf("$")<0&&!Br(s,Z(s,n,"",[],""))))throw M(s,"the next state '"+t.next+"' is not defined in rule: "+e);r.next=n}}return typeof t.goBack=="number"&&(r.goBack=t.goBack),typeof t.switchTo=="string"&&(r.switchTo=t.switchTo),typeof t.log=="string"&&(r.log=t.log),typeof t._push=="string"&&(r._push=t._push),typeof t._pop=="string"&&(r._pop=t._pop),typeof t.mark=="string"&&(r.mark=t.mark),typeof t.fn=="string"&&(r.fn=t.fn),typeof t.nextEmbedded=="string"&&(r.nextEmbedded=t.nextEmbedded,s.usesEmbedded=!0),r}}else if(Array.isArray(t)){let r=[];for(let n=0,i=t.length;n<i;n++)r[n]=Ke(s,e,t[n]);return{group:r}}else if(t.cases){let r=[];for(let i in t.cases)if(t.cases.hasOwnProperty(i)){let a=Ke(s,e,t.cases[i]);i==="@default"||i==="@"||i===""?r.push({test:void 0,value:a,name:i}):i==="@eos"?r.push({test:function(o,p,c,l){return l},value:a,name:i}):r.push(xn(s,e,i,a))}let n=s.defaultToken;return{test:function(i,a,o,p){for(let c of r)if(!c.test||c.test(i,a,o,p))return c.value;return n}}}else throw M(s,"an action must be a string, an object with a 'token' or 'cases' attribute, or an array of actions; in rule: "+e)}else return{token:""}}var qe=class{constructor(e){this.regex=new RegExp("");this.action={token:""};this.matchOnlyAtLineStart=!1;this.name="";this.name=e,this.stats={time:0,count:0,hits:0}}setRegex(e,t){let r;if(typeof t=="string")r=t;else if(t instanceof RegExp)r=t.source;else throw M(e,"rules must start with a match string or regular expression: "+this.name);r.length==2&&r[0]=="\\"&&/[\{\}\(\)\[\]]/.test(r[1])&&(this.string=r[1]),this.matchOnlyAtLineStart=r.length>0&&r[0]==="^",this.name=this.name+": "+r,this.regex=De(e,"^(?:"+(this.matchOnlyAtLineStart?r.substr(1):r)+")")}setAction(e,t){this.action=Ke(e,this.name,t)}};function ke(s,e){if(!e||typeof e!="object")throw new Error("Monarch: expecting a language definition object");let t={};t.languageId=s,t.noThrow=!1,t.maxStack=100,t.start=typeof e.start=="string"?e.start:null,t.ignoreCase=Pr(e.ignoreCase,!1),t.tokenPostfix=Fr(e.tokenPostfix,"."+t.languageId),t.defaultToken=Fr(e.defaultToken,"source"),t.usesEmbedded=!1;let r=e;r.languageId=s,r.ignoreCase=t.ignoreCase,r.noThrow=t.noThrow,r.usesEmbedded=t.usesEmbedded,r.stateNames=e.tokenizer,r.defaultToken=t.defaultToken;function n(a,o,p){for(let c of p){let l=c.include;if(l){if(typeof l!="string")throw M(t,"an 'include' attribute must be a string at: "+a);if(l[0]==="@"&&(l=l.substr(1)),!e.tokenizer[l])throw M(t,"include target '"+l+"' is not defined at: "+a);n(a+"."+l,o,e.tokenizer[l])}else{let f=new qe(a);if(Array.isArray(c)&&c.length>=1&&c.length<=3)if(f.setRegex(r,c[0]),c.length>=3)if(typeof c[1]=="string")f.setAction(r,{token:c[1],next:c[2]});else if(typeof c[1]=="object"){let u=c[1];u.next=c[2],f.setAction(r,u)}else throw M(t,"a next state as the last element of a rule can only be given if the action is either an object or a string, at: "+a);else f.setAction(r,c[1]);else{if(!c.regex)throw M(t,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+a);c.name&&typeof c.name=="string"&&(f.name=c.name),c.matchOnlyAtStart&&(f.matchOnlyAtLineStart=Pr(c.matchOnlyAtLineStart,!1)),f.setRegex(r,c.regex),f.setAction(r,c.action)}o.push(f)}}}if(!e.tokenizer||typeof e.tokenizer!="object")throw M(t,"a language definition must define the 'tokenizer' attribute as an object");t.tokenizer=[];for(let a in e.tokenizer)if(e.tokenizer.hasOwnProperty(a)){t.start||(t.start=a);let o=e.tokenizer[a];t.tokenizer[a]=new Array,n("tokenizer."+a,t.tokenizer[a],o)}if(t.usesEmbedded=r.usesEmbedded,e.brackets){if(!Array.isArray(e.brackets))throw M(t,"the 'brackets' attribute must be defined as an array")}else e.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];let i=[];for(let a of e.brackets){let o=a;if(o&&Array.isArray(o)&&o.length===3&&(o={token:o[2],open:o[0],close:o[1]}),o.open===o.close)throw M(t,"open and close brackets in a 'brackets' attribute must be different: "+o.open+`
|
7 | hint: use the 'bracket' attribute if matching on equal brackets is required.`);if(typeof o.open=="string"&&typeof o.token=="string"&&typeof o.close=="string")i.push({token:o.token+t.tokenPostfix,open:Y(t,o.open),close:Y(t,o.close)});else throw M(t,"every element in the 'brackets' array must be a '{open,close,token}' object or array")}return t.brackets=i,t.noThrow=!0,t}var K=class{constructor(e,t,r){this.offset=e|0,this.type=t,this.language=r,this.kind=0,this.mods=0,this.value=null,this.stack=null}toString(){return this.value||""}get span(){return{offset:this.offset,length:this.value?this.value.length:0}}get indent(){return 0}get startOffset(){return this.offset}get endOffset(){return this.offset+(this.value?this.value.length:0)}clone(){let e=new K(this.offset,this.type,this.language);return e.value=this.value,e.stack=this.stack,e}match(e){if(typeof e=="string")if(e.indexOf(" ")>0)e=e.split(" ");else{let t=this.type.indexOf(e);return e[0]=="."?t>=0:t==0}if(e instanceof Array)for(let t of e){let r=this.type.indexOf(t);if(t[0]=="."?r>=0:r==0)return!0}return e instanceof RegExp?e.test(this.type):!1}},we=class{constructor(e,t){this.tokens=e,this.endState=t}};var Nr=10;function fe(s,e){return s.split(".")[e]}var He=class{static create(e,t){return this._INSTANCE.create(e,t)}constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}create(e,t){if(e!==null&&e.depth>=this._maxCacheDepth)return new J(e,t);let r=J.getStackElementId(e);r.length>0&&(r+="|"),r+=t;let n=this._entries[r];return n||(n=new J(e,t),this._entries[r]=n,n)}},se=He;se._INSTANCE=new He(Nr);var J=class{constructor(e,t){this.parent=e,this.state=t,this.depth=(this.parent?this.parent.depth:0)+1}static getStackElementId(e){let t="";for(;e!==null;)t.length>0&&(t+="|"),t+=e.state,e=e.parent;return t}static _equals(e,t){for(;e!==null&&t!==null;){if(e===t)return!0;if(e.state!==t.state)return!1;e=e.parent,t=t.parent}return e===null&&t===null}get indent(){return this.state.lastIndexOf(" ")-this.state.indexOf(" ")}get scope(){return this.part(2)}get detail(){return this.part(2)}part(e){return this.state.split(".")[e]}equals(e){return J._equals(this,e)}push(e){return se.create(this,e)}pop(){return this.parent}popall(){let e=this;for(;e.parent;)e=e.parent;return e}switchTo(e){return se.create(this.parent,e)}},Ze=class{static create(e){return this._INSTANCE.create(e)}constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}create(e){if(e!==null&&e.depth>=this._maxCacheDepth)return new oe(e);let t=J.getStackElementId(e),r=this._entries[t];return r||(r=new oe(e),this._entries[t]=r,r)}},ie=Ze;ie._INSTANCE=new Ze(Nr);var oe=class{constructor(e){this.stack=e}clone(){return ie.create(this.stack)}equals(e){return!(!(e instanceof oe)||!this.stack.equals(e.stack))}},Ge=class{constructor(){this._tokens=[],this._language=null,this._lastToken=new K(0,"start","imba"),this._lastTokenType=null}enterMode(e,t){this._language=t}emit(e,t,r){this._lastTokenType;let n=new K(e,t,this._language);return this._lastTokenType=t,this._lastToken=n,this._tokens.push(n),n}finalize(e){return new we(this._tokens,e)}},ae=class{constructor(e,t){this._modeId=e,this._lexer=t,this._profile=!1}dispose(){}getLoadStatus(){return{loaded:!0}}getInitialState(){let e=se.create(null,this._lexer.start);return ie.create(e)}tokenize(e,t,r){let n=new Ge,i=this._tokenize(e,t,r,n);return n.finalize(i)}_tokenize(e,t,r,n){return this._myTokenize(e,t,r,n)}_safeRuleName(e){return e?e.name:"(unknown)"}_rescope(e,t,r,n){let i=(e||"").split("-"),a=(t||"").split("-");if(e==t)return;let o=1;for(;i[o]&&i[o]==a[o];)o++;let p=i.length;for(;p>o;)r.push("pop."+i[--p]+"."+p);for(;a.length>o;){let c="push."+a[o++]+"."+(o-1);if(n){let l=fe(n,1);c+="."+l}r.push(c)}}_myTokenize(e,t,r,n){n.enterMode(r,this._modeId);let i=e.length,a=t.stack,o=null,p=0,c=this._profile,l=null,f=!0,u=[],h=0,v=[],S=null,E=-1;for(;f||p<i;){if(h++,h>1e3){if(p==E)throw console.log("infinite recursion",p,i,a,n),"infinite recursion in tokenizer?";E=p,h=0}let y=p,m=a.depth,b=l?l.groups.length:0,w=a.state,x=null,k=null,_=null,z=null;if(l){x=l.matches;let T=l.groups.shift();k=T.matched,_=T.action,z=l.rule,l.groups.length===0&&(l=null)}else{if(!f&&p>=i)break;if(f=!1,v=this._lexer.tokenizer[w],!v&&(v=xe(this._lexer,w),!v))throw M(this._lexer,"tokenizer state is not defined: "+w);let T=e.substr(p);for(let C of v)if(C.string!==void 0){if(T[0]===C.string){x=[C.string],k=C.string,_=C.action;break}}else if(p===0||!C.matchOnlyAtLineStart){if(c){C.stats.count++;let D=performance.now();x=T.match(C.regex),C.stats.time+=performance.now()-D,x&&C.stats.hits++}else x=T.match(C.regex);if(x){k=x[0],_=C.action;break}}}if(x||(x=[""],k=""),_||(p<i&&(x=[e.charAt(p)],k=x[0]),_=this._lexer.defaultToken),k===null)break;for(p+=k.length;Or(_)&&Ar(_)&&_.test;)_=_.test(k,x,w,p===i);let O=null;if(typeof _=="string"||Array.isArray(_))O=_;else if(_.group)O=_.group;else if(_.token!==null&&_.token!==void 0){if(_.tokenSubst?O=Z(this._lexer,_.token,k,x,w):O=_.token,_.goBack&&(p=Math.max(0,p-_.goBack)),_.switchTo&&typeof _.switchTo=="string"){let T=Z(this._lexer,_.switchTo,k,x,w);if(T[0]==="@"&&(T=T.substr(1)),xe(this._lexer,T)){let C=a.scope,D=fe(T,2);C!==D&&this._rescope(C,D,u,T),a=a.switchTo(T)}else throw M(this._lexer,"trying to switch to a state '"+T+"' that is undefined in rule: "+this._safeRuleName(z))}else{if(_.transform&&typeof _.transform=="function")throw M(this._lexer,"action.transform not supported");if(_.next)if(_.next==="@push"){if(a.depth>=this._lexer.maxStack)throw M(this._lexer,"maximum tokenizer stack size reached: ["+a.state+","+a.parent.state+",...]");a=a.push(w)}else if(_.next==="@pop"){if(a.depth<=1)throw M(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(z));{let T=a;a=a.pop();let C=fe(T.state,2),D=fe(a.state,2);C!==D&&this._rescope(C,D,u,a.state)}}else if(_.next==="@popall")a=a.popall();else{let T=Z(this._lexer,_.next,k,x,w);T[0]==="@"&&(T=T.substr(1));let C=fe(T,2);if(xe(this._lexer,T))C!=a.scope&&this._rescope(a.scope||"",C,u,T),a=a.push(T);else throw M(this._lexer,"trying to set a next state '"+T+"' that is undefined in rule: "+this._safeRuleName(z))}}_.log&&typeof _.log=="string"&&Mr(this._lexer,this._lexer.languageId+": "+Z(this._lexer,_.log,k,x,w)),_.mark&&n.emit(y+r,_.mark,a)}if(O===null)throw M(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(z));if(Array.isArray(O)){if(l&&l.groups.length>0)throw M(this._lexer,"groups cannot be nested: "+this._safeRuleName(z));if(x.length!==O.length+1)throw M(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(z));let T=0;for(let C=1;C<x.length;C++)T+=x[C].length;if(T!==k.length)throw M(this._lexer,"with groups, all characters should be matched in consecutive groups in rule: "+this._safeRuleName(z));l={rule:z,matches:x,groups:[]};for(let C=0;C<O.length;C++)l.groups[C]={action:O[C],matched:x[C+1]};p-=k.length;continue}else{if(O==="@rematch"&&(p-=k.length,k="",x=null,O=""),k.length===0)if(i===0||m!==a.depth||w!==a.state||(l?l.groups.length:0)!==b){for(typeof O=="string"&&O&&n.emit(p+r,O,a);u.length>0;)n.emit(p+r,u.shift(),a);continue}else throw M(this._lexer,"no progress in tokenizer in rule: "+this._safeRuleName(z));let T=null;if(je(O)&&O.indexOf("@brackets")===0){let D=O.substr(9),P=kn(this._lexer,k);if(!P)throw M(this._lexer,"@brackets token returned but no bracket defined as: "+k);T=Ve(P.token+D)}else{let D=O===""?"":O+this._lexer.tokenPostfix;T=Ve(D)}let C=n.emit(y+r,T,a);for(C.stack=a,o&&o!=C&&(o.value=e.slice(o.offset-r,y)),o=C;u.length>0;)n.emit(p+r,u.shift(),a)}}return o&&!o.value&&(o.value=e.slice(o.offset-r)),ie.create(a)}};function kn(s,e){if(!e)return null;e=Y(s,e);let t=s.brackets;for(let r of t){if(r.open===e)return{token:r.token,bracketType:1};if(r.close===e)return{token:r.token,bracketType:-1}}return null}var jr=Symbol(),ve=class{constructor(e=null){this[F](e),N(this,jr)}[F](e=null,t=!0,r=!0){this.offset=e?e.offset:void 0,this.text=e?e.text:void 0,this.tokens=e?e.tokens:void 0,this.startState=e?e.startState:void 0,this.endState=e?e.endState:void 0}clone(e=this.offset){let t=[],r=e-this.offset;for(let n=0,i=I(this.tokens),a=i.length;n<a;n++){let o=i[n],p=o.clone();p.offset=o.offset+r,t.push(p)}return new ve({offset:e,startState:this.startState,endState:this.endState,text:this.text,tokens:t})}},$e=ve;(()=>{$(ve,jr,"LexedLine",16)})();var wn=ke("imba",Re),le=new ae("imba",wn);var ue=["comment","string","keyword","number","regexp","operator","namespace","type","struct","class","interface","enum","typeParameter","function","member","macro","variable","parameter","property","label"];for(let s=0,e=I(ue),t=e.length;s<t;s++){let r=e[s];ue[r]=s}var L={Declaration:1<<0,Import:1<<1,Export:1<<2,Global:1<<3,ReadOnly:1<<4,Static:1<<5,Modification:1<<6,Deprecated:1<<7,Access:1<<8,Root:1<<9,Special:1<<10,Class:1<<11,Member:1<<12,Function:1<<13,Def:1<<14,Var:1<<15,Let:1<<16,Const:1<<17,Get:1<<18,Set:1<<19},$n=Object.keys(L).map(function(s){return s.toLowerCase()});for(let s=0,e=I(Object.keys(L)),t=e.length;s<t;s++){let r=e[s];L[r.toLowerCase()]=L[r]}var V={Keyword:1<<0,Access:1<<1,Key:1<<2,TagName:1<<3,TagEvent:1<<4,TagFlag:1<<5,TagProp:1<<6,TagEventModifier:1<<7,Value:1<<8,Path:1<<9,StyleProp:1<<10,StyleValue:1<<11,Type:1<<12,StyleModifier:1<<13,StyleSelector:1<<14,VarName:1<<15,ImportName:1<<16},g={Keyword:1<<0,Root:1<<1,Class:1<<2,Block:1<<3},Se={and:g.Block,await:g.Block,begin:g.Block,break:g.Block,by:g.Block,case:g.Block,catch:g.Block,class:g.Block,const:g.Block,continue:g.Block,css:g.Class|g.Root,debugger:g.Block,def:g.Class|g.Block,get:g.Class,set:g.Class,delete:g.Block,do:g.Block,elif:g.Block,else:g.Block,export:g.Root,extends:g.Block,false:g.Block,finally:g.Block,for:g.Block,if:g.Block,import:g.Root,in:g.Block,instanceof:g.Block,is:g.Block,isa:g.Block,isnt:g.Block,let:g.Block,loop:g.Block,module:g.Block,nil:g.Block,no:g.Block,not:g.Block,null:g.Block,of:g.Block,or:g.Block,require:g.Block,return:g.Block,self:g.Block,static:g.Block|g.Class,super:g.Block,switch:g.Block,tag:g.Root,then:g.Block,this:g.Block,throw:g.Block,true:g.Block,try:g.Block,typeof:g.Block,undefined:g.Block,unless:g.Block,until:g.Block,var:g.Block,when:g.Block,while:g.Block,yes:g.Block},j={File:1,Module:2,Namespace:3,Package:4,Class:5,Method:6,Property:7,Field:8,Constructor:9,Enum:10,Interface:11,Function:12,Variable:13,Constant:14,String:15,Number:16,Boolean:17,Array:18,Object:19,Key:20,Null:21,EnumMember:22,Struct:23,Event:24,Operator:25,TypeParameter:26};for(let s=0,e=Object.keys(j),t=e.length,r,n;s<t;s++)r=e[s],n=j[r],j[n]=r;var he=Symbol.for("#datatype"),d={None:0,ConstVariable:1<<0,LetVariable:1<<1,Property:1<<2,EnumMember:1<<3,Function:1<<4,Class:1<<5,LocalComponent:1<<6,GlobalComponent:1<<7,RegularEnum:1<<8,ValueModule:1<<9,Parameter:1<<10,TypeLiteral:1<<11,ObjectLiteral:1<<12,Method:1<<13,Constructor:1<<14,GetAccessor:1<<15,SetAccessor:1<<16,Signature:1<<17,TypeParameter:1<<18,TypeAlias:1<<19,ExportValue:1<<20,Alias:1<<21,Prototype:1<<22,ExportStar:1<<23,Optional:1<<24,IsSpecial:1<<27,IsImport:1<<28,IsStatic:1<<29,IsGlobal:1<<30,IsRoot:1<<31};d.Component=d.LocalComponent|d.GlobalComponent;d.Variable=d.LetVariable|d.ConstVariable|d.Parameter;d.Accessor=d.GetAccessor|d.SetAccessor;d.ClassMember=d.Method|d.Accessor|d.Property;d.Scoped=d.Function|d.Variable|d.Class|d.Enum|d.LocalComponent;d.Type=d.Component|d.Class;d.GlobalVar=d.ConstVariable|d.IsGlobal;d.SpecialVar=d.ConstVariable|d.IsSpecial;var Vr=[["entity.name.component.local",0,d.LocalComponent],["entity.name.component.global",0,d.GlobalComponent],["entity.name.function",0,d.Function],["entity.name.class",0,d.Class],["entity.name.constructor",0,d.Method],["entity.name.def",0,d.Method],["entity.name.get",0,d.GetAccessor],["entity.name.set",0,d.SetAccessor],["field",0,d.Property],["decl-let",0,d.LetVariable],["decl-for-index",0,d.LetVariable,{datatype:"\\number"}],["decl-for",0,d.LetVariable,{kind:"for"}],["decl-var",0,d.LetVariable],["decl-param",0,d.Parameter],["decl-const",0,d.ConstVariable],["decl-import",0,d.ConstVariable|d.IsImport]],We={},Dr=Symbol(),Ue=class{[F](e=null,t=!0,r=!0){var n;this.value=e?e.value:void 0,this.body=e&&(n=e.body)!==void 0?n:null}static typeMatch(e){if(We[e]!=null)return We[e];for(let t=0,r=I(Vr),n=r.length;t<n;t++){let[i,a,o,p]=r[t];if(e.indexOf(i)>=0)return We[e]=Vr[t]}return null}static forToken(e,t,r=0){let n=this.typeMatch(t);return n?new this(n[2],e.value,e,n[3]):null}constructor(e,t,r,n=null){this[F](),this.flags=e,this.name=t,this.node=r,this.desc=n,N(this,Dr)}get importSource(){return this.importedΦ?this.node.context.closest("imports").sourcePath:null}get exportName(){return this.node.prev.match("keyword.as")?this.node.prev.prev.value:this.node.match(".default")?"default":this.node.value}get importInfo(){if(!this.importedΦ)return null;let e=this.node.context.closest("imports");return{exportName:this.exportName,name:this.node.value,isTypeOnly:e.isTypeOnly,path:e.sourcePath}}get datatype(){var i;let e,t=this.desc&&this.desc.datatype;if(t)return t;if(this[he])return this[he];let r=this.node&&this.node.nextNode;if(r&&r.type=="type")return r;let n=this.scope;if(n&&((i=this.desc)==null?void 0:i.kind)=="for"){let a=n.doc.getDestructuredPath(this.node,[[n.expression,"__@iterable"]]);return this[he]||(this[he]=a)}return(e=this.importInfo)?e:null}get staticΦ(){return this.node&&this.node.mods&L.Static}get itervarΦ(){return this.node&&this.node.match(".decl-for")}get variableΦ(){return this.flags&d.Variable}get parameterΦ(){return this.flags&d.Parameter}get memberΦ(){return this.flags&d.ClassMember}get scopedΦ(){return this.flags&d.Scoped}get typeΦ(){return this.flags&d.Type}get globalΦ(){return this.flags&d.IsGlobal}get importedΦ(){return this.flags&d.IsImport}get componentΦ(){return this.flags&d.Component}get escapedName(){return this.name}get scope(){var e,t;return(t=(e=this.node)==null?void 0:e.context)==null?void 0:t.scope}addReference(e){return this.references||(this.references=[]),this.references.push(e),e.symbol=this,this}dereference(e){let t=this.references.indexOf(e);return t>=0&&(e.symbol=null,this.references.splice(t,1)),this}get kind(){return this.variableΦ?j.Variable:this.flags&d.Class?j.Class:this.flags&d.Component?j.Class:this.flags&d.Property?j.Field:this.flags&d.Method?this.escapedName=="constructor"?j.Constructor:j.Method:this.flags&d.Function?j.Function:j.Method}get semanticKind(){return this.flags&d.Parameter?"parameter":this.variableΦ?"variable":this.typeΦ?"type":this.flags&d.Function?"function":this.memberΦ?"member":this.componentΦ?"component":"variable"}get semanticFlags(){let e=0;return this.flags&d.ConstVariable&&(e|=L.ReadOnly),this.staticΦ&&(e|=L.Static),this.flags&d.IsImport&&(e|=L.Import),this.flags&d.IsGlobal&&(e|=L.Global),this.flags&d.IsRoot&&(e|=L.Root),this.flags&d.IsSpecial&&(e|=L.Special),e}},G=Ue;(()=>{$(Ue,Dr,"Sym",16)})();var vn=Symbol(),Je=class extends G{},Kr=Je;(()=>{$(Je,vn,"ForVar",0)})();var Sn=Symbol(),Xe=class{},qr=Xe;(()=>{$(Xe,Sn,"SymbolMap",0)})();var Gr={global:{datatype:"globalThis"},imba:{datatype:"globalThis.imba"},module:{},window:{datatype:"globalThis.window"},document:{datatype:"globalThis.document"},exports:{},console:{datatype:"globalThis.console"},process:{datatype:"globalThis.process"},parseInt:{datatype:"globalThis.parseInt"},parseFloat:{datatype:"globalThis.parseFloat"},setTimeout:{datatype:"globalThis.setTimeout"},setInterval:{datatype:"globalThis.setInterval"},setImmediate:{datatype:"globalThis.setImmediate"},clearTimeout:{datatype:"globalThis.clearTimeout"},clearInterval:{datatype:"globalThis.clearInterval"},clearImmediate:{datatype:"globalThis.clearImmediate"},globalThis:{datatype:"globalThis"},isNaN:{datatype:"globalThis.isNaN"},isFinite:{datatype:"globalThis.isFinite"},__dirname:{datatype:"\\string"},__filename:{datatype:"\\string"},__realname:{datatype:"\\string"}},Hr=Symbol(),$t=class{[F](e=null,t=!0,r=!0){var n;this.type=e&&(n=e.type)!==void 0?n:"",this.start=e?e.start:void 0,this.end=e?e.end:void 0,this.parent=e?e.parent:void 0}static build(e,t,r,n,i){return new this(e,t,r,n,i)}constructor(e,t,r,n){this[F](),this.doc=e,this.start=t,this.end=null,this.type=n,this.parent=r,this.$name=null,t.scope=this,N(this,Hr)}pop(e){return this.end=e,e.start=this.start,e.pops=this,this.start.end=e,this.visit(),this.parent}find(e){return this.findChildren(e,!0)[0]}get childNodes(){return this.doc.getNodesInScope(this)}findChildren(e,t=!1){let r=[],n=this.start;for(;n;){if(t&&r.length)return r;if(n.scope&&n.scope!=this){n.scope.match(e)&&r.push(n.scope),n=n.scope.next;continue}if(n.match(e)&&r.push(n),n==this.end)break;n=n.next}return r}closest(e){return this.match(e)?this:this.parent?this.parent.closest(e):null}visit(){return this}get memberΦ(){return!1}get topΦ(){return!1}get selfScope(){return this.memberΦ||this.topΦ?this:this.parent.selfScope}get name(){return this.$name||""}get value(){return this.doc.content.slice(this.start.offset,this.next?this.next.offset:-1)}get next(){return this.end?this.end.next:null}get prev(){return this.start?this.start.prev:null}match(e){return typeof e=="string"?this.type==e:R(e,RegExp)?e.test(this.type):R(e,Function)?e(this):!0}},me=$t;(()=>{$($t,Hr,"Node",16)})();var Zr=Symbol(),vt=class extends me{constructor(e,t,r,n,i=[]){super(e,t,r,n),N(this,Zr)}get scope(){return this.parent.scope}get varmap(){return this.parent.varmap}register(e){return this.parent.register(e)}lookup(...e){return this.parent.lookup(...e)}},B=vt;(()=>{$(vt,Zr,"Group",16)})();var Tn=Symbol(),St=class extends B{},Qe=St;(()=>{$(St,Tn,"ValueNode",0)})();var Cn=Symbol(),Tt=class extends B{},Ye=Tt;(()=>{$(Tt,Cn,"StringNode",0)})();var In=Symbol(),Ct=class extends B{get properties(){return this.findChildren("styleprop")}},et=Ct;(()=>{$(Ct,In,"StyleNode",0)})();var On=Symbol(),It=class extends B{},tt=It;(()=>{$(It,On,"StyleRuleNode",0)})();var Wr=Symbol(),Ot=class extends me{constructor(e,t,r,n,i=[]){if(super(e,t,r,n),this.children=[],this.entities=[],this.refs=[],this.varmap=Object.create(r?r.varmap:{}),R(this,ee))for(let a=0,o=Object.keys(Gr),p=o.length,c,l;a<p;a++){c=o[a],l=Gr[c];let f={value:c,offset:-1,mods:0};this.varmap[c]=new G(d.GlobalVar,c,f,l)}return this.indent=i[3]&&i[3][0]==" "?i[3].length:0,this.setup(),this;N(this,Wr)}setup(){if(this.handlerΦ&&(this.varmap.e=new G(d.SpecialVar,"e",null,"eventReference")),(this.classΦ||this.propertyΦ)&&(this.ident=this.token=ye(this.start,"entity."),this.ident&&(this.ident.body=this),this.ident&&this.ident.type=="entity.name.def.render"&&(this.$name="render",this.ident.symbol)))return this.ident.symbol.name="render"}get selfPath(){let e=this.path;return this.propertyΦ?e.slice(0,e.lastIndexOf(".")):e}get path(){let e=this.parent?this.parent.path:"";if(this.propertyΦ){let t=this.staticΦ?".":".prototype.";return this.parent?""+this.parent.path+t+this.name:this.name}return this.componentΦ?this.name[0]==this.name[0].toLowerCase()?this.name.replace(/\-/g,"_")+"$$TAG$$":this.name:this.classΦ?this.name:e}get allowedKeywordTypes(){return this.classΦ?g.Class:this.rootΦ?g.Root|g.Block:g.Block}get componentΦ(){return!!this.type.match(/^component/)}get rootΦ(){return R(this,ee)}get topΦ(){return R(this,ee)}get classΦ(){return!!this.type.match(/^class/)||this.componentΦ}get defΦ(){return!!this.type.match(/def|get|set/)}get staticΦ(){return!!(this.ident&&this.ident.mods&L.Static)}get handlerΦ(){return!!this.type.match(/handler|spy/)}get memberΦ(){return!!this.type.match(/def|get|set/)}get propertyΦ(){return!!this.type.match(/def|get|set|field/)}get flowΦ(){return!!this.type.match(/if|else|elif|unless|for|while|until/)}get closureΦ(){return!!this.type.match(/class|component|def|get|set|do/)}get scope(){return this}get name(){return this.$name||(this.ident?this.ident.value:"")}visit(){return this}register(e){return e.scopedΦ&&(this.varmap[e.name]=e,this.rootΦ&&(e.flags|=d.IsRoot)),e}lookup(e,t=d.Scoped){let r,n=e.value;return n[n.length-1]=="!"&&(n=n.slice(0,-1)),(r=this.varmap[n])?r:null}toOutline(){return{kind:this.type,name:this.name,children:[],span:this.ident?this.ident.span:this.start.span}}},q=Ot;(()=>{$(Ot,Wr,"Scope",16)})();var An=Symbol(),At=class extends q{},ee=At;(()=>{$(At,An,"Root",0)})();var En=Symbol(),Et=class extends q{},Ur=Et;(()=>{$(Et,En,"Class",0)})();var Mn=Symbol(),Mt=class extends q{},Jr=Mt;(()=>{$(Mt,Mn,"Method",0)})();var zn=Symbol(),zt=class extends q{},Xr=zt;(()=>{$(zt,zn,"Flow",0)})();var Bn=Symbol(),Bt=class extends q{get expression(){return this.find("keyword.in keyword.of").next.next}get forvars(){return Object.values(this.varmap).filter(function(e){return e.itervarΦ})}},rt=Bt;(()=>{$(Bt,Bn,"ForScope",0)})();var Ln=Symbol(),Lt=class extends q{register(e){return this.parent.register(e)}lookup(...e){return this.parent.lookup(...e)}},nt=Lt;(()=>{$(Lt,Ln,"WeakScope",0)})();var Pn=Symbol(),Pt=class extends q{get selfScope(){return this}},st=Pt;(()=>{$(Pt,Pn,"FieldScope",0)})();var Fn=Symbol(),Ft=class extends B{},it=Ft;(()=>{$(Ft,Fn,"SelectorNode",0)})();var Rn=Symbol(),Rt=class extends B{get propertyName(){var e;return this.start.next.match("style.property.name")?this.start.next.value:(e=this.parent.prevProperty)==null?void 0:e.propertyName}get modifier(){if(this.start.next.match("style.property.modifier"))return this.start.next.value}get styleValue(){return!0}},ot=Rt;(()=>{$(Rt,Rn,"StylePropKey",0)})();var Nn=Symbol(),Nt=class extends B{get key(){return this.parent.key}get propertyName(){return this.parent.propertyName}get modifier(){return this.parent.modifier}},at=Nt;(()=>{$(Nt,Nn,"StylePropValue",0)})();var jn=Symbol(),jt=class extends B{get key(){return this.find("stylepropkey")}get prevProperty(){return this.start.prev.pops?this.start.prev.pops:null}get propertyName(){var e;return(e=this.key)==null?void 0:e.propertyName}get modifier(){var e;return(e=this.key)==null?void 0:e.modifier}},lt=jt;(()=>{$(jt,jn,"StylePropNode",0)})();var Vn=Symbol(),Vt=class extends B{},ct=Vt;(()=>{$(Vt,Vn,"StyleInterpolation",0)})();var Dn=Symbol(),Dt=class extends B{get innerText(){return this.value.slice(1,-1)}},pt=Dt;(()=>{$(Dt,Dn,"PathNode",0)})();var Kn=Symbol(),Kt=class extends B{get name(){let e=this.findChildren("tag.name").join("");return e=="self"?this.closest("component").name:e}get localΦ(){return this.name[0]==this.name[0].toUpperCase()}get tagName(){return this.name}get parentTag(){var e;return(e=this.closest("tagcontent"))==null?void 0:e.ownerTag}get ancestorTags(){var e;return(e=this.closest("tagcontent"))==null?void 0:e.ownerTags}get ancestorPath(){return this.ancestorTags.map(function(e){return e.tagName}).join(".")}get pathName(){return"<"+this.name+">"}get outline(){return this.findChildren(/tag\.(reference|name|id|white|flag|event(?!\-))/).join("")}},ft=Kt;(()=>{$(Kt,Kn,"TagNode",0)})();var qn=Symbol(),qt=class extends B{get propertyName(){return this.start.next.match("tag.attr")?this.start.next.value:""}get tagName(){return this.parent.name}},ut=qt;(()=>{$(qt,qn,"TagAttrNode",0)})();var Gn=Symbol(),Gt=class extends B{get propertyName(){return this.parent.propertyName}get tagName(){return this.parent.tagName}},ht=Gt;(()=>{$(Gt,Gn,"TagAttrValueNode",0)})();var Hn=Symbol(),Ht=class extends nt{get ownerTag(){return this.start.prev.pops}get ownerTags(){let e=[this.ownerTag],t;for(;t=e[0].parentTag;)e.unshift(t);return e}},mt=Ht;(()=>{$(Ht,Hn,"TagContent",0)})();var Zn=Symbol(),Zt=class extends B{get name(){return this.findChildren("tag.event.name").join("").replace("@","")}},dt=Zt;(()=>{$(Zt,Zn,"Listener",0)})();var Wn=Symbol(),Wt=class extends B{},Te=Wt;(()=>{$(Wt,Wn,"ParensNode",0)})();var Un=Symbol(),Ut=class extends B{static build(e,t,r,n,i){let a=this,o=e.content[t.offset-1];return!o||` [{(|=&-;
|