mcanoglu/cwe-class-group huggingface dataset:
"center center",ma.style.backgroundRepeat="no-repeat",ma.style.backgroundSize="24px 24px",ma.style.width="34px",ma.innerHTML=""):ca||(ma.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",ma.style.backgroundPosition="right 6px center",ma.style.backgroundRepeat="no-repeat",ma.style.paddingRight="22px");return ma}function D(da,ca,la,ia,ma,qa){var pa=document.createElement("a");pa.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";pa.style.display="inline-block";pa.style.boxSizing=
"border-box";pa.style.height="30px";pa.style.padding="6px";pa.style.position="relative";pa.style.verticalAlign="top";pa.style.top="0px";"1"==urlParams.sketch&&(pa.style.borderStyle="none",pa.style.boxShadow="none",pa.style.padding="6px",pa.style.margin="0px");null!=F.statusContainer?S.insertBefore(pa,F.statusContainer):S.appendChild(pa);null!=qa?(pa.style.backgroundImage="url("+qa+")",pa.style.backgroundPosition="center center",pa.style.backgroundRepeat="no-repeat",pa.style.backgroundSize="24px 24px",
pa.style.width="34px"):mxUtils.write(pa,da);mxEvent.addListener(pa,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(na){na.preventDefault()}));mxEvent.addListener(pa,"click",function(na){"disabled"!=pa.getAttribute("disabled")&&ca(na);mxEvent.consume(na)});null==la&&(pa.style.marginRight="4px");null!=ia&&pa.setAttribute("title",ia);null!=ma&&(da=function(){ma.isEnabled()?(pa.removeAttribute("disabled"),pa.style.cursor="pointer"):(pa.setAttribute("disabled","disabled"),pa.style.cursor=
"default")},ma.addListener("stateChanged",da),H.addListener("enabledChanged",da),da());return pa}function G(da,ca,la){la=document.createElement("div");la.className="geMenuItem";la.style.display="inline-block";la.style.verticalAlign="top";la.style.marginRight="6px";la.style.padding="0 4px 0 4px";la.style.height="30px";la.style.position="relative";la.style.top="0px";"1"==urlParams.sketch&&(la.style.boxShadow="none");for(var ia=0;ia<da.length;ia++)null!=da[ia]&&("1"==urlParams.sketch&&(da[ia].style.padding=

// Vulnerability class: CWE-20
var D=this.editorUi,G=D.editor.graph;if(G.isEnabled()&&"1"==urlParams.sketch){var P=this.createOption(mxResources.get("sketch"),function(){return Editor.sketchMode},function(K,F){D.setSketchMode(!Editor.sketchMode);null!=F&&mxEvent.isShiftDown(F)||G.updateCellStyles({sketch:K?"1":null},G.getVerticesAndEdges())},{install:function(K){this.listener=function(){K(Editor.sketchMode)};D.addListener("sketchModeChanged",this.listener)},destroy:function(){D.removeListener(this.listener)}});C.appendChild(P)}return C};

// Vulnerability class: CWE-20
!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!=
g?"&mime="+g:"")+(null!=m?"&format="+m:"")+(null!=q?"&base64="+q:"")+(null!=e?"&filename="+encodeURIComponent(e):"")+(k?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(c,e){e=e||"";c=atob(c);for(var g=c.length,k=Math.ceil(g/1024),m=Array(k),q=0;q<k;++q){for(var v=1024*q,x=Math.min(v+1024,g),A=Array(x-v),z=0;v<x;++z,++v)A[z]=c[v].charCodeAt(0);m[q]=new Uint8Array(A)}return new Blob(m,{type:e})};EditorUi.prototype.saveLocalFile=function(c,e,g,k,m,q,v,x){q=null!=q?q:!1;v=null!=v?v:"vsdx"!=

// Vulnerability class: CWE-20
function buildConversationListItem (data) {
        var html = ''

        html +=
          '<li ng-click="loadConversation(\'' +
          data._id +
          '\');" data-conversation-id="' +
          data._id +
          '" data-updatedAt="' +
          data.updatedAt +
          '">'
        html += '<div class="profile-pic">'
        var imageUrl = 'defaultProfile.jpg'
        if (data.partner.image) {
          imageUrl = data.partner.image
        }
        html +=
          '<img src="/uploads/users/' +
          imageUrl +
          '" class="uk-border-circle profileImage" data-userid="' +
          data.partner._id +
          '" />'
        html += '<span class="user-online uk-border-circle" data-user-status-id="' + data.partner._id + '"></span>'
        html += '</div>'
        html += '<div class="convo-info">'
        html += '<span class="message-from">' + data.partner.fullname + '</span>'
        html += '<span class="message-date">' + moment(data.updatedAt).calendar() + '</span>'
        html += '<span class="message-subject">' + data.recentMessage + '</span>'
        html += '</div>'
        html += '</li>'

        return html
      }

// Vulnerability class: CWE-662
visitMixinBlock: function(block) {
    if (this.pp)
      this.buf.push(
        "pug_indent.push('" + Array(this.indents + 1).join(this.pp) + "');"
      );
    this.buf.push('block && block();');
    if (this.pp) this.buf.push('pug_indent.pop();');
  },

// Vulnerability class: CWE-74
Graph.fileSupport&&(D.addEventListener("dragover",function(v){v.stopPropagation();v.preventDefault()},!1),D.addEventListener("drop",function(v){v.stopPropagation();v.preventDefault();if(0<v.dataTransfer.files.length){v=v.dataTransfer.files[0];var x=new FileReader;x.onload=function(A){D.value=A.target.result};x.readAsText(v)}},!1));f.appendChild(c);mxEvent.addListener(c,"change",function(){var v=u();if(0==D.value.length||D.value==q)q=v,D.value=q});b.isOffline()||"mermaid"!=l&&"plantUml"!=l||(e=mxUtils.button(mxResources.get("help"),

// Vulnerability class: CWE-20
c.style.width="120px";mxUtils.write(c,mxResources.get("realtimeCollaboration")+":");u.appendChild(c);var q=document.createElement("input");q.setAttribute("type","checkbox");var v=d.isRealtimeEnabled();if(v="disabled"!=b.drive.getCustomProperty(d.desc,"collaboration"))q.setAttribute("checked","checked"),q.defaultChecked=!0;prevApply=t;t=function(){prevApply();b.hideDialog();q.checked!=v&&b.spinner.spin(document.body,mxResources.get("updatingDocument"))&&d.setRealtimeEnabled(q.checked,mxUtils.bind(this,
function(x){b.spinner.stop()}),mxUtils.bind(this,function(x){b.spinner.stop();b.showError(mxResources.get("error"),null!=x&&null!=x.error?x.error.message:mxResources.get("unknownError"),mxResources.get("ok"))}))};this.init=null!=this.init?this.init:function(){q.focus()};c=document.createElement("td");c.style.whiteSpace="nowrap";c.appendChild(q);c.appendChild(b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/2672"));u.appendChild(c);l.appendChild(u)}this.init=null!=this.init?this.init:

// Vulnerability class: CWE-20
_handleMeta: function(message, local, callback, context) {
    var method = Channel.parse(message.channel)[1],
        response;

    if (array.indexOf(this.META_METHODS, method) < 0) {
      response = this._makeResponse(message);
      response.error = Error.channelForbidden(message.channel);
      response.successful = false;
      return callback.call(context, [response]);
    }

    this[method](message, local, function(responses) {
      responses = [].concat(responses);
      for (var i = 0, n = responses.length; i < n; i++) this._advize(responses[i], message.connectionType);
      callback.call(context, responses);
    }, this);
  },

// Vulnerability class: CWE-287
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]=
u[E]}catch(J){null!=window.console&&console.log("Error in vars URL parameter: "+J)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var z=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(u){var E=z.apply(this,arguments);null==E&&null!=this.globalVars&&(E=this.globalVars[u]);return E};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var u=this.themes["default-style2"];this.defaultStylesheet=

// Vulnerability class: CWE-20
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,
m?this.getFileData(!0,null,null,null,g,x):null,A,null==this.pages||0==this.pages.length,L)}catch(B){this.handleError(B)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(K){this.spinner.stop();this.handleError(K)}),null,g,c||1,e,k,null,null,q,v,z,M,n)}catch(K){this.spinner.stop(),this.handleError(K)}}};EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.importXml=function(c,e,g,k,m,q,v){e=null!=e?e:0;g=null!=g?g:0;var x=[];try{var A=

// Vulnerability class: CWE-20
N.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(u,E){u=null!=u?u:!0;var J=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&J.setAttribute("style",this.graph.currentStyle);var T=this.graph.getBackgroundImageObject(this.graph.backgroundImage,

// Vulnerability class: CWE-20
na.style.justifyContent="center";na.style.alignItems="center";ua=document.createElement("img");ua.setAttribute("src",xa);ua.setAttribute("alt",wa);ua.style.maxWidth=Ha+"px";ua.style.maxHeight=ra+"px";Sa=ua;var Ja=xa.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");na.appendChild(ua);ua.onerror=function(){this.src!=Ja?this.src=Ja:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(na,mxUtils.bind(this,function(Ma){z(na,null,null,oa,ha,ia)}),null,null);mxEvent.addListener(na,

// Vulnerability class: CWE-20
B&&"fold"==A)&&c.moveTo(K,ha+K):c.moveTo(0,0)};Ea.prototype.lineNWInner=function(c,l,x,p,v,A,B,ha,K,xa,na){xa||na?!xa&&na?c.lineTo(K,0):xa&&!na?c.lineTo(0,K):"square"==B||"default"==B&&"square"==A?c.lineTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,ha+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(K,ha+K):c.lineTo(0,0)};Ea.prototype.paintFolds=function(c,l,x,p,v,A,B,ha,K,xa,na,$a,ib,db,Ga){if("fold"==

// Vulnerability class: CWE-20
internals.Traceroute.trace = function (host, callback) {


    Dns.lookup(host.toUpperCase(), (err) => {

        if (err && Net.isIP(host) === 0) {
            return callback(new Error('Invalid host'));
        }

        const command = (internals.isWin ? 'tracert -d ' : 'traceroute -q 1 -n ') + host;
        Child.exec(command, (err, stdout, stderr) => {

            if (err) {
                return callback(err);
            }

            const results = internals.parseOutput(stdout);
            return callback(null, results);
        });
    });
};

// Vulnerability class: CWE-74
function bindJQuery() {
  var originalCleanData;

  if (bindJQueryFired) {
    return;
  }

  // bind to jQuery if present;
  var jqName = jq();
  jQuery = isUndefined(jqName) ? window.jQuery :   // use jQuery (if present)
           !jqName             ? undefined     :   // use jqLite
                                 window[jqName];   // use jQuery specified by `ngJq`

  // Use jQuery if it exists with proper functionality, otherwise default to us.
  // Angular 1.2+ requires jQuery 1.7+ for on()/off() support.
  // Angular 1.3+ technically requires at least jQuery 2.1+ but it may work with older
  // versions. It will not work for sure with jQuery <1.7, though.
  if (jQuery && jQuery.fn.on) {
    jqLite = jQuery;
    extend(jQuery.fn, {
      scope: JQLitePrototype.scope,
      isolateScope: JQLitePrototype.isolateScope,
      controller: JQLitePrototype.controller,
      injector: JQLitePrototype.injector,
      inheritedData: JQLitePrototype.inheritedData
    });

    // All nodes removed from the DOM via various jQuery APIs like .remove()
    // are passed through jQuery.cleanData. Monkey-patch this method to fire
    // the $destroy event on all removed nodes.
    originalCleanData = jQuery.cleanData;
    jQuery.cleanData = function(elems) {
      var events;
      for (var i = 0, elem; (elem = elems[i]) != null; i++) {
        events = jQuery._data(elem, 'events');
        if (events && events.$destroy) {
          jQuery(elem).triggerHandler('$destroy');
        }
      }
      originalCleanData(elems);
    };
  } else {
    jqLite = JQLite;
  }

  angular.element = jqLite;

  // Prevent double-proxying.
  bindJQueryFired = true;
}

// Vulnerability class: CWE-74
if(p||q){var M=[],W=null,U=null,X=null,u=function(oa){V.setAttribute("disabled","disabled");for(var sa=0;sa<M.length;sa++)M[sa].className=sa==oa?"geBtn gePrimaryBtn":"geBtn"};P=!0;A=document.createElement("div");A.style.whiteSpace="nowrap";A.style.height="30px";G.appendChild(A);D=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){Ba.style.display="";fa.style.display="";Z.style.left="160px";u(0);Z.scrollTop=0;Z.innerHTML="";H=0;W!=La&&(La=W,Ca=U,Na=X,Ba.innerHTML="",C(),W=null)});

// Vulnerability class: CWE-20
function(u){var E=this.graph.getCustomFonts();if(0<E.length){var J=[],T=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var N=mxUtils.bind(this,function(){0==T&&this.embedCssFonts(J.join(""),u)}),Q=0;Q<E.length;Q++)mxUtils.bind(this,function(R,Y){Graph.isCssFontUrl(Y)?null==this.cachedGoogleFonts[Y]?(T++,this.loadUrl(Y,mxUtils.bind(this,function(ba){this.cachedGoogleFonts[Y]=ba;J.push(ba+"\n");T--;N()}),mxUtils.bind(this,function(ba){T--;J.push("@import url("+
Y+");\n");N()}))):J.push(this.cachedGoogleFonts[Y]+"\n"):J.push('@font-face {font-family: "'+R+'";src: url("'+Y+'")}\n')})(E[Q].name,E[Q].url);N()}else u()};Editor.prototype.addMathCss=function(u){u=u.getElementsByTagName("defs");if(null!=u&&0<u.length)for(var E=document.getElementsByTagName("style"),J=0;J<E.length;J++){var T=mxUtils.getTextContent(E[J]);0>T.indexOf("mxPageSelector")&&0<T.indexOf("MathJax")&&u[0].appendChild(E[J].cloneNode(!0))}};Editor.prototype.addFontCss=function(u,E){E=null!=

// Vulnerability class: CWE-20
function(c,l,x){return tb(c,["width"],l,function(p,v,A,B,ha){ha=c.shape.getEdgeWidth()*c.view.scale+x;return new mxPoint(B.x+v*p/4+A*ha/2,B.y+A*p/4-v*ha/2)},function(p,v,A,B,ha,K){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ha.x,ha.y,K.x,K.y));c.style.width=Math.round(2*p)/c.view.scale-x})},tb=function(c,l,x,p,v){return fb(c,l,function(A){var B=c.absolutePoints,ha=B.length-1;A=c.view.translate;var K=c.view.scale,xa=x?B[0]:B[ha];B=x?B[1]:B[ha-1];ha=B.x-xa.x;var na=B.y-xa.y,$a=Math.sqrt(ha*ha+na*na);xa=

// Vulnerability class: CWE-20
Conf.prototype.save = function (where, cb) {
  var target = this.sources[where]
  if (!target || !(target.path || target.source) || !target.data) {
    var er
    if (where !== 'builtin') er = new Error('bad save target: ' + where)
    if (cb) {
      process.nextTick(cb.bind(null, er))
      return this
    }
    return this.emit('error', er)
  }

  if (target.source) {
    var pref = target.prefix || ''
    Object.keys(target.data).forEach(function (k) {
      target.source[pref + k] = target.data[k]
    })
    if (cb) process.nextTick(cb)
    return this
  }

  var data = ini.stringify(target.data)

  var then = function then (er) {
    if (er) return done(er)

    fs.chmod(target.path, mode, done)
  }

  var done = function done (er) {
    if (er) {
      if (cb) return cb(er)
      else return this.emit('error', er)
    }
    this._saving --
    if (this._saving === 0) {
      if (cb) cb()
      this.emit('save')
    }
  }

  then = then.bind(this)
  done = done.bind(this)
  this._saving ++

  var mode = where === 'user' ? '0600' : '0666'
  if (!data.trim()) {
    fs.unlink(target.path, function () {
      // ignore the possible error (e.g. the file doesn't exist)
      done(null)
    })
  } else {
    correctMkdir(path.dirname(target.path), function (er) {
      if (er) return then(er)
      fs.writeFile(target.path, data, 'utf8', function (er) {
        if (er) return then(er)
        if (where === 'user' && myUid && myGid) {
          fs.chown(target.path, +myUid, +myGid, then)
        } else {
          then()
        }
      })
    })
  }

  return this
}

// Vulnerability class: CWE-732
getValidator: function (field) {
			let listOfValidators = [],
				fieldData = field.data(),
				fieldInfo = fieldData.fieldinfo;
			if (typeof fieldInfo === 'string') {
				fieldInfo = JSON.parse(fieldInfo);
			}
			let dataValidator = 'validator',
				moduleEle = field.closest('form').find('[name="module"]');
			if (Vtiger_Base_Validator_Js.moduleName === false && moduleEle.length > 0) {
				Vtiger_Base_Validator_Js.moduleName = moduleEle.val();
			}

			let fieldInstance = Vtiger_Field_Js.getInstance(fieldInfo),
				validatorsOfType = Vtiger_Base_Validator_Js.getValidatorsFromFieldType(fieldInstance),
				key,
				value;
			for (key in validatorsOfType) {
				//IE for loop fix
				if (!validatorsOfType.hasOwnProperty(key)) {
					continue;
				}
				value = validatorsOfType[key];
				if (value !== '') {
					listOfValidators.push({ name: value });
				}
			}
			if (fieldData.hasOwnProperty(dataValidator)) {
				let specialValidators = fieldData[dataValidator];
				for (key in specialValidators) {
					//IE for loop fix
					if (!specialValidators.hasOwnProperty(key)) {
						continue;
					}
					let specialValidator = specialValidators[key],
						tempSpecialValidator = jQuery.extend({}, specialValidator),
						validatorOfNames = Vtiger_Base_Validator_Js.getValidatorClassName(specialValidator.name);
					if (validatorOfNames !== '') {
						tempSpecialValidator.name = validatorOfNames;
						if (!jQuery.isEmptyObject(tempSpecialValidator)) {
							listOfValidators.push(tempSpecialValidator);
						}
					}
				}
			}
			return listOfValidators;
		},

// Vulnerability class: CWE-20
EditorUi.prototype.createPageMenuTab=function(b,f){b=this.createControlTab(3,'<div class="geSprite geSprite-dots"></div>',b);b.setAttribute("title",mxResources.get("pages"));b.style.position="absolute";b.style.marginLeft="0px";b.style.top="0px";b.style.left="1px";var l=b.getElementsByTagName("div")[0];l.style.display="inline-block";l.style.marginTop="5px";l.style.width="21px";l.style.height="21px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(d){this.editor.graph.popupMenuHandler.hideMenu();
var u=new mxPopupMenu(mxUtils.bind(this,function(c,e){var g=mxUtils.bind(this,function(){for(var v=0;v<this.pages.length;v++)mxUtils.bind(this,function(x){var A=c.addItem(this.pages[x].getName(),null,mxUtils.bind(this,function(){this.selectPage(this.pages[x])}),e),z=this.pages[x].getId();A.setAttribute("title",this.pages[x].getName()+" ("+(x+1)+"/"+this.pages.length+")"+(null!=z?" ["+z+"]":""));this.pages[x]==this.currentPage&&c.addCheckmark(A,Editor.checkmarkImage)})(v)}),k=mxUtils.bind(this,function(){c.addItem(mxResources.get("insertPage"),
null,mxUtils.bind(this,function(){this.insertPage()}),e)});f||g();if(this.editor.graph.isEnabled()){f||(c.addSeparator(e),k());var m=this.currentPage;if(null!=m){c.addSeparator(e);var q=m.getName();c.addItem(mxResources.get("removeIt",[q]),null,mxUtils.bind(this,function(){this.removePage(m)}),e);c.addItem(mxResources.get("renameIt",[q]),null,mxUtils.bind(this,function(){this.renamePage(m,m.getName())}),e);f||c.addSeparator(e);c.addItem(mxResources.get("duplicateIt",[q]),null,mxUtils.bind(this,function(){this.duplicatePage(m,
mxResources.get("copyOf",[m.getName()]))}),e)}}f&&(c.addSeparator(e),k(),c.addSeparator(e),g())}));u.div.className+=" geMenubarMenu";u.smartSeparators=!0;u.showDisabled=!0;u.autoExpand=!0;u.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(u,arguments);u.destroy()});var t=mxEvent.getClientX(d),D=mxEvent.getClientY(d);u.popup(t,D,null,d);this.setCurrentMenu(u);mxEvent.consume(d)}));return b};

