dvt.vi=function(a,b,c){this.Init(a,b,c)};ea("dvt.Diagram",dvt.vi);dvt.k.A(dvt.vi,ka);dvt.vi.prototype.Init=function(a,b,c){dvt.vi.v.Init.call(this,a,b,c);this.eh=new Rl;this.ic=new Sl(a,this.Df,this);this.ic.hg(this);dvt.u.Va()||this.ic.ps(new Tl(this,this.ic));this.tc={};this.No=[];this.be={};this.Fz=[];this.Up=0};dvt.vi.newInstance=function(a,b,c){return new dvt.vi(a,b,c)};dvt.vi.newInstance=dvt.vi.newInstance;R=dvt.vi.prototype;
R.xQ=function(){!this.Eu&&this.Cg&&("none"!=this.IR&&(this.Kq={id:this.getId(),getId:N("id"),options:this.B(),getOptions:N("options"),panZoomMatrix:this.Oa.Ka.ob(),getPanZoomMatrix:N("panZoomMatrix"),nodes:this.tc?Ul(this):[],links:this.be?Vl(this):[],getNodes:N("nodes"),getLinks:N("links")},this.Kq.B=this.Kq.getOptions,this.Kq.Leb=this.Kq.getPanZoomMatrix,this.Kq.getId=this.Kq.getId,this.Kq.PNa=this.Kq.getNodes,this.Kq.xNa=this.Kq.getLinks),this.Cg=s,this.MS=this.Oa);this.Eu||this.Afa()};
R.Afa=function(){this.Yo=new dvt.ea(this.j());this.Nk=new dvt.ea(this.j());this.By=new dvt.ea(this.j());this.tc={};this.No=[];this.be={};this.Fz=[];this.sC=q};R.Lu=function(){this.uh&&(this.removeChild(this.uh),this.uh.oa());this.uh=q;this.Sb&&(this.Sb=q,this.Ua().hg(this))};
R.nh=function(a,b){var c=new dvt.Pd(this.j(),q,a.pb()),d=b.Leb(),e=this.Oa.Ka.ob();d.Ue(e)||(this.Oa.Ka.sb(d),c.ga.M(dvt.F.Ji,this.Oa.Ka,this.Oa.Ka.ob,this.Oa.Ka.sb,e));a.Xp(b.PNa(),this.tc?Ul(this):[]);a.Xp(b.xNa(),this.be?Vl(this):[]);a.add(c,1)};
R.fu=function(a){var b=s;if(!this.Cg&&!this.Eu){Wl(this);Xl(this);var c=[],d;for(d in this.tc)c.push(d);b=0===c.length;this.j().DK([this]);this.Up++}if(b)this.Up=this.Cg?this.Up:this.Up-1,0===this.Up&&Yl(this,a,b);else{this.contains(this.MS)||this.q(this.MS);var e=this;this.qv(a).then(function(){e.Up=e.Cg?e.Up:e.Up-1;0===e.Up&&Yl(e,a,b)},function(){e.Up=e.Cg?e.Up:e.Up-1;0===e.Up&&(e.removeChild(e.MS),e.MS=q,e.Cg=l)})}};
function Yl(a,b,c){var d;if(!c){a.removeChild(a.MS);a.NF();a.OF();if(d=a.Gl==q)a.Gl=Va(a,b,ba,ba);var e=a.Oa;if(a.Cg){if(a.Eu){var f=a.oB(b,a.Gl),f=h?Wa(a):f?f:a.Gl;e.vca(l);e.us(q,f);e.vca(a.fG)}}else{a.oB(b,a.Gl);if(!a.Eu){var h=a.Ir?l:s,f=h?Wa(a):a.Gl;h&&e.FQa();e.us(q,f)}e.jB(a.nA);e.VG(a.uG());e.FV(a.fG);e.vca(a.fG)}}a.MS=q;a.Cg||(a.Sb&&a.Sb.stop(l),dvt.u.Xi()&&a.SY&&!a.Kq?a.Sb=dvt.jc.mD(a.j(),a.SY,a,q,a.pb()):"none"!=a.IR&&a.Kq&&(a.uh=new dvt.ea(a.j(),"Delete Container"),a.q(a.uh),e=new Zl(a.j(),
a.uh,a.Kq,a),e.Xp([a.Kq],[a]),a.Sb=e.cv()),a.Sb?(a.Ua().je(),a.Ua().Xj(a),a.Sb.Of(a.Lu,a),a.Sb.play()):a.Lu());a.Cg=l;yb(a,c);a.nA&&(c=a.Gl,c!=q&&(b=a.Oa.$f(b),a.VV(c.x,c.y,c.a,c.b,b)));a.Ir=q;a.xS=q;d&&(a.Gl=q)}
R.Gf=function(a){dvt.vi.v.Gf.call(this,a);this.jsa(this.U);this.nA="none"!=this.U.panning;this.fG="none"!=this.U.zooming;this.Yba("hidden");this.IR=this.U.animationOnDataChange;this.a2("auto"==this.U.animationOnDisplay?dvt.jc.nB:q);this.lB(this.U.selectionMode);this.Op=this.U.emptyText?this.U.emptyText:dvt.G.Ng(this.U,"labelNoData",dvt.G.La,"NO_DATA")};dvt.vi.Tq=function(a){return(new Rl).Tq(a)};R=dvt.vi.prototype;R.qD=function(){var a=this.B().maxZoom,a=parseFloat(a);return 0<a?a:1};
R.qG=function(){var a=this.B().minZoom;if(a){var b=parseFloat(a);0<b&&(a=Math.min(b,this.qD()));return a}return 0};R.uG=function(){return this.B().panDirection};R.pb=function(){return dvt.Ra.cs(this.B().styleDefaults.animationDuration)/1E3};R.Df=function(a){"categoryHighlight"==a.type&&this.NF(l);a&&this.dispatchEvent(a)};
function Wl(a){var b=a.B().nodes;if(b)for(var c=0;c<b.length;c++){var d=b[c],d=dvt.Ec.Ye(d,a.B().styleDefaults.nodeDefaults),d=new $l(a.j(),a,d),e=d.getId();d.Dra()?a.No.push(e):(d.wa(a.Nk),a.No.push(e),a.tc[e]=d)}}function Xl(a){var b=a.B().links;if(b)for(var c=0;c<b.length;c++){var d=b[c],d=dvt.Ec.Ye(d,a.B().styleDefaults.linkDefaults),e=new am(a.j(),a,d),d=e.getId();if(e.Dra())a.Fz.push(d);else{e.wa(a.Yo);a.Fz.push(d);a.be[d]=e;var f=a.fa(e.Xe()),e=a.fa(e.Hd());Jb(f,d);Kb(e,d)}}}
R.qv=function(a){for(var b=this.B().layout,c=Ab(this),d={},e=0;e<this.No.length;e++){var f=this.No[e];this.fa(f)&&(d[f]=l,c.hO(this.rx(this.fa(f))))}for(var h in this.be)if(e=this.jd(h)){var f=e.getData().startNode,k=e.getData().endNode;d[f]&&d[k]&&tb(c,this.fH(e,f,k))}if(b&&"function"==typeof b){var m=this;(b=b(c))||(b={then:function(a){a()}});this.Pba(0);b.then(function(){1===m.Up&&(m.Pba(1),m.aH(c,a,l))},t());return b}this.pL("dvt.Diagram: Layout function is not defined",1)};
R.Pba=function(a){this.Cg||(this.Yo.Q(a),this.Nk.Q(a))};R.fa=function(a){return this.tc[a]};R.jd=function(a){return this.be[a]};R.cQ=N("Fz");function Vl(a){var b=[],c;for(c in a.be)b.push(a.be[c]);return b}R.lH=N("No");function Ul(a){var b=[],c;for(c in a.tc)b.push(a.tc[c]);return b}
R.$j=function(a){dvt.vi.v.$j.call(this,a);switch(a.Um()){case dvt.pd.s4:if(this.nA){var b=a.iA,c=this.Gl?this.Gl:Va(this,a.ga,ba,ba);this.VV(c.x,c.y,c.a,c.b,b)}break;case dvt.pd.v4:this.Ir||(c=this.Gl?this.Gl:Va(this,a.ga,ba,ba),a.EQa(c));break;case dvt.pd.MH:if(this.B().zoomRenderer&&a.gJ!==a.iA)for(b in this.tc){var c=this.fa(b),d=a;if(c.D.B().zoomRenderer){var e=c.Jl(d.gJ),d=c.Jl(d.iA);bm(c,c.D.B().zoomRenderer,d,e)}}}};R.MPa=t();
R.sU=function(a){var b=[],c;for(c in this.be){var d=this.jd(c),e=d.Xe(),f=d.Hd();(e==a||f==a)&&d.mc&&b.push(d)}return b};R.xm=function(){return dvt.G.pa(dvt.G.La,"DIAGRAM")};R.OF=function(){if(this.U.selection&&this.Ct()){var a=[],b;for(b in this.tc)a.push(this.fa(b));for(var c in this.be)a.push(this.jd(c));this.Wj().Gt(this.U.selection,a)}};
R.NF=function(a){a&&this.ic.Xj(this);this.sC&&(this.N_(s,this.sC),this.sC=q);var b=this.U.highlightedCategories;if(b){var c="any"==this.U.highlightMatch;this.sC={};var d=[],e;for(e in this.tc){var f=this.fa(e),h=c?dvt.ha.Wy(f.we(),b):dvt.ha.n1(f.we(),b);h&&(this.sC[f.getId()]=f,d.push(f))}cm(this,d);var d=[],k;for(k in this.be)if(e=this.jd(k),h=c?dvt.ha.Wy(e.we(),b):dvt.ha.n1(e.we(),b))this.sC[e.getId()]=e,d.push(e);"linkAndNodes"==this.U.linkHighlightMode&&dm(this,d);this.N_(l,this.sC);if(a){var m=
this;setTimeout(function(){m.ic.hg(m)},0)}}else a&&this.ic.hg(this)};function cm(a,b){var c=a.U.nodeHighlightMode;if("node"!=c){for(var d="nodeAndIncomingLinks"==c||"nodeAndLinks"==c,c="nodeAndOutgoingLinks"==c||"nodeAndLinks"==c,e=[],f=0;f<b.length;f++)for(var h=b[f],k=d&&h.bo?h.bo:[],k=c&&h.Mq?k.concat(h.Mq):k,h=0;h<k.length;h++){var m=k[h];a.sC[m]=a.jd(m);e.push(a.jd(m))}dm(a,e)}}function dm(a,b){for(var c=0;c<b.length;c++){var d=b[c],e=d.Xe(),d=d.Hd();a.sC[e]=a.fa(e);a.sC[d]=a.fa(d)}}
R.N_=function(a,b){var c=a?this.U.styleDefaults._highlightAlpha:1;this.Yo.Q(c);this.Nk.Q(c);for(var d in b)a?this.By.q(b[d]):b[d]instanceof am?this.Yo.q(b[d]):b[d]instanceof $l&&this.Nk.q(b[d])};R.Me=function(a){this.U.highlightedCategories=dvt.Ec.Ga(a);this.NF()};dvt.vi.prototype.highlight=dvt.vi.prototype.Me;dvt.vi.prototype.select=function(a){this.U.selection=dvt.Ec.Ga(a);this.OF()};dvt.vi.prototype.select=dvt.vi.prototype.select;dvt.vi.prototype.mi=function(){this.Wd||(this.Wd=new em(this));return this.Wd};
dvt.vi.prototype.getAutomation=dvt.vi.prototype.mi;dvt.vi.prototype.pL=function(a,b){var c=this.B()._logger;if(c)switch(b){case 1:c.error&&c.error(a);break;case 2:c.warn&&c.warn(a);break;case 3:c.info&&c.info(a);break;default:c.log&&c.log(a)}};dvt.vi.prototype.Yw=function(a,b){var c=this.fa(a);c&&c.Yw(b)};dvt.vi.prototype.processDefaultHoverEffect=dvt.vi.prototype.Yw;dvt.vi.prototype.NG=function(a,b){var c=this.fa(a);c&&c.NG(b)};dvt.vi.prototype.processDefaultSelectionEffect=dvt.vi.prototype.NG;
dvt.vi.prototype.cB=function(a,b){var c=this.fa(a);c&&c.cB(b)};dvt.vi.prototype.processDefaultFocusEffect=dvt.vi.prototype.cB;dvt.vi.prototype.cV=function(a){var b=this.fa(a.getId());b.eE()||(b.wa(this.Nk),vd(a,b))};function fm(a,b){fm.v.constructor.call(this,a,b);this.Cjb();this.D=b}dvt.k.A(fm,dvt.Rg,"DvtDiagramCategoryRolloverHandler");fm.prototype.Zda=function(a){return dvt.k.Kh(this,function(){this.Yfa(l);this.D.Df(a)})};
fm.prototype.Yda=function(a){return dvt.k.Kh(this,function(){this.Zfa();this.D.Df(a)})};function Rl(){this.Init({skyros:gm,alta:hm})}dvt.k.A(Rl,dvt.ab,"DvtDiagramDefaults");
var gm={skin:dvt.e.Ze,emptyText:q,selectionMode:"none",animationOnDataChange:"none",animationOnDisplay:"none",maxZoom:1,highlightMatch:"all",nodeHighlightMode:"node",linkHighlightMode:"link",panning:"none",touchResponse:"auto",zooming:"none",_statusMessageStyle:new dvt.e(dvt.ab.am),styleDefaults:{animationDuration:500,hoverBehaviorDelay:200,_highlightAlpha:0.1,nodeDefaults:{labelStyle:dvt.ab.i3+"color:#383A47",hoverInnerColor:"rgb(255,255,255)",hoverOuterColor:"rgba(0,0,0, .3)",selectionColor:"rgb(0,0,0)",
icon:{width:10,height:10,fillPattern:"none",shape:"circle"}},linkDefaults:{startConnectorType:"none",endConnectorType:"none",width:1,style:"solid",hoverInnerColor:"rgb(255,255,255)",hoverOuterColor:"rgba(0,0,0, .3)",selectionColor:"rgb(0,0,0)",labelStyle:dvt.ab.i3+"color:#383A47",_hitDetectionOffset:4}}},hm={};function Zl(a,b,c,d){this.Init(a,b,c,d)}dvt.k.A(Zl,dvt.zp,"DvtDiagramDataAnimationHandler");Zl.prototype.Init=function(a,b,c,d){Zl.v.Init.call(this,a,b);this.i7a=c;this.Inb=d};
Zl.prototype.pb=function(){return dvt.Ra.cs(this.i7a.B().styleDefaults.animationDuration)/1E3};function Sl(a,b,c){this.Init(a,b,c);this.D=c}dvt.k.A(Sl,dvt.L,"DvtDiagramEventManager");R=Sl.prototype;R.Cp=function(a,b,c){a=this.D.B();"dim"==a.hoverBehavior&&(b=b.we?b.we():[],a.highlightedCategories=c?b.slice():q,c=dvt.Ya.LG(a.highlightedCategories,c),b=dvt.Ra.cs(a.styleDefaults.hoverBehaviorDelay),this.GH.Df(c,Ul(this.D),b,"any"==a.highlightMatch))};R.$ca=function(a,b){return new fm(a,b)};
R.Dk=function(a){var b=l,c=a.keyCode,d=this.bf(),e=d instanceof $l?d.Vz:q;c!=dvt.I.Qh&&this.YB?(e.ZT(a),a.preventDefault()):c==dvt.I.Qh&&e instanceof dvt.Ae?!a.shiftKey&&d.Qd()?(d.Nd(),e.ZT(a),a.preventDefault(),this.YB=l):(a.shiftKey&&this.YB?(this.EQ(a,d),a.preventDefault()):(this.YB&&d.Pf(),b=Sl.v.Dk.call(this,a)),this.YB=s):b=Sl.v.Dk.call(this,a);return b};R.oz=function(){var a=this.D.B();return"none"!==a.panning||"none"!==a.zooming?dvt.L.uE:a.touchResponse===dvt.L.Ix?dvt.L.Ix:dvt.L.fX};
R.Hv=function(a){return this.Xm(a,dvt.Ld.bL)};R.FB=function(a){return a==dvt.Ld.bL?s:Sl.v.FB.call(this,a)};function Tl(a,b){this.Init(a,b)}dvt.k.A(Tl,Ig,"DvtDiagramKeyboardHandler");Tl.prototype.Yi=function(a){var b=s;switch(a.keyCode){case dvt.I.rL:case dvt.I.UK:b=a.altKey?l:s;break;default:b=Tl.v.Yi.call(this,a)}return b};
Tl.prototype.yk=function(a){if(a.keyCode==dvt.I.Qh){var b=this.Pa.bf();if(b)return dvt.L.rc(a),b;b=Ul(this.Na());if(0<b.length)return dvt.L.rc(a),this.RJ(b)}return Tl.v.yk.call(this,a)};Tl.prototype.iL=function(a){return this.Na().fa(a)};function am(a,b,c){this.Init(a,b,c)}dvt.k.A(am,Od,"DvtDiagramLink");R=am.prototype;R.Init=function(a,b,c){am.v.Init.call(this,a,c.id,b);this.Pb=c;this.D.Ct()&&this.setCursor("pointer")};R.getData=N("Pb");R.getId=function(){return this.getData().id};R.Xe=function(){return this.getData().startNode};
R.Hd=function(){return this.getData().endNode};R.Xf=function(){var a=q;this.yb&&(a=this.yb.X());return a};R.IO=function(){return this.getData().style};R.KA=function(){return this.getData().width};R.pG=function(){return this.getData().color};R.kv=function(){return this.getData().startConnectorType};R.tt=function(){return this.getData().endConnectorType};R.d1=function(){if(this.kv()){var a=this.Cc().Sd().Ga();a.Gn(dvt.Rc.ur);return Vd.o3(q,this.kv(),q,a,this)}return 0};
R.z0=function(){if(this.tt()){var a=this.Cc().Sd().Ga();a.Gn(dvt.Rc.ur);return Vd.o3(q,this.tt(),q,a,this)}return 0};
R.wa=function(a){var b=this.getData(),c=this.MC;c||(c=["M",0,0,"L",0,0]);var d=b.id,e=b.color,f=b.width,h=b.style;this.pw=this.bW("#000000",0,b._hitDetectionOffset);this.q(this.pw);b=new dvt.xa(e,1,f);dvt.u.Va()&&(dvt.u.eq()&&1==dvt.u.vO())&&b.vf(l);h=df.lua(h);b.Gn(h,df.Qva(h),df.Rva(h));c=new dvt.ub(this.j(),c,d);c.la(q);c.Aa(b);this.WG(c);this.q(c);e=this.D;c=this.getData();d=dvt.u.aa(e.j())?dvt.Y.ul:dvt.Y.Io;c.label&&(h=c.labelStyle,b=dvt.Y.xr,e=new dvt.Y(e.j(),c.label,0,0),e.Eb(new dvt.e(h)),
e.dz(d),e.ND(b),c=dvt.e.vp((new dvt.e(c.labelStyle)).getWidth()),0<c&&dvt.Ba.sd(e,c,Infinity,this)||this.q(e),this.yb=e);a.q(this);this.Nf("img");this.vq();this.D.Ua().mb(this,this)};R.uc=function(a){am.v.uc.call(this,a);a?this.xA(this.Vo,l):this.sF();this.vq()};R.qb=function(){return this.Na().Ct()&&"off"!=this.getData().selectable};
R.xA=function(a,b){if(a){this.hl||(this.hl=this.Cc().Sd());var c=this.Cc().Sd().Ga();c.tv&&c.tv(this.getData().hoverInnerColor);this.Cc().Aa(c);Qd(this.kj,c);Qd(this.ej,c)}else this.hl&&(this.Cc().Aa(this.hl),Qd(this.kj,this.hl),Qd(this.ej,this.hl),this.hl=q);this.qg||(this.qg=Rd(this,"#000000",1,0),this.Jb(this.qg,0));var c=b?this.getData().selectionColor:this.getData().hoverOuterColor,d=this.qg.Sd().Ga();d.tv(c);d.$a(2+this.fL());Sd(this,d,l);this.qg.Aa(d,2)};
R.sF=function(){this.hl&&(this.Cc().Aa(this.hl),Qd(this.kj,this.hl),Qd(this.ej,this.hl),this.hl=q);this.qg&&(this.removeChild(this.qg),this.qg.oa&&this.qg.oa(),this.qg=q)};R.Ad=function(){this.Vo||(this.Vo=l,this.xA(l,this.wb()))};R.ad=function(){this.wb()?this.xA(s,l):this.sF();this.Vo=s};R.ug=function(){var a=this.Na().B().tooltip;return a?this.Na().j().Zf().Mw(a,this.$p()):this.de()};R.de=function(){return this.getData().shortDesc};R.$p=function(){return{id:this.getId(),type:"link",label:this.getData().label}};
R.Fd=function(){var a=[];this.qb()&&a.push(dvt.G.pa(dvt.G.La,this.wb()?"STATE_SELECTED":"STATE_UNSELECTED"));return dvt.ja.sk(this.de(),a)};R.vq=function(){if(!dvt.u.Fi()){var a=this.Fd();a&&this.zd("label",a)}};
R.Zd=function(a){if(a.keyCode==dvt.I.xi&&a.ctrlKey)return this;if(a.keyCode==dvt.I.Rh||a.keyCode==dvt.I.lg){var b=this.tS;b||(b=this.Na().fa(od(this.Na(),this)));var c=this,d=this.Na().sU(b.getId()),e=this.Na().Ua().Db;e&&e.vaa&&(c=e.vaa(b,this,a,d));c.tS=b;return c}return a.keyCode==dvt.I.bg||a.keyCode==dvt.I.ag?(a=this.u8(a.keyCode)?this.Xe():this.Hd(),this.Na().fa(a)):a.type==dvt.ra.Ee?this:q};R.u8=function(a){var b=Yd(this),c=Zd(this),b=b.x<c.x?l:s;return a==dvt.I.bg&&b||a==dvt.I.ag&&!b?s:l};
R.Pf=function(){this.fd=l;this.Ad()};R.Nd=function(){this.fd=s;this.ad()};R.Qd=N("fd");R.we=function(){return this.getData().categories?this.getData().categories:[this.getId()]};R.Dra=function(){var a=this.Na().B().hiddenCategories;return a&&dvt.ha.Wy(a,this.we())||!this.Na().fa(this.Xe())||!this.Na().fa(this.Hd())?l:s};
R.nh=function(a,b){var c=b.Uc(),d=this.Uc(),e=new dvt.Pd(this.j(),q,a.pb());dvt.ha.Ue(c,d)||(this.fe(c),c=dvt.F.Js,0<d.length&&isNaN(d[0])&&(c=dvt.F.zl),e.ga.M(c,this,this.Uc,this.fe,d));b.yb&&this.yb&&(d=b.yb.ob(),c=this.yb.ob(),d.Ue(c)||(this.yb.sb(d),e.ga.M(dvt.F.Ji,this.yb,this.yb.ob,this.yb.sb,c)));if(b.Cc()&&this.Cc()&&(d=b.Cc().Sd(),c=this.Cc().Sd(),d&&c&&d instanceof dvt.xa&&c instanceof dvt.xa&&(d.zc()!=c.zc()||d.getWidth()!=c.getWidth())))this.Cc().Aa(d),e.ga.M(dvt.F.LL,this.Cc(),this.Cc().Sd,
this.Cc().Aa,c);a.add(e,1)};R.Vj=function(a){Gl(this.Na()).q(this);var b=this,c=new dvt.Gj(this.j(),this,a.pb());dvt.eb.Lb(c,function(){b.getParent().removeChild(b);b.oa()});a.add(c,0)};R.Ri=function(a){this.Q(0);a.add(new dvt.Ah(this.j(),this,a.pb()),2)};R.Vl=function(){return this.getData()};R.fca=function(a,b){a&&(a==dvt.Y.Io?this.yb.xj():a==dvt.Y.Bk?this.yb.Uf():a==dvt.Y.ul&&this.yb.yj());b&&(b==dvt.Y.xr?this.yb.po():b==dvt.Y.gi?this.yb.rg():b==dvt.Y.Mo?this.yb.Wp():"baseline"==b&&this.yb.HJ())};
function $l(a,b,c){this.Init(a,b,c)}dvt.k.A($l,ne,"DvtDiagramNode");R=$l.prototype;R.Init=function(a,b,c){$l.v.Init.call(this,a,c.id,b);this.Pb=c;this.D.Ct()&&this.setCursor("pointer")};R.getData=N("Pb");R.getId=function(){return this.Pb.id};R.Uh=N("BR");R.Xf=function(){var a=q;this.yb&&(a=this.vC?this.vC:this.yb.X());return a};R.uc=function(a){var b=this.Jl();$l.v.uc.call(this,a);this.D.B().selectionRenderer?bm(this,this.D.B().selectionRenderer,this.Jl(),b):this.NG(a);this.vq()};
R.NG=function(a){this.as()&&this.as().uc(a)};R.qb=function(){return this.Na().Ct()&&"off"!=this.getData().selectable};R.rW=N("$");
R.wa=function(a){if(this.D.B().renderer)bm(this,this.D.B().renderer,this.Jl(),q);else{var b=this.getData(),c=this.D,d=new dvt.e(b.backgroundStyle);if(!d.OOa()){var e=dvt.e.vp(d.K(dvt.e.Vn)),f=dvt.e.vp(d.K(dvt.e.Cs)),h=d.K(dvt.e.Nb),k=d.K(dvt.e.tb),m=dvt.e.vp(d.K(dvt.e.Hj)),d=dvt.e.vp(d.K(dvt.e.kg)),c=new dvt.na(c.j(),0,0,e,f);c.lb(h);d&&(c.Nh(d),c.Xh(d));k&&c.Aa(new dvt.xa(k,1,m));this.q(c);this.vP(c);this.Kb=c}h=this.D;if(k=b.icon){c=k.width;e=k.height;m=k.color;f=k.borderRadius;h=k.source?new dvt.wf(h.j(),
c/2,e/2,c,e,f,k.source,k.sourceSelected,k.sourceHover,k.sourceHoverSelected):new dvt.ta(h.j(),k.shape,dvt.e.Ze,c/2,e/2,c,e,f);"none"!=k.fillPattern?h.la(new dvt.pc(k.fillPattern,m,m)):h.lb(m);k.borderColor&&h.Aa(new dvt.xa(k.borderColor,k.borderWidth));this.q(h);this.$=h;if(this.Kb){var k=b.icon,m=this.Kb.getWidth(),c=this.Kb.getHeight(),e=k.width,f=k.height,d=0.5*(m-e),p=0.5*(c-f);if(k.positionX!==ba)d=parseFloat(k.positionX),dvt.u.aa(this.j())&&(d=m-d-e);else{var n=k.halign;"start"==n?n=dvt.u.aa(this.j())?
"right":"left":"end"==n&&(n=dvt.u.aa(this.j())?"left":"right");d="left"==n?0:"right"==n?m-e:d}k.positionY!==ba?p=parseFloat(k.positionY):"top"==k.valign?p=0:"bottom"==k.valign&&(p=c-f);this.$.Ja(d,p)}this.Kb||this.vP(h)}c=this.D;h=dvt.u.aa(c.j())?dvt.Y.ul:dvt.Y.Io;b.label&&(k=b.labelStyle,m=dvt.Y.xr,c=new dvt.Y(c.j(),b.label,0,0),c.Eb(new dvt.e(k)),c.dz(h),c.ND(m),h=dvt.e.vp((new dvt.e(b.labelStyle)).getWidth()),0<h&&dvt.Ba.sd(c,h,Infinity,this)||this.q(c),this.yb=c);im(this.as(),b)}a.q(this);a=q;
this.Vz?(b=this.X())&&(a=new dvt.W(b.x,b.y,b.a-b.x,b.b-b.y)):(a=this.Kb?this.Kb.gL(this):q)&&this.$?a=a.Dj(this.$.gL(this)):!a&&this.$&&(a=this.$.gL(this));this.BR=a;this.Nf("img");this.vq();this.D.Ua().mb(this,this)};
function bm(a,b,c,d){var e=a.D.B()._contextHandler;if(e){var f=a.getData();c=e(a.nb(),a.Vz,f,c,d);b=b(c);a.Vz&&b!=a.Vz&&(a.Vz.namespaceURI===dvt.H.ZW?a.s0().removeChild(a.Vz):a.removeChild(b),a.Vz=q);b&&b.namespaceURI===dvt.H.ZW?a.Vz||(dvt.H.af(a.s0(),b),a.Vz=b):b instanceof dvt.Ae?a.Vz||(a.q(b),a.Vz=b):b&&a.D.pL("dvt.Diagram: could not add custom node content for the node "+a.getId()+b,1)}else a.D.pL("dvt.Diagram: could not add custom node content - context handler is undefined",1)}
function im(a,b){var c=b.hoverInnerColor,d=b.hoverOuterColor,e=b.selectionColor,f=new dvt.xa(c,1,4);f.vf(l);d=new dvt.xa(d,1,8);d.vf(l);var h=new dvt.xa(e,1,2);h.vf(l);var k=new dvt.xa(e,1,4);k.vf(l);c=new dvt.xa(c,1,4);c.vf(l);e=new dvt.xa(e,1,8);e.vf(l);a.uv(f,d).vv(h,k).bx(c,e)}R.vP=I("TN");R.as=function(){if(!this.TN&&this.BR){var a=new dvt.na(this.D.j(),this.BR.x,this.BR.y,this.BR.a,this.BR.b);a.dc();this.vP(a);this.Jb(a,0);im(a,this.getData());this.TN=a}return this.TN};
R.Ad=function(){var a=this.Jl();this.Vo=l;this.D.B().hoverRenderer?bm(this,this.D.B().hoverRenderer,this.Jl(),a):this.Yw(l)};R.ad=function(){var a=this.Jl();this.Vo=s;this.D.B().hoverRenderer?bm(this,this.D.B().hoverRenderer,this.Jl(),a):this.Yw(s)};R.Yw=function(a){this.as()&&(a?this.as().Ad():this.as().ad())};R.ug=function(){var a=this.Na().B().tooltip;return a?this.Na().j().Zf().Mw(a,this.$p()):this.de()};R.de=function(){return this.getData().shortDesc};
R.$p=function(){return{id:this.getId(),type:"node",label:this.getData().label}};R.Fd=function(){var a=[];this.qb()&&a.push(dvt.G.pa(dvt.G.La,this.wb()?"STATE_SELECTED":"STATE_UNSELECTED"));return dvt.ja.sk(this.de(),a)};R.vq=function(){if(!dvt.u.Fi()){var a=this.Fd();a&&this.zd("label",a)}};
R.Zd=function(a){var b=q;if(a.keyCode==dvt.I.xi&&a.ctrlKey)b=this;else if((a.keyCode==dvt.I.rL||dvt.I.UK)&&a.altKey){var c=this.Na().sU(this.getId()),d=this.Na().Ua().Db;d&&d.baa&&(b=d.baa(this,a,c));b?b.tS=this:b=this}else a.type==dvt.ra.Ee?b=this:(b=Ul(this.Na()),b=dvt.Db.rG(this,a,b));return b};R.Pf=function(){var a=this.Jl();this.fd=l;this.D.B().focusRenderer?bm(this,this.D.B().focusRenderer,this.Jl(),a):this.cB(l)};
R.Nd=function(){this.Qd()&&(this.Jl(),this.fd=s,this.D.B().focusRenderer?bm(this,this.D.B().focusRenderer,this.getData(),this.Jl()):this.cB(s))};R.cB=function(a){this.Yw(a)};R.Qd=N("fd");R.we=function(){return this.getData().categories?this.getData().categories:[this.getId()]};R.Dra=function(){var a=this.Na().B().hiddenCategories;return a&&dvt.ha.Wy(a,this.we())?l:s};
R.nh=function(a,b){var c=new dvt.Pd(this.j(),q,a.pb()),d=b.ma(),e=b.ka(),f=this.ma(),h=this.ka();d!=f&&(this.da(d),c.ga.M(dvt.F.T,this,this.ma,this.da,f));e!=h&&(this.ua(e),c.ga.M(dvt.F.T,this,this.ka,this.ua,h));b.$&&this.$&&(c.ga.M(dvt.F.KB,this.$,this.$.Ly,this.$.RG,this.$.Ly()),this.$.RG(b.$.Ly()));b.yb&&this.yb&&(d=b.yb.ob(),e=this.yb.ob(),d.Ue(e)||(this.yb.sb(d),c.ga.M(dvt.F.Ji,this.yb,this.yb.ob,this.yb.sb,e)));jm(c,b.Kb,this.Kb);jm(c,b.$,this.$);a.add(c,1)};
function jm(a,b,c){b&&c&&(a.ga.M(dvt.F.uq,c,c.Id,c.la,c.Id()),c.la(b.Id()))}R.Vj=function(a){Fl(this.Na()).q(this);var b=this,c=new dvt.Gj(this.j(),this,a.pb());dvt.eb.Lb(c,function(){b.getParent().removeChild(b);b.oa()});a.add(c,0)};R.Ri=function(a){this.Q(0);a.add(new dvt.Ah(this.j(),this,a.pb()),2)};R.Vl=function(){return this.getData()};R.Jl=function(a){return{hovered:this.Vo,selected:this.wb(),focused:this.fd,zoom:a?a:this.Na().Oa.$f()}};
R.fca=function(a,b){a&&(a==dvt.Y.Io?this.yb.xj():a==dvt.Y.Bk?this.yb.Uf():a==dvt.Y.ul&&this.yb.yj());b&&(b==dvt.Y.xr?this.yb.po():b==dvt.Y.gi?this.yb.rg():b==dvt.Y.Mo?this.yb.Wp():"baseline"==b&&this.yb.HJ())};function em(a){this.Init(a)}ea("DvtDiagramAutomation",em);dvt.k.A(em,dvt.Wd,"DvtDiagramAutomation");em.prototype.Init=I("D");
em.prototype.Ho=function(a){return(a=this.D.Ua().jb(a))&&a instanceof $l?"node["+this.D.lH().indexOf(a.getId())+"]":a&&a instanceof am?"link["+this.D.cQ().indexOf(a.getId())+"]":q};em.prototype.oi=function(a){if(a==dvt.Wd.JB)return this.bE(this.D);var b=this.GN(a);a=b.component;var b=b.index,c=q;"node"==a?c=this.mk(b):"link"==a&&(c=km(this,b));return c?c.nb():q};em.prototype.getDomElementForSubId=em.prototype.oi;
em.prototype.GN=function(a){var b=a,c=-1,d=a.substring(0,a.indexOf("["));d&&(b="node"==d||"link"==d?d:q,c=parseInt(a.substring(a.indexOf("[")+1,a.indexOf("]"))));return{component:b,index:c}};em.prototype.xg=function(){return this.D.xg()};em.prototype.getNodeCount=em.prototype.xg;em.prototype.wt=function(){return this.D.wt()};em.prototype.getLinkCount=em.prototype.wt;
em.prototype.kd=function(a){if(a=this.mk(a)){var b={};b.id=a.getId();b.selected=a.wb();b.tooltip=a.de();b.label=a.getData().label;b.background=a.getData().backgroundStyle;b.icon=this.GY(a.rW());return b}return q};em.prototype.getNode=em.prototype.kd;
em.prototype.kU=function(a){if(a=km(this,a)){var b={};b.id=a.getId();b.selected=a.wb();b.tooltip=a.de();b.label=a.getData().label;b.color=a.pG();b.width=a.KA();b.style=a.IO();b.startNode=a.Xe();b.endNode=a.Hd();b.startConnectorType=a.kv();b.endConnectorType=a.tt();return b}return q};em.prototype.getLink=em.prototype.kU;em.prototype.GY=function(a){if(a){var b={};b.shape=a instanceof dvt.ta?a.ne():"none";a.Id()&&(b.color=a.Id().zc());return b}return q};
em.prototype.mk=function(a){var b=this.D.lH();return 0<=a&&a<b.length?this.D.fa(b[a]):q};function km(a,b){var c=a.D.cQ();return 0<=b&&b<c.length?a.D.jd(c[b]):q};