import{c as d,h as g}from"./codemirror.es2-5884f31a.js";import{a as h}from"./dialog.es-b2776d29.js";var b=Object.defineProperty,p=(c,l)=>b(c,"name",{value:l,configurable:!0});function f(c,l){for(var o=0;o<l.length;o++){const s=l[o];if(typeof s!="string"&&!Array.isArray(s)){for(const i in s)if(i!=="default"&&!(i in c)){const a=Object.getOwnPropertyDescriptor(s,i);a&&Object.defineProperty(c,i,a.get?a:{enumerable:!0,get:()=>s[i]})}}}return Object.freeze(Object.defineProperty(c,Symbol.toStringTag,{value:"Module"}))}p(f,"_mergeNamespaces");var y={exports:{}};(function(c,l){(function(o){o(d(),h)})(function(o){o.defineOption("search",{bottom:!1});function s(e,t,n,r,u){e.openDialog?e.openDialog(t,u,{value:r,selectValueOnOpen:!0,bottom:e.options.search.bottom}):u(prompt(n,r))}p(s,"dialog");function i(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>"}p(i,"getJumpDialog");function a(e,t){var n=Number(t);return/^[-+]/.test(t)?e.getCursor().line+n:n-1}p(a,"interpretLine"),o.commands.jumpToLine=function(e){var t=e.getCursor();s(e,i(e),e.phrase("Jump to line:"),t.line+1+":"+t.ch,function(n){if(n){var r;if(r=/^\s*([\+\-]?\d+)\s*\:\s*(\d+)\s*$/.exec(n))e.setCursor(a(e,r[1]),Number(r[2]));else if(r=/^\s*([\+\-]?\d+(\.\d+)?)\%\s*/.exec(n)){var u=Math.round(e.lineCount()*Number(r[1])/100);/^[-+]/.test(r[1])&&(u=t.line+u+1),e.setCursor(u-1,t.ch)}else(r=/^\s*\:?\s*([\+\-]?\d+)\s*/.exec(n))&&e.setCursor(a(e,r[1]),t.ch)}})},o.keyMap.default["Alt-G"]="jumpToLine"})})();var m=y.exports;const v=g(m),x=f({__proto__:null,default:v},[m]);export{x as j};