// Vulnerability class: CWE-20
this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})}}),mxResources.get("enterValue"));this.ui.showDialog(P.container,300,80,!0,!1);P.init()}))),mxUtils.br(k),mxUtils.br(k));for(var G=0;G<D.length;G++)mxUtils.bind(this,function(P,K){var F=l.cloneNode();F.style.backgroundColor=0==K%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";F.appendChild(q(P.full_name,mxUtils.bind(this,function(){c=P.owner.login;

// Vulnerability class: CWE-20
action:"size_"+file.size})}catch(p){}};EditorUi.prototype.isResampleImageSize=function(d,g){g=null!=g?g:this.resampleThreshold;return d>g};EditorUi.prototype.resizeImage=function(d,g,k,l,p,q,x){p=null!=p?p:this.maxImageSize;var y=Math.max(1,d.width),A=Math.max(1,d.height);if(l&&this.isResampleImageSize(null!=x?x:g.length,q))try{var B=Math.max(y/p,A/p);if(1<B){var I=Math.round(y/B),O=Math.round(A/B),t=document.createElement("canvas");t.width=I;t.height=O;t.getContext("2d").drawImage(d,0,0,I,O);var z=
t.toDataURL();if(z.length<g.length){var L=document.createElement("canvas");L.width=I;L.height=O;var C=L.toDataURL();z!==C&&(g=z,y=I,A=O)}}}catch(D){}k(g,y,A)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,g,k){try{var l=new Image;l.onload=function(){l.width=0<l.width?l.width:120;l.height=0<l.height?l.height:120;g(l)};null!=k&&(l.onerror=k);l.src=d}catch(p){if(null!=k)k(p);else throw p;}};EditorUi.prototype.getDefaultSketchMode=

