code
stringlengths 12
2.05k
| label_name
stringclasses 5
values | label
int64 0
4
|
---|---|---|
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 |
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: | Base | 1 |
var apply = function(color, disableUpdate, forceUpdate)
{
if (!applying)
{
var defaultValue = (defaultColor == 'null') ? null : defaultColor;
applying = true;
color = (/(^#?[a-zA-Z0-9]*$)/.test(color)) ? color : defaultValue;
var tempColor = (color != null && color != mxConstants.NONE) ? color : defaultValue;
var div = document.createElement('div');
div.style.width = '36px';
div.style.height = '12px';
div.style.margin = '3px';
div.style.border = '1px solid black';
div.style.backgroundColor = (tempColor == 'default') ? defaultColorValue : tempColor;
btn.innerHTML = '';
btn.appendChild(div);
if (color != null && color != mxConstants.NONE && color.length > 1 && typeof color === 'string')
{
var clr = (color.charAt(0) == '#') ? color.substring(1).toUpperCase() : color;
var name = ColorDialog.prototype.colorNames[clr];
btn.setAttribute('title', (name != null) ? name + ' (' + title + ')' : title);
}
if (color != null && color != mxConstants.NONE)
{
cb.setAttribute('checked', 'checked');
cb.defaultChecked = true;
cb.checked = true;
}
else
{
cb.removeAttribute('checked');
cb.defaultChecked = false;
cb.checked = false;
}
btn.style.display = (cb.checked || hideCheckbox) ? '' : 'none';
if (callbackFn != null)
{
callbackFn(color == 'null' ? null : color);
}
value = color;
if (!disableUpdate)
{
// Checks if the color value needs to be updated in the model
if (forceUpdate || hideCheckbox || getColorFn() != value)
{
setColorFn(value == 'null' ? null : value, value);
}
}
applying = false;
}
}; | Base | 1 |
var isin = function(e) {
return (e.target.nodeName !== 'TEXTAREA' && e.target.nodeName !== 'INPUT' && $(e.target).closest('div.ui-dialog-content').length === 0);
} | Base | 1 |
(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var f=EditorUi.initTheme;EditorUi.initTheme=function(){f.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(d,u,t,D){var c=u.y,e=u.x,g=!1,k=!1;if(null!=this.states&&null!=d&&null!=u){var m=this,q=new mxCellState,v=this.graph.getView().scale,x=Math.max(2,this.getGuideTolerance()/2);q.x=d.x+e;q.y=d.y+c;q.width=d.width;q.height=d.height;for(var A=[],z=[],L=0;L<this.states.length;L++){var M=this.states[L];M instanceof mxCellState&&(D||!this.graph.isCellSelected(M.cell))&&((q.x>=M.x&&q.x<=M.x+M.width||M.x>=q.x&&M.x<=q.x+q.width)&&(q.y> | Base | 1 |
c;else if("mxfile"==c.nodeName){var k=c.getElementsByTagName("diagram");if(0<k.length){g=k[0];var m=e.getGlobalVariable;e.getGlobalVariable=function(q){return"page"==q?g.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==q?1:m.apply(this,arguments)}}}null!=g&&(c=Editor.parseDiagramNode(g))}k=this.editor.graph;try{this.editor.graph=e,this.editor.setGraphXml(c)}catch(q){}finally{this.editor.graph=k}return c};EditorUi.prototype.getPngFileProperties=function(c){var e=1,g=0;if(null!=
c){if(c.hasAttribute("scale")){var k=parseFloat(c.getAttribute("scale"));!isNaN(k)&&0<k&&(e=k)}c.hasAttribute("border")&&(k=parseInt(c.getAttribute("border")),!isNaN(k)&&0<k&&(g=k))}return{scale:e,border:g}};EditorUi.prototype.getEmbeddedPng=function(c,e,g,k,m){try{var q=this.editor.graph,v=null!=q.themes&&"darkTheme"==q.defaultThemeName,x=null;if(null!=g&&0<g.length)q=this.createTemporaryGraph(v?q.getDefaultStylesheet():q.getStylesheet()),document.body.appendChild(q.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement, | Base | 1 |
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= | Base | 1 |
u,E.value=T,E.scale=J,E.redraw())}};var K=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){K.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var u=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||
this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",u.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,u.ownerSVGElement))}};var F=Graph.prototype.refresh;Graph.prototype.refresh=function(){F.apply(this, | Class | 2 |
l,x,p,v){l=Math.min(p,v/2);c.moveTo(0,0);c.lineTo(p-l,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p-l,v);c.lineTo(0,v);c.close();c.end()};mxCellRenderer.registerShape("delay",Ta);mxUtils.extend(za,mxActor);za.prototype.size=.2;za.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(v,p);var A=Math.max(0,Math.min(l,l*parseFloat(mxUtils.getValue(this.style,"size",this.size))));l=(v-A)/2;x=l+A;var B=(p-A)/2;A=B+A;c.moveTo(0,l);c.lineTo(B,l);c.lineTo(B,0);c.lineTo(A,0);c.lineTo(A,l);c.lineTo(p,l);c.lineTo(p,x);
c.lineTo(A,x);c.lineTo(A,v);c.lineTo(B,v);c.lineTo(B,x);c.lineTo(0,x);c.close();c.end()};mxCellRenderer.registerShape("cross",za);mxUtils.extend(wa,mxActor);wa.prototype.size=.25;wa.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(p,v/2);x=Math.min(p-l,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*p);c.moveTo(0,v/2);c.lineTo(x,0);c.lineTo(p-l,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p-l,v);c.lineTo(x,v);c.close();c.end()};mxCellRenderer.registerShape("display",wa);mxUtils.extend(Ea, | Base | 1 |
1?0:Ua.y*ia);this.shape.bounds.height=ma.height-(Ta==Ma.length-1?0:(Ua.height+Ua.y)*ia)}this.shape.redraw()}};var Ya=!1;za.setPosition=function(Ua,eb,jb){La=Math.max(Graph.minTableColumnWidth-Ea.width,eb.x-Ua.x-Ea.width);Ya=mxEvent.isShiftDown(jb.getEvent());null==Da||Ya||(La=Math.min(La,Da.width-Graph.minTableColumnWidth))};za.execute=function(Ua){if(0!=La)T.setTableColumnWidth(this.state.cell,La,Ya);else if(!M.blockDelayedSelection){var eb=T.getCellAt(Ua.getGraphX(),Ua.getGraphY())||ma.cell;T.graphHandler.selectCellForEvent(eb, | Base | 1 |
(function($,e,t){"$:nomunge";var i=[],n=$.resize=$.extend($.resize,{}),a,r=false,s="setTimeout",u="resize",m=u+"-special-event",o="pendingDelay",l="activeDelay",f="throttleWindow";n[o]=200;n[l]=20;n[f]=true;$.event.special[u]={setup:function(){if(!n[f]&&this[s]){return false}var e=$(this);i.push(this);e.data(m,{w:e.width(),h:e.height()});if(i.length===1){a=t;h()}},teardown:function(){if(!n[f]&&this[s]){return false}var e=$(this);for(var t=i.length-1;t>=0;t--){if(i[t]==this){i.splice(t,1);break}}e.removeData(m);if(!i.length){if(r){cancelAnimationFrame(a)}else{clearTimeout(a)}a=null}},add:function(e){if(!n[f]&&this[s]){return false}var i;function a(e,n,a){var r=$(this),s=r.data(m)||{};s.w=n!==t?n:r.width();s.h=a!==t?a:r.height();i.apply(this,arguments)}if($.isFunction(e)){i=e;return a}else{i=e.handler;e.handler=a}}};function h(t){if(r===true){r=t||1}for(var s=i.length-1;s>=0;s--){var l=$(i[s]);if(l[0]==e||l.is(":visible")){var f=l.width(),c=l.height(),d=l.data(m);if(d&&(f!==d.w||c!==d.h)){l.trigger(u,[d.w=f,d.h=c]);r=t||true}}else{d=l.data(m);d.w=0;d.h=0}}if(a!==null){if(r&&(t==null||t-r<1e3)){a=e.requestAnimationFrame(h)}else{a=setTimeout(h,n[o]);r=false}}}if(!e.requestAnimationFrame){e.requestAnimationFrame=function(){return e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame||function(t,i){return e.setTimeout(function(){t((new Date).getTime())},n[l])}}()}if(!e.cancelAnimationFrame){e.cancelAnimationFrame=function(){return e.webkitCancelRequestAnimationFrame||e.mozCancelRequestAnimationFrame||e.oCancelRequestAnimationFrame||e.msCancelRequestAnimationFrame||clearTimeout}()}})(jQuery,this); | Base | 1 |
ba,ja,ia){function ma(La,Ta){null==Ja?(Ga=La,Ga=/^https?:\/\//.test(Ga)&&!b.editor.isCorsEnabledForUrl(Ga)?PROXY_URL+"?url="+encodeURIComponent(Ga):TEMPLATE_PATH+"/"+Ga,mxUtils.get(Ga,mxUtils.bind(this,function(Ua){200<=Ua.getStatus()&&299>=Ua.getStatus()&&(Ja=Ua.getText());Ta(Ja,Ga)}))):Ta(Ja,Ga)}function qa(La,Ta,Ua){if(null!=La&&mxUtils.isAncestorNode(document.body,na)){La=mxUtils.parseXml(La);La=Editor.parseDiagramNode(La.documentElement);var Za=new mxCodec(La.ownerDocument),Wa=new mxGraphModel;
Za.decode(La,Wa);La=Wa.root.getChildAt(0).children;b.sidebar.createTooltip(na,La,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!=ya?mxResources.get(ya,null,ya):null,!0,new mxPoint(Ta,Ua),!0,function(){Ya=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;y(na,null,null,pa,fa,ia)},!0,!1)}}function oa(La,Ta){null==pa||Ra|| | Base | 1 |
mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var f=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=f){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var l=mxFreehand.prototype.NORMAL_SMOOTHING,d=null,u=[],t,D=[],c,e=!1,g=!0,k=!0,m=!0,q=!0,v=[],x=!1,A=!0,z=!1,L={size:12,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},M=!1;this.setClosedPath=function(J){e=J};this.setAutoClose=function(J){g=J};this.setAutoInsert= | Base | 1 |
var CommentsWindow=function(b,e,f,c,m,n){function v(){for(var K=O.getElementsByTagName("div"),F=0,H=0;H<K.length;H++)"none"!=K[H].style.display&&K[H].parentNode==O&&F++;t.style.display=0==F?"block":"none"}function d(K,F,H,S){function V(){F.removeChild(U);F.removeChild(X);W.style.display="block";M.style.display="block"}A={div:F,comment:K,saveCallback:H,deleteOnCancel:S};var M=F.querySelector(".geCommentTxt"),W=F.querySelector(".geCommentActionsList"),U=document.createElement("textarea");U.className= | Base | 1 |
urlParams.sketch&&1E3<=n||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])k(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));var U=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==U.embedViewport)mxUtils.fit(this.div);else{var za=parseInt(this.div.offsetLeft),wa=parseInt(this.div.offsetWidth),Ea=U.embedViewport.x+
U.embedViewport.width,Da=parseInt(this.div.offsetTop),La=parseInt(this.div.offsetHeight),Ya=U.embedViewport.y+U.embedViewport.height;this.div.style.left=Math.max(U.embedViewport.x,Math.min(za,Ea-wa))+"px";this.div.style.top=Math.max(U.embedViewport.y,Math.min(Da,Ya-La))+"px";this.div.style.height=Math.min(U.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(U.embedViewport.width,parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes", | Class | 2 |
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 |
window.ocJSON=function(json){var jsonString=parse(json);return JSON.parse(jsonString);};}(window); | Base | 1 |
d.style.width="300px";d.style.display="inline-flex";d.style.justifyContent="center";d.style.alignItems="center";d.style.position="absolute";var g=document.createElement("img");g.onload=function(){function C(){l.model.setStyle(x,y+m())}l=new Graph(k);l.autoExtend=!1;l.autoScroll=!1;l.setGridEnabled(!1);l.setEnabled(!0);l.setPanning(!1);l.setConnectable(!1);l.getRubberband().setEnabled(!1);l.graphHandler.allowLivePreview=!1;var D=l.createVertexHandler;l.createVertexHandler=function(){var J=D.apply(this,
arguments);J.livePreview=!1;return J};if(null!=f)try{if("inset"==f.substring(0,5)){var G=x.geometry,P=g.width,K=g.height,F=(300-P)/2,H=(300-K)/2,S=f.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),V=parseFloat(S[0]),M=parseFloat(S[1]),W=parseFloat(S[2]),U=parseFloat(S[3]);isFinite(V)&&isFinite(M)&&isFinite(W)&&isFinite(U)?(G.x=U/100*P+F,G.y=V/100*K+H,G.width=(100-M)/100*P+F-G.x,G.height=(100-W)/100*K+H-G.y,"round"==S[4]?"50%"==S[5]?I.setAttribute("checked","checked"):(q=parseInt(S[5]),t.value=q,B.setAttribute("checked",
"checked"),O.style.visibility="visible"):A.setAttribute("checked","checked")):f=null}else f=null}catch(J){}x.style=y+(f?f:m());x.vertex=!0;l.addCell(x,null,null,null,null);l.selectAll();l.addListener(mxEvent.CELLS_MOVED,C);l.addListener(mxEvent.CELLS_RESIZED,C);var X=l.graphHandler.mouseUp,u=l.graphHandler.mouseDown;l.graphHandler.mouseUp=function(){X.apply(this,arguments);k.style.backgroundColor="#fff9"};l.graphHandler.mouseDown=function(){u.apply(this,arguments);k.style.backgroundColor=""};l.dblClick=
function(){};var E=l.getSelectionModel().changeSelection;l.getSelectionModel().changeSelection=function(){E.call(this,[x],[x])}};g.onerror=function(){g.onload=null;g.src=Editor.errorImage};g.setAttribute("src",e);g.style.maxWidth="300px";g.style.maxHeight="300px";d.appendChild(g);v.appendChild(d);var k=document.createElement("div");k.style.width="300px";k.style.height="300px";k.style.overflow="hidden";k.style.backgroundColor="#fff9";v.appendChild(k);var l=null,p=new mxGeometry(100,100,100,100),q= | Class | 2 |
Array.prototype.push.apply(N.shape.customProperties,Editor.commonEdgeProperties)),T(N.shape.customProperties));u=u.getAttribute("customProperties");if(null!=u)try{T(JSON.parse(u))}catch(Q){}}};var x=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var u=this.editorUi.getSelectionState();"image"!=u.style.shape&&!u.containsLabel&&0<u.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));x.apply(this,arguments);if(Editor.enableCustomProperties){for(var E=
{},J=u.vertices,T=u.edges,N=0;N<J.length;N++)this.findCommonProperties(J[N],E,0==N);for(N=0;N<T.length;N++)this.findCommonProperties(T[N],E,0==J.length&&0==N);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(E).length&&this.container.appendChild(this.addProperties(this.createPanel(),E,u))}};var y=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(u){this.addActions(u,["copyStyle","pasteStyle"]);return y.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed= | Class | 2 |
function downloadNoteRevision(req, res) {
const noteRevision = becca.getNoteRevision(req.params.noteRevisionId);
if (noteRevision.noteId !== req.params.noteId) {
return res.status(400).send(`Note revision ${req.params.noteRevisionId} does not belong to note ${req.params.noteId}`);
}
if (noteRevision.isProtected && !protectedSessionService.isProtectedSessionAvailable()) {
return res.status(401).send("Protected session not available");
}
const filename = getRevisionFilename(noteRevision);
res.setHeader('Content-Disposition', utils.getContentDisposition(filename));
res.setHeader('Content-Type', noteRevision.mime);
res.send(noteRevision.getContent());
} | Base | 1 |
setup: function () {
if (this.model.get('data')) {
var data = this.model.get('data');
this.assignedUserId = data.assignedUserId || null;
this.assignedUserName = data.assignedUserName || null;
this.messageData['assignee'] = '<a href="#User/view/' + this.assignedUserId + '">' + this.assignedUserName + '</a>';
var isYou = false;
if (this.isUserStream) {
if (this.assignedUserId == this.getUser().id) {
isYou = true;
}
}
if (this.assignedUserId) {
this.messageName = 'createAssigned';
if (this.isThis) {
this.messageName += 'This';
if (this.assignedUserId == this.model.get('createdById')) {
this.messageName += 'Self';
}
} else {
if (this.assignedUserId == this.model.get('createdById')) {
this.messageName += 'Self';
} else {
if (isYou) {
this.messageName += 'You';
}
}
}
}
if (data.statusField) {
var statusField = this.statusField = data.statusField;
var statusValue = data.statusValue;
this.statusStyle = data.statusStyle || 'default';
this.statusText = this.getLanguage().translateOption(statusValue, statusField, this.model.get('parentType'));
}
}
this.createMessage();
}, | Base | 1 |
DotObject.prototype._cleanup = function (obj) {
var ret
var i
var keys
var root
if (this.cleanup.length) {
for (i = 0; i < this.cleanup.length; i++) {
keys = this.cleanup[i].split('.')
root = keys.splice(0, -1).join('.')
ret = root ? this.pick(root, obj) : obj
ret = ret[keys[0]].filter(function (v) { return v !== undefined })
this.set(this.cleanup[i], ret, obj)
}
this.cleanup = []
}
} | Class | 2 |
null,null,function(N){console.log(N)},600,null,null,null,null,null,F):(v(H,void 0),n(H))}function I(N){function Q(R){E.style.background="transparent";E.innerHTML="";var Y=document.createElement("div");Y.className="odPreviewStatus";mxUtils.write(Y,R);E.appendChild(Y);P.stop()}if(null!=E)if(E.style.background="transparent",E.innerHTML="",null==N||N.folder||/\.drawiolib$/.test(N.name))Q(mxResources.get("noPreview"));else try{null!=N.remoteItem&&(N=N.remoteItem),U=N,P.spin(E),A(N,function(R){P.stop();
if(U==N)if("mxlibrary"==R.documentElement.nodeName)Q(mxResources.get("noPreview"));else{var Y=R.getElementsByTagName("diagram");F=AspectDialog.prototype.createViewer(E,0==Y.length?R.documentElement:Y[0],null,"transparent")}},function(){H=null;Q(mxResources.get("notADiagramFile"))})}catch(R){H=null,Q(mxResources.get("notADiagramFile"))}}function O(){var N=y(".odFilesBreadcrumb");if(null!=N){N.innerHTML="";for(var Q=0;Q<M.length-1;Q++){var R=document.createElement("span");R.className="odBCFolder";R.innerHTML= | Class | 2 |
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)} | Base | 1 |
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 |
accessToken: chance.hash()
},
function (err, user) {
if (err) return apiUtil.sendApiError(res, 500, err.message)
savedId = user._id
return user.populate('role', next)
}
)
}, | Base | 1 |
Na+="@import url("+La+");\n":Fa+='@font-face {\nfont-family: "'+Da+'";\nsrc: url("'+La+'");\n}\n'}Ga.appendChild(za.createTextNode(Na+Fa));ra.getElementsByTagName("defs")[0].appendChild(Ga)}null!=ja&&(this.shapeBackgroundColor=Ha,this.shapeForegroundColor=Ba,this.stylesheet=ja,this.refresh());return ra};var C=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var u=C.apply(this,arguments);if(this.mathEnabled){var E=u.drawText;u.drawText=function(J,T){if(null!=J.text&&
null!=J.text.value&&J.text.checkBounds()&&(mxUtils.isNode(J.text.value)||J.text.dialect==mxConstants.DIALECT_STRICTHTML)){var N=J.text.getContentNode();if(null!=N){N=N.cloneNode(!0);if(N.getElementsByTagNameNS)for(var Q=N.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<Q.length;)Q[0].parentNode.removeChild(Q[0]);null!=N.innerHTML&&(Q=J.text.value,J.text.value=N.innerHTML,E.apply(this,arguments),J.text.value=Q)}}else E.apply(this,arguments)}}return u};var D=mxCellRenderer.prototype.destroy; | Base | 1 |
parseArguments: function() {
var args = [];
if (this.peekToken().text !== ')') {
do {
args.push(this.filterChain());
} while (this.expect(','));
}
return args;
}, | Class | 2 |
EditorUi.prototype.createUi=function(){this.menubar=this.editor.chromeless?null:this.menus.createMenubar(this.createDiv("geMenubar"));null!=this.menubar&&this.menubarContainer.appendChild(this.menubar.container);null!=this.menubar&&(this.statusContainer=this.createStatusContainer(),this.editor.addListener("statusChanged",mxUtils.bind(this,function(){this.setStatusText(this.editor.getStatus())})),this.setStatusText(this.editor.getStatus()),this.menubar.container.appendChild(this.statusContainer),this.container.appendChild(this.menubarContainer));
this.sidebar=this.editor.chromeless?null:this.createSidebar(this.sidebarContainer);null!=this.sidebar&&this.container.appendChild(this.sidebarContainer);this.format=this.editor.chromeless||!this.formatEnabled?null:this.createFormat(this.formatContainer);null!=this.format&&this.container.appendChild(this.formatContainer);var a=this.editor.chromeless?null:this.createFooter();null!=a&&(this.footerContainer.appendChild(a),this.container.appendChild(this.footerContainer));null!=this.sidebar&&this.sidebarFooterContainer&&
this.container.appendChild(this.sidebarFooterContainer);this.container.appendChild(this.diagramContainer);null!=this.container&&null!=this.tabContainer&&this.container.appendChild(this.tabContainer);this.toolbar=this.editor.chromeless?null:this.createToolbar(this.createDiv("geToolbar"));null!=this.toolbar&&(this.toolbarContainer.appendChild(this.toolbar.container),this.container.appendChild(this.toolbarContainer));null!=this.sidebar&&(this.container.appendChild(this.hsplit),this.addSplitHandler(this.hsplit,
!0,0,mxUtils.bind(this,function(b){this.hsplitPosition=b;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var a=document.createElement("a");a.className="geItem geStatus";return a};EditorUi.prototype.setStatusText=function(a){this.statusContainer.innerHTML=a;0==this.statusContainer.getElementsByTagName("div").length&&(this.statusContainer.innerHTML="",a=this.createStatusDiv(a),this.statusContainer.appendChild(a))}; | Base | 1 |
"geCommentActionLnk";mxUtils.write(da,P);Y.appendChild(da);mxEvent.addListener(da,"click",function(ha){O(ha,J);ha.preventDefault();mxEvent.consume(ha)});T.appendChild(Y);R&&(Y.style.display="none")}function W(){function P(Y){O.push(R);if(null!=Y.replies)for(var da=0;da<Y.replies.length;da++)R=R.nextSibling,P(Y.replies[da])}var O=[],R=X;P(J);return{pdiv:R,replies:O}}function V(P,O,R,Y,da){function ha(){g(ua);J.addReply(aa,function(la){aa.id=la;J.replies.push(aa);m(ua);R&&R()},function(la){Z();k(ua); | Base | 1 |
__uuidv4() {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);
return v.toString(16);
});
} | Base | 1 |
function usercheck_init_mod(i, opt) {
var obj = document.getElementById('ajax_output_' + opt);
obj.innerHTML = '';
if (i.value.length < 1)
return;
var err = new Array();
if (i.value.match(/[^A-Za-z0-9_]/))
err[err.length] = 'Username can only contain letters, numbers and underscores';
if (i.value.length < 3)
err[err.length] = 'Username Too Short';
if (err != '') {
obj.style.color = '#ff0000';
obj.innerHTML = err.join('<br />');
return;
}
var pqr = i.value;
if (opt == '1')
ajax_call('Validator.php?u=' + i.value + 'user', usercheck_callback_p, usercheck_error);
if (opt == '2')
ajax_call('Validator.php?u=' + i.value + 'user', usercheck_callback_s, usercheck_error);
}
| Base | 1 |
"6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var v=Sidebar.prototype.getTooltipOffset;Sidebar.prototype.getTooltipOffset=function(B,F){if(null==this.editorUi.sidebarWindow||mxUtils.isAncestorNode(this.editorUi.picker,B)){var G=mxUtils.getOffset(this.editorUi.picker);G.x+=this.editorUi.picker.offsetWidth+4;G.y+=B.offsetTop-F.height/2+16;return G}var N=v.apply(this,arguments);G=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);N.x+=G.x-16;N.y+=G.y;return N};var x=Menus.prototype.createPopupMenu; | Base | 1 |
messageSchema.statics.getConversationWithObject = function (object, callback) {
if (!_.isObject(object)) {
return callback('Invalid Object (Must by of type Object) - MessageSchema.GetUserWithObject()', null)
}
var self = this
var deletedAt = null
var limit = object.limit === null ? 25 : object.limit
var page = object.page === null ? 0 : object.page
if (object.requestingUser) {
var userMetaIdx = _.findIndex(object.userMeta, function (item) {
return item.userId.toString() === object.requestingUser._id.toString()
})
if (userMetaIdx !== -1 && object.userMeta[userMetaIdx].deletedAt) {
deletedAt = new Date(object.userMeta[userMetaIdx].deletedAt)
}
}
var q = self
.model(COLLECTION)
.find({})
.sort('-createdAt')
.skip(page * limit)
.populate({
path: 'owner',
select: '_id username fullname email image lastOnline'
})
if (limit !== -1) {
q.limit(limit)
}
if (object.cid !== null) {
q.where({ conversation: object.cid })
}
if (deletedAt) {
q.where({ createdAt: { $gte: deletedAt } })
}
return q.exec(callback)
} | Base | 1 |
var unSet = function unSet(obj, path) {
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
var tracking = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
var internalPath = path;
options = _objectSpread({
"transformRead": returnWhatWasGiven,
"transformKey": returnWhatWasGiven,
"transformWrite": returnWhatWasGiven
}, options); // No object data
if (obj === undefined || obj === null) {
return;
} // No path string
if (!internalPath) {
return;
}
internalPath = clean(internalPath); // Path is not a string, throw error
if (typeof internalPath !== "string") {
throw new Error("Path argument must be a string");
}
if ((0, _typeof2["default"])(obj) !== "object") {
return;
}
var newObj = decouple(obj, options); // Path has no dot-notation, set key/value
if (isNonCompositePath(internalPath)) {
if (newObj.hasOwnProperty(unEscape(internalPath))) {
delete newObj[options.transformKey(unEscape(internalPath))];
return newObj;
}
tracking.returnOriginal = true;
return obj;
}
var pathParts = split(internalPath);
var pathPart = pathParts.shift();
var transformedPathPart = options.transformKey(unEscape(pathPart));
var childPart = newObj[transformedPathPart];
if (!childPart) {
// No child part available, nothing to unset!
tracking.returnOriginal = true;
return obj;
}
newObj[transformedPathPart] = unSet(childPart, pathParts.join('.'), options, tracking);
if (tracking.returnOriginal) {
return obj;
}
return newObj;
}; | Base | 1 |
"url("+mxWindow.prototype.normalizeImage+")";aa.style.backgroundPosition="top center";aa.style.backgroundRepeat="no-repeat";aa.setAttribute("title","Minimize");var va=!1,la=mxUtils.bind(this,function(){Q.innerHTML="";if(!va){var ca=function(ia,ma,qa){ia=B("",ia.funct,null,ma,ia,qa);ia.style.width="40px";ia.style.opacity="0.7";return ba(ia,null,"pointer")},ba=function(ia,ma,qa){null!=ma&&ia.setAttribute("title",ma);ia.style.cursor=null!=qa?qa:"default";ia.style.margin="2px 0px";Q.appendChild(ia);mxUtils.br(Q); | Base | 1 |
_UID_callback: function _UID_callback(event) {
// Copy to avoid changes, which may cause nm problems
var value = event === null ? null : jQuery.extend({},event);
// Make sure id is a string, check values
if(value)
{
this._values_check(value);
}
// Check for changing days in the grid view
if(!this._sameday_check(value))
{
// May need to update parent to remove out-of-view events
var parent = this._parent;
this._parent.removeChild(this);
if(event === null && parent && parent._out_of_view)
{
parent._out_of_view();
}
// This should now cease to exist, as new events have been created
this.free();
return;
}
// Copy to avoid changes, which may cause nm problems
this.options.value = jQuery.extend({},value);
if(this._parent.options.date)
{
this.options.value.date = this._parent.options.date;
}
// Let parent position
this._parent.position_event(this);
// Parent may remove this if the date isn't the same
if(this._parent)
{
this._update();
}
}, | Base | 1 |
TagCreationContainer.prototype._tagInputEnd = function (event, span, textfield) {
var that = this;
if (textfield.val() == '' || textfield.val() == '#') { // if no input, get rid of new tag
that._removeTag (span);
that._unlockCreateTag(); // we're done with this tag, so a let another get created
} else { // create new tag
var value = textfield.val();
value = value.replace(/#/g, ''); // strip illegal chars
value = '#' + encodeURIComponent(value); // format into a tag
that._afterCreateNewTag (textfield, value, span);
that._unlockCreateTag(); // we're done with this tag, so a let another get created
}
}; | Base | 1 |
function next() {
if (Array.isArray(process._events.exit))
process._events.exit = process._events.exit[1];
if (++t === tests.length)
return;
var v = tests[t];
v.run.call(v);
} | Base | 1 |
Graph.prototype.getTooltipForCell=function(b){var e="";if(mxUtils.isNode(b.value)){var k=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&(k=b.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==k&&(k=b.value.getAttribute("tooltip"));if(null!=k)null!=k&&this.isReplacePlaceholders(b)&&(k=this.replacePlaceholders(b,k)),e=this.sanitizeHtml(k);else{k=this.builtInProperties;b=b.value.attributes;var n=[];this.isEnabled()&&(k.push("linkTarget"),k.push("link"));for(var D=0;D<b.length;D++)0>
mxUtils.indexOf(k,b[D].nodeName)&&0<b[D].nodeValue.length&&n.push({name:b[D].nodeName,value:b[D].nodeValue});n.sort(function(t,E){return t.name<E.name?-1:t.name>E.name?1:0});for(D=0;D<n.length;D++)"link"==n[D].name&&this.isCustomLink(n[D].value)||(e+=("link"!=n[D].name?"<b>"+n[D].name+":</b> ":"")+mxUtils.htmlEntities(n[D].value)+"\n");0<e.length&&(e=e.substring(0,e.length-1),mxClient.IS_SVG&&(e='<div style="max-width:360px;text-overflow:ellipsis;overflow:hidden;">'+e+"</div>"))}}return e}; | Base | 1 |
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!= | Base | 1 |
arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var x=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(F){F=null!=F?F:"";"1"==urlParams.dev&&(F+=(0<F.length?"&":"?")+"dev=1");return x.apply(this,arguments)}; | 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 |
F=this.editor.graph.getModel().getStyle(F),this.styleInput.value=F||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var K=this.isSelectionAllowed;this.isSelectionAllowed=function(F){return mxEvent.getSource(F)==this.styleInput?!0:K.apply(this,arguments)}}y=document.getElementById("geInfo");null!=y&&y.parentNode.removeChild(y);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var B=null;mxEvent.addListener(e.container,"dragleave",function(F){e.isEnabled()&& | Class | 2 |
setup: function () {
var data = this.model.get('data') || {};
this.style = data.style || 'text-muted';
this.messageTemplate = this.model.get('message') || data.message || '';
this.userId = data.userId;
this.messageData['entityType'] = Espo.Utils.upperCaseFirst((this.translate(data.entityType, 'scopeNames') || '').toLowerCase());
this.messageData['user'] = '<a href="#User/view/' + data.userId + '">' + data.userName + '</a>';
this.messageData['entity'] = '<a href="#'+data.entityType+'/view/' + data.entityId + '">' + data.entityName + '</a>';
this.createMessage();
} | Base | 1 |
async function getSize () {
const { size } = await getURLMeta(req.body.url, !debug)
return size
} | Class | 2 |
function(){g.checked&&(null==e||e.checked)?q.removeAttribute("disabled"):q.setAttribute("disabled","disabled")}));mxUtils.br(c);return{getLink:function(){return g.checked?"blank"===q.value?"_blank":m:null},getEditInput:function(){return g},getEditSelect:function(){return q}}};EditorUi.prototype.addLinkSection=function(c,e){function g(){var x=document.createElement("div");x.style.width="100%";x.style.height="100%";x.style.boxSizing="border-box";null!=q&&q!=mxConstants.NONE?(x.style.border="1px solid black", | Class | 2 |
var parse = function(element) {
// Remove attributes
if (element.attributes && element.attributes.length) {
var image = null;
var style = null;
// Process style attribute
var elementStyle = element.getAttribute('style');
if (elementStyle) {
style = [];
var t = elementStyle.split(';');
for (var j = 0; j < t.length; j++) {
var v = t[j].trim().split(':');
if (validStyle.indexOf(v[0].trim()) >= 0) {
var k = v.shift();
var v = v.join(':');
style.push(k + ':' + v);
}
}
}
// Process image
if (element.tagName.toUpperCase() == 'IMG') {
if (! obj.options.acceptImages) {
element.parentNode.removeChild(element);
} else {
// Check if is data
element.setAttribute('tabindex', '900');
// Check attributes for persistance
obj.addImage(element.src);
}
} else {
// Remove attributes
var numAttributes = element.attributes.length - 1;
for (var i = numAttributes; i >= 0 ; i--) {
element.removeAttribute(element.attributes[i].name);
}
}
element.style = '';
// Add valid style
if (style && style.length) {
element.setAttribute('style', style.join(';'));
}
}
// Parse children
if (element.children.length) {
for (var i = 0; i < element.children.length; i++) {
parse(element.children[i]);
}
}
if (remove.indexOf(element.constructor) >= 0) {
element.remove();
}
}
| 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 |
Editor.createRoughCanvas=function(u){var E=rough.canvas({getContext:function(){return u}});E.draw=function(J){var T=J.sets||[];J=J.options||this.getDefaultOptions();for(var N=0;N<T.length;N++){var Q=T[N];switch(Q.type){case "path":null!=J.stroke&&this._drawToContext(u,Q,J);break;case "fillPath":this._drawToContext(u,Q,J);break;case "fillSketch":this.fillSketch(u,Q,J)}}};E.fillSketch=function(J,T,N){var Q=u.state.strokeColor,R=u.state.strokeWidth,Y=u.state.strokeAlpha,ba=u.state.dashed,ea=N.fillWeight;
0>ea&&(ea=N.strokeWidth/2);u.setStrokeAlpha(u.state.fillAlpha);u.setStrokeColor(N.fill||"");u.setStrokeWidth(ea);u.setDashed(!1);this._drawToContext(J,T,N);u.setDashed(ba);u.setStrokeWidth(R);u.setStrokeColor(Q);u.setStrokeAlpha(Y)};E._drawToContext=function(J,T,N){J.begin();for(var Q=0;Q<T.ops.length;Q++){var R=T.ops[Q],Y=R.data;switch(R.op){case "move":J.moveTo(Y[0],Y[1]);break;case "bcurveTo":J.curveTo(Y[0],Y[1],Y[2],Y[3],Y[4],Y[5]);break;case "lineTo":J.lineTo(Y[0],Y[1])}}J.end();"fillPath"===
T.type&&N.filled?J.fill():J.stroke()};return E};(function(){function u(Q,R,Y){this.canvas=Q;this.rc=R;this.shape=Y;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,u.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,u.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,u.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect= | Base | 1 |
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: | Base | 1 |
"geCommentActionLnk";mxUtils.write(ba,N);Y.appendChild(ba);mxEvent.addListener(ba,"click",function(ea){Q(ea,K);ea.preventDefault();mxEvent.consume(ea)});T.appendChild(Y);R&&(Y.style.display="none")}function W(){function N(Y){Q.push(R);if(null!=Y.replies)for(var ba=0;ba<Y.replies.length;ba++)R=R.nextSibling,N(Y.replies[ba])}var Q=[],R=X;N(K);return{pdiv:R,replies:Q}}function U(N,Q,R,Y,ba){function ea(){k(va);K.addReply(aa,function(ja){aa.id=ja;K.replies.push(aa);p(va);R&&R()},function(ja){Z();l(va);
b.handleError(ja,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},Y,ba)}function Z(){d(aa,va,function(ja){ea()},!0)}var fa=W().pdiv,aa=b.newComment(N,b.getCurrentUser());aa.pCommentId=K.id;null==K.replies&&(K.replies=[]);var va=q(aa,K.replies,fa,S+1);Q?Z():ea()}if(V||!K.isResolved){t.style.display="none";var X=document.createElement("div");X.className="geCommentContainer";X.setAttribute("data-commentId",K.id);X.style.marginLeft=20*S+5+"px";K.isResolved&&!Editor.isDarkMode()&& | Base | 1 |
ta.style.width="40px";ta.style.height="12px";ta.style.marginBottom="-2px";ta.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";ta.style.backgroundPosition="top center";ta.style.backgroundRepeat="no-repeat";ta.setAttribute("title","Minimize");var Na=!1,Ca=mxUtils.bind(this,function(){S.innerHTML="";if(!Na){var za=function(Da,La,Ya){Da=X("",Da.funct,null,La,Da,Ya);Da.style.width="40px";Da.style.opacity="0.7";return wa(Da,null,"pointer")},wa=function(Da,La,Ya){null!=La&&Da.setAttribute("title",
La);Da.style.cursor=null!=Ya?Ya:"default";Da.style.margin="2px 0px";S.appendChild(Da);mxUtils.br(S);return Da};wa(U.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text"),!0,!1,null,!0,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");wa(U.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;", | Class | 2 |
C=new mxAsyncCanvas(this.thumbImageCache);L.images=this.thumbImageCache.images;var D=new mxImageExport;D.drawShape=function(G,P){G.shape instanceof mxShape&&G.shape.checkBounds()&&(P.save(),P.translate(.5,.5),G.shape.paint(P),P.translate(-.5,-.5),P.restore())};D.drawText=function(G,P){};D.drawState(v.getView().getState(v.model.root),C);C.finish(mxUtils.bind(this,function(){try{D.drawState(v.getView().getState(v.model.root),L),v!=this.editor.graph&&null!=v.container.parentNode&&v.container.parentNode.removeChild(v.container)}catch(G){p= | Base | 1 |
"insertLink","-"],X),B.menus.addSubmenu("insertLayout",V,X,mxResources.get("layout")),B.menus.addSubmenu("insertAdvanced",V,X,mxResources.get("advanced"))):(W.apply(this,arguments),B.menus.addSubmenu("table",V,X))}})();var S="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),U=function(Q,W,V,X){Q.addItem(V,null,mxUtils.bind(this,function(){var p=new CreateGraphDialog(B,V,X);B.showDialog(p.container,620,420,!0,!1);p.init()}),W)};this.put("insertLayout", | 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 |
"12px";var M=B.getRealtimeError();B=B.getRealtimeState();var H=mxResources.get("realtimeCollaboration");1==B?(G.src=Editor.syncImage,H+=" ("+mxResources.get("online")+")"):(G.src=Editor.syncProblemImage,H=null!=M&&null!=M.message?H+(" ("+M.message+")"):H+(" ("+mxResources.get("disconnected")+")"));G.setAttribute("title",H);A.style.paddingRight="4px";A.appendChild(G)}}}};var p=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){p.apply(this,arguments);if(null!=this.shareButton){var A=
this.shareButton;A.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";A.className="geToolbarButton";A.innerHTML="";A.style.backgroundImage="url("+Editor.shareImage+")";A.style.backgroundPosition="center center";A.style.backgroundRepeat="no-repeat";A.style.backgroundSize="24px 24px";A.style.height="24px";A.style.width="24px";"1"==urlParams.sketch&&(this.shareButton.style.display="none")}null!=this.buttonContainer&&(this.buttonContainer.style.marginTop=
"-2px",this.buttonContainer.style.paddingTop="4px")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var A=document.createElement("div");A.style.display="inline-block";A.style.position="relative";A.style.marginTop="6px";A.style.marginRight="4px";var B=document.createElement("a");B.className="geMenuItem gePrimaryBtn";B.style.marginLeft="8px";B.style.padding="6px";if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var G="1"==urlParams.publishClose? | Base | 1 |
var F=this.editorUi,G=F.editor.graph;if(G.isEnabled()&&"1"==urlParams.sketch){var N=this.createOption(mxResources.get("sketch"),function(){return Editor.sketchMode},function(J,E){F.setSketchMode(!Editor.sketchMode);null!=E&&mxEvent.isShiftDown(E)||G.updateCellStyles({sketch:J?"1":null},G.getVerticesAndEdges())},{install:function(J){this.listener=function(){J(Editor.sketchMode)};F.addListener("sketchModeChanged",this.listener)},destroy:function(){F.removeListener(this.listener)}});B.appendChild(N)}return B}; | Class | 2 |
ma);H.moveCells(ma,N,W)},!0,u);u=null}else if("organic"==P||"auto"==P&&ma.length>y.length){H.view.validate();var wa=new mxFastOrganicLayout(H);wa.forceConstant=3*fa;wa.disableEdgeStyle=!1;wa.resetEdges=!1;var Ea=wa.isVertexIgnored;wa.isVertexIgnored=function(Da){return Ea.apply(this,arguments)||0>mxUtils.indexOf(y,Da)};this.executeLayout(function(){wa.execute(H.getDefaultParent());Fa()},!0,u);u=null}}this.hideDialog()}finally{H.model.endUpdate()}null!=u&&u()}}catch(Da){this.handleError(Da)}};EditorUi.prototype.getSearch= | Class | 2 |
(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="19.0.1";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage= | Base | 1 |
this.getTagsForCell(E[Y]),ea=!1;if(0<ba.length&&(ba=ba.split(" "),ba.length>=u.length)){for(var Z=ea=0;Z<ba.length&&ea<Q;Z++)null!=R[ba[Z]]&&ea++;ea=ea==Q}ea&&(1!=T||this.isCellVisible(E[Y]))&&N.push(E[Y])}}return N};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(u){for(var E=null,J=[],T=0;T<u.length;T++){var N=this.getTagsForCell(u[T]);J=[];if(0<N.length){N=N.split(" ");for(var Q={}, | Class | 2 |
"4px";pa.style.margin="2px";pa.style.border="1px solid black";pa.style.background=ta&&"none"!=ta?ta:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(Z,function(sa){this.editorUi.pickColor(ta,function(ya){pa.style.background="none"==ya?"url('"+Dialog.prototype.noColorImage+"')":ya;T(za,ya,ka)});mxEvent.consume(sa)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(pa);return btn}function R(za,ta,ka,pa,sa,ya,va){null!=ta&&(ta=ta.split(","),
aa.push({name:za,values:ta,type:ka,defVal:pa,countProperty:sa,parentRow:ya,isDeletable:!0,flipBkg:va}));btn=mxUtils.button("+",mxUtils.bind(Z,function(ra){for(var wa=ya,fa=0;null!=wa.nextSibling;)if(wa.nextSibling.getAttribute("data-pName")==za)wa=wa.nextSibling,fa++;else break;var ca={type:ka,parentRow:ya,index:fa,isDeletable:!0,defVal:pa,countProperty:sa};fa=ha(za,"",ca,0==fa%2,va);T(za,pa,ca);wa.parentNode.insertBefore(fa,wa.nextSibling);mxEvent.consume(ra)}));btn.style.height="16px";btn.style.width=
"25px";btn.className="geColorBtn";return btn}function Y(za,ta,ka,pa,sa,ya,va){if(0<sa){var ra=Array(sa);ta=null!=ta?ta.split(","):[];for(var wa=0;wa<sa;wa++)ra[wa]=null!=ta[wa]?ta[wa]:null!=pa?pa:"";aa.push({name:za,values:ra,type:ka,defVal:pa,parentRow:ya,flipBkg:va,size:sa})}return document.createElement("div")}function da(za,ta,ka){var pa=document.createElement("input");pa.type="checkbox";pa.checked="1"==ta;mxEvent.addListener(pa,"change",function(){T(za,pa.checked?"1":"0",ka)});return pa}function ha(za, | Base | 1 |
Number(L.value),[f[n]])}}finally{l.getModel().endUpdate()}});M.className="geBtn gePrimaryBtn";mxEvent.addListener(u,"keypress",function(n){13==n.keyCode&&M.click()});t=document.createElement("div");t.style.marginTop="20px";t.style.textAlign="right";b.editor.cancelFirst?(t.appendChild(d),t.appendChild(M)):(t.appendChild(M),t.appendChild(d));u.appendChild(t);this.container=u},LibraryDialog=function(b,f,l,d,u,t){function D(F){for(F=document.elementFromPoint(F.clientX,F.clientY);null!=F&&F.parentNode!= | Class | 2 |
na},null,null,null,ma,v?null:[]),b.showDialog(fa.container,350,80,!0,!0),fa.init())}}function K(fa){Ba.innerHTML=mxUtils.htmlEntities(mxResources.get(Z||fa?"create":"copy"));fa=fa?"none":"";m&&(Ka.style.display=fa);for(var ca=Q.querySelectorAll(".geTempDlgLinkToDiagram"),ba=0;ba<ca.length;ba++)ca[ba].style.display=fa}function B(fa,ca,ba,ja,ia){ia||(aa.innerHTML="",n(),R=fa,Y=ja);var ma=null;if(ba){ma=document.createElement("table");ma.className="geTempDlgDiagramsListGrid";var qa=document.createElement("tr"), | Class | 2 |
__add_options_to_select(select, options) {
for(var value of options) {
var option = document.createElement('option');
if (Array.isArray(value)) { // array of type [value, text]
option.value = value[1];
option.innerHTML = value[1];
} else { // only value, text=value
option.value = value;
option.innerHTML = value;
}
select.appendChild(option);
}
} | Base | 1 |
{},J=u.vertices,T=u.edges,N=0;N<J.length;N++)this.findCommonProperties(J[N],E,0==N);for(N=0;N<T.length;N++)this.findCommonProperties(T[N],E,0==J.length&&0==N);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(E).length&&this.container.appendChild(this.addProperties(this.createPanel(),E,u))}};var y=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(u){this.addActions(u,["copyStyle","pasteStyle"]);return y.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed= | Base | 1 |
(function($,e,t){"$:nomunge";var i=[],n=$.resize=$.extend($.resize,{}),a,r=false,s="setTimeout",u="resize",m=u+"-special-event",o="pendingDelay",l="activeDelay",f="throttleWindow";n[o]=200;n[l]=20;n[f]=true;$.event.special[u]={setup:function(){if(!n[f]&&this[s]){return false}var e=$(this);i.push(this);e.data(m,{w:e.width(),h:e.height()});if(i.length===1){a=t;h()}},teardown:function(){if(!n[f]&&this[s]){return false}var e=$(this);for(var t=i.length-1;t>=0;t--){if(i[t]==this){i.splice(t,1);break}}e.removeData(m);if(!i.length){if(r){cancelAnimationFrame(a)}else{clearTimeout(a)}a=null}},add:function(e){if(!n[f]&&this[s]){return false}var i;function a(e,n,a){var r=$(this),s=r.data(m)||{};s.w=n!==t?n:r.width();s.h=a!==t?a:r.height();i.apply(this,arguments)}if($.isFunction(e)){i=e;return a}else{i=e.handler;e.handler=a}}};function h(t){if(r===true){r=t||1}for(var s=i.length-1;s>=0;s--){var l=$(i[s]);if(l[0]==e||l.is(":visible")){var f=l.width(),c=l.height(),d=l.data(m);if(d&&(f!==d.w||c!==d.h)){l.trigger(u,[d.w=f,d.h=c]);r=t||true}}else{d=l.data(m);d.w=0;d.h=0}}if(a!==null){if(r&&(t==null||t-r<1e3)){a=e.requestAnimationFrame(h)}else{a=setTimeout(h,n[o]);r=false}}}if(!e.requestAnimationFrame){e.requestAnimationFrame=function(){return e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame||function(t,i){return e.setTimeout(function(){t((new Date).getTime())},n[l])}}()}if(!e.cancelAnimationFrame){e.cancelAnimationFrame=function(){return e.webkitCancelRequestAnimationFrame||e.mozCancelRequestAnimationFrame||e.oCancelRequestAnimationFrame||e.msCancelRequestAnimationFrame||clearTimeout}()}})(jQuery,this); | Base | 1 |
language:$("#fc_addPage_language option:selected").val(),description:$("#fc_addPage_description").val(),keywords:$("#fc_addPage_keywords").val(),searching:$("#fc_addPage_Searching").is(":checked")?1:0,visibility:$("#fc_addPage_visibility option:selected").val(),page_groups:$("#fc_addPage_page_groups").val(),visibility:$("#fc_addPage_visibility option:selected").val(),auto_add_modules:$("#fc_template_autoadd").is(":checked")?1:0,admin_groups:b,viewing_groups:c,_cat_ajax:1};$.ajax({context:a,type:"POST",
url:CAT_ADMIN_URL+"/pages/ajax_add_page.php",dataType:"json",data:e,cache:!1,beforeSend:function(a){a.process=set_activity("Save page")},success:function(a,b,c){!0===a.success?(return_success(c.process,a.message),$(this),window.location.replace(a.url)):return_error(c.process,a.message)}})});$("#fc_savePageSubmit").click(function(a){a.preventDefault();$(this).closest("form");a=$(".page_tree_open_options");var b=[],c=[];$("#fc_addPage_admin_groups").children("input:checked").each(function(){b.push($(this).val())}); | Base | 1 |
Ra=document.createElement("div");Ra.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var Qa=document.createElement("img");Qa.style.display="none";(function(Ma,Ta,Ua){Qa.onload=function(){Ta.className="geTempDlgDiagramTileImg";Ma.style.display=""};Qa.onerror=function(){this.src!=Ua?this.src=Ua:Ta.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(Qa,Ra,Ia?Ia.replace(".drawio.xml","").replace(".drawio","").replace(".xml",""):"");Qa.src=Ia;Ra.appendChild(Qa);Pa.appendChild(Ra); | Class | 2 |
function includes(array, obj) {
return Array.prototype.indexOf.call(array, obj) !== -1;
} | Class | 2 |
Runner.prototype.hookUp = function(name, fn){
var suites = [this.suite].concat(this.parents()).reverse();
this.hooks(name, suites, fn);
}; | Base | 1 |
q):mxscript("js/extensions.min.js",q))};EditorUi.prototype.generatePlantUmlImage=function(c,e,g,k){function m(x,A,z){c1=x>>2;c2=(x&3)<<4|A>>4;c3=(A&15)<<2|z>>6;c4=z&63;r="";r+=q(c1&63);r+=q(c2&63);r+=q(c3&63);return r+=q(c4&63)}function q(x){if(10>x)return String.fromCharCode(48+x);x-=10;if(26>x)return String.fromCharCode(65+x);x-=26;if(26>x)return String.fromCharCode(97+x);x-=26;return 0==x?"-":1==x?"_":"?"}var v=new XMLHttpRequest;v.open("GET",("txt"==e?PLANT_URL+"/txt/":"png"==e?PLANT_URL+"/png/":
PLANT_URL+"/svg/")+function(x){r="";for(i=0;i<x.length;i+=3)r=i+2==x.length?r+m(x.charCodeAt(i),x.charCodeAt(i+1),0):i+1==x.length?r+m(x.charCodeAt(i),0,0):r+m(x.charCodeAt(i),x.charCodeAt(i+1),x.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=e&&(v.responseType="blob");v.onload=function(x){if(200<=this.status&&300>this.status)if("txt"==e)g(this.response);else{var A=new FileReader;A.readAsDataURL(this.response);A.onloadend=function(z){var L=new Image;L.onload=
function(){try{var M=L.width,n=L.height;if(0==M&&0==n){var y=A.result,K=y.indexOf(","),B=decodeURIComponent(escape(atob(y.substring(K+1)))),F=mxUtils.parseXml(B).getElementsByTagName("svg");0<F.length&&(M=parseFloat(F[0].getAttribute("width")),n=parseFloat(F[0].getAttribute("height")))}g(A.result,M,n)}catch(G){k(G)}};L.src=A.result};A.onerror=function(z){k(z)}}else k(x)};v.onerror=function(x){k(x)};v.send()};EditorUi.prototype.insertAsPreText=function(c,e,g){var k=this.editor.graph,m=null;k.getModel().beginUpdate(); | Class | 2 |
text: conf[_]['type'].toUpperCase(),
im0: this.manager.list.imgs[0],
im1: this.manager.list.imgs[0],
im2: this.manager.list.imgs[0]
});
}
// 3.刷新UI
this.tree.parse({
id: 0,
item: items
}, 'json');
// 禁用按钮
this.disableToolbar();
this.disableEditor();
} | Base | 1 |
renderer:"foundation"});a.ext.renderer.pageButton.foundation=function(b,j,q,r,g,k){var l=new a.Api(b),s=b.oClasses,h=b.oLanguage.oPaginate,t=b.oLanguage.oAria.paginate||{},e,f,p=function(a,m){var i,n,o,c,j=function(a){a.preventDefault();!d(a.currentTarget).hasClass("unavailable")&&l.page()!=a.data.action&&l.page(a.data.action).draw("page")};i=0;for(n=m.length;i<n;i++)if(c=m[i],d.isArray(c))p(a,c);else{f=e="";switch(c){case "ellipsis":e="…";f="unavailable";break;case "first":e=h.sFirst;f=c+ | 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 |
this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var E=this.editorUi,J=E.editor.graph,T=this.createOption(mxResources.get("shadow"),function(){return J.shadowVisible},function(N){var Q=new ChangePageSetup(E);Q.ignoreColor=!0;Q.ignoreImage=!0;Q.shadowVisible=N;J.model.execute(Q)},{install:function(N){this.listener=function(){N(J.shadowVisible)};E.addListener("shadowVisibleChanged",this.listener)},destroy:function(){E.removeListener(this.listener)}});Editor.enableShadowOption|| | Class | 2 |
var _getStorageId = function(client) {
// TODO: include browser in ID to avoid sharing cookies between
// browsers (if this is undesirable)
// navigator.userAgent
return 'forge.http.' +
client.url.scheme + '.' +
client.url.host + '.' +
client.url.port;
}; | Base | 1 |
function removeDir (pkg, log, next) {
var modpath = path.join(path.dirname(pkg.path), '.' + path.basename(pkg.path) + '.MODULES')
move(path.join(pkg.path, 'node_modules'), modpath).then(unbuildPackage, unbuildPackage)
function unbuildPackage (moveEr) {
rimraf(pkg.path, moveEr ? andRemoveEmptyParents(pkg.path) : moveModulesBack)
}
function andRemoveEmptyParents (path) {
return function (er) {
if (er) return next(er)
removeEmptyParents(pkg.path)
}
}
function moveModulesBack () {
fs.readdir(modpath, makeTarget)
}
function makeTarget (readdirEr, files) {
if (readdirEr) return cleanup()
if (!files.length) return cleanup()
correctMkdir(path.join(pkg.path, 'node_modules'), function (mkdirEr) { moveModules(mkdirEr, files) })
}
function moveModules (mkdirEr, files) {
if (mkdirEr) return next(mkdirEr)
asyncMap(files, function (file, done) {
var from = path.join(modpath, file)
var to = path.join(pkg.path, 'node_modules', file)
// we ignore errors here, because they can legitimately happen, for instance,
// bundled modules will be in both node_modules folders
move(from, to).then(andIgnoreErrors(done), andIgnoreErrors(done))
}, cleanup)
}
function cleanup () {
rimraf(modpath, afterCleanup)
}
function afterCleanup (rimrafEr) {
if (rimrafEr) log.warn('remove', rimrafEr)
removeEmptyParents(path.resolve(pkg.path, '..'))
}
function removeEmptyParents (pkgdir) {
fs.rmdir(pkgdir, function (er) {
// FIXME: Make sure windows does what we want here
if (er && er.code !== 'ENOENT') return next()
removeEmptyParents(path.resolve(pkgdir, '..'))
})
}
} | Class | 2 |
1E3<=D&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=D||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var O=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(C){C=O.apply(this,arguments);
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}; | Class | 2 |
c.init()};EditorUi.prototype.confirm=function(c,e,g,k,m,q){var v=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},x=Math.min(200,28*Math.ceil(c.length/50));c=new ConfirmDialog(this,c,function(){v();null!=e&&e()},function(){v();null!=g&&g()},k,m,null,null,null,null,x);this.showDialog(c.container,340,46+x,!0,q);c.init()};EditorUi.prototype.showBanner=function(c,e,g,k){var m=!1;if(!(this.bannerShowing||this["hideBanner"+c]||isLocalStorage&&null!=mxSettings.settings&&null!= | Class | 2 |
function e(F){F.dataTransfer.dropEffect=null!=z?"move":"copy";F.stopPropagation();F.preventDefault()}function g(F){F.stopPropagation();F.preventDefault();y=!1;L=D(F);if(null!=z)null!=L&&L<v.children.length?(k.splice(L>z?L-1:L,0,k.splice(z,1)[0]),v.insertBefore(v.children[z],v.children[L])):(k.push(k.splice(z,1)[0]),v.appendChild(v.children[z]));else if(0<F.dataTransfer.files.length)b.importFiles(F.dataTransfer.files,0,0,b.maxImageSize,K(F));else if(0<=mxUtils.indexOf(F.dataTransfer.types,"text/uri-list")){var G=
decodeURIComponent(F.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(G)||/(\.png)($|\?)/i.test(G)||/(\.gif)($|\?)/i.test(G)||/(\.svg)($|\?)/i.test(G))&&b.loadImage(G,function(N){c(G,null,0,0,N.width,N.height);v.scrollTop=v.scrollHeight})}F.stopPropagation();F.preventDefault()}var k=[];l=document.createElement("div");l.style.height="100%";var m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.height="40px";l.appendChild(m);mxUtils.write(m,mxResources.get("filename")+ | Base | 1 |
d.executeLayoutList(K);d.customLayoutConfig=K}catch(B){d.handleError(B),null!=window.console&&console.error(B)}},null,null,null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/apply-layouts");d.showDialog(n.container,620,460,!0,!0);n.init()});k=this.get("layout");var x=k.funct;k.funct=function(n,y){x.apply(this,arguments);n.addItem(mxResources.get("orgChart"),null,function(){function K(){"undefined"!==typeof mxOrgChartLayout||d.loadingOrgChart||d.isOffline(!0)?J():d.spinner.spin(document.body,
mxResources.get("loading"))&&(d.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",J)})})}):mxscript("js/extensions.min.js",J))}var B=null,F=20,G=20,N=!0,J=function(){d.loadingOrgChart=!1;d.spinner.stop();if("undefined"!==typeof mxOrgChartLayout&&null!=B&&N){var X=d.editor.graph,p=new mxOrgChartLayout(X,B, | Base | 1 |
function reqSubsystem(chan, name, cb) {
if (chan.outgoing.state !== 'open') {
cb(new Error('Channel is not open'));
return true;
}
chan._callbacks.push(function(had_err) {
if (had_err) {
return cb(had_err !== true
? had_err
: new Error('Unable to start subsystem: ' + name));
}
chan.subtype = 'subsystem';
cb(undefined, chan);
});
return chan._client._sshstream.subsystem(chan.outgoing.id, name, true);
} | Base | 1 |
deleteLine: function(){
isatty && process.stdout.write('\u001b[2K');
}, | Base | 1 |
var escapeQuotes = function (str) {
if (typeof str === 'string') {
return str.replace(/(["$`\\])/g, '\\$1');
} else {
return str;
}
}; | Class | 2 |
mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxCell,["children","edges","overlays","mxTransient"],["parent","source","target"]);a.isCellCodec=function(){return!0};a.isNumericAttribute=function(b,c,d){return"value"!==c.nodeName&&mxObjectCodec.prototype.isNumericAttribute.apply(this,arguments)};a.isExcluded=function(b,c,d,e){return mxObjectCodec.prototype.isExcluded.apply(this,arguments)||e&&"value"==c&&d.nodeType==mxConstants.NODETYPE_ELEMENT};a.afterEncode=function(b,c,d){if(null!= | Base | 1 |
this.exec = function(cmd, files, opts, dstHash) {
if (cmd === 'open') {
this.autoSync('stop');
}
return this._commands[cmd] && this.isCommandEnabled(cmd, dstHash)
? this._commands[cmd].exec(files, opts)
: $.Deferred().reject('No such command');
} | Base | 1 |
ca,ca,!1)[0];ia.push(Fa);if(L)T.add(ya,ua[M]);else{var Ma=ya.getIndex(z[M]);T.add(ya,ua[M],Ma+1)}if(this.isTable(ya)){var Oa=this.getCellGeometry(ua[M]),Qa=this.getCellGeometry(ya);null!=Oa&&null!=Qa&&(Qa=Qa.clone(),Qa.height+=Oa.height,T.setGeometry(ya,Qa))}}else ia.push(ua[M])}this.updateCustomLinks(this.createCellMapping(ma,pa),ua,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",ua))}finally{T.endUpdate()}return ia};Graph.prototype.insertImage=function(z,L,M){if(null!=z&&null!=
this.cellEditor.textarea){for(var T=this.cellEditor.textarea.getElementsByTagName("img"),ca=[],ia=0;ia<T.length;ia++)ca.push(T[ia]);document.execCommand("insertimage",!1,z);z=this.cellEditor.textarea.getElementsByTagName("img");if(z.length==ca.length+1)for(ia=z.length-1;0<=ia;ia--)if(0==ia||z[ia]!=ca[ia-1]){z[ia].setAttribute("width",L);z[ia].setAttribute("height",M);break}}};Graph.prototype.insertLink=function(z){if(null!=this.cellEditor.textarea)if(0==z.length)document.execCommand("unlink",!1); | Class | 2 |
var manualUppercase = function(s) {
/* eslint-disable no-bitwise */
return isString(s)
? s.replace(/[a-z]/g, function(ch) {return String.fromCharCode(ch.charCodeAt(0) & ~32);})
: s;
/* eslint-enable */
}; | Class | 2 |
function handleABPLinkClicks() {
// Subscribe to the list when you click an abp: link
var elems = document.querySelectorAll('[href^="abp:"], [href^="ABP:"]');
var abplinkhandler = function(event) {
event.preventDefault();
var searchquery = this.href.replace(/^.+?\?/, '?');
if (searchquery) {
var queryparts = parseUri.parseSearch(searchquery);
var loc = queryparts.location;
var reqLoc = queryparts.requiresLocation;
var reqList = (reqLoc ? "url:" + reqLoc : undefined);
var title = queryparts.title;
BGcall("subscribe", {id: "url:" + loc, requires: reqList, title: title});
// Open subscribe popup
if (SAFARI) {
// In Safari, window.open() cannot be used
// to open a new window from our global HTML file
window.open(chrome.extension.getURL('pages/subscribe.html?' + loc),
"_blank",
'scrollbars=0,location=0,resizable=0,width=450,height=150');
} else {
BGcall("launch_subscribe_popup", loc);
}
}
};
for (var i=0; i<elems.length; i++) {
elems[i].addEventListener("click", abplinkhandler, false);
}
} | Pillar | 3 |
"checked"),O.style.visibility="visible"):A.setAttribute("checked","checked")):f=null}else f=null}catch(J){}x.style=y+(f?f:m());x.vertex=!0;l.addCell(x,null,null,null,null);l.selectAll();l.addListener(mxEvent.CELLS_MOVED,C);l.addListener(mxEvent.CELLS_RESIZED,C);var X=l.graphHandler.mouseUp,u=l.graphHandler.mouseDown;l.graphHandler.mouseUp=function(){X.apply(this,arguments);k.style.backgroundColor="#fff9"};l.graphHandler.mouseDown=function(){u.apply(this,arguments);k.style.backgroundColor=""};l.dblClick= | Class | 2 |
"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"; | Base | 1 |
$scope.reset = function() {
bootbox.confirm('Are you sure you want to reset the foreign source definition to the default ?', function(ok) {
if (ok) {
RequisitionsService.startTiming();
RequisitionsService.deleteForeignSourceDefinition($scope.foreignSource).then(
function() { // success
growl.success('The foreign source definition for ' + $scope.foreignSource + 'has been reseted.');
$scope.initialize();
},
$scope.errorHandler
);
}
});
}; | Base | 1 |
function pa(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function ya(){mxRhombus.call(this)}function Fa(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function Oa(){mxEllipse.call(this)}function Qa(){mxEllipse.call(this)}function Ta(){mxActor.call(this)}function za(){mxActor.call(this)}function wa(){mxActor.call(this)}function Ea(c,l,x,p){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=x;this.strokewidth=null!=p?p:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize= | Class | 2 |
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",
[H],"{1} ago"));F.setAttribute("title",I.toLocaleDateString()+" "+I.toLocaleTimeString())}function k(I){var F=document.createElement("img");F.className="geCommentBusyImg";F.src=IMAGE_PATH+"/spin.gif";I.appendChild(F);I.busyImg=F}function l(I){I.style.border="1px solid red";I.removeChild(I.busyImg)}function p(I){I.style.border="";I.removeChild(I.busyImg)}function q(I,F,H,R,W){function J(P,Q,S){var Y=document.createElement("li");Y.className="geCommentAction";var ba=document.createElement("a");ba.className= | Base | 1 |
function(){A()}),1E3)});mxEvent.addListener(q,"click",mxUtils.bind(this,function(L){var M=mxEvent.getSource(L);M!=v&&M!=x?(null!=g&&g(),A(),mxEvent.consume(L)):z()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(q.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(z,3E4);m=!0}return m};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas= | Class | 2 |
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)} | Base | 1 |
var P=new Spinner({left:"50%",lines:12,length:8,width:3,radius:5,rotate:0,color:"#000",speed:1,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9}),K=new Editor,F=null,H=null,S=null,V=!1,M=[],W=null,U=null;this.getSelectedItem=function(){null!=H&&n(H);return H};if(null==y("#mxODPickerCss")){var X=document.head||document.getElementsByTagName("head")[0],u=document.createElement("style");X.appendChild(u);u.type="text/css";u.id="mxODPickerCss";u.appendChild(document.createTextNode(G))}b.innerHTML= | Class | 2 |
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();
}; | Base | 1 |
Channel.prototype.destroy = function() {
this.end();
}; | Base | 1 |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.