Liferay.Loader.define("liferay!object-web$codemirror@5.65.12/addon/search/jump-to-line",["module","exports","require","../../lib/codemirror","../dialog/dialog"],(function(e,o,r){var i,t=void 0;window;i=function(e){"use strict";function interpretLine(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 o=e.getCursor();!function dialog(e,o,r,i,t){e.openDialog?e.openDialog(o,t,{value:i,selectValueOnOpen:!0,bottom:e.options.search.bottom}):t(prompt(r,i))}(e,function getJumpDialog(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:"),o.line+1+":"+o.ch,(function(r){var i;if(r)if(i=/^\s*([\+\-]?\d+)\s*\:\s*(\d+)\s*$/.exec(r))e.setCursor(interpretLine(e,i[1]),Number(i[2]));else if(i=/^\s*([\+\-]?\d+(\.\d+)?)\%\s*/.exec(r)){var t=Math.round(e.lineCount()*Number(i[1])/100);/^[-+]/.test(i[1])&&(t=o.line+t+1),e.setCursor(t-1,o.ch)}else(i=/^\s*\:?\s*([\+\-]?\d+)\s*/.exec(r))&&e.setCursor(interpretLine(e,i[1]),o.ch)}))},e.keyMap.default["Alt-G"]="jumpToLine"},"object"==typeof o&&"object"==typeof e?i(r("../../lib/codemirror"),r("../dialog/dialog")):"function"==typeof t&&t.amd?t(["../../lib/codemirror","../dialog/dialog"],i):i(CodeMirror)}));
//# sourceMappingURL=jump-to-line.js.map