// Vulnerability class: CWE-20
!1;null!=H&&(S="1"==x.getCurrentCellStyle(H).treeMoving);return S}function t(H){var S=!1;null!=H&&(H=A.getParent(H),S=x.view.getState(H),S="tree"==(null!=S?S.style:x.getCellStyle(H)).containerType);return S}function D(H){var S=!1;null!=H&&(H=A.getParent(H),S=x.view.getState(H),x.view.getState(H),S=null!=(null!=S?S.style:x.getCellStyle(H)).childLayout);return S}function c(H){H=x.view.getState(H);if(null!=H){var S=x.getIncomingTreeEdges(H.cell);if(0<S.length&&(S=x.view.getState(S[0]),null!=S&&(S=S.absolutePoints,

// Vulnerability class: CWE-20
return P.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(u){u=decodeURIComponent(mxUtils.getValue(u.style,"enumerateValue",""));""==u&&(u=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(u)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(u){var E="1"==mxUtils.getValue(u.style,"enumerate",0);E&&null==u.secondLabel?(u.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,

// Vulnerability class: CWE-20
mxUtils.setOpacity(W,100),Q.style.visibility="",V.stop(),S())}))}else S();B.appendChild(U);++F==m&&(mxUtils.br(B),F=0)}function M(N){var J=y.value;if(null==N||null!=J&&0<J.length)z&&b.hideDialog(),l(J,N,y)}k="1"==urlParams.noDevice?!1:k;D=null!=D?D:!0;c=null!=c?c:!0;m=null!=m?m:4;z=null!=z?z:!0;t=document.createElement("div");t.style.whiteSpace="nowrap";null==d&&b.addLanguageMenu(t);var n=document.createElement("h2");mxUtils.write(n,u||mxResources.get("create"));n.style.marginTop="0px";n.style.marginBottom=

// Vulnerability class: CWE-20
this.menus.addPopupMenuEditItems=function(D,G,P){d.editor.graph.isSelectionEmpty()?B.apply(this,arguments):d.menus.addMenuItems(D,"delete - cut copy copyAsImage - duplicate".split(" "),null,P)}}d.actions.get("print").funct=function(){d.showDialog((new PrintDialog(d)).container,360,null!=d.pages&&1<d.pages.length?470:390,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var I=g.getExportVariables;g.getExportVariables=function(){var D=I.apply(this,arguments),G=d.getCurrentFile();null!=
G&&(D.filename=G.getTitle());D.pagecount=null!=d.pages?d.pages.length:1;D.page=null!=d.currentPage?d.currentPage.getName():"";D.pagenumber=null!=d.pages&&null!=d.currentPage?mxUtils.indexOf(d.pages,d.currentPage)+1:1;return D};var O=g.getGlobalVariable;g.getGlobalVariable=function(D){var G=d.getCurrentFile();return"filename"==D&&null!=G?G.getTitle():"page"==D&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==D?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:

// Vulnerability class: CWE-20
pa=ma.scale;ma.scale=1;var ua=btoa(unescape(encodeURIComponent(ma.createSvgGrid(ma.gridColor))));ma.scale=pa;ua="data:image/svg+xml;base64,"+ua;var ya=Ba.gridSize*ma.gridSteps*oa,Fa=Ba.getGraphBounds(),Ma=ma.translate.x*pa,Oa=ma.translate.y*pa,Qa=Ma+(Fa.x-Ma)/pa-ta,Ta=Oa+(Fa.y-Oa)/pa-ta,za=new Image;za.onload=function(){try{for(var wa=-Math.round(ya-mxUtils.mod((Ma-Qa)*oa,ya)),Ea=-Math.round(ya-mxUtils.mod((Oa-Ta)*oa,ya));wa<T;wa+=ya)for(var Da=Ea;Da<ca;Da+=ya)ia.drawImage(za,wa/oa,Da/oa);L()}catch(La){null!=
S&&S(La)}};za.onerror=function(wa){null!=S&&S(wa)};za.src=ua}else L()}catch(wa){null!=S&&S(wa)}});Za.onerror=function(L){null!=S&&S(L)};Aa&&this.graph.addSvgShadow(Pa);this.graph.mathEnabled&&this.addMathCss(Pa);var z=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(Pa,this.resolvedFontCss),Za.src=Editor.createSvgDataUri(mxUtils.getXml(Pa))}catch(L){null!=S&&S(L)}});this.embedExtFonts(mxUtils.bind(this,function(L){try{null!=L&&this.addFontCss(Pa,L),this.loadFonts(z)}catch(M){null!=

// Vulnerability class: CWE-20
E.createStatusContainer();E.statusContainer.style.position="relative";E.statusContainer.style.maxWidth="";E.statusContainer.style.marginTop="7px";E.statusContainer.style.marginLeft="6px";E.statusContainer.style.color="gray";E.statusContainer.style.cursor="default";var W=E.hideCurrentMenu;E.hideCurrentMenu=function(){W.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var V=E.descriptorChanged;E.descriptorChanged=function(){V.apply(this,arguments);var ca=E.getCurrentFile();if(null!=

// Vulnerability class: CWE-20
digest: hash(TEST_DATA, 'sha512'),
      // Options must use VCHAR
      options: ['\x01']
    }]
  }
  t.equal(
    ssri.stringify(sriLike, {strict: true}),
    `sha256-${hash(TEST_DATA, 'sha256')}?foo`,
    'entries that do not conform to strict spec interpretation removed'
  )
  t.equal(
    ssri.stringify('sha512-foo sha256-bar', {sep: ' \r|\n\t', strict: true}),
    'sha512-foo \r \n\tsha256-bar',
    'strict mode replaces non-whitespace characters in separator with space'
  )
  t.done()
})

// Vulnerability class: CWE-400
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();

// Vulnerability class: CWE-20
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",

// Vulnerability class: CWE-20
watchFns: function() {
    var result = [];
    var fns = this.state.inputs;
    var self = this;
    forEach(fns, function(name) {
      result.push('var ' + name + '=' + self.generateFunction(name, 's'));
    });
    if (fns.length) {
      result.push('fn.inputs=[' + fns.join(',') + '];');
    }
    return result.join('');
  },

// Vulnerability class: CWE-74
"240px";C.formatElt.style.borderLeft="1px solid gray";C.formatElt.style.right="0px";C.addListener("darkModeChanged",mxUtils.bind(this,function(){K.refresh()}))}G=C.diagramContainer.parentNode;null!=C.formatElt.parentNode?(C.formatElt.parentNode.removeChild(C.formatElt),G.style.right="0px"):(G.parentNode.appendChild(C.formatElt),G.style.right=C.formatElt.style.width)}}function e(C,D){function G(H,S){var V=C.menus.get(H);H=F.addMenu(S,mxUtils.bind(this,function(){V.funct.apply(this,arguments)}));H.style.cssText=
"position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;";H.className="geTitle";D.appendChild(H);return H}var P=document.createElement("div");P.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";P.className="geTitle";var K=document.createElement("span");K.style.fontSize="18px";K.style.marginRight="5px";

// Vulnerability class: CWE-20
function toJsonReplacer(key, value) {
  var val = value;

  if (typeof key === 'string' && key.charAt(0) === '$' && key.charAt(1) === '$') {
    val = undefined;
  } else if (isWindow(value)) {
    val = '$WINDOW';
  } else if (value &&  window.document === value) {
    val = '$DOCUMENT';
  } else if (isScope(value)) {
    val = '$SCOPE';
  }

  return val;
}

// Vulnerability class: CWE-74
t)for(D=0;D<t.length;D++)t[D].node.style.visibility=d?"visible":"hidden"};var l=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){l.call(this);var d=this.guidesArrVer,u=this.guidesArrHor;if(null!=d){for(var t=0;t<d.length;t++)d[t].destroy();this.guidesArrVer=null}if(null!=u){for(t=0;t<u.length;t++)u[t].destroy();this.guidesArrHor=null}}})();function mxRuler(b,f,l,d){function u(){var n=b.diagramContainer;m.style.top=n.offsetTop-e+"px";m.style.left=n.offsetLeft-e+"px";m.style.width=(l?0:n.offsetWidth)+e+"px";m.style.height=(l?n.offsetHeight:0)+e+"px"}function t(n,y,K){if(null!=D)return n;var B;return function(){var F=this,G=arguments,N=K&&!B;clearTimeout(B);B=setTimeout(function(){B=null;K||n.apply(F,G)},y);N&&n.apply(F,G)}}var D=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,

// Vulnerability class: CWE-20
var GoogleSitesDialog=function(b,f){function l(){var F=null!=B&&null!=B.getTitle()?B.getTitle():this.defaultFilename;if(y.checked&&""!=q.value){var G="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(q.value));null!=F&&(G+="&title="+encodeURIComponent(F));0<K.length&&(G+="&s="+K);""!=v.value&&"0"!=v.value&&(G+="&border="+v.value);""!=m.value&&(G+="&height="+m.value);G+="&pan="+(x.checked?"1":"0");G+="&zoom="+(A.checked?"1":"0");G+="&fit="+(n.checked?"1":"0");
G+="&resize="+(M.checked?"1":"0");G+="&x0="+Number(k.value);G+="&y0="+e;u.mathEnabled&&(G+="&math=1");L.checked?G+="&edit=_blank":z.checked&&(G+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));g.value=G}else B.constructor==DriveFile||B.constructor==DropboxFile?(G="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=q.value?G+=encodeURIComponent(mxUtils.htmlEntities(q.value))+"&type=3":(G+=B.getHash().substring(1),G=B.constructor==DropboxFile?G+"&type=2":G+"&type=1"),null!=
F&&(G+="&title="+encodeURIComponent(F)),""!=m.value&&(F=parseInt(m.value)+parseInt(k.value),G+="&height="+F),g.value=G):g.value=""}var d=document.createElement("div"),u=b.editor.graph,t=u.getGraphBounds(),D=u.view.scale,c=Math.floor(t.x/D-u.view.translate.x),e=Math.floor(t.y/D-u.view.translate.y);mxUtils.write(d,mxResources.get("googleGadget")+":");mxUtils.br(d);var g=document.createElement("input");g.setAttribute("type","text");g.style.marginBottom="8px";g.style.marginTop="2px";g.style.width="410px";

// Vulnerability class: CWE-20
function getCredentialsByURI (uri) {
  assert(uri && typeof uri === 'string', 'registry URL is required')
  var nerfed = toNerfDart(uri)
  var defnerf = toNerfDart(this.get('registry'))

  // hidden class micro-optimization
  var c = {
    scope: nerfed,
    token: undefined,
    password: undefined,
    username: undefined,
    email: undefined,
    auth: undefined,
    alwaysAuth: undefined
  }

  if (this.get(nerfed + ':_authToken')) {
    c.token = this.get(nerfed + ':_authToken')
    // the bearer token is enough, don't confuse things
    return c
  }

  // Handle the old-style _auth=<base64> style for the default
  // registry, if set.
  //
  // XXX(isaacs): Remove when npm 1.4 is no longer relevant
  var authDef = this.get('_auth')
  var userDef = this.get('username')
  var passDef = this.get('_password')
  if (authDef && !(userDef && passDef)) {
    authDef = new Buffer(authDef, 'base64').toString()
    authDef = authDef.split(':')
    userDef = authDef.shift()
    passDef = authDef.join(':')
  }

  if (this.get(nerfed + ':_password')) {
    c.password = new Buffer(this.get(nerfed + ':_password'), 'base64').toString('utf8')
  } else if (nerfed === defnerf && passDef) {
    c.password = passDef
  }

  if (this.get(nerfed + ':username')) {
    c.username = this.get(nerfed + ':username')
  } else if (nerfed === defnerf && userDef) {
    c.username = userDef
  }

  if (this.get(nerfed + ':email')) {
    c.email = this.get(nerfed + ':email')
  } else if (this.get('email')) {
    c.email = this.get('email')
  }

  if (this.get(nerfed + ':always-auth') !== undefined) {
    var val = this.get(nerfed + ':always-auth')
    c.alwaysAuth = val === 'false' ? false : !!val
  } else if (this.get('always-auth') !== undefined) {
    c.alwaysAuth = this.get('always-auth')
  }

  if (c.username && c.password) {
    c.auth = new Buffer(c.username + ':' + c.password).toString('base64')
  }

  return c
}

// Vulnerability class: CWE-200
null==ha&&null!=l&&(ha=new mxPoint(l.getCenterX(),l.getCenterY()));null==B&&null!=x&&(B=new mxPoint(x.getCenterX(),x.getCenterY()));var K=rb.x,xa=rb.y,na=zb.x,$a=zb.y,ib="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=B&&null!=ha){c=function(Ga,Ja,Ia){Ga-=db.x;var Ha=Ja-db.y;Ja=($a*Ga-na*Ha)/(K*$a-xa*na);Ga=(xa*Ga-K*Ha)/(xa*na-K*$a);ib?(Ia&&(db=new mxPoint(db.x+K*Ja,db.y+xa*Ja),v.push(db)),db=new mxPoint(db.x+na*Ga,db.y+$a*Ga)):(Ia&&(db=new mxPoint(db.x+na*Ga,db.y+$a*Ga),v.push(db)),
db=new mxPoint(db.x+K*Ja,db.y+xa*Ja));v.push(db)};var db=ha;null==p&&(p=new mxPoint(ha.x+(B.x-ha.x)/2,ha.y+(B.y-ha.y)/2));c(p.x,p.y,!0);c(B.x,B.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var nb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,l){if(l==mxEdgeStyle.IsometricConnector){var x=new mxElbowEdgeHandler(c);x.snapToTerminals=!1;return x}return nb.apply(this,arguments)};t.prototype.constraints=[];F.prototype.getConstraints=

