All Downloads are FREE. Search and download functionalities are using the official Maven repository.

web-interface.assets.f43f03d6c661cee33151e6ca5740082e.js Maven / Gradle / Ivy

There is a newer version: 6.1.4
Show newest version
(()=>{var X=(f,_)=>()=>(_||f((_={exports:{}}).exports,_),_.exports);var J=X((Z,j)=>{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(f,_,F){"use strict";var k=f("./lib/dom"),$=f("./lib/oop"),L=f("./lib/event_emitter").EventEmitter,w=f("./lib/lang"),v=f("./range").Range,y=f("./range_list").RangeList,E=f("./keyboard/hash_handler").HashHandler,S=f("./tokenizer").Tokenizer,R=f("./clipboard"),P={CURRENT_WORD:function(o){return o.session.getTextRange(o.session.getWordRange())},SELECTION:function(o,t,e){var n=o.session.getTextRange();return e?n.replace(/\n\r?([ \t]*\S)/g,`
`+e+"$1"):n},CURRENT_LINE:function(o){return o.session.getLine(o.getCursorPosition().row)},PREV_LINE:function(o){return o.session.getLine(o.getCursorPosition().row-1)},LINE_INDEX:function(o){return o.getCursorPosition().row},LINE_NUMBER:function(o){return o.getCursorPosition().row+1},SOFT_TABS:function(o){return o.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(o){return o.session.getTabSize()},CLIPBOARD:function(o){return R.getText&&R.getText()},FILENAME:function(o){return/[^/\\]*$/.exec(this.FILEPATH(o))[0]},FILENAME_BASE:function(o){return/[^/\\]*$/.exec(this.FILEPATH(o))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(o){return this.FILEPATH(o).replace(/[^/\\]*$/,"")},FILEPATH:function(o){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(o){var t=o.session.$mode||{};return t.blockComment&&t.blockComment.start||""},BLOCK_COMMENT_END:function(o){var t=o.session.$mode||{};return t.blockComment&&t.blockComment.end||""},LINE_COMMENT:function(o){var t=o.session.$mode||{};return t.lineCommentStart||""},CURRENT_YEAR:M.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:M.bind(null,{year:"2-digit"}),CURRENT_MONTH:M.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:M.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:M.bind(null,{month:"short"}),CURRENT_DATE:M.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:M.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:M.bind(null,{weekday:"short"}),CURRENT_HOUR:M.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:M.bind(null,{minute:"2-digit"}),CURRENT_SECOND:M.bind(null,{second:"2-digit"})};P.SELECTED_TEXT=P.SELECTION;function M(o){var t=new Date().toLocaleString("en-us",o);return t.length==1?"0"+t:t}var C=function(){function o(){this.snippetMap={},this.snippetNameMap={},this.variables=P}return o.prototype.getTokenizer=function(){return o.$tokenizer||this.createTokenizer()},o.prototype.createTokenizer=function(){function t(i){return i=i.substr(1),/^\d+$/.test(i)?[{tabstopId:parseInt(i,10)}]:[{text:i}]}function e(i){return"(?:[^\\\\"+i+"]|\\\\.)"}var n={regex:"/("+e("/")+"+)/",onMatch:function(i,r,l){var s=l[0];return s.fmtString=!0,s.guard=i.slice(1,-1),s.flag="",""},next:"formatString"};return o.$tokenizer=new S({start:[{regex:/\\./,onMatch:function(i,r,l){var s=i[1];return(s=="}"&&l.length||"`$\\".indexOf(s)!=-1)&&(i=s),[i]}},{regex:/}/,onMatch:function(i,r,l){return[l.length?l.shift():i]}},{regex:/\$(?:\d+|\w+)/,onMatch:t},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(i,r,l){var s=t(i.substr(1));return l.unshift(s[0]),s},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+e("\\|")+"*\\|",onMatch:function(i,r,l){var s=i.slice(1,-1).replace(/\\[,|\\]|,/g,function(d){return d.length==2?d[1]:"\0"}).split("\0").map(function(d){return{value:d}});return l[0].choices=s,[s[0]]},next:"start"},n,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(i,r,l){return l.length&&l[0].expectElse?(l[0].expectElse=!1,l[0].ifEnd={elseEnd:l[0]},[l[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(i,r,l){var s=i[1];return s=="}"&&l.length||"`$\\".indexOf(s)!=-1?i=s:s=="n"?i=`
`:s=="t"?i="	":"ulULE".indexOf(s)!=-1&&(i={changeCase:s,local:s>"a"}),[i]}},{regex:"/\\w*}",onMatch:function(i,r,l){var s=l.shift();return s&&(s.flag=i.slice(1,-1)),this.next=s&&s.tabstopId?"start":"",[s||i]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(i,r,l){return[{text:i.slice(1)}]}},{regex:/\${\w+/,onMatch:function(i,r,l){var s={text:i.slice(2)};return l.unshift(s),[s]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(i,r,l){var s=l.shift();return this.next=s&&s.tabstopId?"start":"",[s||i]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(i,r,l){var s=l[0];return s.formatFunction=i.slice(2,-1),[l.shift()]},next:"formatString"},n,{regex:/:[\?\-+]?/,onMatch:function(i,r,l){i[1]=="+"&&(l[0].ifEnd=l[0]),i[1]=="?"&&(l[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),o.$tokenizer},o.prototype.tokenizeTmSnippet=function(t,e){return this.getTokenizer().getLineTokens(t,e).tokens.map(function(n){return n.value||n})},o.prototype.getVariableValue=function(t,e,n){if(/^\d+$/.test(e))return(this.variables.__||{})[e]||"";if(/^[A-Z]\d+$/.test(e))return(this.variables[e[0]+"__"]||{})[e.substr(1)]||"";if(e=e.replace(/^TM_/,""),!this.variables.hasOwnProperty(e))return"";var i=this.variables[e];return typeof i=="function"&&(i=this.variables[e](t,e,n)),i==null?"":i},o.prototype.tmStrFormat=function(t,e,n){if(!e.fmt)return t;var i=e.flag||"",r=e.guard;r=new RegExp(r,i.replace(/[^gim]/g,""));var l=typeof e.fmt=="string"?this.tokenizeTmSnippet(e.fmt,"formatString"):e.fmt,s=this,d=t.replace(r,function(){var p=s.variables.__;s.variables.__=[].slice.call(arguments);for(var m=s.resolveVariables(l,n),g="E",x=0;x=0&&d.splice(p,1)}}t.content?r(t):Array.isArray(t)&&t.forEach(r)},o.prototype.parseSnippetFile=function(t){t=t.replace(/\r/g,"");for(var e=[],n={},i=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,r;r=i.exec(t);){if(r[1])try{n=JSON.parse(r[1]),e.push(n)}catch{}if(r[4])n.content=r[4].replace(/^\t/gm,""),e.push(n),n={};else{var l=r[2],s=r[3];if(l=="regex"){var d=/\/((?:[^\/\\]|\\.)*)|$/g;n.guard=d.exec(s)[1],n.trigger=d.exec(s)[1],n.endTrigger=d.exec(s)[1],n.endGuard=d.exec(s)[1]}else l=="snippet"?(n.tabTrigger=s.match(/^\S*/)[0],n.name||(n.name=s)):l&&(n[l]=s)}}return e},o.prototype.getSnippetByName=function(t,e){var n=this.snippetNameMap,i;return this.getActiveScopes(e).some(function(r){var l=n[r];return l&&(i=l[t]),!!i},this),i},o}();$.implement(C.prototype,L);var O=function(o,t,e){e===void 0&&(e={});var n=o.getCursorPosition(),i=o.session.getLine(n.row),r=o.session.getTabString(),l=i.match(/^\s*/)[0];n.column1?(B=D[D.length-1].length,z+=D.length-1):B+=A.length,K+=A}else A&&(A.start?A.end={row:z,column:B}:A.start={row:z,column:B})}),{text:K,tabstops:d,tokens:s}},h=function(){function o(t){if(this.index=0,this.ranges=[],this.tabstops=[],t.tabstopManager)return t.tabstopManager;t.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=w.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(t)}return o.prototype.attach=function(t){this.$openTabstops=null,this.selectedTabstop=null,this.editor=t,this.session=t.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)},o.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},o.prototype.onChange=function(t){for(var e=t.action[0]=="r",n=this.selectedTabstop||{},i=n.parents||{},r=this.tabstops.slice(),l=0;l2&&(this.tabstops.length&&s.push(s.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,s))},o.prototype.addTabstopMarkers=function(t){var e=this.session;t.forEach(function(n){n.markerId||(n.markerId=e.addMarker(n,"ace_snippet-marker","text"))})},o.prototype.removeTabstopMarkers=function(t){var e=this.session;t.forEach(function(n){e.removeMarker(n.markerId),n.markerId=null})},o.prototype.removeRange=function(t){var e=t.tabstop.indexOf(t);e!=-1&&t.tabstop.splice(e,1),e=this.ranges.indexOf(t),e!=-1&&this.ranges.splice(e,1),e=t.tabstop.rangeList.ranges.indexOf(t),e!=-1&&t.tabstop.splice(e,1),this.session.removeMarker(t.markerId),t.tabstop.length||(e=this.tabstops.indexOf(t.tabstop),e!=-1&&this.tabstops.splice(e,1),this.tabstops.length||this.detach())},o}();h.prototype.keyboardHandler=new E,h.prototype.keyboardHandler.bindKeys({Tab:function(o){_.snippetManager&&_.snippetManager.expandWithTab(o)||(o.tabstopManager.tabNext(1),o.renderer.scrollCursorIntoView())},"Shift-Tab":function(o){o.tabstopManager.tabNext(-1),o.renderer.scrollCursorIntoView()},Esc:function(o){o.tabstopManager.detach()}});var u=function(o,t){o.row==0&&(o.column+=t.column),o.row+=t.row},c=function(o,t){o.row==t.row&&(o.column-=t.column),o.row-=t.row};k.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 C;var a=f("./editor").Editor;(function(){this.insertSnippet=function(o,t){return _.snippetManager.insertSnippet(this,o,t)},this.expandSnippet=function(o){return _.snippetManager.expandWithTab(this,o)}}).call(a.prototype)});ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(f,_,F){"use strict";var k=function(){function $(L){this.editor=L,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return $.prototype.setScreenReaderContent=function(L){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",(function(){var v=this.popup.getRow(),y=this.popup.renderer.$textLayer,E=y.element.childNodes[v-y.config.firstRow];if(E){for(var S="doc-tooltip ",R=0;R=x?l="bottom":l="top"),l==="top"?(b.bottom=i.top-this.$borderSize,b.top=b.bottom-x):l==="bottom"&&(b.top=i.top+r+this.$borderSize,b.bottom=b.top+x);var I=b.top>=0&&b.bottom<=p;if(!s&&!I)return!1;I?g.$maxPixelHeight=null:l==="top"?g.$maxPixelHeight=H:g.$maxPixelHeight=T,l==="top"?(d.style.top="",d.style.bottom=p-b.bottom+"px",h.isTopdown=!1):(d.style.top=b.top+"px",d.style.bottom="",h.isTopdown=!0),d.style.display="";var z=i.left;return z+d.offsetWidth>m&&(z=m-d.offsetWidth),d.style.left=z+"px",d.style.right="",h.isOpen||(h.isOpen=!0,this._signal("show"),c=null),h.anchorPos=i,h.anchor=l,!0},h.show=function(i,r,l){this.tryShow(i,r,l?"bottom":void 0,!0)},h.goTo=function(i){var r=this.getRow(),l=this.session.getLength()-1;switch(i){case"up":r=r<=0?l:r-1;break;case"down":r=r>=l?-1:r+1;break;case"start":r=0;break;case"end":r=l;break}this.setRow(r)},h.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},h.$imageSize=0,h.$borderSize=1,h}return M}();y.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=P,_.$singleLineEditor=R,_.getAriaId=S});ace.define("ace/autocomplete/util",["require","exports","module"],function(f,_,F){"use strict";_.parForEach=function($,L,w){var v=0,y=$.length;y===0&&w();for(var E=0;E=0&&w.test($[y]);y--)v.push($[y]);return v.reverse().join("")},_.retrieveFollowingIdentifier=function($,L,w){w=w||k;for(var v=[],y=L;y<$.length&&w.test($[y]);y++)v.push($[y]);return v},_.getCompletionPrefix=function($){var L=$.getCursorPosition(),w=$.session.getLine(L.row),v;return $.completers.forEach((function(y){y.identifierRegexps&&y.identifierRegexps.forEach((function(E){!v&&E&&(v=this.retrievePrecedingIdentifier(w,L.column,E))}).bind(this))}).bind(this)),v||this.retrievePrecedingIdentifier(w,L.column)},_.triggerAutocomplete=function($){var L=$.getCursorPosition(),w=$.session.getLine(L.row),v=L.column===0?0:L.column-1,y=w[v];return $.completers.some(function(E){if(E.triggerCharacters&&Array.isArray(E.triggerCharacters))return E.triggerCharacters.includes(y)})}});ace.define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/inline","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/lang","ace/lib/dom","ace/snippets","ace/config","ace/lib/event"],function(f,_,F){"use strict";var k=f("./keyboard/hash_handler").HashHandler,$=f("./autocomplete/popup").AcePopup,L=f("./autocomplete/inline").AceInline,w=f("./autocomplete/popup").getAriaId,v=f("./autocomplete/util"),y=f("./lib/lang"),E=f("./lib/dom"),S=f("./snippets").snippetManager,R=f("./config"),P=f("./lib/event"),M=function(u,c){c.completer&&c.completer.destroy()},C=function(){function u(){this.autoInsert=!1,this.autoSelect=!0,this.autoShown=!1,this.exactMatch=!1,this.inlineEnabled=!1,this.keyboardHandler=new k,this.keyboardHandler.bindKeys(this.commands),this.parentNode=null,this.setSelectOnHover=!1,this.stickySelectionDelay=500,this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.mousedownListener=this.mousedownListener.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this),this.onLayoutChange=this.onLayoutChange.bind(this),this.changeTimer=y.delayedCall((function(){this.updateCompletions(!0)}).bind(this)),this.tooltipTimer=y.delayedCall(this.updateDocTooltip.bind(this),50),this.stickySelectionTimer=y.delayedCall((function(){this.stickySelection=!0}).bind(this),this.stickySelectionDelay)}return u.prototype.$init=function(){return this.popup=new $(this.parentNode||document.body||document.documentElement),this.popup.on("click",(function(c){this.insertMatch(),c.stop()}).bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on("show",this.$onPopupShow.bind(this)),this.popup.on("hide",this.$onHidePopup.bind(this)),this.popup.on("select",this.$onPopupChange.bind(this)),P.addListener(this.popup.container,"mouseout",this.mouseOutListener.bind(this)),this.popup.on("changeHoverMarker",this.tooltipTimer.bind(null,null)),this.popup},u.prototype.$initInline=function(){if(!(!this.inlineEnabled||this.inlineRenderer))return this.inlineRenderer=new L,this.inlineRenderer},u.prototype.getPopup=function(){return this.popup||this.$init()},u.prototype.$onHidePopup=function(){this.inlineRenderer&&this.inlineRenderer.hide(),this.hideDocTooltip(),this.stickySelectionTimer.cancel(),this.stickySelection=!1},u.prototype.$onPopupChange=function(c){if(this.inlineRenderer&&this.inlineEnabled){var a=c?null:this.popup.getData(this.popup.getRow()),o=v.getCompletionPrefix(this.editor);if(this.inlineRenderer.show(this.editor,a,o)||this.inlineRenderer.hide(),this.popup.isMouseOver&&this.setSelectOnHover){this.tooltipTimer.call(null,null);return}}this.$updatePopupPosition(),this.tooltipTimer.call(null,null)},u.prototype.$onPopupShow=function(c){this.$onPopupChange(c),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},u.prototype.observeLayoutChanges=function(){if(!(this.$elements||!this.editor)){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var c=this.editor.container.parentNode,a=[];c;)a.push(c),c.addEventListener("scroll",this.onLayoutChange,{passive:!0}),c=c.parentNode;this.$elements=a}},u.prototype.unObserveLayoutChanges=function(){var c=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(a){a.removeEventListener("scroll",c.onLayoutChange,{passive:!0})}),this.$elements=null},u.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},u.prototype.$updatePopupPosition=function(){var c=this.editor,a=c.renderer,o=a.layerConfig.lineHeight,t=a.$cursorLayer.getPixelPosition(this.base,!0);t.left-=this.popup.getTextLeftOffset();var e=c.container.getBoundingClientRect();t.top+=e.top-a.layerConfig.offset,t.left+=e.left-c.renderer.scrollLeft,t.left+=a.gutterWidth;var n={top:t.top,left:t.left};a.$ghostText&&a.$ghostTextWidget&&this.base.row===a.$ghostText.position.row&&(n.top+=a.$ghostTextWidget.el.offsetHeight),!this.popup.tryShow(n,o,"bottom")&&(this.popup.tryShow(t,o,"top")||this.popup.show(t,o))},u.prototype.openPopup=function(c,a,o){this.popup||this.$init(),this.inlineEnabled&&!this.inlineRenderer&&this.$initInline(),this.popup.autoSelect=this.autoSelect,this.popup.setSelectOnHover(this.setSelectOnHover);var t=this.popup.data[this.popup.getRow()];this.popup.setData(this.completions.filtered,this.completions.filterText),this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({activeDescendant:w(this.popup.getRow()),inline:this.inlineEnabled}),c.keyBinding.addKeyboardHandler(this.keyboardHandler);var e=this.popup.data.indexOf(t);e&&this.stickySelection?this.popup.setRow(this.autoSelect?e:-1):this.popup.setRow(this.autoSelect?0:-1),o?o&&!a&&this.detach():(this.popup.setTheme(c.getTheme()),this.popup.setFontSize(c.getFontSize()),this.$updatePopupPosition(),this.tooltipNode&&this.updateDocTooltip()),this.changeTimer.cancel(),this.observeLayoutChanges()},u.prototype.detach=function(){this.editor&&(this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off("changeSelection",this.changeListener),this.editor.off("blur",this.blurListener),this.editor.off("mousedown",this.mousedownListener),this.editor.off("mousewheel",this.mousewheelListener)),this.changeTimer.cancel(),this.hideDocTooltip(),this.completionProvider&&this.completionProvider.detach(),this.popup&&this.popup.isOpen&&this.popup.hide(),this.base&&this.base.detach(),this.activated=!1,this.completionProvider=this.completions=this.base=null,this.unObserveLayoutChanges()},u.prototype.changeListener=function(c){var a=this.editor.selection.lead;(a.row!=this.base.row||a.columnthis.filterText&&c.lastIndexOf(this.filterText,0)===0)var a=this.filtered;else var a=this.all;this.filterText=c,a=this.filterCompletions(a,this.filterText),a=a.sort(function(t,e){return e.exactMatch-t.exactMatch||e.$score-t.$score||(t.caption||t.value).localeCompare(e.caption||e.value)});var o=null;a=a.filter(function(t){var e=t.snippet||t.caption||t.value;return e===o?!1:(o=e,!0)}),this.filtered=a},u.prototype.filterCompletions=function(c,a){var o=[],t=a.toUpperCase(),e=a.toLowerCase();e:for(var n=0,i;i=c[n];n++){var r=!this.ignoreCaption&&i.caption||i.value||i.snippet;if(r){var l=-1,s=0,d=0,p,m;if(this.exactMatch){if(a!==r.substr(0,a.length))continue e}else{var g=r.toLowerCase().indexOf(e);if(g>-1)d=g;else for(var x=0;x=0&&(T<0||b0&&(l===-1&&(d+=10),d+=m,s=s|1<=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},$=f("../tooltip").Tooltip,L=f("../lib/event_emitter").EventEmitter,w=f("../lib/lang"),v=f("../lib/dom"),y=f("../lib/oop"),E=f("../lib/useragent"),S="command_bar_tooltip_button",R="command_bar_button_value",P="command_bar_button_caption",M="command_bar_keybinding",C="command_bar_tooltip",O="MoreOptionsButton",h=100,u=4,c=function(t,e){return e.row>t.row||e.row===t.row&&e.column>t.column?t:e},a={Ctrl:{mac:"^"},Option:{mac:"\u2325"},Command:{mac:"\u2318"},Cmd:{mac:"\u2318"},Shift:"\u21E7",Left:"\u2190",Right:"\u2192",Up:"\u2191",Down:"\u2193"},o=function(){function t(e,n){var i,r;n=n||{},this.parentNode=e,this.tooltip=new $(this.parentNode),this.moreOptions=new $(this.parentNode),this.maxElementsOnTooltip=n.maxElementsOnTooltip||u,this.$alwaysShow=n.alwaysShow||!1,this.eventListeners={},this.elements={},this.commands={},this.tooltipEl=v.buildDom(["div",{class:C}],this.tooltip.getElement()),this.moreOptionsEl=v.buildDom(["div",{class:C+" tooltip_more_options"}],this.moreOptions.getElement()),this.$showTooltipTimer=w.delayedCall(this.$showTooltip.bind(this),n.showDelay||h),this.$hideTooltipTimer=w.delayedCall(this.$hideTooltip.bind(this),n.hideDelay||h),this.$tooltipEnter=this.$tooltipEnter.bind(this),this.$onMouseMove=this.$onMouseMove.bind(this),this.$onChangeScroll=this.$onChangeScroll.bind(this),this.$onEditorChangeSession=this.$onEditorChangeSession.bind(this),this.$scheduleTooltipForHide=this.$scheduleTooltipForHide.bind(this),this.$preventMouseEvent=this.$preventMouseEvent.bind(this);try{for(var l=k(["mousedown","mouseup","click"]),s=l.next();!s.done;s=l.next()){var d=s.value;this.tooltip.getElement().addEventListener(d,this.$preventMouseEvent),this.moreOptions.getElement().addEventListener(d,this.$preventMouseEvent)}}catch(p){i={error:p}}finally{try{s&&!s.done&&(r=l.return)&&r.call(l)}finally{if(i)throw i.error}}}return t.prototype.registerCommand=function(e,n){var i=Object.keys(this.commands).length=g.top&&s.top<=g.bottom&&s.left>=g.left+e.gutterWidth&&s.left<=g.right;if(!x&&this.isShown()){this.$hideTooltip();return}else if(x&&!this.isShown()&&this.getAlwaysShow()){this.$showTooltip();return}var b=s.top-d.offsetHeight,T=Math.min(p-d.offsetWidth,s.left),H=b>=0&&b+d.offsetHeight<=m&&T>=0&&T+d.offsetWidth<=p;if(!H){this.$hideTooltip();return}if(this.tooltip.setPosition(T,b),this.isMoreOptionsShown()){b=b+d.offsetHeight,T=this.elements[O].getBoundingClientRect().left;var I=this.moreOptions.getElement(),m=window.innerHeight;b+I.offsetHeight>m&&(b-=d.offsetHeight+I.offsetHeight),T+I.offsetWidth>p&&(T=p-I.offsetWidth),this.moreOptions.setPosition(T,b)}}}},t.prototype.update=function(){Object.keys(this.elements).forEach(this.$updateElement.bind(this))},t.prototype.detach=function(){this.tooltip.hide(),this.moreOptions.hide(),this.$updateOnHoverHandlers(!1),this.editor&&(this.editor.off("changeSession",this.$onEditorChangeSession),this.editor.session&&(this.editor.session.off("changeScrollLeft",this.$onChangeScroll),this.editor.session.off("changeScrollTop",this.$onChangeScroll))),this.$mouseInTooltip=!1,this.editor=null},t.prototype.destroy=function(){this.tooltip&&this.moreOptions&&(this.detach(),this.tooltip.destroy(),this.moreOptions.destroy()),this.eventListeners={},this.commands={},this.elements={},this.tooltip=this.moreOptions=this.parentNode=null},t.prototype.$createCommand=function(e,n,i){var r=i?this.tooltipEl:this.moreOptionsEl,l=[],s=n.bindKey;s&&(typeof s=="object"&&(s=E.isMac?s.mac:s.win),s=s.split("|")[0],l=s.split("-"),l=l.map(function(m){if(a[m]){if(typeof a[m]=="string")return a[m];if(E.isMac&&a[m].mac)return a[m].mac}return m}));var d;i&&n.iconCssClass?d=["div",{class:["ace_icon_svg",n.iconCssClass].join(" "),"aria-label":n.name+" ("+n.bindKey+")"}]:(d=[["div",{class:R}],["div",{class:P},n.name]],l.length&&d.push(["div",{class:M},l.map(function(m){return["div",m]})])),v.buildDom(["div",{class:[S,n.cssClass||""].join(" "),ref:e},d],r,this.elements),this.commands[e]=n;var p=(function(m){this.editor&&this.editor.focus(),this.$shouldHideMoreOptions=this.isMoreOptionsShown(),!this.elements[e].disabled&&n.exec&&n.exec(this.editor),this.$shouldHideMoreOptions&&this.$setMoreOptionsVisibility(!1),this.update(),m.preventDefault()}).bind(this);this.eventListeners[e]=p,this.elements[e].addEventListener("click",p.bind(this)),this.$updateElement(e)},t.prototype.$setMoreOptionsVisibility=function(e){e?(this.moreOptions.setTheme(this.editor.renderer.theme),this.moreOptions.setClassName(C+"_wrapper"),this.moreOptions.show(),this.update(),this.updatePosition()):this.moreOptions.hide()},t.prototype.$onEditorChangeSession=function(e){e.oldSession&&(e.oldSession.off("changeScrollTop",this.$onChangeScroll),e.oldSession.off("changeScrollLeft",this.$onChangeScroll)),this.detach()},t.prototype.$onChangeScroll=function(){this.editor.renderer&&(this.isShown()||this.getAlwaysShow())&&this.editor.renderer.once("afterRender",this.updatePosition.bind(this))},t.prototype.$onMouseMove=function(e){if(!this.$mouseInTooltip){var n=this.editor.getCursorPosition(),i=this.editor.renderer.textToScreenCoordinates(n.row,n.column),r=this.editor.renderer.lineHeight,l=e.clientY>=i.pageY&&e.clientY",w.escapeHTML(e.caption),"","
",w.escapeHTML(S(e.snippet))].join(""))},id:"snippetCompleter"},P=[R,y,E];_.setCompleters=function(e){P.length=0,e&&P.push.apply(P,e)},_.addCompleter=function(e){P.push(e)},_.textCompleter=y,_.keyWordCompleter=E,_.snippetCompleter=R;var M={name:"expandSnippet",exec:function(e){return k.expandWithTab(e)},bindKey:"Tab"},C=function(e,n){O(n.session.$mode)},O=function(e){typeof e=="string"&&(e=L.$modes[e]),e&&(k.files||(k.files={}),h(e.$id,e.snippetFileId),e.modes&&e.modes.forEach(O))},h=function(e,n){!n||!e||k.files[e]||(k.files[e]={},L.loadModule(n,function(i){i&&(k.files[e]=i,!i.snippets&&i.snippetText&&(i.snippets=k.parseSnippetFile(i.snippetText)),k.register(i.snippets||[],i.scope),i.includeScopes&&(k.snippetMap[i.scope].includeScopes=i.includeScopes,i.includeScopes.forEach(function(r){O("ace/mode/"+r)})))}))},u=function(e){var n=e.editor,i=n.completer&&n.completer.activated;if(e.command.name==="backspace")i&&!v.getCompletionPrefix(n)&&n.completer.detach();else if(e.command.name==="insertstring"&&!i){c=e;var r=e.editor.$liveAutocompletionDelay;r?a.delay(r):o(e)}},c,a=w.delayedCall(function(){o(c)},0),o=function(e){var n=e.editor,i=v.getCompletionPrefix(n),r=v.triggerAutocomplete(n);if(i&&i.length>=n.$liveAutocompletionThreshold||r){var l=$.for(n);l.autoShown=!0,l.showPopup(n)}},t=f("../editor").Editor;f("../config").defineOptions(t.prototype,"editor",{enableBasicAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:P),this.commands.addCommand($.startCommand)):this.commands.removeCommand($.startCommand)},value:!1},enableLiveAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:P),this.commands.on("afterExec",u)):this.commands.off("afterExec",u)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(e){e?(this.commands.addCommand(M),this.on("changeMode",C),C(null,this)):(this.commands.removeCommand(M),this.off("changeMode",C))},value:!1}})});ace.define("ace/ext/inline_autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/inline","ace/autocomplete","ace/autocomplete","ace/editor","ace/autocomplete/util","ace/lib/dom","ace/lib/lang","ace/ext/command_bar","ace/ext/command_bar","ace/ext/language_tools","ace/ext/language_tools","ace/ext/language_tools","ace/config"],function(f,_,F){"use strict";var k=f("../keyboard/hash_handler").HashHandler,$=f("../autocomplete/inline").AceInline,L=f("../autocomplete").FilteredList,w=f("../autocomplete").CompletionProvider,v=f("../editor").Editor,y=f("../autocomplete/util"),E=f("../lib/dom"),S=f("../lib/lang"),R=f("./command_bar").CommandBarTooltip,P=f("./command_bar").BUTTON_CLASS_NAME,M=f("./language_tools").snippetCompleter,C=f("./language_tools").textCompleter,O=f("./language_tools").keyWordCompleter,h=function(a,o){o.completer&&o.completer.destroy()},u=function(){function a(o){this.editor=o,this.keyboardHandler=new k(this.commands),this.$index=-1,this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.changeTimer=S.delayedCall((function(){this.updateCompletions()}).bind(this))}return a.prototype.getInlineRenderer=function(){return this.inlineRenderer||(this.inlineRenderer=new $),this.inlineRenderer},a.prototype.getInlineTooltip=function(){return this.inlineTooltip||(this.inlineTooltip=a.createInlineTooltip(document.body||document.documentElement)),this.inlineTooltip},a.prototype.show=function(o){this.activated=!0,this.editor.completer!==this&&(this.editor.completer&&this.editor.completer.detach(),this.editor.completer=this),this.editor.on("changeSelection",this.changeListener),this.editor.on("blur",this.blurListener),this.updateCompletions(o)},a.prototype.$open=function(){this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({}),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler),this.getInlineTooltip().attach(this.editor),this.$index===-1?this.setIndex(0):this.$showCompletion(),this.changeTimer.cancel()},a.prototype.insertMatch=function(){var o=this.getCompletionProvider().insertByIndex(this.editor,this.$index);return this.detach(),o},a.prototype.changeListener=function(o){var t=this.editor.selection.lead;(t.row!=this.base.row||t.column=0},a.prototype.setIndex=function(o){if(!(!this.completions||!this.completions.filtered)){var t=Math.max(-1,Math.min(this.completions.filtered.length-1,o));t!==this.$index&&(this.$index=t,this.$showCompletion())}},a.prototype.getCompletionProvider=function(o){return this.completionProvider||(this.completionProvider=new w(o)),this.completionProvider},a.prototype.$showCompletion=function(){this.getInlineRenderer().show(this.editor,this.completions.filtered[this.$index],this.completions.filterText)||this.getInlineRenderer().hide(),this.inlineTooltip&&this.inlineTooltip.isShown()&&this.inlineTooltip.update()},a.prototype.$updatePrefix=function(){var o=this.editor.getCursorPosition(),t=this.editor.session.getTextRange({start:this.base,end:o});return this.completions.setFilter(t),this.completions.filtered.length?this.completions.filtered.length==1&&this.completions.filtered[0].value==t&&!this.completions.filtered[0].snippet?this.detach():(this.$open(this.editor,t),t):this.detach()},a.prototype.updateCompletions=function(i){var n="";if(i&&i.matches){var e=this.editor.getSelectionRange().start;return this.base=this.editor.session.doc.createAnchor(e.row,e.column),this.base.$insertRight=!0,this.completions=new L(i.matches),this.$open(this.editor,"")}this.base&&this.completions&&(n=this.$updatePrefix());var t=this.editor.getSession(),e=this.editor.getCursorPosition(),n=y.getCompletionPrefix(this.editor);this.base=t.doc.createAnchor(e.row,e.column-n.length),this.base.$insertRight=!0;var i={exactMatch:!0,ignoreCaption:!0};this.getCompletionProvider({prefix:n,base:this.base,pos:e}).provideCompletions(this.editor,i,(function(r,l,s){var d=l.filtered,p=y.getCompletionPrefix(this.editor);if(s){if(!d.length)return this.detach();if(d.length==1&&d[0].value==p&&!d[0].snippet)return this.detach()}this.completions=l,this.$open(this.editor,p)}).bind(this))},a.prototype.detach=function(){this.editor&&(this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off("changeSelection",this.changeListener),this.editor.off("blur",this.blurListener)),this.changeTimer.cancel(),this.inlineTooltip&&this.inlineTooltip.detach(),this.setIndex(-1),this.completionProvider&&this.completionProvider.detach(),this.inlineRenderer&&this.inlineRenderer.isOpen()&&this.inlineRenderer.hide(),this.base&&this.base.detach(),this.activated=!1,this.completionProvider=this.completions=this.base=null},a.prototype.destroy=function(){this.detach(),this.inlineRenderer&&this.inlineRenderer.destroy(),this.inlineTooltip&&this.inlineTooltip.destroy(),this.editor&&this.editor.completer==this&&(this.editor.off("destroy",h),this.editor.completer=null),this.inlineTooltip=this.editor=this.inlineRenderer=null},a}();u.prototype.commands={Previous:{bindKey:"Alt-[",name:"Previous",exec:function(a){a.completer.goTo("prev")}},Next:{bindKey:"Alt-]",name:"Next",exec:function(a){a.completer.goTo("next")}},Accept:{bindKey:{win:"Tab|Ctrl-Right",mac:"Tab|Cmd-Right"},name:"Accept",exec:function(a){return a.completer.insertMatch()}},Close:{bindKey:"Esc",name:"Close",exec:function(a){a.completer.detach()}}},u.for=function(a){return a.completer instanceof u||(a.completer&&(a.completer.destroy(),a.completer=null),a.completer=new u(a),a.once("destroy",h)),a.completer},u.startCommand={name:"startInlineAutocomplete",exec:function(a,o){var t=u.for(a);t.show(o)},bindKey:{win:"Alt-C",mac:"Option-C"}};var c=[M,C,O];f("../config").defineOptions(v.prototype,"editor",{enableInlineAutocompletion:{set:function(a){a?(this.completers||(this.completers=Array.isArray(a)?a:c),this.commands.addCommand(u.startCommand)):this.commands.removeCommand(u.startCommand)},value:!1}}),u.createInlineTooltip=function(a){var o=new R(a);return o.registerCommand("Previous",Object.assign({},u.prototype.commands.Previous,{enabled:!0,type:"button",iconCssClass:"ace_arrow_rotated"})),o.registerCommand("Position",{enabled:!1,getValue:function(t){return t?[t.completer.getIndex()+1,t.completer.getLength()].join("/"):""},type:"text",cssClass:"completion_position"}),o.registerCommand("Next",Object.assign({},u.prototype.commands.Next,{enabled:!0,type:"button",iconCssClass:"ace_arrow"})),o.registerCommand("Accept",Object.assign({},u.prototype.commands.Accept,{enabled:function(t){return!!t&&t.completer.getIndex()>=0},type:"button"})),o.registerCommand("ShowTooltip",{name:"Always Show Tooltip",exec:function(){o.setAlwaysShow(!o.getAlwaysShow())},enabled:!0,getValue:function(){return o.getAlwaysShow()},type:"checkbox"}),o},E.importCssString(` .ace_icon_svg.ace_arrow, .ace_icon_svg.ace_arrow_rotated { -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTUuODM3MDEgMTVMNC41ODc1MSAxMy43MTU1TDEwLjE0NjggOEw0LjU4NzUxIDIuMjg0NDZMNS44MzcwMSAxTDEyLjY0NjUgOEw1LjgzNzAxIDE1WiIgZmlsbD0iYmxhY2siLz48L3N2Zz4="); } .ace_icon_svg.ace_arrow_rotated { transform: rotate(180deg); } div.`.concat(P,`.completion_position { padding: 0; } `),"inlineautocomplete.css",!1),_.InlineAutocomplete=u});(function(){ace.require(["ace/ext/inline_autocomplete"],function(f){typeof j=="object"&&typeof Z=="object"&&j&&(j.exports=f)})})()});J();})(); //# sourceMappingURL=f43f03d6c661cee33151e6ca5740082e.js.map




© 2015 - 2024 Weber Informatics LLC | Privacy Policy