text: 'use strict';(function(h){"object"==typeof exports&&"object"==typeof module?h(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],h):h(CodeMirror)})(function(h){function p(f){return new RegExp("^(("+f.join(")|(")+"))\\b")}function f(f){return f.scopes[f.scopes.length-1]}var B=p(["and","or","not","is"]),v="as assert break class continue def del elif else except finally for from global if import lambda pass raise return try while with yield in".split(" "),
  w="abs all any bin bool bytearray callable chr classmethod compile complex delattr dict dir divmod enumerate eval filter float format frozenset getattr globals hasattr hash help hex id input int isinstance issubclass iter len list locals map max memoryview min next object oct open ord pow property range repr reversed round set setattr slice sorted staticmethod str sum super tuple type vars zip __import__ NotImplemented Ellipsis __debug__".split(" ");h.registerHelper("hintWords","python",v.concat(w));
  h.defineMode("python",function(u,e){function m(a,b){var d=a.sol()&&"\\"!=b.lastToken;d&&(b.indent=a.indentation());if(d&&"py"==f(b).type){d=f(b).offset;if(a.eatSpace()){var c=a.indentation();c>d?x(b):c<d&&y(a,b)&&"#"!=a.peek()&&(b.errorToken=!0);return null}c=q(a,b);0<d&&y(a,b)&&(c+=" error");return c}return q(a,b)}function q(a,b){if(a.eatSpace())return null;if(a.match(/^#.*/))return"comment";if(a.match(/^[0-9\.]/,!1)){var d=!1;a.match(/^[\d_]*\.\d+(e[\+\-]?\d+)?/i)&&(d=!0);a.match(/^[\d_]+\.\d*/)&&
  (d=!0);a.match(/^\.\d+/)&&(d=!0);if(d)return a.eat(/J/i),"number";d=!1;a.match(/^0x[0-9a-f_]+/i)&&(d=!0);a.match(/^0b[01_]+/i)&&(d=!0);a.match(/^0o[0-7_]+/i)&&(d=!0);a.match(/^[1-9][\d_]*(e[\+\-]?[\d_]+)?/)&&(a.eat(/J/i),d=!0);a.match(/^0(?![\dx])/i)&&(d=!0);if(d)return a.eat(/L/i),"number"}if(a.match(z))return-1===a.current().toLowerCase().indexOf("f")?b.tokenize=C(a.current()):b.tokenize=D(a.current(),b.tokenize),b.tokenize(a,b);for(d=0;d<l.length;d++)if(a.match(l[d]))return"operator";if(a.match(E))return"punctuation";
  if("."==b.lastToken&&a.match(n))return"property";if(a.match(F)||a.match(B))return"keyword";if(a.match(G))return"builtin";if(a.match(/^(self|cls)\b/))return"variable-2";if(a.match(n))return"def"==b.lastToken||"class"==b.lastToken?"def":"variable";a.next();return"error"}function D(a,b){function d(b,d){return b.match(a)?(d.tokenize=c,"string"):b.match("{")?"punctuation":b.match("}")?(d.tokenize=c,"punctuation"):q(b,d)}function c(c,r){for(;!c.eol();)if(c.eatWhile(/[^'"\{\}\\]/),c.eat("\\")){if(c.next(),
  f&&c.eol())return"string"}else{if(c.match(a))return r.tokenize=b,"string";if(c.match("{{"))return"string";if(c.match("{",!1)){r.tokenize=d;if(c.current())return"string";c.next();return"punctuation"}if(c.match("}}"))return"string";if(c.match("}"))return"error";c.eat(/['"]/)}if(f){if(e.singleLineStringErrors)return"error";r.tokenize=b}return"string"}for(;0<="rubf".indexOf(a.charAt(0).toLowerCase());)a=a.substr(1);var f=1==a.length;c.isString=!0;return c}function C(a){function b(b,f){for(;!b.eol();)if(b.eatWhile(/[^'"\\]/),
  b.eat("\\")){if(b.next(),d&&b.eol())return"string"}else{if(b.match(a))return f.tokenize=m,"string";b.eat(/['"]/)}if(d){if(e.singleLineStringErrors)return"error";f.tokenize=m}return"string"}for(;0<="rubf".indexOf(a.charAt(0).toLowerCase());)a=a.substr(1);var d=1==a.length;b.isString=!0;return b}function x(a){for(;"py"!=f(a).type;)a.scopes.pop();a.scopes.push({offset:f(a).offset+u.indentUnit,type:"py",align:null})}function y(a,b){for(a=a.indentation();1<b.scopes.length&&f(b).offset>a;){if("py"!=f(b).type)return!0;
  b.scopes.pop()}return f(b).offset!=a}for(var E=e.delimiters||e.singleDelimiters||/^[\(\)\[\]\{\}@,:`=;\.\\]/,l=[e.singleOperators,e.doubleOperators,e.doubleDelimiters,e.tripleDelimiters,e.operators||/^([-+*/%\/&|^]=?|[<>=]+|\/\/=?|\*\*=?|!=|[~!@])/],g=0;g<l.length;g++)l[g]||l.splice(g--,1);var t=e.hangingIndent||u.indentUnit;g=v;var k=w;void 0!=e.extra_keywords&&(g=g.concat(e.extra_keywords));void 0!=e.extra_builtins&&(k=k.concat(e.extra_builtins));var A=!(e.version&&3>Number(e.version));if(A){var n=
  e.identifiers||/^[_A-Za-z\u00A1-\uFFFF][_A-Za-z0-9\u00A1-\uFFFF]*/;g=g.concat("nonlocal False True None async await".split(" "));k=k.concat(["ascii","bytes","exec","print"]);var z=/^(([rbuf]|(br)|(fr))?('{3}|"{3}|['"]))/i}else n=e.identifiers||/^[_A-Za-z][_A-Za-z0-9]*/,g=g.concat(["exec","print"]),k=k.concat("apply basestring buffer cmp coerce execfile file intern long raw_input reduce reload unichr unicode xrange False True None".split(" ")),z=/^(([rubf]|(ur)|(br))?('{3}|"{3}|['"]))/i;var F=p(g),
  G=p(k);return{startState:function(a){return{tokenize:m,scopes:[{offset:a||0,type:"py",align:null}],indent:a||0,lastToken:null,lambda:!1,dedent:0}},token:function(a,b){var d=b.errorToken;d&&(b.errorToken=!1);a:{a.sol()&&(b.beginningOfLine=!0);var c=b.tokenize(a,b);var e=a.current();if(b.beginningOfLine&&"@"==e)c=a.match(n,!1)?"meta":A?"operator":"error";else{/\S/.test(e)&&(b.beginningOfLine=!1);"variable"!=c&&"builtin"!=c||"meta"!=b.lastToken||(c="meta");if("pass"==e||"return"==e)b.dedent+=1;"lambda"==
  e&&(b.lambda=!0);":"!=e||b.lambda||"py"!=f(b).type||x(b);if(1==e.length&&!/string|comment/.test(c)){var g="[({".indexOf(e);if(-1!=g){g="])}".slice(g,g+1);var h=a.match(/^([\s\[\{\(]|#.*)*$/,!1)?null:a.column()+1;b.scopes.push({offset:b.indent+t,type:g,align:h})}g="])}".indexOf(e);if(-1!=g)if(f(b).type==e)b.indent=b.scopes.pop().offset-t;else{c="error";break a}}0<b.dedent&&a.eol()&&"py"==f(b).type&&(1<b.scopes.length&&b.scopes.pop(),--b.dedent)}}c&&"comment"!=c&&(b.lastToken="keyword"==c||"punctuation"==
  c?a.current():c);"punctuation"==c&&(c=null);a.eol()&&b.lambda&&(b.lambda=!1);return d?c+" error":c},indent:function(a,b){if(a.tokenize!=m)return a.tokenize.isString?h.Pass:0;a=f(a);b=a.type==b.charAt(0);return null!=a.align?a.align-(b?1:0):a.offset-(b?t:0)},electricInput:/^\s*[\}\]\)]$/,closeBrackets:{triples:"'\""},lineComment:"#",fold:"indent"}});h.defineMIME("text/x-python","python");h.defineMIME("text/x-cython",{name:"python",extra_keywords:"by cdef cimport cpdef ctypedef enum except extern gil include nogil property public readonly struct union DEF IF ELIF ELSE".split(" ")})});
  