// Vulnerability class: CWE-20
completeUpgrade(key, extensions, req, socket, head, cb) {
    //
    // Destroy the socket if the client has already sent a FIN packet.
    //
    if (!socket.readable || !socket.writable) return socket.destroy();

    if (socket[kWebSocket]) {
      throw new Error(
        'server.handleUpgrade() was called more than once with the same ' +
          'socket, possibly due to a misconfiguration'
      );
    }

    const digest = createHash('sha1')
      .update(key + GUID)
      .digest('base64');

    const headers = [
      'HTTP/1.1 101 Switching Protocols',
      'Upgrade: websocket',
      'Connection: Upgrade',
      `Sec-WebSocket-Accept: ${digest}`
    ];

    const ws = new WebSocket(null);
    let protocol = req.headers['sec-websocket-protocol'];

    if (protocol) {
      protocol = protocol.trim().split(/ *, */);

      //
      // Optionally call external protocol selection handler.
      //
      if (this.options.handleProtocols) {
        protocol = this.options.handleProtocols(protocol, req);
      } else {
        protocol = protocol[0];
      }

      if (protocol) {
        headers.push(`Sec-WebSocket-Protocol: ${protocol}`);
        ws._protocol = protocol;
      }
    }

    if (extensions[PerMessageDeflate.extensionName]) {
      const params = extensions[PerMessageDeflate.extensionName].params;
      const value = format({
        [PerMessageDeflate.extensionName]: [params]
      });
      headers.push(`Sec-WebSocket-Extensions: ${value}`);
      ws._extensions = extensions;
    }

    //
    // Allow external modification/inspection of handshake headers.
    //
    this.emit('headers', headers, req);

    socket.write(headers.concat('\r\n').join('\r\n'));
    socket.removeListener('error', socketOnError);

    ws.setSocket(socket, head, this.options.maxPayload);

    if (this.clients) {
      this.clients.add(ws);
      ws.on('close', () => this.clients.delete(ws));
    }

    cb(ws, req);
  }

