code
stringlengths
12
2.05k
label_name
stringclasses
5 values
label
int64
0
4
Runner.prototype.failHook = function(hook, err){ this.fail(hook, err); if (this.suite.bail()) { this.emit('end'); } };
Base
1
index:J,defVal:ja.defVal,countProperty:ja.countProperty,size:ja.size},0==J%2,ja.flipBkg),E.parentNode.insertBefore(Ga,E.nextSibling),E=Ga;u.appendChild(va);ra();return u};StyleFormatPanel.prototype.addStyles=function(u){function E(ja){mxEvent.addListener(ja,"mouseenter",function(){ja.style.opacity="1"});mxEvent.addListener(ja,"mouseleave",function(){ja.style.opacity="0.5"})}var J=this.editorUi,T=J.editor.graph,N=document.createElement("div");N.style.whiteSpace="nowrap";N.style.paddingLeft="24px";
Class
2
$scope.initialize = function(customHandler) { var value = $cookies.get('requisitions_page_size'); if (value) { $scope.pageSize = value; } growl.success('Retrieving requisition ' + $scope.foreignSource + '...'); RequisitionsService.getRequisition($scope.foreignSource).then( function(requisition) { // success $scope.requisition = requisition; $scope.filteredNodes = requisition.nodes; $scope.updateFilteredNodes(); if (customHandler) { customHandler(); } }, $scope.errorHandler ); };
Base
1
mxShape.prototype.clear=function(){if(null!=this.node.ownerSVGElement)for(;null!=this.node.lastChild;)this.node.removeChild(this.node.lastChild);else this.node.style.cssText="position:absolute;"+(null!=this.cursor?"cursor:"+this.cursor+";":""),this.node.innerHTML=""};
Base
1
$scope.delete = function(foreignSource) { bootbox.confirm('Are you sure you want to remove the requisition ' + foreignSource + '?', function(ok) { if (ok) { RequisitionsService.startTiming(); RequisitionsService.deleteRequisition(foreignSource).then( function() { // success growl.success('The requisition ' + foreignSource + ' has been deleted.'); }, $scope.errorHandler ); } }); };
Compound
4
(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};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
mxText.prototype.updateValue=function(){if(mxUtils.isNode(this.value))this.node.innerHTML="",this.node.appendChild(this.value);else{var a=this.value;this.dialect!=mxConstants.DIALECT_STRICTHTML&&(a=mxUtils.htmlEntities(a,!1));a=mxUtils.replaceTrailingNewlines(a,"<div><br></div>");a=this.replaceLinefeeds?a.replace(/\n/g,"<br/>"):a;var b=null!=this.background&&this.background!=mxConstants.NONE?this.background:null,c=null!=this.border&&this.border!=mxConstants.NONE?this.border:null;if("fill"==this.overflow|| "width"==this.overflow)null!=b&&(this.node.style.backgroundColor=b),null!=c&&(this.node.style.border="1px solid "+c);else{var d="";null!=b&&(d+="background-color:"+mxUtils.htmlEntities(b)+";");null!=c&&(d+="border:1px solid "+mxUtils.htmlEntities(c)+";");a='<div style="zoom:1;'+d+"display:inline-block;_display:inline;text-decoration:inherit;padding-bottom:1px;padding-right:1px;line-height:"+(mxConstants.ABSOLUTE_LINE_HEIGHT?this.size*mxConstants.LINE_HEIGHT+"px":mxConstants.LINE_HEIGHT)+'">'+a+"</div>"}this.node.innerHTML= a;a=this.node.getElementsByTagName("div");0<a.length&&(b=this.textDirection,b==mxConstants.TEXT_DIRECTION_AUTO&&this.dialect!=mxConstants.DIALECT_STRICTHTML&&(b=this.getAutoDirection()),b==mxConstants.TEXT_DIRECTION_LTR||b==mxConstants.TEXT_DIRECTION_RTL?a[a.length-1].setAttribute("dir",b):a[a.length-1].removeAttribute("dir"))}};
Base
1
Q.marginBottom||0;R.allowGaps=Q.allowGaps||0;R.horizontal="1"==mxUtils.getValue(Q,"horizontalRack","0");R.resizeParent=!1;R.fill=!0;return R}return T.apply(this,arguments)};this.updateGlobalUrlVariables()};var B=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(u,E){return Graph.processFontStyle(B.apply(this,arguments))};var I=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(u,E,J,T,N,Q,R,Y,ba,ea,Z){I.apply(this,arguments);Graph.processFontAttributes(Z)};
Base
1
selectAll = function() { var phash = fm.cwd().hash; cwd.find('[id]:not(.'+clSelected+'):not(.elfinder-cwd-parent)').trigger(evtSelect); if (lastSearch.length) { selectedFiles = $.map(lastSearch, function(f) { return f.hash; }); } else { selectedFiles = $.map(fm.files(), function(f) { return f.phash == phash ? f.hash : null ;}); } trigger(); },
Base
1
data : {cmd : 'tmb', current : fm.cwd().hash}, preventFail : true }) .done(function(data) { if (attachThumbnails(data.images||[]) && data.tmb) { loadThumbnails(); } }); return; } tmbs = tmbs = files.splice(0, tmbNum); if (tmbs.length) { fm.request({ data : {cmd : 'tmb', targets : tmbs}, preventFail : true }) .done(function(data) { if (attachThumbnails(data.images||[])) { loadThumbnails(files); } }); } },
Base
1
mxResources.get("pageWithNumber",[k+1]));m.setAttribute("value","data:page/id,"+b.pages[k].getId());b.pages[k]==b.currentPage&&m.setAttribute("disabled","disabled");null!=l&&l.originalSrc==m.getAttribute("value")&&(m.setAttribute("selected","selected"),u=!0);g.appendChild(m)}t||null!=b.pages&&1!=b.pages.length||(D.style.display="none",c.style.display="none",g.style.display="none");var q=document.createElement("option"),v=!1,x=!1,A=function(y,K){v||null!=y&&x||(c.checked?null!=K&&K(q.selected?null: g.value):""==e.value||b.isOffline()?(L.value="",M.value="",null!=K&&K("")):(e.value=mxUtils.trim(e.value),b.loadImage(e.value,function(B){L.value=B.width;M.value=B.height;null!=K&&K(e.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));L.value="";M.value="";null!=K&&K(null)})))},z=mxUtils.bind(this,function(y){b.importFiles(y,0,0,b.maxBackgroundSize,function(K,B,F,G,N,J){e.value=K;A();e.focus()},function(){},function(K){return"image/"==K.type.substring(0,
Class
2
Client.prototype.end = function() { return this._sshstream.disconnect(DISCONNECT_REASON.BY_APPLICATION); };
Base
1
m.style.top=e+"px";m.style.left=g+"px";m.style.width=Math.max(0,q-3)+"px";m.style.height=Math.max(0,k-3)+"px";null!=c&&c.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(m):document.body.appendChild(m);return m};EditorUi.prototype.stringToCells=function(c){c=mxUtils.parseXml(c);var e=this.editor.extractGraphModel(c.documentElement);c=[];if(null!=e){var g=new mxCodec(e.ownerDocument),k=new mxGraphModel;g.decode(e,k);e=k.getChildAt(k.getRoot(),0);for(g=0;g<k.getChildCount(e);g++)c.push(k.getChildAt(e, g))}return c};EditorUi.prototype.openFileHandle=function(c,e,g,k,m){if(null!=e&&0<e.length){!this.useCanvasForExport&&/(\.png)$/i.test(e)?e=e.substring(0,e.length-4)+".drawio":/(\.pdf)$/i.test(e)&&(e=e.substring(0,e.length-4)+".drawio");var q=mxUtils.bind(this,function(x){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".drawio":e+".drawio";if("<mxlibrary"==x.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,
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); return ia};ca(F.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text"),!0,!1,null,!0,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");ca(F.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",
Base
1
Server.prototype.address = function() { return this._srv.address(); };
Base
1
u.substring(0,29)||"https://fonts.gstatic.com/"===u.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var u=new mxUrlConverter;u.updateBaseUrl();var E=u.convert,J=this;u.convert=function(T){if(null!=T){var N="http://"==T.substring(0,7)||"https://"==T.substring(0,8);N&&!navigator.onLine?T=Editor.svgBrokenImage.src:!N||T.substring(0,u.baseUrl.length)==u.baseUrl||J.crossOriginImages&&J.isCorsEnabledForUrl(T)?"chrome-extension://"==T.substring(0,19)||mxClient.IS_CHROMEAPP||(T=E.apply(this, arguments)):T=PROXY_URL+"?url="+encodeURIComponent(T)}return T};return u};Editor.createSvgDataUri=function(u){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(u)))};Editor.prototype.convertImageToDataUri=function(u,E){try{var J=!0,T=window.setTimeout(mxUtils.bind(this,function(){J=!1;E(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(u))mxUtils.get(u,mxUtils.bind(this,function(Q){window.clearTimeout(T);J&&E(Editor.createSvgDataUri(Q.getText()))}),function(){window.clearTimeout(T);
Base
1
function onGoodHandshake() { assert(false, makeMsg('Handshake should have failed')); }
Base
1
options.buttons[this.i18n(opts.accept.label)] = function() { opts.accept.callback(!!(checkbox && checkbox.prop('checked'))) complete = true; $(this).elfinderdialog('close') };
Base
1
ra([])},P?null:t)):J(P)),da=fa,ha=P}function S(fa){null!=wa&&clearTimeout(wa);13==fa.keyCode?H(Oa.value):wa=setTimeout(function(){H(Oa.value)},1E3)}var U='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" '+(c?"":'style="display: none"')+' placeholder="'+mxResources.get("search")+'"></div><div class="geTemplatesList" style="display: none"><div class="geTempDlgBack">&lt; '+mxResources.get("back")+'</div><div class="geTempDlgHLine"></div><div class="geTemplatesLbl">'+
Base
1
"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(){}};
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; }"), Xa.writeln("}"),Xa.writeln("</style>"));null!=p.editor.fontCss&&(Xa.writeln('<style type="text/css">'),Xa.writeln(p.editor.fontCss),Xa.writeln("</style>"));for(var db=Ha.getCustomFonts(),cb=0;cb<db.length;cb++){var fb=db[cb].name,eb=db[cb].url;Graph.isCssFontUrl(eb)?Xa.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(eb)+'" charset="UTF-8" type="text/css">'):(Xa.writeln('<style type="text/css">'),Xa.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(fb)+'";\nsrc: url("'+mxUtils.htmlEntities(eb)+ '");\n}'),Xa.writeln("</style>"))}};if("undefined"!==typeof MathJax){var jb=Na.renderPage;Na.renderPage=function(Xa,db,cb,fb,eb,lb){var kb=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!p.editor.useForeignObjectForMath?!0:p.editor.originalNoForeignObject;var gb=jb.apply(this,arguments);mxClient.NO_FO=kb;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:gb.className="geDisableMathJax";return gb}}Wa=null;bb=P.shapeForegroundColor;$a=P.shapeBackgroundColor;Va=P.enableFlowAnimation;
Base
1
ifDefined: function(id, defaultValue) { return 'ifDefined(' + id + ',' + this.escape(defaultValue) + ')'; },
Class
2
new Menu(mxUtils.bind(this,function(M,W){for(var U=0;U<S.length;U++)"-"==S[U]?M.addSeparator(W):V(M,W,mxResources.get(S[U])+"...",S[U])})))};EditorUi.prototype.installFormatToolbar=function(C){var D=this.editor.graph,G=document.createElement("div");G.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";D.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this, function(P,K){0<D.getSelectionCount()?(C.appendChild(G),G.innerHTML="Selected: "+D.getSelectionCount()):null!=G.parentNode&&G.parentNode.removeChild(G)}))};var z=!1;EditorUi.prototype.initFormatWindow=function(){if(!z&&null!=this.formatWindow){z=!0;this.formatWindow.window.setClosable(!1);var C=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){C.apply(this,arguments);this.minimized?(this.div.style.width="90px",this.table.style.width="90px",this.div.style.left=
Class
2
beforeSend: function (XMLHttpRequest) { $(".loading").show(); },
Base
1
urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var A=Graph.prototype.init;Graph.prototype.init=function(){function u(N){E=N}A.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var E=null;mxEvent.addListener(this.container,"mouseenter",u);mxEvent.addListener(this.container,"mousemove",u);mxEvent.addListener(this.container,"mouseleave",function(N){E=null});this.isMouseInsertPoint=function(){return null!=E};var J=this.getInsertPoint; this.getInsertPoint=function(){return null!=E?this.getPointForEvent(E):J.apply(this,arguments)};var T=this.layoutManager.getLayout;this.layoutManager.getLayout=function(N){var Q=this.graph.getCellStyle(N);if(null!=Q&&"rack"==Q.childLayout){var R=new mxStackLayout(this.graph,!1);R.gridSize=null!=Q.rackUnitSize?parseFloat(Q.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;R.marginLeft=Q.marginLeft||0;R.marginRight=Q.marginRight||0;R.marginTop=Q.marginTop||0;R.marginBottom= Q.marginBottom||0;R.allowGaps=Q.allowGaps||0;R.horizontal="1"==mxUtils.getValue(Q,"horizontalRack","0");R.resizeParent=!1;R.fill=!0;return R}return T.apply(this,arguments)};this.updateGlobalUrlVariables()};var B=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(u,E){return Graph.processFontStyle(B.apply(this,arguments))};var I=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(u,E,J,T,N,Q,R,Y,ba,ea,Z){I.apply(this,arguments);Graph.processFontAttributes(Z)};
Class
2
function Id(a,b){var c=a.split("_");return b%10===1&&b%100!==11?c[0]:b%10>=2&&4>=b%10&&(10>b%100||b%100>=20)?c[1]:c[2]}function Jd(a,b,c){var d={mm:b?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",MM:"месяц_месяца_месяцев",yy:"год_года_лет"};return"m"===c?b?"минута":"минуту":a+" "+Id(d[c],+a)}function Kd(a){return a>1&&5>a}function Ld(a,b,c,d){var e=a+" ";switch(c){case"s":return b||d?"pár sekúnd":"pár sekundami";case"m":return b?"minúta":d?"minútu":"minútou";case"mm":return b||d?e+(Kd(a)?"minúty":"minút"):e+"minútami";break;case"h":return b?"hodina":d?"hodinu":"hodinou";case"hh":return b||d?e+(Kd(a)?"hodiny":"hodín"):e+"hodinami";break;case"d":return b||d?"deň":"dňom";case"dd":return b||d?e+(Kd(a)?"dni":"dní"):e+"dňami";break;case"M":return b||d?"mesiac":"mesiacom";case"MM":return b||d?e+(Kd(a)?"mesiace":"mesiacov"):e+"mesiacmi";break;case"y":return b||d?"rok":"rokom";case"yy":return b||d?e+(Kd(a)?"roky":"rokov"):e+"rokmi"}}
Base
1
function() { let args = Array.from(arguments); let err = args.shift(); if (err) { reject(err); } else { resolve(...args); } };
Base
1
App.prototype.updateUserElement = function() { appUpdateUserElement.apply(this, arguments); if (this.userElement != null) { var elt = this.userElement; elt.style.cssText = 'position:relative;margin-right:4px;cursor:pointer;display:' + elt.style.display; elt.className = 'geToolbarButton'; elt.innerHTML = ''; elt.style.backgroundImage = 'url(' + Editor.userImage + ')'; elt.style.backgroundPosition = 'center center'; elt.style.backgroundRepeat = 'no-repeat'; elt.style.backgroundSize = '24px 24px'; elt.style.height = '24px'; elt.style.width = '24px'; elt.style.cssFloat = 'right'; elt.setAttribute('title', mxResources.get('changeUser')); if (elt.style.display != 'none') { elt.style.display = 'inline-block'; var file = this.getCurrentFile(); if (file != null && file.isRealtimeEnabled() && file.isRealtimeSupported()) { var icon = document.createElement('img'); icon.setAttribute('border', '0'); icon.style.position = 'absolute'; icon.style.left = '18px'; icon.style.top = '2px'; icon.style.width = '12px'; icon.style.height = '12px'; // icon.style.cursor = 'default'; var err = file.getRealtimeError(); var state = file.getRealtimeState(); var status = mxResources.get('realtimeCollaboration'); if (state == 1) { icon.src = Editor.syncImage; status += ' (' + mxResources.get('online') + ')'; } else { icon.src = Editor.syncProblemImage; if (err != null && err.message != null) { status += ' (' + err.message + ')'; } else { status += ' (' + mxResources.get('disconnected') + ')'; } } icon.setAttribute('title', status); elt.style.paddingRight = '4px'; elt.appendChild(icon); } } } };
Base
1
function isFormData(obj) { return toString.call(obj) === '[object FormData]'; }
Class
2
function _c(a,b,c){var d={mm:"munutenn",MM:"miz",dd:"devezh"};return a+" "+cd(d[c],a)}function ad(a){switch(bd(a)){case 1:case 3:case 4:case 5:case 9:return a+" bloaz";default:return a+" vloaz"}}function bd(a){return a>9?bd(a%10):a}function cd(a,b){return 2===b?dd(a):a}function dd(a){var b={m:"v",b:"v",d:"z"};return void 0===b[a.charAt(0)]?a:b[a.charAt(0)]+a.substring(1)}
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};
Base
1
[c,l,x])))};mxCellRenderer.registerShape("filledEdge",Da);"undefined"!==typeof StyleFormatPanel&&function(){var c=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var l=this.editorUi.getSelectionState(),x=c.apply(this,arguments);"umlFrame"==l.style.shape&&x.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return x}}();mxMarker.addMarker("dash",function(c,l,x,p,v,A,B,ha,K,xa){var na=v*(B+K+1),$a=A*(B+K+1);return function(){c.begin();
Base
1
function addGroup() { var name = $("#new_name").val(); var desc = $("#new_desc").val(); utils.disableAll(); utils.showAlert("info", "", "Adding group...", name); if (name.length === 0) { utils.showAlert("warning", "", "Warning", "Please specify a group name"); return; } $.ajax({ url: "scripts/pi-hole/php/groups.php", method: "post", dataType: "json", data: { action: "add_group", name: name, desc: desc, token: token }, success: function (response) { utils.enableAll(); if (response.success) { utils.showAlert("success", "fas fa-plus", "Successfully added group", name); $("#new_name").val(""); $("#new_desc").val(""); table.ajax.reload(); } else { utils.showAlert("error", "", "Error while adding new group", response.message); } }, error: function (jqXHR, exception) { utils.enableAll(); utils.showAlert("error", "", "Error while adding new group", jqXHR.responseText); console.log(exception); // eslint-disable-line no-console } }); }
Class
2
$scope.deleteNode = function(node) { bootbox.confirm('Are you sure you want to remove the node ' + node.nodeLabel + '?', function(ok) { if (ok) { RequisitionsService.startTiming(); RequisitionsService.deleteNode(node).then( function() { // success var index = -1; for(var i = 0; i < $scope.filteredNodes.length; i++) { if ($scope.filteredNodes[i].foreignId === node.foreignId) { index = i; } } if (index > -1) { $scope.filteredNodes.splice(index,1); } growl.success('The node ' + node.nodeLabel + ' has been deleted.'); }, $scope.errorHandler ); } }); };
Base
1
'targets' : fm.selected(), 'x' : e.originalEvent.touches[0].pageX, 'y' : e.originalEvent.touches[0].pageY }); } } }, 500));
Base
1
"geTempDlgCreateBtn geTempDlgBtnDisabled")}function z(ha,da){if(null!=J){var ca=function(pa){qa.isExternal?g(qa,function(na){la(na,pa)},ia):qa.url?mxUtils.get(TEMPLATE_PATH+"/"+qa.url,mxUtils.bind(this,function(na){200<=na.getStatus()&&299>=na.getStatus()?la(na.getText(),pa):ia()})):la(b.emptyDiagramXml,pa)},la=function(pa,na){y||b.hideDialog(!0);e(pa,na,qa,da)},ia=function(){A(mxResources.get("cannotLoad"));ma()},ma=function(){J=qa;za.className="geTempDlgCreateBtn";da&&(Ga.className="geTempDlgOpenBtn")}, qa=J;J=null;"boolean"!==typeof da&&(da=qa.isExternal&&p);1==ha?k(qa.url,qa):da?(Ga.className="geTempDlgOpenBtn geTempDlgBtnDisabled geTempDlgBtnBusy",ca()):(za.className="geTempDlgCreateBtn geTempDlgBtnDisabled geTempDlgBtnBusy",ha=null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"),ha=new FilenameDialog(b,b.defaultFilename+".drawio",mxResources.get("ok"),ca,ha,function(pa){var na=null!=pa&&0<pa.length;return na&&y?(ca(pa),!1): na},null,null,null,ma,x?null:[]),b.showDialog(ha.container,350,80,!0,!0),ha.init())}}function L(ha){za.innerHTML=mxUtils.htmlEntities(mxResources.get(Z||ha?"create":"copy"));ha=ha?"none":"";p&&(Ga.style.display=ha);for(var da=M.querySelectorAll(".geTempDlgLinkToDiagram"),ca=0;ca<da.length;ca++)da[ca].style.display=ha}function C(ha,da,ca,la,ia){ia||(aa.innerHTML="",t(),R=ha,Y=la);var ma=null;if(ca){ma=document.createElement("table");ma.className="geTempDlgDiagramsListGrid";var qa=document.createElement("tr"),
Class
2
l,v),new mxPoint(p-l,A),new mxPoint(0,A)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("singleArrow",Za);mxUtils.extend(z,mxActor);z.prototype.redrawPath=function(c,l,x,p,v){var A=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Za.prototype.arrowWidth))));l=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Za.prototype.arrowSize))));x=(v-A)/2;A=x+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/ 2;this.addPoints(c,[new mxPoint(0,v/2),new mxPoint(l,0),new mxPoint(l,x),new mxPoint(p-l,x),new mxPoint(p-l,0),new mxPoint(p,v/2),new mxPoint(p-l,v),new mxPoint(p-l,A),new mxPoint(l,A),new mxPoint(l,v)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("doubleArrow",z);mxUtils.extend(L,mxActor);L.prototype.size=.1;L.prototype.fixedSize=20;L.prototype.redrawPath=function(c,l,x,p,v){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,
Class
2
this.init=function(){function G(J){if(null!=J){var R=J.getAttribute("background");if(null==R||""==R||R==mxConstants.NONE)R=Editor.isDarkMode()?"transparent":"#ffffff";y.style.backgroundColor=R;(new mxCodec(J.ownerDocument)).decode(J,L.getModel());L.maxFitScale=1;L.fit(8);L.center()}return J}function M(J){null!=J&&(J=G(Editor.parseDiagramNode(J)));return J}mxEvent.addListener(B,"change",function(J){q=parseInt(B.value);M(C[q]);mxEvent.consume(J)});if("mxfile"==K.nodeName){var H=K.getElementsByTagName("diagram"); C=[];for(var F=0;F<H.length;F++)C.push(H[F]);0<C.length&&M(C[q]);B.innerHTML="";if(1<C.length)for(B.style.display="",F=0;F<C.length;F++)H=document.createElement("option"),mxUtils.write(H,C[F].getAttribute("name")||mxResources.get("pageWithNumber",[F+1])),H.setAttribute("value",F),F==q&&H.setAttribute("selected","selected"),B.appendChild(H);else B.style.display="none"}else G(K)};z.appendChild(B);z.appendChild(l);z.appendChild(k);z.appendChild(v);z.appendChild(f);l=mxUtils.button(mxResources.get("cancel"),
Base
1
(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="18.0.3";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
this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(d,g,k){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&& this.editor.exportToCanvas(mxUtils.bind(this,function(l,p){try{this.spinner.stop();var q=this.createImageDataUri(l,g,"png"),x=parseInt(p.getAttribute("width")),y=parseInt(p.getAttribute("height"));this.writeImageToClipboard(q,x,y,mxUtils.bind(this,function(z){this.handleError(z)}))}catch(z){this.handleError(z)}}),null,null,null,mxUtils.bind(this,function(l){this.spinner.stop();this.handleError(l)}),null,null,null!=k?k:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE, null,null,null,10,null,null,!1,null,0<d.length?d:null)}catch(l){this.handleError(l)}};EditorUi.prototype.writeImageToClipboard=function(d,g,k,l){var p=this.base64ToBlob(d.substring(d.indexOf(",")+1),"image/png");d=new ClipboardItem({"image/png":p,"text/html":new Blob(['<img src="'+d+'" width="'+g+'" height="'+k+'">'],{type:"text/html"})});navigator.clipboard.write([d])["catch"](l)};EditorUi.prototype.copyCells=function(d,g){var k=this.editor.graph;if(k.isSelectionEmpty())d.innerHTML="";else{var l=
Base
1
null!=this.linkHint&&(this.linkHint.style.visibility="")};var Za=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Za.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(c,l,x){mxShape.call(this);this.line=c;this.stroke=l;this.strokewidth=null!=x?x:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function k(){mxSwimlane.call(this)}function n(){mxCylinder.call(this)}function D(){mxCylinder.call(this)}function t(){mxActor.call(this)}function F(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxCylinder.call(this)}function g(){mxCylinder.call(this)}function m(){mxShape.call(this)}function q(){mxShape.call(this)}
Base
1
value = value.replace(/href=" *javascript\:(.*?)"/gi, function(m, $1) { return 'removed=""'; });
Base
1
0==this.hiddenTags.length)return!1;u=u.split(" ");if(u.length>this.hiddenTags.length)return!1;for(var E=0;E<u.length;E++)if(0>mxUtils.indexOf(this.hiddenTags,u[E]))return!1;return!0};Graph.prototype.getCellsForTags=function(u,E,J,T){var N=[];if(null!=u){E=null!=E?E:this.model.getDescendants(this.model.getRoot());for(var Q=0,R={},Y=0;Y<u.length;Y++)0<u[Y].length&&(R[u[Y]]=!0,Q++);for(Y=0;Y<E.length;Y++)if(J&&this.model.getParent(E[Y])==this.model.root||this.model.isVertex(E[Y])||this.model.isEdge(E[Y])){var ba= this.getTagsForCell(E[Y]),ea=!1;if(0<ba.length&&(ba=ba.split(" "),ba.length>=u.length)){for(var Z=ea=0;Z<ba.length&&ea<Q;Z++)null!=R[ba[Z]]&&ea++;ea=ea==Q}ea&&(1!=T||this.isCellVisible(E[Y]))&&N.push(E[Y])}}return N};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(u){for(var E=null,J=[],T=0;T<u.length;T++){var N=this.getTagsForCell(u[T]);J=[];if(0<N.length){N=N.split(" ");for(var Q={},
Base
1
this.complete = function (result) { if (resultsBuffer.length) { socket.emit('result', resultsBuffer) resultsBuffer = [] } socket.emit('complete', result || {}) if (this.config.clearContext) { navigateContextTo('about:blank') } else { self.updater.updateTestStatus('complete') } if (returnUrl) { if (!/^https?:\/\//.test(returnUrl)) { throw new Error( 'Security: Navigation to '.concat( returnUrl, ' was blocked to prevent malicious exploits.' ) ) } location.href = returnUrl } }
Base
1
Suite.prototype.slow = function(ms){ if (0 === arguments.length) return this._slow; if ('string' == typeof ms) ms = milliseconds(ms); debug('slow %d', ms); this._slow = ms; return this; };
Base
1
function(){return null!=q?q.readyState:3};this.getLastError=function(){return S};this.mouseListeners={startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(M,W){},mouseMove:function(M,W){var U,X=-1;return function(){clearTimeout(U);var u=this,E=arguments,J=function(){U=null;X=Date.now();M.apply(u,E)};Date.now()-X>W?J():U=setTimeout(J,W)}}(function(M,W){m(W)},200),mouseUp:function(M,W){m(W)}};l.addMouseListener(this.mouseListeners);this.shareCursorPositionListener=function(){b.isShareCursorPosition()|| c("cursor",{hide:!0})};b.addListener("shareCursorPositionChanged",this.shareCursorPositionListener);this.selectionChangeListener=function(M,W){M=function(u){return null!=u?u.id:null};var U=null!=b.currentPage?b.currentPage.getId():null,X=W.getProperty("added");W=W.getProperty("removed");c("selectionChange",{pageId:U,removed:X?X.map(M):[],added:W?W.map(M):[]})};l.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionChangeListener);this.cursorHandler=mxUtils.bind(this,function(){for(var M in y)n(y[M])});
Class
2
p&&I[T].getAttribute("data-font-src")!=C&&I[T].setAttribute("data-font-src",C)}};var n=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return n.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 p=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=p)for(var C in p)this.globalVars[C]= p[C]}catch(I){null!=window.console&&console.log("Error in vars URL parameter: "+I)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var y=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(p){var C=y.apply(this,arguments);null==C&&null!=this.globalVars&&(C=this.globalVars[p]);return C};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var p=this.themes["default-style2"];this.defaultStylesheet=
Base
1
mtime: Date.now() }); }
Base
1
!function(a,b){if(a){var c=function(){b(a.lazySizes),a.removeEventListener("lazyunveilread",c,!0)};b=b.bind(null,a,a.document),"object"==typeof module&&module.exports?b(require("lazysizes")):a.lazySizes?c():a.addEventListener("lazyunveilread",c,!0)}}("undefined"!=typeof window?window:0,function(a,b,c){"use strict";function d(c,d){var e="vimeoCallback"+j,f=b.createElement("script");c+="&callback="+e,j++,a[e]=function(b){f.parentNode.removeChild(f),delete a[e],d(b)},f.src=c,b.head.appendChild(f)}function e(a,b){d(p.replace(k,a),function(a){a&&a.thumbnail_url&&(b.style.backgroundImage="url("+a.thumbnail_url+")")}),b.addEventListener("click",f)}function f(a){var b=a.currentTarget,c=b.getAttribute("data-vimeo"),d=b.getAttribute("data-vimeoparams")||"";d&&!m.test(d)&&(d="&"+d),a.preventDefault(),b.innerHTML='<iframe src="'+q.replace(k,c)+d+'" frameborder="0" allowfullscreen="" width="640" height="390"></iframe>',b.removeEventListener("click",f)}function g(a,b){var d=b.getAttribute("data-thumb-size")||c.cfg.ytThumb||"hqdefault";b.style.backgroundImage="url("+n.replace(k,a).replace(l,d)+")",b.addEventListener("click",h)}function h(a){var b=a.currentTarget,c=b.getAttribute("data-youtube"),d=b.getAttribute("data-ytparams")||"";d&&!m.test(d)&&(d="&"+d),a.preventDefault(),b.innerHTML='<iframe src="'+o.replace(k,c)+d+'" frameborder="0" allowfullscreen="" width="640" height="390"></iframe>',b.removeEventListener("click",h)}if(b.getElementsByClassName){var i="https:"==location.protocol?"https:":"http:",j=Date.now(),k=/\{\{id}}/,l=/\{\{hqdefault}}/,m=/^&/,n=i+"//img.youtube.com/vi/{{id}}/{{hqdefault}}.jpg",o=i+"//www.youtube.com/embed/{{id}}?autoplay=1",p=i+"//vimeo.com/api/oembed.json?url=https%3A//vimeo.com/{{id}}",q=i+"//player.vimeo.com/video/{{id}}?autoplay=1";b.addEventListener("lazybeforeunveil",function(a){if(a.detail.instance==c){var b=a.target,d=b.getAttribute("data-youtube"),f=b.getAttribute("data-vimeo");d&&b&&g(d,b),f&&b&&e(f,b)}})}});
Base
1
function onReady() { assert(++state.readies <= 4, makeMsg('Wrong ready count: ' + state.readies)); }
Base
1
"6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var v=Sidebar.prototype.getTooltipOffset;Sidebar.prototype.getTooltipOffset=function(B,F){if(null==this.editorUi.sidebarWindow||mxUtils.isAncestorNode(this.editorUi.picker,B)){var G=mxUtils.getOffset(this.editorUi.picker);G.x+=this.editorUi.picker.offsetWidth+4;G.y+=B.offsetTop-F.height/2+16;return G}var N=v.apply(this,arguments);G=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);N.x+=G.x-16;N.y+=G.y;return N};var x=Menus.prototype.createPopupMenu;
Class
2
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
new mxPoint(l,v),new mxPoint(0,v)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("corner",Ka);mxUtils.extend(bb,mxActor);bb.prototype.redrawPath=function(c,l,x,p,v){c.moveTo(0,0);c.lineTo(0,v);c.end();c.moveTo(p,0);c.lineTo(p,v);c.end();c.moveTo(0,v/2);c.lineTo(p,v/2);c.end()};mxCellRenderer.registerShape("crossbar",bb);mxUtils.extend(Pa,mxActor);Pa.prototype.dx=20;Pa.prototype.dy=20;Pa.prototype.redrawPath=function(c,l,x,p,v){l=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style, "dx",this.dx))));x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,x),new mxPoint((p+l)/2,x),new mxPoint((p+l)/2,v),new mxPoint((p-l)/2,v),new mxPoint((p-l)/2,x),new mxPoint(0,x)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("tee",Pa);mxUtils.extend(Za,
Base
1
Graph.sanitizeHtml=function(b,e){return DOMPurify.sanitize(b,{ADD_ATTR:["target"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^(?:(?:https?|mailto|tel|callto|data):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i})};Graph.sanitizeSvg=function(b){return DOMPurify.sanitize(b,{IN_PLACE:!0})};
Base
1
function md(a,b,c){var d=a+" ";switch(c){case"m":return b?"jedna minuta":"jedne minute";case"mm":return d+=1===a?"minuta":2===a||3===a||4===a?"minute":"minuta";case"h":return b?"jedan sat":"jednog sata";case"hh":return d+=1===a?"sat":2===a||3===a||4===a?"sata":"sati";case"dd":return d+=1===a?"dan":"dana";case"MM":return d+=1===a?"mjesec":2===a||3===a||4===a?"mjeseca":"mjeseci";case"yy":return d+=1===a?"godina":2===a||3===a||4===a?"godine":"godina"}}function nd(a,b,c,d){var e=a;switch(c){case"s":return d||b?"néhány másodperc":"néhány másodperce";case"m":return"egy"+(d||b?" perc":" perce");case"mm":return e+(d||b?" perc":" perce");case"h":return"egy"+(d||b?" óra":" órája");case"hh":return e+(d||b?" óra":" órája");case"d":return"egy"+(d||b?" nap":" napja");case"dd":return e+(d||b?" nap":" napja");case"M":return"egy"+(d||b?" hónap":" hónapja");case"MM":return e+(d||b?" hónap":" hónapja");case"y":return"egy"+(d||b?" év":" éve");case"yy":return e+(d||b?" év":" éve")}return""}function od(a){return(a?"":"[múlt] ")+"["+ug[this.day()]+"] LT[-kor]"}
Base
1
identifier: function(name, context, create) { return function(scope, locals, assign, inputs) { var base = locals && (name in locals) ? locals : scope; if (create && create !== 1 && base && base[name] == null) { base[name] = {}; } var value = base ? base[name] : undefined; if (context) { return {context: base, name: name, value: value}; } else { return value; } }; },
Class
2
": "+H.message:""));this.hasError=!0})):M.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});G();this.refreshComments=G;y=mxUtils.bind(this,function(){function J(Q){var W=H[Q.id];if(null!=W)for(e(Q,W),W=0;null!=Q.replies&&W<Q.replies.length;W++)J(Q.replies[W])}if(this.window.isVisible()){for(var E=M.querySelectorAll(".geCommentDate"),H={},S=0;S<E.length;S++){var U=E[S];H[U.getAttribute("data-commentId")]=U}for(S=0;S<F.length;S++)J(F[S])}});setInterval(y,6E4);this.refreshCommentsTime=y;this.window=
Class
2
0;N<Q.length;N++)Q[N].parentNode.removeChild(Q[N]);p(X);X.style.opacity="0.5"}else{Q=W(K).replies;for(N=0;N<Q.length;N++)O.removeChild(Q[N]);for(N=0;N<F.length;N++)if(F[N]==K){F.splice(N,1);break}t.style.display=0==O.getElementsByTagName("div").length?"block":"none"}},function(N){l(X);b.handleError(N,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},K.isResolved));x||K.isLocked||0!=S||M(K.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(N){function Q(){var R= N.target;R.innerHTML="";K.isResolved=!K.isResolved;mxUtils.write(R,K.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var Y=K.isResolved?"none":"",ba=W(K).replies,ea=Editor.isDarkMode()?"transparent":K.isResolved?"ghostWhite":"white",Z=0;Z<ba.length;Z++){ba[Z].style.backgroundColor=ea;for(var fa=ba[Z].querySelectorAll(".geCommentAction"),aa=0;aa<fa.length;aa++)fa[aa]!=R.parentNode&&(fa[aa].style.display=Y);C||(ba[Z].style.display="none")}v()}K.isResolved?U(mxResources.get("reOpened")+
Base
1
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
function PwdAuthContext(stream, username, service, method, password, cb) { AuthContext.call(this, stream, username, service, method, cb); this.password = password; }
Base
1
function(c){var e=c.msgMarkers,g=this.remoteInvokeCallbacks[e.callbackId];if(null==g)throw Error("No callback for "+(null!=e?e.callbackId:"null"));c.error?g.error&&g.error(c.error.errResp):g.callback&&g.callback.apply(this,c.resp);this.remoteInvokeCallbacks[e.callbackId]=null};EditorUi.prototype.remoteInvoke=function(c,e,g,k,m){var q=!0,v=window.setTimeout(mxUtils.bind(this,function(){q=!1;m({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),x=mxUtils.bind(this,function(){window.clearTimeout(v);
Class
2
function parseKeyValue(/**string*/keyValue) { var obj = {}; forEach((keyValue || '').split('&'), function(keyValue) { var splitPoint, key, val; if (keyValue) { key = keyValue = keyValue.replace(/\+/g,'%20'); splitPoint = keyValue.indexOf('='); if (splitPoint !== -1) { key = keyValue.substring(0, splitPoint); val = keyValue.substring(splitPoint + 1); } key = tryDecodeURIComponent(key); if (isDefined(key)) { val = isDefined(val) ? tryDecodeURIComponent(val) : true; if (!hasOwnProperty.call(obj, key)) { obj[key] = val; } else if (isArray(obj[key])) { obj[key].push(val); } else { obj[key] = [obj[key],val]; } } } }); return obj; }
Class
2
k.scrollHeight-k.offsetHeight&&D()},mxEvent.addListener(k,"scroll",B))}}),y)});p.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(k,mxResources.get("loading"));var t=mxUtils.bind(this,function(z){var L=this.ui.spinner,C=0;this.ui.spinner.stop();var D=function(){L.spin(k,mxResources.get("loading"));C+=1},G=function(){--C;0===C&&L.stop()};null==z&&(k.innerHTML="",z=1);null!=B&&(mxEvent.removeListener(k,"scroll",B),B=null);null!=A&&null!=A.parentNode&&A.parentNode.removeChild(A);A=document.createElement("a");
Base
1
H&&!W)if("sharepoint"==R)u("site",null,H.id,H.displayName);else if("site"==R)u("subsite",null,H.id,H.name);else{var P=H.folder;H=H.remoteItem?H.remoteItem:H;var Q=(H.parentReference?H.parentReference.driveId:null)||R,S=H.id;P?u(Q,S,null,H.name):A()}}function u(P,Q,S,Y,ba){function da(Ca){N.stop();var oa=document.createElement("table");oa.className="odFileListGrid";for(var Ba=null,Ea=0,Ka=0;null!=Ca&&Ka<Ca.length;Ka++){var Fa=Ca[Ka];if(1!=ja||!Fa.webUrl||0<Fa.webUrl.indexOf("sharepoint.com/sites/")|| 0>Fa.webUrl.indexOf("sharepoint.com/")){var Ha=Fa.displayName||Fa.name,Ia=mxUtils.htmlEntities(Fa.description||Ha);ja&&(Fa.folder=2==ja?{isRoot:!0}:!0);var Ma=null!=Fa.folder;if(!g||Ma){var za=document.createElement("tr");za.className=Ea++%2?"odOddRow":"odEvenRow";var ya=document.createElement("td");ya.style.width="36px";var pa=document.createElement("img");pa.src="/images/"+(Ma?"folder.png":"file.png");pa.className="odFileImg";ya.appendChild(pa);za.appendChild(ya);ya=document.createElement("td"); Ma=document.createElement("div");Ma.className="odFileTitle";Ma.innerHTML=mxUtils.htmlEntities(Ha);Ma.setAttribute("title",Ia);ya.appendChild(Ma);za.appendChild(ya);oa.appendChild(za);null==Ba&&(Ba=za,Ba.className+=" odRowSelected",H=Fa,R=P,x||e(H));(function(fa,sa){za.addEventListener("dblclick",M);za.addEventListener("click",function(){Ba!=sa&&(Ba.className=Ba.className.replace("odRowSelected",""),Ba=sa,Ba.className+=" odRowSelected",H=fa,R=P,x||e(H))})})(Fa,za)}}}0==Ea?(Ca=document.createElement("div"), Ca.className="odEmptyFolder",Ca.innerHTML=mxUtils.htmlEntities(mxResources.get("folderEmpty",null,"Folder is empty!")),ha.appendChild(Ca)):ha.appendChild(oa);O();W=!1}if(!W){y(".odCatsList").style.display="block";y(".odFilesSec").style.display="block";null!=E&&(E.innerHTML="",E.style.top="50%");var Z=W=!0,ja=0;V=arguments;var ea=setTimeout(function(){W=Z=!1;N.stop();d(mxResources.get("timeout"))},2E4),ha=y(".odFilesList");ha.innerHTML="";N.spin(ha);switch(P){case "recent":J=[{name:mxResources.get("recent",
Base
1
g&&g(q)})):m("")};EditorUi.prototype.updateDiagram=function(c){function e(J){var E=new mxCellOverlay(J.image||m.warningImage,J.tooltip,J.align,J.valign,J.offset);E.addListener(mxEvent.CLICK,function(H,S){k.alert(J.tooltip)});return E}var g=null,k=this;if(null!=c&&0<c.length&&(g=mxUtils.parseXml(c),c=null!=g?g.documentElement:null,null!=c&&"updates"==c.nodeName)){var m=this.editor.graph,q=m.getModel();q.beginUpdate();var v=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var x=q.getCell(c.getAttribute("id"));
Base
1
N.message?N.message:mxResources.get("disconnected")));mxEvent.consume(E)}));G.setAttribute("title",F);B.style.paddingRight="4px";B.appendChild(G)}}}};var q=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){q.apply(this,arguments);if(null!=this.shareButton){var B=this.shareButton;B.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";B.className="geToolbarButton";B.innerHTML="";B.style.backgroundImage="url("+ Editor.shareImage+")";B.style.backgroundPosition="center center";B.style.backgroundRepeat="no-repeat";B.style.backgroundSize="24px 24px";B.style.height="24px";B.style.width="24px";"1"==urlParams.sketch&&(this.shareButton.style.display="none")}null!=this.buttonContainer&&(this.buttonContainer.style.marginTop="-2px",this.buttonContainer.style.paddingTop="4px")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var B=document.createElement("div");
Class
2
left = { type: AST.BinaryExpression, operator: token.text, left: left, right: this.relational() }; } return left; },
Class
2
function showUploadProgress(group, adapter, percent) { var text = ''; var opened; if (adapter || typeof group === 'string') { if (adapter) { // text += '<div class="adapter-upload-progress" data-adapter-name="' + adapter + '"'; } else { text += '<div class="group-upload-progress"'; } //text += ' data-adapter-group="' + group + '" style="position: absolute; width: 100%; height: 100%; opacity: ' + (percent ? 0.7 : 0) + '; top: 0; left: 0">'; opened = true; } else { percent = group; group = null; } //percent = 80; if (percent) { text += '<table style="height: 3px; " title="' + _('Upload') + ' ' + percent + '%" class="no-space" style="width:100%; height: 100%; opacity: 0.7">' + '<tr style="height: 100%" class="no-space">' + '<td class="no-space" style="width:' + percent + '%;background: blue"></td>' + '<td style="width:' + (100 - percent) + '%;opacity: 0.1" class="no-space"></td>' + '</tr>' + '</table>' ; } //text += percent ? '<table title="' + _('Upload') + ' ' + percent + '%" class="no-space" style="width:100%; height: 100%; opacity: 0.7"><tr style="height: 100%" class="no-space"><td class="no-space" style="width:' + percent + '%;background: blue"></td><td style="width:' + (100 - percent) + '%;opacity: 0.1" class="no-space"></td></tr></table>' : ''; if (opened) { //text += '</div>'; } return text; }
Base
1
Toolbar.prototype.setFontSize = function(value) { if (this.sizeMenu != null) { this.sizeMenu.innerHTML = ''; var div = document.createElement('div'); div.style.display = 'inline-block'; div.style.overflow = 'hidden'; div.style.textOverflow = 'ellipsis'; div.style.maxWidth = '24px'; mxUtils.write(div, value); this.sizeMenu.appendChild(div); this.appendDropDownImageHtml(this.sizeMenu); } };
Base
1
function jd(a,b,c,d){var e={s:["mõne sekundi","mõni sekund","paar sekundit"],m:["ühe minuti","üks minut"],mm:[a+" minuti",a+" minutit"],h:["ühe tunni","tund aega","üks tund"],hh:[a+" tunni",a+" tundi"],d:["ühe päeva","üks päev"],M:["kuu aja","kuu aega","üks kuu"],MM:[a+" kuu",a+" kuud"],y:["ühe aasta","aasta","üks aasta"],yy:[a+" aasta",a+" aastat"]};return b?e[c][2]?e[c][2]:e[c][1]:d?e[c][0]:e[c][1]}function kd(a,b,c,d){var e="";switch(c){case"s":return d?"muutaman sekunnin":"muutama sekunti";case"m":return d?"minuutin":"minuutti";case"mm":e=d?"minuutin":"minuuttia";break;case"h":return d?"tunnin":"tunti";case"hh":e=d?"tunnin":"tuntia";break;case"d":return d?"päivän":"päivä";case"dd":e=d?"päivän":"päivää";break;case"M":return d?"kuukauden":"kuukausi";case"MM":e=d?"kuukauden":"kuukautta";break;case"y":return d?"vuoden":"vuosi";case"yy":e=d?"vuoden":"vuotta"}return e=ld(a,d)+" "+e}function ld(a,b){return 10>a?b?kg[a]:jg[a]:a}
Base
1
EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");g.apply(this,arguments)};var k=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){k.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var l=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(C, D){null!=D.shortcut&&900>c&&!mxClient.IS_IOS?C.firstChild.nextSibling.setAttribute("title",D.shortcut):l.apply(this,arguments)};var p=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){p.apply(this,arguments);if(null!=this.userElement){var C=this.userElement;C.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+C.style.display;C.className="geToolbarButton";C.innerHTML="";C.style.backgroundImage="url("+Editor.userImage+")";C.style.backgroundPosition="center center";
Class
2
bool IsBlacklistedArg(const base::CommandLine::CharType* arg) { #if defined(OS_WIN) const auto converted = base::WideToUTF8(arg); const char* a = converted.c_str(); #else const char* a = arg; #endif static const char* prefixes[] = {"--", "-", "/"}; int prefix_length = 0; for (auto& prefix : prefixes) { if (base::StartsWith(a, prefix, base::CompareCase::SENSITIVE)) { prefix_length = strlen(prefix); break; } } if (prefix_length > 0) { a += prefix_length; std::string switch_name(a, strcspn(a, "=")); auto* iter = std::lower_bound(std::begin(kBlacklist), std::end(kBlacklist), switch_name); if (iter != std::end(kBlacklist) && switch_name == *iter) { return true; } } return false; }
Base
1
mxEvent.consume(ua))},Za=U.actions.get("zoomIn"),cb=U.actions.get("zoomOut"),Ja=U.actions.get("resetView");Q=U.actions.get("fullscreen");var Ua=U.actions.get("undo"),$a=U.actions.get("redo"),z=X("",Ua.funct,null,mxResources.get("undo")+" ("+Ua.shortcut+")",Ua,Editor.undoImage),L=X("",$a.funct,null,mxResources.get("redo")+" ("+$a.shortcut+")",$a,Editor.redoImage),M=X("",Q.funct,null,mxResources.get("fullscreen"),Q,Editor.fullscreenImage);if(null!=N){Ja=function(){ra.style.display=null!=U.pages&&("0"!= urlParams.pages||1<U.pages.length||Editor.pagesVisible)?"inline-block":"none"};var S=function(){ra.innerHTML="";if(null!=U.currentPage){mxUtils.write(ra,U.currentPage.getName());var ua=null!=U.pages?U.pages.length:1,ya=U.getPageIndex(U.currentPage);ya=null!=ya?ya+1:1;var Na=U.currentPage.getId();ra.setAttribute("title",U.currentPage.getName()+" ("+ya+"/"+ua+")"+(null!=Na?" ["+Na+"]":""))}};M.parentNode.removeChild(M);var ca=U.actions.get("delete"),ha=X("",ca.funct,null,mxResources.get("delete"),ca,
Base
1
fa,la,ra){R.addItem(la,null,mxUtils.bind(this,function(){var u=new CreateGraphDialog(O,la,ra);O.showDialog(u.container,620,420,!0,!1);u.init()}),fa)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(R,fa){for(var la=0;la<V.length;la++)"-"==V[la]?R.addSeparator(fa):Q(R,fa,mxResources.get(V[la])+"...",V[la])})))};EditorUi.prototype.installFormatToolbar=function(O){var X=this.editor.graph,ea=document.createElement("div");ea.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;"; X.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(ka,ja){0<X.getSelectionCount()?(O.appendChild(ea),ea.innerHTML="Selected: "+X.getSelectionCount()):null!=ea.parentNode&&ea.parentNode.removeChild(ea)}))};var Y=!1;EditorUi.prototype.initFormatWindow=function(){if(!Y&&null!=this.formatWindow){Y=!0;this.formatWindow.window.setClosable(!1);var O=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){O.apply(this,arguments);this.minimized?
Base
1
k.scrollHeight-k.offsetHeight&&C()},mxEvent.addListener(k,"scroll",A))}}),y)});p.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(k,mxResources.get("loading"));var M=mxUtils.bind(this,function(u){var D=this.ui.spinner,B=0;this.ui.spinner.stop();var C=function(){D.spin(k,mxResources.get("loading"));B+=1},G=function(){--B;0===B&&D.stop()};null==u&&(k.innerHTML="",u=1);null!=A&&(mxEvent.removeListener(k,"scroll",A),A=null);null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z);z=document.createElement("a");
Base
1
ta.style.width="40px";ta.style.height="12px";ta.style.marginBottom="-2px";ta.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";ta.style.backgroundPosition="top center";ta.style.backgroundRepeat="no-repeat";ta.setAttribute("title","Minimize");var Na=!1,Ca=mxUtils.bind(this,function(){S.innerHTML="";if(!Na){var za=function(Da,La,Ya){Da=X("",Da.funct,null,La,Da,Ya);Da.style.width="40px";Da.style.opacity="0.7";return wa(Da,null,"pointer")},wa=function(Da,La,Ya){null!=La&&Da.setAttribute("title", La);Da.style.cursor=null!=Ya?Ya:"default";Da.style.margin="2px 0px";S.appendChild(Da);mxUtils.br(S);return Da};wa(U.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text"),!0,!1,null,!0,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");wa(U.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",
Base
1
isExpOperator: function(ch) { return (ch === '-' || ch === '+' || this.isNumber(ch)); },
Class
2
value = value.replace(/src=" *javascript\:(.*?)"/gi, function(m, $1) { return 'removed=""'; });
Base
1
value = value.replace(/src=" *javascript\:(.*?)"/gi, function(m, $1) { return 'removed=""'; });
Base
1
getFormData(form) { let serialized = []; // Loop through each field in the form for (let i = 0; i < form.elements.length; i++) { let field = form.elements[i]; // Don't serialize a couple of field types (button and submit are important to exclude, eg. invoice preview would fail otherwise) if (!field.name || field.disabled || field.type === 'file' || field.type === 'reset' || field.type === 'submit' || field.type === 'button') { continue; } // If a multi-select, get all selections if (field.type === 'select-multiple') { for (var n = 0; n < field.options.length; n++) { if (!field.options[n].selected) { continue; } serialized.push({ name: field.name, value: field.options[n].value }); } } else if ((field.type !== 'checkbox' && field.type !== 'radio') || field.checked) { serialized.push({ name: field.name, value: field.value }); } } return serialized; }
Base
1
compare = function(dir1, dir2) { return fm.naturalCompare(dir1.name, dir2.name); },
Base
1
E);null!=T&&J.setAttribute("backgroundImage",JSON.stringify(T));J.setAttribute("math",this.graph.mathEnabled?"1":"0");J.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(T=this.graph.extFonts.map(function(N){return N.name+"^"+N.url}),J.setAttribute("extFonts",T.join("|")));return J};Editor.prototype.isDataSvg=function(u){try{var E=mxUtils.parseXml(u).documentElement.getAttribute("content");if(null!=E&&(null!=E&&"<"!=E.charAt(0)&&"%"!= E.charAt(0)&&(E=unescape(window.atob?atob(E):Base64.decode(cont,E))),null!=E&&"%"==E.charAt(0)&&(E=decodeURIComponent(E)),null!=E&&0<E.length)){var J=mxUtils.parseXml(E).documentElement;return"mxfile"==J.nodeName||"mxGraphModel"==J.nodeName}}catch(T){}return!1};Editor.prototype.extractGraphModel=function(u,E,J){return Editor.extractGraphModel.apply(this,arguments)};var f=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=
Class
2
EditorUi.lightboxHost+"/?client=1"+(null!=e?"&page="+e:"")+(m?"&edit=_blank":"")+(q?"&layers=1":"")+"');}}})(this);"),n+="cursor:pointer;"),c&&(c=parseInt(x.getAttribute("width")),m=parseInt(x.getAttribute("height")),x.setAttribute("viewBox","-0.5 -0.5 "+c+" "+m),n+="max-width:100%;max-height:"+m+"px;",x.removeAttribute("height")),""!=n&&x.setAttribute("style",n),this.editor.addFontCss(x),this.editor.graph.mathEnabled&&this.editor.addMathCss(x),v(mxUtils.getXml(x))};EditorUi.prototype.timeSince=function(c){c= Math.floor((new Date-c)/1E3);var e=Math.floor(c/31536E3);if(1<e)return e+" "+mxResources.get("years");e=Math.floor(c/2592E3);if(1<e)return e+" "+mxResources.get("months");e=Math.floor(c/86400);if(1<e)return e+" "+mxResources.get("days");e=Math.floor(c/3600);if(1<e)return e+" "+mxResources.get("hours");e=Math.floor(c/60);return 1<e?e+" "+mxResources.get("minutes"):1==e?e+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(c,e){if(null!=c){var g=null;if("diagram"==c.nodeName)g=
Class
2
Menus.prototype.init=function(){function l(n,y,K){this.ui=n;this.previousExtFonts=this.extFonts=y;this.prevCustomFonts=this.customFonts=K}f.apply(this,arguments);var d=this.editorUi,u=d.editor.graph,t=mxUtils.bind(u,u.isEnabled),D=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),c=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&
Base
1
null!=c&&null!=c.getTitle()&&c.getTitle()!=this.defaultFilename&&A.push("title="+encodeURIComponent(c.getTitle()));z&&1<g.length&&(A.push("open="+g.substring(1)),g="");return(k&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<A.length?"?"+A.join("&"):"")+g};EditorUi.prototype.createHtml=function(c,e,g,k,m,q,v,x,A,z,L,M){this.getBasenames();var n={};""!= m&&m!=mxConstants.NONE&&(n.highlight=m);"auto"!==k&&(n.target=k);z||(n.lightbox=!1);n.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||100==g||(n.zoom=g/100);g=[];v&&(g.push("pages"),n.resize=!0,null!=this.pages&&null!=this.currentPage&&(n.page=mxUtils.indexOf(this.pages,this.currentPage)));e&&(g.push("zoom"),n.resize=!0);x&&g.push("layers");A&&g.push("tags");0<g.length&&(z&&g.push("lightbox"),n.toolbar=g.join(" "));null!=L&&0<L.length&&(n.edit=L);null!=c?n.url=c:n.xml=this.getFileData(!0, null,null,null,null,!v);e='<div class="mxgraph" style="'+(q?"max-width:100%;":"")+(""!=g?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(n))+'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";M(e,'<script type="text/javascript" src="'+(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+c:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL: EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(c,e,g,k){var m=document.createElement("div");m.style.whiteSpace="nowrap";var q=document.createElement("h3");mxUtils.write(q,mxResources.get("html"));q.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";m.appendChild(q);var v=document.createElement("div");v.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var x=document.createElement("input");
Class
2
function createDefaultLogger(levels) { let levelMaxLen = 0; let levelNames = new Map(); levels.forEach(level => { if (level.length > levelMaxLen) { levelMaxLen = level.length; } }); levels.forEach(level => { let levelName = level.toUpperCase(); if (levelName.length < levelMaxLen) { levelName += ' '.repeat(levelMaxLen - levelName.length); } levelNames.set(level, levelName); }); let print = (level, entry, message, ...args) => { let prefix = ''; if (entry) { if (entry.tnx === 'server') { prefix = 'S: '; } else if (entry.tnx === 'client') { prefix = 'C: '; } if (entry.sid) { prefix = '[' + entry.sid + '] ' + prefix; } if (entry.cid) { prefix = '[#' + entry.cid + '] ' + prefix; } } message = util.format(message, ...args); message.split(/\r?\n/).forEach(line => { console.log( '[%s] %s %s', new Date() .toISOString() .substr(0, 19) .replace(/T/, ' '), levelNames.get(level), prefix + line ); }); }; let logger = {}; levels.forEach(level => { logger[level] = print.bind(null, level); }); return logger; }
Base
1
hide: function(){ isatty && process.stdout.write('\u001b[?25l'); },
Base
1
requestForm: function (url, params = {}) { app.openUrlMethodPost(url, params); }
Compound
4
function deleteClient() { var tr = $(this).closest("tr"); var id = tr.attr("data-id"); var ip = tr.find("#ip_" + id).text(); var name = tr.find("#name_" + id).text(); if (name.length > 0) { ip += " (" + name + ")"; } utils.disableAll(); utils.showAlert("info", "", "Deleting client...", ip); $.ajax({ url: "scripts/pi-hole/php/groups.php", method: "post", dataType: "json", data: { action: "delete_client", id: id, token: token }, success: function (response) { utils.enableAll(); if (response.success) { utils.showAlert("success", "far fa-trash-alt", "Successfully deleted client ", ip); table.row(tr).remove().draw(false).ajax.reload(null, false); reloadClientSuggestions(); } else { utils.showAlert("error", "", "Error while deleting client with ID " + id, response.message); } }, error: function (jqXHR, exception) { utils.enableAll(); utils.showAlert("error", "", "Error while deleting client with ID " + id, jqXHR.responseText); console.log(exception); // eslint-disable-line no-console } }); }
Class
2
var _defaultCertificateVerify = function(c, verified, depth, certs) { if(depth === 0 && verified === true) { // compare common name to url host var cn = certs[depth].subject.getField('CN'); if(cn === null || client.url.host !== cn.value) { verified = { message: 'Certificate common name does not match url host.' }; } } return verified; };
Base
1
var J=A.div.querySelector(".geCommentEditTxtArea"),E=A.div.querySelector(".geCommentEditBtns");A.comment.content=J.value;J.parentNode.removeChild(J);E.parentNode.removeChild(E)}catch(H){b.handleError(H)}M.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";x=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(H){function S(U){if(null!=U){U.sort(function(W,V){return new Date(W.modifiedDate)- new Date(V.modifiedDate)});for(var Q=0;Q<U.length;Q++)S(U[Q].replies)}}H.sort(function(U,Q){return new Date(U.modifiedDate)-new Date(Q.modifiedDate)});M.innerHTML="";M.appendChild(n);n.style.display="block";F=H;for(H=0;H<F.length;H++)S(F[H].replies),q(F[H],F,null,0,B);null!=A&&null==A.comment.id&&null==A.comment.pCommentId&&(M.appendChild(A.div),c(A.comment,A.div,A.saveCallback,A.deleteOnCancel))},mxUtils.bind(this,function(H){M.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(H&&H.message?
Base
1
this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var E=Sidebar.prototype.getTooltipOffset;Sidebar.prototype.getTooltipOffset=function(O,X){if(null==this.editorUi.sidebarWindow||mxUtils.isAncestorNode(this.editorUi.picker,O)){var ea=mxUtils.getOffset(this.editorUi.picker);ea.x+=this.editorUi.picker.offsetWidth+4;ea.y+=O.offsetTop-X.height/2+16;return ea}var ka=E.apply(this,arguments);ea=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);ka.x+= ea.x-16;ka.y+=ea.y;return ka};var C=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(O,X,ea){var ka=this.editorUi.editor.graph;O.smartSeparators=!0;C.apply(this,arguments);"1"==urlParams.sketch?ka.isEnabled()&&(O.addSeparator(),1==ka.getSelectionCount()&&this.addMenuItems(O,["-","lockUnlock"],null,ea)):1==ka.getSelectionCount()?(ka.isCellFoldable(ka.getSelectionCell())&&this.addMenuItems(O,ka.isCellCollapsed(X)?["expand"]:["collapse"],null,ea),this.addMenuItems(O,["collapsible",
Base
1
b.handleError(la,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},Y,da)}function Z(){c(aa,ua,function(la){ha()},!0)}var ea=W().pdiv,aa=b.newComment(P,b.getCurrentUser());aa.pCommentId=J.id;null==J.replies&&(J.replies=[]);var ua=q(aa,J.replies,ea,S+1);O?Z():ha()}if(U||!J.isResolved){n.style.display="none";var X=document.createElement("div");X.className="geCommentContainer";X.setAttribute("data-commentId",J.id);X.style.marginLeft=20*S+5+"px";J.isResolved&&!Editor.isDarkMode()&&
Class
2
":");var q="#0000ff",v=null;v=mxUtils.button("",mxUtils.bind(this,function(x){this.pickColor(q||"none",function(A){q=A;g()});mxEvent.consume(x)}));g();v.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";v.style.marginLeft="4px";v.style.height="22px";v.style.width="22px";v.style.position="relative";v.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";v.className="geColorBtn";c.appendChild(v);mxUtils.br(c);return{getColor:function(){return q},getTarget:function(){return k.value},
Base
1
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
(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
var callback2 = function(docList, errorMsg, searchImportCats) { i0 = 0; spinner.stop(); templates = docList; searchImportCats = searchImportCats || {}; var importListsCount = 0; for (var cat in searchImportCats) { importListsCount += searchImportCats[cat].length; } if (errorMsg) { div.innerHTML = errorMsg; } else if (docList.length == 0 && importListsCount == 0) { div.innerHTML = mxUtils.htmlEntities(mxResources.get('noDiagrams', null, 'No Diagrams Found')); } else { div.innerHTML = ''; if (importListsCount > 0) { list.style.display = ''; div.style.left = '160px'; list.innerHTML = ''; customCatCount = 0; categories = {'draw.io': docList}; for (var cat in searchImportCats) { categories[cat] = searchImportCats[cat]; } initUi(); } else { addTemplates(true); } } }
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=
Class
2
function(){g.checked&&(null==e||e.checked)?q.removeAttribute("disabled"):q.setAttribute("disabled","disabled")}));mxUtils.br(c);return{getLink:function(){return g.checked?"blank"===q.value?"_blank":m:null},getEditInput:function(){return g},getEditSelect:function(){return q}}};EditorUi.prototype.addLinkSection=function(c,e){function g(){var x=document.createElement("div");x.style.width="100%";x.style.height="100%";x.style.boxSizing="border-box";null!=q&&q!=mxConstants.NONE?(x.style.border="1px solid black", x.style.backgroundColor=q):(x.style.backgroundPosition="center center",x.style.backgroundRepeat="no-repeat",x.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");v.innerHTML="";v.appendChild(x)}mxUtils.write(c,mxResources.get("links")+":");var k=document.createElement("select");k.style.width="100px";k.style.padding="0px";k.style.marginLeft="8px";k.style.marginRight="10px";k.className="geBtn";var m=document.createElement("option");m.setAttribute("value","auto");mxUtils.write(m,mxResources.get("automatic"));
Class
2
if(jQuery)(function(jQuery){jQuery.extend(jQuery.fn,{uploadify:function(options){jQuery(this).each(function(){settings=jQuery.extend({id:jQuery(this).attr('id'),uploader:'uploadify.swf',script:'uploadify.php',expressInstall:null,folder:'',height:30,width:110,cancelImg:'cancel.png',wmode:'opaque',scriptAccess:'sameDomain',fileDataName:'Filedata',method:'POST',queueSizeLimit:999,simUploadLimit:1,queueID:false,displayData:'percentage',onInit:function(){},onSelect:function(){},onQueueFull:function(){},onCheck:function(){},onCancel:function(){},onError:function(){},onProgress:function(){},onComplete:function(){},onAllComplete:function(){}},options);var pagePath=location.pathname;pagePath=pagePath.split('/');pagePath.pop();pagePath=pagePath.join('/')+'/';var data={};data.uploadifyID=settings.id;data.pagepath=pagePath;if(settings.buttonImg)data.buttonImg=escape(settings.buttonImg);if(settings.buttonText)data.buttonText=escape(settings.buttonText);if(settings.rollover)data.rollover=true;data.script=settings.script;data.folder=escape(settings.folder);if(settings.scriptData){var scriptDataString='';for(var name in settings.scriptData){scriptDataString+='&'+name+'='+settings.scriptData[name];}
Class
2