mirror of
https://github.com/owncast/owncast.git
synced 2025-01-04 15:47:41 +03:00
1 line
No EOL
22 KiB
JavaScript
Vendored
1 line
No EOL
22 KiB
JavaScript
Vendored
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9296],{59296:function(e,t,r){function mkJavaScript(e){var t,r,n=e.statementIndent,o=e.jsonld,a=e.json||o,s=e.typescript,p=e.wordCharacters||/[\w$\xa1-\uffff]/,c=function(){function kw(e){return{type:e,style:"keyword"}}var e=kw("keyword a"),t=kw("keyword b"),r=kw("keyword c"),n=kw("keyword d"),o=kw("operator"),a={type:"atom",style:"atom"};return{if:kw("if"),while:e,with:e,else:t,do:t,try:t,finally:t,return:n,break:n,continue:n,new:kw("new"),delete:r,void:r,throw:r,debugger:kw("debugger"),var:kw("var"),const:kw("var"),let:kw("var"),function:kw("function"),catch:kw("catch"),for:kw("for"),switch:kw("switch"),case:kw("case"),default:kw("default"),in:o,typeof:o,instanceof:o,true:a,false:a,null:a,undefined:a,NaN:a,Infinity:a,this:kw("this"),class:kw("class"),super:kw("atom"),yield:r,export:kw("export"),import:kw("import"),extends:r,await:r}}(),i=/[+\-*&%=<>!?|~^@]/,u=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function readRegexp(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}function ret(e,n,o){return t=e,r=o,n}function tokenBase(e,t){var r=e.next();if('"'==r||"'"==r)return t.tokenize=tokenString(r),t.tokenize(e,t);if("."==r&&e.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return ret("number","number");if("."==r&&e.match(".."))return ret("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return ret(r);if("="==r&&e.eat(">"))return ret("=>","operator");if("0"==r&&e.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return ret("number","number");if(/\d/.test(r))return e.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),ret("number","number");else if("/"==r)return e.eat("*")?(t.tokenize=tokenComment,tokenComment(e,t)):e.eat("/")?(e.skipToEnd(),ret("comment","comment")):expressionAllowed(e,t,1)?(readRegexp(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),ret("regexp","string.special")):(e.eat("="),ret("operator","operator",e.current()));else if("`"==r)return t.tokenize=tokenQuasi,tokenQuasi(e,t);else if("#"==r&&"!"==e.peek())return e.skipToEnd(),ret("meta","meta");else if("#"==r&&e.eatWhile(p))return ret("variable","property");else if("<"==r&&e.match("!--")||"-"==r&&e.match("->")&&!/\S/.test(e.string.slice(0,e.start)))return e.skipToEnd(),ret("comment","comment");else if(i.test(r))return((">"!=r||!t.lexical||">"!=t.lexical.type)&&(e.eat("=")?("!"==r||"="==r)&&e.eat("="):/[<>*+\-|&?]/.test(r)&&(e.eat(r),">"==r&&e.eat(r))),"?"==r&&e.eat("."))?ret("."):ret("operator","operator",e.current());else if(p.test(r)){e.eatWhile(p);var n=e.current();if("."!=t.lastType){if(c.propertyIsEnumerable(n)){var o=c[n];return ret(o.type,o.style,n)}if("async"==n&&e.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return ret("async","keyword",n)}return ret("variable","variable",n)}}function tokenString(e){return function(t,r){var n,a=!1;if(o&&"@"==t.peek()&&t.match(u))return r.tokenize=tokenBase,ret("jsonld-keyword","meta");for(;null!=(n=t.next())&&(n!=e||a);)a=!a&&"\\"==n;return a||(r.tokenize=tokenBase),ret("string","string")}}function tokenComment(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=tokenBase;break}n="*"==r}return ret("comment","comment")}function tokenQuasi(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=tokenBase;break}n=!n&&"\\"==r}return ret("quasi","string.special",e.current())}function findFatArrow(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if(s){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,r));n&&(r=n.index)}for(var o=0,a=!1,c=r-1;c>=0;--c){var i=e.string.charAt(c),u="([{}])".indexOf(i);if(u>=0&&u<3){if(!o){++c;break}if(0==--o){"("==i&&(a=!0);break}}else if(u>=3&&u<6)++o;else if(p.test(i))a=!0;else if(/["'\/`]/.test(i))for(;;--c){if(0==c)return;if(e.string.charAt(c-1)==i&&"\\"!=e.string.charAt(c-2)){c--;break}}else if(a&&!o){++c;break}}a&&!o&&(t.fatArrowAt=c)}}var l={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function JSLexical(e,t,r,n,o,a){this.indented=e,this.column=t,this.type=r,this.prev=o,this.info=a,null!=n&&(this.align=n)}function inScope(e,t){for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(var r=n.vars;r;r=r.next)if(r.name==t)return!0}function parseJS(e,t,r,n,o){var s=e.cc;for(m.state=e,m.stream=o,m.marked=null,m.cc=s,m.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((s.length?s.pop():a?expression:statement)(r,n)){for(;s.length&&s[s.length-1].lex;)s.pop()();if(m.marked)return m.marked;if("variable"==r&&inScope(e,n))return"variableName.local";return t}}var m={state:null,marked:null,cc:null};function pass(){for(var e=arguments.length-1;e>=0;e--)m.cc.push(arguments[e])}function cont(){return pass.apply(null,arguments),!0}function inList(e,t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}function register(t){var r=m.state;if(m.marked="def",r.context){if("var"==r.lexical.info&&r.context&&r.context.block){var n=registerVarScoped(t,r.context);if(null!=n){r.context=n;return}}else if(!inList(t,r.localVars)){r.localVars=new Var(t,r.localVars);return}}e.globalVars&&!inList(t,r.globalVars)&&(r.globalVars=new Var(t,r.globalVars))}function registerVarScoped(e,t){if(!t)return null;if(t.block){var r=registerVarScoped(e,t.prev);return r?r==t.prev?t:new Context(r,t.vars,!0):null}return inList(e,t.vars)?t:new Context(t.prev,new Var(e,t.vars),!1)}function isModifier(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function Context(e,t,r){this.prev=e,this.vars=t,this.block=r}function Var(e,t){this.name=e,this.next=t}var f=new Var("this",new Var("arguments",null));function pushcontext(){m.state.context=new Context(m.state.context,m.state.localVars,!1),m.state.localVars=f}function pushblockcontext(){m.state.context=new Context(m.state.context,m.state.localVars,!0),m.state.localVars=null}function popcontext(){m.state.localVars=m.state.context.vars,m.state.context=m.state.context.prev}function pushlex(e,t){var result=function(){var r=m.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var o=r.lexical;o&&")"==o.type&&o.align;o=o.prev)n=o.indented;r.lexical=new JSLexical(n,m.stream.column(),e,null,r.lexical,t)};return result.lex=!0,result}function poplex(){var e=m.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function expect(e){function exp(t){return t==e?cont():";"==e||"}"==t||")"==t||"]"==t?pass():cont(exp)}return exp}function statement(e,t){if("var"==e)return cont(pushlex("vardef",t),vardef,expect(";"),poplex);if("keyword a"==e)return cont(pushlex("form"),parenExpr,statement,poplex);if("keyword b"==e)return cont(pushlex("form"),statement,poplex);if("keyword d"==e)return m.stream.match(/^\s*$/,!1)?cont():cont(pushlex("stat"),maybeexpression,expect(";"),poplex);if("debugger"==e)return cont(expect(";"));if("{"==e)return cont(pushlex("}"),pushblockcontext,block,poplex,popcontext);if(";"==e)return cont();if("if"==e)return"else"==m.state.lexical.info&&m.state.cc[m.state.cc.length-1]==poplex&&m.state.cc.pop()(),cont(pushlex("form"),parenExpr,statement,poplex,maybeelse);if("function"==e)return cont(functiondef);if("for"==e)return cont(pushlex("form"),pushblockcontext,forspec,statement,popcontext,poplex);if("class"==e||s&&"interface"==t)return m.marked="keyword",cont(pushlex("form","class"==e?e:t),className,poplex);if("variable"==e)return s&&"declare"==t?(m.marked="keyword",cont(statement)):s&&("module"==t||"enum"==t||"type"==t)&&m.stream.match(/^\s*\w/,!1)?(m.marked="keyword","enum"==t)?cont(enumdef):"type"==t?cont(typename,expect("operator"),typeexpr,expect(";")):cont(pushlex("form"),pattern,expect("{"),pushlex("}"),block,poplex,poplex):s&&"namespace"==t?(m.marked="keyword",cont(pushlex("form"),expression,statement,poplex)):s&&"abstract"==t?(m.marked="keyword",cont(statement)):cont(pushlex("stat"),maybelabel);return"switch"==e?cont(pushlex("form"),parenExpr,expect("{"),pushlex("}","switch"),pushblockcontext,block,poplex,poplex,popcontext):"case"==e?cont(expression,expect(":")):"default"==e?cont(expect(":")):"catch"==e?cont(pushlex("form"),pushcontext,maybeCatchBinding,statement,poplex,popcontext):"export"==e?cont(pushlex("stat"),afterExport,poplex):"import"==e?cont(pushlex("stat"),afterImport,poplex):"async"==e?cont(statement):"@"==t?cont(expression,statement):pass(pushlex("stat"),expression,expect(";"),poplex)}function maybeCatchBinding(e){if("("==e)return cont(funarg,expect(")"))}function expression(e,t){return expressionInner(e,t,!1)}function expressionNoComma(e,t){return expressionInner(e,t,!0)}function parenExpr(e){return"("!=e?pass():cont(pushlex(")"),maybeexpression,expect(")"),poplex)}function expressionInner(e,t,r){if(m.state.fatArrowAt==m.stream.start){var n=r?arrowBodyNoComma:arrowBody;if("("==e)return cont(pushcontext,pushlex(")"),commasep(funarg,")"),poplex,expect("=>"),n,popcontext);if("variable"==e)return pass(pushcontext,pattern,expect("=>"),n,popcontext)}var o=r?maybeoperatorNoComma:maybeoperatorComma;return l.hasOwnProperty(e)?cont(o):"function"==e?cont(functiondef,o):"class"==e||s&&"interface"==t?(m.marked="keyword",cont(pushlex("form"),classExpression,poplex)):"keyword c"==e||"async"==e?cont(r?expressionNoComma:expression):"("==e?cont(pushlex(")"),maybeexpression,expect(")"),poplex,o):"operator"==e||"spread"==e?cont(r?expressionNoComma:expression):"["==e?cont(pushlex("]"),arrayLiteral,poplex,o):"{"==e?contCommasep(objprop,"}",null,o):"quasi"==e?pass(quasi,o):"new"==e?cont(maybeTarget(r)):cont()}function maybeexpression(e){return e.match(/[;\}\)\],]/)?pass():pass(expression)}function maybeoperatorComma(e,t){return","==e?cont(maybeexpression):maybeoperatorNoComma(e,t,!1)}function maybeoperatorNoComma(e,t,r){var n=!1==r?maybeoperatorComma:maybeoperatorNoComma,o=!1==r?expression:expressionNoComma;if("=>"==e)return cont(pushcontext,r?arrowBodyNoComma:arrowBody,popcontext);if("operator"==e)return/\+\+|--/.test(t)||s&&"!"==t?cont(n):s&&"<"==t&&m.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?cont(pushlex(">"),commasep(typeexpr,">"),poplex,n):"?"==t?cont(expression,expect(":"),o):cont(o);if("quasi"==e)return pass(quasi,n);if(";"!=e){if("("==e)return contCommasep(expressionNoComma,")","call",n);if("."==e)return cont(property,n);if("["==e)return cont(pushlex("]"),maybeexpression,expect("]"),poplex,n);if(s&&"as"==t)return m.marked="keyword",cont(typeexpr,n);if("regexp"==e)return m.state.lastType=m.marked="operator",m.stream.backUp(m.stream.pos-m.stream.start-1),cont(o)}}function quasi(e,t){return"quasi"!=e?pass():"${"!=t.slice(t.length-2)?cont(quasi):cont(maybeexpression,continueQuasi)}function continueQuasi(e){if("}"==e)return m.marked="string.special",m.state.tokenize=tokenQuasi,cont(quasi)}function arrowBody(e){return findFatArrow(m.stream,m.state),pass("{"==e?statement:expression)}function arrowBodyNoComma(e){return findFatArrow(m.stream,m.state),pass("{"==e?statement:expressionNoComma)}function maybeTarget(e){return function(t){return"."==t?cont(e?targetNoComma:target):"variable"==t&&s?cont(maybeTypeArgs,e?maybeoperatorNoComma:maybeoperatorComma):pass(e?expressionNoComma:expression)}}function target(e,t){if("target"==t)return m.marked="keyword",cont(maybeoperatorComma)}function targetNoComma(e,t){if("target"==t)return m.marked="keyword",cont(maybeoperatorNoComma)}function maybelabel(e){return":"==e?cont(poplex,statement):pass(maybeoperatorComma,expect(";"),poplex)}function property(e){if("variable"==e)return m.marked="property",cont()}function objprop(e,t){if("async"==e)return m.marked="property",cont(objprop);if("variable"==e||"keyword"==m.style){var r;return(m.marked="property","get"==t||"set"==t)?cont(getterSetter):(s&&m.state.fatArrowAt==m.stream.start&&(r=m.stream.match(/^\s*:\s*/,!1))&&(m.state.fatArrowAt=m.stream.pos+r[0].length),cont(afterprop))}if("number"==e||"string"==e)return m.marked=o?"property":m.style+" property",cont(afterprop);if("jsonld-keyword"==e)return cont(afterprop);if(s&&isModifier(t))return m.marked="keyword",cont(objprop);if("["==e)return cont(expression,maybetype,expect("]"),afterprop);if("spread"==e)return cont(expressionNoComma,afterprop);else if("*"==t)return m.marked="keyword",cont(objprop);else if(":"==e)return pass(afterprop)}function getterSetter(e){return"variable"!=e?pass(afterprop):(m.marked="property",cont(functiondef))}function afterprop(e){return":"==e?cont(expressionNoComma):"("==e?pass(functiondef):void 0}function commasep(e,t,r){function proceed(n,o){if(r?r.indexOf(n)>-1:","==n){var a=m.state.lexical;return"call"==a.info&&(a.pos=(a.pos||0)+1),cont(function(r,n){return r==t||n==t?pass():pass(e)},proceed)}return n==t||o==t?cont():r&&r.indexOf(";")>-1?pass(e):cont(expect(t))}return function(r,n){return r==t||n==t?cont():pass(e,proceed)}}function contCommasep(e,t,r){for(var n=3;n<arguments.length;n++)m.cc.push(arguments[n]);return cont(pushlex(t,r),commasep(e,t),poplex)}function block(e){return"}"==e?cont():pass(statement,block)}function maybetype(e,t){if(s){if(":"==e)return cont(typeexpr);if("?"==t)return cont(maybetype)}}function maybetypeOrIn(e,t){if(s&&(":"==e||"in"==t))return cont(typeexpr)}function mayberettype(e){if(s&&":"==e)return m.stream.match(/^\s*\w+\s+is\b/,!1)?cont(expression,isKW,typeexpr):cont(typeexpr)}function isKW(e,t){if("is"==t)return m.marked="keyword",cont()}function typeexpr(e,t){return"keyof"==t||"typeof"==t||"infer"==t||"readonly"==t?(m.marked="keyword",cont("typeof"==t?expressionNoComma:typeexpr)):"variable"==e||"void"==t?(m.marked="type",cont(afterType)):"|"==t||"&"==t?cont(typeexpr):"string"==e||"number"==e||"atom"==e?cont(afterType):"["==e?cont(pushlex("]"),commasep(typeexpr,"]",","),poplex,afterType):"{"==e?cont(pushlex("}"),typeprops,poplex,afterType):"("==e?cont(commasep(typearg,")"),maybeReturnType,afterType):"<"==e?cont(commasep(typeexpr,">"),typeexpr):"quasi"==e?pass(quasiType,afterType):void 0}function maybeReturnType(e){if("=>"==e)return cont(typeexpr)}function typeprops(e){return e.match(/[\}\)\]]/)?cont():","==e||";"==e?cont(typeprops):pass(typeprop,typeprops)}function typeprop(e,t){return"variable"==e||"keyword"==m.style?(m.marked="property",cont(typeprop)):"?"==t||"number"==e||"string"==e?cont(typeprop):":"==e?cont(typeexpr):"["==e?cont(expect("variable"),maybetypeOrIn,expect("]"),typeprop):"("==e?pass(functiondecl,typeprop):e.match(/[;\}\)\],]/)?void 0:cont()}function quasiType(e,t){return"quasi"!=e?pass():"${"!=t.slice(t.length-2)?cont(quasiType):cont(typeexpr,continueQuasiType)}function continueQuasiType(e){if("}"==e)return m.marked="string.special",m.state.tokenize=tokenQuasi,cont(quasiType)}function typearg(e,t){return"variable"==e&&m.stream.match(/^\s*[?:]/,!1)||"?"==t?cont(typearg):":"==e?cont(typeexpr):"spread"==e?cont(typearg):pass(typeexpr)}function afterType(e,t){return"<"==t?cont(pushlex(">"),commasep(typeexpr,">"),poplex,afterType):"|"==t||"."==e||"&"==t?cont(typeexpr):"["==e?cont(typeexpr,expect("]"),afterType):"extends"==t||"implements"==t?(m.marked="keyword",cont(typeexpr)):"?"==t?cont(typeexpr,expect(":"),typeexpr):void 0}function maybeTypeArgs(e,t){if("<"==t)return cont(pushlex(">"),commasep(typeexpr,">"),poplex,afterType)}function typeparam(){return pass(typeexpr,maybeTypeDefault)}function maybeTypeDefault(e,t){if("="==t)return cont(typeexpr)}function vardef(e,t){return"enum"==t?(m.marked="keyword",cont(enumdef)):pass(pattern,maybetype,maybeAssign,vardefCont)}function pattern(e,t){return s&&isModifier(t)?(m.marked="keyword",cont(pattern)):"variable"==e?(register(t),cont()):"spread"==e?cont(pattern):"["==e?contCommasep(eltpattern,"]"):"{"==e?contCommasep(proppattern,"}"):void 0}function proppattern(e,t){return"variable"!=e||m.stream.match(/^\s*:/,!1)?("variable"==e&&(m.marked="property"),"spread"==e)?cont(pattern):"}"==e?pass():"["==e?cont(expression,expect("]"),expect(":"),proppattern):cont(expect(":"),pattern,maybeAssign):(register(t),cont(maybeAssign))}function eltpattern(){return pass(pattern,maybeAssign)}function maybeAssign(e,t){if("="==t)return cont(expressionNoComma)}function vardefCont(e){if(","==e)return cont(vardef)}function maybeelse(e,t){if("keyword b"==e&&"else"==t)return cont(pushlex("form","else"),statement,poplex)}function forspec(e,t){return"await"==t?cont(forspec):"("==e?cont(pushlex(")"),forspec1,poplex):void 0}function forspec1(e){return"var"==e?cont(vardef,forspec2):"variable"==e?cont(forspec2):pass(forspec2)}function forspec2(e,t){return")"==e?cont():";"==e?cont(forspec2):"in"==t||"of"==t?(m.marked="keyword",cont(expression,forspec2)):pass(expression,forspec2)}function functiondef(e,t){return"*"==t?(m.marked="keyword",cont(functiondef)):"variable"==e?(register(t),cont(functiondef)):"("==e?cont(pushcontext,pushlex(")"),commasep(funarg,")"),poplex,mayberettype,statement,popcontext):s&&"<"==t?cont(pushlex(">"),commasep(typeparam,">"),poplex,functiondef):void 0}function functiondecl(e,t){return"*"==t?(m.marked="keyword",cont(functiondecl)):"variable"==e?(register(t),cont(functiondecl)):"("==e?cont(pushcontext,pushlex(")"),commasep(funarg,")"),poplex,mayberettype,popcontext):s&&"<"==t?cont(pushlex(">"),commasep(typeparam,">"),poplex,functiondecl):void 0}function typename(e,t){return"keyword"==e||"variable"==e?(m.marked="type",cont(typename)):"<"==t?cont(pushlex(">"),commasep(typeparam,">"),poplex):void 0}function funarg(e,t){return("@"==t&&cont(expression,funarg),"spread"==e)?cont(funarg):s&&isModifier(t)?(m.marked="keyword",cont(funarg)):s&&"this"==e?cont(maybetype,maybeAssign):pass(pattern,maybetype,maybeAssign)}function classExpression(e,t){return"variable"==e?className(e,t):classNameAfter(e,t)}function className(e,t){if("variable"==e)return register(t),cont(classNameAfter)}function classNameAfter(e,t){return"<"==t?cont(pushlex(">"),commasep(typeparam,">"),poplex,classNameAfter):"extends"==t||"implements"==t||s&&","==e?("implements"==t&&(m.marked="keyword"),cont(s?typeexpr:expression,classNameAfter)):"{"==e?cont(pushlex("}"),classBody,poplex):void 0}function classBody(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||s&&isModifier(t))&&m.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1)?(m.marked="keyword",cont(classBody)):"variable"==e||"keyword"==m.style?(m.marked="property",cont(classfield,classBody)):"number"==e||"string"==e?cont(classfield,classBody):"["==e?cont(expression,maybetype,expect("]"),classfield,classBody):"*"==t?(m.marked="keyword",cont(classBody)):s&&"("==e?pass(functiondecl,classBody):";"==e||","==e?cont(classBody):"}"==e?cont():"@"==t?cont(expression,classBody):void 0}function classfield(e,t){if("!"==t||"?"==t)return cont(classfield);if(":"==e)return cont(typeexpr,maybeAssign);if("="==t)return cont(expressionNoComma);var r=m.state.lexical.prev;return pass(r&&"interface"==r.info?functiondecl:functiondef)}function afterExport(e,t){return"*"==t?(m.marked="keyword",cont(maybeFrom,expect(";"))):"default"==t?(m.marked="keyword",cont(expression,expect(";"))):"{"==e?cont(commasep(exportField,"}"),maybeFrom,expect(";")):pass(statement)}function exportField(e,t){return"as"==t?(m.marked="keyword",cont(expect("variable"))):"variable"==e?pass(expressionNoComma,exportField):void 0}function afterImport(e){return"string"==e?cont():"("==e?pass(expression):"."==e?pass(maybeoperatorComma):pass(importSpec,maybeMoreImports,maybeFrom)}function importSpec(e,t){return"{"==e?contCommasep(importSpec,"}"):("variable"==e&®ister(t),"*"==t&&(m.marked="keyword"),cont(maybeAs))}function maybeMoreImports(e){if(","==e)return cont(importSpec,maybeMoreImports)}function maybeAs(e,t){if("as"==t)return m.marked="keyword",cont(importSpec)}function maybeFrom(e,t){if("from"==t)return m.marked="keyword",cont(expression)}function arrayLiteral(e){return"]"==e?cont():pass(commasep(expressionNoComma,"]"))}function enumdef(){return pass(pushlex("form"),pattern,expect("{"),pushlex("}"),commasep(enummember,"}"),poplex,poplex)}function enummember(){return pass(pattern,maybeAssign)}function isContinuedStatement(e,t){return"operator"==e.lastType||","==e.lastType||i.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}function expressionAllowed(e,t,r){return t.tokenize==tokenBase&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}return pushcontext.lex=pushblockcontext.lex=!0,popcontext.lex=!0,poplex.lex=!0,{name:e.name,startState:function(t){var r={tokenize:tokenBase,lastType:"sof",cc:[],lexical:new JSLexical(-t,0,"block",!1),localVars:e.localVars,context:e.localVars&&new Context(null,null,!1),indented:0};return e.globalVars&&"object"==typeof e.globalVars&&(r.globalVars=e.globalVars),r},token:function(e,n){if(e.sol()&&(n.lexical.hasOwnProperty("align")||(n.lexical.align=!1),n.indented=e.indentation(),findFatArrow(e,n)),n.tokenize!=tokenComment&&e.eatSpace())return null;var o=n.tokenize(e,n);return"comment"==t?o:(n.lastType="operator"==t&&("++"==r||"--"==r)?"incdec":t,parseJS(n,o,t,r,e))},indent:function(t,r,o){if(t.tokenize==tokenComment||t.tokenize==tokenQuasi)return null;if(t.tokenize!=tokenBase)return 0;var a,s=r&&r.charAt(0),p=t.lexical;if(!/^\s*else\b/.test(r))for(var c=t.cc.length-1;c>=0;--c){var i=t.cc[c];if(i==poplex)p=p.prev;else if(i!=maybeelse&&i!=popcontext)break}for(;("stat"==p.type||"form"==p.type)&&("}"==s||(a=t.cc[t.cc.length-1])&&(a==maybeoperatorComma||a==maybeoperatorNoComma)&&!/^[,\.=+\-*:?[\(]/.test(r));)p=p.prev;n&&")"==p.type&&"stat"==p.prev.type&&(p=p.prev);var u=p.type,l=s==u;return"vardef"==u?p.indented+("operator"==t.lastType||","==t.lastType?p.info.length+1:0):"form"==u&&"{"==s?p.indented:"form"==u?p.indented+o.unit:"stat"==u?p.indented+(isContinuedStatement(t,r)?n||o.unit:0):"switch"!=p.info||l||!1==e.doubleIndentSwitch?p.align?p.column+(l?0:1):p.indented+(l?0:o.unit):p.indented+(/^(?:case|default)\b/.test(r)?o.unit:2*o.unit)},languageData:{indentOnInput:/^\s*(?:case .*?:|default:|\{|\})$/,commentTokens:a?void 0:{line:"//",block:{open:"/*",close:"*/"}},closeBrackets:{brackets:["(","[","{","'",'"',"`"]},wordChars:"$"}}}r.r(t),r.d(t,{javascript:function(){return n},json:function(){return o},jsonld:function(){return a},typescript:function(){return s}});let n=mkJavaScript({name:"javascript"}),o=mkJavaScript({name:"json",json:!0}),a=mkJavaScript({name:"json",jsonld:!0}),s=mkJavaScript({name:"typescript",typescript:!0})}}]); |