// Vulnerability class: CWE-400
arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var H=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){H.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(u){"data:action/json,"==u.substring(0,17)&&(u=JSON.parse(u.substring(17)),null!=
u.actions&&this.executeCustomActions(u.actions))};Graph.prototype.executeCustomActions=function(u,E){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var J=!1,T=0,N=0,Q=mxUtils.bind(this,function(){J||(J=!0,this.model.beginUpdate())}),R=mxUtils.bind(this,

// Vulnerability class: CWE-20
!mxClient.IS_IE11)&&this.addMenuItems(M,["toggleDarkMode"],W);M.addSeparator(W)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(M,W){C.menus.addMenuItems(M,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),W)})));mxUtils.bind(this,function(){var M=this.get("insert"),W=M.funct;M.funct=function(U,X){"1"==urlParams.sketch?(C.insertTemplateEnabled&&!C.isOffline()&&C.menus.addMenuItems(U,["insertTemplate"],X),C.menus.addMenuItems(U,["insertImage",
"insertLink","-"],X),C.menus.addSubmenu("insertLayout",U,X,mxResources.get("layout")),C.menus.addSubmenu("insertAdvanced",U,X,mxResources.get("advanced"))):(W.apply(this,arguments),C.menus.addSubmenu("table",U,X))}})();var S="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),V=function(M,W,U,X){M.addItem(U,null,mxUtils.bind(this,function(){var u=new CreateGraphDialog(C,U,X);C.showDialog(u.container,620,420,!0,!1);u.init()}),W)};this.put("insertLayout",

