code
stringlengths 12
2.05k
| label_name
stringclasses 5
values | label
int64 0
4
|
---|---|---|
link: function(scope, element, attrs) {
var width = 120;
var height = 39;
var div = $('<div class="terminal">A</div>').css({
position: 'absolute',
left: -1000,
top: -1000,
display: 'block',
padding: 0,
margin: 0,
'font-family': 'monospace'
}).appendTo($('body'));
var charWidth = div.width();
var charHeight = div.height();
div.remove();
// compensate for internal horizontal padding
var cssWidth = width * charWidth + 20;
// Add an extra line for the status bar and divider
var cssHeight = (height * charHeight) + charHeight + 2;
log.debug("desired console size in characters, width: ", width, " height: ", height);
log.debug("console size in pixels, width: ", cssWidth, " height: ", cssHeight);
log.debug("character size in pixels, width: ", charWidth, " height: ", charHeight);
element.css({
width: cssWidth,
height: cssHeight,
'min-width': cssWidth,
'min-height': cssHeight
});
gogo.Terminal(element.get(0), width, height);
scope.$on("$destroy", function(e) {
document.onkeypress = null;
document.onkeydown = null;
});
} | Class | 2 |
this.addMenuItems(O,["copyAsImage"],null,ea)};EditorUi.prototype.toggleFormatPanel=function(O){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=O?O:!this.formatWindow.window.isVisible()):b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var G=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&& | Base | 1 |
"url("+Editor.plusImage+")",aa.setAttribute("title",mxResources.get("insert")),aa.style.width="24px",va=!0)}));ja();F.addListener("darkModeChanged",ja);F.addListener("sketchModeChanged",ja)}else F.editor.addListener("statusChanged",mxUtils.bind(this,function(){F.setStatusText(F.editor.getStatus())}));if(null!=E){var Ba=function(da){H.popupMenuHandler.hideMenu();mxEvent.isAltDown(da)||mxEvent.isShiftDown(da)?F.actions.get("customZoom").funct():F.actions.get("smartFit").funct()},Ha=F.actions.get("zoomIn"), | Base | 1 |
mxCellEditor.prototype.installListeners=function(a){mxEvent.addListener(a,"dragstart",mxUtils.bind(this,function(d){this.graph.stopEditing(!1);mxEvent.consume(d)}));mxEvent.addListener(a,"blur",mxUtils.bind(this,function(d){this.blurEnabled&&this.focusLost(d)}));mxEvent.addListener(a,"keydown",mxUtils.bind(this,function(d){mxEvent.isConsumed(d)||(this.isStopEditingEvent(d)?(this.graph.stopEditing(!1),mxEvent.consume(d)):27==d.keyCode&&(this.graph.stopEditing(this.isCancelEditingKeyEvent(d)),mxEvent.consume(d)))}));
var b=mxUtils.bind(this,function(d){null!=this.editingCell&&this.clearOnChange&&a.innerHTML==this.getEmptyLabelText()&&(!mxClient.IS_FF||8!=d.keyCode&&46!=d.keyCode)&&(this.clearOnChange=!1,a.innerHTML="")});mxEvent.addListener(a,"keypress",b);mxEvent.addListener(a,"paste",b);b=mxUtils.bind(this,function(d){null!=this.editingCell&&(0==this.textarea.innerHTML.length||"<br>"==this.textarea.innerHTML?(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length):
this.clearOnChange=!1)});mxEvent.addListener(a,mxClient.IS_IE11||mxClient.IS_IE?"keyup":"input",b);mxEvent.addListener(a,"cut",b);mxEvent.addListener(a,"paste",b);b=mxClient.IS_IE11||mxClient.IS_IE?"keydown":"input";var c=mxUtils.bind(this,function(d){null!=this.editingCell&&this.autoSize&&!mxEvent.isConsumed(d)&&(null!=this.resizeThread&&window.clearTimeout(this.resizeThread),this.resizeThread=window.setTimeout(mxUtils.bind(this,function(){this.resizeThread=null;this.resize()}),0))});mxEvent.addListener(a,
b,c);mxEvent.addListener(window,"resize",c);9<=document.documentMode?(mxEvent.addListener(a,"DOMNodeRemoved",c),mxEvent.addListener(a,"DOMNodeInserted",c)):(mxEvent.addListener(a,"cut",c),mxEvent.addListener(a,"paste",c))};mxCellEditor.prototype.isStopEditingEvent=function(a){return 113==a.keyCode||this.graph.isEnterStopsCellEditing()&&13==a.keyCode&&!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)};mxCellEditor.prototype.isEventSource=function(a){return mxEvent.getSource(a)==this.textarea}; | Base | 1 |
mxCellEditor.prototype.installListeners=function(a){mxEvent.addListener(a,"dragstart",mxUtils.bind(this,function(d){this.graph.stopEditing(!1);mxEvent.consume(d)}));mxEvent.addListener(a,"blur",mxUtils.bind(this,function(d){this.blurEnabled&&this.focusLost(d)}));mxEvent.addListener(a,"keydown",mxUtils.bind(this,function(d){mxEvent.isConsumed(d)||(this.isStopEditingEvent(d)?(this.graph.stopEditing(!1),mxEvent.consume(d)):27==d.keyCode&&(this.graph.stopEditing(this.isCancelEditingKeyEvent(d)),mxEvent.consume(d)))}));
var b=mxUtils.bind(this,function(d){null!=this.editingCell&&this.clearOnChange&&a.innerHTML==this.getEmptyLabelText()&&(!mxClient.IS_FF||8!=d.keyCode&&46!=d.keyCode)&&(this.clearOnChange=!1,a.innerHTML="")});mxEvent.addListener(a,"keypress",b);mxEvent.addListener(a,"paste",b);b=mxUtils.bind(this,function(d){null!=this.editingCell&&(0==this.textarea.innerHTML.length||"<br>"==this.textarea.innerHTML?(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length):
this.clearOnChange=!1)});mxEvent.addListener(a,mxClient.IS_IE11||mxClient.IS_IE?"keyup":"input",b);mxEvent.addListener(a,"cut",b);mxEvent.addListener(a,"paste",b);b=mxClient.IS_IE11||mxClient.IS_IE?"keydown":"input";var c=mxUtils.bind(this,function(d){null!=this.editingCell&&this.autoSize&&!mxEvent.isConsumed(d)&&(null!=this.resizeThread&&window.clearTimeout(this.resizeThread),this.resizeThread=window.setTimeout(mxUtils.bind(this,function(){this.resizeThread=null;this.resize()}),0))});mxEvent.addListener(a,
b,c);mxEvent.addListener(window,"resize",c);9<=document.documentMode?(mxEvent.addListener(a,"DOMNodeRemoved",c),mxEvent.addListener(a,"DOMNodeInserted",c)):(mxEvent.addListener(a,"cut",c),mxEvent.addListener(a,"paste",c))};mxCellEditor.prototype.isStopEditingEvent=function(a){return 113==a.keyCode||this.graph.isEnterStopsCellEditing()&&13==a.keyCode&&!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)};mxCellEditor.prototype.isEventSource=function(a){return mxEvent.getSource(a)==this.textarea}; | Base | 1 |
success: function (data) {
mydata = jQuery.parseJSON(data);
$.ajax({
type: 'GET',
url: '/manage/get_nodes_sw_versions',
data: {"nodes": nodes.join(",")},
timeout: pcs_timeout,
success: function(data) {
versions = jQuery.parseJSON(data);
update_create_cluster_dialog(mydata, versions);
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert("ERROR: Unable to contact server");
}
});
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert("ERROR: Unable to contact server");
}
});
} | Compound | 4 |
add = function(files) {
var place = list ? cwd.find('tbody') : cwd,
l = files.length,
ltmb = [],
atmb = {},
dirs = false,
findNode = function(file) {
var pointer = cwd.find('[id]:first'), file2;
while (pointer.length) {
file2 = fm.file(fm.cwdId2Hash(pointer.attr('id')));
if (!pointer.hasClass('elfinder-cwd-parent') && file2 && fm.compare(file, file2) < 0) {
return pointer;
}
pointer = pointer.next('[id]');
}
},
findIndex = function(file) {
var l = buffer.length, i;
for (i =0; i < l; i++) {
if (fm.compare(file, buffer[i]) < 0) {
return i;
}
}
return l || -1;
},
file, hash, node, ndx;
l && wrapper.removeClass('elfinder-cwd-wrapper-empty');
while (l--) {
file = files[l];
hash = file.hash;
if ($('#'+fm.cwdHash2Id(hash)).length) {
continue;
}
if ((node = findNode(file)) && node.length) {
node.before(itemhtml(file));
} else if ((ndx = findIndex(file)) >= 0) {
buffer.splice(ndx, 0, file);
} else {
place.append(itemhtml(file));
}
if ($('#'+fm.cwdHash2Id(hash)).length) {
if (file.mime == 'directory') {
dirs = true;
} else if (file.tmb) {
file.tmb === 1 ? ltmb.push(hash) : (atmb[hash] = file.tmb);
}
}
}
bottomMarkerShow(place);
attachThumbnails(atmb);
ltmb.length && loadThumbnails(ltmb);
dirs && !mobile && makeDroppable();
}, | Base | 1 |
Na+="@import url("+La+");\n":Fa+='@font-face {\nfont-family: "'+Da+'";\nsrc: url("'+La+'");\n}\n'}Ga.appendChild(za.createTextNode(Na+Fa));ra.getElementsByTagName("defs")[0].appendChild(Ga)}null!=ja&&(this.shapeBackgroundColor=Ha,this.shapeForegroundColor=Ba,this.stylesheet=ja,this.refresh());return ra};var C=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var u=C.apply(this,arguments);if(this.mathEnabled){var E=u.drawText;u.drawText=function(J,T){if(null!=J.text&&
null!=J.text.value&&J.text.checkBounds()&&(mxUtils.isNode(J.text.value)||J.text.dialect==mxConstants.DIALECT_STRICTHTML)){var N=J.text.getContentNode();if(null!=N){N=N.cloneNode(!0);if(N.getElementsByTagNameNS)for(var Q=N.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<Q.length;)Q[0].parentNode.removeChild(Q[0]);null!=N.innerHTML&&(Q=J.text.value,J.text.value=N.innerHTML,E.apply(this,arguments),J.text.value=Q)}}else E.apply(this,arguments)}}return u};var D=mxCellRenderer.prototype.destroy; | Base | 1 |
function dialog_form(a,b,c,e,d){"undefined"==typeof e&&(e="json");a.submit(function(f){f.preventDefault();a.ajaxSubmit({context:a,dataType:e,beforeSerialize:function(a,b){"undefined"!=typeof d&&!1!==d&&d.call(this,a,b)},beforeSend:function(c,d,e){var f=0<a.find("input[name=fc_form_title]").size()?a.find("input[name=fc_form_title]").val():"Loading";c.process=set_activity(f);a.is(":data(dialog)")&&a.dialog("destroy");"undefined"!=typeof b&&!1!==b&&b.call(this,c,d,e)},success:function(a,b,d){!0===a.success?
(return_success(d.process,a.message),"undefined"!=typeof c&&!1!==c&&c.call(this,a,b,d)):return_error(d.process,a.message)},error:function(a,b,c){a.process.remove();console.log(a);console.log(b);console.log(c);alert(b+": "+c)}})})}function set_buttons(a){a.find(".fc_toggle_element").fc_toggle_element()} | Base | 1 |
updateTree = function(dirs) {
var length = dirs.length,
orphans = [],
i = dirs.length,
dir, html, parent, sibling, init, atonce = {}, base;
var firstVol = true; // check for netmount volume
while (i--) {
dir = dirs[i];
if ($('#'+fm.navHash2Id(dir.hash)).length) {
continue;
}
if ((parent = findSubtree(dir.phash)).length) {
if (dir.phash && ((init = !parent.children().length) || (sibling = findSibling(parent, dir)).length)) {
if (init) {
if (!atonce[dir.phash]) {
atonce[dir.phash] = [];
}
atonce[dir.phash].push(dir);
} else {
sibling.before(itemhtml(dir));
}
} else {
parent[firstVol || dir.phash ? 'append' : 'prepend'](itemhtml(dir));
firstVol = false;
if (!dir.phash) {
base = $('#'+fm.navHash2Id(dir.hash)).parent();
if (!dir.disabled || dir.disabled.length < 1) {
base.addClass(pastable+' '+uploadable);
} else {
if ($.inArray('paste', dir.disabled) === -1) {
base.addClass(pastable);
}
if ($.inArray('upload', dir.disabled) === -1) {
base.addClass(uploadable);
}
}
}
}
} else {
orphans.push(dir);
}
}
// When init, html append at once
if (Object.keys(atonce).length){
$.each(atonce, function(p, dirs){
var parent = findSubtree(p),
html = [];
dirs.sort(compare);
$.each(dirs, function(i, d){
html.push(itemhtml(d));
});
parent.append(html.join(''));
});
}
if (orphans.length && orphans.length < length) {
return updateTree(orphans);
}
if (length && !mobile) {
updateDroppable();
}
}, | Base | 1 |
2)?O.substring(45,O.lastIndexOf("%26ex")):O.substring(2);this.showError(g,x,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+O);this.handleError(d,g,k,l,p)}),L,mxResources.get("changeUser"),mxUtils.bind(this,function(){function u(){G.innerHTML="";for(var N=0;N<D.length;N++){var I=document.createElement("option");mxUtils.write(I,D[N].displayName);I.value=N;G.appendChild(I);I=document.createElement("option");I.innerHTML=" ";
mxUtils.write(I,"<"+D[N].email+">");I.setAttribute("disabled","disabled");G.appendChild(I)}I=document.createElement("option");mxUtils.write(I,mxResources.get("addAccount"));I.value=D.length;G.appendChild(I)}var D=this.drive.getUsersList(),B=document.createElement("div"),C=document.createElement("span");C.style.marginTop="6px";mxUtils.write(C,mxResources.get("changeUser")+": ");B.appendChild(C);var G=document.createElement("select");G.style.width="200px";u();mxEvent.addListener(G,"change",mxUtils.bind(this, | Base | 1 |
function onReady() {
sftp.removeListener('error', onError);
stream.removeListener('exit', onExit);
cb(undefined, new SFTPWrapper(sftp));
} | Base | 1 |
_mouseCapture: function(event, overrideHandle) {
var currentItem = null,
validHandle = false,
that = this;
if (this.reverting) {
return false;
}
if(this.options.disabled || this.options.type === "static") {
return false;
}
//We have to refresh the items data once first
this._refreshItems(event);
//Find out if the clicked node (or one of its parents) is a actual item in this.items
$(event.target).parents().each(function() {
if($.data(this, that.widgetName + "-item") === that) {
currentItem = $(this);
return false;
}
});
if($.data(event.target, that.widgetName + "-item") === that) {
currentItem = $(event.target);
}
if(!currentItem) {
return false;
}
if(this.options.handle && !overrideHandle) {
$(this.options.handle, currentItem).find("*").addBack().each(function() {
if(this === event.target) {
validHandle = true;
}
});
if(!validHandle) {
return false;
}
}
this.currentItem = currentItem;
this._removeCurrentsFromItems();
return true;
}, | Base | 1 |
function load(icon) {
if (cache[icon]) return cache[icon];
return cache[icon] = fs.readFileSync(__dirname + '/../public/icons/' + icon, 'base64');
} | Base | 1 |
e()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(V){b.handleError(V)}});J.setAttribute("title",mxResources.get("find")+" (Enter)");J.style.float="none";J.style.width="120px";J.style.marginTop="6px";J.style.marginLeft="8px";J.style.overflow="hidden";J.style.textOverflow="ellipsis";J.className="geBtn gePrimaryBtn";n.appendChild(J);var E=document.createElement("div");E.style.marginTop="10px";if(t){var H=function(V,X,p,C,I){if(null==I||"1"!=I.html)return C=V.toLowerCase().indexOf(X,C),0>C?V:V.substr(0,
C)+p+V.substr(C+X.length);var T=V;X=mxUtils.htmlEntities(X);I=[];var P=-1;for(V=V.replace(/<br>/ig,"\n");-1<(P=V.indexOf("<",P+1));)I.push(P);P=V.match(/<[^>]*>/g);V=V.replace(/<[^>]*>/g,"");C=V.toLowerCase().indexOf(X,C);if(0>C)return T;T=C+X.length;p=mxUtils.htmlEntities(p);V=V.substr(0,C)+p+V.substr(T);for(var O=0,R=0;R<I.length;R++){if(I[R]-O<C)V=V.substr(0,I[R])+P[R]+V.substr(I[R]);else{var Y=I[R]-O<T?C+O:I[R]+(p.length-X.length);V=V.substr(0,Y)+P[R]+V.substr(Y)}O+=P[R].length}return V.replace(/\n/g,
"<br>")},S=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=A&&null!=q&&K.value){var V=q.cell,X=k.getLabel(V);k.isCellEditable(V)&&k.model.setValue(V,H(X,A,K.value,z-A.length,k.getCurrentCellStyle(V)));y.style.backgroundColor=e(!1,!0)?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}}catch(p){b.handleError(p)}});S.setAttribute("title",mxResources.get("replFind"));S.style.float="none";S.style.width="120px";S.style.marginTop="6px";S.style.marginLeft="8px";S.style.overflow="hidden";S.style.textOverflow= | Class | 2 |
TagCreationContainer.prototype._resizeTag = function(textfield) {
var that = this;
x2.DEBUG && console.log ('_resizeTag');
$(textfield).each(function() {
that.textsize.html(encodeURIComponent($(this).val()));
x2.DEBUG && console.log ('that.textsize.width = ' + that.textsize.width ());
$(this).css('width', (that.textsize.width() + 10) + 'px');
});
return $(textfield);
}; | Class | 2 |
640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(c,e){for(var g=this.editor.graph,k=g.getSelectionCells(),m=0;m<c.length;m++){var q=new window[c[m].layout](g);if(null!=c[m].config)for(var v in c[m].config)q[v]=c[m].config[v];this.executeLayout(function(){q.execute(g.getDefaultParent(),0==k.length?null:k)},m==c.length-1,e)}};EditorUi.prototype.importCsv=function(c,e){try{var g=c.split("\n"),k=[],m=[],q=[],v={};if(0<g.length){var x={}, | Base | 1 |
if(i===k)return a.iDrawError!=e&&null===j&&(K(a,0,"Requested unknown parameter "+("function"==typeof f.mData?"{function}":"'"+f.mData+"'")+" for row "+b+", column "+c,4),a.iDrawError=e),j;if((i===g||null===i)&&null!==j)i=j;else if("function"===typeof i)return i.call(g);return null===i&&"display"==d?"":i}function jb(a,b,c,d){a.aoColumns[c].fnSetData(a.aoData[b]._aData,d,{settings:a,row:b,col:c})}function La(a){return h.map(a.match(/(\\.|[^\.])+/g)||[""],function(a){return a.replace(/\\./g,".")})}function Q(a){if(h.isPlainObject(a)){var b= | Base | 1 |
EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,mxObjectId:!0,mxTransient:!0};EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.applyPatches=function(b,f,l,d,u){if(null!=f)for(var t=0;t<f.length;t++)null!=f[t]&&(b=this.patchPages(b,f[t],l,d,u));return b}; | Base | 1 |
var CommentsWindow=function(b,e,f,c,m,n){function v(){for(var K=O.getElementsByTagName("div"),F=0,H=0;H<K.length;H++)"none"!=K[H].style.display&&K[H].parentNode==O&&F++;t.style.display=0==F?"block":"none"}function d(K,F,H,S){function V(){F.removeChild(U);F.removeChild(X);W.style.display="block";M.style.display="block"}A={div:F,comment:K,saveCallback:H,deleteOnCancel:S};var M=F.querySelector(".geCommentTxt"),W=F.querySelector(".geCommentActionsList"),U=document.createElement("textarea");U.className= | Base | 1 |
mxResources.get("dragImagesHere"));l.appendChild(x);var A={},z=null,L=null,M=null;f=function(F){"true"!=mxEvent.getSource(F).getAttribute("contentEditable")&&null!=M&&(M(),M=null,mxEvent.consume(F))};mxEvent.addListener(v,"mousedown",f);mxEvent.addListener(v,"pointerdown",f);mxEvent.addListener(v,"touchstart",f);var n=new mxUrlConverter,y=!1;if(null!=d)for(f=0;f<d.length;f++)m=d[f],c(m.data,null,0,0,m.w,m.h,m,m.aspect,m.title);mxEvent.addListener(v,"dragleave",function(F){x.style.cursor="";for(var G= | Class | 2 |
'entityType': this.translateEntityType(this.model.get('parentType')),
}; | Base | 1 |
L.value=null==l||t?"":l.width;d.appendChild(L);mxUtils.write(d,mxResources.get("height")+":");var M=document.createElement("input");M.setAttribute("type","text");M.style.width="60px";M.style.marginLeft="8px";M.style.marginRight="16px";M.value=null==l||t?"":l.height;d.appendChild(M);mxUtils.br(d);mxUtils.br(d);mxEvent.addListener(e,"change",A);ImageDialog.filePicked=function(y){y.action==google.picker.Action.PICKED&&null!=y.docs[0].thumbnails&&(y=y.docs[0].thumbnails[y.docs[0].thumbnails.length-1],
null!=y&&(e.value=y.url,A()));e.focus()};d.appendChild(c);d.appendChild(g);mxUtils.br(d);t?(c.setAttribute("checked","checked"),c.checked=!0):(D.setAttribute("checked","checked"),D.checked=!0);!u&&c.checked&&(mxUtils.write(q,mxResources.get("pageNotFound")),q.setAttribute("disabled","disabled"),q.setAttribute("selected","selected"),q.setAttribute("value","pageNotFound"),g.appendChild(q),mxEvent.addListener(g,"change",function(){null==q.parentNode||q.selected||q.parentNode.removeChild(q)}));l=document.createElement("div"); | Class | 2 |
mxResources.get(Qa);null==La&&(La=Qa.substring(0,1).toUpperCase()+Qa.substring(1));Qa=La+" ("+Ya.length+")";var Ta=La=mxUtils.htmlEntities(La);15<La.length&&(La=La.substring(0,15)+"…");return{lbl:La+" ("+Ya.length+")",fullLbl:Qa,lblOnly:Ta}}function ia(Qa,Ya,La,Ta,Ua){mxEvent.addListener(La,"click",function(){X!=La&&(null!=X?(X.style.fontWeight="normal",X.style.textDecoration="none"):(xa.style.display="none",Fa.style.minHeight="100%"),X=La,X.style.fontWeight="bold",X.style.textDecoration="underline",
Aa.scrollTop=0,W&&(V=!0),ua.innerHTML=Ya,la.style.display="none",B(Ua?ca[Qa]:Ta?ka[Qa][Ta]:fa[Qa],Ua?!1:!0))})}var ma=Q.querySelector(".geTemplatesList");if(0<ba){ba=document.createElement("div");ba.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(ba,mxResources.get("custom"));ma.appendChild(ba);for(var qa in ca){ba=document.createElement("div");var oa=ca[qa];oa=ja(qa,oa);ba.className="geTemplateCatLink";ba.setAttribute("title", | Base | 1 |
(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(f,l,d){d.ui=f.ui;return l};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="18.0.6";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage= | Base | 1 |
function(J){k=J};this.setAutoScroll=function(J){m=J};this.setOpenFill=function(J){q=J};this.setStopClickEnabled=function(J){A=J};this.setSelectInserted=function(J){z=J};this.setSmoothing=function(J){l=J};this.setPerfectFreehandMode=function(J){M=J};this.setBrushSize=function(J){L.size=J};this.getBrushSize=function(){return L.size};var n=function(J){x=J;b.getRubberband().setEnabled(!J);b.graphHandler.setSelectEnabled(!J);b.graphHandler.setMoveEnabled(!J);b.container.style.cursor=J?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))}; | Class | 2 |
T){var N=Graph.customFontElements[T];null!=N&&N.url!=E&&(N.elt.parentNode.removeChild(N.elt),N=null);null==N?(N=E,"http:"==E.substring(0,5)&&(N=PROXY_URL+"?url="+encodeURIComponent(E)),N={name:u,url:E,elt:Graph.createFontElement(u,N)},Graph.customFontElements[T]=N,Graph.recentCustomFonts[T]=N,E=document.getElementsByTagName("head")[0],null!=J&&("link"==N.elt.nodeName.toLowerCase()?(N.elt.onload=J,N.elt.onerror=J):J()),null!=E&&E.appendChild(N.elt)):null!=J&&J()}else null!=J&&J()}else null!=J&&J();
return u};Graph.getFontUrl=function(u,E){u=Graph.customFontElements[u.toLowerCase()];null!=u&&(E=u.url);return E};Graph.processFontAttributes=function(u){u=u.getElementsByTagName("*");for(var E=0;E<u.length;E++){var J=u[E].getAttribute("data-font-src");if(null!=J){var T="FONT"==u[E].nodeName?u[E].getAttribute("face"):u[E].style.fontFamily;null!=T&&Graph.addFont(T,J)}}};Graph.processFontStyle=function(u){if(null!=u){var E=mxUtils.getValue(u,"fontSource",null);if(null!=E){var J=mxUtils.getValue(u,mxConstants.STYLE_FONTFAMILY, | Base | 1 |
_removePhoto( e ) {
e.preventDefault();
// eslint-disable-next-line no-alert
if ( ! confirm( 'Are you sure?' ) ) {
return;
}
this.$().removeAttr( 'data-custom' );
this.$( '.profile-picture' ).toggleClass( 'profile-avatar-current' );
this.$( '#submit' ).prop( 'disabled', false );
$( '.lp-user-profile-avatar' ).html( this.$( '.profile-avatar-current' ).find( 'img' ).clone() );
}, | Class | 2 |
(z=2);return z};var I=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return I.apply(this,arguments).grow(-this.getSelectionBorderInset())};var V=null,Q=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==V&&(V=mxCellRenderer.defaultShapes.tableLine);var z=Q.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var L=function(Ta,za,wa){for(var Ea=[],Da=0;Da<Ta.length;Da++){var La= | Base | 1 |
pushState:function pushState(condition) {
this.begin(condition);
}, | Base | 1 |
"/images/"+ma+".svg";return!0}function M(fa,ca,ba,ja){function ia(na,Ja){null==qa?(na=/^https?:\/\//.test(na)&&!b.editor.isCorsEnabledForUrl(na)?PROXY_URL+"?url="+encodeURIComponent(na):TEMPLATE_PATH+"/"+na,mxUtils.get(na,mxUtils.bind(this,function(Ga){200<=Ga.getStatus()&&299>=Ga.getStatus()&&(qa=Ga.getText());Ja(qa)}))):Ja(qa)}function ma(na,Ja,Ga){if(null!=na&&mxUtils.isAncestorNode(document.body,ca)&&(na=mxUtils.parseXml(na),na=Editor.extractGraphModel(na.documentElement,!0),null!=na)){"mxfile"==
na.nodeName&&(na=Editor.parseDiagramNode(na.getElementsByTagName("diagram")[0]));var Ra=new mxCodec(na.ownerDocument),Sa=new mxGraphModel;Ra.decode(na,Sa);na=Sa.root.getChildAt(0).children||[];b.sidebar.createTooltip(ca,na,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=fa.title?mxResources.get(fa.title,null,fa.title):null,!0,new mxPoint(Ja,
Ga),!0,null,!0);var Ha=document.createElement("div");Ha.className="geTempDlgDialogMask";Q.appendChild(Ha);var Na=b.sidebar.hideTooltip;b.sidebar.hideTooltip=function(){Ha&&(Q.removeChild(Ha),Ha=null,Na.apply(this,arguments),b.sidebar.hideTooltip=Na)};mxEvent.addListener(Ha,"click",function(){b.sidebar.hideTooltip()})}}var qa=null;if(Ca||b.sidebar.currentElt==ca)b.sidebar.hideTooltip();else{var oa=function(na){Ca&&b.sidebar.currentElt==ca&&ma(na,mxEvent.getClientX(ja),mxEvent.getClientY(ja));Ca=!1;
ba.src="/images/icon-search.svg"};b.sidebar.hideTooltip();b.sidebar.currentElt=ca;Ca=!0;ba.src="/images/aui-wait.gif";fa.isExt?e(fa,oa,function(){A(mxResources.get("cantLoadPrev"));Ca=!1;ba.src="/images/icon-search.svg"}):ia(fa.url,oa)}}function n(fa,ca,ba){if(null!=C){for(var ja=C.className.split(" "),ia=0;ia<ja.length;ia++)if(-1<ja[ia].indexOf("Active")){ja.splice(ia,1);break}C.className=ja.join(" ")}null!=fa?(C=fa,C.className+=" "+ca,I=ba,Ba.className="geTempDlgCreateBtn"):(I=C=null,Ba.className= | Base | 1 |
ka-aa,fa=ra+(ya.y-ra)/ka-aa,ca=new Image;ca.onload=function(){try{for(var ba=-Math.round(sa-mxUtils.mod((va-wa)*Y,sa)),ja=-Math.round(sa-mxUtils.mod((ra-fa)*Y,sa));ba<Ca;ba+=sa)for(var ia=ja;ia<Ma;ia+=sa)za.drawImage(ca,ba/Y,ia/Y);Ia()}catch(ma){null!=P&&P(ma)}};ca.onerror=function(ba){null!=P&&P(ba)};ca.src=pa}else Ia()}catch(ba){null!=P&&P(ba)}});Ka.onerror=function(Ia){null!=P&&P(Ia)};ha&&this.graph.addSvgShadow(Ba);this.graph.mathEnabled&&this.addMathCss(Ba);var Oa=mxUtils.bind(this,function(){try{null!= | Class | 2 |
c.value&&c.value.nodeType==mxConstants.NODETYPE_ELEMENT){var e=d;d=mxUtils.importNode(b.document,c.value,!0);d.appendChild(e);b=e.getAttribute("id");d.setAttribute("id",b);e.removeAttribute("id")}return d};a.beforeDecode=function(b,c,d){var e=c.cloneNode(!0),f=this.getName();c.nodeName!=f?(e=c.getElementsByTagName(f)[0],null!=e&&e.parentNode==c?(mxUtils.removeWhitespace(e,!0),mxUtils.removeWhitespace(e,!1),e.parentNode.removeChild(e)):e=null,d.value=c.cloneNode(!0),c=d.value.getAttribute("id"),null!=
c&&(d.setId(c),d.value.removeAttribute("id"))):d.setId(c.getAttribute("id"));if(null!=e)for(c=0;c<this.idrefs.length;c++){f=this.idrefs[c];var g=e.getAttribute(f);if(null!=g){e.removeAttribute(f);var k=b.objects[g]||b.lookup(g);null==k&&(g=b.getElementById(g),null!=g&&(k=(mxCodecRegistry.codecs[g.nodeName]||this).decode(b,g)));d[f]=k}}return e};return a}()); | Base | 1 |
('' + property.key.value),
computed: false,
value: self.recurse(property.value)
});
}
});
return function(scope, locals, assign, inputs) {
var value = {};
for (var i = 0; i < args.length; ++i) {
if (args[i].computed) {
value[args[i].key(scope, locals, assign, inputs)] = args[i].value(scope, locals, assign, inputs);
} else {
value[args[i].key] = args[i].value(scope, locals, assign, inputs);
}
}
return context ? {value: value} : value;
};
case AST.ThisExpression:
return function(scope) {
return context ? {value: scope} : scope;
};
case AST.LocalsExpression:
return function(scope, locals) {
return context ? {value: locals} : locals;
};
case AST.NGValueParameter:
return function(scope, locals, assign) {
return context ? {value: assign} : assign;
};
}
}, | Class | 2 |
function set(root, space, value) {
var i,
c,
val,
nextSpace,
curSpace = root;
space = parse(space);
val = space.pop();
for (i = 0, c = space.length; i < c; i++) {
nextSpace = space[i];
if (
nextSpace === '__proto__' ||
nextSpace === 'constructor' ||
nextSpace === 'prototype'
) {
return null;
}
if (isUndefined(curSpace[nextSpace])) {
curSpace[nextSpace] = {};
}
curSpace = curSpace[nextSpace];
}
curSpace[val] = value;
return curSpace;
} | Variant | 0 |
mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var f=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=f){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var l=mxFreehand.prototype.NORMAL_SMOOTHING,d=null,u=[],t,D=[],c,e=!1,g=!0,k=!0,m=!0,q=!0,v=[],x=!1,A=!0,z=!1,L={size:12,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},M=!1;this.setClosedPath=function(J){e=J};this.setAutoClose=function(J){g=J};this.setAutoInsert= | Class | 2 |
Button.prototype.setState = function (state) {
var d = 'disabled'
var $el = this.$element
var val = $el.is('input') ? 'val' : 'html'
var data = $el.data()
state += 'Text'
if (data.resetText == null) $el.data('resetText', $el[val]())
// push to event loop to allow forms to submit
setTimeout($.proxy(function () {
$el[val](data[state] == null ? this.options[state] : data[state])
if (state == 'loadingText') {
this.isLoading = true
$el.addClass(d).attr(d, d)
} else if (this.isLoading) {
this.isLoading = false
$el.removeClass(d).removeAttr(d)
}
}, this), 0)
} | Base | 1 |
data: function () {
return _.extend({
relatedTypeString: this.translateEntityType(this.entityType)
}, Dep.prototype.data.call(this));
},
init: function () {
if (this.getUser().isAdmin()) {
this.isRemovable = true;
}
Dep.prototype.init.call(this);
},
setup: function () {
var data = this.model.get('data') || {};
this.entityType = this.model.get('relatedType') || data.entityType || null;
this.entityId = this.model.get('relatedId') || data.entityId || null;
this.entityName = this.model.get('relatedName') || data.entityName || null;
this.messageData['relatedEntityType'] = this.translateEntityType(this.entityType);
this.messageData['relatedEntity'] = '<a href="#' + this.entityType + '/view/' + this.entityId + '">' + this.entityName +'</a>';
this.createMessage();
},
});
}); | Base | 1 |
file.copy = function copy(srcpath, destpath, options) {
if (file.isDir(srcpath)) {
// Copy a directory, recursively.
// Explicitly create new dest directory.
file.mkdir(destpath);
// Iterate over all sub-files/dirs, recursing.
fs.readdirSync(srcpath).forEach(function(filepath) {
copy(path.join(srcpath, filepath), path.join(destpath, filepath), options);
});
} else {
// Copy a single file.
file._copy(srcpath, destpath, options);
}
}; | Base | 1 |
Menus.prototype.createPopupMenu=function(C,D,G){var P=this.editorUi.editor.graph;C.smartSeparators=!0;y.apply(this,arguments);"1"==urlParams.sketch?P.isEnabled()&&(C.addSeparator(),1==P.getSelectionCount()&&this.addMenuItems(C,["-","lockUnlock"],null,G)):1==P.getSelectionCount()?(P.isCellFoldable(P.getSelectionCell())&&this.addMenuItems(C,P.isCellCollapsed(D)?["expand"]:["collapse"],null,G),this.addMenuItems(C,["collapsible","-","lockUnlock","enterGroup"],null,G),C.addSeparator(),this.addSubmenu("layout",
C)):P.isSelectionEmpty()&&P.isEnabled()?(C.addSeparator(),this.addMenuItems(C,["editData"],null,G),C.addSeparator(),this.addSubmenu("layout",C),this.addSubmenu("insert",C),this.addMenuItems(C,["-","exitGroup"],null,G)):P.isEnabled()&&this.addMenuItems(C,["-","lockUnlock"],null,G)};var A=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(C,D,G){A.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(C,["copyAsImage"],null,G)};EditorUi.prototype.toggleFormatPanel= | Class | 2 |
cancel = function() {
var close = function(){
dfrd.reject();
ta.elfinderdialog('close');
};
ta.editor && ta.editor.save(ta[0], ta.editor.instance);
if (rtrim(old) !== rtrim(ta.val())) {
old = ta.val();
fm.confirm({
title : self.title,
text : 'confirmNotSave',
accept : {
label : 'btnSaveClose',
callback : function() {
save();
close();
}
},
cancel : {
label : 'btnClose',
callback : close
}
});
} else {
close();
}
}, | Base | 1 |
D=C.createElement("output");C.appendChild(D);C=new mxXmlCanvas2D(D);C.translate(Math.floor((1-z.x)/L),Math.floor((1-z.y)/L));C.scale(1/L);var G=0,P=C.save;C.save=function(){G++;P.apply(this,arguments)};var K=C.restore;C.restore=function(){G--;K.apply(this,arguments)};var F=t.drawShape;t.drawShape=function(H){mxLog.debug("entering shape",H,G);F.apply(this,arguments);mxLog.debug("leaving shape",H,G)};t.drawState(m.getView().getState(m.model.root),C);mxLog.show();mxLog.debug(mxUtils.getXml(D));mxLog.debug("stateCounter", | Base | 1 |
data: _.isObject( action ) ? action : _.extend( data || {}, { action: action })
});
},
/**
* wp.ajax.send( [action], [options] )
*
* Sends a POST request to WordPress.
*
* @param {string} action The slug of the action to fire in WordPress.
* @param {object} options The options passed to jQuery.ajax.
* @return {$.promise} A jQuery promise that represents the request,
* decorated with an abort() method.
*/
send: function( action, options ) {
var promise, deferred;
if ( _.isObject( action ) ) {
options = action;
} else {
options = options || {};
options.data = _.extend( options.data || {}, { action: action });
}
options = _.defaults( options || {}, {
type: 'POST',
url: wp.ajax.settings.url,
context: this
});
deferred = $.Deferred( function( deferred ) {
// Transfer success/error callbacks.
if ( options.success )
deferred.done( options.success );
if ( options.error )
deferred.fail( options.error );
delete options.success;
delete options.error;
// Use with PHP's wp_send_json_success() and wp_send_json_error()
deferred.jqXHR = $.ajax( options ).done( function( response ) {
// Treat a response of 1 as successful for backward compatibility with existing handlers.
if ( response === '1' || response === 1 )
response = { success: true };
if ( _.isObject( response ) && ! _.isUndefined( response.success ) )
deferred[ response.success ? 'resolveWith' : 'rejectWith' ]( this, [response.data] );
else
deferred.rejectWith( this, [response] );
}).fail( function() {
deferred.rejectWith( this, arguments );
});
});
promise = deferred.promise();
promise.abort = function() {
deferred.jqXHR.abort();
return this;
};
return promise;
}
};
}(jQuery)); | Compound | 4 |
4)&&!!(a%100)||!(a%400)};d.isSameDay=function(a,c){return a.toDateString()===c.toDateString()};d.locale=function(a,c){c?u(a,{res:v,formatter:w,parser:x},c):"function"===typeof a?m=a(d):a&&(q&&!q.date&&console.warn("This method of changing the locale is deprecated. See documentation for details."),m=a);return m};d.extend=function(a){var c=a.extender||{},b;for(b in c)d[b]||(d[b]=c[b]);(a.formatter||a.parser||a.res)&&u(m,t[m],a)};d.plugin=function(a,c){"function"===typeof a?d.extend(r[a(d)]):(r[a]=r[a]||
c,!c&&r[a]&&(d.extend(r[a]),q&&!q.date&&console.warn("This method of applying plugins is deprecated. See documentation for details.")))};d.locale(m,{});"object"===typeof module&&"object"===typeof module.exports?module.exports=d:"function"===typeof define&&define.amd?define([],function(){return d}):q.date=d})(this); | Class | 2 |
const validateURL = (url, debug) => {
if (!url) {
return false
}
const validURLOpts = {
protocols: ['http', 'https'],
require_protocol: true,
require_tld: !debug,
}
if (!validator.isURL(url, validURLOpts)) {
return false
}
return true
} | Class | 2 |
l,q=W(a);g=a._iDisplayStart;i=!1!==d.bPaginate?a._iDisplayLength:-1;var k=function(a,b){j.push({name:a,value:b})};k("sEcho",a.iDraw);k("iColumns",c);k("sColumns",D(b,"sName").join(","));k("iDisplayStart",g);k("iDisplayLength",i);var S={draw:a.iDraw,columns:[],order:[],start:g,length:i,search:{value:e.sSearch,regex:e.bRegex}};for(g=0;g<c;g++)o=b[g],l=f[g],i="function"==typeof o.mData?"function":o.mData,S.columns.push({data:i,name:o.sName,searchable:o.bSearchable,orderable:o.bSortable,search:{value:l.sSearch, | Base | 1 |
this.shape){this.shape.stroke=0==Da?mxConstants.NONE:pa.stroke;if(this.shape.constructor==V)this.shape.line=L(Qa[Ta],0,Da),this.shape.updateBoundsFromLine();else{var Ya=T.getActualStartSize(ma.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+Da*ia;this.shape.bounds.x=ma.x+(Ta==Fa.length-1?0:Ya.x*ia);this.shape.bounds.width=ma.width-(Ta==Fa.length-1?0:Ya.width+Ya.x+ia)}this.shape.redraw()}};var La=!1;za.setPosition=function(Ya,Ua,eb){Da=Math.max(Graph.minTableRowHeight-
Ya.height,Ua.y-Ya.y-Ya.height);La=mxEvent.isShiftDown(eb.getEvent());null!=Ea&&La&&(Da=Math.min(Da,Ea.height-Graph.minTableRowHeight))};za.execute=function(Ya){if(0!=Da)T.setTableRowHeight(this.state.cell,Da,!La);else if(!M.blockDelayedSelection){var Ua=T.getCellAt(Ya.getGraphX(),Ya.getGraphY())||ma.cell;T.graphHandler.selectCellForEvent(Ua,Ya)}Da=0};za.reset=function(){Da=0};z.push(za)})(ca);for(ca=0;ca<Ma.length;ca++)mxUtils.bind(this,function(Ta){var za=T.view.getState(Ma[Ta]),wa=T.getCellGeometry(Ma[Ta]), | Class | 2 |
$scope.provision = function() {
$scope.isSaving = true;
growl.info($sanitize('The node ' + $scope.node.nodeLabel + ' is being added to requisition ' + $scope.node.foreignSource + '. Please wait...'));
var successMessage = $sanitize('The node ' + $scope.node.nodeLabel + ' has been added to requisition ' + $scope.node.foreignSource);
RequisitionsService.quickAddNode($scope.node).then(
function() { // success
$scope.reset();
bootbox.dialog({
message: successMessage,
title: 'Success',
buttons: {
main: {
label: 'Ok',
className: 'btn-secondary'
}
}
});
},
$scope.errorHandler
);
}; | Base | 1 |
function(c,e){if(Graph.isPageLink(e)){var g=c[e.substring(e.indexOf(",")+1)];e=null!=g?"data:page/id,"+g:null}else if("data:action/json,"==e.substring(0,17))try{var k=JSON.parse(e.substring(17));if(null!=k.actions){for(var m=0;m<k.actions.length;m++){var q=k.actions[m];if(null!=q.open&&Graph.isPageLink(q.open)){var v=q.open.substring(q.open.indexOf(",")+1);g=c[v];null!=g?q.open="data:page/id,"+g:null==this.getPageById(v)&&delete q.open}}e="data:action/json,"+JSON.stringify(k)}}catch(x){}return e}; | Base | 1 |
function ComponentRawSourceDialogController(scope, $mdDialog) {
scope.close = function() {
$mdDialog.hide();
};
} | Base | 1 |
setTimeout(function(){Ia.style.display="none"},4E3)}function z(){null!=X&&(X.style.fontWeight="normal",X.style.textDecoration="none",p=X,X=null)}function L(fa,ca,ba,ja,ia,ma,qa){if(-1<fa.className.indexOf("geTempDlgRadioBtnActive"))return!1;fa.className+=" geTempDlgRadioBtnActive";Q.querySelector(".geTempDlgRadioBtn[data-id="+ja+"]").className="geTempDlgRadioBtn "+(qa?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");Q.querySelector("."+ca).src="/images/"+ba+"-sel.svg";Q.querySelector("."+ia).src=
"/images/"+ma+".svg";return!0}function M(fa,ca,ba,ja){function ia(na,Ja){null==qa?(na=/^https?:\/\//.test(na)&&!b.editor.isCorsEnabledForUrl(na)?PROXY_URL+"?url="+encodeURIComponent(na):TEMPLATE_PATH+"/"+na,mxUtils.get(na,mxUtils.bind(this,function(Ga){200<=Ga.getStatus()&&299>=Ga.getStatus()&&(qa=Ga.getText());Ja(qa)}))):Ja(qa)}function ma(na,Ja,Ga){if(null!=na&&mxUtils.isAncestorNode(document.body,ca)&&(na=mxUtils.parseXml(na),na=Editor.extractGraphModel(na.documentElement,!0),null!=na)){"mxfile"== | Class | 2 |
getPerm = function(perm){
if (isNaN(parseInt(perm, 8))) {
var mode_array = perm.split('');
var a = [];
for (var i = 0, l = mode_array.length; i < l; i++) {
if (i === 0 || i === 3 || i === 6) {
if (mode_array[i].match(/[r]/i)) {
a.push(1);
} else if (mode_array[i].match(/[-]/)) {
a.push(0);
}
} else if ( i === 1 || i === 4 || i === 7) {
if (mode_array[i].match(/[w]/i)) {
a.push(1);
} else if (mode_array[i].match(/[-]/)) {
a.push(0);
}
} else {
if (mode_array[i].match(/[x]/i)) {
a.push(1);
} else if (mode_array[i].match(/[-]/)) {
a.push(0);
}
}
}
a.splice(3, 0, ",");
a.splice(7, 0, ",");
var b = a.join("");
var b_array = b.split(",");
var c = [];
for (var j = 0, m = b_array.length; j < m; j++) {
var p = parseInt(b_array[j], 2).toString(8);
c.push(p)
}
perm = c.join('');
} else {
perm = parseInt(perm, 8).toString(8);
}
return perm;
}, | Base | 1 |
$scope.save = function() {
var form = this.fsForm;
RequisitionsService.startTiming();
RequisitionsService.saveForeignSourceDefinition($scope.foreignSourceDef).then(
function() { // success
growl.success('The definition for the requisition ' + $scope.foreignSource + ' has been saved.');
form.$dirty = false;
},
$scope.errorHandler
);
}; | Base | 1 |
attachThumbnails = function(images) {
var url = fm.option('tmbUrl'),
ret = true,
ndx;
$.each(images, function(hash, tmb) {
var node = $('#'+fm.cwdHash2Id(hash));
if (node.length) {
(function(node, tmb) {
$('<img/>')
.load(function() { node.find('.elfinder-cwd-icon').css('background', "url('"+tmb+"') center center no-repeat"); })
.attr('src', tmb);
})(node, fm.searchStatus.state? fm.tmb(hash) : (url + tmb));
} else {
ret = false;
if ((ndx = index(hash)) != -1) {
buffer[ndx].tmb = tmb;
}
}
});
return ret;
}, | Base | 1 |
X){null!=X.shortcut&&900>n&&!mxClient.IS_IOS?O.firstChild.nextSibling.setAttribute("title",X.shortcut):m.apply(this,arguments)};var q=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){q.apply(this,arguments);if(null!=this.userElement){var O=this.userElement;O.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+O.style.display;O.className="geToolbarButton";O.innerHTML="";O.style.backgroundImage="url("+Editor.userImage+")";O.style.backgroundPosition="center center";
O.style.backgroundRepeat="no-repeat";O.style.backgroundSize="24px 24px";O.style.height="24px";O.style.width="24px";O.style.cssFloat="right";O.setAttribute("title",mxResources.get("changeUser"));if("none"!=O.style.display){O.style.display="inline-block";var X=this.getCurrentFile();if(null!=X&&X.isRealtimeEnabled()&&X.isRealtimeSupported()){var ea=document.createElement("img");ea.setAttribute("border","0");ea.style.position="absolute";ea.style.left="18px";ea.style.top="2px";ea.style.width="12px";ea.style.height=
"12px";var ka=X.getRealtimeError();X=X.getRealtimeState();var ja=mxResources.get("realtimeCollaboration");1==X?(ea.src=Editor.syncImage,ja+=" ("+mxResources.get("online")+")"):(ea.src=Editor.syncProblemImage,ja=null!=ka&&null!=ka.message?ja+(" ("+ka.message+")"):ja+(" ("+mxResources.get("disconnected")+")"));ea.setAttribute("title",ja);O.style.paddingRight="4px";O.appendChild(ea)}}}};var y=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){y.apply(this,arguments);if(null!= | Base | 1 |
m=P.name;v="";O(null,!0)})));k.appendChild(F)})(D[G],G)}100==D.length&&(k.appendChild(A),B=function(){k.scrollTop>=k.scrollHeight-k.offsetHeight&&C()},mxEvent.addListener(k,"scroll",B))}),y)});t()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);b=null}})();TrelloFile=function(b,e,f){DrawioFile.call(this,b,e);this.meta=f;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes}; | Class | 2 |
mxTooltipHandler.prototype.show=function(a,b,c){if(!this.destroyed&&null!=a&&0<a.length){null==this.div&&this.init();var d=mxUtils.getScrollOrigin();this.div.style.zIndex=this.zIndex;this.div.style.left=b+d.x+"px";this.div.style.top=c+mxConstants.TOOLTIP_VERTICAL_OFFSET+d.y+"px";mxUtils.isNode(a)?(this.div.innerHTML="",this.div.appendChild(a)):this.div.innerHTML=a.replace(/\n/g,"<br>");this.div.style.visibility="";mxUtils.fit(this.div)}}; | Base | 1 |
null!=na){ca=ha.getAttribute("section");aa=ha.getAttribute("subsection");if(null==ca&&(la=na.indexOf("/"),ca=na.substring(0,la),null==aa)){var oa=na.indexOf("/",la+1);-1<oa&&(aa=na.substring(la+1,oa))}la=za[ca];null==la&&(xa++,la=[],za[ca]=la);na=ha.getAttribute("clibs");null!=qa[na]&&(na=qa[na]);na={url:ha.getAttribute("url"),libs:ha.getAttribute("libs"),title:ha.getAttribute("title")||ha.getAttribute("name"),preview:ha.getAttribute("preview"),clibs:na,tags:ha.getAttribute("tags")};la.push(na);null!=
aa&&(la=pa[ca],null==la&&(la={},pa[ca]=la),ca=la[aa],null==ca&&(ca=[],la[aa]=ca),ca.push(na))}ha=ha.nextSibling}G(za,ea,wa)}})}function H(ha){E&&(ya.scrollTop=0,da.innerHTML="",Ea.spin(da),U=!1,V=!0,fa.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag")),ba=null,E(ua,function(){z(mxResources.get("cannotLoad"));ua([])},ha?null:u))}function F(ha){if(""==ha)null!=n&&(n.click(),n=null);else{if(null==TemplatesDialog.tagsList[d]){var qa={};for(Da in za)for(var aa=za[Da],ca=0;ca<aa.length;ca++){var na= | Base | 1 |
!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(c,e,g,k,m,q){"text/xml"!=g||/(\.drawio)$/i.test(e)||/(\.xml)$/i.test(e)||/(\.svg)$/i.test(e)||/(\.html)$/i.test(e)||(e=e+"."+(null!=q?q:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)c=k?this.base64ToBlob(c,g):new Blob([c],{type:g}),navigator.msSaveOrOpenBlob(c,e);else if(mxClient.IS_IE)g=window.open("about:blank","_blank"),null==g?mxUtils.popup(c,!0):(g.document.write(c),
g.document.close(),g.document.execCommand("SaveAs",!0,e),g.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==g||"image/"!=g.substring(0,6)?this.showTextDialog(e+":",c):this.openInNewWindow(c,g,k);else{var v=document.createElement("a");q=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof v.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var x=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);q=65==(x?parseInt(x[2],10):
!1)?!1:q}if(q||this.isOffline()){v.href=URL.createObjectURL(k?this.base64ToBlob(c,g):new Blob([c],{type:g}));q?v.download=e:v.setAttribute("target","_blank");document.body.appendChild(v);try{window.setTimeout(function(){URL.revokeObjectURL(v.href)},2E4),v.click(),v.parentNode.removeChild(v)}catch(A){}}else this.createEchoRequest(c,e,g,k,m).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(c,e,g,k,m,q){c="xml="+encodeURIComponent(c);return new mxXmlRequest(SAVE_URL,c+(null!= | Base | 1 |
null!=sa[ra]&&(ra=sa[ra]);ra={url:pa.getAttribute("url"),libs:pa.getAttribute("libs"),title:pa.getAttribute("title"),tooltip:pa.getAttribute("name")||pa.getAttribute("url"),preview:pa.getAttribute("preview"),clibs:ra,tags:pa.getAttribute("tags")};wa.push(ra);null!=ya&&(wa=Ba[va],null==wa&&(wa={},Ba[va]=wa),va=wa[ya],null==va&&(va=[],wa[ya]=va),va.push(ra))}pa=pa.nextSibling}S.stop();B()}})};G.appendChild(ea);G.appendChild(Aa);G.appendChild(Z);var ta=!1,ka=k;/^https?:\/\//.test(ka)&&!b.editor.isCorsEnabledForUrl(ka)&& | Base | 1 |
throwError: function(error, start, end) {
end = end || this.index;
var colStr = (isDefined(start)
? 's ' + start + '-' + this.index + ' [' + this.text.substring(start, end) + ']'
: ' ' + end);
throw $parseMinErr('lexerr', 'Lexer Error: {0} at column{1} in expression [{2}].',
error, colStr, this.text);
}, | Class | 2 |
AspectDialog.prototype.createPageItem=function(b,f,l){var d=document.createElement("div");d.className="geAspectDlgListItem";d.setAttribute("data-page-id",b);d.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(f)+"</div>";this.pagesContainer.appendChild(d);var t=this.createViewer(d.childNodes[0],l);f=mxUtils.bind(this,function(){null!=this.selectedItem&&(this.selectedItem.className="geAspectDlgListItem");this.selectedItem=d;
this.selectedPage=b;d.className+=" geAspectDlgListItemSelected";this.layersContainer.innerHTML="";this.selectedLayers={};this.okBtn.setAttribute("disabled","disabled");var u=t.model;u=u.getChildCells(u.getRoot());for(var E=0;E<u.length;E++)this.createLayerItem(u[E],b,t,l)});mxEvent.addListener(d,"click",f);this.aspect.pageId==b&&f()}; | Base | 1 |
0==T?ba():R()}else this.stoppingCustomActions=this.executingCustomActions=!1,R(),null!=E&&E()});ba()}};Graph.prototype.doUpdateCustomLinksForCell=function(u,E){var J=this.getLinkForCell(E);null!=J&&"data:action/json,"==J.substring(0,17)&&this.setLinkForCell(E,this.updateCustomLink(u,J));if(this.isHtmlLabel(E)){var T=document.createElement("div");T.innerHTML=this.sanitizeHtml(this.getLabel(E));for(var N=T.getElementsByTagName("a"),Q=!1,R=0;R<N.length;R++)J=N[R].getAttribute("href"),null!=J&&"data:action/json,"==
J.substring(0,17)&&(N[R].setAttribute("href",this.updateCustomLink(u,J)),Q=!0);Q&&this.labelChanged(E,T.innerHTML)}};Graph.prototype.updateCustomLink=function(u,E){if("data:action/json,"==E.substring(0,17))try{var J=JSON.parse(E.substring(17));null!=J.actions&&(this.updateCustomLinkActions(u,J.actions),E="data:action/json,"+JSON.stringify(J))}catch(T){}return E};Graph.prototype.updateCustomLinkActions=function(u,E){for(var J=0;J<E.length;J++){var T=E[J],N;for(N in T)this.updateCustomLinkAction(u, | Base | 1 |
"url("+mxWindow.prototype.normalizeImage+")";aa.style.backgroundPosition="top center";aa.style.backgroundRepeat="no-repeat";aa.setAttribute("title","Minimize");var va=!1,ja=mxUtils.bind(this,function(){O.innerHTML="";if(!va){var da=function(ia,ma,ra){ia=C("",ia.funct,null,ma,ia,ra);ia.style.width="40px";ia.style.opacity="0.7";return ca(ia,null,"pointer")},ca=function(ia,ma,ra){null!=ma&&ia.setAttribute("title",ma);ia.style.cursor=null!=ra?ra:"default";ia.style.margin="2px 0px";O.appendChild(ia);mxUtils.br(O); | Base | 1 |
this.graph.getTooltip(c,d,e,f);this.show(k,e,f);this.state=c;this.node=d;this.stateSource=g}}),this.delay)}};mxTooltipHandler.prototype.hide=function(){this.resetTimer();this.hideTooltip()};mxTooltipHandler.prototype.hideTooltip=function(){null!=this.div&&(this.div.style.visibility="hidden",this.div.innerHTML="")}; | Base | 1 |
synchronize: function(requisition, errorHandler) {
/**
* @param {object} requisition The requisition object
* @param {string} rescanExisting true to perform a full scan, false to only add/remove nodes without scan, dbonly for all DB operations without scan
*/
var doSynchronize = function(requisition, rescanExisting) {
RequisitionsService.startTiming();
RequisitionsService.synchronizeRequisition(requisition.foreignSource, rescanExisting).then(
function() { // success
growl.success('The import operation has been started for ' + requisition.foreignSource + ' (rescanExisting? ' + rescanExisting + ')<br/>Use <b>refresh</b> to update the deployed statistics');
requisition.setDeployed(true);
},
errorHandler
);
};
bootbox.prompt({
title: 'Synchronize Requisition ' + requisition.foreignSource,
message: '<p><b>Choose a scan option: </b></p>',
inputType: 'radio',
inputOptions: [
{
text: 'Scan all nodes',
value: 'true',
},
{
text: 'Scan added nodes only',
value: 'false',
},
{
text: 'No scanning',
value: 'dbonly',
}
],
buttons: {
confirm: {
label: 'Synchronize',
},
cancel: {
label: 'Cancel',
}
},
swapButtonOrder: 'true',
callback: function (result) {
if (result !== null) {
doSynchronize(requisition, result);
}
}
});
} | Base | 1 |
mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxCell,["children","edges","overlays","mxTransient"],["parent","source","target"]);a.isCellCodec=function(){return!0};a.isNumericAttribute=function(b,c,d){return"value"!==c.nodeName&&mxObjectCodec.prototype.isNumericAttribute.apply(this,arguments)};a.isExcluded=function(b,c,d,e){return mxObjectCodec.prototype.isExcluded.apply(this,arguments)||e&&"value"==c&&d.nodeType==mxConstants.NODETYPE_ELEMENT};a.afterEncode=function(b,c,d){if(null!= | Base | 1 |
u&&J[T].getAttribute("data-font-src")!=E&&J[T].setAttribute("data-font-src",E)}};var t=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return t.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var u=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=u)for(var E in u)this.globalVars[E]= | Class | 2 |
c;else if("mxfile"==c.nodeName){var k=c.getElementsByTagName("diagram");if(0<k.length){g=k[0];var m=e.getGlobalVariable;e.getGlobalVariable=function(q){return"page"==q?g.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==q?1:m.apply(this,arguments)}}}null!=g&&(c=Editor.parseDiagramNode(g))}k=this.editor.graph;try{this.editor.graph=e,this.editor.setGraphXml(c)}catch(q){}finally{this.editor.graph=k}return c};EditorUi.prototype.getPngFileProperties=function(c){var e=1,g=0;if(null!=
c){if(c.hasAttribute("scale")){var k=parseFloat(c.getAttribute("scale"));!isNaN(k)&&0<k&&(e=k)}c.hasAttribute("border")&&(k=parseInt(c.getAttribute("border")),!isNaN(k)&&0<k&&(g=k))}return{scale:e,border:g}};EditorUi.prototype.getEmbeddedPng=function(c,e,g,k,m){try{var q=this.editor.graph,v=null!=q.themes&&"darkTheme"==q.defaultThemeName,x=null;if(null!=g&&0<g.length)q=this.createTemporaryGraph(v?q.getDefaultStylesheet():q.getStylesheet()),document.body.appendChild(q.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement, | Class | 2 |
mxUtils.setOpacity(W,100),M.style.visibility="",U.stop(),S())}))}else S();C.appendChild(V);++D==p&&(mxUtils.br(C),D=0)}function O(P){var K=z.value;if(null==P||null!=K&&0<K.length)B&&b.hideDialog(),f(K,P,z)}l="1"==urlParams.noDevice?!1:l;v=null!=v?v:!0;d=null!=d?d:!0;p=null!=p?p:4;B=null!=B?B:!0;n=document.createElement("div");n.style.whiteSpace="nowrap";null==c&&b.addLanguageMenu(n);var t=document.createElement("h2");mxUtils.write(t,m||mxResources.get("create"));t.style.marginTop="0px";t.style.marginBottom= | Class | 2 |
PropertiesReader.prototype.set = function (key, value) {
var parsedValue = ('' + value).trim();
this._properties = this._propertyAppender(this._properties, key, parsedValue);
var expanded = key.split('.');
var source = this._propertiesExpanded;
while (expanded.length > 1) {
var step = expanded.shift();
if (expanded.length >= 1 && typeof source[step] === 'string') {
source[step] = {'': source[step]};
}
source = (source[step] = source[step] || {});
}
if (typeof parsedValue === 'string' && typeof source[expanded[0]] === 'object') {
source[expanded[0]][''] = parsedValue;
}
else {
source[expanded[0]] = parsedValue;
}
return this;
}; | Variant | 0 |
http.ServerResponse.prototype.safeRedirect = function (url) {
const fullURL = new URL(url, config.urlPrefix);
if (`${fullURL.protocol}//${fullURL.host}` !== config.urlPrefix)
return this.forbidden();
this.redirect(url);
}; | Class | 2 |
return na}function C(){function oa(pa,na){var Ka=mxResources.get(pa);null==Ka&&(Ka=pa.substring(0,1).toUpperCase()+pa.substring(1));18<Ka.length&&(Ka=Ka.substring(0,18)+"…");return Ka+" ("+na.length+")"}function sa(pa,na,Ka){mxEvent.addListener(na,"click",function(){Ea!=na&&(Ea.style.backgroundColor="",Ea=na,Ea.style.backgroundColor=v,Z.scrollTop=0,Z.innerHTML="",H=0,La=Ka?za[pa][Ka]:Ca[pa],W=null,O(!1))})}Fa&&(Fa=!1,mxEvent.addListener(Z,"scroll",function(pa){Z.scrollTop+Z.clientHeight>=Z.scrollHeight&& | Base | 1 |
T.isModified()&&T.fileChanged()},{install:function(R){this.listener=function(){R(E.editor.autosave)};E.editor.addListener("autosaveChanged",this.listener)},destroy:function(){E.editor.removeListener(this.listener)}});u.appendChild(N)}}if(this.isMathOptionVisible()&&J.isEnabled()&&"undefined"!==typeof MathJax){N=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return J.mathEnabled},function(R){E.actions.get("mathematicalTypesetting").funct()},{install:function(R){this.listener= | Base | 1 |
var N=mxText.prototype.redraw;mxText.prototype.redraw=function(){N.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(n,D,I){function S(){for(var ma=T.getSelectionCells(),ya=[],Ba=0;Ba<ma.length;Ba++)T.isCellVisible(ma[Ba])&&ya.push(ma[Ba]);T.setSelectionCells(ya)}function Q(ma){T.setHiddenTags(ma?[]:X.slice());S();T.refresh()}function P(ma,ya){ja.innerHTML="";if(0<ma.length){var Ba=document.createElement("table"); | Base | 1 |
Na.prototype.defaultWidth=4;Na.prototype.isOpenEnded=function(){return!0};Na.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};Na.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",Na);mxUtils.extend(Ca,mxArrowConnector);Ca.prototype.defaultWidth=10;Ca.prototype.defaultArrowWidth=20;Ca.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,
"startWidth",this.defaultArrowWidth)};Ca.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Ca.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Ca);mxUtils.extend(Ra,mxActor);Ra.prototype.size=30;Ra.prototype.isRoundable=function(){return!0};Ra.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(v,parseFloat(mxUtils.getValue(this.style, | Base | 1 |
OAuthServer.prototype.generateAccessToken = function(refreshToken) {
let username = this.tokens[refreshToken];
let accessToken = crypto.randomBytes(10).toString('base64');
if (!username) {
return {
error: 'Invalid refresh token'
};
}
this.users[username].accessToken = accessToken;
this.users[username].expiresIn = Date.now + this.options.expiresIn * 1000;
if (this.options.onUpdate) {
this.options.onUpdate(username, accessToken);
}
return {
access_token: accessToken,
expires_in: this.options.expiresIn,
token_type: 'Bearer'
};
}; | Base | 1 |
var O=mxText.prototype.redraw;mxText.prototype.redraw=function(){O.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(u,E,J){function T(){for(var ja=R.getSelectionCells(),Ba=[],Ha=0;Ha<ja.length;Ha++)R.isCellVisible(ja[Ha])&&Ba.push(ja[Ha]);R.setSelectionCells(Ba)}function N(ja){R.hiddenTags=ja?[]:Y.slice();T();R.refresh()}function Q(ja,Ba){ea.innerHTML="";if(0<ja.length){var Ha=document.createElement("table"); | Class | 2 |
Progress.prototype.fontSize = function(n){
this._fontSize = n;
return this;
}; | Base | 1 |
qtip: Tine.Tinebase.common.doubleEncode(attr.name),
leaf: !!attr.account_grants,
allowDrop: !!attr.account_grants && attr.account_grants.addGrant
});
// copy 'real' data to container space
attr.container = Ext.copyTo({}, attr, Tine.Tinebase.Model.Container.getFieldNames());
}, | Base | 1 |
var StorageDialog=function(b,e,f){function c(p,q,x,y,A,B){function I(){mxEvent.addListener(O,"click",null!=B?B:function(){x!=App.MODE_GOOGLE||b.isDriveDomain()?x==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(x,!0);e()})):x==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(x,!0);e()})):
(b.setMode(x,!0),e()):window.location.hostname=DriveClient.prototype.newAppHostname})}d++;++v>f&&(mxUtils.br(g),v=1);var O=document.createElement("a");O.style.overflow="hidden";O.style.display="inline-block";O.className="geBaseButton";O.style.boxSizing="border-box";O.style.fontSize="11px";O.style.position="relative";O.style.margin="4px";O.style.marginTop="8px";O.style.marginBottom="0px";O.style.padding="8px 10px 8px 10px";O.style.width="88px";O.style.height="100px";O.style.whiteSpace="nowrap";O.setAttribute("title", | Base | 1 |
module.exports.createTransport = function(transporter, defaults) {
let urlConfig;
let options;
let mailer;
if (
// provided transporter is a configuration object, not transporter plugin
(typeof transporter === 'object' && typeof transporter.send !== 'function') ||
// provided transporter looks like a connection url
(typeof transporter === 'string' && /^(smtps?|direct):/i.test(transporter))
) {
if ((urlConfig = typeof transporter === 'string' ? transporter : transporter.url)) {
// parse a configuration URL into configuration options
options = shared.parseConnectionUrl(urlConfig);
} else {
options = transporter;
}
if (options.pool) {
transporter = new SMTPPool(options);
} else if (options.sendmail) {
transporter = new SendmailTransport(options);
} else if (options.streamTransport) {
transporter = new StreamTransport(options);
} else if (options.jsonTransport) {
transporter = new JSONTransport(options);
} else if (options.SES) {
transporter = new SESTransport(options);
} else {
transporter = new SMTPTransport(options);
}
}
mailer = new Mailer(transporter, options, defaults);
return mailer;
}; | Base | 1 |
"blank"===y.value?"_blank":q:null},getEditInput:function(){return g},getEditSelect:function(){return y}}};EditorUi.prototype.addLinkSection=function(d,f){function g(){var C=document.createElement("div");C.style.width="100%";C.style.height="100%";C.style.boxSizing="border-box";null!=y&&y!=mxConstants.NONE?(C.style.border="1px solid black",C.style.backgroundColor=y):(C.style.backgroundPosition="center center",C.style.backgroundRepeat="no-repeat",C.style.backgroundImage="url('"+Dialog.prototype.closeImage+
"')");F.innerHTML="";F.appendChild(C)}mxUtils.write(d,mxResources.get("links")+":");var m=document.createElement("select");m.style.width="100px";m.style.padding="0px";m.style.marginLeft="8px";m.style.marginRight="10px";m.className="geBtn";var q=document.createElement("option");q.setAttribute("value","auto");mxUtils.write(q,mxResources.get("automatic"));m.appendChild(q);q=document.createElement("option");q.setAttribute("value","blank");mxUtils.write(q,mxResources.get("openInNewWindow"));m.appendChild(q); | Base | 1 |
jsonPathExtractionQuery(column, path) {
let paths = _.toPath(path);
let pathStr;
const quotedColumn = this.isIdentifierQuoted(column)
? column
: this.quoteIdentifier(column);
switch (this.dialect) {
case 'mysql':
/**
* Sub paths need to be quoted as ECMAScript identifiers
* https://bugs.mysql.com/bug.php?id=81896
*/
paths = paths.map(subPath => Utils.addTicks(subPath, '"'));
pathStr = this.escape(['$'].concat(paths).join('.'));
return `(${quotedColumn}->>${pathStr})`;
case 'mariadb':
pathStr = this.escape(['$'].concat(paths).join('.'));
return `json_unquote(json_extract(${quotedColumn},${pathStr}))`;
case 'sqlite':
pathStr = this.escape(['$']
.concat(paths)
.join('.')
.replace(/\.(\d+)(?:(?=\.)|$)/g, (_, digit) => `[${digit}]`));
return `json_extract(${quotedColumn}, ${pathStr})`;
case 'postgres':
pathStr = this.escape(`{${paths.join(',')}}`);
return `(${quotedColumn}#>>${pathStr})`;
default:
throw new Error(`Unsupported ${this.dialect} for JSON operations`);
}
} | Base | 1 |
labels: templateInstance.topTasks.get().map((task) => task._id),
datasets: [{
values: templateInstance.topTasks.get().map((task) => task.count),
}],
},
tooltipOptions: {
},
})
}
})
})
} | Base | 1 |
$scope.save = function() {
var form = this.nodeForm;
RequisitionsService.startTiming();
RequisitionsService.saveNode($scope.node).then(
function() { // success
growl.success('The node ' + $scope.node.nodeLabel + ' has been saved.');
$scope.foreignId = $scope.node.foreignId;
form.$dirty = false;
},
$scope.errorHandler
);
}; | Base | 1 |
ka-aa,ha=ua+(ya.y-ua)/ka-aa,da=new Image;da.onload=function(){try{for(var ca=-Math.round(sa-mxUtils.mod((wa-xa)*Y,sa)),la=-Math.round(sa-mxUtils.mod((ua-ha)*Y,sa));ca<Da;ca+=sa)for(var ia=la;ia<La;ia+=sa)Aa.drawImage(da,ca/Y,ia/Y);Fa()}catch(ma){null!=N&&N(ma)}};da.onerror=function(ca){null!=N&&N(ca)};da.src=oa}else Fa()}catch(ca){null!=N&&N(ca)}});Ga.onerror=function(Fa){null!=N&&N(Fa)};ea&&this.graph.addSvgShadow(za);this.graph.mathEnabled&&this.addMathCss(za);var Na=mxUtils.bind(this,function(){try{null!= | Base | 1 |
expressions.filters.currency = function (input, currency, digits) {
input = input.toFixed(digits);
if (currency === "EUR") {
return input + "€";
}
return input + "$";
}; | Class | 2 |
(k?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(K);null!=m&&m(K);return K});e.mathEnabled&&this.editor.addMathCss(q);if(null!=m)this.embedFonts(q,mxUtils.bind(this,function(K){x?this.editor.convertImages(K,mxUtils.bind(this,function(B){y(B)})):y(K)}));else return y(q)};EditorUi.prototype.embedFonts=function(c,e){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(c,this.editor.resolvedFontCss),
this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(c,g),e(c)}catch(k){e(c)}}))}catch(g){e(c)}}))};EditorUi.prototype.exportImage=function(c,e,g,k,m,q,v,x,A,z,L,M,n){A=null!=A?A:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var y=this.editor.graph.isSelectionEmpty();g=null!=g?g:y;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(K){this.spinner.stop();try{this.saveCanvas(K, | Class | 2 |
let onSocketData = function(chunk) {
let match;
let remainder;
headers += chunk.toString('binary');
if ((match = headers.match(/\r\n\r\n/))) {
socket.removeListener('data', onSocketData);
remainder = headers.substr(match.index + match[0].length);
headers = headers.substr(0, match.index);
if (remainder) {
socket.unshift(Buffer.from(remainder, 'binary'));
}
// proxy connection is now established
return callback(null, socket);
}
}; | Base | 1 |
0,Wa,bb,$a);Na.pageSelector=!1;Na.mathEnabled=!1;ua.checked&&(Na.isCellVisible=function(Xa){return Ha.isCellSelected(Xa)});Wa=p.getCurrentFile();null!=Wa&&(Na.title=Wa.getTitle());var ib=Na.writeHead;Na.writeHead=function(Xa){ib.apply(this,arguments);if(mxClient.IS_GC||mxClient.IS_SF)Xa.writeln('<style type="text/css">'),Xa.writeln(Editor.mathJaxWebkitCss),Xa.writeln("</style>");mxClient.IS_GC&&(Xa.writeln('<style type="text/css">'),Xa.writeln("@media print {"),Xa.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"), | Class | 2 |
c.nodeName&&(v=c.hasAttribute("max-scale")?parseFloat(c.getAttribute("max-scale")):1);c=c.nextSibling}}finally{q.endUpdate()}null!=v&&this.chromelessResize&&this.chromelessResize(!0,v)}return g};EditorUi.prototype.getCopyFilename=function(c,e){var g=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;c="";var k=g.lastIndexOf(".");0<=k&&(c=g.substring(k),g=g.substring(0,k));if(e){e=g;var m=new Date;g=m.getFullYear();k=m.getMonth()+1;var q=m.getDate(),v=m.getHours(),x=m.getMinutes();m=m.getSeconds(); | Class | 2 |
if(m||p){var O=[],V=null,U=null,Y=null,n=function(ea){W.setAttribute("disabled","disabled");for(var ta=0;ta<O.length;ta++)O[ta].className=ta==ea?"geBtn gePrimaryBtn":"geBtn"};M=!0;z=document.createElement("div");z.style.whiteSpace="nowrap";z.style.height="30px";G.appendChild(z);B=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){ya.style.display="";ka.style.display="";Z.style.left="160px";n(0);Z.scrollTop=0;Z.innerHTML="";J=0;V!=Pa&&(Pa=V,sa=U,Ma=Y,ya.innerHTML="",A(),V=null)}); | Base | 1 |
preload: path.resolve(basePath, './build/preload.js')
}
};
mainWindow = new BrowserWindow(options);
windowState.manage(mainWindow);
mainWindow.loadURL(indexURL);
initPopupsConfigurationMain(mainWindow);
setupAlwaysOnTopMain(mainWindow);
setupPowerMonitorMain(mainWindow);
setupScreenSharingMain(mainWindow, config.default.appName);
mainWindow.webContents.on('new-window', (event, url, frameName) => {
const target = getPopupTarget(url, frameName);
if (!target || target === 'browser') {
event.preventDefault();
shell.openExternal(url);
}
});
mainWindow.on('closed', () => {
mainWindow = null;
});
mainWindow.once('ready-to-show', () => {
mainWindow.show();
});
/**
* This is for windows [win32]
* so when someone tries to enter something like jitsi-meet://test
* while app is closed
* it will trigger this event below
*/
if (process.platform === 'win32') {
handleProtocolCall(process.argv.pop());
}
} | Class | 2 |
null,"Error fetching folder items")+(null!=Ca?" ("+Ca+")":""));V=!1;P.stop()}})}}function L(N){J.className=J.className.replace("odCatSelected","");J=N;J.className+=" odCatSelected"}function C(N){V||(T=null,z("search",null,null,null,N))}var D="";null==e&&(e=I,D='<div style="text-align: center;" class="odPreview"></div>');null==m&&(m=function(){var N=null;try{N=JSON.parse(localStorage.getItem("mxODPickerRecentList"))}catch(Q){}return N});null==n&&(n=function(N){if(null!=N){var Q=m()||{};delete N["@microsoft.graph.downloadUrl"]; | Class | 2 |
"boxShadow","2px 2px 3px 0px #ddd"),"..."!=A.substring(A.length-3,A.length)&&"!"!=A.charAt(A.length-1)&&(A+="..."),z.innerHTML=A,x.appendChild(z),m.status=z),this.pause=mxUtils.bind(this,function(){var L=function(){};this.active&&(L=mxUtils.bind(this,function(){this.spin(x,A)}));this.stop();return L}),z=!0);return z};var v=m.stop;m.stop=function(){v.call(this);this.active=!1;null!=m.status&&null!=m.status.parentNode&&m.status.parentNode.removeChild(m.status);m.status=null};m.pause=function(){return function(){}}; | Class | 2 |
mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxCell,["children","edges","overlays","mxTransient"],["parent","source","target"]);a.isCellCodec=function(){return!0};a.isNumericAttribute=function(b,c,d){return"value"!==c.nodeName&&mxObjectCodec.prototype.isNumericAttribute.apply(this,arguments)};a.isExcluded=function(b,c,d,e){return mxObjectCodec.prototype.isExcluded.apply(this,arguments)||e&&"value"==c&&d.nodeType==mxConstants.NODETYPE_ELEMENT};a.afterEncode=function(b,c,d){if(null!=
c.value&&c.value.nodeType==mxConstants.NODETYPE_ELEMENT){var e=d;d=mxUtils.importNode(b.document,c.value,!0);d.appendChild(e);b=e.getAttribute("id");d.setAttribute("id",b);e.removeAttribute("id")}return d};a.beforeDecode=function(b,c,d){var e=c.cloneNode(!0),f=this.getName();c.nodeName!=f?(e=c.getElementsByTagName(f)[0],null!=e&&e.parentNode==c?(mxUtils.removeWhitespace(e,!0),mxUtils.removeWhitespace(e,!1),e.parentNode.removeChild(e)):e=null,d.value=c.cloneNode(!0),c=d.value.getAttribute("id"),null!= | Base | 1 |
mxEvent.consume(H))}}catch(Q){v.handleError(Q)}mxEvent.isConsumed(H)||B.apply(this,arguments)};var F=x.connectVertex;x.connectVertex=function(H,S,U,Q,W,V,X){var p=x.getIncomingTreeEdges(H);if(d(H)){var C=c(H),I=C==mxConstants.DIRECTION_EAST||C==mxConstants.DIRECTION_WEST,T=S==mxConstants.DIRECTION_EAST||S==mxConstants.DIRECTION_WEST;return C==S||0==p.length?k(H,S):I==T?g(H):e(H,S!=mxConstants.DIRECTION_NORTH&&S!=mxConstants.DIRECTION_WEST)}return F.apply(this,arguments)};x.getSubtree=function(H){var S=
[H];!u(H)&&!d(H)||D(H)||x.traverse(H,!0,function(U,Q){var W=null!=Q&&x.isTreeEdge(Q);W&&0>mxUtils.indexOf(S,Q)&&S.push(Q);(null==Q||W)&&0>mxUtils.indexOf(S,U)&&S.push(U);return null==Q||W});return S};var G=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){G.apply(this,arguments);(u(this.state.cell)||d(this.state.cell))&&!D(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title", | Base | 1 |
mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var e=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=e){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var f=mxFreehand.prototype.NORMAL_SMOOTHING,c=null,m=[],n,v=[],d,g=!1,k=!0,l=!0,p=!0,q=!0,x=[],y=!1,A=!0,B=!1,I={size:12,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},O=!1;this.setClosedPath=function(K){g=K};this.setAutoClose=function(K){k=K};this.setAutoInsert= | Class | 2 |
export const redirectAnyRequest = response => {
const {headers: {location}} = Response.message (response);
const original = Response.request (response);
const oldUrl = Request.url (original);
const newUrl = mergeUrls (oldUrl) (location);
return (Request (Request.options (original))
(newUrl)
(Request.body (original)));
}; | Base | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.