!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(c){"use strict";c.registerHelper("lint","javascript",function(e,r){if(!window.JSHINT)return window.console&&window.console.error("Error: window.JSHINT not defined, CodeMirror JavaScript linting cannot run."),[];r.indent||(r.indent=1),JSHINT(e,r,r.globals);var n=JSHINT.data().errors,o=[];return n&&function(e,r){for(var n=0;n<e.length;n++){var o=e[n];if(o){if(o.line<=0){window.console&&window.console.warn("Cannot display JSHint error (invalid line "+o.line+")",o);continue}var i=o.character-1,t=i+1;if(o.evidence){var a=o.evidence.substring(i).search(/.\b/);-1<a&&(t+=a)}var d={message:o.reason,severity:o.code&&o.code.startsWith("W")?"warning":"error",from:c.Pos(o.line-1,i),to:c.Pos(o.line-1,t)};r.push(d)}}}(n,o),o})});