// Vulnerability class: CWE-20
"",ea=0;ea<g.length;ea++)aa=document.createElement("option"),mxUtils.write(aa,g[ea].getAttribute("name")||mxResources.get("pageWithNumber",[ea+1])),aa.setAttribute("value",ea),ea==k&&aa.setAttribute("selected","selected"),Q.appendChild(aa);W=function(){try{var Fa=parseInt(Q.value);k=e=Fa;la(g[Fa])}catch(xa){Q.value=e,b.handleError(xa)}}}else Aa(ua);ea=R.lastModifyingUserName;null!=ea&&20<ea.length&&(ea=ea.substring(0,20)+"...");H.innerHTML="";mxUtils.write(H,(null!=ea?ea+" ":"")+Y.toLocaleDateString()+

// Vulnerability class: CWE-20
mxUtils.bind(this,function(){0===C&&(c=U.full_path,m=J.path,v="",O(null,!0))})));k.appendChild(E)})(X[u])}}));G()}else G(),mxUtils.write(k,mxResources.get("noFiles"));100==V.length&&(k.appendChild(A),B=function(){k.scrollTop>=k.scrollHeight-k.offsetHeight&&P()},mxEvent.addListener(k,"scroll",B))}),y)}}))});b?this.user?t():this.updateUser(function(){t()},y,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){t()},y,!0)}),y)};GitLabClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+
"?doLogout=1&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname));this.clearPersistentToken();this.setUser(null);b=null;this.setToken(null)}})();DrawioComment=function(b,e,f,c,m,n,v){this.file=b;this.id=e;this.content=f;this.modifiedDate=c;this.createdDate=m;this.isResolved=n;this.user=v;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,f,c,m){e()};DrawioComment.prototype.editComment=function(b,e,f){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DriveComment=function(b,e,f,c,m,n,v,d){DrawioComment.call(this,b,e,f,c,m,n,v);this.pCommentId=d};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(b,e,f,c,m){b={content:b.content};c?b.verb="resolve":m&&(b.verb="reopen");this.file.ui.drive.executeRequest({url:"/files/"+this.file.getId()+"/comments/"+this.id+"/replies",params:b,method:"POST"},mxUtils.bind(this,function(n){e(n.replyId)}),f)};

