'use strict';(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){function r(a,c,b,e){var d=a.getLineHandle(c.line),l=c.ch-1,d=0<=l&&q[d.text.charAt(l)]||q[d.text.charAt(++l)];if(!d)return null;var h=">"==d.charAt(1)?1:-1;if(b&&0l))for(k==c.line&&(f=c.ch-(0>b?1:0));f!=w;f+=b){var p=n.charAt(f);if(d.test(p)&&(void 0===e||a.getTokenTypeAt(m(k,f+1))==e))if(">"== q[p].charAt(1)==0document.documentMode),m=e.Pos,q={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},f=null;e.defineOption("matchBrackets", !1,function(a,c,b){b&&b!=e.Init&&(a.off("cursorActivity",v),f&&(f(),f=null));c&&(a.state.matchBrackets="object"==typeof c?c:{},a.on("cursorActivity",v))});e.defineExtension("matchBrackets",function(){u(this,!0)});e.defineExtension("findMatchingBracket",function(a,c,b){return r(this,a,c,b)});e.defineExtension("scanForBracket",function(a,c,b,e){return t(this,a,c,b,e)})});