Liferay.Loader.define("portal-search-web$codemirror@5.62.0/addon/search/jump-to-line",["module","exports","require","../../lib/codemirror","../dialog/dialog"],(function(e,o,r){var t;window,t=function(e){"use strict";function o(e,o){var r=Number(o);return/^[-+]/.test(o)?e.getCursor().line+r:r-1}e.defineOption("search",{bottom:!1}),e.commands.jumpToLine=function(e){var r=e.getCursor();!function(e,o,r,t,s){e.openDialog?e.openDialog(o,s,{value:t,selectValueOnOpen:!0,bottom:e.options.search.bottom}):s(prompt(r,t))}(e,function(e){return e.phrase("Jump to line:")+' <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">'+e.phrase("(Use line:column or scroll% syntax)")+"</span>"}(e),e.phrase("Jump to line:"),r.line+1+":"+r.ch,(function(t){var s;if(t)if(s=/^\s*([\+\-]?\d+)\s*\:\s*(\d+)\s*$/.exec(t))e.setCursor(o(e,s[1]),Number(s[2]));else if(s=/^\s*([\+\-]?\d+(\.\d+)?)\%\s*/.exec(t)){var i=Math.round(e.lineCount()*Number(s[1])/100);/^[-+]/.test(s[1])&&(i=r.line+i+1),e.setCursor(i-1,r.ch)}else(s=/^\s*\:?\s*([\+\-]?\d+)\s*/.exec(t))&&e.setCursor(o(e,s[1]),r.ch)}))},e.keyMap.default["Alt-G"]="jumpToLine"},"object"==typeof o&&"object"==typeof e?t(r("../../lib/codemirror"),r("../dialog/dialog")):t(CodeMirror)}));
//# sourceMappingURL=jump-to-line.js.map