// Vulnerability class: CWE-20
"120px",k.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",k.style.backgroundPosition="center 65%",k.style.backgroundRepeat="no-repeat",D=document.createElement("div"),D.style.position="absolute",D.style.width="420px",D.style.top="58%",D.style.textAlign="center",D.style.fontSize="18px",D.style.color="#a0c3ff",mxUtils.write(D,mxResources.get("dragImagesHere")),k.appendChild(D));k.appendChild(c);this.container=k},LinkDialog=function(b,f,l,d,u,t,D){function c(n,y,K){K=mxUtils.button("",K);
K.className="geBtn";K.setAttribute("title",y);y=document.createElement("img");y.style.height="26px";y.style.width="26px";y.setAttribute("src",n);K.style.minWidth="42px";K.style.verticalAlign="middle";K.appendChild(y);M.appendChild(K)}var e=document.createElement("div");e.style.height="100%";mxUtils.write(e,mxResources.get("editLink")+":");var g=document.createElement("div");g.className="geTitle";g.style.backgroundColor="transparent";g.style.borderColor="transparent";g.style.whiteSpace="nowrap";g.style.textOverflow=

// Vulnerability class: CWE-20
"6px",P.style.paddingLeft="6px",P.style.height="32px",P.style.left="50%");D.appendChild(C.sidebar.container);D.style.overflow="hidden"}function f(C,D){if(EditorUi.windowed){var G=C.editor.graph;G.popupMenuHandler.hideMenu();if(null==C.sidebarWindow){D=Math.min(G.container.clientWidth-10,218);var P="1"==urlParams.embedInline?650:Math.min(G.container.clientHeight-40,650);C.sidebarWindow=new n(C,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&
"1"!=urlParams.embedInline?Math.max(30,(G.container.clientHeight-P)/2):56,D-6,P-6,function(K){e(C,K)});C.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){C.sidebarWindow.window.fit()}));C.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);C.sidebarWindow.window.setVisible(!0);C.getLocalData("sidebar",function(K){C.sidebar.showEntries(K,null,!0)});C.restoreLibraries()}else C.sidebarWindow.window.setVisible(null!=D?D:!C.sidebarWindow.window.isVisible())}else null==
C.sidebarElt&&(C.sidebarElt=m(),e(C,C.sidebarElt),C.sidebarElt.style.border="none",C.sidebarElt.style.width="210px",C.sidebarElt.style.borderRight="1px solid gray"),G=C.diagramContainer.parentNode,null!=C.sidebarElt.parentNode?(C.sidebarElt.parentNode.removeChild(C.sidebarElt),G.style.left="0px"):(G.parentNode.appendChild(C.sidebarElt),G.style.left=C.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=

// Vulnerability class: CWE-20
!this.editor.editable&&(A.getHash=function(){return"G"+x},window.location.hash="#"+A.getHash());null!=d&&d()}));return!0}return!1});!v()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",v);return!0});this.loadTemplate(k,mxUtils.bind(this,function(v){this.spinner.stop();if(null!=v&&0<v.length){var x=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var A=k,z=k.lastIndexOf("."),L=A.lastIndexOf("/");z>L&&0<L&&(A=A.substring(L+1,z),z=k.substring(z),

