'use strict';(function(c){"object"==typeof exports&&"object"==typeof module?c(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],c):c(CodeMirror)})(function(c){c.registerHelper("lint","javascript",function(l,b,m){var d=window.$.Deferred();if(!window.Hinter)return window.console&&window.console.error("Error: CodeMirror JavaScript linting cannot run."),d.reject([]);b.indent||(b.indent=1);window.Hinter.hint(l,b.hint_config,b.hint_options).then(function(b){var h=
[];if(b)for(var e=0;e<b.length;e++){var a=b[e];if(a)if(0>=a.line)window.console&&window.console.warn("Cannot display JSHint error (invalid line "+a.line+")",a);else{var f=a.column-1,g=f+1;if(a.evidence){var k=a.evidence.substring(f).search(/.\b/);-1<k&&(g+=k)}a={message:a.message,severity:a.severity&&2>a.severity?"warning":"error",from:c.Pos(a.line-1,f),to:c.Pos(a.line-1,g)};h.push(a)}}d.resolve(h)});return d.promise()})});
