code
stringlengths
12
2.05k
label_name
stringclasses
5 values
label
int64
0
4
Manager.prototype.handleHandshake = function (data, req, res) { var self = this , origin = req.headers.origin , headers = { 'Content-Type': 'text/plain' }; function writeErr (status, message) { if (data.query.jsonp && jsonpolling_re.test(data.query.jsonp)) { res.writeHead(200, { 'Content-Type': 'application/javascript' }); res.end('io.j[' + data.query.jsonp + '](new Error("' + message + '"));'); } else { res.writeHead(status, headers); res.end(message); } }; function error (err) { writeErr(500, 'handshake error'); self.log.warn('handshake error ' + err); }; if (!this.verifyOrigin(req)) { writeErr(403, 'handshake bad origin'); return; } var handshakeData = this.handshakeData(data); if (origin) { // https://developer.mozilla.org/En/HTTP_Access_Control headers['Access-Control-Allow-Origin'] = origin; headers['Access-Control-Allow-Credentials'] = 'true'; } this.authorize(handshakeData, function (err, authorized, newData) { if (err) return error(err); if (authorized) { var id = self.generateId() , hs = [ id , self.enabled('heartbeats') ? self.get('heartbeat timeout') || '' : '' , self.get('close timeout') || '' , self.transports(data).join(',') ].join(':'); if (data.query.jsonp && jsonpolling_re.test(data.query.jsonp)) { hs = 'io.j[' + data.query.jsonp + '](' + JSON.stringify(hs) + ');'; res.writeHead(200, { 'Content-Type': 'application/javascript' }); } else { res.writeHead(200, headers); } res.end(hs); self.onHandshake(id, newData || handshakeData); self.store.publish('handshake', id, newData || handshakeData); self.log.info('handshake authorized', id); } else { writeErr(403, 'handshake unauthorized'); self.log.info('handshake unauthorized'); } }) };
Class
2
v*x.width+A),x.y+x.height-p)},function(x,p){var v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ja.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(x.width,p.x-x.x-v*x.width)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},internalStorage:function(c){var l=[fb(c,["dx","dy"],function(x){var p=Math.max(0,Math.min(x.width,mxUtils.getValue(this.state.style,"dx",ab.prototype.dx))),v=Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style, "dy",ab.prototype.dy)));return new mxPoint(x.x+p,x.y+v)},function(x,p){this.state.style.dx=Math.round(Math.max(0,Math.min(x.width,p.x-x.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(x.height,p.y-x.y)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},module:function(c){return[fb(c,["jettyWidth","jettyHeight"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"jettyWidth",va.prototype.jettyWidth))),p=Math.max(0,Math.min(l.height,
Base
1
setup: function () { var data = this.model.get('data') || {}; this.emailId = data.emailId; this.emailName = data.emailName; if ( this.parentModel && (this.model.get('parentType') == this.parentModel.name && this.model.get('parentId') == this.parentModel.id) ) { if (this.model.get('post')) { this.createField('post', null, null, 'views/stream/fields/post'); this.hasPost = true; } if ((this.model.get('attachmentsIds') || []).length) { this.createField('attachments', 'attachmentMultiple', {}, 'views/stream/fields/attachment-multiple'); this.hasAttachments = true; } } this.messageData['email'] = '<a href="#Email/view/' + data.emailId + '">' + data.emailName + '</a>'; this.messageName = 'emailReceived'; if (data.isInitial) { this.messageName += 'Initial'; } if (data.personEntityId) { this.messageName += 'From'; this.messageData['from'] = '<a href="#'+data.personEntityType+'/view/' + data.personEntityId + '">' + data.personEntityName + '</a>'; } if (this.model.get('parentType') === data.personEntityType && this.model.get('parentId') == data.personEntityId) { this.isThis = true; } if (this.isThis) { this.messageName += 'This'; } this.createMessage(); },
Base
1
"4px";oa.style.margin="2px";oa.style.border="1px solid black";oa.style.background=ta&&"none"!=ta?ta:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(Z,function(sa){this.editorUi.pickColor(ta,function(ya){oa.style.background="none"==ya?"url('"+Dialog.prototype.noColorImage+"')":ya;T(Aa,ya,ka)});mxEvent.consume(sa)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(oa);return btn}function R(Aa,ta,ka,oa,sa,ya,wa){null!=ta&&(ta=ta.split(","), aa.push({name:Aa,values:ta,type:ka,defVal:oa,countProperty:sa,parentRow:ya,isDeletable:!0,flipBkg:wa}));btn=mxUtils.button("+",mxUtils.bind(Z,function(ua){for(var xa=ya,ha=0;null!=xa.nextSibling;)if(xa.nextSibling.getAttribute("data-pName")==Aa)xa=xa.nextSibling,ha++;else break;var da={type:ka,parentRow:ya,index:ha,isDeletable:!0,defVal:oa,countProperty:sa};ha=ea(Aa,"",da,0==ha%2,wa);T(Aa,oa,da);xa.parentNode.insertBefore(ha,xa.nextSibling);mxEvent.consume(ua)}));btn.style.height="16px";btn.style.width= "25px";btn.className="geColorBtn";return btn}function Y(Aa,ta,ka,oa,sa,ya,wa){if(0<sa){var ua=Array(sa);ta=null!=ta?ta.split(","):[];for(var xa=0;xa<sa;xa++)ua[xa]=null!=ta[xa]?ta[xa]:null!=oa?oa:"";aa.push({name:Aa,values:ua,type:ka,defVal:oa,parentRow:ya,flipBkg:wa,size:sa})}return document.createElement("div")}function ba(Aa,ta,ka){var oa=document.createElement("input");oa.type="checkbox";oa.checked="1"==ta;mxEvent.addListener(oa,"change",function(){T(Aa,oa.checked?"1":"0",ka)});return oa}function ea(Aa,
Class
2
oauth2: new XOAuth2({ user: 'testuser', accessToken: 'invalid' }) }, function(err) { expect(err).to.exist; expect(client.authenticated).to.be.false; expect(err.code).to.equal('EAUTH'); done(); } ); });
Base
1
!0,0,mxUtils.bind(this,function(e){this.hsplitPosition=e;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var b=document.createElement("a");b.className="geItem geStatus";return b};EditorUi.prototype.setStatusText=function(b){this.statusContainer.innerHTML=b;0==this.statusContainer.getElementsByTagName("div").length&&(this.statusContainer.innerHTML="",b=this.createStatusDiv(b),this.statusContainer.appendChild(b))};
Base
1
this.spacing=0}function Ca(){mxArrowConnector.call(this);this.spacing=0}function Ra(){mxActor.call(this)}function ab(){mxRectangleShape.call(this)}function Ka(){mxActor.call(this)}function bb(){mxActor.call(this)}function Pa(){mxActor.call(this)}function Za(){mxActor.call(this)}function z(){mxActor.call(this)}function L(){mxActor.call(this)}function M(){mxActor.call(this)}function T(){mxActor.call(this)}function ca(){mxActor.call(this)}function ia(){mxActor.call(this)}function ma(){mxEllipse.call(this)}
Class
2
pathParams: match.slice(1), req, res }); } catch (e) { log.error(`Custom handler ${note.noteId} failed with ${e.message}`); res.status(500).send(e.message); } } else if (attr.name === 'customResourceProvider') { fileUploadService.downloadNoteFile(attr.noteId, res); } else { throw new Error("Unrecognized attribute name " + attr.name); } return; // only first handler is executed } const message = `No handler matched for custom ${path} request.`; log.info(message); res.status(404).send(message); }
Base
1
reply: () => Promise.resolve() }; const cmdFn = require(`../../../src/commands/registration/${CMD.toLowerCase()}`).handler.bind(mockClient); beforeEach(() => { sandbox = sinon.sandbox.create().usingPromise(Promise); sandbox.spy(mockClient, 'reply'); sandbox.stub(ActiveConnector.prototype, 'setupConnection').resolves(); }); afterEach(() => { sandbox.restore(); }); it('// unsuccessful | no argument', () => { return cmdFn() .then(() => { expect(mockClient.reply.args[0][0]).to.equal(504); }); }); it('// unsuccessful | invalid argument', () => { return cmdFn({command: {arg: 'blah'}}) .then(() => { expect(mockClient.reply.args[0][0]).to.equal(504); }); }); it('// successful IPv4', () => { return cmdFn({command: {arg: '|1|192.168.0.100|35286|'}}) .then(() => { const [ip, port, family] = ActiveConnector.prototype.setupConnection.args[0]; expect(mockClient.reply.args[0][0]).to.equal(200); expect(ip).to.equal('192.168.0.100'); expect(port).to.equal('35286'); expect(family).to.equal(4); }); }); it('// successful IPv6', () => { return cmdFn({command: {arg: '|2|8536:933f:e7f3:3e91:6dc1:e8c6:8482:7b23|35286|'}}) .then(() => { const [ip, port, family] = ActiveConnector.prototype.setupConnection.args[0]; expect(mockClient.reply.args[0][0]).to.equal(200); expect(ip).to.equal('8536:933f:e7f3:3e91:6dc1:e8c6:8482:7b23'); expect(port).to.equal('35286'); expect(family).to.equal(6); }); }); });
Base
1
Ua)}La=0};za.positionChanged=function(){};za.reset=function(){La=0};z.push(za)})(ca)}}return null!=z?z.reverse():null};var R=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(z){R.apply(this,arguments);if(null!=this.moveHandles)for(var L=0;L<this.moveHandles.length;L++)this.moveHandles[L].style.visibility=z?"":"hidden";if(null!=this.cornerHandles)for(L=0;L<this.cornerHandles.length;L++)this.cornerHandles[L].node.style.visibility=z?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=
Base
1
I&&N.replAllPos>=B)break;E[J.id]={replAllMrk:I,replAllPos:B};l.isCellEditable(J)&&(l.model.setValue(J,H(T,A,L.value,B-A.length,l.getCurrentCellStyle(J))),u++)}U!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,U));mxUtils.write(F,mxResources.get("matchesRepl",[u]))}catch(Q){b.handleError(Q)}finally{l.getModel().endUpdate(),b.editor.graph.setSelectionCells(X),b.editor.graph.rendering=!0}I++}});M.setAttribute("title",mxResources.get("replaceAll"));M.style.float="none";M.style.width="120px";
Class
2
EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");f.apply(this,arguments)};var g=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){g.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var m=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(O, 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";
Base
1
$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
document.execCommand("selectAll",!1,null),null!=b.pages&&1<b.pages.length?D.removeAttribute("disabled"):(D.checked=!1,D.setAttribute("disabled","disabled"))):l.container.focus()}));this.window.setLocation=function(U,X){var u=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;U=Math.max(0,Math.min(U,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));X=Math.max(0,Math.min(X,u-this.table.clientHeight-("1"== urlParams.sketch?3:48)));this.getX()==U&&this.getY()==X||mxWindow.prototype.setLocation.apply(this,arguments)};var W=mxUtils.bind(this,function(){var U=this.window.getX(),X=this.window.getY();this.window.setLocation(U,X)});mxEvent.addListener(window,"resize",W);this.destroy=function(){mxEvent.removeListener(window,"resize",W);this.window.destroy()}},FreehandWindow=function(b,e,f,c,m,n){var v=b.editor.graph;b=document.createElement("div");b.style.textAlign="center";b.style.userSelect="none";b.style.overflow=
Base
1
T[N],"cells"),this.updateCustomLinkAction(u,T[N],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(u,E,J){if(null!=E&&null!=E[J]){for(var T=[],N=0;N<E[J].length;N++)if("*"==E[J][N])T.push(E[J][N]);else{var Q=u[E[J][N]];null!=Q?""!=Q&&T.push(Q):T.push(E[J][N])}E[J]=T}};Graph.prototype.getCellsForAction=function(u,E){E=this.getCellsById(u.cells).concat(this.getCellsForTags(u.tags,null,E));if(null!=u.excludeCells){for(var J=[],T=0;T<E.length;T++)0>u.excludeCells.indexOf(E[T].id)&&J.push(E[T]); E=J}return E};Graph.prototype.getCellsById=function(u){var E=[];if(null!=u)for(var J=0;J<u.length;J++)if("*"==u[J]){var T=this.model.getRoot();E=E.concat(this.model.filterDescendants(function(Q){return Q!=T},T))}else{var N=this.model.getCell(u[J]);null!=N&&E.push(N)}return E};var S=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(u){return S.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(u))};Graph.prototype.isAllTagsHidden=function(u){if(null==u||0==u.length||
Class
2
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};
Base
1
function copyRecurse(source, destination) { var h = destination.$$hashKey; var key; if (isArray(source)) { for (var i = 0, ii = source.length; i < ii; i++) { destination.push(copyElement(source[i])); } } else if (isBlankObject(source)) { // createMap() fast path --- Safe to avoid hasOwnProperty check because prototype chain is empty for (key in source) { destination[key] = copyElement(source[key]); } } else if (source && typeof source.hasOwnProperty === 'function') { // Slow path, which must rely on hasOwnProperty for (key in source) { if (source.hasOwnProperty(key)) { destination[key] = copyElement(source[key]); } } } else { // Slowest path --- hasOwnProperty can't be called as a method for (key in source) { if (hasOwnProperty.call(source, key)) { destination[key] = copyElement(source[key]); } } } setHashKey(destination, h); return destination; }
Class
2
function makeMessage(msgType, length) { const total_length = length + 4 + 1; total_length.should.be.greaterThan(0); const buf = Buffer.alloc(total_length); buf.writeUInt8(msgType.charCodeAt(0), 0); buf.writeUInt32LE(total_length, 1); for (let i = 0; i < length; i++) { buf.writeUInt8(msgType.charCodeAt(0), i + 5); } return buf; }
Class
2
!0));q.push(C)}this.updatePageLinks(d,q)}}if(null!=I&&"mxGraphModel"===I.nodeName){y=A.importGraphModel(I,g,k,l);if(null!=y)for(z=0;z<y.length;z++)this.updatePageLinksForCell(d,y[z]);var G=A.parseBackgroundImage(I.getAttribute("backgroundImage"));if(null!=G&&null!=G.originalSrc){this.updateBackgroundPageLink(d,G);var P=new ChangePageSetup(this,null,G);P.ignoreColor=!0;A.model.execute(P)}}x&&this.insertHandler(y,null,null,A.defaultVertexStyle,A.defaultEdgeStyle,!1,!0)}finally{A.model.endUpdate()}}}catch(K){if(p)throw K; this.handleError(K)}return y};EditorUi.prototype.updatePageLinks=function(d,g){for(var k=0;k<g.length;k++)this.updatePageLinksForCell(d,g[k].root),null!=g[k].viewState&&this.updateBackgroundPageLink(d,g[k].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,g){try{if(null!=g&&Graph.isPageLink(g.originalSrc)){var k=d[g.originalSrc.substring(g.originalSrc.indexOf(",")+1)];null!=k&&(g.originalSrc="data:page/id,"+k)}}catch(l){}};EditorUi.prototype.updatePageLinksForCell=
Base
1
this.spacing=0}function Ca(){mxArrowConnector.call(this);this.spacing=0}function Ra(){mxActor.call(this)}function ab(){mxRectangleShape.call(this)}function Ka(){mxActor.call(this)}function bb(){mxActor.call(this)}function Pa(){mxActor.call(this)}function Za(){mxActor.call(this)}function z(){mxActor.call(this)}function L(){mxActor.call(this)}function M(){mxActor.call(this)}function T(){mxActor.call(this)}function ca(){mxActor.call(this)}function ia(){mxActor.call(this)}function ma(){mxEllipse.call(this)}
Class
2
{ run: function() { var what = this.what; var server; server = setup( this, { privateKeyPath: CLIENT_KEY_RSA_PATH }, { hostKeys: [HOST_KEY_RSA] } ); server.on('connection', function(conn) { conn.on('authentication', function(ctx) { if (ctx.method === 'none') return ctx.reject(); assert(ctx.method === 'publickey', makeMsg(what, 'Unexpected auth method: ' + ctx.method)); assert(ctx.username === USER, makeMsg(what, 'Unexpected username: ' + ctx.username)); assert(ctx.key.algo === 'ssh-rsa', makeMsg(what, 'Unexpected key algo: ' + ctx.key.algo)); assert.deepEqual(CLIENT_KEY_RSA.getPublicSSH(), ctx.key.data, makeMsg(what, 'Public key mismatch')); if (ctx.signature) { assert(CLIENT_KEY_RSA.verify(ctx.blob, ctx.signature) === true, makeMsg(what, 'Could not verify PK signature')); ctx.accept(); } else ctx.accept(); }).on('ready', function() { conn.on('session', function(accept, reject) { var session = accept(); if (session) { session.on('exec', function(accept, reject) { var stream = accept(); if (stream) { stream.exit(0); stream.end(); } }).on('pty', function(accept, reject) { accept && accept(); }); } }); }); }); },
Base
1
": "+H.message:""));this.hasError=!0})):O.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});G();this.refreshComments=G;z=mxUtils.bind(this,function(){function K(M){var W=H[M.id];if(null!=W)for(g(M,W),W=0;null!=M.replies&&W<M.replies.length;W++)K(M.replies[W])}if(this.window.isVisible()){for(var F=O.querySelectorAll(".geCommentDate"),H={},S=0;S<F.length;S++){var V=F[S];H[V.getAttribute("data-commentId")]=V}for(S=0;S<D.length;S++)K(D[S])}});setInterval(z,6E4);this.refreshCommentsTime=z;this.window=
Class
2
f.getCell(x),null!=v&&v!=q&&(q=null));null!=q&&(f.getChildAt(l,c)!=q&&f.add(l,q,c),this.patchCellRecursive(b,f,q,d,u),c++);return x});for(g=[null];0<g.length;)if(k=g.shift(),k=e(null!=k?k.child:null,null!=k?k.insert:!1),m=t[k],null!=m&&(delete t[k],g.push({child:f.getCell(m)})),m=D[k],null!=m&&(delete D[k],g.push({child:this.getCellForJson(m),insert:!0})),0==g.length){for(k in t)g.push({child:f.getCell(t[k])}),delete t[k];for(k in D)g.push({child:this.getCellForJson(D[k]),insert:!0}),delete D[k]}}};
Base
1
La,"geMenuItem");null!=Ea?(La.style.backgroundImage="url("+Ea+")",La.style.backgroundPosition="center center",La.style.backgroundRepeat="no-repeat",La.style.backgroundSize="24px 24px",La.style.width="34px",La.innerHTML=""):wa||(La.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",La.style.backgroundPosition="right 6px center",La.style.backgroundRepeat="no-repeat",La.style.paddingRight="22px");return La}function X(za,wa,Ea,Da,La,Ya){var Ua=document.createElement("a");Ua.className= "1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Ua.style.display="inline-block";Ua.style.boxSizing="border-box";Ua.style.height="30px";Ua.style.padding="6px";Ua.style.position="relative";Ua.style.verticalAlign="top";Ua.style.top="0px";"1"==urlParams.sketch&&(Ua.style.borderStyle="none",Ua.style.boxShadow="none",Ua.style.padding="6px",Ua.style.margin="0px");null!=U.statusContainer?V.insertBefore(Ua,U.statusContainer):V.appendChild(Ua);null!=Ya?(Ua.style.backgroundImage="url("+Ya+")",Ua.style.backgroundPosition= "center center",Ua.style.backgroundRepeat="no-repeat",Ua.style.backgroundSize="24px 24px",Ua.style.width="34px"):mxUtils.write(Ua,za);mxEvent.addListener(Ua,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(eb){eb.preventDefault()}));mxEvent.addListener(Ua,"click",function(eb){"disabled"!=Ua.getAttribute("disabled")&&wa(eb);mxEvent.consume(eb)});null==Ea&&(Ua.style.marginRight="4px");null!=Da&&Ua.setAttribute("title",Da);null!=La&&(za=function(){La.isEnabled()?(Ua.removeAttribute("disabled"), Ua.style.cursor="pointer"):(Ua.setAttribute("disabled","disabled"),Ua.style.cursor="default")},La.addListener("stateChanged",za),I.addListener("enabledChanged",za),za());return Ua}function ea(za,wa,Ea){Ea=document.createElement("div");Ea.className="geMenuItem";Ea.style.display="inline-block";Ea.style.verticalAlign="top";Ea.style.marginRight="6px";Ea.style.padding="0 4px 0 4px";Ea.style.height="30px";Ea.style.position="relative";Ea.style.top="0px";"1"==urlParams.sketch&&(Ea.style.boxShadow="none");
Class
2
setTimeout(function(){Ia.style.display="none"},4E3)}function z(){null!=X&&(X.style.fontWeight="normal",X.style.textDecoration="none",p=X,X=null)}function L(fa,ca,ba,ja,ia,ma,qa){if(-1<fa.className.indexOf("geTempDlgRadioBtnActive"))return!1;fa.className+=" geTempDlgRadioBtnActive";Q.querySelector(".geTempDlgRadioBtn[data-id="+ja+"]").className="geTempDlgRadioBtn "+(qa?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");Q.querySelector("."+ca).src="/images/"+ba+"-sel.svg";Q.querySelector("."+ia).src=
Class
2
eb);this.updateSvgLinks(Da,ua,!0);this.addForeignObjectWarning(eb,Da);return Da}finally{Qa&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(z,L){if("0"!=urlParams["svg-warning"]&&0<L.getElementsByTagName("foreignObject").length){var M=z.createElement("switch"),T=z.createElement("g");T.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var ca=z.createElement("a");ca.setAttribute("transform","translate(0,-5)"); null==ca.setAttributeNS||L.ownerDocument!=document&&null==document.documentMode?(ca.setAttribute("xlink:href",Graph.foreignObjectWarningLink),ca.setAttribute("target","_blank")):(ca.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),ca.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));z=z.createElement("text");z.setAttribute("text-anchor","middle");z.setAttribute("font-size","10px");z.setAttribute("x","50%");z.setAttribute("y","100%");mxUtils.write(z,Graph.foreignObjectWarningText); M.appendChild(T);ca.appendChild(z);M.appendChild(ca);L.appendChild(M)}};Graph.prototype.updateSvgLinks=function(z,L,M){z=z.getElementsByTagName("a");for(var T=0;T<z.length;T++)if(null==z[T].getAttribute("target")){var ca=z[T].getAttribute("href");null==ca&&(ca=z[T].getAttribute("xlink:href"));null!=ca&&(null!=L&&/^https?:\/\//.test(ca)?z[T].setAttribute("target",L):M&&this.isCustomLink(ca)&&z[T].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(z){z=new mxSvgCanvas2D(z);
Class
2
function toggleResolve(evt) { function doToggle() { var resolveActionLnk = evt.target; resolveActionLnk.innerHTML = ''; comment.isResolved = !comment.isResolved; mxUtils.write(resolveActionLnk, comment.isResolved? mxResources.get('reopen') : mxResources.get('resolve')); var actionsDisplay = comment.isResolved? 'none' : ''; var replies = collectReplies(comment).replies; var color = (Editor.isDarkMode()) ? 'transparent' : (comment.isResolved? 'ghostWhite' : 'white'); for (var i = 0; i < replies.length; i++) { replies[i].style.backgroundColor = color; var forOpenActions = replies[i].querySelectorAll('.geCommentAction'); for (var j = 0; j < forOpenActions.length; j ++) { if (forOpenActions[j] == resolveActionLnk.parentNode) continue; forOpenActions[j].style.display = actionsDisplay; } if (!resolvedChecked) { replies[i].style.display = 'none'; } } updateNoComments(); }; if (comment.isResolved) { addReply(mxResources.get('reOpened') + ': ', true, doToggle, false, true); } else { addReply(mxResources.get('markedAsResolved'), false, doToggle, true); } };
Base
1
window.location.hash=null!=x?x.getHash():""}))});b=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(v){null!=v?(this.fileLoaded(new StorageFile(this,v,b)),null!=d&&d()):e({message:mxResources.get("fileNotFound")})}),e)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var v=this.getCurrentFile();window.location.hash=null!=v?v.getHash():""}));else if(null!=l)this.spinner.stop(),
Class
2
e},ConnectionPointsDialog=function(b,e){function f(){null!=m&&m.destroy()}var c=document.createElement("div");c.style.userSelect="none";var m=null;this.init=function(){function n(F,H){F=new mxCell("",new mxGeometry(F,H,6,6),"shape=mxgraph.basic.x;fillColor=#29b6f2;strokeColor=#29b6f2;points=[];rotatable=0;resizable=0;connectable=0;editable=0;");F.vertex=!0;F.cp=!0;return p.addCell(F)}function v(F){F=p.getSelectionCells();p.deleteCells(F)}function d(){var F=parseInt(D.value)||0;F=0>F?0:100<F?100:F;
Base
1
Runner.prototype.run = function(fn){ var self = this , fn = fn || function(){}; function uncaught(err){ self.uncaught(err); } debug('start'); // callback this.on('end', function(){ debug('end'); process.removeListener('uncaughtException', uncaught); fn(self.failures); }); // run suites this.emit('start'); this.runSuite(this.suite, function(){ debug('finished running'); self.emit('end'); }); // uncaught exception process.on('uncaughtException', uncaught); return this; };
Base
1
z.init()}else{var L=function(C){return{id:C.id,isExt:!0,url:C.downloadUrl,title:C.title,imgUrl:C.thumbnailLink,changedBy:C.lastModifyingUserName,lastModifiedOn:C.modifiedDate}};t=new TemplatesDialog(c,function(C,D,G){var P=G.libs,K=G.clibs;c.pickFolder(c.mode,function(F){c.createFile(D,C,null!=P&&0<P.length?P:null,null,function(){c.hideDialog()},null,F,null,null!=K&&0<K.length?K:null)},null==c.stateArg||null==c.stateArg.folderId)},null,null,null,"user",function(C,D,G){var P=new Date;P.setDate(P.getDate()-
Base
1
mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxCell,["children","edges","overlays","mxTransient"],["parent","source","target"]);a.isCellCodec=function(){return!0};a.isNumericAttribute=function(b,c,d){return"value"!==c.nodeName&&mxObjectCodec.prototype.isNumericAttribute.apply(this,arguments)};a.isExcluded=function(b,c,d,e){return mxObjectCodec.prototype.isExcluded.apply(this,arguments)||e&&"value"==c&&d.nodeType==mxConstants.NODETYPE_ELEMENT};a.afterEncode=function(b,c,d){if(null!=
Base
1
"...");mxEvent.addListener(L,"click",function(K){function F(){d(H,S,function(V){k(S);b.addComment(V,function(M){V.id=M;D.push(V);p(S)},function(M){l(S);F();b.handleError(M,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var H=b.newComment("",b.getCurrentUser()),S=q(H,D,null,0);F();K.preventDefault();mxEvent.consume(K)});z.appendChild(L)}L=I.cloneNode();L.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';L.setAttribute("title",mxResources.get("showResolved"));
Class
2
var O=mxText.prototype.redraw;mxText.prototype.redraw=function(){O.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(t,E,K){function T(){for(var ma=S.getSelectionCells(),Aa=[],Da=0;Da<ma.length;Da++)S.isCellVisible(ma[Da])&&Aa.push(ma[Da]);S.setSelectionCells(Aa)}function P(ma){S.setHiddenTags(ma?[]:Y.slice());T();S.refresh()}function Q(ma,Aa){da.innerHTML="";if(0<ma.length){var Da=document.createElement("table");
Base
1
d.addHours=function(a,c){return d.addMinutes(a,60*c)};d.addMinutes=function(a,c){return d.addSeconds(a,60*c)};d.addSeconds=function(a,c){return d.addMilliseconds(a,1E3*c)};d.addMilliseconds=function(a,c){return new Date(a.getTime()+c)};d.subtract=function(a,c){var b=a.getTime()-c.getTime();return{toMilliseconds:function(){return b},toSeconds:function(){return b/1E3},toMinutes:function(){return b/6E4},toHours:function(){return b/36E5},toDays:function(){return b/864E5}}};d.isLeapYear=function(a){return!(a%
Class
2
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
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()&&
Base
1
function sanitizeShellString(str, strict = false) { const s = str || ''; let result = ''; for (let i = 0; i <= 2000; i++) { if (!(s[i] === undefined || s[i] === '>' || s[i] === '<' || s[i] === '*' || s[i] === '?' || s[i] === '[' || s[i] === ']' || s[i] === '|' || s[i] === '˚' || s[i] === '$' || s[i] === ';' || s[i] === '&' || s[i] === '(' || s[i] === ')' || s[i] === ']' || s[i] === '#' || s[i] === '\\' || s[i] === '\t' || s[i] === '\n' || s[i] === '\'' || s[i] === '`' || s[i] === '"' || s[i].length > 1 || (strict && s[i] === '@') || (strict && s[i] === ' ') || (strict && s[i] == '{') || (strict && s[i] == ')'))) { result = result + s[i]; } } return result; }
Base
1
Array.prototype.push.apply(P.shape.customProperties,Editor.commonEdgeProperties)),T(P.shape.customProperties));p=p.getAttribute("customProperties");if(null!=p)try{T(JSON.parse(p))}catch(O){}}};var v=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var p=this.editorUi.getSelectionState();"image"!=p.style.shape&&!p.containsLabel&&0<p.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));v.apply(this,arguments);if(Editor.enableCustomProperties){for(var C= {},I=p.vertices,T=p.edges,P=0;P<I.length;P++)this.findCommonProperties(I[P],C,0==P);for(P=0;P<T.length;P++)this.findCommonProperties(T[P],C,0==I.length&&0==P);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(C).length&&this.container.appendChild(this.addProperties(this.createPanel(),C,p))}};var x=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(p){this.addActions(p,["copyStyle","pasteStyle"]);return x.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=
Base
1
A=this.editor.graph,z=null,L=null,M=null,n=null,y=null,K=null,B=null,F="whiteSpace=wrap;html=1;",G=null,N=null,J="",E="auto",H="auto",S=null,U=null,Q=40,W=40,V=100,X=0,p=function(){null!=e?e(ta):(A.setSelectionCells(ta),A.scrollCellToVisible(A.getSelectionCell()))},C=A.getFreeInsertPoint(),I=C.x,T=C.y;C=T;var P=null,O="auto";N=null;for(var R=[],Y=null,da=null,ha=0;ha<g.length&&"#"==g[ha].charAt(0);){c=g[ha].replace(/\r$/,"");for(ha++;ha<g.length&&"\\"==c.charAt(c.length-1)&&"#"==g[ha].charAt(0);)c=
Class
2
minimumSearchLength:2});$(".fc_input_fake label").click(function(){var a=$(this).prop("for");$("#"+a).val("");searchUsers("")});$(".ajaxForm").each(function(){dialog_form($(this))});$("a.ajaxLink").click(function(a){a.preventDefault();a=$(this).prop("href");dialog_ajax("Saving",a,getDatesFromQuerystring(document.URL.split("?")[1]))});$("#fc_sidebar_footer, #fc_sidebar").resizable({handles:"e",minWidth:100,start:function(b,e){a=parseInt($(window).width(),10)},resize:function(b,e){$("#fc_content_container, #fc_content_footer").css({width:a-
Base
1
return ia}function A(){function ea(ra,ia){var Da=mxResources.get(ra);null==Da&&(Da=ra.substring(0,1).toUpperCase()+ra.substring(1));18<Da.length&&(Da=Da.substring(0,18)+"&hellip;");return Da+" ("+ia.length+")"}function ta(ra,ia,Da){mxEvent.addListener(ia,"click",function(){Ea!=ia&&(Ea.style.backgroundColor="",Ea=ia,Ea.style.backgroundColor=E,Z.scrollTop=0,Z.innerHTML="",J=0,Pa=Da?Ga[ra][Da]:sa[ra],V=null,N(!1))})}Ia&&(Ia=!1,mxEvent.addListener(Z,"scroll",function(ra){Z.scrollTop+Z.clientHeight>=Z.scrollHeight&&
Base
1
labels: templateInstance.topTasks.get().map((task) => task._id),
Base
1
function onUSERAUTH_FAILURE(authsLeft, partial) { stream.removeListener('USERAUTH_PK_OK', onUSERAUTH_PK_OK); stream.removeListener('USERAUTH_INFO_REQUEST', onUSERAUTH_INFO_REQUEST); if (curAuth === 'agent') { debug('DEBUG: Client: Agent key #' + (agentKeyPos + 1) + ' failed'); return tryNextAgentKey(); } else { debug('DEBUG: Client: ' + curAuth + ' auth failed'); } curPartial = partial; curAuthsLeft = authsLeft; tryNextAuth(); }
Base
1
int mutt_b64_decode(char *out, const char *in) { int len = 0; unsigned char digit4; do { const unsigned char digit1 = in[0]; if ((digit1 > 127) || (base64val(digit1) == BAD)) return -1; const unsigned char digit2 = in[1]; if ((digit2 > 127) || (base64val(digit2) == BAD)) return -1; const unsigned char digit3 = in[2]; if ((digit3 > 127) || ((digit3 != '=') && (base64val(digit3) == BAD))) return -1; digit4 = in[3]; if ((digit4 > 127) || ((digit4 != '=') && (base64val(digit4) == BAD))) return -1; in += 4; /* digits are already sanity-checked */ *out++ = (base64val(digit1) << 2) | (base64val(digit2) >> 4); len++; if (digit3 != '=') { *out++ = ((base64val(digit2) << 4) & 0xf0) | (base64val(digit3) >> 2); len++; if (digit4 != '=') { *out++ = ((base64val(digit3) << 6) & 0xc0) | base64val(digit4); len++; } } } while (*in && digit4 != '='); return len; }
Base
1
r=g.isEventsEnabled();g.setEventsEnabled(!1);var q=this.graph.isEnabled();this.graph.setEnabled(!1);var t=g.getTranslate();g.translate=new mxPoint(a,b);var u=this.graph.cellRenderer.redraw,x=g.states;a=g.scale;if(this.clipping){var A=new mxRectangle((f.x+t.x)*a,(f.y+t.y)*a,f.width*a/p,f.height*a/p),E=this;this.graph.cellRenderer.redraw=function(D,B,v){if(null!=D){var y=x.get(D.cell);if(null!=y&&(y=g.getBoundingBox(y,!1),null!=y&&0<y.width&&0<y.height&&!mxUtils.intersects(A,y))||!E.isCellVisible(D.cell))return}u.apply(this, arguments)}}a=null;try{var C=[this.getRoot()];a=new mxTemporaryCellStates(g,c,C,null,mxUtils.bind(this,function(D){return this.getLinkForCellState(D)}))}finally{if(mxClient.IS_IE)g.overlayPane.innerHTML="",g.canvas.style.overflow="hidden",g.canvas.style.position="relative",g.canvas.style.top=this.marginTop+"px",g.canvas.style.width=f.width+"px",g.canvas.style.height=f.height+"px";else for(c=e.firstChild;null!=c;)C=c.nextSibling,b=c.nodeName.toLowerCase(),"svg"==b?(c.style.overflow="hidden",c.style.position=
Base
1
var S=document.createElement("tbody"),Q=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(e=mxUtils.indexOf(b.pages,b.currentPage));for(p=f.length-1;0<=p;p--){var P=function(T){var X=new Date(T.modifiedDate),ba=null;if(0<=X.getTime()){var ja=function(ka){v.stop();E.innerHTML="";var da=mxUtils.parseXml(ka),fa=b.editor.extractGraphModel(da.documentElement,!0);if(null!=fa){var ma=function(Ba){null!=Ba&&(Ba=ya(Editor.parseDiagramNode(Ba)));return Ba},ya=function(Ba){var Ha=Ba.getAttribute("background");
Base
1
message: new MockBuilder( { from: isErr ? '[email protected]' : '[email protected]', to: '[email protected]' }, message ) }, function(err) { if (isErr) { expect(err).to.exist; } else { expect(err).to.not.exist; } callback(); } ); }
Base
1
function getRecentDocs(getAll) { if (recentDocsCallback) { tempDlgContent.scrollTop = 0; diagramsTiles.innerHTML = ''; spinner.spin(diagramsTiles); cancelPendingCall = false; callInitiated = true; diagramsListTitle.innerHTML = mxUtils.htmlEntities(mxResources.get('recentDiag')); lastSearchStr = null; recentDocsCallback(extDiagramsCallback, function() { showError(mxResources.get('cannotLoad')); extDiagramsCallback([]); }, getAll? null : username); } };
Base
1
"nowrap";H.style.overflow="hidden";H.style.textOverflow="ellipsis";H.setAttribute("title",F.title+" ("+F.id+")");var S=document.createElement("input");S.setAttribute("type","checkbox");S.checked=b.sidebar.isEntryVisible(F.id);S.defaultChecked=S.checked;H.appendChild(S);mxUtils.write(H," "+F.title);l.appendChild(H);var V=function(M){if(null==M||"INPUT"!=mxEvent.getSource(M).nodeName){p.style.textAlign="center";p.style.padding="0px";p.style.color="";p.innerHTML="";if(null!=F.desc){var W=document.createElement("pre"); W.style.boxSizing="border-box";W.style.fontFamily="inherit";W.style.margin="20px";W.style.right="0px";W.style.textAlign="left";mxUtils.write(W,F.desc);p.appendChild(W)}null!=F.imageCallback?F.imageCallback(p):null!=F.image?p.innerHTML+='<img border="0" src="'+F.image+'"/>':null==F.desc&&(p.style.padding="20px",p.style.color="rgb(179, 179, 179)",mxUtils.write(p,mxResources.get("noPreview")));null!=q&&(q.style.backgroundColor="");q=H;q.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9";null!= M&&mxEvent.consume(M)}};mxEvent.addListener(H,"click",V);mxEvent.addListener(H,"dblclick",function(M){S.checked=!S.checked;mxEvent.consume(M)});x.push(function(){return S.checked?F.id:null});0==D&&0==K&&V()})(G.entries[K])})(C[D])});g=document.createElement("div");g.className="geDialogTitle";mxUtils.write(g,mxResources.get("shapes"));g.style.position="absolute";g.style.top="0px";g.style.left="0px";g.style.lineHeight="40px";g.style.height="40px";g.style.right="0px";var l=document.createElement("div"),
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")},
Class
2
this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));var E=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==E.embedViewport)mxUtils.fit(this.div);else{var ca=parseInt(this.div.offsetLeft),ba=parseInt(this.div.offsetWidth),ja=E.embedViewport.x+E.embedViewport.width,ia=parseInt(this.div.offsetTop),ma=parseInt(this.div.offsetHeight),qa=E.embedViewport.y+E.embedViewport.height; this.div.style.left=Math.max(E.embedViewport.x,Math.min(ca,ja-ba))+"px";this.div.style.top=Math.max(E.embedViewport.y,Math.min(ia,qa-ma))+"px";this.div.style.height=Math.min(E.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(E.embedViewport.width,parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",!0);EditorUi.windowed&&("1"==urlParams.sketch||1E3<=d)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(),
Class
2
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
function buildURL (source, reqBase) { const dest = new URL(source, reqBase) // if base is specified, source url should not override it if (reqBase && !reqBase.startsWith(dest.origin)) { throw new Error('source must be a relative path string') } return dest }
Class
2
null,null,null,10,null,null,!1,null,0<d.length?d:null)}catch(m){this.handleError(m)}};EditorUi.prototype.writeImageToClipboard=function(d,f,g,m){var q=this.base64ToBlob(d.substring(d.indexOf(",")+1),"image/png");d=new ClipboardItem({"image/png":q,"text/html":new Blob(['<img src="'+d+'" width="'+f+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([d])["catch"](m)};EditorUi.prototype.copyCells=function(d,f){var g=this.editor.graph;if(g.isSelectionEmpty())d.innerHTML="";else{var m= mxUtils.sortCells(g.model.getTopmostCells(g.getSelectionCells())),q=mxUtils.getXml(g.encodeCells(m));mxUtils.setTextContent(d,encodeURIComponent(q));f?(g.removeCells(m,!1),g.lastPasteXml=null):(g.lastPasteXml=q,g.pasteCounter=0);d.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var d=null;if(Editor.enableNativeCipboard){var f=this.editor.graph;f.isSelectionEmpty()||(d=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),
Base
1
wp.updates.queueChecker = function() { if ( wp.updates.updateLock || wp.updates.updateQueue.length <= 0 ) { return; } var job = wp.updates.updateQueue.shift(); wp.updates.updatePlugin( job.data.plugin, job.data.slug ); };
Compound
4
onData: function(stream, session, callback) { stream.on('data', function() {}); stream.on('end', callback); }
Base
1
J&&E(Editor.svgBrokenImage.src)});else{var N=new Image;this.crossOriginImages&&(N.crossOrigin="anonymous");N.onload=function(){window.clearTimeout(T);if(J)try{var Q=document.createElement("canvas"),R=Q.getContext("2d");Q.height=N.height;Q.width=N.width;R.drawImage(N,0,0);E(Q.toDataURL())}catch(Y){E(Editor.svgBrokenImage.src)}};N.onerror=function(){window.clearTimeout(T);J&&E(Editor.svgBrokenImage.src)};N.src=u}}catch(Q){E(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(u,E,J,
Base
1
"/images/"+ma+".svg";return!0}function M(fa,ca,ba,ja){function ia(na,Ja){null==qa?(na=/^https?:\/\//.test(na)&&!b.editor.isCorsEnabledForUrl(na)?PROXY_URL+"?url="+encodeURIComponent(na):TEMPLATE_PATH+"/"+na,mxUtils.get(na,mxUtils.bind(this,function(Ga){200<=Ga.getStatus()&&299>=Ga.getStatus()&&(qa=Ga.getText());Ja(qa)}))):Ja(qa)}function ma(na,Ja,Ga){if(null!=na&&mxUtils.isAncestorNode(document.body,ca)&&(na=mxUtils.parseXml(na),na=Editor.extractGraphModel(na.documentElement,!0),null!=na)){"mxfile"== na.nodeName&&(na=Editor.parseDiagramNode(na.getElementsByTagName("diagram")[0]));var Ra=new mxCodec(na.ownerDocument),Sa=new mxGraphModel;Ra.decode(na,Sa);na=Sa.root.getChildAt(0).children||[];b.sidebar.createTooltip(ca,na,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=fa.title?mxResources.get(fa.title,null,fa.title):null,!0,new mxPoint(Ja, Ga),!0,null,!0);var Ha=document.createElement("div");Ha.className="geTempDlgDialogMask";Q.appendChild(Ha);var Na=b.sidebar.hideTooltip;b.sidebar.hideTooltip=function(){Ha&&(Q.removeChild(Ha),Ha=null,Na.apply(this,arguments),b.sidebar.hideTooltip=Na)};mxEvent.addListener(Ha,"click",function(){b.sidebar.hideTooltip()})}}var qa=null;if(Ca||b.sidebar.currentElt==ca)b.sidebar.hideTooltip();else{var oa=function(na){Ca&&b.sidebar.currentElt==ca&&ma(na,mxEvent.getClientX(ja),mxEvent.getClientY(ja));Ca=!1;
Class
2
onNodeTextChange: function(node, text, oldText) { if (node.attributes && node.attributes.filterPanel) { node.attributes.filterPanel.setTitle(text); } },
Base
1
function loadBatchesTable(sessions) { $.each(sessions, function(index, session) { $("#batches .sessions-table-body").append( "<tr>" + tdWrap(session.id) + tdWrap(appIdLink(session)) + tdWrap(session.name) + tdWrap(session.owner) + tdWrap(session.proxyUser) + tdWrap(session.state) + tdWrap(logLinks(session, "batch")) + "</tr>" ); }); }
Base
1
context.describe = context.context = function(title, fn){ var suite = Suite.create(suites[0], title); suites.unshift(suite); fn.call(suite); suites.shift(); return suite; };
Base
1
c,q,n,v),k&&!l?q.y=A.y:l&&!k&&(q.x=A.x),A.y!=q.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),A.x!=q.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),q;D(!0,!0);return b.apply(this,arguments)};var e=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(c){e.call(this,c);var m=this.guidesArrVer,n=this.guidesArrHor;if(null!=m)for(var v=0;v<m.length;v++)m[v].node.style.visibility=c?"visible":"hidden";if(null!= n)for(v=0;v<n.length;v++)n[v].node.style.visibility=c?"visible":"hidden"};var f=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){f.call(this);var c=this.guidesArrVer,m=this.guidesArrHor;if(null!=c){for(var n=0;n<c.length;n++)c[n].destroy();this.guidesArrVer=null}if(null!=m){for(n=0;n<m.length;n++)m[n].destroy();this.guidesArrHor=null}}})();function mxRuler(b,e,f,c){function m(){var t=b.diagramContainer;p.style.top=t.offsetTop-g+"px";p.style.left=t.offsetLeft-g+"px";p.style.width=(f?0:t.offsetWidth)+g+"px";p.style.height=(f?t.offsetHeight:0)+g+"px"}function n(t,z,L){if(null!=v)return t;var C;return function(){var D=this,G=arguments,P=L&&!C;clearTimeout(C);C=setTimeout(function(){C=null;L||t.apply(D,G)},z);P&&t.apply(D,G)}}var v=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,
Class
2
c.value&&c.value.nodeType==mxConstants.NODETYPE_ELEMENT){var e=d;d=mxUtils.importNode(b.document,c.value,!0);d.appendChild(e);b=e.getAttribute("id");d.setAttribute("id",b);e.removeAttribute("id")}return d};a.beforeDecode=function(b,c,d){var e=c.cloneNode(!0),f=this.getName();c.nodeName!=f?(e=c.getElementsByTagName(f)[0],null!=e&&e.parentNode==c?(mxUtils.removeWhitespace(e,!0),mxUtils.removeWhitespace(e,!1),e.parentNode.removeChild(e)):e=null,d.value=c.cloneNode(!0),c=d.value.getAttribute("id"),null!= c&&(d.setId(c),d.value.removeAttribute("id"))):d.setId(c.getAttribute("id"));if(null!=e)for(c=0;c<this.idrefs.length;c++){f=this.idrefs[c];var g=e.getAttribute(f);if(null!=g){e.removeAttribute(f);var k=b.objects[g]||b.lookup(g);null==k&&(g=b.getElementById(g),null!=g&&(k=(mxCodecRegistry.codecs[g.nodeName]||this).decode(b,g)));d[f]=k}}return e};return a}());
Base
1
util.parseUrl = function(str) { // FIXME: this regex looks a bit broken var regex = /^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g; regex.lastIndex = 0; var m = regex.exec(str); var url = (m === null) ? null : { full: str, scheme: m[1], host: m[2], port: m[3], path: m[4] }; if(url) { url.fullHost = url.host; if(url.port) { if(url.port !== 80 && url.scheme === 'http') { url.fullHost += ':' + url.port; } else if(url.port !== 443 && url.scheme === 'https') { url.fullHost += ':' + url.port; } } else if(url.scheme === 'http') { url.port = 80; } else if(url.scheme === 'https') { url.port = 443; } url.full = url.scheme + '://' + url.fullHost; } return url; };
Base
1
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); };
Class
2
function(){n=I.name;v="";L()})));k.appendChild(H)})(G[N],N);100==G.length&&(k.appendChild(z),A=function(){k.scrollTop>=k.scrollHeight-k.offsetHeight&&C()},mxEvent.addListener(k,"scroll",A))}}),y)}),M=mxUtils.bind(this,function(u){null==u&&(k.innerHTML="",u=1);var D=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+u,null,"GET");p.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(k,mxResources.get("loading"));null!=A&&mxEvent.removeListener(k,"scroll",A);null!=z&&null!=
Base
1
null,null,null,10,null,null,!1,null,0<d.length?d:null)}catch(m){this.handleError(m)}};EditorUi.prototype.writeImageToClipboard=function(d,f,g,m){var q=this.base64ToBlob(d.substring(d.indexOf(",")+1),"image/png");d=new ClipboardItem({"image/png":q,"text/html":new Blob(['<img src="'+d+'" width="'+f+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([d])["catch"](m)};EditorUi.prototype.copyCells=function(d,f){var g=this.editor.graph;if(g.isSelectionEmpty())d.innerHTML="";else{var m=
Base
1
this.graph.getTooltip(c,d,e,f);this.show(k,e,f);this.state=c;this.node=d;this.stateSource=g}}),this.delay)}};mxTooltipHandler.prototype.hide=function(){this.resetTimer();this.hideTooltip()};mxTooltipHandler.prototype.hideTooltip=function(){null!=this.div&&(this.div.style.visibility="hidden",this.div.innerHTML="")};
Base
1
(function(a){function e(h){var k,j=this,l=h.data||{};if(l.elem)j=h.dragTarget=l.elem,h.dragProxy=d.proxy||j,h.cursorOffsetX=l.pageX-l.left,h.cursorOffsetY=l.pageY-l.top,h.offsetX=h.pageX-h.cursorOffsetX,h.offsetY=h.pageY-h.cursorOffsetY;else if(d.dragging||l.which>0&&h.which!=l.which||a(h.target).is(l.not))return;switch(h.type){case"mousedown":return a.extend(l,a(j).offset(),{elem:j,target:h.target,pageX:h.pageX,pageY:h.pageY}),b.add(document,"mousemove mouseup",e,l),i(j,!1),d.dragging=null,!1;case!d.dragging&&"mousemove":if(g(h.pageX-l.pageX)+g(h.pageY-l.pageY)<l.distance)break;h.target=l.target,k=f(h,"dragstart",j),k!==!1&&(d.dragging=j,d.proxy=h.dragProxy=a(k||j)[0]);case"mousemove":if(d.dragging){if(k=f(h,"drag",j),c.drop&&(c.drop.allowed=k!==!1,c.drop.handler(h)),k!==!1)break;h.type="mouseup"}case"mouseup":b.remove(document,"mousemove mouseup",e),d.dragging&&(c.drop&&c.drop.handler(h),f(h,"dragend",j)),i(j,!0),d.dragging=d.proxy=l.elem=!1}return!0}function f(b,c,d){b.type=c;var e=a.event.dispatch.call(d,b);return e===!1?!1:e||b.result}function g(a){return Math.pow(a,2)}function h(){return d.dragging===!1}function i(a,b){a&&(a.unselectable=b?"off":"on",a.onselectstart=function(){return b},a.style&&(a.style.MozUserSelect=b?"":"none"))}a.fn.drag=function(a,b,c){return b&&this.bind("dragstart",a),c&&this.bind("dragend",c),a?this.bind("drag",b?b:a):this.trigger("drag")};var b=a.event,c=b.special,d=c.drag={not:":input",distance:0,which:1,dragging:!1,setup:function(c){c=a.extend({distance:d.distance,which:d.which,not:d.not},c||{}),c.distance=g(c.distance),b.add(this,"mousedown",e,c),this.attachEvent&&this.attachEvent("ondragstart",h)},teardown:function(){b.remove(this,"mousedown",e),this===d.dragging&&(d.dragging=d.proxy=!1),i(this,!0),this.detachEvent&&this.detachEvent("ondragstart",h)}};c.dragstart=c.dragend={setup:function(){},teardown:function(){}}})(jQuery);
Base
1
return { type: AST.ExpressionStatement, expression: this.filterChain() }; },
Class
2
function normalizePath(path) { return ( pathCache.get(path) || pathCache.set( path, split(path).map(function(part) { return part.replace(CLEAN_QUOTES_REGEX, '$2') }) ) ) }
Base
1
function addCustomDNS() { var ip = $("#ip").val(); var domain = $("#domain").val(); showAlert("info"); $.ajax({ url: "scripts/pi-hole/php/customdns.php", method: "post", dataType: "json", data: { action: "add", ip: ip, domain: domain, token: token }, success: function (response) { if (response.success) { showAlert("success"); table.ajax.reload(); } else showAlert("error", response.message); }, error: function () { showAlert("error", "Error while adding this custom DNS entry"); } }); }
Class
2
function(){g.checked&&(null==e||e.checked)?p.removeAttribute("disabled"):p.setAttribute("disabled","disabled")}));mxUtils.br(c);return{getLink:function(){return g.checked?"blank"===p.value?"_blank":m:null},getEditInput:function(){return g},getEditSelect:function(){return p}}};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!=p&&p!=mxConstants.NONE?(x.style.border="1px solid black", x.style.backgroundColor=p):(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"));
Base
1
e},ConnectionPointsDialog=function(b,e){function f(){null!=m&&m.destroy()}var c=document.createElement("div");c.style.userSelect="none";var m=null;this.init=function(){function n(F,H){F=new mxCell("",new mxGeometry(F,H,6,6),"shape=mxgraph.basic.x;fillColor=#29b6f2;strokeColor=#29b6f2;points=[];rotatable=0;resizable=0;connectable=0;editable=0;");F.vertex=!0;F.cp=!0;return p.addCell(F)}function v(F){F=p.getSelectionCells();p.deleteCells(F)}function d(){var F=parseInt(D.value)||0;F=0>F?0:100<F?100:F;
Class
2
function(){if(null!=this.marker&&(bb.apply(this),null!=this.state&&null!=this.linkHint)){var z=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(z=new mxRectangle(z.x,z.y,z.width,z.height),z.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(z.x+(z.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(z.y+z.height+Editor.hintOffset)+"px"}};var Pa=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){Pa.apply(this,arguments); 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
Sidebar.prototype.refresh = function() { var graph = this.editorUi.editor.graph; this.graph.stylesheet.styles = mxUtils.clone(graph.stylesheet.styles); this.container.innerHTML = ''; this.palettes = new Object(); this.init(); };
Base
1
$scope.provision = function() { $scope.isSaving = true; growl.info($sanitize('The node ' + $scope.node.nodeLabel + ' is being added to requisition ' + $scope.node.foreignSource + '. Please wait...')); var successMessage = $sanitize('The node ' + $scope.node.nodeLabel + ' has been added to requisition ' + $scope.node.foreignSource); RequisitionsService.quickAddNode($scope.node).then( function() { // success $scope.reset(); bootbox.dialog({ message: successMessage, title: 'Success', buttons: { main: { label: 'Ok', className: 'btn-secondary' } } }); }, $scope.errorHandler ); };
Base
1
"startWidth",this.defaultArrowWidth)};Ca.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Ca.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Ca);mxUtils.extend(Ra,mxActor);Ra.prototype.size=30;Ra.prototype.isRoundable=function(){return!0};Ra.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(v,parseFloat(mxUtils.getValue(this.style,
Base
1
Q.push(F);A.appendChild(F);var C=function(pa){Aa.style.display="none";ea.style.display="none";Z.style.left="30px";p(pa?-1:1);null==W&&(W=Ma);Z.scrollTop=0;Z.innerHTML="";S.spin(Z);var sa=function(ya,va,ra){H=0;S.stop();Ma=ya;ra=ra||{};var wa=0,fa;for(fa in ra)wa+=ra[fa].length;if(va)Z.innerHTML=va;else if(0==ya.length&&0==wa)Z.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found"));else if(Z.innerHTML="",0<wa){Aa.style.display="";Z.style.left="160px";Aa.innerHTML=""; Oa=0;Da={"draw.io":ya};for(fa in ra)Da[fa]=ra[fa];B()}else M(!0)};pa?q(I.value,sa):m(sa)};m&&(F=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){C()}),A.appendChild(F),Q.push(F));if(q){F=document.createElement("span");F.style.marginLeft="10px";F.innerHTML=mxUtils.htmlEntities(mxResources.get("search")+":");A.appendChild(F);var I=document.createElement("input");I.style.marginRight="10px";I.style.marginLeft="10px";I.style.width="220px";mxEvent.addListener(I,"keypress",function(pa){13==
Class
2
(g=j?b(g,a[d],d,a):a[d],j=!0,d+=f);return g}function Ga(a,b){var c=m.defaults.column,d=a.aoColumns.length,c=h.extend({},m.models.oColumn,c,{nTh:b?b:H.createElement("th"),sTitle:c.sTitle?c.sTitle:b?b.innerHTML:"",aDataSort:c.aDataSort?c.aDataSort:[d],mData:c.mData?c.mData:d,idx:d});a.aoColumns.push(c);c=a.aoPreSearchCols;c[d]=h.extend({},m.models.oSearch,c[d]);la(a,d,h(b).data())}function la(a,b,c){var b=a.aoColumns[b],d=a.oClasses,e=h(b.nTh);if(!b.sWidthOrig){b.sWidthOrig=e.attr("width")||null;var f= (e.attr("style")||"").match(/width:\s*(\d+[pxem%]+)/);f&&(b.sWidthOrig=f[1])}c!==k&&null!==c&&(fb(c),J(m.defaults.column,c),c.mDataProp!==k&&!c.mData&&(c.mData=c.mDataProp),c.sType&&(b._sManualType=c.sType),c.className&&!c.sClass&&(c.sClass=c.className),h.extend(b,c),F(b,c,"sWidth","sWidthOrig"),c.iDataSort!==k&&(b.aDataSort=[c.iDataSort]),F(b,c,"aDataSort"));var g=b.mData,j=Q(g),i=b.mRender?Q(b.mRender):null,c=function(a){return"string"===typeof a&&-1!==a.indexOf("@")};b._bAttrSrc=h.isPlainObject(g)&& (c(g.sort)||c(g.type)||c(g.filter));b.fnGetData=function(a,b,c){var d=j(a,b,k,c);return i&&b?i(d,b,a,c):d};b.fnSetData=function(a,b,c){return R(g)(a,b,c)};"number"!==typeof g&&(a._rowReadObject=!0);a.oFeatures.bSort||(b.bSortable=!1,e.addClass(d.sSortableNone));a=-1!==h.inArray("asc",b.asSorting);c=-1!==h.inArray("desc",b.asSorting);!b.bSortable||!a&&!c?(b.sSortingClass=d.sSortableNone,b.sSortingClassJUI=""):a&&!c?(b.sSortingClass=d.sSortableAsc,b.sSortingClassJUI=d.sSortJUIAscAllowed):!a&&c?(b.sSortingClass= d.sSortableDesc,b.sSortingClassJUI=d.sSortJUIDescAllowed):(b.sSortingClass=d.sSortable,b.sSortingClassJUI=d.sSortJUI)}function U(a){if(!1!==a.oFeatures.bAutoWidth){var b=a.aoColumns;Ha(a);for(var c=0,d=b.length;c<d;c++)b[c].nTh.style.width=b[c].sWidth}b=a.oScroll;(""!==b.sY||""!==b.sX)&&Z(a);v(a,null,"column-sizing",[a])}function $(a,b){var c=aa(a,"bVisible");return"number"===typeof c[b]?c[b]:null}function ba(a,b){var c=aa(a,"bVisible"),c=h.inArray(b,c);return-1!==c?c:null}function ca(a){return aa(a,
Base
1
Graph.prototype.openLink=function(b,e,k){var n=window;try{if("_self"==e&&window!=window.top)window.location.href=b;else if(b.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==b.charAt(this.baseUrl.length)&&"_top"==e&&window==window.top){var D=b.split("#")[1];window.location.hash=="#"+D&&(window.location.hash="");window.location.hash=D}else n=window.open(b,null!=e?e:"_blank"),null==n||k||(n.opener=null)}catch(t){}return n};
Base
1
names = input.files? input.files : [{ name: $(input).val().replace(/^(?:.+[\\\/])?([^\\\/]+)$/, '$1') }]; //names = $.map(names, function(file){return file.name? { name: file.name } : null ;}); dfds.push(self.uploads.checkExists(names, target, self).done( function(res, res2){ renames = res; hashes = res2; cnt = $.map(names, function(file){return !file._remove? file : null ;}).length; if (cnt != names.length) { cnt = 0; } } )); } cnt = input.files ? input.files.length : 1; form.append(input); } else { return dfrd.reject(); } $.when.apply($, dfds).done(function() { if (cnt < 1) { return dfrd.reject(); } form.append('<input type="hidden" name="'+(self.newAPI ? 'target' : 'current')+'" value="'+target+'"/>') .append('<input type="hidden" name="html" value="1"/>') .append('<input type="hidden" name="node" value="'+self.id+'"/>') .append($(input).attr('name', 'upload[]')); if (renames.length > 0) { $.each(renames, function(i, rename) { form.append('<input type="hidden" name="renames[]" value="'+self.escape(rename)+'"/>'); }); form.append('<input type="hidden" name="suffix" value="'+fm.options.backupSuffix+'"/>'); } if (hashes) { $.each(renames, function(i, v) { form.append('<input type="hidden" name="['+i+']" value="'+self.escape(v)+'"/>'); }); } $.each(self.options.onlyMimes||[], function(i, mime) { form.append('<input type="hidden" name="mimes[]" value="'+self.escape(mime)+'"/>'); }); $.each(self.options.customData, function(key, val) { form.append('<input type="hidden" name="'+key+'" value="'+self.escape(val)+'"/>'); }); form.appendTo('body'); iframe.appendTo('body'); }); return dfrd; }
Base
1
this.unitListener=function(t,z){k.setUnit(z.getProperty("unit"))};y.addListener(mxEvent.SIZE,e);y.container.addEventListener("scroll",c);y.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(t){l=t;p.style.background=l.bkgClr;B()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(t,z,L,C){if(f&&4<t.height|| !f&&4<t.width){if(null!=k.guidePart)try{x.putImageData(k.guidePart.imgData1,k.guidePart.x1,k.guidePart.y1),x.putImageData(k.guidePart.imgData2,k.guidePart.x2,k.guidePart.y2),x.putImageData(k.guidePart.imgData3,k.guidePart.x3,k.guidePart.y3)}catch(U){}var D=k.origGuideMove.apply(this,arguments);try{x.lineWidth=.5;x.strokeStyle=l.guideClr;x.setLineDash([2]);if(f){var G=t.y+D.y+g-this.graph.container.scrollTop;var P=0;var K=G+t.height/2;var F=g/2;var H=G+t.height;var S=0;var V=x.getImageData(P,G-1,g, 3);A(P,G,g,G);G--;var M=x.getImageData(F,K-1,g,3);A(F,K,g,K);K--;var W=x.getImageData(S,H-1,g,3);A(S,H,g,H);H--}else G=0,P=t.x+D.x+g-this.graph.container.scrollLeft,K=g/2,F=P+t.width/2,H=0,S=P+t.width,V=x.getImageData(P-1,G,3,g),A(P,G,P,g),P--,M=x.getImageData(F-1,K,3,g),A(F,K,F,g),F--,W=x.getImageData(S-1,H,3,g),A(S,H,S,g),S--;if(null==k.guidePart||k.guidePart.x1!=P||k.guidePart.y1!=G)k.guidePart={imgData1:V,x1:P,y1:G,imgData2:M,x2:F,y2:K,imgData3:W,x3:S,y3:H}}catch(U){}}else D=k.origGuideMove.apply(this, arguments);return D};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var t=k.origGuideDestroy.apply(this,arguments);if(null!=k.guidePart)try{x.putImageData(k.guidePart.imgData1,k.guidePart.x1,k.guidePart.y1),x.putImageData(k.guidePart.imgData2,k.guidePart.x2,k.guidePart.y2),x.putImageData(k.guidePart.imgData3,k.guidePart.x3,k.guidePart.y3),k.guidePart=null}catch(z){}return t}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;
Base
1
R=0;R<N.length;R++)if(null==E||null!=E[N[R]])Q[N[R]]=!0,J.push(N[R]);E=Q}else return[]}return J};Graph.prototype.getTagsForCells=function(u){for(var E=[],J={},T=0;T<u.length;T++){var N=this.getTagsForCell(u[T]);if(0<N.length){N=N.split(" ");for(var Q=0;Q<N.length;Q++)null==J[N[Q]]&&(J[N[Q]]=!0,E.push(N[Q]))}}return E};Graph.prototype.getTagsForCell=function(u){return this.getAttributeForCell(u,"tags","")};Graph.prototype.addTagsForCells=function(u,E){if(0<u.length&&0<E.length){this.model.beginUpdate();
Base
1
this.spacing=0}function Ca(){mxArrowConnector.call(this);this.spacing=0}function Ra(){mxActor.call(this)}function ab(){mxRectangleShape.call(this)}function Ka(){mxActor.call(this)}function bb(){mxActor.call(this)}function Pa(){mxActor.call(this)}function Za(){mxActor.call(this)}function z(){mxActor.call(this)}function L(){mxActor.call(this)}function M(){mxActor.call(this)}function T(){mxActor.call(this)}function ca(){mxActor.call(this)}function ia(){mxActor.call(this)}function ma(){mxEllipse.call(this)}
Class
2
http.withinCookieDomain = function(url, cookie) { var rval = false; // cookie may be null, a cookie object, or a domain string var domain = (cookie === null || typeof cookie === 'string') ? cookie : cookie.domain; // any domain will do if(domain === null) { rval = true; } else if(domain.charAt(0) === '.') { // ensure domain starts with a '.' // parse URL as necessary if(typeof url === 'string') { url = http.parseUrl(url); } // add '.' to front of URL host to match against domain var host = '.' + url.host; // if the host ends with domain then it falls within it var idx = host.lastIndexOf(domain); if(idx !== -1 && (idx + domain.length === host.length)) { rval = true; } } return rval; };
Base
1
function iframeLoaded() { var iframes = Array.from(document.querySelectorAll('iframe')); return Promise.all(iframes.filter(function(iframe) { return iframe.src; }).map(function(iframe) { return new Promise(function(resolve, reject) { iframe.addEventListener('load', () => { resolve(); }, true); iframe.addEventListener('error', reject, true); }); })).then(delay(sysend.timeout)); // delay is required, something with browser is not intitled properly // the number was pick by experimentation }
Class
2
Omeka.Items.addTagElement = function (tag) { var tagLi = $('<li/>'); tagLi.after(" "); var undoButton = $('<span class="undo-remove-tag"><a href="#">Undo</a></span>').appendTo(tagLi); var deleteButton = $('<span class="remove-tag"><a href="#">Remove</a></span>').appendTo(tagLi); tagLi.prepend('<span class="tag">' + tag + '</span>'); if($('#all-tags-list').length != 0) { $('#all-tags-list').append(tagLi); } else { $('#all-tags').append($('<h3>All Tags</h3><div class="tag-list"><ul id="all-tags-list"></ul></div>')); $('#all-tags-list').append(tagLi); } Omeka.Items.updateTagsField(); return false; };
Base
1
left = { type: AST.LogicalExpression, operator: '||', left: left, right: this.logicalAND() }; } return left; },
Class
2
mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var e=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=e){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var f=mxFreehand.prototype.NORMAL_SMOOTHING,c=null,m=[],n,v=[],d,g=!1,k=!0,l=!0,p=!0,q=!0,x=[],y=!1,A=!0,B=!1,I={size:12,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},O=!1;this.setClosedPath=function(K){g=K};this.setAutoClose=function(K){k=K};this.setAutoInsert=
Base
1
parseInt(u.getAttribute("height"))+6),E=u.getAttribute("viewBox"),null!=E&&0<E.length&&(E=E.split(" "),3<E.length&&(w=parseFloat(E[2])+6,h=parseFloat(E[3])+6,u.setAttribute("viewBox",E[0]+" "+E[1]+" "+w+" "+h))))));return Q};Graph.prototype.setShadowVisible=function(u,E){mxClient.IS_SVG&&!mxClient.IS_SF&&(E=null!=E?E:!0,(this.shadowVisible=u)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),E&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};
Class
2
!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(c,e,g,k,m,q){"text/xml"!=g||/(\.drawio)$/i.test(e)||/(\.xml)$/i.test(e)||/(\.svg)$/i.test(e)||/(\.html)$/i.test(e)||(e=e+"."+(null!=q?q:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)c=k?this.base64ToBlob(c,g):new Blob([c],{type:g}),navigator.msSaveOrOpenBlob(c,e);else if(mxClient.IS_IE)g=window.open("about:blank","_blank"),null==g?mxUtils.popup(c,!0):(g.document.write(c), g.document.close(),g.document.execCommand("SaveAs",!0,e),g.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==g||"image/"!=g.substring(0,6)?this.showTextDialog(e+":",c):this.openInNewWindow(c,g,k);else{var v=document.createElement("a");q=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof v.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var x=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);q=65==(x?parseInt(x[2],10): !1)?!1:q}if(q||this.isOffline()){v.href=URL.createObjectURL(k?this.base64ToBlob(c,g):new Blob([c],{type:g}));q?v.download=e:v.setAttribute("target","_blank");document.body.appendChild(v);try{window.setTimeout(function(){URL.revokeObjectURL(v.href)},2E4),v.click(),v.parentNode.removeChild(v)}catch(A){}}else this.createEchoRequest(c,e,g,k,m).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(c,e,g,k,m,q){c="xml="+encodeURIComponent(c);return new mxXmlRequest(SAVE_URL,c+(null!=
Class
2
Ea.prototype.constraints=null;mxUtils.extend(Da,mxConnector);Da.prototype.origPaintEdgeShape=Da.prototype.paintEdgeShape;Da.prototype.paintEdgeShape=function(c,l,x){for(var p=[],v=0;v<l.length;v++)p.push(mxUtils.clone(l[v]));v=c.state.dashed;var A=c.state.fixDash;Da.prototype.origPaintEdgeShape.apply(this,[c,p,x]);3<=c.state.strokeWidth&&(p=mxUtils.getValue(this.style,"fillColor",null),null!=p&&(c.setStrokeColor(p),c.setStrokeWidth(c.state.strokeWidth-2),c.setDashed(v,A),Da.prototype.origPaintEdgeShape.apply(this, [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();
Class
2
$scope.initialize = function() { growl.success('Retrieving definition for requisition ' + $scope.foreignSource + '...'); RequisitionsService.getForeignSourceDefinition($scope.foreignSource).then( function(foreignSourceDef) { // success $scope.foreignSourceDef = foreignSourceDef; // Updating pagination variables for detectors. $scope.filteredDetectors = $scope.foreignSourceDef.detectors; $scope.updateFilteredDetectors(); // Updating pagination variables for policies. $scope.filteredPolicies = $scope.foreignSourceDef.policies; $scope.updateFilteredPolicies(); }, $scope.errorHandler ); };
Base
1
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
x[D].apply(this,arguments);null!=G&&C.push(G)}b.sidebar.showEntries(0<C.length?C.join(";"):"",B.checked);b.hideDialog()});g.className="geBtn gePrimaryBtn";f=document.createElement("div");f.style.marginTop="26px";f.style.textAlign="right"}b.editor.cancelFirst?(f.appendChild(n),f.appendChild(g)):(f.appendChild(g),f.appendChild(n));c.appendChild(f);this.container=c},PluginsDialog=function(b,e,f,c){function m(){g=!0;if(0==d.length)v.innerHTML=mxUtils.htmlEntities(mxResources.get("noPlugins"));else{v.innerHTML= "";for(var y=0;y<d.length;y++){var A=document.createElement("span");A.style.whiteSpace="nowrap";var B=document.createElement("span");B.className="geSprite geSprite-delete";B.style.position="relative";B.style.cursor="pointer";B.style.top="5px";B.style.marginRight="4px";B.style.display="inline-block";A.appendChild(B);mxUtils.write(A,d[y]);v.appendChild(A);mxUtils.br(v);mxEvent.addListener(B,"click",function(I){return function(){b.confirm(mxResources.get("delete")+' "'+d[I]+'"?',function(){null!=f&& f(d[I]);d.splice(I,1);m()})}}(y))}}}var n=document.createElement("div"),v=document.createElement("div");v.style.height="180px";v.style.overflow="auto";var d=mxSettings.getPlugins().slice(),g=!1;n.appendChild(v);m();g=!1;var k=mxUtils.button(mxResources.get("add"),null!=e?function(){e(function(y){y&&0>mxUtils.indexOf(d,y)&&d.push(y);m()})}:function(){var y=document.createElement("div"),A=document.createElement("span");A.style.marginTop="6px";mxUtils.write(A,mxResources.get("builtinPlugins")+": ");
Base
1
_activate: function( event ) { var draggable = $.ui.ddmanager.current; if ( this.options.activeClass ) { this.element.addClass( this.options.activeClass ); } if ( draggable ){ this._trigger( "activate", event, this.ui( draggable ) ); } },
Base
1
function inspect( dataType ) { var selected; inspected[ dataType ] = true; jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); if( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) { options.dataTypes.unshift( dataTypeOrTransport ); inspect( dataTypeOrTransport ); return false; } else if ( seekingTransport ) { return !( selected = dataTypeOrTransport ); } }); return selected; }
Base
1
var CommentsWindow=function(b,e,f,c,m,n){function v(){for(var I=O.getElementsByTagName("div"),F=0,H=0;H<I.length;H++)"none"!=I[H].style.display&&I[H].parentNode==O&&F++;M.style.display=0==F?"block":"none"}function d(I,F,H,R){function W(){F.removeChild(U);F.removeChild(X);V.style.display="block";J.style.display="block"}z={div:F,comment:I,saveCallback:H,deleteOnCancel:R};var J=F.querySelector(".geCommentTxt"),V=F.querySelector(".geCommentActionsList"),U=document.createElement("textarea");U.className= "geCommentEditTxtArea";U.style.minHeight=J.offsetHeight+"px";U.value=I.content;F.insertBefore(U,J);var X=document.createElement("div");X.className="geCommentEditBtns";var t=mxUtils.button(mxResources.get("cancel"),function(){R?(F.parentNode.removeChild(F),v()):W();z=null});t.className="geCommentEditBtn";X.appendChild(t);var E=mxUtils.button(mxResources.get("save"),function(){J.innerHTML="";I.content=U.value;mxUtils.write(J,I.content);W();H(I);z=null});mxEvent.addListener(U,"keydown",mxUtils.bind(this, function(K){mxEvent.isConsumed(K)||((mxEvent.isControlDown(K)||mxClient.IS_MAC&&mxEvent.isMetaDown(K))&&13==K.keyCode?(E.click(),mxEvent.consume(K)):27==K.keyCode&&(t.click(),mxEvent.consume(K)))}));E.focus();E.className="geCommentEditBtn gePrimaryBtn";X.appendChild(E);F.insertBefore(X,J);V.style.display="none";J.style.display="none";U.focus()}function g(I,F){F.innerHTML="";I=new Date(I.modifiedDate);var H=b.timeSince(I);null==H&&(H=mxResources.get("lessThanAMinute"));mxUtils.write(F,mxResources.get("timeAgo",
Base
1