// Vulnerability class: CWE-20
[H];!m(H)&&!c(H)||v(H)||y.traverse(H,!0,function(V,M){var W=null!=M&&y.isTreeEdge(M);W&&0>mxUtils.indexOf(S,M)&&S.push(M);(null==M||W)&&0>mxUtils.indexOf(S,V)&&S.push(V);return null==M||W});return S};var G=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){G.apply(this,arguments);(m(this.state.cell)||c(this.state.cell))&&!v(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title",
"Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(H){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(H),mxEvent.getClientY(H),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(H);
this.graph.isMouseDown=!0;x.hoverIcons.reset();mxEvent.consume(H)})))};var P=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){P.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var K=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(H){K.apply(this,

// Vulnerability class: CWE-20
setTimeout(function(){Fa.style.display="none"},4E3)}function B(){null!=X&&(X.style.fontWeight="normal",X.style.textDecoration="none",u=X,X=null)}function I(ha,da,ca,la,ia,ma,qa){if(-1<ha.className.indexOf("geTempDlgRadioBtnActive"))return!1;ha.className+=" geTempDlgRadioBtnActive";M.querySelector(".geTempDlgRadioBtn[data-id="+la+"]").className="geTempDlgRadioBtn "+(qa?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");M.querySelector("."+da).src="/images/"+ca+"-sel.svg";M.querySelector("."+ia).src=
"/images/"+ma+".svg";return!0}function O(ha,da,ca,la){function ia(na,Ka){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(Ia){200<=Ia.getStatus()&&299>=Ia.getStatus()&&(qa=Ia.getText());Ka(qa)}))):Ka(qa)}function ma(na,Ka,Ia){if(null!=na&&mxUtils.isAncestorNode(document.body,da)&&(na=mxUtils.parseXml(na),na=Editor.extractGraphModel(na.documentElement,!0),null!=na)){"mxfile"==

// Vulnerability class: CWE-20
y={},A=1,B={},I={},O={},t={},z,L={},C={},D=!0,G=!1,P=!1,K="0"!=urlParams["no-p2p"],F=!1,H=0,S=null,V=mxUtils.bind(this,function(M,W){if(!P)try{null!=q?(q.send(JSON.stringify({action:M,msg:W})),K||EditorUi.debug("P2PCollab: sending to socket server",[M],[W])):this.joinFile(!0)}catch(U){S=U,e.file.fireEvent(new mxEventObject("realtimeStateChanged")),EditorUi.debug("P2PCollab:","sendReply error",arguments,U)}});this.sendMessage=c;this.sendDiff=function(M){this.sendMessage("diff",{patch:M})};this.getState=

// Vulnerability class: CWE-20