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

ber-security.graylog.graylog-plugin-alert-wizard.5.2.1.source-code.5c84e28b79a13688792139cf8ef0afbd.js Maven / Gradle / Ivy

The newest version!
(()=>{var X=(v,T)=>()=>(T||v((T={exports:{}}).exports,T),T.exports);var J=X((G,V)=>{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(v,T,z){"use strict";var $=v("./lib/dom"),L=v("./lib/oop"),_=v("./lib/event_emitter").EventEmitter,w=v("./lib/lang"),C=v("./range").Range,x=v("./range_list").RangeList,S=v("./keyboard/hash_handler").HashHandler,I=v("./tokenizer").Tokenizer,k=v("./clipboard"),A={CURRENT_WORD:function(t){return t.session.getTextRange(t.session.getWordRange())},SELECTION:function(t,e,o){var h=t.session.getTextRange();return o?h.replace(/\n\r?([ \t]*\S)/g,`
`+o+"$1"):h},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 k.getText&&k.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:y.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:y.bind(null,{year:"2-digit"}),CURRENT_MONTH:y.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:y.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:y.bind(null,{month:"short"}),CURRENT_DATE:y.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:y.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:y.bind(null,{weekday:"short"}),CURRENT_HOUR:y.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:y.bind(null,{minute:"2-digit"}),CURRENT_SECOND:y.bind(null,{second:"2-digit"})};A.SELECTED_TEXT=A.SELECTION;function y(t){var e=new Date().toLocaleString("en-us",t);return e.length==1?"0"+e:e}var E=function(){this.snippetMap={},this.snippetNameMap={}};(function(){L.implement(this,_),this.getTokenizer=function(){return E.$tokenizer||this.createTokenizer()},this.createTokenizer=function(){function e(n){return n=n.substr(1),/^\d+$/.test(n)?[{tabstopId:parseInt(n,10)}]:[{text:n}]}function o(n){return"(?:[^\\\\"+n+"]|\\\\.)"}var h={regex:"/("+o("/")+"+)/",onMatch:function(n,s,i){var r=i[0];return r.fmtString=!0,r.guard=n.slice(1,-1),r.flag="",""},next:"formatString"};return E.$tokenizer=new I({start:[{regex:/\\./,onMatch:function(n,s,i){var r=n[1];return(r=="}"&&i.length||"`$\\".indexOf(r)!=-1)&&(n=r),[n]}},{regex:/}/,onMatch:function(n,s,i){return[i.length?i.shift():n]}},{regex:/\$(?:\d+|\w+)/,onMatch:e},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(n,s,i){var r=e(n.substr(1));return i.unshift(r[0]),r},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+o("\\|")+"*\\|",onMatch:function(n,s,i){var r=n.slice(1,-1).replace(/\\[,|\\]|,/g,function(a){return a.length==2?a[1]:"\0"}).split("\0").map(function(a){return{value:a}});return i[0].choices=r,[r[0]]},next:"start"},h,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(n,s,i){return i.length&&i[0].expectElse?(i[0].expectElse=!1,i[0].ifEnd={elseEnd:i[0]},[i[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(n,s,i){var r=n[1];return r=="}"&&i.length||"`$\\".indexOf(r)!=-1?n=r:r=="n"?n=`
`:r=="t"?n="	":"ulULE".indexOf(r)!=-1&&(n={changeCase:r,local:r>"a"}),[n]}},{regex:"/\\w*}",onMatch:function(n,s,i){var r=i.shift();return r&&(r.flag=n.slice(1,-1)),this.next=r&&r.tabstopId?"start":"",[r||n]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(n,s,i){return[{text:n.slice(1)}]}},{regex:/\${\w+/,onMatch:function(n,s,i){var r={text:n.slice(2)};return i.unshift(r),[r]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(n,s,i){var r=i.shift();return this.next=r&&r.tabstopId?"start":"",[r||n]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(n,s,i){var r=i[0];return r.formatFunction=n.slice(2,-1),[i.shift()]},next:"formatString"},h,{regex:/:[\?\-+]?/,onMatch:function(n,s,i){n[1]=="+"&&(i[0].ifEnd=i[0]),n[1]=="?"&&(i[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),E.$tokenizer},this.tokenizeTmSnippet=function(e,o){return this.getTokenizer().getLineTokens(e,o).tokens.map(function(h){return h.value||h})},this.getVariableValue=function(e,o,h){if(/^\d+$/.test(o))return(this.variables.__||{})[o]||"";if(/^[A-Z]\d+$/.test(o))return(this.variables[o[0]+"__"]||{})[o.substr(1)]||"";if(o=o.replace(/^TM_/,""),!this.variables.hasOwnProperty(o))return"";var n=this.variables[o];return typeof n=="function"&&(n=this.variables[o](e,o,h)),n==null?"":n},this.variables=A,this.tmStrFormat=function(e,o,h){if(!o.fmt)return e;var n=o.flag||"",s=o.guard;s=new RegExp(s,n.replace(/[^gim]/g,""));var i=typeof o.fmt=="string"?this.tokenizeTmSnippet(o.fmt,"formatString"):o.fmt,r=this,a=e.replace(s,function(){var l=r.variables.__;r.variables.__=[].slice.call(arguments);for(var d=r.resolveVariables(i,h),b="E",g=0;g1?(B=F[F.length-1].length,K+=F.length-1):B+=M.length,j+=M}else M&&(M.start?M.end={row:K,column:B}:M.start={row:K,column:B})}),{text:j,tabstops:l,tokens:a}};this.getDisplayTextForSnippet=function(e,o){var h=t.call(this,e,o);return h.text},this.insertSnippetForSelection=function(e,o,h){var n=t.call(this,e,o),s=e.getSelectionRange();h&&h.compareRange(s)===0&&(s=h);var i=e.session.replace(s,n.text),r=new u(e),a=e.inVirtualSelectionMode&&e.selection.index;r.addTabstops(n.tabstops,s.start,i,a)},this.insertSnippet=function(e,o,h){var n=this;if(e.inVirtualSelectionMode)return n.insertSnippetForSelection(e,o,h);e.forEachSelection(function(){n.insertSnippetForSelection(e,o,h)},null,{keepOrder:!0}),e.tabstopManager&&e.tabstopManager.tabNext()},this.$getScope=function(e){var o=e.session.$mode.$id||"";if(o=o.split("/").pop(),o==="html"||o==="php"){o==="php"&&!e.session.$mode.inlinePhp&&(o="html");var h=e.getCursorPosition(),n=e.session.getState(h.row);typeof n=="object"&&(n=n[0]),n.substring&&(n.substring(0,3)=="js-"?o="javascript":n.substring(0,4)=="css-"?o="css":n.substring(0,4)=="php-"&&(o="php"))}return o},this.getActiveScopes=function(e){var o=this.$getScope(e),h=[o],n=this.snippetMap;return n[o]&&n[o].includeScopes&&h.push.apply(h,n[o].includeScopes),h.push("_"),h},this.expandWithTab=function(e,o){var h=this,n=e.forEachSelection(function(){return h.expandSnippetForSelection(e,o)},null,{keepOrder:!0});return n&&e.tabstopManager&&e.tabstopManager.tabNext(),n},this.expandSnippetForSelection=function(e,o){var h=e.getCursorPosition(),n=e.session.getLine(h.row),s=n.substring(0,h.column),i=n.substr(h.column),r=this.snippetMap,a;return this.getActiveScopes(e).some(function(l){var d=r[l];return d&&(a=this.findMatchingSnippet(d,s,i)),!!a},this),a?(o&&o.dryRun||(e.session.doc.removeInLine(h.row,h.column-a.replaceBefore.length,h.column+a.replaceAfter.length),this.variables.M__=a.matchBefore,this.variables.T__=a.matchAfter,this.insertSnippetForSelection(e,a.content),this.variables.M__=this.variables.T__=null),!0):!1},this.findMatchingSnippet=function(e,o,h){for(var n=e.length;n--;){var s=e[n];if(!(s.startRe&&!s.startRe.test(o))&&!(s.endRe&&!s.endRe.test(h))&&!(!s.startRe&&!s.endRe))return s.matchBefore=s.startRe?s.startRe.exec(o):[""],s.matchAfter=s.endRe?s.endRe.exec(h):[""],s.replaceBefore=s.triggerRe?s.triggerRe.exec(o)[0]:"",s.replaceAfter=s.endTriggerRe?s.endTriggerRe.exec(h)[0]:"",s}},this.snippetMap={},this.snippetNameMap={},this.register=function(e,o){var h=this.snippetMap,n=this.snippetNameMap,s=this;e||(e=[]);function i(l){return l&&!/^\^?\(.*\)\$?$|^\\b$/.test(l)&&(l="(?:"+l+")"),l||""}function r(l,d,b){return l=i(l),d=i(d),b?(l=d+l,l&&l[l.length-1]!="$"&&(l=l+"$")):(l=l+d,l&&l[0]!="^"&&(l="^"+l)),new RegExp(l)}function a(l){l.scope||(l.scope=o||"_"),o=l.scope,h[o]||(h[o]=[],n[o]={});var d=n[o];if(l.name){var b=d[l.name];b&&s.unregister(b),d[l.name]=l}h[o].push(l),l.prefix&&(l.tabTrigger=l.prefix),!l.content&&l.body&&(l.content=Array.isArray(l.body)?l.body.join(`
`):l.body),l.tabTrigger&&!l.trigger&&(!l.guard&&/^\w/.test(l.tabTrigger)&&(l.guard="\\b"),l.trigger=w.escapeRegExp(l.tabTrigger)),!(!l.trigger&&!l.guard&&!l.endTrigger&&!l.endGuard)&&(l.startRe=r(l.trigger,l.guard,!0),l.triggerRe=new RegExp(l.trigger),l.endRe=r(l.endTrigger,l.endGuard,!0),l.endTriggerRe=new RegExp(l.endTrigger))}Array.isArray(e)?e.forEach(a):Object.keys(e).forEach(function(l){a(e[l])}),this._signal("registerSnippets",{scope:o})},this.unregister=function(e,o){var h=this.snippetMap,n=this.snippetNameMap;function s(i){var r=n[i.scope||o];if(r&&r[i.name]){delete r[i.name];var a=h[i.scope||o],l=a&&a.indexOf(i);l>=0&&a.splice(l,1)}}e.content?s(e):Array.isArray(e)&&e.forEach(s)},this.parseSnippetFile=function(e){e=e.replace(/\r/g,"");for(var o=[],h={},n=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,s;s=n.exec(e);){if(s[1])try{h=JSON.parse(s[1]),o.push(h)}catch{}if(s[4])h.content=s[4].replace(/^\t/gm,""),o.push(h),h={};else{var i=s[2],r=s[3];if(i=="regex"){var a=/\/((?:[^\/\\]|\\.)*)|$/g;h.guard=a.exec(r)[1],h.trigger=a.exec(r)[1],h.endTrigger=a.exec(r)[1],h.endGuard=a.exec(r)[1]}else i=="snippet"?(h.tabTrigger=r.match(/^\S*/)[0],h.name||(h.name=r)):i&&(h[i]=r)}}return o},this.getSnippetByName=function(e,o){var h=this.snippetNameMap,n;return this.getActiveScopes(o).some(function(s){var i=h[s];return i&&(n=i[e]),!!n},this),n}}).call(E.prototype);var u=function(t){if(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)};(function(){this.attach=function(t){this.index=0,this.ranges=[],this.tabstops=[],this.$openTabstops=null,this.selectedTabstop=null,this.editor=t,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)},this.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges=null,this.tabstops=null,this.selectedTabstop=null,this.editor.removeListener("change",this.$onChange),this.editor.removeListener("changeSelection",this.$onChangeSelection),this.editor.removeListener("changeSession",this.$onChangeSession),this.editor.commands.removeListener("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.editor=null},this.onChange=function(t){for(var e=t.action[0]=="r",o=this.selectedTabstop||{},h=o.parents||{},n=(this.tabstops||[]).slice(),s=0;s2&&(this.tabstops.length&&i.push(i.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,i))},this.addTabstopMarkers=function(t){var e=this.editor.session;t.forEach(function(o){o.markerId||(o.markerId=e.addMarker(o,"ace_snippet-marker","text"))})},this.removeTabstopMarkers=function(t){var e=this.editor.session;t.forEach(function(o){e.removeMarker(o.markerId),o.markerId=null})},this.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.editor.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())},this.keyboardHandler=new S,this.keyboardHandler.bindKeys({Tab:function(t){T.snippetManager&&T.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()}})}).call(u.prototype);var f=function(t,e){t.row==0&&(t.column+=e.column),t.row+=e.row},c=function(t,e){t.row==e.row&&(t.column-=e.column),t.row-=e.row};$.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),T.snippetManager=new E;var p=v("./editor").Editor;(function(){this.insertSnippet=function(t,e){return T.snippetManager.insertSnippet(this,t,e)},this.expandSnippet=function(t){return T.snippetManager.expandWithTab(this,t)}}).call(p.prototype)});ace.define("ace/autocomplete/inline",["require","exports","module","ace/snippets"],function(v,T,z){"use strict";var $=v("../snippets").snippetManager,L=function(){function _(){this.editor=null}return _.prototype.show=function(w,C,x){if(x=x||"",w&&this.editor&&this.editor!==w&&(this.hide(),this.editor=null),!w||!C)return!1;var S=C.snippet?$.getDisplayTextForSnippet(w,C.snippet):C.value;return!S||!S.startsWith(x)?!1:(this.editor=w,S=S.slice(x.length),S===""?w.removeGhostText():w.setGhostText(S),!0)},_.prototype.isOpen=function(){return this.editor?!!this.editor.renderer.$ghostText:!1},_.prototype.hide=function(){return this.editor?(this.editor.removeGhostText(),!0):!1},_.prototype.destroy=function(){this.hide(),this.editor=null},_}();T.AceInline=L});ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom"],function(v,T,z){"use strict";var $=v("../virtual_renderer").VirtualRenderer,L=v("../editor").Editor,_=v("../range").Range,w=v("../lib/event"),C=v("../lib/lang"),x=v("../lib/dom"),S=function(A){return"suggest-aria-id:".concat(A)},I=function(A){var y=new $(A);y.$maxLines=4;var E=new L(y);return E.setHighlightActiveLine(!1),E.setShowPrintMargin(!1),E.renderer.setShowGutter(!1),E.renderer.setHighlightGutterLine(!1),E.$mouseHandler.$focusTimeout=0,E.$highlightTagPending=!0,E},k=function(){function A(y){var E=x.createElement("div"),u=new I(E);y&&y.appendChild(E),E.style.display="none",u.renderer.content.style.cursor="default",u.renderer.setStyle("ace_autocomplete"),u.renderer.container.setAttribute("role","listbox"),u.renderer.container.setAttribute("aria-label","Autocomplete suggestions"),u.setOption("displayIndentGuides",!1),u.setOption("dragDelay",150);var f=function(){};u.focus=f,u.$isFocused=!0,u.renderer.$cursorLayer.restartTimer=f,u.renderer.$cursorLayer.element.style.opacity=0,u.renderer.$maxLines=8,u.renderer.$keepTextAreaAtCursor=!1,u.setHighlightActiveLine(!1),u.session.highlight(""),u.session.$searchHighlight.clazz="ace_highlight-marker",u.on("mousedown",function(n){var s=n.getDocumentPosition();u.selection.moveToPosition(s),t.start.row=t.end.row=s.row,n.stop()});var c,p=new _(-1,0,-1,1/0),t=new _(-1,0,-1,1/0);t.id=u.session.addMarker(t,"ace_active-line","fullLine"),u.setSelectOnHover=function(n){n?p.id&&(u.session.removeMarker(p.id),p.id=null):p.id=u.session.addMarker(p,"ace_line-hover","fullLine")},u.setSelectOnHover(!1),u.on("mousemove",function(n){if(!c){c=n;return}if(!(c.x==n.x&&c.y==n.y)){c=n,c.scrollTop=u.renderer.scrollTop;var s=c.getDocumentPosition().row;p.start.row!=s&&(p.id||u.setRow(s),o(s))}}),u.renderer.on("beforeRender",function(){if(c&&p.start.row!=-1){c.$pos=null;var n=c.getDocumentPosition().row;p.id||u.setRow(n),o(n,!0)}}),u.renderer.on("afterRender",function(){var n=u.getRow(),s=u.renderer.$textLayer,i=s.element.childNodes[n-s.config.firstRow],r=document.activeElement;if(i!==s.selectedNode&&s.selectedNode&&(x.removeCssClass(s.selectedNode,"ace_selected"),r.removeAttribute("aria-activedescendant"),s.selectedNode.removeAttribute("id")),s.selectedNode=i,i){x.addCssClass(i,"ace_selected");var a=S(n);i.id=a,u.renderer.container.setAttribute("aria-activedescendant",a),r.setAttribute("aria-activedescendant",a),i.setAttribute("role","option"),i.setAttribute("aria-label",u.getData(n).value),i.setAttribute("aria-setsize",u.data.length),i.setAttribute("aria-posinset",n)}});var e=function(){o(-1)},o=function(n,s){n!==p.start.row&&(p.start.row=p.end.row=n,s||u.session._emit("changeBackMarker"),u._emit("changeHoverMarker"))};u.getHoveredRow=function(){return p.start.row},w.addListener(u.container,"mouseout",e),u.on("hide",e),u.on("changeSelection",e),u.session.doc.getLength=function(){return u.data.length},u.session.doc.getLine=function(n){var s=u.data[n];return typeof s=="string"?s:s&&s.value||""};var h=u.session.bgTokenizer;return h.$tokenizeRow=function(n){var s=u.data[n],i=[];if(!s)return i;typeof s=="string"&&(s={value:s});var r=s.caption||s.value||s.name;function a(O,H){O&&i.push({type:(s.className||"")+(H||""),value:O})}for(var l=r.toLowerCase(),d=(u.filterText||"").toLowerCase(),b=0,g=0,m=0;m<=d.length;m++)if(m!=g&&(s.matchMask&1<=g?i="bottom":i="top"),i==="top"?(m.bottom=n.top-this.$borderSize,m.top=m.bottom-g):i==="bottom"&&(m.top=n.top+s+this.$borderSize,m.bottom=m.top+g);var O=m.top>=0&&m.bottom<=l;if(!r&&!O)return!1;O?b.$maxPixelHeight=null:i==="top"?b.$maxPixelHeight=N:b.$maxPixelHeight=R,i==="top"?(a.style.top="",a.style.bottom=l-m.bottom+"px",u.isTopdown=!1):(a.style.top=m.top+"px",a.style.bottom="",u.isTopdown=!0),a.style.display="";var H=n.left;return H+a.offsetWidth>d&&(H=d-a.offsetWidth),a.style.left=H+"px",a.style.right="",u.isOpen||(u.isOpen=!0,this._signal("show"),c=null),u.anchorPos=n,u.anchor=i,!0},u.show=function(n,s,i){this.tryShow(n,s,i?"bottom":void 0,!0)},u.goTo=function(n){var s=this.getRow(),i=this.session.getLength()-1;switch(n){case"up":s=s<=0?i:s-1;break;case"down":s=s>=i?-1:s+1;break;case"start":s=0;break;case"end":s=i;break}this.setRow(s)},u.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},u.$imageSize=0,u.$borderSize=1,u}return A}();x.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: 0 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_right .ace_text-layer  {
    width: calc(100% - 8px);
}
.ace_autocomplete_right .ace_line {
    display: flex;
}
.ace_autocomplete_right .ace_completion-meta {
    flex: 1;
    text-align: right;
}
`,"autocompletion.css",!1),T.AcePopup=k,T.$singleLineEditor=I,T.getAriaId=S});ace.define("ace/autocomplete/util",["require","exports","module"],function(v,T,z){"use strict";T.parForEach=function(L,_,w){var C=0,x=L.length;x===0&&w();for(var S=0;S=0&&w.test(L[x]);x--)C.push(L[x]);return C.reverse().join("")},T.retrieveFollowingIdentifier=function(L,_,w){w=w||$;for(var C=[],x=_;xthis.filterText&&c.lastIndexOf(this.filterText,0)===0)var p=this.filtered;else var p=this.all;this.filterText=c,p=this.filterCompletions(p,this.filterText),p=p.sort(function(e,o){return o.exactMatch-e.exactMatch||o.$score-e.$score||(e.caption||e.value).localeCompare(o.caption||o.value)});var t=null;p=p.filter(function(e){var o=e.snippet||e.caption||e.value;return o===t?!1:(t=o,!0)}),this.filtered=p},f.prototype.filterCompletions=function(c,p){var t=[],e=p.toUpperCase(),o=p.toLowerCase();e:for(var h=0,n;n=c[h];h++){var s=!this.ignoreCaption&&n.caption||n.value||n.snippet;if(s){var i=-1,r=0,a=0,l,d;if(this.exactMatch){if(p!==s.substr(0,p.length))continue e}else{var b=s.toLowerCase().indexOf(o);if(b>-1)a=b;else for(var g=0;g=0&&(R<0||m0&&(i===-1&&(a+=10),a+=d,r=r|1<",w.escapeHTML(t.caption),"","
",w.escapeHTML(I(t.snippet))].join(""))},id:"snippetCompleter"},A=[k,x,S];T.setCompleters=function(t){A.length=0,t&&A.push.apply(A,t)},T.addCompleter=function(t){A.push(t)},T.textCompleter=x,T.keyWordCompleter=S,T.snippetCompleter=k;var y={name:"expandSnippet",exec:function(t){return $.expandWithTab(t)},bindKey:"Tab"},E=function(t,e){u(e.session.$mode)},u=function(t){typeof t=="string"&&(t=_.$modes[t]),t&&($.files||($.files={}),f(t.$id,t.snippetFileId),t.modes&&t.modes.forEach(u))},f=function(t,e){!e||!t||$.files[t]||($.files[t]={},_.loadModule(e,function(o){o&&($.files[t]=o,!o.snippets&&o.snippetText&&(o.snippets=$.parseSnippetFile(o.snippetText)),$.register(o.snippets||[],o.scope),o.includeScopes&&($.snippetMap[o.scope].includeScopes=o.includeScopes,o.includeScopes.forEach(function(h){u("ace/mode/"+h)})))}))},c=function(t){var e=t.editor,o=e.completer&&e.completer.activated;if(t.command.name==="backspace")o&&!C.getCompletionPrefix(e)&&e.completer.detach();else if(t.command.name==="insertstring"){var h=C.getCompletionPrefix(e);if(h&&!o){var n=L.for(e);n.autoInsert=!1,n.showPopup(e)}}},p=v("../editor").Editor;v("../config").defineOptions(p.prototype,"editor",{enableBasicAutocompletion:{set:function(t){t?(this.completers||(this.completers=Array.isArray(t)?t:A),this.commands.addCommand(L.startCommand)):this.commands.removeCommand(L.startCommand)},value:!1},enableLiveAutocompletion:{set:function(t){t?(this.completers||(this.completers=Array.isArray(t)?t:A),this.commands.on("afterExec",c)):this.commands.removeListener("afterExec",c)},value:!1},enableSnippets:{set:function(t){t?(this.commands.addCommand(y),this.on("changeMode",E),E(null,this)):(this.commands.removeCommand(y),this.off("changeMode",E))},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/lang","ace/lib/dom","ace/lib/useragent","ace/ext/language_tools","ace/ext/language_tools","ace/ext/language_tools","ace/config"],function(v,T,z){"use strict";var $=v("../keyboard/hash_handler").HashHandler,L=v("../autocomplete/inline").AceInline,_=v("../autocomplete").FilteredList,w=v("../autocomplete").CompletionProvider,C=v("../editor").Editor,x=v("../autocomplete/util"),S=v("../lib/lang"),I=v("../lib/dom"),k=v("../lib/useragent"),A=v("./language_tools").snippetCompleter,y=v("./language_tools").textCompleter,E=v("./language_tools").keyWordCompleter,u=function(i,r){r.completer&&r.completer.destroy()},f=function(i,r){return r.row>i.row||r.row===i.row&&r.column>i.column?i:r},c=function(){function i(r){this.editor=r,this.tooltipEnabled=!0,this.keyboardHandler=new $(this.commands),this.$index=-1,this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this),this.changeTimer=S.delayedCall(function(){this.updateCompletions()}.bind(this))}return i.prototype.getInlineRenderer=function(){return this.inlineRenderer||(this.inlineRenderer=new L),this.inlineRenderer},i.prototype.getInlineTooltip=function(){return this.inlineTooltip||(this.inlineTooltip=new n(this.editor,document.body||document.documentElement),this.inlineTooltip.setCommands(this.commands)),this.inlineTooltip},i.prototype.show=function(r){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.editor.on("mousewheel",this.mousewheelListener),this.updateCompletions(r)},i.prototype.$open=function(){this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({}),this.tooltipEnabled?this.getInlineTooltip().show(this.editor):this.tooltipEnabled,this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler),this.$index===-1?this.setIndex(0):this.$showCompletion(),this.changeTimer.cancel()},i.prototype.insertMatch=function(){var r=this.getCompletionProvider().insertByIndex(this.editor,this.$index);return this.detach(),r},i.prototype.changeListener=function(r){var a=this.editor.selection.lead;(a.row!=this.base.row||a.column=0},i.prototype.setIndex=function(r){if(!(!this.completions||!this.completions.filtered)){var a=Math.max(-1,Math.min(this.completions.filtered.length-1,r));a!==this.$index&&(this.$index=a,this.$showCompletion())}},i.prototype.getCompletionProvider=function(){return this.completionProvider||(this.completionProvider=new w),this.completionProvider},i.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.updateButtons()},i.prototype.$updatePrefix=function(){var r=this.editor.getCursorPosition(),a=this.editor.session.getTextRange({start:this.base,end:r});return this.completions.setFilter(a),this.completions.filtered.length?this.completions.filtered.length==1&&this.completions.filtered[0].value==a&&!this.completions.filtered[0].snippet?this.detach():(this.$open(this.editor,a),a):this.detach()},i.prototype.updateCompletions=function(b){var d="";if(b&&b.matches){var l=this.editor.getSelectionRange().start;return this.base=this.editor.session.doc.createAnchor(l.row,l.column),this.base.$insertRight=!0,this.completions=new _(b.matches),this.$open(this.editor,"")}this.base&&this.completions&&(d=this.$updatePrefix());var a=this.editor.getSession(),l=this.editor.getCursorPosition(),d=x.getCompletionPrefix(this.editor);this.base=a.doc.createAnchor(l.row,l.column-d.length),this.base.$insertRight=!0;var b={exactMatch:!0,ignoreCaption:!0};this.getCompletionProvider().provideCompletions(this.editor,b,function(g,m,R){var N=m.filtered,O=x.getCompletionPrefix(this.editor);if(R){if(!N.length)return this.detach();if(N.length==1&&N[0].value==O&&!N[0].snippet)return this.detach()}this.completions=m,this.$open(this.editor,O)}.bind(this))},i.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("mousewheel",this.mousewheelListener)),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},i.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",u),this.editor.completer=null),this.inlineTooltip=this.editor=this.inlineRenderer=null},i}();c.prototype.commands={Previous:{bindKey:"Alt-[",name:"Previous",exec:function(i){i.completer.goTo("prev")},enabled:function(i){return i.completer.getIndex()>0},position:10},Next:{bindKey:"Alt-]",name:"Next",exec:function(i){i.completer.goTo("next")},enabled:function(i){return i.completer.getIndex()=0},position:30},Close:{bindKey:"Esc",name:"Close",exec:function(i){i.completer.detach()},enabled:!0,position:40}},c.for=function(i){return i.completer instanceof c||(i.completer&&(i.completer.destroy(),i.completer=null),i.completer=new c(i),i.once("destroy",u)),i.completer},c.startCommand={name:"startInlineAutocomplete",exec:function(i,r){var a=c.for(i);a.show(r)},bindKey:{win:"Alt-C",mac:"Option-C"}};var p=[A,y,E];v("../config").defineOptions(C.prototype,"editor",{enableInlineAutocompletion:{set:function(i){i?(this.completers||(this.completers=Array.isArray(i)?i:p),this.commands.addCommand(c.startCommand)):this.commands.removeCommand(c.startCommand)},value:!1}});var t="inline_autocomplete_tooltip_entry",e="inline_autocomplete_tooltip_button",o="ace_tooltip ace_inline_autocomplete_tooltip",h="inline_autocomplete_tooltip",n=function(){function i(r,a){this.editor=r,this.htmlElement=document.createElement("div");var l=this.htmlElement;l.style.display="none",a&&a.appendChild(l),l.id=h,l.style["pointer-events"]="auto",l.className=o,this.commands={},this.buttons={},this.eventListeners={}}return i.prototype.setCommands=function(r){if(!(!r||!this.htmlElement)){this.detach();for(var a=this.htmlElement;a.hasChildNodes();)a.removeChild(a.firstChild);this.commands=r,this.buttons={},this.eventListeners={},Object.keys(r).map(function(l){return[l,r[l]]}).filter(function(l){return l[1].position>0}).sort(function(l,d){return l[1].position-d[1].position}).forEach(function(l){var d=l[0],b=l[1];I.buildDom(["div",{class:t},[["div",{class:e,ref:d},this.buttons]]],a,this.buttons);var g=b.bindKey;typeof g=="object"&&(g=k.isMac?g.mac:g.win),g=g.replace("|"," / ");var m=I.createTextNode([b.name,"(",g,")"].join(" "));this.buttons[d].appendChild(m)}.bind(this))}},i.prototype.show=function(){this.detach(),this.htmlElement.style.display="",this.htmlElement.addEventListener("mousedown",s.bind(this)),this.updatePosition(),this.updateButtons(!0)},i.prototype.isShown=function(){return!!this.htmlElement&&window.getComputedStyle(this.htmlElement).display!=="none"},i.prototype.updatePosition=function(){if(this.editor){var r=this.editor.renderer,a;if(this.editor.selection.getAllRanges?a=this.editor.selection.getAllRanges():a=[this.editor.getSelection()],!!a.length){for(var l=f(a[0].start,a[0].end),d=0,b;b=a[d];d++)l=f(l,f(b.start,b.end));var g=r.$cursorLayer.getPixelPosition(l,!0),m=this.htmlElement,R=window.innerWidth,N=this.editor.container.getBoundingClientRect();g.top+=N.top-r.layerConfig.offset,g.left+=N.left-this.editor.renderer.scrollLeft,g.left+=r.gutterWidth;var O=g.top-m.offsetHeight;m.style.top=O+"px",m.style.bottom="",m.style.left=Math.min(R-m.offsetWidth,g.left)+"px"}}},i.prototype.updateButtons=function(r){Object.keys(this.buttons).forEach(function(a){var l=this.commands[a].enabled;if(typeof l=="function"&&(l=l(this.editor)),l&&(r||!this.eventListeners[a])){this.buttons[a].className=e,this.buttons[a].ariaDisabled=this.buttons[a].disabled=!1,this.buttons[a].removeAttribute("disabled");var d=function(b){this.commands[a].exec(this.editor),b.preventDefault()}.bind(this);this.eventListeners[a]=d,this.buttons[a].addEventListener("mousedown",d)}!l&&(r||this.eventListeners[a])&&(this.buttons[a].className=e+"_disabled",this.buttons[a].ariaDisabled=this.buttons[a].disabled=!0,this.buttons[a].setAttribute("disabled",""),this.buttons[a].removeEventListener("mousedown",this.eventListeners[a]),delete this.eventListeners[a])}.bind(this))},i.prototype.detach=function(){var r=Object.keys(this.eventListeners);this.eventListeners&&r.length&&r.forEach(function(a){this.buttons[a].removeEventListener("mousedown",this.eventListeners[a]),delete this.eventListeners[a]}.bind(this)),this.htmlElement&&(this.htmlElement.removeEventListener("mousedown",s.bind(this)),this.htmlElement.style.display="none")},i.prototype.destroy=function(){this.detach(),this.htmlElement&&this.htmlElement.parentNode.removeChild(this.htmlElement),this.editor=null,this.buttons=null,this.htmlElement=null,this.controls=null},i}(),s=function(i){i.preventDefault()};I.importCssString(` .ace_inline_autocomplete_tooltip { display: inline-block; } .`.concat(t,` { display: inline-block; padding: 0 5px; } .`).concat(e,` { display: inline-block; cursor: pointer; padding: 5px; } .`).concat(e,`:hover { background-color: rgba(0, 0, 0, 0.1); } div.`).concat(e,`_disabled { display: inline-block; padding: 5px; cursor: default; color: #777; }`),"inlinetooltip.css",!1),T.InlineAutocomplete=c,T.InlineTooltip=n,T.TOOLTIP_ID=h,T.BUTTON_CLASS_NAME=e});(function(){ace.require(["ace/ext/inline_autocomplete"],function(v){typeof V=="object"&&typeof G=="object"&&V&&(V.exports=v)})})()});J();})(); //# sourceMappingURL=5c84e28b79a13688792139cf8ef0afbd.js.map




© 2015 - 2024 Weber Informatics LLC | Privacy Policy