text: !function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("javascript",function(r,t){var n,a,i=r.indentUnit,o=t.statementIndent,c=t.jsonld,u=t.json||c,s=t.typescript,f=t.wordCharacters||/[\w$\xa1-\uffff]/,l=function(){function e(e){return{type:e,style:"keyword"}}var r=e("keyword a"),t=e("keyword b"),n=e("keyword c"),a=e("keyword d"),i=e("operator"),o={type:"atom",style:"atom"};return{if:e("if"),while:r,with:r,else:t,do:t,try:t,finally:t,return:a,break:a,continue:a,new:e("new"),delete:n,void:n,throw:n,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:i,typeof:i,instanceof:i,true:o,false:o,null:o,undefined:o,NaN:o,Infinity:o,this:e("this"),class:e("class"),super:e("atom"),yield:n,export:e("export"),import:e("import"),extends:n,await:n}}(),d=/[+\-*&%=<>!?|~^@]/,p=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function m(e,r,t){return n=e,a=t,r}function k(e,r){var t,n=e.next();if('"'==n||"'"==n)return r.tokenize=(t=n,function(e,r){var n,a=!1;if(c&&"@"==e.peek()&&e.match(p))return r.tokenize=k,m("jsonld-keyword","meta");for(;null!=(n=e.next())&&(n!=t||a);)a=!a&&"\\"==n;return a||(r.tokenize=k),m("string","string")}),r.tokenize(e,r);if("."==n&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return m("number","number");if("."==n&&e.match(".."))return m("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return m(n);if("="==n&&e.eat(">"))return m("=>","operator");if("0"==n&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),m("number","number");if("0"==n&&e.eat(/o/i))return e.eatWhile(/[0-7]/i),m("number","number");if("0"==n&&e.eat(/b/i))return e.eatWhile(/[01]/i),m("number","number");if(/\d/.test(n))return e.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),m("number","number");if("/"==n)return e.eat("*")?(r.tokenize=v,v(e,r)):e.eat("/")?(e.skipToEnd(),m("comment","comment")):He(e,r,1)?(function(e){for(var r,t=!1,n=!1;null!=(r=e.next());){if(!t){if("/"==r&&!n)return;"["==r?n=!0:n&&"]"==r&&(n=!1)}t=!t&&"\\"==r}}(e),e.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),m("regexp","string-2")):(e.eat("="),m("operator","operator",e.current()));if("`"==n)return r.tokenize=y,y(e,r);if("#"==n)return e.skipToEnd(),m("error","error");if(d.test(n))return">"==n&&r.lexical&&">"==r.lexical.type||(e.eat("=")?"!"!=n&&"="!=n||e.eat("="):/[<>*+\-]/.test(n)&&(e.eat(n),">"==n&&e.eat(n))),m("operator","operator",e.current());if(f.test(n)){e.eatWhile(f);var a=e.current();if("."!=r.lastType){if(l.propertyIsEnumerable(a)){var i=l[a];return m(i.type,i.style,a)}if("async"==a&&e.match(/^(\s|\/\*.*?\*\/)*[\(\w]/,!1))return m("async","keyword",a)}return m("variable","variable",a)}}function v(e,r){for(var t,n=!1;t=e.next();){if("/"==t&&n){r.tokenize=k;break}n="*"==t}return m("comment","comment")}function y(e,r){for(var t,n=!1;null!=(t=e.next());){if(!n&&("`"==t||"$"==t&&e.eat("{"))){r.tokenize=k;break}n=!n&&"\\"==t}return m("quasi","string-2",e.current())}var b="([{}])";function w(e,r){r.fatArrowAt&&(r.fatArrowAt=null);var t=e.string.indexOf("=>",e.start);if(!(t<0)){if(s){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,t));n&&(t=n.index)}for(var a=0,i=!1,o=t-1;o>=0;--o){var c=e.string.charAt(o),u=b.indexOf(c);if(u>=0&&u<3){if(!a){++o;break}if(0==--a){"("==c&&(i=!0);break}}else if(u>=3&&u<6)++a;else if(f.test(c))i=!0;else{if(/["'\/]/.test(c))return;if(i&&!a){++o;break}}}i&&!a&&(r.fatArrowAt=o)}}var x={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0};function h(e,r,t,n,a,i){this.indented=e,this.column=r,this.type=t,this.prev=a,this.info=i,null!=n&&(this.align=n)}function g(e,r){for(var t=e.localVars;t;t=t.next)if(t.name==r)return!0;for(var n=e.context;n;n=n.prev)for(t=n.vars;t;t=t.next)if(t.name==r)return!0}var j={state:null,column:null,marked:null,cc:null};function M(){for(var e=arguments.length-1;e>=0;e--)j.cc.push(arguments[e])}function V(){return M.apply(null,arguments),!0}function A(e){function r(r){for(var t=r;t;t=t.next)if(t.name==e)return!0;return!1}var n=j.state;if(j.marked="def",n.context){if(r(n.localVars))return;n.localVars={name:e,next:n.localVars}}else{if(r(n.globalVars))return;t.globalVars&&(n.globalVars={name:e,next:n.globalVars})}}function E(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}var z={name:"this",next:{name:"arguments"}};function I(){j.state.context={prev:j.state.context,vars:j.state.localVars},j.state.localVars=z}function T(){j.state.localVars=j.state.context.vars,j.state.context=j.state.context.prev}function $(e,r){var t=function(){var t=j.state,n=t.indented;if("stat"==t.lexical.type)n=t.lexical.indented;else for(var a=t.lexical;a&&")"==a.type&&a.align;a=a.prev)n=a.indented;t.lexical=new h(n,j.stream.column(),e,null,t.lexical,r)};return t.lex=!0,t}function C(){var e=j.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function q(e){return function r(t){return t==e?V():";"==e?M():V(r)}}function O(e,r){return"var"==e?V($("vardef",r.length),pe,q(";"),C):"keyword a"==e?V($("form"),W,O,C):"keyword b"==e?V($("form"),O,C):"keyword d"==e?j.stream.match(/^\s*$/,!1)?V():V($("stat"),U,q(";"),C):"debugger"==e?V(q(";")):"{"==e?V($("}"),re,C):";"==e?V():"if"==e?("else"==j.state.lexical.info&&j.state.cc[j.state.cc.length-1]==C&&j.state.cc.pop()(),V($("form"),W,O,C,be)):"function"==e?V(Me):"for"==e?V($("form"),we,O,C):"class"==e||s&&"interface"==r?(j.marked="keyword",V($("form"),Ee,C)):"variable"==e?s&&"declare"==r?(j.marked="keyword",V(O)):s&&("module"==r||"enum"==r||"type"==r)&&j.stream.match(/^\s*\w/,!1)?(j.marked="keyword","enum"==r?V(Ue):"type"==r?V(ie,q("operator"),ie,q(";")):V($("form"),me,q("{"),$("}"),re,C,C)):s&&"namespace"==r?(j.marked="keyword",V($("form"),P,re,C)):V($("stat"),Q):"switch"==e?V($("form"),W,q("{"),$("}","switch"),re,C,C):"case"==e?V(P,q(":")):"default"==e?V(q(":")):"catch"==e?V($("form"),I,q("("),Ve,q(")"),O,C,T):"export"==e?V($("stat"),$e,C):"import"==e?V($("stat"),qe,C):"async"==e?V(O):"@"==r?V(P,O):M($("stat"),P,q(";"),C)}function P(e,r){return N(e,r,!1)}function S(e,r){return N(e,r,!0)}function W(e){return"("!=e?M():V($(")"),P,q(")"),C)}function N(e,r,t){if(j.state.fatArrowAt==j.stream.start){var n=t?J:G;if("("==e)return V(I,$(")"),_(Ve,")"),C,q("=>"),n,T);if("variable"==e)return M(I,me,q("=>"),n,T)}var a,i=t?H:B;return x.hasOwnProperty(e)?V(i):"function"==e?V(Me,i):"class"==e||s&&"interface"==r?(j.marked="keyword",V($("form"),Ae,C)):"keyword c"==e||"async"==e?V(t?S:P):"("==e?V($(")"),U,q(")"),C,i):"operator"==e||"spread"==e?V(t?S:P):"["==e?V($("]"),Ne,C,i):"{"==e?ee(X,"}",null,i):"quasi"==e?M(D,i):"new"==e?V((a=t,function(e){return"."==e?V(a?L:K):"variable"==e&&s?V(fe,a?H:B):M(a?S:P)})):V()}function U(e){return e.match(/[;\}\)\],]/)?M():M(P)}function B(e,r){return","==e?V(P):H(e,r,!1)}function H(e,r,t){var n=0==t?B:H,a=0==t?P:S;return"=>"==e?V(I,t?J:G,T):"operator"==e?/\+\+|--/.test(r)||s&&"!"==r?V(n):s&&"<"==r&&j.stream.match(/^([^>]|<.*?>)*>\s*\(/,!1)?V($(">"),_(ie,">"),C,n):"?"==r?V(P,q(":"),a):V(a):"quasi"==e?M(D,n):";"!=e?"("==e?ee(S,")","call",n):"."==e?V(R,n):"["==e?V($("]"),U,q("]"),C,n):s&&"as"==r?(j.marked="keyword",V(ie,n)):"regexp"==e?(j.state.lastType=j.marked="operator",j.stream.backUp(j.stream.pos-j.stream.start-1),V(a)):void 0:void 0}function D(e,r){return"quasi"!=e?M():"${"!=r.slice(r.length-2)?V(D):V(P,F)}function F(e){if("}"==e)return j.marked="string-2",j.state.tokenize=y,V(D)}function G(e){return w(j.stream,j.state),M("{"==e?O:P)}function J(e){return w(j.stream,j.state),M("{"==e?O:S)}function K(e,r){if("target"==r)return j.marked="keyword",V(B)}function L(e,r){if("target"==r)return j.marked="keyword",V(H)}function Q(e){return":"==e?V(C,O):M(B,q(";"),C)}function R(e){if("variable"==e)return j.marked="property",V()}function X(e,r){if("async"==e)return j.marked="property",V(X);if("variable"==e||"keyword"==j.style){return j.marked="property","get"==r||"set"==r?V(Y):(s&&j.state.fatArrowAt==j.stream.start&&(t=j.stream.match(/^\s*:\s*/,!1))&&(j.state.fatArrowAt=j.stream.pos+t[0].length),V(Z));var t}else{if("number"==e||"string"==e)return j.marked=c?"property":j.style+" property",V(Z);if("jsonld-keyword"==e)return V(Z);if(s&&E(r))return j.marked="keyword",V(X);if("["==e)return V(P,te,q("]"),Z);if("spread"==e)return V(S,Z);if("*"==r)return j.marked="keyword",V(X);if(":"==e)return M(Z)}}function Y(e){return"variable"!=e?M(Z):(j.marked="property",V(Me))}function Z(e){return":"==e?V(S):"("==e?M(Me):void 0}function _(e,r,t){function n(a,i){if(t?t.indexOf(a)>-1:","==a){var o=j.state.lexical;return"call"==o.info&&(o.pos=(o.pos||0)+1),V(function(t,n){return t==r||n==r?M():M(e)},n)}return a==r||i==r?V():V(q(r))}return function(t,a){return t==r||a==r?V():M(e,n)}}function ee(e,r,t){for(var n=3;n<arguments.length;n++)j.cc.push(arguments[n]);return V($(r,t),_(e,r),C)}function re(e){return"}"==e?V():M(O,re)}function te(e,r){if(s){if(":"==e)return V(ie);if("?"==r)return V(te)}}function ne(e){if(s&&":"==e)return j.stream.match(/^\s*\w+\s+is\b/,!1)?V(P,ae,ie):V(ie)}function ae(e,r){if("is"==r)return j.marked="keyword",V()}function ie(e,r){return"variable"==e||"void"==r?"keyof"==r?(j.marked="keyword",V(ie)):(j.marked="type",V(se)):"string"==e||"number"==e||"atom"==e?V(se):"["==e?V($("]"),_(ie,"]",","),C,se):"{"==e?V($("}"),_(ce,"}",",;"),C,se):"("==e?V(_(ue,")"),oe):void 0}function oe(e){if("=>"==e)return V(ie)}function ce(e,r){return"variable"==e||"keyword"==j.style?(j.marked="property",V(ce)):"?"==r?V(ce):":"==e?V(ie):"["==e?V(P,te,q("]"),ce):void 0}function ue(e){return"variable"==e?V(ue):":"==e?V(ie):void 0}function se(e,r){return"<"==r?V($(">"),_(ie,">"),C,se):"|"==r||"."==e?V(ie):"["==e?V(q("]"),se):"extends"==r||"implements"==r?(j.marked="keyword",V(ie)):void 0}function fe(e,r){if("<"==r)return V($(">"),_(ie,">"),C,se)}function le(){return M(ie,de)}function de(e,r){if("="==r)return V(ie)}function pe(e,r){return"enum"==r?(j.marked="keyword",V(Ue)):M(me,te,ve,ye)}function me(e,r){return s&&E(r)?(j.marked="keyword",V(me)):"variable"==e?(A(r),V()):"spread"==e?V(me):"["==e?ee(me,"]"):"{"==e?ee(ke,"}"):void 0}function ke(e,r){return"variable"!=e||j.stream.match(/^\s*:/,!1)?("variable"==e&&(j.marked="property"),"spread"==e?V(me):"}"==e?M():V(q(":"),me,ve)):(A(r),V(ve))}function ve(e,r){if("="==r)return V(S)}function ye(e){if(","==e)return V(pe)}function be(e,r){if("keyword b"==e&&"else"==r)return V($("form","else"),O,C)}function we(e){if("("==e)return V($(")"),xe,q(")"),C)}function xe(e){return"var"==e?V(pe,q(";"),ge):";"==e?V(ge):"variable"==e?V(he):M(P,q(";"),ge)}function he(e,r){return"in"==r||"of"==r?(j.marked="keyword",V(P)):V(B,ge)}function ge(e,r){return";"==e?V(je):"in"==r||"of"==r?(j.marked="keyword",V(P)):M(P,q(";"),je)}function je(e){")"!=e&&V(P)}function Me(e,r){return"*"==r?(j.marked="keyword",V(Me)):"variable"==e?(A(r),V(Me)):"("==e?V(I,$(")"),_(Ve,")"),C,ne,O,T):s&&"<"==r?V($(">"),_(le,">"),C,Me):void 0}function Ve(e,r){return"@"==r&&V(P,Ve),"spread"==e?V(Ve):s&&E(r)?(j.marked="keyword",V(Ve)):M(me,te,ve)}function Ae(e,r){return"variable"==e?Ee(e,r):ze(e,r)}function Ee(e,r){if("variable"==e)return A(r),V(ze)}function ze(e,r){return"<"==r?V($(">"),_(le,">"),C,ze):"extends"==r||"implements"==r||s&&","==e?("implements"==r&&(j.marked="keyword"),V(s?ie:P,ze)):"{"==e?V($("}"),Ie,C):void 0}function Ie(e,r){return"async"==e||"variable"==e&&("static"==r||"get"==r||"set"==r||s&&E(r))&&j.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(j.marked="keyword",V(Ie)):"variable"==e||"keyword"==j.style?(j.marked="property",V(s?Te:Me,Ie)):"["==e?V(P,te,q("]"),s?Te:Me,Ie):"*"==r?(j.marked="keyword",V(Ie)):";"==e?V(Ie):"}"==e?V():"@"==r?V(P,Ie):void 0}function Te(e,r){return"?"==r?V(Te):":"==e?V(ie,ve):"="==r?V(S):M(Me)}function $e(e,r){return"*"==r?(j.marked="keyword",V(We,q(";"))):"default"==r?(j.marked="keyword",V(P,q(";"))):"{"==e?V(_(Ce,"}"),We,q(";")):M(O)}function Ce(e,r){return"as"==r?(j.marked="keyword",V(q("variable"))):"variable"==e?M(S,Ce):void 0}function qe(e){return"string"==e?V():M(Oe,Pe,We)}function Oe(e,r){return"{"==e?ee(Oe,"}"):("variable"==e&&A(r),"*"==r&&(j.marked="keyword"),V(Se))}function Pe(e){if(","==e)return V(Oe,Pe)}function Se(e,r){if("as"==r)return j.marked="keyword",V(Oe)}function We(e,r){if("from"==r)return j.marked="keyword",V(P)}function Ne(e){return"]"==e?V():M(_(S,"]"))}function Ue(){return M($("form"),me,q("{"),$("}"),_(Be,"}"),C,C)}function Be(){return M(me,ve)}function He(e,r,t){return r.tokenize==k&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(r.lastType)||"quasi"==r.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(t||0)))}return C.lex=!0,{startState:function(e){var r={tokenize:k,lastType:"sof",cc:[],lexical:new h((e||0)-i,0,"block",!1),localVars:t.localVars,context:t.localVars&&{vars:t.localVars},indented:e||0};return t.globalVars&&"object"==typeof t.globalVars&&(r.globalVars=t.globalVars),r},token:function(e,r){if(e.sol()&&(r.lexical.hasOwnProperty("align")||(r.lexical.align=!1),r.indented=e.indentation(),w(e,r)),r.tokenize!=v&&e.eatSpace())return null;var t=r.tokenize(e,r);return"comment"==n?t:(r.lastType="operator"!=n||"++"!=a&&"--"!=a?n:"incdec",function(e,r,t,n,a){var i=e.cc;for(j.state=e,j.stream=a,j.marked=null,j.cc=i,j.style=r,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((i.length?i.pop():u?P:O)(t,n)){for(;i.length&&i[i.length-1].lex;)i.pop()();return j.marked?j.marked:"variable"==t&&g(e,n)?"variable-2":r}}(r,t,n,a,e))},indent:function(r,n){if(r.tokenize==v)return e.Pass;if(r.tokenize!=k)return 0;var a,c=n&&n.charAt(0),u=r.lexical;if(!/^\s*else\b/.test(n))for(var s=r.cc.length-1;s>=0;--s){var f=r.cc[s];if(f==C)u=u.prev;else if(f!=be)break}for(;("stat"==u.type||"form"==u.type)&&("}"==c||(a=r.cc[r.cc.length-1])&&(a==B||a==H)&&!/^[,\.=+\-*:?[\(]/.test(n));)u=u.prev;o&&")"==u.type&&"stat"==u.prev.type&&(u=u.prev);var l,p,m=u.type,y=c==m;return"vardef"==m?u.indented+("operator"==r.lastType||","==r.lastType?u.info+1:0):"form"==m&&"{"==c?u.indented:"form"==m?u.indented+i:"stat"==m?u.indented+(p=n,"operator"==(l=r).lastType||","==l.lastType||d.test(p.charAt(0))||/[,.]/.test(p.charAt(0))?o||i:0):"switch"!=u.info||y||0==t.doubleIndentSwitch?u.align?u.column+(y?0:1):u.indented+(y?0:i):u.indented+(/^(?:case|default)\b/.test(n)?i:2*i)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:u?null:"/*",blockCommentEnd:u?null:"*/",blockCommentContinue:u?null:" * ",lineComment:u?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:u?"json":"javascript",jsonldMode:c,jsonMode:u,expressionAllowed:He,skipExpression:function(e){var r=e.cc[e.cc.length-1];r!=P&&r!=S||e.cc.pop()}}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})});