You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
5 lines
155 KiB
Plaintext
5 lines
155 KiB
Plaintext
11 months ago
|
!function(){"undefined"==typeof Math.sgn&&(Math.sgn=function(a){return 0==a?0:a>0?1:-1});var a={subtract:function(a,b){return{x:a.x-b.x,y:a.y-b.y}},dotProduct:function(a,b){return a.x*b.x+a.y*b.y},square:function(a){return Math.sqrt(a.x*a.x+a.y*a.y)},scale:function(a,b){return{x:a.x*b,y:a.y*b}}},b=64,c=Math.pow(2,-b-1),d=function(b,c){for(var d=[],e=f(b,c),h=c.length-1,i=2*h-1,j=g(e,i,d,0),k=a.subtract(b,c[0]),m=a.square(k),n=0,o=0;j>o;o++){k=a.subtract(b,l(c,h,d[o],null,null));var p=a.square(k);m>p&&(m=p,n=d[o])}return k=a.subtract(b,c[h]),p=a.square(k),m>p&&(m=p,n=1),{location:n,distance:m}},e=function(a,b){var c=d(a,b);return{point:l(b,b.length-1,c.location,null,null),location:c.location}},f=function(b,c){for(var d=c.length-1,e=2*d-1,f=[],g=[],h=[],i=[],k=[[1,.6,.3,.1],[.4,.6,.6,.4],[.1,.3,.6,1]],l=0;d>=l;l++)f[l]=a.subtract(c[l],b);for(var l=0;d-1>=l;l++)g[l]=a.subtract(c[l+1],c[l]),g[l]=a.scale(g[l],3);for(var m=0;d-1>=m;m++)for(var n=0;d>=n;n++)h[m]||(h[m]=[]),h[m][n]=a.dotProduct(g[m],f[n]);for(l=0;e>=l;l++)i[l]||(i[l]=[]),i[l].y=0,i[l].x=parseFloat(l)/e;for(var o=d,p=d-1,q=0;o+p>=q;q++){var r=Math.max(0,q-p),s=Math.min(q,o);for(l=r;s>=l;l++)j=q-l,i[l+j].y+=h[j][l]*k[j][l]}return i},g=function(a,c,d,e){var f,j,m=[],n=[],o=[],p=[];switch(h(a,c)){case 0:return 0;case 1:if(e>=b)return d[0]=(a[0].x+a[c].x)/2,1;if(i(a,c))return d[0]=k(a,c),1}l(a,c,.5,m,n),f=g(m,c,o,e+1),j=g(n,c,p,e+1);for(var q=0;f>q;q++)d[q]=o[q];for(var q=0;j>q;q++)d[q+f]=p[q];return f+j},h=function(a,b){var c,d,e=0;c=d=Math.sgn(a[0].y);for(var f=1;b>=f;f++)c=Math.sgn(a[f].y),c!=d&&e++,d=c;return e},i=function(a,b){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s;i=a[0].y-a[b].y,j=a[b].x-a[0].x,k=a[0].x*a[b].y-a[b].x*a[0].y;for(var t=max_distance_below=0,u=1;b>u;u++){var v=i*a[u].x+j*a[u].y+k;v>t?t=v:max_distance_below>v&&(max_distance_below=v)}return n=0,o=1,p=0,q=i,r=j,s=k-t,l=n*r-q*o,m=1/l,e=(o*s-r*p)*m,q=i,r=j,s=k-max_distance_below,l=n*r-q*o,m=1/l,f=(o*s-r*p)*m,g=Math.min(e,f),h=Math.max(e,f),d=h-g,c>d?1:0},k=function(a,b){var c=1,d=0,e=a[b].x-a[0].x,f=a[b].y-a[0].y,g=a[0].x-0,h=a[0].y-0,i=e*d-f*c,j=1/i,k=(e*h-f*g)*j;return 0+c*k},l=function(a,b,c,d,e){for(var f=[[]],g=0;b>=g;g++)f[0][g]=a[g];for(var h=1;b>=h;h++)for(var g=0;b-h>=g;g++)f[h]||(f[h]=[]),f[h][g]||(f[h][g]={}),f[h][g].x=(1-c)*f[h-1][g].x+c*f[h-1][g+1].x,f[h][g].y=(1-c)*f[h-1][g].y+c*f[h-1][g+1].y;if(null!=d)for(g=0;b>=g;g++)d[g]=f[g][0];if(null!=e)for(g=0;b>=g;g++)e[g]=f[b-g][g];return f[b][0]},m={},n=function(a){var b=m[a];if(!b){b=[];var c=function(){return function(b){return Math.pow(b,a)}},d=function(){return function(b){return Math.pow(1-b,a)}},e=function(a){return function(){return a}},f=function(){return function(a){return a}},g=function(){return function(a){return 1-a}},h=function(a){return function(b){for(var c=1,d=0;d<a.length;d++)c*=a[d](b);return c}};b.push(new c);for(var i=1;a>i;i++){for(var j=[new e(a)],k=0;a-i>k;k++)j.push(new f);for(var k=0;i>k;k++)j.push(new g);b.push(new h(j))}b.push(new d),m[a]=b}return b},o=function(a,b){for(var c=n(a.length-1),d=0,e=0,f=0;f<a.length;f++)d+=a[f].x*c[f](b),e+=a[f].y*c[f](b);return{x:d,y:e}},p=function(a,b){return Math.sqrt(Math.pow(a.x-b.x,2)+Math.pow(a.y-b.y,2))},q=function(a){return a[0].x==a[1].x&&a[0].y==a[1].y},r=function(a,b,c){if(q(a))return{point:a[0],location:b};for(var d=o(a,b),e=0,f=b,g=c>0?1:-1,h=null;e<Math.abs(c);)f+=.005*g,h=o(a,f),e+=p(h,d),d=h;return{point:h,location:f}},s=function(a){if(q(a))return 0;for(var b=o(a,0),c=0,d=0,e=1,f=null;1>d;)d+=.005*e,f=o(a,d),c+=p(f,b),b=f;return c},t=function(a,b,c){return r(a,b,c).point},u=function(a,b,c){return r(a,b,c).location},v=function(a,b){var c=o(a,b),d=o(a.slice(0,a.length-1),b),e=d.y-c.y,f=d.x-c.x;return 0==e?1/0:Math.atan(e/f)},w=function(a,b,c){var d=r(a,b,c);return d.location>1&&(d.location=1),d.location<0&&(d.location=0),v(a,d.location)},x=function(a,b,c,d){d=null==d?0:d;var e=r(a,b,d),f=v(a,e.location),g=Math.atan(-1/f),h=c/2*Math.sin(g),i=c/2*Math.cos(g);return[{x:e.point.x+i,y:e.point.y+h},{x:e.point.x-i,y:e.point.y-h}]};window.jsBezier={distanceFromCurve:d,gradientAtPoint
|
||
|
for(var f=0,g=d.sourceEndpoint.connectorOverlays.length;g>f;f++)d.overlays.push(d.sourceEndpoint.connectorOverlays[f])}!d["pointer-events"]&&d.sourceEndpoint&&d.sourceEndpoint.connectorPointerEvents&&(d["pointer-events"]=d.sourceEndpoint.connectorPointerEvents);var h,i,j;if(d.target&&!d.target.endpoint&&!d.targetEndpoint&&!d.newConnection&&(h=Y(d.target),i=this.targetEndpointDefinitions[h])){if(!i.enabled)return;i.isTarget=!0,j=null!=i.endpoint&&i.endpoint._jsPlumb?i.endpoint:e.addEndpoint(d.target,i.def),i.uniqueEndpoint&&(i.endpoint=j),d.targetEndpoint=j,j._doNotDeleteOnDetach=!1,j._deleteOnDetach=!0}if(d.source&&!d.source.endpoint&&!d.sourceEndpoint&&!d.newConnection&&(h=Y(d.source),i=this.sourceEndpointDefinitions[h])){if(!i.enabled)return;j=null!=i.endpoint&&i.endpoint._jsPlumb?i.endpoint:e.addEndpoint(d.source,i.def),i.uniqueEndpoint&&(i.endpoint=j),d.sourceEndpoint=j,j._doNotDeleteOnDetach=!1,j._deleteOnDetach=!0}return d}.bind(e),N=function(a){var b=e.Defaults.ConnectionType||e.getDefaultConnectionType();e.Defaults.EndpointType||t.Endpoint,a._jsPlumb=e,a.newConnection=N,a.newEndpoint=Q,a.endpointsByUUID=s,a.endpointsByElement=q,a.finaliseConnection=O;var c=new b(a);return c.id="con_"+F(),P("click","click",c),P("dblclick","dblclick",c),P("contextmenu","contextmenu",c),c.isDetachable()&&(c.endpoints[0].initDraggable(),c.endpoints[1].initDraggable()),c},O=function(a,b,c,d){if(b=b||{},a.suspendedEndpoint||p.push(a),(null==a.suspendedEndpoint||d)&&e.anchorManager.newConnection(a),I(a.source),!b.doNotFireConnectionEvent&&b.fireEvent!==!1){var f={connection:a,source:a.source,target:a.target,sourceId:a.sourceId,targetId:a.targetId,sourceEndpoint:a.endpoints[0],targetEndpoint:a.endpoints[1]};e.fire("connection",f,c)}},P=function(a,b,c){c.bind(a,function(a,d){e.fire(b,c,d)})},Q=function(a){var b=e.Defaults.EndpointType||t.Endpoint,c=t.extend({},a);c._jsPlumb=e,c.newConnection=N,c.newEndpoint=Q,c.endpointsByUUID=s,c.endpointsByElement=q,c.finaliseConnection=O,c.fireDetachEvent=_,c.fireMoveEvent=ab,c.floatingConnections=w,c.elementId=Y(c.source);var d=new b(c);return d.id="ep_"+F(),P("click","endpointClick",d),P("dblclick","endpointDblClick",d),P("contextmenu","contextmenu",d),jsPlumbAdapter.headless||e.dragManager.endpointAdded(c.source),d},R=function(a,b,c){var d=q[a];if(d&&d.length)for(var e=0,f=d.length;f>e;e++){for(var g=0,h=d[e].connections.length;h>g;g++){var i=b(d[e].connections[g]);if(i)return}c&&c(d[e])}},S=function(a,b){return J(a,function(a,c){x[c]=b,this.isDragSupported(a)&&this.setElementDraggable(a,b)})},T=function(a,b,c){b="block"===b;var d=null;c&&(d=b?function(a){a.setVisible(!0,!0,!0)}:function(a){a.setVisible(!1,!0,!0)});var e=k(a);R(e.id,function(a){if(b&&c){var d=a.sourceId===e.id?1:0;a.endpoints[d].isVisible()&&a.setVisible(!0)}else a.setVisible(b)},d)},U=function(a){return J(a,function(a,b){var c=null==x[b]?!1:x[b];return c=!c,x[b]=c,this.setDraggable(a,c),c})},V=function(a,b){var c=null;b&&(c=function(a){var b=a.isVisible();a.setVisible(!b)}),R(a,function(a){var b=a.isVisible();a.setVisible(!b)},c)},W=this.updateOffset=function(a){var c,d=a.timestamp,f=a.recalc,g=a.offset,h=a.elId;return A&&!d&&(d=B),!f&&d&&d===v[h]?{o:a.offset||u[h],s:z[h]}:(f||!g?(c=document.getElementById(h),null!=c&&(z[h]=e.getSize(c),u[h]=b(c,e),v[h]=d)):(u[h]=g,null==z[h]&&(c=document.getElementById(h),null!=c&&(z[h]=e.getSize(c))),v[h]=d),u[h]&&!u[h].right&&(u[h].right=u[h].left+z[h][0],u[h].bottom=u[h].top+z[h][1],u[h].width=z[h][0],u[h].height=z[h][1],u[h].centerx=u[h].left+u[h].width/2,u[h].centery=u[h].top+u[h].height/2),{o:u[h],s:z[h]})},X=function(a){var b=u[a];return b?{o:b,s:z[a]}:W({elId:a})},Y=function(a,b,c){if(jsPlumbUtil.isString(a))return a;if(null==a)return null;var d=e.getAttribute(a,"id");return d&&"undefined"!==d||(2==arguments.length&&void 0!==arguments[1]?d=b:(1==arguments.length||3==arguments.length&&!arguments[2])&&(d="jsPlumb_"+f+"_"+F()),c||e.setAttribute(a,"id",d)),d};this.setConnectionBeingDragged=function(a){y=a},this.isConnectionBeingDragged=function(){return y},this.connectorClass="_jsPlumb_connec
|
||
|
}.bind(this);this.setAnchor=function(a,b){return this._jsPlumb.instance.continuousAnchorFactory.clear(this.elementId),this.anchor=this._jsPlumb.instance.makeAnchor(a,this.elementId,h),q(),this.anchor.bind("anchorChanged",function(a){this.fire("anchorChanged",{endpoint:this,anchor:a}),q()}.bind(this)),b||this._jsPlumb.instance.repaint(this.elementId),this};var r=g.anchor?g.anchor:g.anchors?g.anchors:h.Defaults.Anchor||"Top";this.setAnchor(r,!0);var s=function(a){this.connections.length>0?this.connections[0].setHover(a,!1):this.setHover(a)}.bind(this);g._transient||this._jsPlumb.instance.anchorManager.add(this,this.elementId),this.setEndpoint=function(a){null!=this.endpoint&&(this.endpoint.cleanup(),this.endpoint.destroy());var b=function(a,b){var c=h.getRenderMode();if(jsPlumb.Endpoints[c][a])return new jsPlumb.Endpoints[c][a](b);if(!h.Defaults.DoNotThrowErrors)throw{msg:"jsPlumb: unknown endpoint type '"+a+"'"}},c={_jsPlumb:this._jsPlumb.instance,cssClass:g.cssClass,container:g.container,tooltip:g.tooltip,connectorTooltip:g.connectorTooltip,endpoint:this};j.isString(a)?this.endpoint=b(a,c):j.isArray(a)?(c=j.merge(a[1],c),this.endpoint=b(a[0],c)):this.endpoint=a.clone(),jsPlumb.extend({},c),this.endpoint.clone=function(){return j.isString(a)?b(a,c):j.isArray(a)?(c=j.merge(a[1],c),b(a[0],c)):void 0}.bind(this),this.type=this.endpoint.type,this.bindListeners(this.endpoint,this,s)},this.setEndpoint(g.endpoint||h.Defaults.Endpoint||jsPlumb.Defaults.Endpoint||"Dot"),this.setPaintStyle(g.paintStyle||g.style||h.Defaults.EndpointStyle||jsPlumb.Defaults.EndpointStyle,!0),this.setHoverPaintStyle(g.hoverPaintStyle||h.Defaults.EndpointHoverStyle||jsPlumb.Defaults.EndpointHoverStyle,!0),this._jsPlumb.paintStyleInUse=this.getPaintStyle(),jsPlumb.extend(this,g,d),this.isSource=g.isSource||!1,this.isTarget=g.isTarget||!1,this._jsPlumb.maxConnections=g.maxConnections||h.Defaults.MaxConnections,this.canvas=this.endpoint.canvas,this.addClass(h.endpointAnchorClassPrefix+"_"+this._jsPlumb.currentAnchorClass),jsPlumbAdapter.addClass(this.element,h.endpointAnchorClassPrefix+"_"+this._jsPlumb.currentAnchorClass),this.connections=g.connections||[],this.connectorPointerEvents=g["connector-pointer-events"],this.scope=g.scope||h.getDefaultScope(),this.timestamp=null,this.reattachConnections=g.reattach||h.Defaults.ReattachConnections,this.connectionsDetachable=h.Defaults.ConnectionsDetachable,(g.connectionsDetachable===!1||g.detachable===!1)&&(this.connectionsDetachable=!1),this.dragAllowedWhenFull=g.dragAllowedWhenFull||!0,g.onMaxConnections&&this.bind("maxConnections",g.onMaxConnections),this.addConnection=function(a){this.connections.push(a),this[(this.connections.length>0?"add":"remove")+"Class"](h.endpointConnectedClass),this[(this.isFull()?"add":"remove")+"Class"](h.endpointFullClass)},this.detachFromConnection=function(a,b,c){b=null==b?f(a,this):b,b>=0&&(this.connections.splice(b,1),this[(this.connections.length>0?"add":"remove")+"Class"](h.endpointConnectedClass),this[(this.isFull()?"add":"remove")+"Class"](h.endpointFullClass)),!c&&this._deleteOnDetach&&0===this.connections.length&&h.deleteObject({endpoint:this,fireEvent:!1,deleteAttachedObjects:!1})},this.detach=function(a,b,c,d,e,g,i){var j=null==i?f(a,this):i,k=!1;return d=d!==!1,j>=0&&(c||a._forceDetach||a.isDetachable()&&a.isDetachAllowed(a)&&this.isDetachAllowed(a))&&(h.deleteObject({connection:a,fireEvent:!b&&d,originalEvent:e,deleteAttachedObjects:!1}),k=!0),k},this.detachAll=function(a,b){for(;this.connections.length>0;)this.detach(this.connections[0],!1,!0,a!==!1,b,this,0);return this},this.detachFrom=function(a,b,c){for(var d=[],e=0;e<this.connections.length;e++)(this.connections[e].endpoints[1]==a||this.connections[e].endpoints[0]==a)&&d.push(this.connections[e]);for(var f=0;f<d.length;f++)this.detach(d[f],!1,!0,b,c);return this},this.getElement=function(){return this.element},this.setElement=function(a){var b=this._jsPlumb.instance.getId(a),c=this.elementId;return j.removeWithFunction(g.endpointsByElement[this.elementId],function(a){return a.id==this.id}.bind(this)),this.elemen
|
||
|
}),t(a)},this.clearFor=function(a){delete b[a],b[a]=[]};var u=function(b,c,d,e,f,g,h,i,j,k,l,m){var n=-1,o=-1,p=e.endpoints[h],q=p.id,r=[1,0][h],s=[[c,d],e,f,g,q],t=b[j],u=p._continuousAnchorEdge?b[p._continuousAnchorEdge]:null;if(u){var v=jsPlumbUtil.findWithFunction(u,function(a){return a[4]==q});if(-1!=v){u.splice(v,1);for(var w=0;w<u.length;w++)jsPlumbUtil.addWithFunction(l,u[w][1],function(a){return a.id==u[w][1].id}),jsPlumbUtil.addWithFunction(m,u[w][1].endpoints[h],function(a){return a.id==u[w][1].endpoints[h].id}),jsPlumbUtil.addWithFunction(m,u[w][1].endpoints[r],function(a){return a.id==u[w][1].endpoints[r].id})}}for(w=0;w<t.length;w++)1==a.idx&&t[w][3]===g&&-1==o&&(o=w),jsPlumbUtil.addWithFunction(l,t[w][1],function(a){return a.id==t[w][1].id}),jsPlumbUtil.addWithFunction(m,t[w][1].endpoints[h],function(a){return a.id==t[w][1].endpoints[h].id}),jsPlumbUtil.addWithFunction(m,t[w][1].endpoints[r],function(a){return a.id==t[w][1].endpoints[r].id});if(-1!=n)t[n]=s;else{var x=i?-1!=o?o:0:t.length;t.splice(x,0,s)}p._continuousAnchorEdge=j};this.updateOtherEndpoint=function(a,b,c,d){var e=jsPlumbUtil.findWithFunction(h[a],function(a){return a[0].id===d.id}),f=jsPlumbUtil.findWithFunction(h[b],function(a){return a[0].id===d.id});-1!=e&&(h[a][e][0]=d,h[a][e][1]=d.endpoints[1],h[a][e][2]=d.endpoints[1].anchor.constructor==jsPlumb.DynamicAnchor),f>-1&&(h[b].splice(f,1),jsPlumbUtil.addToList(h,c,[d,d.endpoints[0],d.endpoints[0].anchor.constructor==jsPlumb.DynamicAnchor]))},this.sourceChanged=function(a,b,c){if(a!==b){jsPlumbUtil.removeWithFunction(h[a],function(a){return a[0].id===c.id});var d=jsPlumbUtil.findWithFunction(h[c.targetId],function(a){return a[0].id===c.id});d>-1&&(h[c.targetId][d][0]=c,h[c.targetId][d][1]=c.endpoints[0],h[c.targetId][d][2]=c.endpoints[0].anchor.constructor==jsPlumb.DynamicAnchor),jsPlumbUtil.addToList(h,b,[c,c.endpoints[1],c.endpoints[1].anchor.constructor==jsPlumb.DynamicAnchor])}},this.rehomeEndpoint=function(a,c,d){var e=b[c]||[],f=k.getId(d);if(f!==c){var g=jsPlumbUtil.indexOf(e,a);if(g>-1){var h=e.splice(g,1)[0];i.add(h,f)}}for(var j=0;j<a.connections.length;j++)a.connections[j].sourceId==c?(a.connections[j].sourceId=a.elementId,a.connections[j].source=a.element,i.sourceChanged(c,a.elementId,a.connections[j])):a.connections[j].targetId==c&&(a.connections[j].targetId=a.elementId,a.connections[j].target=a.element,i.updateOtherEndpoint(a.connections[j].sourceId,c,a.elementId,a.connections[j]))},this.redraw=function(a,c,d,e,f,g){if(!k.isSuspendDrawing()){var i=b[a]||[],n=h[a]||[],o=[],p=[],q=[];d=d||k.timestamp(),e=e||{left:0,top:0},c&&(c={left:c.left+e.left,top:c.top+e.top});for(var r=k.updateOffset({elId:a,offset:c,recalc:!1,timestamp:d}),t={},v=0;v<n.length;v++){var w=n[v][0],x=w.sourceId,y=w.targetId,z=w.endpoints[0].anchor.isContinuous,A=w.endpoints[1].anchor.isContinuous;if(z||A){var B=x+"_"+y,C=t[B],D=w.sourceId==a?1:0;z&&!j[x]&&(j[x]={top:[],right:[],bottom:[],left:[]}),A&&!j[y]&&(j[y]={top:[],right:[],bottom:[],left:[]}),a!=y&&k.updateOffset({elId:y,timestamp:d}),a!=x&&k.updateOffset({elId:x,timestamp:d});var E=k.getCachedData(y),F=k.getCachedData(x);y==x&&(z||A)?u(j[x],-Math.PI/2,0,w,!1,y,0,!1,"top",x,o,p):(C||(C=m(x,y,F.o,E.o,w.endpoints[0].anchor,w.endpoints[1].anchor),t[B]=C),z&&u(j[x],C.theta,0,w,!1,y,0,!1,C.a[0],x,o,p),A&&u(j[y],C.theta2,-1,w,!0,x,1,!0,C.a[1],y,o,p)),z&&jsPlumbUtil.addWithFunction(q,x,function(a){return a===x}),A&&jsPlumbUtil.addWithFunction(q,y,function(a){return a===y}),jsPlumbUtil.addWithFunction(o,w,function(a){return a.id==w.id}),(z&&0===D||A&&1===D)&&jsPlumbUtil.addWithFunction(p,w.endpoints[D],function(a){return a.id==w.endpoints[D].id})}}for(v=0;v<i.length;v++)0===i[v].connections.length&&i[v].anchor.isContinuous&&(j[a]||(j[a]={top:[],right:[],bottom:[],left:[]}),u(j[a],-Math.PI/2,0,{endpoints:[i[v],i[v]],paint:function(){}},!1,a,0,!1,"top",a,o,p),jsPlumbUtil.addWithFunction(q,a,function(b){return b===a}));for(v=0;v<q.length;v++)s(q[v],j[q[v]]);for(v=0;v<i.length;v++)i[v].paint({timestamp:d,offset:r,dimensions:r.s,recalc:g!==!0});for(v=0;v<p.length;
|
||
|
}},jsPlumb.Overlays.Label=function(a){this.labelStyle=a.labelStyle,this.cssClass=null!=this.labelStyle?this.labelStyle.cssClass:null;var b=jsPlumb.extend({create:function(){return document.createElement("div")}},a);if(jsPlumb.Overlays.Custom.call(this,b),this.type="Label",this.label=a.label||"",this.labelText=null,this.labelStyle){var c=this.getElement();if(this.labelStyle.font=this.labelStyle.font||"12px sans-serif",c.style.font=this.labelStyle.font,c.style.color=this.labelStyle.color||"black",this.labelStyle.fillStyle&&(c.style.background=this.labelStyle.fillStyle),this.labelStyle.borderWidth>0){var d=this.labelStyle.borderStyle?this.labelStyle.borderStyle:"black";c.style.border=this.labelStyle.borderWidth+"px solid "+d}this.labelStyle.padding&&(c.style.padding=this.labelStyle.padding)}},jsPlumbUtil.extend(jsPlumb.Overlays.Label,jsPlumb.Overlays.Custom,{cleanup:function(){this.div=null,this.label=null,this.labelText=null,this.cssClass=null,this.labelStyle=null},getLabel:function(){return this.label},setLabel:function(a){this.label=a,this.labelText=null,this.clearCachedDimensions(),this.update(),this.component.repaint()},getDimensions:function(){return this.update(),f.prototype.getDimensions.apply(this,arguments)},update:function(){if("function"==typeof this.label){var a=this.label(this);this.getElement().innerHTML=a.replace(/\r\n/g,"<br/>")}else null==this.labelText&&(this.labelText=this.label,this.getElement().innerHTML=this.labelText.replace(/\r\n/g,"<br/>"))}})}(),function(){"use strict";var a=function(a){this.type="Flowchart",a=a||{},a.stub=null==a.stub?30:a.stub;var b,c=jsPlumb.Connectors.AbstractConnector.apply(this,arguments),d=null==a.midpoint?.5:a.midpoint,e=[],f=(a.grid,a.alwaysRespectStubs),g=null,h=null,i=null,j=null!=a.cornerRadius?a.cornerRadius:0,k=function(a){return 0>a?-1:0===a?0:1},l=function(a,b,c,d){if(h!=b||i!=c){var e=null==h?d.sx:h,f=null==i?d.sy:i,g=e==b?"v":"h",j=k(b-e),l=k(c-f);h=b,i=c,a.push([e,f,b,c,g,j,l])}},m=function(a){return Math.sqrt(Math.pow(a[0]-a[2],2)+Math.pow(a[1]-a[3],2))},n=function(a){var b=[];return b.push.apply(b,a),b},o=function(a,b,d){for(var e,f,g=0;g<b.length-1;g++){if(e=e||n(b[g]),f=n(b[g+1]),j>0&&e[4]!=f[4]){var h=Math.min(j,m(e),m(f));e[2]-=e[5]*h,e[3]-=e[6]*h,f[0]+=f[5]*h,f[1]+=f[6]*h;var i=e[6]==f[5]&&1==f[5]||e[6]==f[5]&&0===f[5]&&e[5]!=f[6]||e[6]==f[5]&&-1==f[5],k=f[1]>e[3]?1:-1,l=f[0]>e[2]?1:-1,o=k==l,p=o&&i||!o&&!i?f[0]:e[2],q=o&&i||!o&&!i?e[3]:f[1];c.addSegment(a,"Straight",{x1:e[0],y1:e[1],x2:e[2],y2:e[3]}),c.addSegment(a,"Arc",{r:h,x1:e[2],y1:e[3],x2:f[0],y2:f[1],cx:p,cy:q,ac:i})}else{var r=e[2]==e[0]?0:e[2]>e[0]?d.lw/2:-(d.lw/2),s=e[3]==e[1]?0:e[3]>e[1]?d.lw/2:-(d.lw/2);c.addSegment(a,"Straight",{x1:e[0]-r,y1:e[1]-s,x2:e[2]+r,y2:e[3]+s})}e=f}null!=f&&c.addSegment(a,"Straight",{x1:f[0],y1:f[1],x2:f[2],y2:f[3]})};this.setSegments=function(a){g=a},this.isEditable=function(){return!0},this.getOriginalSegments=function(){return g||e},this._compute=function(a,j){if(j.clearEdits&&(g=null),null!=g)return o(this,g,a),void 0;e=[],h=null,i=null,b=null;var k=a.startStubX+(a.endStubX-a.startStubX)*d,m=a.startStubY+(a.endStubY-a.startStubY)*d,n={x:[0,1],y:[1,0]},p=function(){return[a.startStubX,a.startStubY,a.endStubX,a.endStubY]},q={perpendicular:p,orthogonal:p,opposite:function(b){var c=a,d="x"==b?0:1,e={x:function(){return 1==c.so[d]&&(c.startStubX>c.endStubX&&c.tx>c.startStubX||c.sx>c.endStubX&&c.tx>c.sx)||-1==c.so[d]&&(c.startStubX<c.endStubX&&c.tx<c.startStubX||c.sx<c.endStubX&&c.tx<c.sx)},y:function(){return 1==c.so[d]&&(c.startStubY>c.endStubY&&c.ty>c.startStubY||c.sy>c.endStubY&&c.ty>c.sy)||-1==c.so[d]&&(c.startStubY<c.endStubY&&c.ty<c.startStubY||c.sy<c.endStubY&&c.ty<c.sy)}};return!f&&e[b]()?{x:[(a.sx+a.tx)/2,a.startStubY,(a.sx+a.tx)/2,a.endStubY],y:[a.startStubX,(a.sy+a.ty)/2,a.endStubX,(a.sy+a.ty)/2]}[b]:[a.startStubX,a.startStubY,a.endStubX,a.endStubY]}},r={perpendicular:function(b){var c=a,d={x:[[[1,2,3,4],null,[2,1,4,3]],null,[[4,3,2,1],null,[3,4,1,2]]],y:[[[3,2,1,4],null,[2,3,4,1]],null,[[4,1,2,3],null,[1,4,3,2]]]},e={x:[[c.startStubX,c.endStubX],null,[c.
|