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