(function(a){a(CodeMirror)})(function(a){function b(a,b,d){var e=a.getLineHandle(b.line),f=b.ch-1,i=d&&d.afterCursor;null==i&&(i=/(^| )cm-fat-cursor($| )/.test(a.getWrapperElement().className));var j=!i&&0<=f&&h[e.text.charAt(f)]||h[e.text.charAt(++f)];if(!j)return null;var k=">"==j.charAt(1)?1:-1;if(d&&d.strict&&0<k!=(f==b.ch))return null;var l=a.getTokenTypeAt(g(b.line,f+1)),m=c(a,g(b.line,f+(0<k?1:0)),k,l||null,d);return null==m?null:{from:g(b.line,f),to:m&&m.pos,match:m&&m.ch==j.charAt(0),forward:0<k}}function c(a,b,c,d,e){for(var f,i=e&&e.maxScanLineLength||1e4,j=e&&e.maxScanLines||1e3,k=[],l=e&&e.bracketRegex?e.bracketRegex:/[(){}[\]]/,m=0<c?Math.min(b.line+j,a.lastLine()+1):Math.max(a.firstLine()-1,b.line-j),n=b.line;n!=m;n+=c)if(f=a.getLine(n),f){var o=0<c?0:f.length-1,p=0<c?f.length:-1;if(!(f.length>i))for(n==b.line&&(o=b.ch-(0>c?1:0));o!=p;o+=c){var q=f.charAt(o);if(l.test(q)&&(void 0===d||a.getTokenTypeAt(g(n,o+1))==d)){var r=h[q];if(">"==r.charAt(1)==0<c)k.push(q);else{if(!k.length)return{pos:g(n,o),ch:q};k.pop()}}}}return n-c!=(0<c?a.lastLine():a.firstLine())&&null}function d(a,c,d){for(var e,h=a.state.matchBrackets.maxHighlightLineLength||1e3,j=[],k=a.listSelections(),l=0;l<k.length;l++)if(e=k[l].empty()&&b(a,k[l].head,d),e&&a.getLine(e.from.line).length<=h){var i=e.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";j.push(a.markText(e.from,g(e.from.line,e.from.ch+1),{className:i})),e.to&&a.getLine(e.to.line).length<=h&&j.push(a.markText(e.to,g(e.to.line,e.to.ch+1),{className:i}))}if(j.length){f&&a.state.focused&&a.focus();var m=function(){a.operation(function(){for(var a=0;a<j.length;a++)j[a].clear()})};if(c)setTimeout(m,800);else return m}}function e(a){a.operation(function(){a.state.matchBrackets.currentlyHighlighted&&(a.state.matchBrackets.currentlyHighlighted(),a.state.matchBrackets.currentlyHighlighted=null),a.state.matchBrackets.currentlyHighlighted=d(a,!1,a.state.matchBrackets)})}var f=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||8>document.documentMode),g=a.Pos,h={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"};a.defineOption("matchBrackets",!1,function(b,c,d){d&&d!=a.Init&&(b.off("cursorActivity",e),b.state.matchBrackets&&b.state.matchBrackets.currentlyHighlighted&&(b.state.matchBrackets.currentlyHighlighted(),b.state.matchBrackets.currentlyHighlighted=null)),c&&(b.state.matchBrackets="object"==typeof c?c:{},b.on("cursorActivity",e))}),a.defineExtension("matchBrackets",function(){d(this,!0)}),a.defineExtension("findMatchingBracket",function(a,c,d){return(d||"boolean"==typeof c)&&(d?(d.strict=c,c=d):c=c?{strict:!0}:null),b(this,a,c)}),a.defineExtension("scanForBracket",function(a,b,d,e){return c(this,a,b,d,e)})});