import{g as Z}from"./index-15e3682d.js";function q(U,J){for(var b=0;b_[$]})}}}return Object.freeze(Object.defineProperty(U,Symbol.toStringTag,{value:"Module"}))}var K={exports:{}};(function(U,J){ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config"],function(b,_,$){var P=b("../virtual_renderer").VirtualRenderer,M=b("../editor").Editor,k=b("../range").Range,y=b("../lib/event"),C=b("../lib/lang"),w=b("../lib/dom"),S=b("../config").nls,H=function(L){return"suggest-aria-id:".concat(L)},O=function(L){var T=new P(L);T.$maxLines=4;var v=new M(T);return v.setHighlightActiveLine(!1),v.setShowPrintMargin(!1),v.renderer.setShowGutter(!1),v.renderer.setHighlightGutterLine(!1),v.$mouseHandler.$focusTimeout=0,v.$highlightTagPending=!0,v},N=function(){function L(T){var v=w.createElement("div"),o=new O(v);T&&T.appendChild(v),v.style.display="none",o.renderer.content.style.cursor="default",o.renderer.setStyle("ace_autocomplete"),o.renderer.container.setAttribute("role","listbox"),o.renderer.container.setAttribute("aria-label",S("Autocomplete suggestions")),o.setOption("displayIndentGuides",!1),o.setOption("dragDelay",150);var s=function(){};o.focus=s,o.$isFocused=!0,o.renderer.$cursorLayer.restartTimer=s,o.renderer.$cursorLayer.element.style.opacity=0,o.renderer.$maxLines=8,o.renderer.$keepTextAreaAtCursor=!1,o.setHighlightActiveLine(!1),o.session.highlight(""),o.session.$searchHighlight.clazz="ace_highlight-marker",o.on("mousedown",function(r){var a=r.getDocumentPosition();o.selection.moveToPosition(a),t.start.row=t.end.row=a.row,r.stop()});var p,h=new k(-1,0,-1,1/0),t=new k(-1,0,-1,1/0);t.id=o.session.addMarker(t,"ace_active-line","fullLine"),o.setSelectOnHover=function(r){r?h.id&&(o.session.removeMarker(h.id),h.id=null):h.id=o.session.addMarker(h,"ace_line-hover","fullLine")},o.setSelectOnHover(!1),o.on("mousemove",function(r){if(!p){p=r;return}if(!(p.x==r.x&&p.y==r.y)){p=r,p.scrollTop=o.renderer.scrollTop;var a=p.getDocumentPosition().row;h.start.row!=a&&(h.id||o.setRow(a),n(a))}}),o.renderer.on("beforeRender",function(){if(p&&h.start.row!=-1){p.$pos=null;var r=p.getDocumentPosition().row;h.id||o.setRow(r),n(r,!0)}}),o.renderer.on("afterRender",function(){var r=o.getRow(),a=o.renderer.$textLayer,c=a.element.childNodes[r-a.config.firstRow],l=document.activeElement;if(c!==a.selectedNode&&a.selectedNode&&(w.removeCssClass(a.selectedNode,"ace_selected"),l.removeAttribute("aria-activedescendant"),a.selectedNode.removeAttribute("id")),a.selectedNode=c,c){w.addCssClass(c,"ace_selected");var d=H(r);c.id=d,o.renderer.container.setAttribute("aria-activedescendant",d),l.setAttribute("aria-activedescendant",d),c.setAttribute("role","option"),c.setAttribute("aria-label",o.getData(r).value),c.setAttribute("aria-setsize",o.data.length),c.setAttribute("aria-posinset",r),c.setAttribute("aria-describedby","doc-tooltip")}});var e=function(){n(-1)},n=function(r,a){r!==h.start.row&&(h.start.row=h.end.row=r,a||o.session._emit("changeBackMarker"),o._emit("changeHoverMarker"))};o.getHoveredRow=function(){return h.start.row},y.addListener(o.container,"mouseout",e),o.on("hide",e),o.on("changeSelection",e),o.session.doc.getLength=function(){return o.data.length},o.session.doc.getLine=function(r){var a=o.data[r];return typeof a=="string"?a:a&&a.value||""};var i=o.session.bgTokenizer;return i.$tokenizeRow=function(r){var a=o.data[r],c=[];if(!a)return c;typeof a=="string"&&(a={value:a});var l=a.caption||a.value||a.name;function d(I,z){I&&c.push({type:(a.className||"")+(z||""),value:I})}for(var u=l.toLowerCase(),g=(o.filterText||"").toLowerCase(),f=0,m=0,x=0;x<=g.length;x++)if(x!=m&&(a.matchMask&1<=m?c="bottom":c="top"),c==="top"?(x.bottom=r.top-this.$borderSize,x.top=x.bottom-m):c==="bottom"&&(x.top=r.top+a+this.$borderSize,x.bottom=x.top+m);var I=x.top>=0&&x.bottom<=u;if(!l&&!I)return!1;I?f.$maxPixelHeight=null:c==="top"?f.$maxPixelHeight=F:f.$maxPixelHeight=E,c==="top"?(d.style.top="",d.style.bottom=u-x.bottom+"px",o.isTopdown=!1):(d.style.top=x.top+"px",d.style.bottom="",o.isTopdown=!0),d.style.display="";var z=r.left;return z+d.offsetWidth>g&&(z=g-d.offsetWidth),d.style.left=z+"px",d.style.right="",o.isOpen||(o.isOpen=!0,this._signal("show"),p=null),o.anchorPos=r,o.anchor=c,!0},o.show=function(r,a,c){this.tryShow(r,a,c?"bottom":void 0,!0)},o.goTo=function(r){var a=this.getRow(),c=this.session.getLength()-1;switch(r){case"up":a=a<=0?c:a-1;break;case"down":a=a>=c?-1:a+1;break;case"start":a=0;break;case"end":a=c;break}this.setRow(a)},o.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},o.$imageSize=0,o.$borderSize=1,o}return L}();w.importCssString(` .ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line { background-color: #CAD6FA; z-index: 1; } .ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line { background-color: #3a674e; } .ace_editor.ace_autocomplete .ace_line-hover { border: 1px solid #abbffe; margin-top: -1px; background: rgba(233,233,253,0.4); position: absolute; z-index: 2; } .ace_dark.ace_editor.ace_autocomplete .ace_line-hover { border: 1px solid rgba(109, 150, 13, 0.8); background: rgba(58, 103, 78, 0.62); } .ace_completion-meta { opacity: 0.5; margin-left: 0.9em; } .ace_completion-message { color: blue; } .ace_editor.ace_autocomplete .ace_completion-highlight{ color: #2d69c7; } .ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{ color: #93ca12; } .ace_editor.ace_autocomplete { width: 300px; z-index: 200000; border: 1px lightgray solid; position: fixed; box-shadow: 2px 3px 5px rgba(0,0,0,.2); line-height: 1.4; background: #fefefe; color: #111; } .ace_dark.ace_editor.ace_autocomplete { border: 1px #484747 solid; box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51); line-height: 1.4; background: #25282c; color: #c1c1c1; } .ace_autocomplete .ace_text-layer { width: calc(100% - 8px); } .ace_autocomplete .ace_line { display: flex; align-items: center; } .ace_autocomplete .ace_line > * { min-width: 0; flex: 0 0 auto; } .ace_autocomplete .ace_line .ace_ { flex: 0 1 auto; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } .ace_autocomplete .ace_completion-spacer { flex: 1; } `,"autocompletion.css",!1),_.AcePopup=N,_.$singleLineEditor=O,_.getAriaId=H}),ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"],function(b,_,$){var P=b("./lib/dom"),M=b("./lib/oop"),k=b("./lib/event_emitter").EventEmitter,y=b("./lib/lang"),C=b("./range").Range,w=b("./range_list").RangeList,S=b("./keyboard/hash_handler").HashHandler,H=b("./tokenizer").Tokenizer,O=b("./clipboard"),N={CURRENT_WORD:function(t){return t.session.getTextRange(t.session.getWordRange())},SELECTION:function(t,e,n){var i=t.session.getTextRange();return n?i.replace(/\n\r?([ \t]*\S)/g,` `+n+"$1"):i},CURRENT_LINE:function(t){return t.session.getLine(t.getCursorPosition().row)},PREV_LINE:function(t){return t.session.getLine(t.getCursorPosition().row-1)},LINE_INDEX:function(t){return t.getCursorPosition().row},LINE_NUMBER:function(t){return t.getCursorPosition().row+1},SOFT_TABS:function(t){return t.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(t){return t.session.getTabSize()},CLIPBOARD:function(t){return O.getText&&O.getText()},FILENAME:function(t){return/[^/\\]*$/.exec(this.FILEPATH(t))[0]},FILENAME_BASE:function(t){return/[^/\\]*$/.exec(this.FILEPATH(t))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(t){return this.FILEPATH(t).replace(/[^/\\]*$/,"")},FILEPATH:function(t){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(t){var e=t.session.$mode||{};return e.blockComment&&e.blockComment.start||""},BLOCK_COMMENT_END:function(t){var e=t.session.$mode||{};return e.blockComment&&e.blockComment.end||""},LINE_COMMENT:function(t){var e=t.session.$mode||{};return e.lineCommentStart||""},CURRENT_YEAR:L.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:L.bind(null,{year:"2-digit"}),CURRENT_MONTH:L.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:L.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:L.bind(null,{month:"short"}),CURRENT_DATE:L.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:L.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:L.bind(null,{weekday:"short"}),CURRENT_HOUR:L.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:L.bind(null,{minute:"2-digit"}),CURRENT_SECOND:L.bind(null,{second:"2-digit"})};N.SELECTED_TEXT=N.SELECTION;function L(t){var e=new Date().toLocaleString("en-us",t);return e.length==1?"0"+e:e}var T=function(){function t(){this.snippetMap={},this.snippetNameMap={},this.variables=N}return t.prototype.getTokenizer=function(){return t.$tokenizer||this.createTokenizer()},t.prototype.createTokenizer=function(){function e(r){return r=r.substr(1),/^\d+$/.test(r)?[{tabstopId:parseInt(r,10)}]:[{text:r}]}function n(r){return"(?:[^\\\\"+r+"]|\\\\.)"}var i={regex:"/("+n("/")+"+)/",onMatch:function(r,a,c){var l=c[0];return l.fmtString=!0,l.guard=r.slice(1,-1),l.flag="",""},next:"formatString"};return t.$tokenizer=new H({start:[{regex:/\\./,onMatch:function(r,a,c){var l=r[1];return(l=="}"&&c.length||"`$\\".indexOf(l)!=-1)&&(r=l),[r]}},{regex:/}/,onMatch:function(r,a,c){return[c.length?c.shift():r]}},{regex:/\$(?:\d+|\w+)/,onMatch:e},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(r,a,c){var l=e(r.substr(1));return c.unshift(l[0]),l},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+n("\\|")+"*\\|",onMatch:function(r,a,c){var l=r.slice(1,-1).replace(/\\[,|\\]|,/g,function(d){return d.length==2?d[1]:"\0"}).split("\0").map(function(d){return{value:d}});return c[0].choices=l,[l[0]]},next:"start"},i,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(r,a,c){return c.length&&c[0].expectElse?(c[0].expectElse=!1,c[0].ifEnd={elseEnd:c[0]},[c[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(r,a,c){var l=r[1];return l=="}"&&c.length||"`$\\".indexOf(l)!=-1?r=l:l=="n"?r=` `:l=="t"?r=" ":"ulULE".indexOf(l)!=-1&&(r={changeCase:l,local:l>"a"}),[r]}},{regex:"/\\w*}",onMatch:function(r,a,c){var l=c.shift();return l&&(l.flag=r.slice(1,-1)),this.next=l&&l.tabstopId?"start":"",[l||r]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(r,a,c){return[{text:r.slice(1)}]}},{regex:/\${\w+/,onMatch:function(r,a,c){var l={text:r.slice(2)};return c.unshift(l),[l]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(r,a,c){var l=c.shift();return this.next=l&&l.tabstopId?"start":"",[l||r]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(r,a,c){var l=c[0];return l.formatFunction=r.slice(2,-1),[c.shift()]},next:"formatString"},i,{regex:/:[\?\-+]?/,onMatch:function(r,a,c){r[1]=="+"&&(c[0].ifEnd=c[0]),r[1]=="?"&&(c[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),t.$tokenizer},t.prototype.tokenizeTmSnippet=function(e,n){return this.getTokenizer().getLineTokens(e,n).tokens.map(function(i){return i.value||i})},t.prototype.getVariableValue=function(e,n,i){if(/^\d+$/.test(n))return(this.variables.__||{})[n]||"";if(/^[A-Z]\d+$/.test(n))return(this.variables[n[0]+"__"]||{})[n.substr(1)]||"";if(n=n.replace(/^TM_/,""),!this.variables.hasOwnProperty(n))return"";var r=this.variables[n];return typeof r=="function"&&(r=this.variables[n](e,n,i)),r??""},t.prototype.tmStrFormat=function(e,n,i){if(!n.fmt)return e;var r=n.flag||"",a=n.guard;a=new RegExp(a,r.replace(/[^gim]/g,""));var c=typeof n.fmt=="string"?this.tokenizeTmSnippet(n.fmt,"formatString"):n.fmt,l=this,d=e.replace(a,function(){var u=l.variables.__;l.variables.__=[].slice.call(arguments);for(var g=l.resolveVariables(c,i),f="E",m=0;m=0&&d.splice(u,1)}}e.content?a(e):Array.isArray(e)&&e.forEach(a)},t.prototype.parseSnippetFile=function(e){e=e.replace(/\r/g,"");for(var n=[],i={},r=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,a;a=r.exec(e);){if(a[1])try{i=JSON.parse(a[1]),n.push(i)}catch{}if(a[4])i.content=a[4].replace(/^\t/gm,""),n.push(i),i={};else{var c=a[2],l=a[3];if(c=="regex"){var d=/\/((?:[^\/\\]|\\.)*)|$/g;i.guard=d.exec(l)[1],i.trigger=d.exec(l)[1],i.endTrigger=d.exec(l)[1],i.endGuard=d.exec(l)[1]}else c=="snippet"?(i.tabTrigger=l.match(/^\S*/)[0],i.name||(i.name=l)):c&&(i[c]=l)}}return n},t.prototype.getSnippetByName=function(e,n){var i=this.snippetNameMap,r;return this.getActiveScopes(n).some(function(a){var c=i[a];return c&&(r=c[e]),!!r},this),r},t}();M.implement(T.prototype,k);var v=function(t,e,n){n===void 0&&(n={});var i=t.getCursorPosition(),r=t.session.getLine(i.row),a=t.session.getTabString(),c=r.match(/^\s*/)[0];i.column1?(V=D[D.length-1].length,z+=D.length-1):V+=R.length,W+=R}else R&&(R.start?R.end={row:z,column:V}:R.start={row:z,column:V})}),{text:W,tabstops:d,tokens:l}},o=function(){function t(e){if(this.index=0,this.ranges=[],this.tabstops=[],e.tabstopManager)return e.tabstopManager;e.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=y.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(e)}return t.prototype.attach=function(e){this.$openTabstops=null,this.selectedTabstop=null,this.editor=e,this.session=e.session,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},t.prototype.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges.length=0,this.tabstops.length=0,this.selectedTabstop=null,this.editor.off("change",this.$onChange),this.editor.off("changeSelection",this.$onChangeSelection),this.editor.off("changeSession",this.$onChangeSession),this.editor.commands.off("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.session=null,this.editor=null},t.prototype.onChange=function(e){for(var n=e.action[0]=="r",i=this.selectedTabstop||{},r=i.parents||{},a=this.tabstops.slice(),c=0;c2&&(this.tabstops.length&&l.push(l.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,l))},t.prototype.addTabstopMarkers=function(e){var n=this.session;e.forEach(function(i){i.markerId||(i.markerId=n.addMarker(i,"ace_snippet-marker","text"))})},t.prototype.removeTabstopMarkers=function(e){var n=this.session;e.forEach(function(i){n.removeMarker(i.markerId),i.markerId=null})},t.prototype.removeRange=function(e){var n=e.tabstop.indexOf(e);n!=-1&&e.tabstop.splice(n,1),n=this.ranges.indexOf(e),n!=-1&&this.ranges.splice(n,1),n=e.tabstop.rangeList.ranges.indexOf(e),n!=-1&&e.tabstop.splice(n,1),this.session.removeMarker(e.markerId),e.tabstop.length||(n=this.tabstops.indexOf(e.tabstop),n!=-1&&this.tabstops.splice(n,1),this.tabstops.length||this.detach())},t}();o.prototype.keyboardHandler=new S,o.prototype.keyboardHandler.bindKeys({Tab:function(t){_.snippetManager&&_.snippetManager.expandWithTab(t)||(t.tabstopManager.tabNext(1),t.renderer.scrollCursorIntoView())},"Shift-Tab":function(t){t.tabstopManager.tabNext(-1),t.renderer.scrollCursorIntoView()},Esc:function(t){t.tabstopManager.detach()}});var s=function(t,e){t.row==0&&(t.column+=e.column),t.row+=e.row},p=function(t,e){t.row==e.row&&(t.column-=e.column),t.row-=e.row};P.importCssString(` .ace_snippet-marker { -moz-box-sizing: border-box; box-sizing: border-box; background: rgba(194, 193, 208, 0.09); border: 1px dotted rgba(211, 208, 235, 0.62); position: absolute; }`,"snippets.css",!1),_.snippetManager=new T;var h=b("./editor").Editor;(function(){this.insertSnippet=function(t,e){return _.snippetManager.insertSnippet(this,t,e)},this.expandSnippet=function(t){return _.snippetManager.expandWithTab(this,t)}}).call(h.prototype)}),ace.define("ace/autocomplete/inline",["require","exports","module","ace/snippets"],function(b,_,$){var P=b("../snippets").snippetManager,M=function(){function k(){this.editor=null}return k.prototype.show=function(y,C,w){if(w=w||"",y&&this.editor&&this.editor!==y&&(this.hide(),this.editor=null),!y||!C)return!1;var S=C.snippet?P.getDisplayTextForSnippet(y,C.snippet):C.value;return!S||!S.startsWith(w)?!1:(this.editor=y,S=S.slice(w.length),S===""?y.removeGhostText():y.setGhostText(S),!0)},k.prototype.isOpen=function(){return this.editor?!!this.editor.renderer.$ghostText:!1},k.prototype.hide=function(){return this.editor?(this.editor.removeGhostText(),!0):!1},k.prototype.destroy=function(){this.hide(),this.editor=null},k}();_.AceInline=M}),ace.define("ace/autocomplete/util",["require","exports","module"],function(b,_,$){_.parForEach=function(M,k,y){var C=0,w=M.length;w===0&&y();for(var S=0;S=0&&y.test(M[w]);w--)C.push(M[w]);return C.reverse().join("")},_.retrieveFollowingIdentifier=function(M,k,y){y=y||P;for(var C=[],w=k;wthis.filterText&&s.lastIndexOf(this.filterText,0)===0)var p=this.filtered;else var p=this.all;this.filterText=s,p=this.filterCompletions(p,this.filterText),p=p.sort(function(t,e){return e.exactMatch-t.exactMatch||e.$score-t.$score||(t.caption||t.value).localeCompare(e.caption||e.value)});var h=null;p=p.filter(function(t){var e=t.snippet||t.caption||t.value;return e===h?!1:(h=e,!0)}),this.filtered=p},o.prototype.filterCompletions=function(s,p){var h=[],t=p.toUpperCase(),e=p.toLowerCase();e:for(var n=0,i;i=s[n];n++){var r=!this.ignoreCaption&&i.caption||i.value||i.snippet;if(r){var a=-1,c=0,l=0,d,u;if(this.exactMatch){if(p!==r.substr(0,p.length))continue e}else{var g=r.toLowerCase().indexOf(e);if(g>-1)l=g;else for(var f=0;f=0&&(x<0||m0&&(a===-1&&(l+=10),l+=u,c=c|1<0?f=g():f=t.getValue();var m=i?i.getData(i.getRow()):f;m&&!m.error&&(d(),s.onAccept&&s.onAccept({value:f,item:m},t))}var l={Enter:c,"Esc|Shift-Esc":function(){s.onCancel&&s.onCancel(t.getValue(),t),d()}};i&&Object.assign(l,{Up:function(f){i.goTo("up"),g()},Down:function(f){i.goTo("down"),g()},"Ctrl-Up|Ctrl-Home":function(f){i.goTo("start"),g()},"Ctrl-Down|Ctrl-End":function(f){i.goTo("end"),g()},Tab:function(f){i.goTo("down"),g()},PageUp:function(f){i.gotoPageUp(),g()},PageDown:function(f){i.gotoPageDown(),g()}}),t.commands.bindKeys(l);function d(){n.close(),p&&p(),L=null}t.on("input",function(){s.onInput&&s.onInput(),u()});function u(){if(s.getCompletions){var f;s.getPrefix&&(f=s.getPrefix(t));var m=s.getCompletions(t);i.setData(m,f),i.resize(!0)}}function g(){var f=i.getData(i.getRow());if(f&&!f.error)return f.value||f.caption||f}t.resize(!0),i&&i.resize(!0),t.focus(),L={close:d,name:s.name,editor:v}}T.gotoLine=function(v,o){function s(p){return Array.isArray(p)||(p=[p]),p.map(function(h){var t=h.isBackwards?h.start:h.end,e=h.isBackwards?h.end:h.start,n=e.row,i=n+1+":"+e.column;return e.row==t.row?e.column!=t.column&&(i+=">:"+t.column):i+=">"+(t.row+1)+":"+t.column,i}).reverse().join(", ")}T(v,":"+s(v.selection.toJSON()),{name:"gotoLine",selection:[1,Number.MAX_VALUE],onAccept:function(p){var h=p.value,t=T.gotoLine._history;t||(T.gotoLine._history=t=[]),t.indexOf(h)!=-1&&t.splice(t.indexOf(h),1),t.unshift(h),t.length>20&&(t.length=20);var e=v.getCursorPosition(),n=[];h.replace(/^:/,"").split(/,/).map(function(r){var a=r.split(/([<>:+-]|c?\d+)|[^c\d<>:+-]+/).filter(Boolean),c=0;function l(){var u=a[c++];if(u){if(u[0]=="c"){var g=parseInt(u.slice(1))||0;return v.session.doc.indexToPosition(g)}var f=e.row,m=0;return/\d/.test(u)&&(f=parseInt(u)-1,u=a[c++]),u==":"&&(u=a[c++],/\d/.test(u)&&(m=parseInt(u)||0)),{row:f,column:m}}}e=l();var d=M.fromPoints(e,e);a[c]==">"?(c++,d.end=l()):a[c]=="<"&&(c++,d.start=l()),n.unshift(d)}),v.selection.fromJSON(n);var i=v.renderer.scrollTop;v.renderer.scrollSelectionIntoView(v.selection.anchor,v.selection.cursor,.5),v.renderer.animateScrolling(i)},history:function(){return T.gotoLine._history?T.gotoLine._history:[]},getCompletions:function(p){var h=p.getValue(),t=h.replace(/^:/,"").split(":"),e=Math.min(parseInt(t[0])||1,v.session.getLength())-1,n=v.session.getLine(e),i=h+" "+n;return[i].concat(this.history())},$rules:{start:[{regex:/\d+/,token:"string"},{regex:/[:,><+\-c]/,token:"keyword"}]}})},T.commands=function(v,o){function s(e){return(e||"").replace(/^./,function(n){return n.toUpperCase(n)}).replace(/[a-z][A-Z]/g,function(n){return n[0]+" "+n[1].toLowerCase(n)})}function p(e){var n=[],i={};return v.keyBinding.$handlers.forEach(function(r){var a=r.platform,c=r.byName;for(var l in c){var d=c[l].bindKey;typeof d!="string"&&(d=d&&d[a]||"");var u=c[l],g=u.description||s(u.name);Array.isArray(u)||(u=[u]),u.forEach(function(f){typeof f!="string"&&(f=f.name);var m=e.find(function(x){return x===f});m||(i[f]?i[f].key+="|"+d:(i[f]={key:d,command:f,description:g},n.push(i[f])))})}}),n}var h=["insertstring","inserttext","setIndentation","paste"],t=p(h);t=t.map(function(e){return{value:e.description,meta:e.key,command:e.command}}),T(v,"",{name:"commands",selection:[0,Number.MAX_VALUE],maxHistoryCount:5,onAccept:function(e){if(e.item){var n=e.item.command;this.addToHistory(e.item),v.execCommand(n)}},addToHistory:function(e){var n=this.history();n.unshift(e),delete e.message;for(var i=1;i0&&n.length>this.maxHistoryCount&&n.splice(n.length-1,1),T.commands.history=n},history:function(){return T.commands.history||[]},getPrefix:function(e){var n=e.getCursorPosition(),i=e.getValue();return i.substring(0,n.column)},getCompletions:function(e){function n(d,u){var g=JSON.parse(JSON.stringify(d)),f=new y(g);return f.filterCompletions(g,u)}function i(d,u){if(!u||!u.length)return d;var g=[];u.forEach(function(m){g.push(m.command)});var f=[];return d.forEach(function(m){g.indexOf(m.command)===-1&&f.push(m)}),f}var r=this.getPrefix(e),a=n(this.history(),r),c=i(t,a);c=n(c,r),a.length&&c.length&&(a[0].message=P("Recently used"),c[0].message=P("Other commands"));var l=a.concat(c);return l.length>0?l:[{value:P("No matching commands"),error:1}]}})},T.modes=function(v,o){var s=N.modes;s=s.map(function(p){return{value:p.caption,mode:p.name}}),T(v,"",{name:"modes",selection:[0,Number.MAX_VALUE],onAccept:function(p){if(p.item){var h="ace/mode/"+p.item.mode;v.session.setMode(h)}},getPrefix:function(p){var h=p.getCursorPosition(),t=p.getValue();return t.substring(0,h.column)},getCompletions:function(p){function h(n,i){var r=JSON.parse(JSON.stringify(n)),a=new y(r);return a.filterCompletions(r,i)}var t=this.getPrefix(p),e=h(s,t);return e.length>0?e:[{caption:"No mode matching",value:"No mode matching",error:1}]}})},k.importCssString(`.ace_prompt_container { max-width: 603px; width: 100%; margin: 20px auto; padding: 3px; background: white; border-radius: 2px; box-shadow: 0px 2px 3px 0px #555; }`,"promtp.css",!1),_.prompt=T}),function(){ace.require(["ace/ext/prompt"],function(b){U&&(U.exports=b)})}()})(K);var X=K.exports;const ee=Z(X),ne=q({__proto__:null,default:ee},[X]);export{ne as e};