/* * GoJS v1.8.5 JavaScript Library for HTML Diagrams * Northwoods Software, https://www.nwoods.com/ * GoJS and Northwoods Software are registered trademarks of Northwoods Software Corporation. * Copyright (C) 1998-2017 by Northwoods Software Corporation. All Rights Reserved. * THIS SOFTWARE IS LICENSED. THE LICENSE AGREEMENT IS AT: https://gojs.net/1.8.5/doc/license.html. */ (function(window) { var f,ba={};if(!window.document||void 0===window.document.createElement("canvas").getContext)throw window.console&&window.console.log("The HTML Canvas element is not supported in this browser,or this browser is in Compatibility mode."),Error("The HTML Canvas element is not supported in this browser,or this browser is in Compatibility mode.");if(!Object.defineProperty)throw Error("GoJS requires a newer version of JavaScript"); Function.prototype.bind||(Function.prototype.bind=function(a){function b(){return g.apply(a,e.concat(d.call(arguments)))}function c(){}var d=Array.prototype.slice,e=d.call(arguments,1),g=this;c.prototype=this.prototype;b.prototype=new c;return b}); (function(){for(var a=0,b=["ms","moz","webkit","o"],c=0;c=d.length)){var e=D.wb(b,d);if(null!==e&&"function"!==typeof e){if(b.hasOwnProperty(d)){var g=Object.getPrototypeOf(b);if(g&&g.Mw&&g.Mw[d])continue}else if(D.Yx(b,d))continue;""===c&&(c=b+"\n");c+=' unknown property "'+d+'" has value: '+e+" at "+a+"\n"}}return c},Cx:function(a,b){if(null!==b&&void 0!==b&&"number"!==typeof b&&"string"!== typeof b&&"boolean"!==typeof b&&"function"!==typeof b)if(void 0!==D.Kd(b)){if(!v.Zw.contains(b))if(v.Zw.add(b),v.Aw.add(v.cF(a,b)),b instanceof K||b instanceof L||b instanceof oa)for(var c=b.j;c.next();)v.Cx(a+"["+c.key+"]",c.value);else for(c in b){var d=D.wb(b,c);if(void 0!==d&&null!==d&&D.Qa(d)&&d!==b.Mw){if(b instanceof pa){if(d===b.sf)continue}else if(b instanceof x){if("data"===c||d===b.Pd)continue;if("itemArray"===c||d===b.fj)continue;if(b instanceof F&&d===b.Tl)continue}else if(!(b instanceof E))if(b instanceof qa){if("archetypeGroupData"===c||d===b.nz)continue}else if(b instanceof ra){if("archetypeLinkData"===c||d===b.pz)continue;if("archetypeLabelNodeData"===c||d===b.oz)continue}else if(b instanceof ta){if("archetypeNodeData"===c||d===b.zl)continue}else if(b instanceof M){if("nodeDataArray"===c||d===b.ye)continue;if("linkDataArray"===c||d===b.ff||d===b.mi)continue;if(d===b.Hc)continue;if(d===b.zg)continue}else if(b instanceof ua||b instanceof va||b instanceof wa)continue;v.Cx(a+"."+ c,d)}}}else if(Array.isArray(b))for(c=0;c=a.length?a.push(c):a.splice(b,0,c):D.k("Cannot insert an object into an HTMLCollection or NodeList: "+c+" at "+b)},Vg:function(a, b){Array.isArray(a)?b>=a.length?a.pop():a.splice(b,1):D.k("Cannot remove an object from an HTMLCollection or NodeList at "+b)},ez:[],P:function(){var a=D.ez.pop();return void 0===a?new N:a},Fb:function(a,b){var c=D.ez.pop();if(void 0===c)return new N(a,b);c.x=a;c.y=b;return c},A:function(a){D.ez.push(a)},BC:[],Gm:function(){var a=D.BC.pop();return void 0===a?new Ca:a},$k:function(a){D.BC.push(a)},fz:[],Rf:function(){var a=D.fz.pop();return void 0===a?new C:a},vg:function(a,b,c,d){var e=D.fz.pop(); if(void 0===e)return new C(a,b,c,d);e.x=a;e.y=b;e.width=c;e.height=d;return e},Lb:function(a){D.fz.push(a)},CC:[],Sf:function(){var a=D.CC.pop();return void 0===a?new Ea:a},Ke:function(a){D.CC.push(a)},gz:null,v:function(){var a=D.gz;return null!==a?(D.gz=null,a):new Fa},u:function(a){a.reset();D.gz=a},AC:[],nb:function(){var a=D.AC.pop();return void 0===a?[]:a},ya:function(a){a.length=0;D.AC.push(a)},Co:Object.freeze([]),Km:1,vc:function(a){a.__gohashid=D.Km++},qq:function(a){var b=a.__gohashid; void 0===b&&(b=D.Km++,a.__gohashid=b);return b},Kd:function(a){return a.__gohashid},ka:function(a,b){b.vz=a;ba[a]=b},Ta:function(a,b){function c(){}c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a},Fi:function(a){a.MH=!0},defineProperty:function(a,b,c,d,e){D.h(a,"function","Util.defineProperty:classfunc");D.h(b,"object","Util.defineProperty:propobj");D.h(c,"function","Util.defineProperty:getter");D.h(d,"function","Util.defineProperty:setter");for(var g in b){b=b[g];c={get:c,set:d, enumerable:!0};if(void 0!==e)for(var h in e)c[h]=e[h];Object.defineProperty(a.prototype,g,c);e=Object.getOwnPropertyDescriptor(a.prototype,g);b&&e&&Object.defineProperty(a.prototype,b,e);break}},LK:!1,w:function(a,b,c,d){D.h(a,"function","Util.defineReadOnlyProperty:classfunc");D.h(b,"object","Util.defineReadOnlyProperty:propobj");D.h(c,"function","Util.defineReadOnlyProperty:getter");for(var e in b){var g=b[e];b={get:c,set:function(a){D.k('The property "'+g+'" is read-only and cannot be set to '+ a)},enumerable:!0};if(void 0!==d)for(var h in d)b[h]=d[h];Object.defineProperty(a.prototype,e,b);d=Object.getOwnPropertyDescriptor(a.prototype,e);g&&d&&Object.defineProperty(a.prototype,g,d);break}},ne:function(a,b){for(var c in b)b[c]=!0;a.prototype.Mw=b},getTypeName:function(a){return void 0===a?"":"string"===typeof a?a:"function"===typeof a?D.wf(a):null===a?"*":""},wf:function(a){if("function"===typeof a){if(a.vz)return a.vz;if(a.name)return a.name;var b=a.toString(),c=b.indexOf("("),b=b.substring(9, c).trim();if(""!==b)return a.vz=b}else if(D.Qa(a)&&a.constructor)return D.wf(a.constructor);return typeof a},s:function(a,b,c){D.h(a,"function","Util.defineEnumValue:classfunc");D.h(b,"string","Util.defineEnumValue:name");D.h(c,"number","Util.defineEnumValue:num");c=new ya(a,b,c);Object.freeze(c);a[b]=c;var d=a.uv;d instanceof oa||(d=new oa("string",ya),a.uv=d);d.add(b,c);return c},wb:function(a,b){if(!a||!b)return null;var c=void 0;try{"function"===typeof b?c=b(a):"function"===typeof a.getAttribute? (c=a.getAttribute(b),null===c&&(c=void 0)):c=a[b]}catch(d){v&&D.trace("property get error: "+d.toString())}return c},Ua:function(a,b,c){if(a&&b)try{"function"===typeof b?b(a,c):"function"===typeof a.setAttribute?a.setAttribute(b,c):a[b]=c}catch(d){v&&D.trace("property set error: "+d.toString())}},iv:function(a,b){D.h(a,"object","Setting properties requires Objects as arguments");D.h(b,"object","Setting properties requires Objects as arguments");var c=a instanceof x,d=a instanceof E,e;for(e in b){""=== e&&D.k("Setting properties requires non-empty property names");var g=a,h=e;if(c||d){var k=e.indexOf(".");if(0c;c++)b[c]=c;for(var d=0,e=0,c=0;256>c;c++)d=(d+b[c]+119)%256,e=b[c],b[c]=b[d],b[d]=e;for(var d=c=0, g="",h=0;hc;c++)b["0123456789abcdef".charAt(c>>4)+"0123456789abcdef".charAt(c&15)]=String.fromCharCode(c);a.length%2&&(a="0"+a);for(var d=[],e=0,c=0;cd;d++)b[D.Wg("7ca11abfd7330390")](D.Wg(c[d-1]),10,15*d+0);b[D.Wg("7ca11abfd022028846")]=D.Wg("39f046ebb36e4b");for(d=1;5>d;d++)b[D.Wg("7ca11abfd7330390")](D.Wg(c[d- 1]),10,15*d+0);if(4!==c.length||"5"!==c[0][0]||"7"!==c[3][0])D.s=function(a,b){var c=new ya(a,b,2);Object.freeze(c);a[b]=c;var d=a.uv;d instanceof oa||(d=new oa("string",ya),a.uv=d);d.add(b,c);return c};return a}();function ya(a,b,c){D.vc(this);this.MC=a;this.$b=b;this.QH=c}D.ka("EnumValue",ya);ya.prototype.toString=function(){return D.wf(this.MC)+"."+this.$b};D.w(ya,{Re:"classType"},function(){return this.MC});D.w(ya,{name:"name"},function(){return this.$b});D.w(ya,{value:"value"},function(){return this.QH}); var Ha;ya.findName=Ha=function(a,b){if(void 0===b||null===b||""===b)return null;D.h(a,"function","findName:classfunc");D.h(b,"string","EnumValue.findName:name");var c=a.uv;return c instanceof oa?c.oa(b):null};function xa(){this.LC=[]}xa.prototype.toString=function(){return this.LC.join("")};xa.prototype.add=function(a){""!==a&&this.LC.push(a)};function ma(){} function Ia(a){void 0===a&&(a=42);this.seed=a;this.az=48271;this.tv=2147483647;this.zC=this.tv/this.az;this.yH=this.tv%this.az;this.xH=1/this.tv;this.random()}Ia.prototype.random=function(){var a=this.seed%this.zC*this.az-this.seed/this.zC*this.yH;this.seed=0this.key)return!1;D.Va(a)}var a=a.o,b=a.length,c=++this.Fc,d=this.ri;if(null!==d)for(;cthis.key)return!1;D.Va(a)}var b=--this.Fc;if(0<=b)return this.key=b,this.value=a.o[b],!0;this.Vf();return!1};Ua.prototype.hasNext=function(){return this.next()}; Ua.prototype.first=Ua.prototype.first=function(){var a=this.Gc;this.Za=a.I;var b=a.o;this.Fc=a=b.length-1;return 0<=a?(b=b[a],this.key=a,this.value=b):null};Ua.prototype.any=function(a){var b=this.Gc;b.gj=null;var c=b.I,d=b.o,e=d.length;this.Fc=e;for(e-=1;0<=e;e--){if(a(d[e]))return!0;b.I!==c&&D.Va(b)}return!1};Ua.prototype.all=function(a){var b=this.Gc;b.gj=null;var c=b.I,d=b.o,e=d.length;this.Fc=e;for(e-=1;0<=e;e--){if(!a(d[e]))return!1;b.I!==c&&D.Va(b)}return!0}; Ua.prototype.each=function(a){var b=this.Gc;b.gj=null;var c=b.I,d=b.o,e=d.length;this.Fc=e;for(e-=1;0<=e;e--)a(d[e]),b.I!==c&&D.Va(b);return this};Ua.prototype.map=function(a){var b=this.Gc;b.gj=null;var c=b.I,d=[],e=b.o,g=e.length;this.Fc=g;for(g-=1;0<=g;g--)d.push(a(e[g])),b.I!==c&&D.Va(b);a=new K;a.o=d;a.Sc();return a.j}; Ua.prototype.filter=function(a){var b=this.Gc;b.gj=null;var c=b.I,d=[],e=b.o,g=e.length;this.Fc=g;for(g-=1;0<=g;g--){var h=e[g];a(h)&&d.push(h);b.I!==c&&D.Va(b)}a=new K(b.da);a.o=d;a.Sc();return a.j};Ua.prototype.concat=function(a){this.Gc.gj=null;return new Na(this,a.j)};D.w(Ua,{count:"count"},function(){return this.Gc.o.length});Ua.prototype.Vf=function(){this.key=-1;this.value=null;this.Za=-1;this.Gc.gj=this}; Ua.prototype.toString=function(){return"ListIteratorBackwards("+this.Fc+"/"+this.Gc.count+")"}; function K(a){D.vc(this);this.J=!1;this.o=[];this.I=0;this.gj=this.Zb=null;void 0===a||null===a?this.da=null:"string"===typeof a?"object"===a||"string"===a||"number"===a||"boolean"===a||"function"===a?this.da=a:D.ua(a,"the string 'object', 'number', 'string', 'boolean', or 'function'","List constructor: type"):"function"===typeof a?this.da=a===Object?"object":a===String?"string":a===Number?"number":a===Boolean?"boolean":a===Function?"function":a:D.ua(a,"null, a primitive type name, or a class type", "List constructor: type")}D.ka("List",K);K.prototype.oh=function(a){null!==this.da&&("string"===typeof this.da?typeof a===this.da&&null!==a||D.jc(a,this.da):a instanceof this.da||D.jc(a,this.da))};K.prototype.Sc=function(){var a=this.I;a++;999999999a||a>=b.length)&&D.ua(a,"0 <= i < length",K,"elt:i");return b[a]};K.prototype.get=K.prototype.get=function(a){return this.fa(a)};K.prototype.setElt=K.prototype.ug=function(a,b){v&&(this.oh(b),D.p(a,K,"setElt:i"));var c=this.o;(0>a||a>=c.length)&&D.ua(a,"0 <= i < length",K,"setElt:i");this.J&&D.qa(this,a);c[a]=b};K.prototype.set=K.prototype.set=function(a,b){this.ug(a,b)}; K.prototype.first=K.prototype.first=function(){var a=this.o;return 0===a.length?null:a[0]};K.prototype.last=K.prototype.qe=function(){var a=this.o,b=a.length;return 0a&&D.ua(a,">= 0",K,"insertAt:i");this.J&&D.qa(this,a);var c=this.o;a>=c.length?c.push(b):c.splice(a,0,b);this.Sc();return!0}; K.prototype.remove=K.prototype["delete"]=K.prototype.remove=function(a){if(null===a)return!1;v&&this.oh(a);this.J&&D.qa(this,a);var b=this.o;a=b.indexOf(a);if(-1===a)return!1;a===b.length-1?b.pop():b.splice(a,1);this.Sc();return!0};K.prototype.removeAt=K.prototype.nd=function(a){v&&D.p(a,K,"removeAt:i");var b=this.o;(0>a||a>=b.length)&&D.ua(a,"0 <= i < length",K,"removeAt:i");this.J&&D.qa(this,a);a===b.length-1?b.pop():b.splice(a,1);this.Sc()}; K.prototype.removeRange=K.prototype.removeRange=function(a,b){v&&(D.p(a,K,"removeRange:from"),D.p(b,K,"removeRange:to"));var c=this.o,d=c.length;if(0>a)a=0;else if(a>=d)return this;if(0>b)return this;b>=d&&(b=d-1);if(a>b)return this;this.J&&D.qa(this);for(var e=a,g=b+1;g=g)return this;(0>b||b>=e-1)&&D.ua(b,"0 <= from < length",K,"sortRange:from");if(2===g)return c=d[b],e=d[b+1],0=e)d.sort(a);else for(g=d.slice(0,c),g.sort(a),a=0;a=e)for(g=d.slice(b), g.sort(a),a=b;a=this.o.length)return Ka;var a=this.Zb;return null!==a?(a.reset(),a):new Qa(this)}); D.w(K,{$n:"iteratorBackwards"},function(){if(0>=this.o.length)return Ka;var a=this.gj;return null!==a?(a.reset(),a):new Ua(this)});function Va(a){this.ti=a;a.Zb=null;this.Za=a.I;this.bb=null}D.ne(Va,{key:!0,value:!0});D.w(Va,{j:"iterator"},function(){return this});Va.prototype.reset=Va.prototype.reset=function(){var a=this.ti;a.Zb=null;this.Za=a.I;this.bb=null}; Va.prototype.next=Va.prototype.next=function(){var a=this.ti;if(a.I!==this.Za){if(null===this.key)return!1;D.Va(a)}var b=this.bb,b=null===b?a.Ma:b.gb;if(null!==b)return this.bb=b,this.value=b.value,this.key=b.key,!0;this.Vf();return!1};Va.prototype.hasNext=function(){return this.next()};Va.prototype.first=Va.prototype.first=function(){var a=this.ti;this.Za=a.I;a=a.Ma;if(null!==a){this.bb=a;var b=a.value;this.key=a.key;return this.value=b}return null}; Va.prototype.any=function(a){var b=this.ti;b.Zb=null;var c=b.I;this.bb=null;for(var d=b.Ma;null!==d;){if(a(d.value))return!0;b.I!==c&&D.Va(b);d=d.gb}return!1};Va.prototype.all=function(a){var b=this.ti;b.Zb=null;var c=b.I;this.bb=null;for(var d=b.Ma;null!==d;){if(!a(d.value))return!1;b.I!==c&&D.Va(b);d=d.gb}return!0};Va.prototype.each=function(a){var b=this.ti;b.Zb=null;var c=b.I;this.bb=null;for(var d=b.Ma;null!==d;)a(d.value),b.I!==c&&D.Va(b),d=d.gb;return this}; Va.prototype.map=function(a){var b=this.ti;b.Zb=null;for(var c=new K,d=b.I,e=b.Ma;null!==e;)c.add(a(e.value)),b.I!==d&&D.Va(b),e=e.gb;return c.j};Va.prototype.filter=function(a){var b=this.ti;b.Zb=null;for(var c=new K(b.da),d=b.I,e=b.Ma;null!==e;){var g=e.value;a(g)&&c.add(g);b.I!==d&&D.Va(b);e=e.gb}return c.j};Va.prototype.concat=function(a){this.ti.Zb=null;return new Na(this,a.j)};D.w(Va,{count:"count"},function(){return this.ti.Ad}); Va.prototype.Vf=function(){this.value=this.key=null;this.Za=-1;this.ti.Zb=this};Va.prototype.toString=function(){return null!==this.bb?"SetIterator@"+this.bb.value:"SetIterator"}; function L(a){D.vc(this);this.J=!1;void 0===a||null===a?this.da=null:"string"===typeof a?"object"===a||"string"===a||"number"===a?this.da=a:D.ua(a,"the string 'object', 'number' or 'string'","Set constructor: type"):"function"===typeof a?this.da=a===Object?"object":a===String?"string":a===Number?"number":a:D.ua(a,"null, a primitive type name, or a class type","Set constructor: type");this.Bd={};this.Ad=0;this.Zb=null;this.I=0;this.ki=this.Ma=null}D.ka("Set",L); L.prototype.oh=function(a){null!==this.da&&("string"===typeof this.da?typeof a===this.da&&null!==a||D.jc(a,this.da):a instanceof this.da||D.jc(a,this.da))};L.prototype.Sc=function(){var a=this.I;a++;999999999=this.Ad)return Ka;var a=this.Zb;return null!==a?(a.reset(),a):new Va(this)});function Xa(a){this.Na=a;this.Za=a.I;this.bb=null}D.ne(Xa,{key:!0,value:!0});D.w(Xa,{j:"iterator"},function(){return this});Xa.prototype.reset=Xa.prototype.reset=function(){this.Za=this.Na.I;this.bb=null}; Xa.prototype.next=Xa.prototype.next=function(){var a=this.Na;if(a.I!==this.Za){if(null===this.key)return!1;D.Va(a)}var b=this.bb,b=null===b?a.Ma:b.gb;if(null!==b)return this.bb=b,this.value=this.key=a=b.key,!0;this.Vf();return!1};Xa.prototype.hasNext=function(){return this.next()};Xa.prototype.first=Xa.prototype.first=function(){var a=this.Na;this.Za=a.I;a=a.Ma;return null!==a?(this.bb=a,this.value=this.key=a=a.key):null}; Xa.prototype.any=function(a){var b=this.Na,c=b.I;this.bb=null;for(var d=b.Ma;null!==d;){if(a(d.key))return!0;b.I!==c&&D.Va(b);d=d.gb}return!1};Xa.prototype.all=function(a){var b=this.Na,c=b.I;this.bb=null;for(var d=b.Ma;null!==d;){if(!a(d.key))return!1;b.I!==c&&D.Va(b);d=d.gb}return!0};Xa.prototype.each=function(a){var b=this.Na,c=b.I;this.bb=null;for(var d=b.Ma;null!==d;)a(d.key),b.I!==c&&D.Va(b),d=d.gb;return this}; Xa.prototype.map=function(a){var b=this.Na,c=b.I;this.bb=null;for(var d=new K,e=b.Ma;null!==e;)d.add(a(e.key)),b.I!==c&&D.Va(b),e=e.gb;return d.j};Xa.prototype.filter=function(a){var b=this.Na,c=b.I;this.bb=null;for(var d=new K(b.ef),e=b.Ma;null!==e;){var g=e.key;a(g)&&d.add(g);b.I!==c&&D.Va(b);e=e.gb}return d.j};Xa.prototype.concat=function(a){return new Na(this,a.j)};D.w(Xa,{count:"count"},function(){return this.Na.Ad});Xa.prototype.Vf=function(){this.value=this.key=null;this.Za=-1}; Xa.prototype.toString=function(){return null!==this.bb?"MapKeySetIterator@"+this.bb.value:"MapKeySetIterator"};function Ya(a){D.vc(this);this.J=!0;this.Na=a}D.Ta(Ya,L);Ya.prototype.freeze=function(){return this};Ya.prototype.Xa=function(){return this};Ya.prototype.toString=function(){return"MapKeySet("+this.Na.toString()+")"};Ya.prototype.add=Ya.prototype.add=function(){D.k("This Set is read-only: "+this.toString());return!1}; Ya.prototype.set=Ya.prototype.set=function(){D.k("This Set is read-only: "+this.toString());return!1};Ya.prototype.contains=Ya.prototype.contains=function(a){return this.Na.contains(a)};Ya.prototype.has=Ya.prototype.has=function(a){return this.contains(a)};Ya.prototype.remove=Ya.prototype["delete"]=Ya.prototype.remove=function(){D.k("This Set is read-only: "+this.toString());return!1};Ya.prototype.clear=Ya.prototype.clear=function(){D.k("This Set is read-only: "+this.toString())}; Ya.prototype.first=Ya.prototype.first=function(){var a=this.Na.Ma;return null!==a?a.key:null};Ya.prototype.any=function(a){for(var b=this.Na.Ma;null!==b;){if(a(b.key))return!0;b=b.gb}return!1};Ya.prototype.all=function(a){for(var b=this.Na.Ma;null!==b;){if(!a(b.key))return!1;b=b.gb}return!0};Ya.prototype.each=function(a){for(var b=this.Na.Ma;null!==b;)a(b.key),b=b.gb;return this};Ya.prototype.map=function(a){for(var b=new L,c=this.Na.Ma;null!==c;)b.add(a(c.key)),c=c.gb;return b}; Ya.prototype.filter=function(a){for(var b=new L(this.Na.ef),c=this.Na.Ma;null!==c;){var d=c.key;a(d)&&b.add(d);c=c.gb}return b};Ya.prototype.concat=function(a){return this.mH().Tc(a)};Ya.prototype.copy=function(){return new Ya(this.Na)};Ya.prototype.toSet=Ya.prototype.mH=function(){var a=new L(this.Na.ef),b=this.Na.Bd,c;for(c in b)a.add(b[c].key);return a};Ya.prototype.toArray=Ya.prototype.oc=function(){var a=this.Na.Bd,b=Array(this.Na.Ad),c=0,d;for(d in a)b[c]=a[d].key,c++;return b}; Ya.prototype.toList=function(){var a=new K(this.Na.ef),b=this.Na.Bd,c;for(c in b)a.add(b[c].key);return a};D.w(Ya,{count:"count"},function(){return this.Na.Ad});D.w(Ya,{size:"size"},function(){return this.Na.Ad});D.w(Ya,{j:"iterator"},function(){return 0>=this.Na.Ad?Ka:new Xa(this.Na)});function Za(a){this.Na=a;a.hj=null;this.Za=a.I;this.bb=null}D.ne(Za,{key:!0,value:!0});D.w(Za,{j:"iterator"},function(){return this}); Za.prototype.reset=Za.prototype.reset=function(){var a=this.Na;a.hj=null;this.Za=a.I;this.bb=null};Za.prototype.next=Za.prototype.next=function(){var a=this.Na;if(a.I!==this.Za){if(null===this.key)return!1;D.Va(a)}var b=this.bb,b=null===b?a.Ma:b.gb;if(null!==b)return this.bb=b,this.value=b.value,this.key=b.key,!0;this.Vf();return!1};Za.prototype.hasNext=function(){return this.next()}; Za.prototype.first=Za.prototype.first=function(){var a=this.Na;this.Za=a.I;a=a.Ma;if(null!==a){this.bb=a;var b=a.value;this.key=a.key;return this.value=b}return null};Za.prototype.any=function(a){var b=this.Na;b.hj=null;var c=b.I;this.bb=null;for(var d=b.Ma;null!==d;){if(a(d.value))return!0;b.I!==c&&D.Va(b);d=d.gb}return!1};Za.prototype.all=function(a){var b=this.Na;b.hj=null;var c=b.I;this.bb=null;for(var d=b.Ma;null!==d;){if(!a(d.value))return!1;b.I!==c&&D.Va(b);d=d.gb}return!0}; Za.prototype.each=function(a){var b=this.Na;b.hj=null;var c=b.I;this.bb=null;for(var d=b.Ma;null!==d;)a(d.value),b.I!==c&&D.Va(b),d=d.gb;return this};Za.prototype.map=function(a){var b=this.Na;b.hj=null;var c=b.I;this.bb=null;for(var d=new K,e=b.Ma;null!==e;)d.add(a(e.value)),b.I!==c&&D.Va(b),e=e.gb;return d.j};Za.prototype.filter=function(a){var b=this.Na;b.hj=null;var c=b.I;this.bb=null;for(var d=new K(b.ef),e=b.Ma;null!==e;){var g=e.value;a(g)&&d.add(g);b.I!==c&&D.Va(b);e=e.gb}return d.j}; Za.prototype.concat=function(a){this.Na.hj=null;return new Na(this,a.j)};D.w(Za,{count:"count"},function(){return this.Na.Ad});Za.prototype.Vf=function(){this.value=this.key=null;this.Za=-1;this.Na.hj=this};Za.prototype.toString=function(){return null!==this.bb?"MapValueSetIterator@"+this.bb.value:"MapValueSetIterator"};function Wa(a,b){this.key=a;this.value=b;this.Dp=this.gb=null}D.ne(Wa,{key:!0,value:!0});Wa.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"}; function $a(a){this.Na=a;a.Zb=null;this.Za=a.I;this.bb=null}D.ne($a,{key:!0,value:!0});D.w($a,{j:"iterator"},function(){return this});$a.prototype.reset=$a.prototype.reset=function(){var a=this.Na;a.Zb=null;this.Za=a.I;this.bb=null};$a.prototype.next=$a.prototype.next=function(){var a=this.Na;if(a.I!==this.Za){if(null===this.key)return!1;D.Va(a)}var b=this.bb,b=null===b?a.Ma:b.gb;if(null!==b)return this.bb=b,this.key=b.key,this.value=b.value,!0;this.Vf();return!1};$a.prototype.hasNext=function(){return this.next()}; $a.prototype.first=$a.prototype.first=function(){var a=this.Na;this.Za=a.I;a=a.Ma;return null!==a?(this.bb=a,this.key=a.key,this.value=a.value,a):null};$a.prototype.any=function(a){var b=this.Na;b.Zb=null;var c=b.I;this.bb=null;for(var d=b.Ma;null!==d;){if(a(d))return!0;b.I!==c&&D.Va(b);d=d.gb}return!1};$a.prototype.all=function(a){var b=this.Na;b.Zb=null;var c=b.I;this.bb=null;for(var d=b.Ma;null!==d;){if(!a(d))return!1;b.I!==c&&D.Va(b);d=d.gb}return!0}; $a.prototype.each=function(a){var b=this.Na;b.Zb=null;var c=b.I;this.bb=null;for(var d=b.Ma;null!==d;)a(d),b.I!==c&&D.Va(b),d=d.gb;return this};$a.prototype.map=function(a){var b=this.Na;b.Zb=null;var c=b.I;this.bb=null;for(var d=new K,e=b.Ma;null!==e;)d.add(a(e)),b.I!==c&&D.Va(b),e=e.gb;return d.j};$a.prototype.filter=function(a){var b=this.Na;b.Zb=null;var c=b.I;this.bb=null;for(var d=new K,e=b.Ma;null!==e;)a(e)&&d.add(e),b.I!==c&&D.Va(b),e=e.gb;return d.j}; $a.prototype.concat=function(a){this.Na.Zb=null;return new Na(this,a.j)};D.w($a,{count:"count"},function(){return this.Na.Ad});$a.prototype.Vf=function(){this.value=this.key=null;this.Za=-1;this.Na.Zb=this};$a.prototype.toString=function(){return null!==this.bb?"MapIterator@"+this.bb:"MapIterator"}; function oa(a,b){D.vc(this);this.J=!1;void 0===a||null===a?this.ef=null:"string"===typeof a?"object"===a||"string"===a||"number"===a?this.ef=a:D.ua(a,"the string 'object', 'number' or 'string'","Map constructor: keytype"):"function"===typeof a?this.ef=a===Object?"object":a===String?"string":a===Number?"number":a:D.ua(a,"null, a primitive type name, or a class type","Map constructor: keytype");void 0===b||null===b?this.Di=null:"string"===typeof b?"object"===b||"string"===b||"boolean"===b||"number"=== b||"function"===b?this.Di=b:D.ua(b,"the string 'object', 'number', 'string', 'boolean', or 'function'","Map constructor: valtype"):"function"===typeof b?this.Di=b===Object?"object":b===String?"string":b===Number?"number":b===Boolean?"boolean":b===Function?"function":b:D.ua(b,"null, a primitive type name, or a class type","Map constructor: valtype");this.Bd={};this.Ad=0;this.hj=this.Zb=null;this.I=0;this.ki=this.Ma=null}D.ka("Map",oa); function bb(a,b){null!==a.ef&&("string"===typeof a.ef?typeof b===a.ef&&null!==b||D.jc(b,a.ef):b instanceof a.ef||D.jc(b,a.ef))}oa.prototype.Sc=function(){var a=this.I;a++;999999999=this.count)return Ka;var a=this.Zb;return null!==a?(a.reset(),a):new $a(this)});D.w(oa,{mG:"iteratorKeys"},function(){return 0>=this.count?Ka:new Xa(this)});D.w(oa,{nG:"iteratorValues"},function(){if(0>=this.count)return Ka;var a=this.hj;return null!==a?(a.reset(),a):new Za(this)});function N(a,b){void 0===a?this.M=this.L=0:"number"===typeof a&&"number"===typeof b?(this.L=a,this.M=b):D.k("Invalid arguments to Point constructor: "+a+", "+b);this.J=!1} D.ka("Point",N);D.Fi(N);D.ne(N,{x:!0,y:!0});N.prototype.assign=function(a){this.L=a.L;this.M=a.M};N.prototype.setTo=N.prototype.n=function(a,b){v&&(D.h(a,"number",N,"setTo:x"),D.h(b,"number",N,"setTo:y"));this.L=a;this.M=b;return this};N.prototype.set=N.prototype.set=function(a){v&&D.l(a,N,N,"set:p");this.Sa();this.L=a.L;this.M=a.M;return this};N.prototype.copy=function(){var a=new N;a.L=this.L;a.M=this.M;return a};f=N.prototype;f.Oa=function(){this.J=!0;Object.freeze(this);return this}; f.V=function(){return Object.isFrozen(this)?this:this.copy().freeze()};f.freeze=function(){this.J=!0;return this};f.Xa=function(){Object.isFrozen(this)&&D.k("cannot thaw constant: "+this);this.J=!1;return this};f.Sa=function(a){if(this.J){var b="The Point is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);D.k(b)}}; N.parse=function(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));return new N(c,e)}return new N};N.stringify=function(a){v&&D.l(a,N);return a.x.toString()+" "+a.y.toString()};N.prototype.toString=function(){return"Point("+this.x+","+this.y+")"};N.prototype.equals=N.prototype.O=function(a){return a instanceof N?this.L===a.x&&this.M===a.y:!1}; N.prototype.equalTo=N.prototype.Ox=function(a,b){return this.L===a&&this.M===b};N.prototype.equalsApprox=N.prototype.Uc=function(a){return Q(this.L,a.x)&&Q(this.M,a.y)};N.prototype.add=N.prototype.add=function(a){v&&D.l(a,N,N,"add:p");this.Sa();this.L+=a.x;this.M+=a.y;return this};N.prototype.subtract=N.prototype.Zj=function(a){v&&D.l(a,N,N,"subtract:p");this.Sa();this.L-=a.x;this.M-=a.y;return this}; N.prototype.offset=N.prototype.offset=function(a,b){v&&(D.p(a,N,"offset:dx"),D.p(b,N,"offset:dy"));this.Sa();this.L+=a;this.M+=b;return this};N.prototype.rotate=N.prototype.rotate=function(a){v&&D.p(a,N,"rotate:angle");this.Sa();if(0===a)return this;var b=this.L,c=this.M;if(0===b&&0===c)return this;var d=0,e=0;360<=a?a-=360:0>a&&(a+=360);90===a?(d=0,e=1):180===a?(d=-1,e=0):270===a?(d=0,e=-1):(a=a*Math.PI/180,d=Math.cos(a),e=Math.sin(a));this.L=d*b-e*c;this.M=e*b+d*c;return this}; N.prototype.scale=N.prototype.scale=function(a,b){v&&(D.p(a,N,"scale:sx"),D.p(b,N,"scale:sy"));this.L*=a;this.M*=b;return this};N.prototype.distanceSquaredPoint=N.prototype.Jf=function(a){v&&D.l(a,N,N,"distanceSquaredPoint:p");var b=a.x-this.L;a=a.y-this.M;return b*b+a*a};N.prototype.distanceSquared=N.prototype.kq=function(a,b){v&&(D.p(a,N,"distanceSquared:px"),D.p(b,N,"distanceSquared:py"));var c=a-this.L,d=b-this.M;return c*c+d*d}; N.prototype.normalize=N.prototype.normalize=function(){this.Sa();var a=this.L,b=this.M,c=Math.sqrt(a*a+b*b);0b?270:0;if(0===b)return 0a?c=0>b?c+180:180-c:0>b&&(c=360-c);return c}N.prototype.projectOntoLineSegment=function(a,b,c,d){v&&(D.p(a,N,"projectOntoLineSegment:px"),D.p(b,N,"projectOntoLineSegment:py"),D.p(c,N,"projectOntoLineSegment:qx"),D.p(d,N,"projectOntoLineSegment:qy"));fb(a,b,c,d,this.L,this.M,this);return this}; N.prototype.projectOntoLineSegmentPoint=function(a,b){v&&(D.l(a,N,N,"projectOntoLineSegmentPoint:p"),D.l(b,N,N,"projectOntoLineSegmentPoint:q"));fb(a.x,a.y,b.x,b.y,this.L,this.M,this);return this};N.prototype.snapToGrid=function(a,b,c,d){v&&(D.p(a,N,"snapToGrid:originx"),D.p(b,N,"snapToGrid:originy"),D.p(c,N,"snapToGrid:cellwidth"),D.p(d,N,"snapToGrid:cellheight"));jb(this.L,this.M,a,b,c,d,this);return this}; N.prototype.snapToGridPoint=function(a,b){v&&(D.l(a,N,N,"snapToGridPoint:p"),D.l(b,Ca,N,"snapToGridPoint:q"));jb(this.L,this.M,a.x,a.y,b.width,b.height,this);return this};N.prototype.setRectSpot=N.prototype.to=function(a,b){v&&(D.l(a,C,N,"setRectSpot:r"),D.l(b,S,N,"setRectSpot:spot"));this.Sa();this.L=a.x+b.x*a.width+b.offsetX;this.M=a.y+b.y*a.height+b.offsetY;return this}; N.prototype.setSpot=N.prototype.kv=function(a,b,c,d,e){v&&(D.p(a,N,"setSpot:x"),D.p(b,N,"setSpot:y"),D.p(c,N,"setSpot:w"),D.p(d,N,"setSpot:h"),(0>c||0>d)&&D.k("Point.setSpot:Width and height cannot be negative"),D.l(e,S,N,"setSpot:spot"));this.Sa();this.L=a+e.x*c+e.offsetX;this.M=b+e.y*d+e.offsetY;return this};N.prototype.transform=function(a){v&&D.l(a,Ea,N,"transform:t");a.xb(this);return this};function kb(a,b){v&&D.l(b,Ea,N,"transformInverted:t");b.Hi(a);return a}var lb; N.distanceLineSegmentSquared=lb=function(a,b,c,d,e,g){v&&(D.p(a,N,"distanceLineSegmentSquared:px"),D.p(b,N,"distanceLineSegmentSquared:py"),D.p(c,N,"distanceLineSegmentSquared:ax"),D.p(d,N,"distanceLineSegmentSquared:ay"),D.p(e,N,"distanceLineSegmentSquared:bx"),D.p(g,N,"distanceLineSegmentSquared:by"));var h=e-c,k=g-d,l=h*h+k*k;c-=a;d-=b;var m=-c*h-d*k;if(0>=m||m>=l)return h=e-a,k=g-b,Math.min(c*c+d*d,h*h+k*k);a=h*d-k*c;return a*a/l};var ob; N.distanceSquared=ob=function(a,b,c,d){v&&(D.p(a,N,"distanceSquared:px"),D.p(b,N,"distanceSquared:py"),D.p(c,N,"distanceSquared:qx"),D.p(d,N,"distanceSquared:qy"));a=c-a;b=d-b;return a*a+b*b};var Bb; N.direction=Bb=function(a,b,c,d){v&&(D.p(a,N,"direction:px"),D.p(b,N,"direction:py"),D.p(c,N,"direction:qx"),D.p(d,N,"direction:qy"));a=c-a;b=d-b;if(0===a)return 0b?270:0;if(0===b)return 0a?d=0>b?d+180:180-d:0>b&&(d=360-d);return d};D.defineProperty(N,{x:"x"},function(){return this.L},function(a){this.Sa(a);v&&D.h(a,"number",N,"x");this.L=a}); D.defineProperty(N,{y:"y"},function(){return this.M},function(a){this.Sa(a);v&&D.h(a,"number",N,"y");this.M=a});N.prototype.isReal=N.prototype.F=function(){return isFinite(this.x)&&isFinite(this.y)};function Ca(a,b){void 0===a?this.Ha=this.Ia=0:"number"===typeof a&&(0<=a||isNaN(a))&&"number"===typeof b&&(0<=b||isNaN(b))?(this.Ia=a,this.Ha=b):D.k("Invalid arguments to Size constructor: "+a+", "+b);this.J=!1}D.ka("Size",Ca);D.Fi(Ca);D.ne(Ca,{width:!0,height:!0}); Ca.prototype.assign=function(a){this.Ia=a.Ia;this.Ha=a.Ha};Ca.prototype.setTo=Ca.prototype.n=function(a,b){v&&(D.h(a,"number",Ca,"setTo:w"),D.h(b,"number",Ca,"setTo:h"),0>a&&D.ua(a,">= 0",Ca,"setTo:w"),0>b&&D.ua(b,">= 0",Ca,"setTo:h"));this.Ia=a;this.Ha=b;return this};Ca.prototype.set=Ca.prototype.set=function(a){v&&D.l(a,Ca,Ca,"set:s");this.Sa();this.Ia=a.Ia;this.Ha=a.Ha;return this};Ca.prototype.copy=function(){var a=new Ca;a.Ia=this.Ia;a.Ha=this.Ha;return a};f=Ca.prototype; f.Oa=function(){this.J=!0;Object.freeze(this);return this};f.V=function(){return Object.isFrozen(this)?this:this.copy().freeze()};f.freeze=function(){this.J=!0;return this};f.Xa=function(){Object.isFrozen(this)&&D.k("cannot thaw constant: "+this);this.J=!1;return this};f.Sa=function(a){if(this.J){var b="The Size is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);D.k(b)}}; Ca.parse=function(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));return new Ca(c,e)}return new Ca};Ca.stringify=function(a){v&&D.l(a,Ca);return a.width.toString()+" "+a.height.toString()};Ca.prototype.toString=function(){return"Size("+this.width+","+this.height+")"};Ca.prototype.equals=Ca.prototype.O=function(a){return a instanceof Ca?this.Ia===a.width&&this.Ha===a.height:!1}; Ca.prototype.equalTo=Ca.prototype.Ox=function(a,b){return this.Ia===a&&this.Ha===b};Ca.prototype.equalsApprox=Ca.prototype.Uc=function(a){return Q(this.Ia,a.width)&&Q(this.Ha,a.height)};D.defineProperty(Ca,{width:"width"},function(){return this.Ia},function(a){this.Sa(a);v&&D.h(a,"number",Ca,"width");0>a&&D.ua(a,">= 0",Ca,"width");this.Ia=a}); D.defineProperty(Ca,{height:"height"},function(){return this.Ha},function(a){this.Sa(a);v&&D.h(a,"number",Ca,"height");0>a&&D.ua(a,">= 0",Ca,"height");this.Ha=a});Ca.prototype.isReal=Ca.prototype.F=function(){return isFinite(this.width)&&isFinite(this.height)}; function C(a,b,c,d){void 0===a?this.Ha=this.Ia=this.M=this.L=0:a instanceof N?b instanceof N?(this.L=Math.min(a.L,b.L),this.M=Math.min(a.M,b.M),this.Ia=Math.abs(a.L-b.L),this.Ha=Math.abs(a.M-b.M)):b instanceof Ca?(this.L=a.L,this.M=a.M,this.Ia=b.Ia,this.Ha=b.Ha):D.k("Incorrect arguments supplied to Rect constructor"):"number"===typeof a&&"number"===typeof b&&"number"===typeof c&&(0<=c||isNaN(c))&&"number"===typeof d&&(0<=d||isNaN(d))?(this.L=a,this.M=b,this.Ia=c,this.Ha=d):D.k("Invalid arguments to Rect constructor: "+ a+", "+b+", "+c+", "+d);this.J=!1}D.ka("Rect",C);D.Fi(C);D.ne(C,{x:!0,y:!0,width:!0,height:!0});C.prototype.assign=function(a){this.L=a.L;this.M=a.M;this.Ia=a.Ia;this.Ha=a.Ha};function Cb(a,b,c){a.Ia=b;a.Ha=c}C.prototype.setTo=C.prototype.n=function(a,b,c,d){v&&(D.h(a,"number",C,"setTo:x"),D.h(b,"number",C,"setTo:y"),D.h(c,"number",C,"setTo:w"),D.h(d,"number",C,"setTo:h"),0>c&&D.ua(c,">= 0",C,"setTo:w"),0>d&&D.ua(d,">= 0",C,"setTo:h"));this.L=a;this.M=b;this.Ia=c;this.Ha=d;return this}; C.prototype.set=C.prototype.set=function(a){v&&D.l(a,C,C,"set:r");this.Sa();this.L=a.L;this.M=a.M;this.Ia=a.Ia;this.Ha=a.Ha;return this};C.prototype.setPoint=C.prototype.hh=function(a){v&&D.l(a,N,C,"setPoint:p");this.Sa();this.L=a.L;this.M=a.M;return this};C.prototype.setSize=function(a){v&&D.l(a,Ca,C,"setSize:s");this.Sa();this.Ia=a.Ia;this.Ha=a.Ha;return this};C.prototype.copy=function(){var a=new C;a.L=this.L;a.M=this.M;a.Ia=this.Ia;a.Ha=this.Ha;return a};f=C.prototype; f.Oa=function(){this.J=!0;Object.freeze(this);return this};f.V=function(){return Object.isFrozen(this)?this:this.copy().freeze()};f.freeze=function(){this.J=!0;return this};f.Xa=function(){Object.isFrozen(this)&&D.k("cannot thaw constant: "+this);this.J=!1;return this};f.Sa=function(a){if(this.J){var b="The Rect is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);D.k(b)}}; C.parse=function(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));for(var g=0;""===a[b];)b++;(d=a[b++])&&(g=parseFloat(d));for(var h=0;""===a[b];)b++;(d=a[b++])&&(h=parseFloat(d));return new C(c,e,g,h)}return new C};C.stringify=function(a){v&&D.l(a,C);return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}; C.prototype.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"};C.prototype.equals=C.prototype.O=function(a){return a instanceof C?this.L===a.x&&this.M===a.y&&this.Ia===a.width&&this.Ha===a.height:!1};C.prototype.equalTo=C.prototype.Ox=function(a,b,c,d){return this.L===a&&this.M===b&&this.Ia===c&&this.Ha===d};C.prototype.equalsApprox=C.prototype.Uc=function(a){return Q(this.L,a.x)&&Q(this.M,a.y)&&Q(this.Ia,a.width)&&Q(this.Ha,a.height)}; function Db(a,b){return Eb(a.L,b.x)&&Eb(a.M,b.y)&&Eb(a.Ia,b.width)&&Eb(a.Ha,b.height)}C.prototype.containsPoint=C.prototype.Pa=function(a){v&&D.l(a,N,C,"containsPoint:p");return this.L<=a.x&&this.L+this.Ia>=a.x&&this.M<=a.y&&this.M+this.Ha>=a.y};C.prototype.containsRect=C.prototype.Tk=function(a){v&&D.l(a,C,C,"containsRect:r");return this.L<=a.x&&a.x+a.width<=this.L+this.Ia&&this.M<=a.y&&a.y+a.height<=this.M+this.Ha}; C.prototype.contains=C.prototype.contains=function(a,b,c,d){v?(D.p(a,C,"contains:x"),D.p(b,C,"contains:y"),void 0===c?c=0:D.p(c,C,"contains:w"),void 0===d?d=0:D.p(d,C,"contains:h"),(0>c||0>d)&&D.k("Rect.contains:Width and height cannot be negative")):(void 0===c&&(c=0),void 0===d&&(d=0));return this.L<=a&&a+c<=this.L+this.Ia&&this.M<=b&&b+d<=this.M+this.Ha};C.prototype.reset=function(){this.Sa();this.Ha=this.Ia=this.M=this.L=0}; C.prototype.offset=C.prototype.offset=function(a,b){v&&(D.p(a,C,"offset:dx"),D.p(b,C,"offset:dy"));this.Sa();this.L+=a;this.M+=b;return this};C.prototype.inflate=C.prototype.ig=function(a,b){v&&(D.p(a,C,"inflate:w"),D.p(b,C,"inflate:h"));return Gb(this,b,a,b,a)};C.prototype.addMargin=C.prototype.tx=function(a){v&&D.l(a,Lb,C,"addMargin:m");return Gb(this,a.top,a.right,a.bottom,a.left)}; C.prototype.subtractMargin=C.prototype.xK=function(a){v&&D.l(a,Lb,C,"subtractMargin:m");return Gb(this,-a.top,-a.right,-a.bottom,-a.left)};C.prototype.grow=function(a,b,c,d){v&&(D.p(a,C,"grow:t"),D.p(b,C,"grow:r"),D.p(c,C,"grow:b"),D.p(d,C,"grow:l"));return Gb(this,a,b,c,d)};function Gb(a,b,c,d,e){a.Sa();var g=a.Ia;c+e<=-g?(a.L+=g/2,a.Ia=0):(a.L-=e,a.Ia+=c+e);c=a.Ha;b+d<=-c?(a.M+=c/2,a.Ha=0):(a.M-=b,a.Ha+=b+d);return a} C.prototype.intersectRect=function(a){v&&D.l(a,C,C,"intersectRect:r");return Nb(this,a.x,a.y,a.width,a.height)};C.prototype.intersect=C.prototype.ZF=function(a,b,c,d){v&&(D.p(a,C,"intersect:x"),D.p(b,C,"intersect:y"),D.p(c,C,"intersect:w"),D.p(d,C,"intersect:h"),(0>c||0>d)&&D.k("Rect.intersect:Width and height cannot be negative"));return Nb(this,a,b,c,d)}; function Nb(a,b,c,d,e){a.Sa();var g=Math.max(a.L,b),h=Math.max(a.M,c);b=Math.min(a.L+a.Ia,b+d);c=Math.min(a.M+a.Ha,c+e);a.L=g;a.M=h;a.Ia=Math.max(0,b-g);a.Ha=Math.max(0,c-h);return a}C.prototype.intersectsRect=C.prototype.jg=function(a){v&&D.l(a,C,C,"intersectsRect:r");return this.$F(a.x,a.y,a.width,a.height)}; C.prototype.intersects=C.prototype.$F=function(a,b,c,d){v&&(D.p(a,C,"intersects:x"),D.p(b,C,"intersects:y"),D.p(a,C,"intersects:w"),D.p(b,C,"intersects:h"),(0>c||0>d)&&D.k("Rect.intersects:Width and height cannot be negative"));var e=this.Ia,g=this.L;if(Infinity!==e&&Infinity!==c&&(e+=g,c+=a,isNaN(c)||isNaN(e)||g>c||a>e))return!1;a=this.Ha;c=this.M;return Infinity!==a&&Infinity!==d&&(a+=c,d+=b,isNaN(d)||isNaN(a)||c>d||b>a)?!1:!0}; function Ob(a,b){var c=a.Ia,d=b.width+10+10,e=a.L,g=b.x-10;if(e>d+g||g>c+e)return!1;c=a.Ha;d=b.height+10+10;e=a.M;g=b.y-10;return e>d+g||g>c+e?!1:!0}C.prototype.unionPoint=C.prototype.Pi=function(a){v&&D.l(a,N,C,"unionPoint:p");return Ub(this,a.x,a.y,0,0)};C.prototype.unionRect=C.prototype.$h=function(a){v&&D.l(a,C,C,"unionRect:r");return Ub(this,a.L,a.M,a.Ia,a.Ha)}; C.prototype.union=C.prototype.rH=function(a,b,c,d){this.Sa();v?(D.p(a,C,"union:x"),D.p(b,C,"union:y"),void 0===c?c=0:D.p(c,C,"union:w"),void 0===d?d=0:D.p(d,C,"union:h"),(0>c||0>d)&&D.k("Rect.union:Width and height cannot be negative")):(void 0===c&&(c=0),void 0===d&&(d=0));return Ub(this,a,b,c,d)};function Ub(a,b,c,d,e){var g=Math.min(a.L,b),h=Math.min(a.M,c);b=Math.max(a.L+a.Ia,b+d);c=Math.max(a.M+a.Ha,c+e);a.L=g;a.M=h;a.Ia=b-g;a.Ha=c-h;return a} C.prototype.setSpot=C.prototype.kv=function(a,b,c){v&&(D.p(a,C,"setSpot:x"),D.p(b,C,"setSpot:y"),D.l(c,S,C,"setSpot:spot"));this.Sa();this.L=a-c.offsetX-c.x*this.Ia;this.M=b-c.offsetY-c.y*this.Ha;return this};var Vb; C.contains=Vb=function(a,b,c,d,e,g,h,k){v?(D.p(a,C,"contains:rx"),D.p(b,C,"contains:ry"),D.p(c,C,"contains:rw"),D.p(d,C,"contains:rh"),D.p(e,C,"contains:x"),D.p(g,C,"contains:y"),void 0===h?h=0:D.p(h,C,"contains:w"),void 0===k?k=0:D.p(k,C,"contains:h"),(0>c||0>d||0>h||0>k)&&D.k("Rect.contains:Width and height cannot be negative")):(void 0===h&&(h=0),void 0===k&&(k=0));return a<=e&&e+h<=a+c&&b<=g&&g+k<=b+d}; C.intersects=function(a,b,c,d,e,g,h,k){v&&(D.p(a,C,"intersects:rx"),D.p(b,C,"intersects:ry"),D.p(c,C,"intersects:rw"),D.p(d,C,"intersects:rh"),D.p(e,C,"intersects:x"),D.p(g,C,"intersects:y"),D.p(h,C,"intersects:w"),D.p(k,C,"intersects:h"),(0>c||0>d||0>h||0>k)&&D.k("Rect.intersects:Width and height cannot be negative"));c+=a;h+=e;if(a>h||e>c)return!1;a=d+b;k+=g;return b>k||g>a?!1:!0};D.defineProperty(C,{x:"x"},function(){return this.L},function(a){this.Sa(a);v&&D.h(a,"number",C,"x");this.L=a}); D.defineProperty(C,{y:"y"},function(){return this.M},function(a){this.Sa(a);v&&D.h(a,"number",C,"y");this.M=a});D.defineProperty(C,{width:"width"},function(){return this.Ia},function(a){this.Sa(a);v&&D.h(a,"number",C,"width");0>a&&D.ua(a,">= 0",C,"width");this.Ia=a});D.defineProperty(C,{height:"height"},function(){return this.Ha},function(a){this.Sa(a);v&&D.h(a,"number",C,"height");0>a&&D.ua(a,">= 0",C,"height");this.Ha=a}); D.defineProperty(C,{left:"left"},function(){return this.L},function(a){this.Sa(a);v&&D.h(a,"number",C,"left");this.L=a});D.defineProperty(C,{top:"top"},function(){return this.M},function(a){this.Sa(a);v&&D.h(a,"number",C,"top");this.M=a});D.defineProperty(C,{right:"right"},function(){return this.L+this.Ia},function(a){this.Sa(a);v&&D.p(a,C,"right");this.L+=a-(this.L+this.Ia)}); D.defineProperty(C,{bottom:"bottom"},function(){return this.M+this.Ha},function(a){this.Sa(a);v&&D.p(a,C,"top");this.M+=a-(this.M+this.Ha)});D.defineProperty(C,{position:"position"},function(){return new N(this.L,this.M)},function(a){this.Sa(a);v&&D.l(a,N,C,"position");this.L=a.x;this.M=a.y});D.defineProperty(C,{size:"size"},function(){return new Ca(this.Ia,this.Ha)},function(a){this.Sa(a);v&&D.l(a,Ca,C,"size");this.Ia=a.width;this.Ha=a.height}); D.defineProperty(C,{km:"center"},function(){return new N(this.L+this.Ia/2,this.M+this.Ha/2)},function(a){this.Sa(a);v&&D.l(a,N,C,"center");this.L=a.x-this.Ia/2;this.M=a.y-this.Ha/2});D.defineProperty(C,{pa:"centerX"},function(){return this.L+this.Ia/2},function(a){this.Sa(a);v&&D.p(a,C,"centerX");this.L=a-this.Ia/2});D.defineProperty(C,{va:"centerY"},function(){return this.M+this.Ha/2},function(a){this.Sa(a);v&&D.p(a,C,"centerY");this.M=a-this.Ha/2}); C.prototype.isReal=C.prototype.F=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)};C.prototype.isEmpty=function(){return 0===this.width&&0===this.height}; function Lb(a,b,c,d){void 0===a?this.wh=this.nh=this.Fh=this.Gh=0:void 0===b?this.left=this.bottom=this.right=this.top=a:void 0===c?(d=b,this.top=a,this.right=b,this.bottom=a,this.left=d):void 0!==d?(this.top=a,this.right=b,this.bottom=c,this.left=d):D.k("Invalid arguments to Margin constructor: "+a+", "+b+", "+c+", "+d);this.J=!1}D.ka("Margin",Lb);D.Fi(Lb);D.ne(Lb,{top:!0,right:!0,bottom:!0,left:!0});Lb.prototype.assign=function(a){this.Gh=a.Gh;this.Fh=a.Fh;this.nh=a.nh;this.wh=a.wh}; Lb.prototype.setTo=Lb.prototype.n=function(a,b,c,d){v&&(D.h(a,"number",Lb,"setTo:t"),D.h(b,"number",Lb,"setTo:r"),D.h(c,"number",Lb,"setTo:b"),D.h(d,"number",Lb,"setTo:l"));this.Sa();this.Gh=a;this.Fh=b;this.nh=c;this.wh=d;return this};Lb.prototype.set=Lb.prototype.set=function(a){v&&D.l(a,Lb,Lb,"assign:m");this.Sa();this.Gh=a.Gh;this.Fh=a.Fh;this.nh=a.nh;this.wh=a.wh;return this};Lb.prototype.copy=function(){var a=new Lb;a.Gh=this.Gh;a.Fh=this.Fh;a.nh=this.nh;a.wh=this.wh;return a};f=Lb.prototype; f.Oa=function(){this.J=!0;Object.freeze(this);return this};f.V=function(){return Object.isFrozen(this)?this:this.copy().freeze()};f.freeze=function(){this.J=!0;return this};f.Xa=function(){Object.isFrozen(this)&&D.k("cannot thaw constant: "+this);this.J=!1;return this};f.Sa=function(a){if(this.J){var b="The Margin is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);D.k(b)}}; Lb.parse=function(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=NaN;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));if(isNaN(c))return new Lb;for(var e=NaN;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));if(isNaN(e))return new Lb(c);for(var g=NaN;""===a[b];)b++;(d=a[b++])&&(g=parseFloat(d));if(isNaN(g))return new Lb(c,e);for(var h=NaN;""===a[b];)b++;(d=a[b++])&&(h=parseFloat(d));return isNaN(h)?new Lb(c,e):new Lb(c,e,g,h)}return new Lb}; Lb.stringify=function(a){v&&D.l(a,Lb);return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()};Lb.prototype.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"};Lb.prototype.equals=Lb.prototype.O=function(a){return a instanceof Lb?this.Gh===a.top&&this.Fh===a.right&&this.nh===a.bottom&&this.wh===a.left:!1};Lb.prototype.equalTo=Lb.prototype.Ox=function(a,b,c,d){return this.Gh===a&&this.Fh===b&&this.nh===c&&this.wh===d}; Lb.prototype.equalsApprox=Lb.prototype.Uc=function(a){return Q(this.Gh,a.top)&&Q(this.Fh,a.right)&&Q(this.nh,a.bottom)&&Q(this.wh,a.left)};D.defineProperty(Lb,{top:"top"},function(){return this.Gh},function(a){this.Sa(a);v&&D.p(a,Lb,"top");this.Gh=a});D.defineProperty(Lb,{right:"right"},function(){return this.Fh},function(a){this.Sa(a);v&&D.p(a,Lb,"right");this.Fh=a});D.defineProperty(Lb,{bottom:"bottom"},function(){return this.nh},function(a){this.Sa(a);v&&D.p(a,Lb,"bottom");this.nh=a}); D.defineProperty(Lb,{left:"left"},function(){return this.wh},function(a){this.Sa(a);v&&D.p(a,Lb,"left");this.wh=a});Lb.prototype.isReal=Lb.prototype.F=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)};function Ea(){this.m11=1;this.m21=this.m12=0;this.m22=1;this.dy=this.dx=0}D.Fi(Ea);D.ne(Ea,{m11:!0,m12:!0,m21:!0,m22:!0,dx:!0,dy:!0}); Ea.prototype.set=Ea.prototype.set=function(a){v&&D.l(a,Ea,Ea,"set:t");this.m11=a.m11;this.m12=a.m12;this.m21=a.m21;this.m22=a.m22;this.dx=a.dx;this.dy=a.dy;return this};Ea.prototype.copy=function(){var a=new Ea;a.m11=this.m11;a.m12=this.m12;a.m21=this.m21;a.m22=this.m22;a.dx=this.dx;a.dy=this.dy;return a};Ea.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"}; Ea.prototype.equals=Ea.prototype.O=function(a){return a instanceof Ea?this.m11===a.m11&&this.m12===a.m12&&this.m21===a.m21&&this.m22===a.m22&&this.dx===a.dx&&this.dy===a.dy:!1};Ea.prototype.isIdentity=Ea.prototype.Iu=function(){return 1===this.m11&&0===this.m12&&0===this.m21&&1===this.m22&&0===this.dx&&0===this.dy};Ea.prototype.reset=Ea.prototype.reset=function(){this.m11=1;this.m21=this.m12=0;this.m22=1;this.dy=this.dx=0;return this}; Ea.prototype.multiply=Ea.prototype.multiply=function(a){v&&D.l(a,Ea,Ea,"multiply:matrix");var b=this.m12*a.m11+this.m22*a.m12,c=this.m11*a.m21+this.m21*a.m22,d=this.m12*a.m21+this.m22*a.m22,e=this.m11*a.dx+this.m21*a.dy+this.dx,g=this.m12*a.dx+this.m22*a.dy+this.dy;this.m11=this.m11*a.m11+this.m21*a.m12;this.m12=b;this.m21=c;this.m22=d;this.dx=e;this.dy=g;return this}; Ea.prototype.multiplyInverted=Ea.prototype.EB=function(a){v&&D.l(a,Ea,Ea,"multiplyInverted:matrix");var b=1/(a.m11*a.m22-a.m12*a.m21),c=a.m22*b,d=-a.m12*b,e=-a.m21*b,g=a.m11*b,h=b*(a.m21*a.dy-a.m22*a.dx),k=b*(a.m12*a.dx-a.m11*a.dy);a=this.m12*c+this.m22*d;b=this.m11*e+this.m21*g;e=this.m12*e+this.m22*g;g=this.m11*h+this.m21*k+this.dx;h=this.m12*h+this.m22*k+this.dy;this.m11=this.m11*c+this.m21*d;this.m12=a;this.m21=b;this.m22=e;this.dx=g;this.dy=h;return this}; Ea.prototype.invert=Ea.prototype.Zx=function(){var a=1/(this.m11*this.m22-this.m12*this.m21),b=-this.m12*a,c=-this.m21*a,d=this.m11*a,e=a*(this.m21*this.dy-this.m22*this.dx),g=a*(this.m12*this.dx-this.m11*this.dy);this.m11=this.m22*a;this.m12=b;this.m21=c;this.m22=d;this.dx=e;this.dy=g;return this}; Ea.prototype.rotate=Ea.prototype.rotate=function(a,b,c){v&&(D.p(a,Ea,"rotate:angle"),D.p(b,Ea,"rotate:rx"),D.p(c,Ea,"rotate:ry"));360<=a?a-=360:0>a&&(a+=360);if(0===a)return this;this.translate(b,c);var d=0,e=0;90===a?(d=0,e=1):180===a?(d=-1,e=0):270===a?(d=0,e=-1):(e=a*Math.PI/180,d=Math.cos(e),e=Math.sin(e));a=this.m12*d+this.m22*e;var g=this.m11*-e+this.m21*d,h=this.m12*-e+this.m22*d;this.m11=this.m11*d+this.m21*e;this.m12=a;this.m21=g;this.m22=h;this.translate(-b,-c);return this}; Ea.prototype.translate=Ea.prototype.translate=function(a,b){v&&(D.p(a,Ea,"translate:x"),D.p(b,Ea,"translate:y"));this.dx+=this.m11*a+this.m21*b;this.dy+=this.m12*a+this.m22*b;return this};Ea.prototype.scale=Ea.prototype.scale=function(a,b){void 0===b&&(b=a);v&&(D.p(a,Ea,"translate:sx"),D.p(b,Ea,"translate:sy"));this.m11*=a;this.m12*=a;this.m21*=b;this.m22*=b;return this}; Ea.prototype.transformPoint=Ea.prototype.xb=function(a){v&&D.l(a,N,Ea,"transformPoint:p");var b=a.L,c=a.M;a.L=b*this.m11+c*this.m21+this.dx;a.M=b*this.m12+c*this.m22+this.dy;return a};Ea.prototype.invertedTransformPoint=Ea.prototype.Hi=function(a){v&&D.l(a,N,Ea,"invertedTransformPoint:p");var b=1/(this.m11*this.m22-this.m12*this.m21),c=-this.m12*b,d=this.m11*b,e=b*(this.m12*this.dx-this.m11*this.dy),g=a.L,h=a.M;a.L=g*this.m22*b+h*-this.m21*b+b*(this.m21*this.dy-this.m22*this.dx);a.M=g*c+h*d+e;return a}; Ea.prototype.transformRect=Ea.prototype.qH=function(a){v&&D.l(a,C,Ea,"transformRect:rect");var b=a.L,c=a.M,d=b+a.Ia,e=c+a.Ha,g=this.m11,h=this.m12,k=this.m21,l=this.m22,m=this.dx,n=this.dy,p=b*g+c*k+m,q=b*h+c*l+n,r=d*g+c*k+m,c=d*h+c*l+n,s=b*g+e*k+m,b=b*h+e*l+n,g=d*g+e*k+m,d=d*h+e*l+n,e=p,h=q,p=Math.min(p,r),e=Math.max(e,r),h=Math.min(h,c),q=Math.max(q,c),p=Math.min(p,s),e=Math.max(e,s),h=Math.min(h,b),q=Math.max(q,b),p=Math.min(p,g),e=Math.max(e,g),h=Math.min(h,d),q=Math.max(q,d);a.L=p;a.M=h;a.Ia= e-p;a.Ha=q-h;return a};function S(a,b,c,d){void 0===a?this.Ng=this.Mg=this.M=this.L=0:(void 0===b&&(b=0),void 0===c&&(c=0),void 0===d&&(d=0),this.x=a,this.y=b,this.offsetX=c,this.offsetY=d);this.J=!1}D.ka("Spot",S);D.Fi(S);D.ne(S,{x:!0,y:!0,offsetX:!0,offsetY:!0});S.prototype.assign=function(a){this.L=a.L;this.M=a.M;this.Mg=a.Mg;this.Ng=a.Ng}; S.prototype.setTo=S.prototype.n=function(a,b,c,d){v&&(Wb(a,"setTo:x"),Wb(b,"setTo:y"),Zb(c,"setTo:offx"),Zb(d,"setTo:offy"));this.Sa();this.L=a;this.M=b;this.Mg=c;this.Ng=d;return this};S.prototype.set=S.prototype.set=function(a){v&&D.l(a,S,S,"set:s");this.Sa();this.L=a.L;this.M=a.M;this.Mg=a.Mg;this.Ng=a.Ng;return this};S.prototype.copy=function(){var a=new S;a.L=this.L;a.M=this.M;a.Mg=this.Mg;a.Ng=this.Ng;return a};f=S.prototype;f.Oa=function(){this.J=!0;Object.freeze(this);return this}; f.V=function(){return Object.isFrozen(this)?this:this.copy().freeze()};f.freeze=function(){this.J=!0;return this};f.Xa=function(){Object.isFrozen(this)&&D.k("cannot thaw constant: "+this);this.J=!1;return this};f.Sa=function(a){if(this.J){var b="The Spot is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);D.k(b)}};function bc(a,b){a.L=NaN;a.M=NaN;a.Mg=b;return a}function Wb(a,b){(isNaN(a)||1a)&&D.ua(a,"0 <= "+b+" <= 1",S,b)} function Zb(a,b){(isNaN(a)||Infinity===a||-Infinity===a)&&D.ua(a,"real number, not NaN or Infinity",S,b)}var cc; S.parse=cc=function(a){if("string"===typeof a){a=a.trim();if("None"===a)return dc;if("TopLeft"===a)return ec;if("Top"===a||"TopCenter"===a||"MiddleTop"===a)return jc;if("TopRight"===a)return kc;if("Left"===a||"LeftCenter"===a||"MiddleLeft"===a)return lc;if("Center"===a)return mc;if("Right"===a||"RightCenter"===a||"MiddleRight"===a)return nc;if("BottomLeft"===a)return tc;if("Bottom"===a||"BottomCenter"===a||"MiddleBottom"===a)return uc;if("BottomRight"===a)return vc;if("TopSide"===a)return wc;if("LeftSide"=== a)return xc;if("RightSide"===a)return yc;if("BottomSide"===a)return Dc;if("TopBottomSides"===a)return Ec;if("LeftRightSides"===a)return Jc;if("TopLeftSides"===a)return Kc;if("TopRightSides"===a)return Lc;if("BottomLeftSides"===a)return Mc;if("BottomRightSides"===a)return Nc;if("NotTopSide"===a)return Oc;if("NotLeftSide"===a)return Pc;if("NotRightSide"===a)return Sc;if("NotBottomSide"===a)return Tc;if("AllSides"===a)return Uc;if("Default"===a)return Vc;a=a.split(" ");for(var b=0,c=0;""===a[b];)b++; var d=a[b++];void 0!==d&&0b.offset?1:-1});for(k=0;k=2*Math.PI?(td(a,b,c,d,e,e+Math.PI,h),td(a,b,c,d,e+Math.PI,e+2*Math.PI,h),a.path.push(["M",l,g])):(b+=d*Math.cos(e),c+=d*Math.sin(e),k=180*k/Math.PI,e=h?0:1,h=180<=k===!!h?0:1,0!==a.path.length?a.path.push(["L",b,c]):a.path.push(["M",b,c]),a.path.push(["A",d,d,k,h,e,l,g]))}}function sd(a,b,c,d,e,g,h){var k=new hd;k.ac=[b,c,d,e,g,h];b={};Ed(a,"g",b,k);k=a.addElement("g",b);a.xf.push(k)} f.kb=function(){if(0!==this.shadowOffsetX||0!==this.shadowOffsetY||0!==this.shadowBlur){var a="SHADOW"+D.Km++,b=this.addElement("filter",{id:a,x:"-100%",y:"-100%",width:"300%",height:"300%"},null),c,d,e,g,h;c=rd(this,"feGaussianBlur",{"in":"SourceAlpha",result:"blur",GM:this.shadowBlur/2});d=rd(this,"feFlood",{"in":"blur",result:"flood","flood-color":this.shadowColor});e=rd(this,"feComposite",{"in":"flood",in2:"blur",operator:"in",result:"comp"});g=rd(this,"feOffset",{"in":"comp",result:"offsetBlur", dx:this.shadowOffsetX,dy:this.shadowOffsetY});h=rd(this,"feMerge",{});h.appendChild(rd(this,"feMergeNode",{"in":"offsetBlur"}));h.appendChild(rd(this,"feMergeNode",{"in":"SourceGraphic"}));b.appendChild(c);b.appendChild(d);b.appendChild(e);b.appendChild(g);b.appendChild(h);0b?(this.scale(b/a,1),this.translate((a-b)/2,0)):b>a&&(this.scale(1,a/b),this.translate(0,(b-a)/2));this.sr?this.clip():this.fill();a>b?(this.translate(-(a-b)/2,0),this.scale(1/(b/a),1)):b>a&&(this.translate(0,-(b-a)/2),this.scale(1,1/(a/b)))}else this.sr?this.clip():this.fill()}; f.Yj=function(){this.sr||this.stroke()};D.defineProperty(Hd,{cq:"clipInsteadOfFill"},function(){return this.sr},function(a){this.sr=a});f=Hd.prototype;f.dC=function(a,b,c){this.Bt=a;this.Ct=b;this.Pg=c};f.uo=function(){this.shadowBlur=this.shadowOffsetY=this.shadowOffsetX=0};f.vo=function(){this.shadowOffsetX=this.Bt;this.shadowOffsetY=this.Ct;this.shadowBlur=this.Pg}; f.YA=function(a,b){var c=this.za;if(void 0!==c.setLineDash)c.setLineDash(a),c.lineDashOffset=b;else if(void 0!==c.webkitLineDash)c.webkitLineDash=a,c.webkitLineDashOffset=b;else return!1;return!0};f.TA=function(){var a=this.za;void 0!==a.setLineDash?(a.setLineDash(D.Co),a.lineDashOffset=0):void 0!==a.webkitLineDash&&(a.webkitLineDash=D.Co,a.webkitLineDashOffset=0)};f.De=function(a){a&&(this.rz="");this.qz=this.sz=""}; var Jd=(Math.sqrt(2)-1)/3*4,Kd=(new N(0,0)).Oa(),Ld=(new C(0,0,0,0)).Oa(),Sd=(new Lb(0,0,0,0)).Oa(),Td=(new Lb(2,2,2,2)).Oa(),Ud=(new N(6,6)).Oa(),Vd=(new N(-Infinity,-Infinity)).Oa(),Wd=(new N(Infinity,Infinity)).Oa(),Xd=(new Ca(0,0)).Oa(),Yd=(new Ca(1,1)).Oa(),Zd=(new Ca(6,6)).Oa(),$d=(new Ca(8,8)).Oa(),ae=(new Ca(10,10)).Oa(),ge=(new Ca(Infinity,Infinity)).Oa(),he=(new N(NaN,NaN)).Oa(),ie=(new Ca(NaN,NaN)).Oa(),je=(new C(NaN,NaN,NaN,NaN)).Oa(),ke=(new S(.156,.156)).Oa(),le=(new S(.844,.844)).Oa(), me=new ma,ne=new ma,oe=null;function pe(a){if(0>=a)return 0;var b=oe;if(null===b){for(var b=[],c=0;2E3>=c;c++)b[c]=Math.sqrt(c);oe=b}return 1>a?(c=1/a,2E3>=c?1/b[c|0]:Math.sqrt(a)):2E3>=a?b[a|0]:Math.sqrt(a)}function Q(a,b){var c=a-b;return.5>c&&-.5c&&-5E-8=e&&(e=1E-6);var k=0,l=0,m=0,n=0;am-n)if(a-c>e||c-a>e){if(g=(d-b)/(c-a)*(g-a)+b,g-e<=h&&h<=g+e)return!0}else return!0;else if(b-d>e||d-b>e){if(h=(c-a)/(d-b)*(h-b)+a,h-e<=g&&g<=h+e)return!0}else return!0;return!1} function ze(a,b,c,d,e,g,h,k,l,m,n,p){if(qe(a,b,h,k,p,c,d)&&qe(a,b,h,k,p,e,g))return qe(a,b,h,k,p,m,n);var q=(a+c)/2,r=(b+d)/2,s=(c+e)/2,u=(d+g)/2;e=(e+h)/2;g=(g+k)/2;d=(q+s)/2;c=(r+u)/2;var s=(s+e)/2,u=(u+g)/2,t=(d+s)/2,y=(c+u)/2;return ze(a,b,q,r,d,c,t,y,l,m,n,p)||ze(t,y,s,u,e,g,h,k,l,m,n,p)} function Ae(a,b,c,d,e,g,h,k,l,m){if(qe(a,b,h,k,l,c,d)&&qe(a,b,h,k,l,e,g))Ub(m,a,b,0,0),Ub(m,h,k,0,0);else{var n=(a+c)/2,p=(b+d)/2,q=(c+e)/2,r=(d+g)/2;e=(e+h)/2;g=(g+k)/2;d=(n+q)/2;c=(p+r)/2;var q=(q+e)/2,r=(r+g)/2,s=(d+q)/2,u=(c+r)/2;Ae(a,b,n,p,d,c,s,u,l,m);Ae(s,u,q,r,e,g,h,k,l,m)}} function Be(a,b,c,d,e,g,h,k,l,m){if(qe(a,b,h,k,l,c,d)&&qe(a,b,h,k,l,e,g))0===m.length&&(m.push(a),m.push(b)),m.push(h),m.push(k);else{var n=(a+c)/2,p=(b+d)/2,q=(c+e)/2,r=(d+g)/2;e=(e+h)/2;g=(g+k)/2;d=(n+q)/2;c=(p+r)/2;var q=(q+e)/2,r=(r+g)/2,s=(d+q)/2,u=(c+r)/2;Be(a,b,n,p,d,c,s,u,l,m);Be(s,u,q,r,e,g,h,k,l,m)}} function Ce(a,b,c,d,e,g,h,k,l,m,n,p,q,r){var s=1-l;a=a*s+c*l;b=b*s+d*l;c=c*s+e*l;d=d*s+g*l;e=e*s+h*l;g=g*s+k*l;k=a*s+c*l;h=b*s+d*l;c=c*s+e*l;d=d*s+g*l;m.x=a;m.y=b;n.x=k;n.y=h;p.x=k*s+c*l;p.y=h*s+d*l;q.x=c;q.y=d;r.x=e;r.y=g}function De(a,b,c,d,e,g,h,k,l,m){if(qe(a,b,e,g,m,c,d))return qe(a,b,e,g,m,k,l);var n=(a+c)/2,p=(b+d)/2;c=(c+e)/2;d=(d+g)/2;var q=(n+c)/2,r=(p+d)/2;return De(a,b,n,p,q,r,h,k,l,m)||De(q,r,c,d,e,g,h,k,l,m)} function Ee(a,b,c,d,e,g,h,k){if(qe(a,b,e,g,h,c,d))Ub(k,a,b,0,0),Ub(k,e,g,0,0);else{var l=(a+c)/2,m=(b+d)/2;c=(c+e)/2;d=(d+g)/2;var n=(l+c)/2,p=(m+d)/2;Ee(a,b,l,m,n,p,h,k);Ee(n,p,c,d,e,g,h,k)}}function Fe(a,b,c,d,e,g,h,k){if(qe(a,b,e,g,h,c,d))0===k.length&&(k.push(a),k.push(b)),k.push(e),k.push(g);else{var l=(a+c)/2,m=(b+d)/2;c=(c+e)/2;d=(d+g)/2;var n=(l+c)/2,p=(m+d)/2;Fe(a,b,l,m,n,p,h,k);Fe(n,p,c,d,e,g,h,k)}} function Ge(a,b,c,d,e,g,h,k,l,m,n,p,q,r){0>=q&&(q=1E-6);if(qe(a,b,h,k,q,c,d)&&qe(a,b,h,k,q,e,g)){var s=(a-h)*(m-p)-(b-k)*(l-n);if(0===s)return!1;q=((a*k-b*h)*(l-n)-(a-h)*(l*p-m*n))/s;s=((a*k-b*h)*(m-p)-(b-k)*(l*p-m*n))/s;if((l>n?l-n:n-l)<(m>p?m-p:p-m)){if(h=l=0,bh)return!1}else if(ah)return!1;r.x=q;r.y=s;return!0}var s=(a+c)/2,u=(b+d)/2;c=(c+e)/2;d=(d+g)/2;e=(e+h)/2;g=(g+k)/2;var t=(s+c)/2,y=(u+d)/2;c=(c+e)/2;d=(d+g)/2;var w=(t+c)/2,B=(y+d)/2, A=(n-l)*(n-l)+(p-m)*(p-m),O=!1;Ge(a,b,s,u,t,y,w,B,l,m,n,p,q,r)&&(b=(r.x-l)*(r.x-l)+(r.y-m)*(r.y-m),b=q&&(q=1E-6);if(qe(a,b,h,k,q,c,d)&&qe(a,b,h,k,q,e,g)){q=(a-h)*(m-p)-(b-k)*(l-n);if(0===q)return r;var s=((a*k-b*h)*(l-n)-(a-h)*(l*p-m*n))/q,u=((a*k-b*h)*(m-p)-(b-k)*(l*p-m*n))/q;if(s>=n)return r;if((l>n?l-n:n-l)<(m>p?m-p:p-m)){if(a=l=0,ba)return r}else if(aa)return r;0q&&r--}else{var s=(a+c)/2,u=(b+d)/2,t=(c+e)/2,y=(d+g)/2;e=(e+h)/2;g=(g+k)/2;d=(s+t)/2;c=(u+y)/2;var t=(t+e)/2,y=(y+g)/2, w=(d+t)/2,B=(c+y)/2,r=r+He(a,b,s,u,d,c,w,B,l,m,n,p,q),r=r+He(w,B,t,y,e,g,h,k,l,m,n,p,q)}return r} function fb(a,b,c,d,e,g,h){if(Eb(a,c)){var k=0;c=0;bc)return h.x=a,h.y=c,!1;h.x=a;h.y=d;return!0}if(Eb(b,d)){ac)return h.x=c,h.y=b,!1;h.x=d;h.y=b;return!0}k=((a-e)*(a-c)+(b-g)*(b-d))/((c-a)*(c-a)+(d-b)*(d-b));if(-5E-6>k)return h.x=a,h.y=b,!1;if(1.000005c)return l.x=a,l.y=c,!1;l.x=a;l.y=g;return!0}h=(d-b)/(c-a);if(Eb(k,h))return fb(a,b,c,d,e,g,l),!1;e=(h*a-k*e+g-b)/(h-k);if(Eb(h,0)){ac)return l.x=c,l.y=b,!1;l.x=e;l.y=b;return!0}g= h*(e-a)+b;return fb(a,b,c,d,e,g,l)}function Je(a,b,c,d,e,g,h,k,l){var m=1E21,n=a,p=b;if(Ie(a,b,a,d,e,g,h,k,l)){var q=(l.x-e)*(l.x-e)+(l.y-g)*(l.y-g);qm} function Ke(a,b,c,d,e,g,h,k,l){c=a-c;var m=e-h,n=h=0;0===c||0===m?0===c?(k=(g-k)/m,h=a,n=k*h+(g-k*e)):(d=(b-d)/c,h=e,n=d*h+(b-d*a)):(d=(b-d)/c,k=(g-k)/m,a=b-d*a,h=(g-k*e-a)/(d-k),n=d*h+a);l.n(h,n);return l} function Oe(a,b,c){var d=b.x,e=b.y,g=c.x,h=c.y,k=a.left,l=a.right,m=a.top,n=a.bottom;return d===g?(g=a=0,e=m):e===h?(d=k):a.Pa(b)||a.Pa(c)||Pe(k,m,l,m,d,e,g,h)||Pe(l,m,l,n,d,e,g,h)||Pe(l,n,k,n,d,e,g,h)||Pe(k,n,k,m,d,e,g,h)?!0:!1}function Pe(a,b,c,d,e,g,h,k){return 0>=Qe(a,b,c,d,e,g)*Qe(a,b,c,d,h,k)&&0>=Qe(e,g,h,k,a,b)*Qe(e,g,h,k,c,d)} function Qe(a,b,c,d,e,g){c-=a;d-=b;a=e-a;b=g-b;g=a*d-b*c;0===g&&(g=a*c+b*d,0g&&(g=0)));return 0>g?-1:0a&&(a+=360);360<=a&&(a-=360);return a} function Se(a,b,c,d){var e=Math.PI;d||(b*=e/180,c*=e/180);var g=b>c?-1:1;d=[];var h=e/2,k=b;c=Math.min(2*e,Math.abs(c-b));if(1E-5>c)return b=k+g*Math.min(c,h),g=0+a*Math.cos(k),k=0+a*Math.sin(k),h=0+a*Math.cos(b),a=0+a*Math.sin(b),b=(g+h)/2,c=(k+a)/2,d.push([g,k,b,c,b,c,h,a]),d;for(;1E-5c,g=0>d,h=0,k=h=0;ag;++g){m=.5*(d+e);if(m===d||m===e)break;k=l/(m+b);h=c/(m+a);k=k*k+h*h-1;if(0k)e=m;else break}n=b*n/(m+b)-n;p=a*p/(m+a)-p;a=Math.sqrt(n*n+p*p)}else a=Math.abs(p-m);else p=l*l-m*m,a=l*n,aa?"M"+this.la.toString()+" "+this.ja.toString()+"L"+this.G.toString()+" "+this.H.toString():"M"+this.la.toFixed(a)+" "+this.ja.toFixed(a)+"L"+this.G.toFixed(a)+" "+this.H.toFixed(a);case tf:var b=new C(this.la,this.ja,0,0);b.rH(this.G,this.H,0,0);return 0>a?"M"+b.x.toString()+" "+b.y.toString()+"H"+b.right.toString()+"V"+b.bottom.toString()+"H"+b.left.toString()+"z":"M"+b.x.toFixed(a)+" "+b.y.toFixed(a)+"H"+b.right.toFixed(a)+ "V"+b.bottom.toFixed(a)+"H"+b.left.toFixed(a)+"z";case uf:b=new C(this.la,this.ja,0,0);b.rH(this.G,this.H,0,0);if(0>a){var c=b.left.toString()+" "+(b.y+b.height/2).toString(),d=b.right.toString()+" "+(b.y+b.height/2).toString();return"M"+c+"A"+(b.width/2).toString()+" "+(b.height/2).toString()+" 0 0 1 "+d+"A"+(b.width/2).toString()+" "+(b.height/2).toString()+" 0 0 1 "+c}c=b.left.toFixed(a)+" "+(b.y+b.height/2).toFixed(a);d=b.right.toFixed(a)+" "+(b.y+b.height/2).toFixed(a);return"M"+c+"A"+(b.width/ 2).toFixed(a)+" "+(b.height/2).toFixed(a)+" 0 0 1 "+d+"A"+(b.width/2).toFixed(a)+" "+(b.height/2).toFixed(a)+" 0 0 1 "+c;case We:for(var b="",c=this.nc.o,d=c.length,e=0;e=u-1?!0:null!==l[m+1].match(/[A-Za-z]/)}function d(){m++;return l[m]}function e(){var a=new N(parseFloat(d()),parseFloat(d()));n===n.toLowerCase()&&(a.x=s.x+a.x,a.y=s.y+a.y);return a}function g(){return s=e()}function h(){return r=e()}function k(){return"c"!==p.toLowerCase()&&"s"!==p.toLowerCase()?s:new N(2*s.x-r.x,2*s.y-r.y)}void 0===b&&(b=!1);"string"!==typeof a&&D.jc(a,"string",Ve,"parse:str");a=a.replace(/,/gm," ");a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFf])([UuBbMmZzLlHhVvCcSsQqTtAaFf])/gm, "$1 $2");a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFf])([UuBbMmZzLlHhVvCcSsQqTtAaFf])/gm,"$1 $2");a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFf])([^\s])/gm,"$1 $2");a=a.replace(/([^\s])([UuBbMmZzLlHhVvCcSsQqTtAaFf])/gm,"$1 $2");a=a.replace(/([0-9])([+\-])/gm,"$1 $2");a=a.replace(/(\.[0-9]*)(\.)/gm,"$1 $2");a=a.replace(/([Aa](\s+[0-9]+){3})\s+([01])\s*([01])/gm,"$1 $3 $4 ");a=a.replace(/[\s\r\t\n]+/gm," ");a=a.replace(/^\s+|\s+$/g,"");for(var l=a.split(" "),m=-1,n="",p="",q=new N(0,0),r=new N(0,0),s=new N(0, 0),u=l.length,t=D.v(),y=!1,w=!1,B=!0,A=null;!(m>=u-1);)if(p=n,n=d(),""!==n)switch(n.toUpperCase()){case "X":B=!0;w=y=!1;break;case "M":A=g();null===t.fc||!0===B?(T(t,A.x,A.y,y,!1,!w),B=!1):t.moveTo(A.x,A.y);for(q=s;!c();)A=g(),t.lineTo(A.x,A.y);break;case "L":for(;!c();)A=g(),t.lineTo(A.x,A.y);break;case "H":for(;!c();)s=A=new N((n===n.toLowerCase()?s.x:0)+parseFloat(d()),s.y),t.lineTo(s.x,s.y);break;case "V":for(;!c();)s=A=new N(s.x,(n===n.toLowerCase()?s.y:0)+parseFloat(d())),t.lineTo(s.x,s.y); break;case "C":for(;!c();){var O=e(),H=h(),A=g();U(t,O.x,O.y,H.x,H.y,A.x,A.y)}break;case "S":for(;!c();)O=k(),H=h(),A=g(),U(t,O.x,O.y,H.x,H.y,A.x,A.y);break;case "Q":for(;!c();)H=h(),A=g(),zf(t,H.x,H.y,A.x,A.y);break;case "T":for(;!c();)r=H=k(),A=g(),zf(t,H.x,H.y,A.x,A.y);break;case "B":for(;!c();){var A=parseFloat(d()),O=parseFloat(d()),H=parseFloat(d()),R=parseFloat(d()),aa=parseFloat(d()),V=aa,ea=!1;c()||(V=parseFloat(d()),c()||(ea=0!==parseFloat(d())));n===n.toLowerCase()&&(H+=s.x,R+=s.y);t.arcTo(A, O,H,R,aa,V,ea)}break;case "A":for(;!c();)O=Math.abs(parseFloat(d())),H=Math.abs(parseFloat(d())),R=parseFloat(d()),aa=!!parseFloat(d()),V=!!parseFloat(d()),A=g(),Af(t,O,H,R,aa,V,A.x,A.y);break;case "Z":A=t.q.nc.o[t.q.nc.length-1];X(t);s=q;break;case "F":A="";for(O=1;l[m+O];)if(null!==l[m+O].match(/[Uu]/))O++;else if(null===l[m+O].match(/[A-Za-z]/))O++;else{A=l[m+O];break}A.match(/[Mm]/)?y=!0:Bf(t);break;case "U":A="";for(O=1;l[m+O];)if(null!==l[m+O].match(/[Ff]/))O++;else if(null===l[m+O].match(/[A-Za-z]/))O++; else{A=l[m+O];break}A.match(/[Mm]/)?w=!0:t.kb(!1)}q=t.q;D.u(t);if(b)for(t=q.nc.j;t.next();)A=t.value,A.Gu=!0;return q};function Cf(a,b){for(var c=a.length,d=D.P(),e=0;eh&&(h+=360),s.Ne+=h);0>a&&(s.Ne=180-s.Ne,s.Df=-s.Df);0>d&&(s.Ne=-s.Ne,s.Df=-s.Df);s.radiusX*=Math.sqrt(a*a+c*c);void 0!==s.radiusY&&(s.radiusY*=Math.sqrt(b*b+d*d));break;case Uf:h=s.G;k=s.H;s.G=h* a+k*c+e;s.H=h*b+k*d+g;0!==b&&(h=180*Math.atan2(b,a)/Math.PI,0>h&&(h+=360),s.bk+=h);0>a&&(s.bk=180-s.bk,s.xm=!s.xm);0>d&&(s.bk=-s.bk,s.xm=!s.xm);s.radiusX*=Math.sqrt(a*a+c*c);s.radiusY*=Math.sqrt(b*b+d*d);break;default:D.k("Unknown Segment type: "+s.type)}}}}this.pb=!0;return this}; Ve.prototype.Pa=function(a,b,c,d){var e=a.x,g=a.y,h=this.qb.x-20;a=a.y;for(var k=0,l=0,m=0,n=0,p=0,q=0,r=this.nc.o,s=r.length,u=0;u=a)return 0;if((e>h?e-h:h-e)<(g>k?g-k:k-g)){if(e=a=0,ge)return 0}else if(ee)return 0;return 0a?a=0:1=g)return d=(g-h)/p,c=c[k],k=c[2*n],e=c[2*n+1],b.n(k+(c[2*n+2]-k)*d,e+(c[2*n+3]-e)*d),b;h+=p}b.n(NaN,NaN);return b}; Ve.prototype.getAngleAlongPath=Ve.prototype.LF=function(a){0>a?a=0:1=e)return b=b[h],b=180*Math.atan2(b[2*a+3]-b[2*a+1],b[2*a+2]-b[2*a])/Math.PI;g+=m}}return NaN}; Ve.prototype.getFractionForPoint=Ve.prototype.RI=function(a){if(this.type===sf){var b=this.la,c=this.ja,d=this.G,e=this.H;if(b!==d||c!==e){var g=a.x;a=a.y;var h=0,k=0;return b===d?(c=k?k===c?0:1:Math.abs(a-c)/(k-h)):c===e?(b=k?k===b?0:1:Math.abs(g-b)/(k-h)):((g-b)*(g-b)+(a-c)*(a-c))/((d-b)*(d-b)+(e-c)*(e-c))}}else if(this.type===tf){if(b=this.la,c=this.ja,d=this.G,e=this.H,b!==d||c!==e){var h=d-b,k=e-c,l=2*h+2*k,g=a.x; a=a.y;g=Math.min(Math.max(g,b),d);a=Math.min(Math.max(a,c),e);var b=Math.abs(g-b),d=Math.abs(g-d),c=Math.abs(a-c),e=Math.abs(a-e),m=Math.min(b,d,c,e);if(m===c)return g/l;if(m===d)return(h+a)/l;if(m===e)return(2*h+k-g)/l;if(m===b)return(2*h+2*k-a)/l}}else{for(var e=this.Ux,h=this.ru,k=this.su,l=D.P(),c=Infinity,b=d=0,g=e.length,n=m=0,p=0;pa?0:1a?"M"+this.la.toString()+" "+this.ja.toString():"M"+this.la.toFixed(a)+" "+this.ja.toFixed(a),c=this.Eb.o,d=c.length,e=0;ea&&(a+=360),this.Sd=a,this.hf=0,v&&D.p(d,$f,"x1"),this.Eh=Math.max(d,0),v&&D.p(e,$f,"y1"),this.Og=Math.max(e,0),this.pp="boolean"===typeof h?!!h:!1,this.Jo=!!k):(v&&D.p(d,$f,"x1"),this.Sd=d,v&&D.p(e, $f,"y1"),this.hf=e,v&&D.p(g,$f,"x2"),a===Tf&&(g=Math.max(g,0)),this.Eh=g,"number"===typeof h?(a===Tf&&(h=Math.max(h,0)),this.Og=h):this.Og=0,this.Jo=this.pp=!1);this.ji=!1;this.pb=!0;this.ai=null}D.ka("PathSegment",$f);D.Fi($f);$f.prototype.copy=function(){var a=new $f;a.da=this.da;a.Cb=this.Cb;a.Jb=this.Jb;a.Sd=this.Sd;a.hf=this.hf;a.Eh=this.Eh;a.Og=this.Og;a.pp=this.pp;a.Jo=this.Jo;a.ji=this.ji;a.pb=this.pb;return a}; $f.prototype.equalsApprox=$f.prototype.Uc=function(a){if(!(a instanceof $f)||this.type!==a.type||this.$x!==a.$x)return!1;switch(this.type){case Ef:case wf:return Q(this.G,a.G)&&Q(this.H,a.H);case Ff:return Q(this.G,a.G)&&Q(this.H,a.H)&&Q(this.Dc,a.Dc)&&Q(this.Zc,a.Zc)&&Q(this.Vh,a.Vh)&&Q(this.Wh,a.Wh);case Gf:return Q(this.G,a.G)&&Q(this.H,a.H)&&Q(this.Dc,a.Dc)&&Q(this.Zc,a.Zc);case Tf:return Q(this.Ne,a.Ne)&&Q(this.Df,a.Df)&&Q(this.pa,a.pa)&&Q(this.va,a.va)&&Q(this.radiusX,a.radiusX)&&Q(this.radiusY, a.radiusY);case Uf:return this.xm===a.xm&&this.jy===a.jy&&Q(this.bk,a.bk)&&Q(this.G,a.G)&&Q(this.H,a.H)&&Q(this.radiusX,a.radiusX)&&Q(this.radiusY,a.radiusY);default:return!1}};$f.prototype.qc=function(a){a.Re===$f?this.type=a:D.$j(this,a)}; $f.prototype.toString=function(a){void 0===a&&(a=-1);var b="";switch(this.type){case Ef:b=0>a?"M"+this.G.toString()+" "+this.H.toString():"M"+this.G.toFixed(a)+" "+this.H.toFixed(a);break;case wf:b=0>a?"L"+this.G.toString()+" "+this.H.toString():"L"+this.G.toFixed(a)+" "+this.H.toFixed(a);break;case Ff:b=0>a?"C"+this.Dc.toString()+" "+this.Zc.toString()+" "+this.Vh.toString()+" "+this.Wh.toString()+" "+this.G.toString()+" "+this.H.toString():"C"+this.Dc.toFixed(a)+" "+this.Zc.toFixed(a)+" "+this.Vh.toFixed(a)+ " "+this.Wh.toFixed(a)+" "+this.G.toFixed(a)+" "+this.H.toFixed(a);break;case Gf:b=0>a?"Q"+this.Dc.toString()+" "+this.Zc.toString()+" "+this.G.toString()+" "+this.H.toString():"Q"+this.Dc.toFixed(a)+" "+this.Zc.toFixed(a)+" "+this.G.toFixed(a)+" "+this.H.toFixed(a);break;case Tf:b=0>a?"B"+this.Ne.toString()+" "+this.Df.toString()+" "+this.pa.toString()+" "+this.va.toString()+" "+this.radiusX:"B"+this.Ne.toFixed(a)+" "+this.Df.toFixed(a)+" "+this.pa.toFixed(a)+" "+this.va.toFixed(a)+" "+this.radiusX; break;case Uf:b=0>a?"A"+this.radiusX.toString()+" "+this.radiusY.toString()+" "+this.bk.toString()+" "+(this.jy?1:0)+" "+(this.xm?1:0)+" "+this.G.toString()+" "+this.H.toString():"A"+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a)+" "+this.bk.toFixed(a)+" "+(this.jy?1:0)+" "+(this.xm?1:0)+" "+this.G.toFixed(a)+" "+this.H.toFixed(a);break;default:b=this.type.toString()}return b+(this.ji?"z":"")};var Ef;$f.Move=Ef=D.s($f,"Move",0);var wf;$f.Line=wf=D.s($f,"Line",1);var Ff; $f.Bezier=Ff=D.s($f,"Bezier",2);var Gf;$f.QuadraticBezier=Gf=D.s($f,"QuadraticBezier",3);var Tf;$f.Arc=Tf=D.s($f,"Arc",4);var Uf;$f.SvgArc=Uf=D.s($f,"SvgArc",4);$f.prototype.freeze=function(){this.J=!0;return this};$f.prototype.Xa=function(){this.J=!1;return this};$f.prototype.close=$f.prototype.close=function(){this.ji=!0;return this}; function Vf(a,b){if(null!==a.ai&&!1===b.pb)return a.ai;var c=a.radiusX,d=a.radiusY;void 0===d&&(d=c);if(0===c||0===d)return a.ai=[],a.ai;var e=a.Sd,g=a.hf,h=Se(c=r?h=Math.PI:1<=r&&(h=0);!l&&0h&&(h+=2*Math.PI);l=b>g?1:b/g;r=b>g?g/b:1;b=Se(b>g?b:g,n,n+h,!0);g=D.Sf();g.reset();g.translate(c,d);g.rotate(a.Sd,0,0);g.scale(l,r);Cf(b,g);D.Ke(g);a.ai=b;return a.ai} D.defineProperty($f,{$x:"isClosed"},function(){return this.ji},function(a){this.ji!==a&&(this.ji=a,this.pb=!0)});D.defineProperty($f,{type:"type"},function(){return this.da},function(a){v&&D.Da(a,$f,$f,"type");this.J&&D.qa(this,a);this.da=a;this.pb=!0});D.defineProperty($f,{G:"endX"},function(){return this.Cb},function(a){v&&D.p(a,$f,"endX");this.J&&D.qa(this,a);this.Cb=a;this.pb=!0}); D.defineProperty($f,{H:"endY"},function(){return this.Jb},function(a){v&&D.p(a,$f,"endY");this.J&&D.qa(this,a);this.Jb=a;this.pb=!0});D.defineProperty($f,{Dc:"point1X"},function(){return this.Sd},function(a){v&&D.p(a,$f,"point1X");this.J&&D.qa(this,a);this.Sd=a;this.pb=!0});D.defineProperty($f,{Zc:"point1Y"},function(){return this.hf},function(a){v&&D.p(a,$f,"point1Y");this.J&&D.qa(this,a);this.hf=a;this.pb=!0}); D.defineProperty($f,{Vh:"point2X"},function(){return this.Eh},function(a){v&&D.p(a,$f,"point2X");this.J&&D.qa(this,a);this.Eh=a;this.pb=!0});D.defineProperty($f,{Wh:"point2Y"},function(){return this.Og},function(a){v&&D.p(a,$f,"point2Y");this.J&&D.qa(this,a);this.Og=a;this.pb=!0});D.defineProperty($f,{pa:"centerX"},function(){return this.Sd},function(a){v&&D.p(a,$f,"centerX");this.J&&D.qa(this,a);this.Sd=a;this.pb=!0}); D.defineProperty($f,{va:"centerY"},function(){return this.hf},function(a){v&&D.p(a,$f,"centerY");this.J&&D.qa(this,a);this.hf=a;this.pb=!0});D.defineProperty($f,{radiusX:"radiusX"},function(){return this.Eh},function(a){v&&D.p(a,$f,"radiusX");0>a&&D.ua(a,">= zero",$f,"radiusX");this.J&&D.qa(this,a);this.Eh=a;this.pb=!0});D.defineProperty($f,{radiusY:"radiusY"},function(){return this.Og},function(a){v&&D.p(a,$f,"radiusY");0>a&&D.ua(a,">= zero",$f,"radiusY");this.J&&D.qa(this,a);this.Og=a;this.pb=!0}); D.defineProperty($f,{Ne:"startAngle"},function(){return this.Cb},function(a){this.Cb!==a&&(this.J&&D.qa(this,a),v&&D.p(a,$f,"startAngle"),a%=360,0>a&&(a+=360),this.Cb=a,this.pb=!0)});D.defineProperty($f,{Df:"sweepAngle"},function(){return this.Jb},function(a){v&&D.p(a,$f,"sweepAngle");this.J&&D.qa(this,a);360a&&(a=-360);this.Jb=a;this.pb=!0});D.defineProperty($f,{xm:"isClockwiseArc"},function(){return this.Jo},function(a){this.J&&D.qa(this,a);this.Jo=a;this.pb=!0}); D.defineProperty($f,{jy:"isLargeArc"},function(){return this.pp},function(a){this.J&&D.qa(this,a);this.pp=a;this.pb=!0});D.defineProperty($f,{bk:"xAxisRotation"},function(){return this.Sd},function(a){v&&D.p(a,$f,"xAxisRotation");a%=360;0>a&&(a+=360);this.J&&D.qa(this,a);this.Sd=a;this.pb=!0}); function bg(){this.ca=null;this.AA=(new N(0,0)).freeze();this.Gz=(new N(0,0)).freeze();this.Hv=this.Dw=0;this.Iv=1;this.qw="";this.mx=this.Vv=!1;this.Tv=this.Jv=0;this.dk=this.cw=this.mw=!1;this.Xr=null;this.kx=0;this.Sg=this.jx=null}D.ka("InputEvent",bg); bg.prototype.copy=function(){var a=new bg;a.ca=this.ca;a.AA.assign(this.se);a.Gz.assign(this.ha);a.Dw=this.Dw;a.Hv=this.Hv;a.Iv=this.Iv;a.qw=this.qw;a.Vv=this.Vv;a.mx=this.mx;a.Jv=this.Jv;a.Tv=this.Tv;a.mw=this.mw;a.cw=this.cw;a.dk=this.dk;a.Xr=this.Xr;a.kx=this.kx;a.jx=this.jx;a.Sg=this.Sg;return a}; bg.prototype.toString=function(){var a="^";0!==this.vd&&(a+="M:"+this.vd);0!==this.button&&(a+="B:"+this.button);""!==this.key&&(a+="K:"+this.key);0!==this.Ee&&(a+="C:"+this.Ee);0!==this.Vk&&(a+="D:"+this.Vk);this.Bc&&(a+="h");this.bubbles&&(a+="b");null!==this.ha&&(a+="@"+this.ha.toString());return a};D.defineProperty(bg,{g:"diagram"},function(){return this.ca},function(a){this.ca=a});D.defineProperty(bg,{se:"viewPoint"},function(){return this.AA},function(a){D.l(a,N,bg,"viewPoint");this.AA.assign(a)}); D.defineProperty(bg,{ha:"documentPoint"},function(){return this.Gz},function(a){D.l(a,N,bg,"documentPoint");this.Gz.assign(a)});bg.prototype.getMultiTouchViewPoint=bg.prototype.Wx=function(a,b){var c=this.g;if(null===c)return b;cg(c,this.event,a,b);return b};bg.prototype.getMultiTouchDocumentPoint=function(a,b){var c=this.g;if(null===c)return b;cg(c,this.event,a,b);b.assign(c.oC(b));return b};D.defineProperty(bg,{vd:"modifiers"},function(){return this.Dw},function(a){this.Dw=a}); D.defineProperty(bg,{button:"button"},function(){return this.Hv},function(a){this.Hv=a;if(null===this.event)switch(a){case 0:this.buttons=1;break;case 1:this.buttons=4;break;case 2:this.buttons=2}});D.defineProperty(bg,{buttons:"buttons"},function(){return this.Iv},function(a){this.Iv=a});D.defineProperty(bg,{key:"key"},function(){return this.qw},function(a){this.qw=a});D.defineProperty(bg,{Wk:"down"},function(){return this.Vv},function(a){this.Vv=a}); D.defineProperty(bg,{up:"up"},function(){return this.mx},function(a){this.mx=a});D.defineProperty(bg,{Ee:"clickCount"},function(){return this.Jv},function(a){this.Jv=a});D.defineProperty(bg,{Vk:"delta"},function(){return this.Tv},function(a){this.Tv=a});D.defineProperty(bg,{Ju:"isMultiTouch"},function(){return this.mw},function(a){this.mw=a});D.defineProperty(bg,{Bc:"handled"},function(){return this.cw},function(a){this.cw=a}); D.defineProperty(bg,{bubbles:"bubbles"},function(){return this.dk},function(a){this.dk=a});D.defineProperty(bg,{event:"event"},function(){return this.Xr},function(a){this.Xr=a});D.w(bg,{Pj:"isTouchEvent"},function(){var a=window.TouchEvent,b=this.event;return a&&b instanceof a?!0:(a=window.PointerEvent)&&b instanceof a&&("touch"===b.pointerType||"pen"===b.pointerType)});D.w(bg,{Rh:"isMac"},function(){return D.Rh}); D.defineProperty(bg,{timestamp:"timestamp"},function(){return this.kx},function(a){this.kx=a});D.defineProperty(bg,{Pf:"targetDiagram"},function(){return this.jx},function(a){this.jx=a});D.defineProperty(bg,{Oe:"targetObject"},function(){return this.Sg},function(a){this.Sg=a});D.defineProperty(bg,{control:"control"},function(){return 0!==(this.vd&1)},function(a){this.vd=a?this.vd|1:this.vd&-2}); D.defineProperty(bg,{shift:"shift"},function(){return 0!==(this.vd&4)},function(a){this.vd=a?this.vd|4:this.vd&-5});D.defineProperty(bg,{alt:"alt"},function(){return 0!==(this.vd&2)},function(a){this.vd=a?this.vd|2:this.vd&-3});D.defineProperty(bg,{Su:"meta"},function(){return 0!==(this.vd&8)},function(a){this.vd=a?this.vd|8:this.vd&-9}); D.defineProperty(bg,{left:"left"},function(){var a=this.event;return null===a||"mousedown"!==a.type&&"mouseup"!==a.type&&"pointerdown"!==a.type&&"pointerup"!==a.type?0!==(this.buttons&1):0===this.button},function(a){this.buttons=a?this.buttons|1:this.buttons&-2}); D.defineProperty(bg,{right:"right"},function(){var a=this.event;return null===a||"mousedown"!==a.type&&"mouseup"!==a.type&&"pointerdown"!==a.type&&"pointerup"!==a.type?0!==(this.buttons&2):2===this.button},function(a){this.buttons=a?this.buttons|2:this.buttons&-3}); D.defineProperty(bg,{gM:"middle"},function(){var a=this.event;return null===a||"mousedown"!==a.type&&"mouseup"!==a.type&&"pointerdown"!==a.type&&"pointerup"!==a.type?0!==(this.buttons&4):1===this.button},function(a){this.buttons=a?this.buttons|4:this.buttons&-5});function dg(){this.ca=null;this.$b="";this.Nw=this.hx=null;this.pr=!1}D.ka("DiagramEvent",dg);dg.prototype.copy=function(){var a=new dg;a.ca=this.ca;a.$b=this.$b;a.hx=this.hx;a.Nw=this.Nw;a.pr=this.pr;return a}; dg.prototype.toString=function(){var a="*"+this.name;null!==this.fC&&(a+=":"+this.fC.toString());null!==this.JB&&(a+="("+this.JB.toString()+")");return a};D.defineProperty(dg,{g:"diagram"},function(){return this.ca},function(a){this.ca=a});D.defineProperty(dg,{name:"name"},function(){return this.$b},function(a){this.$b=a});D.defineProperty(dg,{fC:"subject"},function(){return this.hx},function(a){this.hx=a});D.defineProperty(dg,{JB:"parameter"},function(){return this.Nw},function(a){this.Nw=a}); D.defineProperty(dg,{cancel:"cancel"},function(){return this.pr},function(a){this.pr!==a&&D.On("DiagramEvent.cancel","2.0");this.pr=a});function eg(){this.qr=fg;this.nn=this.Cw="";this.Ts=this.Us=this.Zs=this.$s=this.Xs=this.ca=this.xe=null}D.ka("ChangedEvent",eg);var gg;eg.Transaction=gg=D.s(eg,"Transaction",-1);var fg;eg.Property=fg=D.s(eg,"Property",0);var rg;eg.Insert=rg=D.s(eg,"Insert",1);var sg;eg.Remove=sg=D.s(eg,"Remove",2); eg.prototype.clear=eg.prototype.clear=function(){this.Ts=this.Us=this.Zs=this.$s=this.Xs=this.ca=this.xe=null};eg.prototype.copy=function(){var a=new eg;a.qr=this.qr;a.Cw=this.Cw;a.nn=this.nn;a.xe=this.xe;a.ca=this.ca;a.Xs=this.Xs;var b=this.$s;a.$s=D.Qa(b)&&"function"===typeof b.V?b.V():b;b=this.Zs;a.Zs=D.Qa(b)&&"function"===typeof b.V?b.V():b;b=this.Us;a.Us=D.Qa(b)&&"function"===typeof b.V?b.V():b;b=this.Ts;a.Ts=D.Qa(b)&&"function"===typeof b.V?b.V():b;return a}; eg.prototype.qc=function(a){a.Re===eg?this.Lc=a:D.$j(this,a)}; eg.prototype.toString=function(){var a="",a=this.Lc===gg?a+"* ":this.Lc===fg?a+(null!==this.ea?"!m":"!d"):a+((null!==this.ea?"!m":"!d")+this.Lc);this.propertyName&&"string"===typeof this.propertyName&&(a+=" "+this.propertyName);this.Cf&&this.Cf!==this.propertyName&&(a+=" "+this.Cf);a+=": ";this.Lc===gg?null!==this.oldValue&&(a+=" "+this.oldValue):(null!==this.object&&(a+=ia(this.object)),null!==this.oldValue&&(a+=" old: "+ia(this.oldValue)),null!==this.Vj&&(a+=" "+this.Vj),null!==this.newValue&& (a+=" new: "+ia(this.newValue)),null!==this.Tj&&(a+=" "+this.Tj));return a};eg.prototype.getValue=eg.prototype.oa=function(a){return a?this.oldValue:this.newValue};eg.prototype.getParam=function(a){return a?this.Vj:this.Tj};eg.prototype.canUndo=eg.prototype.canUndo=function(){return null!==this.ea||null!==this.g?!0:!1};eg.prototype.undo=eg.prototype.undo=function(){this.canUndo()&&(null!==this.ea?this.ea.Fn(this,!0):null!==this.g&&this.g.Fn(this,!0))}; eg.prototype.canRedo=eg.prototype.canRedo=function(){return null!==this.ea||null!==this.g?!0:!1};eg.prototype.redo=eg.prototype.redo=function(){this.canRedo()&&(null!==this.ea?this.ea.Fn(this,!1):null!==this.g&&this.g.Fn(this,!1))};D.defineProperty(eg,{ea:"model"},function(){return this.xe},function(a){this.xe=a});D.defineProperty(eg,{g:"diagram"},function(){return this.ca},function(a){this.ca=a}); D.defineProperty(eg,{Lc:"change"},function(){return this.qr},function(a){v&&D.Da(a,eg,eg,"change");this.qr=a});D.defineProperty(eg,{Cf:"modelChange"},function(){return this.Cw},function(a){v&&D.h(a,"string",eg,"modelChange");this.Cw=a});D.defineProperty(eg,{propertyName:"propertyName"},function(){return this.nn},function(a){v&&"string"!==typeof a&&D.h(a,"function",eg,"propertyName");this.nn=a}); D.w(eg,{kG:"isTransactionFinished"},function(){return this.qr===gg&&("CommittedTransaction"===this.nn||"FinishedUndo"===this.nn||"FinishedRedo"===this.nn)});D.defineProperty(eg,{object:"object"},function(){return this.Xs},function(a){this.Xs=a});D.defineProperty(eg,{oldValue:"oldValue"},function(){return this.$s},function(a){this.$s=a});D.defineProperty(eg,{Vj:"oldParam"},function(){return this.Zs},function(a){this.Zs=a}); D.defineProperty(eg,{newValue:"newValue"},function(){return this.Us},function(a){this.Us=a});D.defineProperty(eg,{Tj:"newParam"},function(){return this.Ts},function(a){this.Ts=a}); function M(a){1g?b+("\\u000"+a.charCodeAt(d).toString(16)):32>g?b+("\\u00"+a.charCodeAt(d).toString(16)):8232===g?b+"\\u2028":8233===g?b+"\\u2029":b+e}return'"'+b+'"'}; M.prototype.writeJsonValue=M.prototype.sv=function(a){return void 0===a?"undefined":null===a?"null":!0===a?"true":!1===a?"false":"string"===typeof a?this.quote(a):"number"===typeof a?Infinity===a?"9e9999":-Infinity===a?"-9e9999":isNaN(a)?'{"class":"NaN"}':a.toString():a instanceof Date?'{"class":"Date", "value":"'+a.toJSON()+'"}':a instanceof Number?this.sv(a.valueOf()):D.isArray(a)?yg(this,a):D.Qa(a)?vg(this,a):"function"===typeof a?"null":a.toString()}; function yg(a,b,c){void 0===c&&(c=!1);var d=D.cb(b);if(0>=d)return"[]";var e=new xa;e.add("[ ");c&&1d)return;D.Vg(a.ye,d)}ah(a,"nodeDataArray",sg,"nodeDataArray",a,b,null,d,null);a.rv(b)} M.prototype.removeNodeDataCollection=function(a){if(D.isArray(a))for(var b=D.cb(a),c=0;cb&&(b=D.cb(a));D.Kh(a,b,c);ah(this,"",rg,"",a,null,c,null,b)}; M.prototype.removeArrayItem=M.prototype.FG=function(a,b){void 0===b&&(b=-1);v&&(D.du(a,M,"removeArrayItem:arr"),D.p(b,M,"removeArrayItem:idx"));a===this.ye&&D.k("Model.removeArrayItem should not be called on the Model.nodeDataArray");-1===b&&(b=D.cb(a)-1);var c=D.La(a,b);D.Vg(a,b);ah(this,"",sg,"",a,c,null,b,null)};D.defineProperty(M,{no:"nodeCategoryProperty"},function(){return this.hn},function(a){var b=this.hn;b!==a&&(bh(a,M,"nodeCategoryProperty"),this.hn=a,this.i("nodeCategoryProperty",b,a))}); M.prototype.getCategoryForNodeData=M.prototype.eB=function(a){if(null===a)return"";var b=this.hn;if(""===b)return"";b=D.wb(a,b);if(void 0===b)return"";if("string"===typeof b)return b;D.k("getCategoryForNodeData found a non-string category for "+a+": "+b);return""}; M.prototype.setCategoryForNodeData=M.prototype.Ry=function(a,b){D.h(b,"string",M,"setCategoryForNodeData:cat");if(null!==a){var c=this.hn;if(""!==c)if(this.le(a)){var d=D.wb(a,c);void 0===d&&(d="");d!==b&&(D.Ua(a,c,b),ah(this,"nodeCategory",fg,c,a,d,b))}else D.Ua(a,c,b)}}; function Y(a,b){M.call(this);2D.im(d,a.newValue)&&D.Kh(d,c,a.newValue));return}}else if(a.Lc=== sg){c=a.Vj;if("linkDataArray"===a.Cf){d=a.oldValue;D.Qa(d)&&"number"===typeof c&&(e=this.mf(d),b?(this.mi.add(d),D.La(this.ff,c)!==d&&D.Kh(this.ff,c,d),void 0!==e&&this.rd.add(e,d)):(this.mi.remove(d),D.La(this.ff,c)===d&&D.Vg(this.ff,c),void 0!==e&&this.rd.remove(e)));return}if("linkLabelKeys"===a.Cf){d=this.al(a.object);D.isArray(d)&&"number"===typeof c&&(b?0>D.im(d,a.newValue)&&D.Kh(d,c,a.newValue):(c=D.im(d,a.newValue),0<=c&&D.Vg(d,c)));return}}M.prototype.Fn.call(this,a,b)}; D.defineProperty(Y,{GA:"archetypeNodeData"},function(){return this.zl},function(a){var b=this.zl;b!==a&&(null!==a&&D.l(a,Object,Y,"archetypeNodeData"),this.zl=a,this.i("archetypeNodeData",b,a))});Y.prototype.fo=function(a){if(void 0!==a){var b=this.zl;if(null!==b){var c=this.Ie(a);null===c&&(c=this.copyNodeData(b),D.Ua(c,this.Ck,a),this.em(c))}return a}}; D.defineProperty(Y,{co:"linkFromKeyProperty"},function(){return this.ni},function(a){var b=this.ni;b!==a&&(bh(a,Y,"linkFromKeyProperty"),this.ni=a,this.i("linkFromKeyProperty",b,a))});Y.prototype.getFromKeyForLinkData=Y.prototype.um=function(a){if(null!==a){var b=this.ni;if(""!==b&&(b=D.wb(a,b),void 0!==b)){if(ch(b))return b;D.k("FromKey value for link data "+a+" is not a number or a string: "+b)}}}; Y.prototype.setFromKeyForLinkData=Y.prototype.WB=function(a,b){null===b&&(b=void 0);void 0===b||ch(b)||D.jc(b,"number or string",Y,"setFromKeyForLinkData:key");if(null!==a){var c=this.ni;if(""!==c)if(b=this.fo(b),this.Nh(a)){var d=D.wb(a,c);d!==b&&(hh(this,d,a),D.Ua(a,c,b),null===this.Ie(b)&&gh(this,b,a),ah(this,"linkFromKey",fg,c,a,d,b),"string"===typeof c&&this.Ob(a,c))}else D.Ua(a,c,b)}}; D.defineProperty(Y,{eo:"linkToKeyProperty"},function(){return this.oi},function(a){var b=this.oi;b!==a&&(bh(a,Y,"linkToKeyProperty"),this.oi=a,this.i("linkToKeyProperty",b,a))});Y.prototype.getToKeyForLinkData=Y.prototype.vm=function(a){if(null!==a){var b=this.oi;if(""!==b&&(b=D.wb(a,b),void 0!==b)){if(ch(b))return b;D.k("ToKey value for link data "+a+" is not a number or a string: "+b)}}}; Y.prototype.setToKeyForLinkData=Y.prototype.bC=function(a,b){null===b&&(b=void 0);void 0===b||ch(b)||D.jc(b,"number or string",Y,"setToKeyForLinkData:key");if(null!==a){var c=this.oi;if(""!==c)if(b=this.fo(b),this.Nh(a)){var d=D.wb(a,c);d!==b&&(hh(this,d,a),D.Ua(a,c,b),null===this.Ie(b)&&gh(this,b,a),ah(this,"linkToKey",fg,c,a,d,b),"string"===typeof c&&this.Ob(a,c))}else D.Ua(a,c,b)}}; D.defineProperty(Y,{Ou:"linkFromPortIdProperty"},function(){return this.cn},function(a){var b=this.cn;b!==a&&(bh(a,Y,"linkFromPortIdProperty"),a!==this.co&&a!==this.eo||D.k("linkFromPortIdProperty name must not be the same as the GraphLinksModel.linkFromKeyProperty or linkToKeyProperty: "+a),this.cn=a,this.i("linkFromPortIdProperty",b,a))});Y.prototype.getFromPortIdForLinkData=Y.prototype.SI=function(a){if(null===a)return"";var b=this.cn;if(""===b)return"";a=D.wb(a,b);return void 0===a?"":a}; Y.prototype.setFromPortIdForLinkData=Y.prototype.XB=function(a,b){D.h(b,"string",Y,"setFromPortIdForLinkData:portname");if(null!==a){var c=this.cn;if(""!==c)if(this.Nh(a)){var d=D.wb(a,c);void 0===d&&(d="");d!==b&&(D.Ua(a,c,b),ah(this,"linkFromPortId",fg,c,a,d,b),"string"===typeof c&&this.Ob(a,c))}else D.Ua(a,c,b)}}; D.defineProperty(Y,{Qu:"linkToPortIdProperty"},function(){return this.dn},function(a){var b=this.dn;b!==a&&(bh(a,Y,"linkToPortIdProperty"),a!==this.co&&a!==this.eo||D.k("linkFromPortIdProperty name must not be the same as the GraphLinksModel.linkFromKeyProperty or linkToKeyProperty: "+a),this.dn=a,this.i("linkToPortIdProperty",b,a))});Y.prototype.getToPortIdForLinkData=Y.prototype.WI=function(a){if(null===a)return"";var b=this.dn;if(""===b)return"";a=D.wb(a,b);return void 0===a?"":a}; Y.prototype.setToPortIdForLinkData=Y.prototype.cC=function(a,b){D.h(b,"string",Y,"setToPortIdForLinkData:portname");if(null!==a){var c=this.dn;if(""!==c)if(this.Nh(a)){var d=D.wb(a,c);void 0===d&&(d="");d!==b&&(D.Ua(a,c,b),ah(this,"linkToPortId",fg,c,a,d,b),"string"===typeof c&&this.Ob(a,c))}else D.Ua(a,c,b)}};D.defineProperty(Y,{Pu:"linkLabelKeysProperty"},function(){return this.Kg},function(a){var b=this.Kg;b!==a&&(bh(a,Y,"linkLabelKeysProperty"),this.Kg=a,this.i("linkLabelKeysProperty",b,a))}); Y.prototype.getLabelKeysForLinkData=Y.prototype.al=function(a){if(null===a)return D.Co;var b=this.Kg;if(""===b)return D.Co;a=D.wb(a,b);return void 0===a?D.Co:a}; Y.prototype.setLabelKeysForLinkData=Y.prototype.aH=function(a,b){D.du(b,Y,"setLabelKeysForLinkData:arr");if(null!==a){var c=this.Kg;if(""!==c)if(this.Nh(a)){var d=D.wb(a,c);void 0===d&&(d=D.Co);if(d!==b){for(var e=D.cb(d),g=0;ge||(D.Vg(d,e),this.Nh(a)&&(hh(this,b,a),ah(this,"linkLabelKeys",sg,c,a,b,null,e,null)))}else void 0!==d&&D.k(c+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}}; D.defineProperty(Y,{$g:"linkDataArray"},function(){return this.ff},function(a){var b=this.ff;if(b!==a){D.du(a,Y,"linkDataArray");this.rd.clear();for(var c=D.cb(a),d=0;dd)return;D.Vg(a.ff,d)}ah(a,"linkDataArray",sg,"linkDataArray",a,b,null,d,null);c=a.um(b);hh(a,c,b);c=a.vm(b);hh(a,c,b);d=a.al(b);if(D.isArray(d))for(var e=D.cb(d),g=0;ga.Ni&&D.trace("Ending transaction without having started a transaction: "+c);var d=1===a.Ni;d&&b&&a.td("CommittingTransaction",c,a.Fj);var e=0;if(0a.Kj;e--)g=d.fa(e),null!==g&&g.clear(), d.nd(e),a.$z=!0;e=a.sG;0===e&&(e=1);0=e&&(g=d.fa(0),null!==g&&g.clear(),d.nd(0),a.sh--);d.add(b);a.sh++;d.freeze();g=b}a.td("CommittedTransaction",c,g)}else{a.vh=!0;try{a.isEnabled&&null!==g&&(g.Eu=!0,g.undo())}finally{a.td("RolledBackTransaction",c,g),a.vh=!1}null!==g&&g.clear()}a.Sv=null;return!0}if(a.isEnabled&&!b&&null!==g){a=e;c=g.fg;for(b=c.count-1;b>=a;b--)d=c.fa(b),null!==d&&d.undo(),c.Xa(),c.nd(b);c.freeze()}return!1} tg.prototype.canUndo=tg.prototype.canUndo=function(){if(!this.isEnabled||0=this.Ni&&!this.Qz&&(a=a.g,null!==a&&!1===a.Zn||D.trace("Change not within a transaction: "+c.toString()))}}; tg.prototype.skipsEvent=function(a){if(null===a||0>a.Lc.value)return!0;a=a.object;if(a instanceof P){if(a=a.layer,null!==a&&a.Wc)return!0}else if(a instanceof Yg&&a.Wc)return!0;return!1};D.w(tg,{PJ:"models"},function(){return this.eA.j});D.defineProperty(tg,{isEnabled:"isEnabled"},function(){return this.rf},function(a){this.rf=a});D.w(tg,{pH:"transactionToUndo"},function(){return 0<=this.Kj&&this.Kj<=this.history.count-1?this.history.fa(this.Kj):null}); D.w(tg,{oH:"transactionToRedo"},function(){return this.Kjb.Sh||(b.scale=a))};qa.prototype.canDecreaseZoom=function(a){void 0===a&&(a=1/this.$y);D.p(a,qa,"canDecreaseZoom:factor");var b=this.g;if(null===b||b.jm!==Vh)return!1;a*=b.scale;return ab.Sh?!1:b.Ax}; qa.prototype.increaseZoom=function(a){void 0===a&&(a=this.$y);D.p(a,qa,"increaseZoom:factor");var b=this.g;null!==b&&b.jm===Vh&&(a*=b.scale,ab.Sh||(b.scale=a))};qa.prototype.canIncreaseZoom=function(a){void 0===a&&(a=this.$y);D.p(a,qa,"canIncreaseZoom:factor");var b=this.g;if(null===b||b.jm!==Vh)return!1;a*=b.scale;return ab.Sh?!1:b.Ax};qa.prototype.resetZoom=function(a){void 0===a&&(a=this.Jx);D.p(a,qa,"resetZoom:newscale");var b=this.g;null===b||ab.Sh||(b.scale=a)}; qa.prototype.canResetZoom=function(a){void 0===a&&(a=this.Jx);D.p(a,qa,"canResetZoom:newscale");var b=this.g;return null===b||ab.Sh?!1:b.Ax};qa.prototype.zoomToFit=function(){var a=this.g;if(null!==a){var b=a.scale,c=a.position;b===this.DA&&!isNaN(this.aA)&&a.hd.O(this.CA)?(a.scale=this.aA,a.position=this.ND,this.DA=NaN,this.CA=Ld):(this.aA=b,this.ND=c.copy(),a.zoomToFit(),this.DA=a.scale,this.CA=a.hd.copy())}};qa.prototype.canZoomToFit=function(){var a=this.g;return null===a?!1:a.Ax}; qa.prototype.scrollToPart=function(a){void 0===a&&(a=null);null!==a&&D.l(a,F,qa,"part");var b=this.g;if(null!==b){if(null===a){try{null!==this.uj&&(this.uj.next()?a=this.uj.value:this.uj=null)}catch(c){this.uj=null}null===a&&(0e||Math.abs(b.y-a.y)>d};D.w(Zg,{g:"diagram"},function(){return this.ca});D.defineProperty(Zg,{name:"name"},function(){return this.$b},function(a){D.h(a,"string",Zg,"name");this.$b=a}); D.defineProperty(Zg,{isEnabled:"isEnabled"},function(){return this.rf},function(a){D.h(a,"boolean",Zg,"isEnabled");this.rf=a});D.defineProperty(Zg,{wa:"isActive"},function(){return this.zD},function(a){D.h(a,"boolean",Zg,"isActive");this.zD=a});D.defineProperty(Zg,{Tf:"transactionResult"},function(){return this.HE},function(a){null!==a&&D.h(a,"string",Zg,"transactionResult");this.HE=a}); function Uh(){Zg.call(this);0e&&(e=k),l>g&&(g=l))}}Infinity===c?b.n(0,0,0,0):b.n(c,d,e-c,g-d)} function Oi(a,b){if(null===a.lc){var c=a.g;if(!(null===c||b&&(c.rb||c.Lf))&&null!==a.hc){var d=c.na;d.isEnabled&&d.gG?null!==d.Fj&&0c.ta)){var d=a.g;if(null!==d&&!d.rb){var e=a.sj;if(null!==e){var g=null,h=null;null===c.aa&&(g=Yi(a,c.m(0),!1),null!==g&&(h=g.Y));var k=null,l=null;null===c.ba&&(k=Yi(a,c.m(c.ta-1),!0),null!==k&&(l=k.Y));e.isValidLink(h,g,l,k)?b?(c.gq=c.m(0),c.hq=c.m(c.ta-1),c.Mi=!1,c.aa=h,null!==g&&(c.hg=g.wd),c.ba=l,null!==k&&(c.kh=k.wd),c.Ac!==a.Gw&&d.Ja("LinkRelinked",c,a.Gw),c.ad!==a.Hw&&d.Ja("LinkRelinked",c,a.Hw)):Zi(e,h,g,l,k):Zi(e,null,null,null,null)}}}} Uh.prototype.doDragOver=function(){}; function $i(a,b){var c=a.g;if(null!==c){a.Hj&&Vi(a,!0);Ei(a);var d=Wi(c,b,null,function(b){return!Ti(a,b)}),e=c.U;e.Oe=d;if(null!==d){e.Bc=!1;for(var g=d;null!==g;){var h=g.AB;if(null!==h&&(h(e,g),e.Bc))break;g=Xi(g)}}else g=c.AB,null!==g&&g(e);if(a.wa||null!==di){for(e=(a.lc||a.hc).j;e.next();)g=e.key,g instanceof G&&g.Ld.each(function(a){a.Mi=!1});a.doDropOnto(b,d);if(a.wa||null!==di){d=D.Rf();for(e=c.selection.j;e.next();)g=e.value,g instanceof G&&aj(c,g.getAvoidableRect(d));D.Lb(d)}}}} function aj(a,b){var c=!1;a.vb.Tk(b)&&(c=!0);c=a.$A(b,function(a){return a.Y},function(a){return a instanceof J},!0,function(a){return a instanceof J},c);if(0!==c.count)for(c=c.j;c.next();){var d=c.value;d.Mj&&d.ec()}}Uh.prototype.doDropOnto=function(){}; Uh.prototype.doMouseMove=function(){if(this.wa){var a=this.g;null!==a&&null!==this.Mn&&null!==this.hc&&(this.mayCopy()?(a.mc="copy",Oi(this,!1),ci(this,this.lc),Pi(this,this.lc,!1),Fi(this,this.lc)):this.mayMove()?(a.mc="default",Ii(this),Pi(this,this.hc,!0)):this.mayDragOut()?(a.mc="no-drop",Oi(this,!1),Pi(this,this.lc,!1)):Ii(this),Ui(this,a.U.ha))}}; Uh.prototype.doMouseUp=function(){if(this.wa){var a=this.g;if(null!==a){var b=!1,c=this.mayCopy();c&&null!==this.lc?(Ii(this),Oi(this,!0),ci(this,this.lc),Pi(this,this.lc,!1),Fi(this,this.lc),null!==this.lc&&a.WG(this.lc.ak())):(b=!0,Ii(this),this.mayMove()&&(Pi(this,this.hc,!0),Ui(this,a.U.ha)));this.Sr=!0;$i(this,a.U.ha);if(this.wa){this.lc=null;if(b&&null!==this.hc)for(b=this.hc.j;b.next();){var d=b.key;d instanceof G&&(d=d.Ka,null===d||null===d.placeholder||this.hc.contains(d)||d.placeholder.K())}a.Nc(); Fi(this,this.hc);this.Tf=c?"Copy":"Move";a.Ja(c?"SelectionCopied":"SelectionMoved",a.selection)}this.stopTool()}}};Uh.prototype.mayCopy=function(){if(!this.dG)return!1;var a=this.g;if(null===a||a.rb||a.Lf||!a.Xp||!a.Qk||(D.Rh?!a.U.alt:!a.U.control))return!1;for(a=a.selection.j;a.next();){var b=a.value;if(b.pe()&&b.canCopy())return!0}return null!==this.ud&&this.Hj&&this.ud.canCopy()?!0:!1}; Uh.prototype.mayDragOut=function(){if(!this.dG)return!1;var a=this.g;if(null===a||!a.au||!a.Qk||a.gm)return!1;for(a=a.selection.j;a.next();){var b=a.value;if(b.pe()&&b.canCopy())return!0}return null!==this.ud&&this.Hj&&this.ud.canCopy()?!0:!1};Uh.prototype.mayMove=function(){var a=this.g;if(null===a||a.rb||!a.gm)return!1;for(a=a.selection.j;a.next();){var b=a.value;if(b.pe()&&b.canMove())return!0}return null!==this.ud&&this.Hj&&this.ud.canMove()?!0:!1};var Gi=new K(Uh),di=null,ei=null; Uh.prototype.getDraggingSource=function(){return di};Uh.prototype.mayDragIn=function(){var a=this.g;if(null===a||!a.VE||a.rb||a.Lf||!a.Xp)return!1;var b=di;return null===b||null===b.g||b.g.ea.om!==a.ea.om?!1:!0};Uh.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.g;a.Ra.Zh();bj(a);a.Ra.Zh();a=di;null!==a&&null!==a.g&&(a.g.mc="copy")}};Uh.prototype.doSimulatedDragLeave=function(){var a=di;null!==a&&a.doSimulatedDragOut();this.doCancel()}; Uh.prototype.doSimulatedDragOver=function(){var a=this.g;if(null!==a){var b=di;null!==b&&null!==b.hc&&this.mayDragIn()&&(a.mc="copy",cj(this,b.hc.ak(),!1),Pi(this,this.lc,!1),Ui(this,a.U.ha))}}; Uh.prototype.doSimulatedDrop=function(){var a=this.g;if(null!==a){var b=di;if(null!==b){var c=b.g;b.Sr=!0;Ii(this);this.mayDragIn()&&(this.Nb("Drop"),cj(this,b.hc.ak(),!0),Pi(this,this.lc,!1),null!==this.lc&&a.WG(this.lc.ak()),$i(this,a.U.ha),a.Nc(),b=a.selection,null!==this.lc?this.Tf="ExternalCopy":b=new L(F),this.lc=null,a.doFocus(),a.Ja("ExternalObjectsDropped",b,c),this.ll())}}}; function cj(a,b,c){if(null===a.lc){var d=a.g;if(null!==d&&!d.rb&&!d.Lf){d.lb=!c;d.er=!c;a.kl=d.U.ha;c=d.fq(b,d,!0);var e=D.Rf();Ni(b,e);var d=e.x+e.width/2,g=e.y+e.height/2;D.Lb(e);var e=a.ex,h=new oa(F),k=D.P();for(b=b.j;b.next();){var l=b.value,m=c.oa(l);l.pe()&&l.canCopy()?(l=l.location,k.n(e.x-(d-l.x),e.y-(g-l.y)),m.location=k,m.Te(),h.add(m,hi(a,k))):l instanceof J&&l.canCopy()&&(m.hl(e.x-d,e.y-g),h.add(m,hi(a)))}D.A(k);a.lc=h;bi(a,h.ak());null!==a.ud&&(c=a.ud,d=c.ro,c.hl(a.kl.x-(d.x+d.width/ 2),a.kl.y-(d.y+d.height/2)))}}}Uh.prototype.doSimulatedDragOut=function(){var a=this.g;null!==a&&(this.mayCopy()||this.mayMove()?a.mc="":a.mc="no-drop")};function qi(a){this.point=a;this.bH=Kd}D.ka("DraggingInfo",qi);function Qi(a,b,c){this.Yc=a;this.info=b;this.ZI=c} function dj(){0=d&&(d=.1);for(var e=this,g=b.Pn(c,d,function(b){return e.findValidLinkablePort(b,a)},null,!0),d=Infinity,b=null,g=g.j;g.next();){var h=g.value,k=h.Y;if(k instanceof G){var l=h.fb(mc,D.P()),m=c.x-l.x,n=c.y-l.y;D.A(l);l=m*m+n*n;lc){if(null!==this.tc&&a===this.dh&&b===this.eh)return!0;var d=b.wd;null===d&&(d="");if(a.Rx(d).count>=c)return!1}return!0}; dj.prototype.isValidTo=function(a,b){if(null===a||null===b)return this.yq;if(null!==this.g&&this.g.eb===this&&(null!==a.layer&&!a.layer.bu||!0!==b.kH))return!1;var c=b.CK;if(Infinity>c){if(null!==this.tc&&a===this.fh&&b===this.gh)return!0;var d=b.wd;null===d&&(d="");if(a.Yg(d).count>=c)return!1}return!0};dj.prototype.isInSameNode=function(a,b){if(null===a||null===b)return!1;if(a===b)return!0;var c=a.Y,d=b.Y;return null!==c&&c===d}; dj.prototype.isLinked=function(a,b){if(null===a||null===b)return!1;var c=a.Y;if(!(c instanceof G))return!1;var d=a.wd;null===d&&(d="");var e=b.Y;if(!(e instanceof G))return!1;var g=b.wd;null===g&&(g="");for(e=e.Yg(g);e.next();)if(g=e.value,g.aa===c&&g.hg===d)return!0;return!1}; dj.prototype.isValidLink=function(a,b,c,d){if(!this.isValidFrom(a,b)||!this.isValidTo(c,d)||!(null===b||null===d||(b.OI&&d.BK||!this.isInSameNode(b,d))&&(b.NI&&d.AK||!this.isLinked(b,d)))||null!==this.tc&&(null!==a&&this.isLabelDependentOnLink(a,this.tc)||null!==c&&this.isLabelDependentOnLink(c,this.tc))||null!==a&&null!==c&&(null===a.data&&null!==c.data||null!==a.data&&null===c.data)||!this.isValidCycle(a,c,this.tc))return!1;if(null!==a){var e=a.sy;if(null!==e&&!e(a,b,c,d,this.tc))return!1}if(null!== c&&(e=c.sy,null!==e&&!e(a,b,c,d,this.tc)))return!1;e=this.sy;return null!==e?e(a,b,c,d,this.tc):!0};dj.prototype.isLabelDependentOnLink=function(a,b){if(null===a)return!1;var c=a.Xb;if(null===c)return!1;if(c===b)return!0;var d=new L(G);d.add(a);return ej(this,c,b,d)};function ej(a,b,c,d){if(b===c)return!0;var e=b.aa;if(null!==e&&e.Kf&&(d.add(e),ej(a,e.Xb,c,d)))return!0;b=b.ba;return null!==b&&b.Kf&&(d.add(b),ej(a,b.Xb,c,d))?!0:!1} dj.prototype.isValidCycle=function(a,b,c){void 0===c&&(c=null);if(null===a||null===b)return this.yq;var d=null!==this.g?this.g.IK:fj;if(d!==fj){if(d===gj){if(null!==c&&!c.Xc)return!0;for(d=b.Ld;d.next();){var e=d.value;if(e!==c&&e.Xc&&e.ba===b)return!1}return!hj(this,a,b,c,!0)}if(d===ij){if(null!==c&&!c.Xc)return!0;for(d=a.Ld;d.next();)if(e=d.value,e!==c&&e.Xc&&e.aa===a)return!1;return!hj(this,a,b,c,!0)}if(d===jj)return a===b?a=!0:(d=new L(G),d.add(b),a=kj(this,d,a,b,c)),!a;if(d===lj)return!hj(this, a,b,c,!1);if(d===mj)return a===b?a=!0:(d=new L(G),d.add(b),a=nj(this,d,a,b,c)),!a}return!0};function hj(a,b,c,d,e){if(b===c)return!0;if(null===b||null===c)return!1;for(var g=b.Ld;g.next();){var h=g.value;if(h!==d&&(!e||h.Xc)&&h.ba===b&&(h=h.aa,h!==b&&hj(a,h,c,d,e)))return!0}return!1}function kj(a,b,c,d,e){if(c===d)return!0;if(null===c||null===d||b.contains(c))return!1;b.add(c);for(var g=c.Ld;g.next();){var h=g.value;if(h!==e&&h.ba===c&&(h=h.aa,h!==c&&kj(a,b,h,d,e)))return!0}return!1} function nj(a,b,c,d,e){if(c===d)return!0;if(null===c||null===d||b.contains(c))return!1;b.add(c);for(var g=c.Ld;g.next();){var h=g.value;if(h!==e){var k=h.aa,h=h.ba,k=k===c?h:k;if(k!==c&&nj(a,b,k,d,e))return!0}}return!1}D.defineProperty(dj,{sy:"linkValidation"},function(){return this.Ql},function(a){null!==a&&D.h(a,"function",dj,"linkValidation");this.Ql=a});D.defineProperty(dj,{Ey:"portTargeted"},function(){return this.iE},function(a){null!==a&&D.h(a,"function",dj,"portTargeted");this.iE=a}); function ra(){0b.qu+1&&c=c.x)d=0>=c.y?d+225:1<=c.y?d+135:d+180;else if(1<=c.x)0>=c.y?d+=315:1<=c.y&&(d+=45);else if(0>=c.y)d+=270;else if(1<=c.y)d+=90;else break a;0>d?d+=360:360<=d&&(d-=360);a.cursor=22.5>d?"e-resize":67.5>d?"se-resize":112.5>d?"s-resize":157.5>d?"sw-resize":202.5>d?"w-resize":247.5>d?"nw-resize":292.5>d?"n-resize":337.5>d? "ne-resize":"e-resize"}else if(a instanceof x)for(c=a.elements;c.next();)this.updateResizeHandles(c.value,b)};D.defineProperty(Vj,{Au:"handleArchetype"},function(){return this.Gl},function(a){null!==a&&D.l(a,P,Vj,"handleArchetype");this.Gl=a});D.w(Vj,{handle:"handle"},function(){return this.pc});D.defineProperty(Vj,{Bb:"adornedObject"},function(){return this.Rc},function(a){null!==a&&D.l(a,P,Vj,"adornedObject");this.Rc=a}); Vj.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.g;return null!==a&&!a.rb&&a.cu&&a.U.left?null!==this.findToolHandleAt(a.Mc.ha,this.name):!1}; Vj.prototype.doActivate=function(){var a=this.g;null!==a&&(this.pc=this.findToolHandleAt(a.Mc.ha,this.name),null!==this.pc&&(this.Rc=this.pc.Y.Bb,this.Ap.set(this.Bb.fb(this.handle.alignment.AG())),this.eE.set(this.Rc.Y.location),this.$D.set(this.Rc.Ea),this.Mz=this.computeCellSize(),this.Oz=this.computeMinSize(),this.Nz=this.computeMaxSize(),a.of=!0,this.XD=a.Ra.isEnabled,a.Ra.isEnabled=!1,this.Nb(this.name),this.wa=!0))}; Vj.prototype.doDeactivate=function(){var a=this.g;null!==a&&(this.ll(),this.Rc=this.pc=null,this.wa=a.of=!1,a.Ra.isEnabled=this.XD)};Vj.prototype.doCancel=function(){null!==this.Bb&&(this.Bb.Ea=this.BG,this.Bb.Y.location=this.WJ);this.stopTool()};Vj.prototype.doMouseMove=function(){var a=this.g;if(this.wa&&null!==a){var b=this.Oz,c=this.Nz,d=this.Mz,e=this.Bb.MF(a.U.ha,D.P()),g=this.computeReshape(),b=this.computeResize(e,this.handle.alignment,b,c,d,g);this.resize(b);a.lg();D.A(e)}}; Vj.prototype.doMouseUp=function(){var a=this.g;if(this.wa&&null!==a){var b=this.Oz,c=this.Nz,d=this.Mz,e=this.Bb.MF(a.U.ha,D.P()),g=this.computeReshape(),b=this.computeResize(e,this.handle.alignment,b,c,d,g);this.resize(b);D.A(e);a.Nc();this.Tf=this.name;a.Ja("PartResized",this.Bb,this.BG)}this.stopTool()}; Vj.prototype.resize=function(a){var b=this.g;if(null!==b){var c=this.Bb,d=c.Y;c.Ea=a.size;d.Te();a=this.Bb.fb(this.handle.alignment.AG());d instanceof I?(c=new K(F),c.add(d),b.moveParts(c,this.Ap.copy().Zj(a),!0)):d.location=d.location.copy().Zj(a).add(this.Ap)}}; Vj.prototype.computeResize=function(a,b,c,d,e,g){b.ce()&&(b=mc);var h=this.Bb.Ga,k=h.x,l=h.y,m=h.x+h.width,n=h.y+h.height,p=1;if(!g){var p=h.width,q=h.height;0>=p&&(p=1);0>=q&&(q=1);p=q/p}q=D.P();jb(a.x,a.y,k,l,e.width,e.height,q);a=h.copy();0>=b.x?0>=b.y?(a.x=Math.max(q.x,m-d.width),a.x=Math.min(a.x,m-c.width),a.width=Math.max(m-a.x,c.width),a.y=Math.max(q.y,n-d.height),a.y=Math.min(a.y,n-c.height),a.height=Math.max(n-a.y,c.height),g||(b=a.height/a.width,p=b.y?(a.width=Math.max(Math.min(q.x-k,d.width),c.width),a.y=Math.max(q.y,n-d.height),a.y=Math.min(a.y,n-c.height), a.height=Math.max(n-a.y,c.height),g||(b=a.height/a.width,p=b.y?(a.y=Math.max(q.y,n-d.height),a.y=Math.min(a.y,n-c.height),a.height=n-a.y,g||(a.width=a.height/p,a.x= k+.5*(m-k-a.width))):1<=b.y&&(a.height=Math.max(Math.min(q.y-l,d.height),c.height),g||(a.width=a.height/p,a.x=k+.5*(m-k-a.width)));D.A(q);return a};Vj.prototype.computeReshape=function(){var a=Yj;this.Bb instanceof z&&(a=Zj(this.Bb));return!(a===ak||a===bk||null!==this.g&&this.g.U.shift)};Vj.prototype.computeMinSize=function(){var a=this.Bb.ah.copy(),b=this.ah;!isNaN(b.width)&&b.width>a.width&&(a.width=b.width);!isNaN(b.height)&&b.height>a.height&&(a.height=b.height);return a}; Vj.prototype.computeMaxSize=function(){var a=this.Bb.pf.copy(),b=this.pf;!isNaN(b.width)&&b.widtha&&(a+=360));var b=Math.min(Math.abs(this.tK),180),c=Math.min(Math.abs(this.sK),b/2);(null===this.g||!this.g.U.shift)&&0b-c&&(a=(Math.floor(a/b)+1)*b));360<=a?a-=360:0>a&&(a+=360);return a};D.defineProperty(ck,{tK:"snapAngleMultiple"},function(){return this.pE},function(a){D.h(a,"number",ck,"snapAngleMultiple");this.pE=a}); D.defineProperty(ck,{sK:"snapAngleEpsilon"},function(){return this.oE},function(a){D.h(a,"number",ck,"snapAngleEpsilon");this.oE=a});D.w(ck,{nM:"originalAngle"},function(){return this.Iw});function ek(){Zg.call(this);0e.right&&(c.x-=d.width+5);c.xe.bottom&&(c.y-=d.height+5);c.ya.U.Ee?!1:!0};pk.prototype.doStart=function(){this.wa||null===this.jh||this.doActivate()}; pk.prototype.doActivate=function(){if(!this.wa){var a=this.g;if(null!==a){var b=this.jh;null===b&&(b=a.Je(a.U.ha));if(null!==b&&b instanceof pa&&(this.jh=b,null!==b.Y)){this.wa=!0;this.Za=yk;var c=this.vI;null!==b.jH&&(c=b.jH);this.Ik=this.jh.copy();var d=new C(this.jh.fb(ec),this.jh.fb(vc));a.TG(d);if(c instanceof gk)c.show(b,a,this);else{c.style.position="absolute";c.style.zIndex="100";c.textEditingTool=this;if("function"===typeof c.onActivate)c.onActivate();a.Gj.appendChild(c);"function"===typeof c.focus&& c.focus();"function"===typeof c.select&&this.Qy&&(c.select(),c.setSelectionRange(0,9999))}this.Ej=c}}}};pk.prototype.doCancel=function(){null!==this.Ys&&this.Ej instanceof HTMLElement&&(this.Ej.style.border=this.Ys,this.Ys=null);this.stopTool()};pk.prototype.doMouseUp=function(){!this.wa&&this.canStart()&&this.doActivate()};pk.prototype.doMouseDown=function(){this.wa&&this.acceptText(uk)}; pk.prototype.acceptText=function(a){switch(a){case uk:if(this.Za===Ck)this.Ej instanceof HTMLElement&&this.Ej.focus();else if(this.Za===yk||this.Za===Bk||this.Za===zk)this.Za=Ak,Fk(this);break;case tk:case wk:case vk:if(wk===a&&!0===this.vA.ky)break;if(this.Za===yk||this.Za===Bk||this.Za===zk)this.Za=Ak,Fk(this)}}; function Fk(a){var b=a.jh,c=a.g,d=a.Ej;if(null!==b&&null!==d){var e=b.text,g="";d instanceof gk?null!==d.sC&&(g=d.sC()):(g=d.value,g="function"===typeof g?g():g);a.isValidText(b,e,g)?(a.Nb(a.name),a.Za=Ck,a.Tf=a.name,b.text=g,null!==b.iH&&b.iH(b,e,g),null!==c&&c.Ja("TextEdited",b,e),a.ll(),a.stopTool(),null!==c&&c.doFocus()):(a.Za=Bk,null!==b.ZA&&b.ZA(a,e,g),d instanceof gk?d.show(b,c,a):(null===a.Ys&&(a.Ys=d.style.border,d.style.border="3px solid red"),"function"===typeof d.focus&&d.focus()))}} pk.prototype.doDeactivate=function(){var a=this.g;if(null!==a){this.Za=rk;this.jh=null;if(null!==this.Ej){var b=this.Ej;if(b instanceof gk)b.Wn(a,this);else{if("function"===typeof b.onDeactivate)b.onDeactivate();null!==b&&a.Gj.removeChild(b)}}this.wa=!1}};pk.prototype.doFocus=function(){v&&D.On("TextEditingTool.doFocus","2.0");Dk(this)};pk.prototype.doBlur=function(){v&&D.On("TextEditingTool.doBlur","2.0");Ek(this)}; function Dk(a){if(null!==a.Ej&&a.state!==rk){var b=a.Bz;a.Za===yk&&(a.Za=zk);"function"===typeof b.select&&a.Qy&&(b.select(),b.setSelectionRange(0,9999))}}function Ek(a){if(null!==a.Ej&&a.state!==rk){var b=a.Bz;"function"===typeof b.focus&&b.focus();"function"===typeof b.select&&a.Qy&&(b.select(),b.setSelectionRange(0,9999))}}pk.prototype.isValidText=function(a,b,c){D.l(a,pa,pk,"isValidText:textblock");var d=this.hC;if(null!==d&&!d(a,b,c))return!1;d=a.hC;return null===d||d(a,b,c)?!0:!1}; D.defineProperty(pk,{hC:"textValidation"},function(){return this.$l},function(a){null!==a&&D.h(a,"function",pk,"textValidation");this.$l=a});D.defineProperty(pk,{vG:"minimumEditorScale"},function(){return this.SD},function(a){null!==a&&D.h(a,"number",pk,"minimumEditorScale");this.SD=a});D.defineProperty(pk,{Qy:"selectsTextOnActivate"},function(){return this.mE},function(a){null!==a&&D.h(a,"boolean",pk,"selectsTextOnActivate");this.mE=a}); D.defineProperty(pk,{state:"state"},function(){return this.Za},function(a){this.Za!==a&&(D.Da(a,pk,pk,"starting"),this.Za=a)});pk.prototype.measureTemporaryTextBlock=pk.prototype.KJ=function(a){var b=this.Ik;b.text=a;Gk(b,this.jh.qp,Infinity);return b};function Ph(){Zg.call(this);this.name="ToolManager";this.FH=new K(Zg);this.GH=new K(Zg);this.HH=new K(Zg);this.wD=this.xD=850;this.lD=(new Ca(2,2)).Oa();this.FE=5E3;this.WD=ai;this.uD=Hk;this.Rv=this.$C=null;this.yn=-1}D.Ta(Ph,Zg); D.ka("ToolManager",Ph);var ai;Ph.WheelScroll=ai=D.s(Ph,"WheelScroll",0);var $h;Ph.WheelZoom=$h=D.s(Ph,"WheelZoom",1);Ph.WheelNone=D.s(Ph,"WheelNone",2);var Hk;Ph.GestureZoom=Hk=D.s(Ph,"GestureZoom",3);var Ik;Ph.GestureCancel=Ik=D.s(Ph,"GestureCancel",4);var Vk;Ph.GestureNone=Vk=D.s(Ph,"GestureNone",5);D.defineProperty(Ph,{Vu:"mouseWheelBehavior"},function(){return this.WD},function(a){D.Da(a,Ph,Ph,"mouseWheelBehavior");this.WD=a}); D.defineProperty(Ph,{pq:"gestureBehavior"},function(){return this.uD},function(a){D.Da(a,Ph,Ph,"gestureBehavior");this.uD=a});Ph.prototype.initializeStandardTools=function(){this.RH=new fk;this.EG=new fi;this.CJ=new Oj;this.QG=new Vj;this.iK=new ck;this.rG=new ra;this.Ge=new Uh;this.zI=new nk;this.XJ=new ok;this.NA=new ik;this.gC=new pk;this.eI=new ta;this.fI=new ek}; Ph.prototype.updateAdornments=function(a){var b=this.nm;if(b instanceof da&&this.Rv===a){var c=b.Bb;(null!==a?c.Y===a:null===c)?this.showToolTip(b,c):this.hideToolTip()}}; Ph.prototype.doMouseDown=function(){var a=this.g;if(null!==a){var b=a.U;b.Pj&&this.pq===Ik&&(b.bubbles=!1);if(b.Ju){this.cancelWaitAfter();if(this.pq===Vk){b.bubbles=!0;return}if(this.pq===Ik)return;if(a.eb.canStartMultiTouch()){a.eb.standardPinchZoomStart();return}}var c=a.na;c.IA&&0!==c.Ni&&D.trace("WARNING: In ToolManager.doMouseDown: UndoManager.transactionLevel is not zero");for(var c=this.qf.length,d=0;de.right&&(c.x-=d.width+5);c.xe.bottom?c.y-(d.height+5):c.y+20;c.ya?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b}D.w(kh,{jL:"animationReasons"},function(){return this.Ev}); kh.prototype.canStart=function(){return!0};kh.prototype.prepareAutomaticAnimation=kh.prototype.oo=function(a){this.rf&&(this.Ll||this.ca.Zn)&&(this.Ev.add(a),this.canStart(a)&&(this.sk&&this.Zh(),this.xc=!0))};function dl(a){if(a.rf&&(a.Ev.clear(),a.xc))if(!a.Go)a.xc=!1;else if(0===a.Mm){var b=+new Date;a.Mm=b;requestAnimationFrame(function(){if(!1!==a.xc&&!a.sk&&a.Mm===b){var c=a.ca;c.Jj("temporaryPixelRatio")&&(c.Hk=1);el(c);a.xc=!1;c.Ja("AnimationStarting");fl(a,b)}})}} function gl(a,b,c,d,e,g){if(a.xc&&(v&&D.l(b,P,kh,"addPropToAnimation:obj"),!("position"===c&&d.O(e)||b instanceof F&&!b.bG))){var h=a.jn;if(h.contains(b)){var h=h.oa(b),k=h.start,l=h.end;void 0===k[c]&&(k[c]=hl(d));h.Gx&&void 0!==l[c]?h.mu[c]=hl(e):(g||(h.mu[c]=hl(e)),l[c]=hl(e));g&&0===c.indexOf("position:")&&b instanceof F&&(h.mu.location=hl(b.location))}else k=new ma,l=new ma,k[c]=hl(d),l[c]=hl(e),d=l,e=k.position,e instanceof N&&!e.F()&&a.Ev.contains("Expand SubGraph")&&e.assign(d.position),k= new cl(k,l,g),g&&0===c.indexOf("position:")&&b instanceof F&&(k.mu.location=hl(b.location)),h.add(b,k);a.Go=!0}}function hl(a){return a instanceof N?a.copy():a instanceof Ca?a.copy():a} function fl(a,b){var c;function d(){if(!1!==g.sk&&g.Mm===b){var a=+new Date,c=a>s?m:a-r;il(g);jl(g,e,q,h,c,m);g.Ov&&g.Ov();bj(e);kl(g);a>s?ll(g):requestAnimationFrame(d)}}void 0===c&&(c=new ma);var e=a.ca;if(null!==e){var g=a,h=c.OL||a.aD,k=c.lM||null,l=c.mM||null,m=c.duration||a.Jz,n=a.IH;for(c=a.jn.j;c.next();){var p=c.value.start.position;p instanceof N&&(p.F()||p.assign(n))}a.WC=h;a.Ov=k;a.Pv=l;a.VC=m;a.Qv=a.jn;var q=a.Qv;for(c=q.j;c.next();)k=c.value.end,k["position:placeholder"]&&(l=c.key.findVisibleNode(), l instanceof I&&null!==l.placeholder&&(l=l.placeholder,n=l.fb(ec),n.x+=l.padding.left,n.y+=l.padding.top,k["position:placeholder"]=n));a.sk=!0;il(a);jl(a,e,q,h,0,m);bj(a.ca);kl(a);var r=+new Date,s=r+m;g.Mm===b&&requestAnimationFrame(function(){d()})}}function il(a){if(!a.mp){var b=a.ca;a.IE=b.lb;a.JC=b.Ze;a.KC=b.mv;b.lb=!0;b.Ze=!0;b.mv=!0;a.mp=!0}}function kl(a){var b=a.ca;b.lb=a.IE;b.Ze=a.JC;b.mv=a.KC;a.mp=!1} function jl(a,b,c,d,e,g){for(c=c.j;c.next();){var h=c.key,k=c.value,l=k.start,k=k.end,m;for(m in k)if(("position"!==m||!k["position:placeholder"]&&!k["position:node"])&&void 0!==ml[m])ml[m](h,l[m],k[m],d,e,g)}d=b.pB;b.pB=!0;m=a.aD;0!==a.Nr&&0!==a.Mr&&(c=a.Nr,b.Db=m(e,c,a.Mr-c,g));null!==a.Lr&&null!==a.Kr&&(c=a.Lr,a=a.Kr,b.tb=new N(m(e,c.x,a.x-c.x,g),m(e,c.y,a.y-c.y,g)));b.pB=d} kh.prototype.stopAnimation=kh.prototype.Zh=function(){!0===this.xc&&(this.xc=!1,this.Mm=0,this.Go&&this.ca.Xe());this.sk&&this.rf&&ll(this)}; function ll(a){a.sk=!1;a.Go=!1;il(a);for(var b=a.ca,c=a.WC,d=a.VC,e=a.Qv.j;e.next();){var g=e.key,h=e.value,k=h.start,l=h.end,m=h.mu,n;for(n in l)if(void 0!==ml[n]){var p=n;!h.Gx||"position:node"!==p&&"position:placeholder"!==p||(p="position");ml[p](g,k[n],void 0!==m[n]?m[n]:h.Gx?k[n]:l[n],c,d,d)}h.Gx&&void 0!==m.location&&g instanceof F&&(g.location=m.location);h.Hy&&g instanceof F&&g.Md(!1)}for(c=a.ca.links;c.next();)d=c.value,null!==d.Gp&&(d.points=d.Gp,d.Gp=null);b.ty.clear();b.Hk=null;b.Nc(); b.ra();b.lg();nl(b);kl(a);a.Pv&&a.Pv();a.Mm=0;a.Qv=null;a.Pv=null;a.Ov=null;a.Lr=null;a.Kr=null;a.Nr=0;a.Mr=0;a.jn=new oa(P,cl);b.Ja("AnimationFinished");b.Xe()} function ol(a,b,c){var d=b.Z,e=c.Z,g=null;c instanceof I&&(g=c.placeholder);null!==g?(d=g.fb(ec),d.x+=g.padding.left,d.y+=g.padding.top,gl(a,b,"position",d,b.position,!1)):gl(a,b,"position",new N(e.x+e.width/2-d.width/2,e.y+e.height/2-d.height/2),b.position,!1);gl(a,b,"scale",.01,b.scale,!1);if(b instanceof I)for(b=b.Oc;b.next();)g=b.value,g instanceof G&&ol(a,g,c)} function pl(a,b,c){if(b.isVisible()){var d=null;c instanceof I&&(d=c.placeholder);null!==d?gl(a,b,"position:placeholder",b.position,d,!0):gl(a,b,"position:node",b.position,c,!0);gl(a,b,"scale",b.scale,.01,!0);a.xc&&(d=a.jn,d.contains(b)&&(d.oa(b).Hy=!0));if(b instanceof I)for(b=b.Oc;b.next();)d=b.value,d instanceof G&&pl(a,d,c)}}function ql(a,b,c){a.xc&&(null===a.Lr&&b.F()&&null===a.Kr&&(a.Lr=b.copy()),a.Kr=c.copy(),a.Go=!0)} function rl(a,b,c){a.xc&&a.ca.Zn&&(0===a.Nr&&0===a.Mr&&(a.Nr=b),a.Mr=c,a.Go=!0)}D.defineProperty(kh,{isEnabled:"isEnabled"},function(){return this.rf},function(a){D.h(a,"boolean",kh,"isEnabled");this.rf=a});D.defineProperty(kh,{duration:"duration"},function(){return this.Jz},function(a){D.h(a,"number",kh,"duration");1>a&&D.ua(a,">= 1",kh,"duration");this.Jz=a});D.w(kh,{nf:"isAnimating"},function(){return this.sk});D.w(kh,{uJ:"isTicking"},function(){return this.mp}); D.defineProperty(kh,{hG:"isInitial"},function(){return this.Ll},function(a){D.h(a,"boolean",kh,"isInitial");this.Ll=a});function cl(a,b,c){this.start=a;this.end=b;this.mu=new ma;this.Gx=c;this.Hy=!1} var ml={opacity:function(a,b,c,d,e,g){a.opacity=d(e,b,c-b,g)},position:function(a,b,c,d,e,g){e!==g?a.Uy(d(e,b.x,c.x-b.x,g),d(e,b.y,c.y-b.y,g)):a.position=new N(d(e,b.x,c.x-b.x,g),d(e,b.y,c.y-b.y,g))},"position:node":function(a,b,c,d,e,g){var h=a.Z,k=c.Z;c=k.x+k.width/2-h.width/2;h=k.y+k.height/2-h.height/2;e!==g?a.Uy(d(e,b.x,c-b.x,g),d(e,b.y,h-b.y,g)):a.position=new N(d(e,b.x,c-b.x,g),d(e,b.y,h-b.y,g))},"position:placeholder":function(a,b,c,d,e,g){e!==g?a.Uy(d(e,b.x,c.x-b.x,g),d(e,b.y,c.y-b.y,g)): a.position=new N(d(e,b.x,c.x-b.x,g),d(e,b.y,c.y-b.y,g))},scale:function(a,b,c,d,e,g){a.scale=d(e,b,c-b,g)},visible:function(a,b,c,d,e,g){a.visible=e!==g?b:c}};function Yg(){0=a)return b;for(var c=0,d=0,e=0,g=0,h=0,k=this.sb.j;k.next();){var l=k.value;l instanceof I?e++:l instanceof G?d++:l instanceof J?g++:l instanceof da?h++:c++}k="";0=d.count)a=d.count;else if(d.fa(a)===b)return-1;d.ae(a,b);b.Bu(c);d=this.g;null!==d&&(c?d.ra():d.sq(b));xl(this,a,b);return a}; f.yf=function(a,b,c){if(!c&&b.layer!==this&&null!==b.layer)return b.layer.yf(a,b,c);var d=this.sb;if(0>a||a>=d.length){if(a=d.indexOf(b),0>a)return-1}else if(d.fa(a)!==b&&(a=d.indexOf(b),0>a))return-1;b.Cu(c);d.nd(a);d=this.g;null!==d&&(c?d.ra():d.yf(b));b.sw=null;return a}; function xl(a,b,c){b=yl(a,b,c);if(c instanceof I&&null!==c&&isNaN(c.Bo)){if(0!==c.Oc.count){for(var d=-1,e=a.sb.o,g=e.length,h=0;hd&&k.Ka===c&&(d=h,0<=b))break}!(0>d)&&d=e)return b;0>b&&(b=a.indexOf(c));if(0>b)return-1;for(var g=b-1,h=NaN;0<=g;){h=a.fa(g).Bo;if(!isNaN(h))break;g--}for(var k=b+1,l=NaN;kd)for(;;){if(-1===g||h<=d){g++;if(g===b)break;a.nd(b);a.ae(g,c);return g}for(h=NaN;0<=--g&&(h=a.fa(g).Bo,isNaN(h)););}else if(!isNaN(l)&&l=d){k--;if(k===b)break;a.nd(b);a.ae(k,c);return k}for(l=NaN;++ka||1parseInt(e[1],10)&&(D.trace("Warning: You have entered a license key for GoJS version 1.7 or later, but this library is version "+D.vfo+". This license key will do nothing until you upgrade to GoJS 1.7 or later."),D.Lx.licenseKey=!0);this.li=1;this.wk=0;this.rw=new N;this.yA=500;this.Fv=new N;this.Dt=null;this.uk=!1;this.preventDefault=this.Gy=this.Hq=this.Iq=this.Gq=this.Fq=this.ko=this.bh=this.lo=this.io=this.jo=this.tC=this.kC=this.lC=this.mC=this.Xl=this.qt= this.Wl=this.pt=null;this.lw=!1;this.Il=new Ll;void 0!==a&&Ml(this,a);this.dd=!1}D.ka("Diagram",E); E.prototype.clear=E.prototype.clear=function(){var a=null;null!==this.Cd&&(a=this.Cd.Y);this.ea.clear();for(var b=this.dc.length,c=0;c=a)return b;for(var c=this.dc.j;c.next();)b+="\n "+c.value.toString(a-1);return b};E.fromDiv=function(a){var b=a;"string"===typeof a&&(b=window.document.getElementById(a));return b instanceof HTMLDivElement&&b.ca instanceof E?b.ca:null}; D.defineProperty(E,{Gj:"div"},function(){return this.Ub},function(a){null!==a&&D.l(a,HTMLDivElement,E,"div");if(this.Ub!==a){Al=[];var b=this.Ub;null!==b?(b.ca=void 0,b.innerHTML="",null!==this.Ib&&(this.Ib.removeEventListener("touchstart",this.mC,!1),this.Ib.removeEventListener("touchmove",this.lC,!1),this.Ib.removeEventListener("touchend",this.kC,!1),this.Ib.Wd.ca=null),b=this.ob,null!==b&&(b.qf.each(function(a){a.cancelWaitAfter()}),b.mg.each(function(a){a.cancelWaitAfter()}),b.ng.each(function(a){a.cancelWaitAfter()})), b.cancelWaitAfter(),this.eb.doCancel(),this.cd=this.Ib=null,window.removeEventListener("resize",this.tC,!1),window.removeEventListener("mousemove",this.jo,!0),window.removeEventListener("mousedown",this.io,!0),window.removeEventListener("mouseup",this.lo,!0),window.removeEventListener("mousewheel",this.bh,!0),window.removeEventListener("DOMMouseScroll",this.bh,!0),window.removeEventListener("mouseout",this.ko,!0)):this.th=!1;this.Ub=null;if(null!==a){if(b=a.ca)b.Gj=null;Ml(this,a);this.qo()}}}); function Pl(a){var b=a.Ib;a.mz?(b.addEventListener("pointerdown",a.Fq,!1),b.addEventListener("pointermove",a.Gq,!1),b.addEventListener("pointerup",a.Iq,!1),b.addEventListener("pointerout",a.Hq,!1)):(b.addEventListener("touchstart",a.mC,!1),b.addEventListener("touchmove",a.lC,!1),b.addEventListener("touchend",a.kC,!1),b.addEventListener("mousemove",a.jo,!1),b.addEventListener("mousedown",a.io,!1),b.addEventListener("mouseup",a.lo,!1),b.addEventListener("mouseout",a.ko,!1));b.addEventListener("mousewheel", a.bh,!1);b.addEventListener("DOMMouseScroll",a.bh,!1);b.addEventListener("keydown",a.wJ,!1);b.addEventListener("keyup",a.xJ,!1);b.addEventListener("selectstart",function(a){a.preventDefault();return!1},!1);b.addEventListener("contextmenu",function(a){a.preventDefault();return!1},!1);b.addEventListener("gesturechange",function(b){a.ob.pq===Ik&&b.preventDefault()},!1);window.addEventListener("resize",a.tC,!1)} E.prototype.computePixelRatio=function(){if(null!==this.Hk)return this.Hk;var a=this.cd;return(window.devicePixelRatio||1)/(a.za.webkitBackingStorePixelRatio||a.za.mozBackingStorePixelRatio||a.za.msBackingStorePixelRatio||a.za.oBackingStorePixelRatio||a.za.backingStorePixelRatio||1)};E.prototype.doMouseMove=function(){this.eb.doMouseMove()};E.prototype.doMouseDown=function(){this.eb.doMouseDown()};E.prototype.doMouseUp=function(){this.eb.doMouseUp()};E.prototype.doMouseWheel=function(){this.eb.doMouseWheel()}; E.prototype.doKeyDown=function(){this.eb.doKeyDown()};E.prototype.doKeyUp=function(){this.eb.doKeyUp()};E.prototype.doFocus=function(){this.focus()};E.prototype.focus=E.prototype.focus=function(){if(this.Ib)if(this.mK)this.Ib.focus();else{var a=window.scrollX||window.pageXOffset,b=window.scrollY||window.pageYOffset;this.Ib.focus();window.scrollTo(a,b)}}; function el(a){if(null!==a.Ib){var b=a.Ub;if(0!==b.clientWidth&&0!==b.clientHeight){var c=a.Hl?a.Ud:0,d=a.qk?a.Ud:0,e=a.sd;a.sd=a.computePixelRatio();a.sd!==e&&(a.js=!0,a.Xe());if(b.clientWidth!==a.Pb+c||b.clientHeight!==a.Tb+d)a.Wm=!0,a.Pe=!0,b=a.Yb,null!==b&&b.my&&a.jm===Vh&&(a.Pr=!0,b.N()),a.je||a.Xe()}}} function Jl(a){var b=new Yg;b.name="Background";a.Wt(b);b=new Yg;b.name="";a.Wt(b);b=new Yg;b.name="Foreground";a.Wt(b);b=new Yg;b.name="Adornment";b.Wc=!0;a.Wt(b);b=new Yg;b.name="Tool";b.Wc=!0;b.cG=!0;a.Wt(b);b=new Yg;b.name="Grid";b.If=!1;b.tg=!1;b.Wc=!0;a.UH(b,a.qm("Background"))} function Ql(a){a.Cd=new x(Rl);a.Cd.name="GRID";var b=new z;b.Kb="LineH";b.stroke="lightgray";b.mb=.5;b.interval=1;a.Cd.add(b);b=new z;b.Kb="LineH";b.stroke="gray";b.mb=.5;b.interval=5;a.Cd.add(b);b=new z;b.Kb="LineH";b.stroke="gray";b.mb=1;b.interval=10;a.Cd.add(b);b=new z;b.Kb="LineV";b.stroke="lightgray";b.mb=.5;b.interval=1;a.Cd.add(b);b=new z;b.Kb="LineV";b.stroke="gray";b.mb=.5;b.interval=5;a.Cd.add(b);b=new z;b.Kb="LineV";b.stroke="gray";b.mb=1;b.interval=10;a.Cd.add(b);b=new F;b.add(a.Cd); b.Mf="Grid";b.Bo=0;b.hy=!1;b.bG=!1;b.tg=!1;b.uy="GRID";a.add(b);a.sb.remove(b);a.Cd.visible=!1}function Sl(){this.ca.isEnabled?this.ca.yI(this):Tl(this.ca)}function Ul(a){this.ca.isEnabled?(this.ca.nA=!0,this.ca.pA=a.target.scrollTop,this.ca.oA=a.target.scrollLeft):Tl(this.ca)} E.prototype.diagramScroll=E.prototype.yI=function(a){if(this.nA&&null!==this.Ib){this.Sw=!0;var b=this.hd,c=this.vb,d=this.Ny,e=b.x-d.left,g=b.y-d.top,h=b.width+d.left+d.right,k=b.height+d.top+d.bottom,l=b.right+d.right,d=b.bottom+d.bottom,m=c.x,b=c.y,n=c.width,p=c.height,q=c.right,r=c.bottom,c=this.scale,s;s=a.scrollLeft;if(this.os)switch(this.lA){case "negative":s=s+a.scrollWidth-a.clientWidth;break;case "reverse":s=a.scrollWidth-s-a.clientWidth}var u=s;nq&&(this.position=s.n(-(this.Ww.scrollWidth-this.Pb)+u-this.Pb/c+l,this.position.y))),a.LH&&this.Be&&(gr&&(this.position=s.n(this.position.x,-(this.Ww.scrollHeight-this.Tb)+a.scrollTop-this.Tb/c+d))),D.A(s),Vl(this), this.Wm=this.Sw=!1,b=this.hd,c=this.vb,l=b.right,q=c.right,d=b.bottom,r=c.bottom,e=b.x,m=c.x,g=b.y,b=c.y,n>=h&&e>=m&&l<=q&&(this.ut.style.width="1px"),p>=k&&g>=b&&d<=r&&(this.ut.style.height="1px"))}};E.prototype.computeBounds=E.prototype.Mh=function(){0c&&(e=c),ea.Sh&&(e=a.Sh),e):b===bm?(e=l>k?(h-a.Ud)/d:(g-a.Ud)/e,e>c&&(e=c),ea.Sh&&(e=a.Sh),e):a.scale}E.prototype.zoomToFit=E.prototype.zoomToFit=function(){this.scale=Yl(this,am)}; E.prototype.zoomToRect=function(a,b){void 0===b&&(b=am);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var e=1;if(b===am||b===bm)if(isNaN(c))e=this.vb.height*this.scale/d;else if(isNaN(d))e=this.vb.width*this.scale/c;else var e=this.Pb,g=this.Tb,e=b===bm?g/d>e/c?(g-(this.qk?this.Ud:0))/d:(e-(this.Hl?this.Ud:0))/c:Math.min(g/d,e/c);this.scale=e;this.position=new N(a.x,a.y)}};D.defineProperty(E,{pB:null},function(){return this.dd},function(a){this.dd=a}); E.prototype.alignDocument=function(a,b){this.rk&&$l(this,this.Mh());var c=this.hd,d=this.vb;this.position=new N(c.x+(a.x*c.width+a.offsetX)-(b.x*d.width-b.offsetX),c.y+(a.y*c.height+a.offsetY)-(b.y*d.height-b.offsetY))}; function Zl(a,b,c,d,e,g,h){var k=b.x,l=b.y;if(h||a.TB===Bl)g.Vc()&&(d>c.width&&(k=c.x+(g.x*c.width+g.offsetX)-(g.x*d-g.offsetX)),e>c.height&&(l=c.y+(g.y*c.height+g.offsetY)-(g.y*e-g.offsetY))),g=a.Ny,h=d-c.width,dc.left?k=c.left:kc.top?l=c.top:lb.targetTouches.length)return;e=b.targetTouches[c]}else if(null!==a.Cp[0])e=a.Cp[c];else return;c=a.Ib;b=a.Pb;a=a.Tb;var g=0,h=0;null!==c&&null!==e&&(c=c.getBoundingClientRect(),g=e.clientX-b/c.width*c.left,h=e.clientY-a/c.height*c.top);d.n(g,h)}E.prototype.invalidateDocumentBounds=E.prototype.Nc=function(){this.rk||(this.rk=!0,this.Xe(!0))};function nl(a){a.je||Si(a);a.rk&&$l(a,a.Mh())} E.prototype.redraw=E.prototype.qo=function(){this.dd||this.je||(this.ra(),hm(this),Vl(this),this.Nc(),this.lg())};E.prototype.isUpdateRequested=function(){return this.cg};E.prototype.delayInitialization=function(a){void 0===a&&(a=null);var b=this.Ra,c=b.isEnabled;b.Zh();b.isEnabled=!1;bj(this);this.th=!1;b.isEnabled=c;null!==a&&D.setTimeout(a,1)}; E.prototype.requestUpdate=E.prototype.Xe=function(a){void 0===a&&(a=!1);if(!0!==this.cg&&!(this.dd||!1===a&&this.je)){this.cg=!0;var b=this;requestAnimationFrame(function(){b.cg&&b.lg()})}};E.prototype.maybeUpdate=E.prototype.lg=function(){if(!this.ap||this.cg)this.ap&&(this.ap=!1),bj(this)};function im(a,b){a.Ra.nf||a.dd||!a.Wm||Tl(a)||(b&&Si(a),Xl(a,!1))} function bj(a){if(!a.je&&(a.cg=!1,null!==a.Ub)){a.je=!0;var b=a.Ra,c=a.iA;if(!b.mp&&0!==c.length){for(var d=c.o,e=d.length,g=0;gb;b++){var c=a.Gg.j;if(null===c||0===a.Gg.count)break;a.Gg=new L(F);a.rC(c,a.Gg);v&&22===b&&D.trace("failure to validate parts")}a.rg.each(function(a){a instanceof I&&0!==(a.Ca&65536)!==!1&&(a.Ca^=65536)})}} E.prototype.rC=function(a,b){for(a.reset();a.next();){var c=a.value;!c.pe()||c instanceof I||(c.zm()?(Gk(c,Infinity,Infinity),c.rc()):b.add(c))}for(a.reset();a.next();)c=a.value,c instanceof I&&c.isVisible()&&Lm(this,c);for(a.reset();a.next();)c=a.value,c instanceof J&&c.isVisible()&&(c.zm()?(Gk(c,Infinity,Infinity),c.rc()):b.add(c));for(a.reset();a.next();)c=a.value,c instanceof da&&c.isVisible()&&(c.zm()?(Gk(c,Infinity,Infinity),c.rc()):b.add(c))}; function Lm(a,b){for(var c=D.nb(),d=D.nb(),e=b.Oc;e.next();){var g=e.value;g.isVisible()&&(g instanceof I?(Mm(g)||Nm(g)||Om(g))&&Lm(a,g):g instanceof J?g.aa===b||g.ba===b?d.push(g):c.push(g):(Gk(g,Infinity,Infinity),g.rc()))}for(var e=c.length,h=0;hm&&(q=t.left,r=t.right),p.height>c&&(s=t.top,u=t.bottom)):(q=t.left,r=t.right,s=t.top,u=t.bottom);var t=p.width+q+r,y=p.height+s+u,q=p.x-q,w=n.x,r=p.right+r,B=n.right+ k,s=p.y-s,A=n.y,u=p.bottom+u,n=n.bottom+l,O="1px",H="1px",p=a.scale,R=!(tB+1&&(O=Math.max((r-B)*p+a.Pb,O)),m+k+1n+1&&(H=Math.max((u-n)*p+a.Tb,H)),c+l+1B+1&&(O=Math.max((r-B)*p+a.Pb,O)),m+1n+1&&(H=Math.max((u-n)*p+k,H)),c+1B+1&&(k=a.position.x*p));if(a.os)switch(a.lA){case "negative":k=-(b.scrollWidth-k-b.clientWidth);break;case "reverse":k=b.scrollWidth-k-b.clientWidth}b.scrollLeft= k;a.kB&&a.Be&&(c+1n+1&&(b.scrollTop=a.position.y*p));h&&(a.js=!0);m=a.Pb;c=a.Tb;b.style.width=m+(a.Hl?a.Ud:0)+"px";b.style.height=c+(a.qk?a.Ud:0)+"px";a.nA=!1;return d!==m||e!==c||a.Ra.xc?(n=a.vb,a.Zu(g,n,p,a.scale,h),!1):!0} E.prototype.add=E.prototype.add=function(a){D.l(a,F,E,"add:part");var b=a.g;if(b!==this){null!==b&&D.k("Cannot add part "+a.toString()+" to "+this.toString()+". It is already a part of "+b.toString());this.er&&(a.Ol="Tool");var c=a.Mf,b=this.qm(c);null===b&&(b=this.qm(""));null===b&&D.k('Cannot add a Part when unable find a Layer named "'+c+'" and there is no default Layer');a.layer!==b&&(c=b.sq(99999999,a,a.g===this),0<=c&&this.md(rg,"parts",b,null,a,null,c),b.Wc||this.Nc(),a.N(Vm),c=a.py,null!== c&&c(a,null,b))}}; E.prototype.sq=function(a){if(a instanceof G){if(this.zp.add(a),a instanceof I){var b=a.Ka;null===b?this.am.add(a):b.gn.add(a);b=a.Yb;null!==b&&(b.g=this)}}else a instanceof J?this.sp.add(a):a instanceof da||this.sb.add(a);var c=this;Wm(a,function(a){Xm(c,a)});(a instanceof da||a instanceof I&&null!==a.Rb)&&a.K();b=a.data;null!==b&&(a instanceof da||(a instanceof J?this.fk.add(b,a):this.Yi.add(b,a)),Wm(a,function(a){Ym(c,a)}));!0!==Nm(a)&&!0!==Om(a)||this.Gg.add(a);Zm(a,!0,this);$m(a)?(a.Z.F()&&this.ra(wl(a, a.Z)),this.Nc()):a.isVisible()&&a.Z.F()&&this.ra(wl(a,a.Z));this.Xe()}; E.prototype.yf=function(a){a.fu();if(a instanceof G){if(this.zp.remove(a),a instanceof I){var b=a.Ka;null===b?this.am.remove(a):b.gn.remove(a);b=a.Yb;null!==b&&(b.g=null)}}else a instanceof J?this.sp.remove(a):a instanceof da||this.sb.remove(a);var c=this;Wm(a,function(a){an(c,a)});b=a.data;null!==b&&(a instanceof da||(a instanceof J?this.fk.remove(b):this.Yi.remove(b)),Wm(a,function(a){bn(c,a)}));this.Gg.remove(a);$m(a)?(a.Z.F()&&this.ra(wl(a,a.Z)),this.Nc()):a.isVisible()&&a.Z.F()&&this.ra(wl(a, a.Z));this.Xe()};E.prototype.remove=E.prototype.remove=function(a){D.l(a,F,E,"remove:part");cn(this,a,!0)};function cn(a,b,c){var d=b.layer;null!==d&&d.g===a&&(b.ib=!1,b.Zg=!1,b.N(dn),c&&b.Nn(),c=d.yf(-1,b,!1),0<=c&&a.md(sg,"parts",d,b,null,c,null),a=b.py,null!==a&&a(b,d,null))} E.prototype.removeParts=E.prototype.PB=function(a,b){if(D.isArray(a))for(var c=D.cb(a),d=0;dd&&this.Nc()}; E.prototype.addLayerAfter=function(a,b){en(this,a,b);a.$c(this);var c=this.dc,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.xe&&this.md(sg,"layers",this,a,null,d,null));for(var e=c.count,g=0;gd&&this.Nc()}; E.prototype.removeLayer=function(a){D.l(a,Yg,E,"removeLayer:layer");a.g!==this&&D.k("Cannot remove a Layer from another Diagram: "+a+" of "+a.g);if(""!==a.name){var b=this.dc,c=b.indexOf(a);if(b.remove(a)){for(b=a.sb.copy().j;b.next();){var d=b.value,e=d.Mf;d.Mf=e!==a.name?e:""}null!==this.xe&&this.md(sg,"layers",this,a,null,c,null);this.ra();this.Nc()}}};E.prototype.findLayer=E.prototype.qm=function(a){for(var b=this.ao;b.next();){var c=b.value;if(c.name===a)return c}return null}; E.prototype.addModelChangedListener=E.prototype.WH=function(a){D.h(a,"function",E,"addModelChangedListener:listener");null===this.yh&&(this.yh=new K("function"));this.yh.add(a);this.ea.Bn(a)};E.prototype.removeModelChangedListener=function(a){D.h(a,"function",E,"removeModelChangedListener:listener");null!==this.yh&&(this.yh.remove(a),0===this.yh.count&&(this.yh=null));this.ea.bv(a)}; E.prototype.addChangedListener=E.prototype.Bn=function(a){D.h(a,"function",E,"addChangedListener:listener");null===this.Ti&&(this.Ti=new K("function"));this.Ti.add(a)};E.prototype.removeChangedListener=E.prototype.bv=function(a){D.h(a,"function",E,"removeChangedListener:listener");null!==this.Ti&&(this.Ti.remove(a),0===this.Ti.count&&(this.Ti=null))}; E.prototype.Bx=function(a){this.lb||this.na.WF(a);a.Lc!==gg&&(this.Ji=!0);if(null!==this.Ti){var b=this.Ti,c=b.length;if(1===c)b=b.fa(0),b(a);else if(0!==c)for(var d=b.oc(),e=0;ea.Sh&&(c=a.Sh);e=D.Fb(a.tb.x+h/b-h/c,a.tb.y+k/b-k/c);a.position=e;D.A(e);a.Db=c;a.Zu(d,a.vb,b,c,!1);a.dd=!1;Xl(a, !1);c=a.Ra;c.xc&&rl(c,b,a.Db);a.ra();hm(a)}} E.prototype.Zu=function(a,b,c,d,e){a.O(b)||(void 0===e&&(e=!1),e||hm(this),Vl(this),d=this.Yb,null===d||!d.my||this.jm!==Vh||e||a.width===b.width&&a.height===b.height||d.N(),d=this.eb,!0===this.uh&&d instanceof Ph&&(this.U.ha=this.oC(this.U.se),Wk(d,this)),this.dd||this.aG(a,b),km(this),this.Hh.scale=c,this.Hh.position.x=a.x,this.Hh.position.y=a.y,this.Hh.bounds.set(a),this.Hh.isScroll=e,this.Ja("ViewportBoundsChanged",this.Hh,a),this.sB&&this.links.each(function(a){a.Mj&&a.Z.jg(b)&&a.ec()}))}; function km(a,b){void 0===b&&(b=null);var c=a.Cd;if(null!==c&&c.visible){for(var d=D.Gm(),e=1,g=1,h=c.xa.o,k=h.length,l=0;ln||(gn(m.Kb)?g=g*n/Te(g,n):e=e*n/Te(e,n))}h=c.Xx;d.n(g*h.width,e*h.height);h=g=l=k=0;if(null!==b)k=b.width,l=b.height,g=b.x,h=b.y;else{e=D.Rf();g=a.vb;e.n(g.x,g.y,g.width,g.height);for(h=a.Lw.j;h.next();)g=h.value.vb,g.F()&&Ub(e,g.x,g.y,g.width,g.height);if(!e.F()){D.Lb(e);return}k=e.width;l=e.height;g=e.x;h=e.y;D.Lb(e)}c.width=k+2*d.width;c.height= l+2*d.height;e=D.P();jb(g,h,0,0,d.width,d.height,e);e.offset(-d.width,-d.height);D.$k(d);c.Y.location=e;D.A(e)}}E.prototype.clearSelection=E.prototype.Dx=function(){var a=0a&&D.ua(a,">= 0",E,"scrollHorizontalLineChange"),this.Tw=a,this.i("scrollHorizontalLineChange",b,a))}); D.defineProperty(E,{hv:"scrollVerticalLineChange"},function(){return this.Xw},function(a){var b=this.Xw;b!==a&&(D.h(a,"number",E,"scrollVerticalLineChange"),0>a&&D.ua(a,">= 0",E,"scrollVerticalLineChange"),this.Xw=a,this.i("scrollVerticalLineChange",b,a))});D.defineProperty(E,{U:"lastInput"},function(){return this.cc},function(a){v&&D.l(a,bg,E,"lastInput");this.cc=a});D.defineProperty(E,{Mc:"firstInput"},function(){return this.cj},function(a){v&&D.l(a,bg,E,"firstInput");this.cj=a}); D.defineProperty(E,{mc:"currentCursor"},function(){return this.Nv},function(a){""===a&&(a=this.Jr);var b=this.Nv;if(b!==a){D.h(a,"string",E,"currentCursor");var c=this.Ib,d=this.Ub;null!==c&&(this.Nv=a,c.style.cursor=a,d.style.cursor=a,c.style.cursor===b&&(c.style.cursor="-webkit-"+a,d.style.cursor="-webkit-"+a,c.style.cursor===b&&(c.style.cursor="-moz-"+a,d.style.cursor="-moz-"+a,c.style.cursor===b&&(c.style.cursor=a,d.style.cursor=a))))}}); D.defineProperty(E,{xL:"defaultCursor"},function(){return this.Jr},function(a){""===a&&(a="auto");var b=this.Jr;b!==a&&(D.h(a,"string",E,"defaultCursor"),this.Jr=a,this.i("defaultCursor",b,a))});D.defineProperty(E,{click:"click"},function(){return this.Ui},function(a){var b=this.Ui;b!==a&&(null!==a&&D.h(a,"function",E,"click"),this.Ui=a,this.i("click",b,a))}); D.defineProperty(E,{ku:"doubleClick"},function(){return this.aj},function(a){var b=this.aj;b!==a&&(null!==a&&D.h(a,"function",E,"doubleClick"),this.aj=a,this.i("doubleClick",b,a))});D.defineProperty(E,{MA:"contextClick"},function(){return this.Wi},function(a){var b=this.Wi;b!==a&&(null!==a&&D.h(a,"function",E,"contextClick"),this.Wi=a,this.i("contextClick",b,a))}); D.defineProperty(E,{DB:"mouseOver"},function(){return this.oj},function(a){var b=this.oj;b!==a&&(null!==a&&D.h(a,"function",E,"mouseOver"),this.oj=a,this.i("mouseOver",b,a))});D.defineProperty(E,{CB:"mouseHover"},function(){return this.nj},function(a){var b=this.nj;b!==a&&(null!==a&&D.h(a,"function",E,"mouseHover"),this.nj=a,this.i("mouseHover",b,a))}); D.defineProperty(E,{BB:"mouseHold"},function(){return this.mj},function(a){var b=this.mj;b!==a&&(null!==a&&D.h(a,"function",E,"mouseHold"),this.mj=a,this.i("mouseHold",b,a))});D.defineProperty(E,{SJ:"mouseDragOver"},function(){return this.Ew},function(a){var b=this.Ew;b!==a&&(null!==a&&D.h(a,"function",E,"mouseDragOver"),this.Ew=a,this.i("mouseDragOver",b,a))}); D.defineProperty(E,{AB:"mouseDrop"},function(){return this.lj},function(a){var b=this.lj;b!==a&&(null!==a&&D.h(a,"function",E,"mouseDrop"),this.lj=a,this.i("mouseDrop",b,a))});D.defineProperty(E,{jC:"toolTip"},function(){return this.wj},function(a){var b=this.wj;b!==a&&(!v||null===a||a instanceof da||a instanceof gk||D.k("Diagram.toolTip must be an Adornment or HTMLInfo."),this.wj=a,this.i("toolTip",b,a))}); D.defineProperty(E,{contextMenu:"contextMenu"},function(){return this.Xi},function(a){var b=this.Xi;b!==a&&(!v||a instanceof da||a instanceof gk||D.k("Diagram.contextMenu must be an Adornment or HTMLInfo."),this.Xi=a,this.i("contextMenu",b,a))});D.defineProperty(E,{yb:"commandHandler"},function(){return this.wz},function(a){var b=this.wz;b!==a&&(D.l(a,qa,E,"commandHandler"),null!==a.g&&D.k("Cannot share CommandHandlers between Diagrams: "+a.toString()),null!==b&&b.$c(null),this.wz=a,a.$c(this))}); D.defineProperty(E,{ob:"toolManager"},function(){return this.wA},function(a){var b=this.wA;b!==a&&(D.l(a,Ph,E,"toolManager"),null!==a.g&&D.k("Cannot share ToolManagers between Diagrams: "+a.toString()),null!==b&&b.$c(null),this.wA=a,a.$c(this))});D.defineProperty(E,{ju:"defaultTool"},function(){return this.Cz},function(a){var b=this.Cz;b!==a&&(D.l(a,Zg,E,"defaultTool"),this.Cz=a,this.eb===b&&(this.eb=a))}); D.defineProperty(E,{eb:"currentTool"},function(){return this.zz},function(a){var b=this.zz;null!==b&&(b.wa&&b.doDeactivate(),b.cancelWaitAfter(),b.doStop());null===a&&(a=this.ju);null!==a&&(D.l(a,Zg,E,"currentTool"),this.zz=a,a.$c(this),a.doStart())});D.w(E,{selection:"selection"},function(){return this.ax}); D.defineProperty(E,{JJ:"maxSelectionCount"},function(){return this.zw},function(a){var b=this.zw;if(b!==a)if(D.h(a,"number",E,"maxSelectionCount"),0<=a&&!isNaN(a)){if(this.zw=a,this.i("maxSelectionCount",b,a),!this.na.jb&&(a=this.selection.count-a,0= 0",E,"maxSelectionCount")}); D.defineProperty(E,{UJ:"nodeSelectionAdornmentTemplate"},function(){return this.Fw},function(a){var b=this.Fw;b!==a&&(D.l(a,da,E,"nodeSelectionAdornmentTemplate"),this.Fw=a,this.i("nodeSelectionAdornmentTemplate",b,a))});D.defineProperty(E,{$I:"groupSelectionAdornmentTemplate"},function(){return this.bw},function(a){var b=this.bw;b!==a&&(D.l(a,da,E,"groupSelectionAdornmentTemplate"),this.bw=a,this.i("groupSelectionAdornmentTemplate",b,a))}); D.defineProperty(E,{DJ:"linkSelectionAdornmentTemplate"},function(){return this.uw},function(a){var b=this.uw;b!==a&&(D.l(a,da,E,"linkSelectionAdornmentTemplate"),this.uw=a,this.i("linkSelectionAdornmentTemplate",b,a))});D.w(E,{wm:"highlighteds"},function(){return this.fw}); D.defineProperty(E,{Ji:"isModified"},function(){var a=this.na;return a.isEnabled?null!==a.Fj?!0:this.lw&&this.sh!==a.Kj:this.lw},function(a){if(this.lw!==a){D.h(a,"boolean",E,"isModified");this.lw=a;var b=this.na;!a&&b.isEnabled&&(this.sh=b.Kj);a||kn(this)}});function kn(a){var b=a.Ji;a.LE!==b&&(a.LE=b,a.Ja("Modified"))} D.defineProperty(E,{ea:"model"},function(){return this.xe},function(a){var b=this.xe;if(b!==a){D.l(a,M,E,"model");this.eb.doCancel();null!==b&&b.na!==a.na&&b.na.gG&&D.k("Do not replace a Diagram.model while a transaction is in progress.");this.Ra.Zh();this.Dx();this.th=!1;this.ap=!0;this.sh=-2;this.cg=!1;var c=this.je;this.je=!0;this.Ra.oo("Model");null!==b&&(null!==this.yh&&this.yh.each(function(a){b.bv(a)}),b.bv(this.UD),b instanceof Y&&ln(this,b.$g),ln(this,b.qg));this.xe=a;a.Bn(this.TD);mn(this, a.qg);a instanceof Y&&nn(this,a.$g);a.bv(this.TD);a.Bn(this.UD);null!==this.yh&&this.yh.each(function(b){a.Bn(b)});this.je=c;this.dd||this.ra();null!==b&&(a.na.isEnabled=b.na.isEnabled)}});D.defineProperty(E,{$a:null},function(){return this.MD},function(a){this.MD=a});D.w(E,{ty:null},function(){return this.EH}); function Fl(a,b){if(b.ea===a.ea){var c=b.Lc,d=b.propertyName;if(c===gg&&"S"===d[0])if("StartingFirstTransaction"===d)c=a.ob,c.qf.each(function(b){b.$c(a)}),c.mg.each(function(b){b.$c(a)}),c.ng.each(function(b){b.$c(a)}),a.je||a.th||(a.Pr=!0,a.ap&&(a.cg=!0));else if("StartingUndo"===d||"StartingRedo"===d){var e=a.Ra;e.nf&&!a.lb&&e.Zh();a.Ja("ChangingSelection")}else"StartedTransaction"===d&&(e=a.Ra,e.nf&&!a.lb&&e.Zh());else if(a.$a){a.$a=!1;try{var g=b.Cf;if(""!==g)if(c===fg){if("linkFromKey"===g){var h= b.object,k=a.gg(h);if(null!==k){var l=b.newValue,m=a.Ue(l);k.aa=m}}else if("linkToKey"===g)h=b.object,k=a.gg(h),null!==k&&(l=b.newValue,m=a.Ue(l),k.ba=m);else if("linkFromPortId"===g){if(h=b.object,k=a.gg(h),null!==k){var n=b.newValue;"string"===typeof n&&(k.hg=n)}}else if("linkToPortId"===g)h=b.object,k=a.gg(h),null!==k&&(n=b.newValue,"string"===typeof n&&(k.kh=n));else if("nodeGroupKey"===g){var h=b.object,p=a.Ph(h);if(null!==p){var q=b.newValue;if(void 0!==q){var r=a.Ue(q);p.Ka=r instanceof I? r:null}else p.Ka=null}}else if("linkLabelKeys"===g){if(h=b.object,k=a.gg(h),null!==k){var s=b.oldValue,u=b.newValue;if(D.isArray(s))for(var t=D.cb(s),y=0;yl)){var m=l;un(k)&&m++;k.yf(m,!0);vn(k,m,l)}}}}function Ym(a,b){var c=b.fj;if(D.isArray(c)){var d=a.Zm.oa(c);if(null===d)d=[],d.push(b),a.Zm.add(c,d);else{for(c=0;cthis.scale&&(this.scale=a)):D.ua(a,"> 0",E,"minScale"))}); D.defineProperty(E,{Sh:"maxScale"},function(){return this.yw},function(a){D.p(a,E,"maxScale");var b=this.yw;b!==a&&(0 0",E,"maxScale"))});D.defineProperty(E,{Jm:"zoomPoint"},function(){return this.qx},function(a){this.qx.O(a)||(D.l(a,N,E,"zoomPoint"),this.qx=a=a.V())}); D.defineProperty(E,{LA:"contentAlignment"},function(){return this.Mo},function(a){var b=this.Mo;b.O(a)||(D.l(a,S,E,"contentAlignment"),this.Mo=a=a.V(),this.i("contentAlignment",b,a),Xl(this,!1))});D.defineProperty(E,{UL:"initialContentAlignment"},function(){return this.gp},function(a){var b=this.gp;b.O(a)||(D.l(a,S,E,"initialContentAlignment"),this.gp=a=a.V(),this.i("initialContentAlignment",b,a))}); D.defineProperty(E,{padding:"padding"},function(){return this.tf},function(a){"number"===typeof a?a=new Lb(a):D.l(a,Lb,E,"padding");var b=this.tf;b.O(a)||(this.tf=a=a.V(),this.Nc(),this.i("padding",b,a))});D.w(E,{rg:"nodes"},function(){return this.zp.j});D.w(E,{links:"links"},function(){return this.sp.j});D.w(E,{Ki:"parts"},function(){return this.sb.j}); E.prototype.findTopLevelNodesAndLinks=function(){for(var a=new L(F),b=this.zp.j;b.next();){var c=b.value;c.xq&&a.add(c)}for(b=this.sp.j;b.next();)c=b.value,c.xq&&a.add(c);return a.j};E.prototype.findTopLevelGroups=function(){return this.am.j};D.defineProperty(E,{Yb:"layout"},function(){return this.ve},function(a){var b=this.ve;b!==a&&(D.l(a,$g,E,"layout"),null!==b&&(b.g=null,b.group=null),this.ve=a,a.g=this,a.group=null,this.yl=!0,this.i("layout",b,a),this.Xe())}); E.prototype.layoutDiagram=function(a){Si(this);a&&An(this,!0);lm(this,!1)};function An(a,b){for(var c=a.am.j;c.next();)In(a,c.value,b);null!==a.Yb&&(b?a.Yb.zf=!1:a.Yb.N())}function In(a,b,c){if(null!==b){for(var d=b.gn.j;d.next();)In(a,d.value,c);null!==b.Yb&&(c?b.Yb.zf=!1:b.Yb.N())}} function lm(a,b){if(a.yl&&!a.Dz){var c=a.$a;a.$a=!0;try{var d=a.na.Ni;0===d&&a.Nb("Layout");var e=a.Ra;1>=d&&!e.nf&&!e.xc&&(b||e.oo("Layout"));a.yl=!1;for(var g=a.am.j;g.next();)Jn(a,g.value,b,d);var h=a.Yb;h.zf||(!b||h.jG||0===d?(h.doLayout(a),Si(a),h.zf=!0):a.yl=!0)}finally{0===d&&a.gd("Layout"),a.yl=!h.zf,a.$a=c}}} function Jn(a,b,c,d){if(null!==b){for(var e=b.gn.j;e.next();)Jn(a,e.value,c,d);e=b.Yb;null===e||e.zf||(!c||e.jG||0===d?(b.mo=!b.location.F(),e.doLayout(b),b.N(Kn),Lm(a,b),e.zf=!0):a.yl=!0)}}D.defineProperty(E,{de:"isTreePathToChildren"},function(){return this.ow},function(a){var b=this.ow;if(b!==a&&(D.h(a,"boolean",E,"isTreePathToChildren"),this.ow=a,this.i("isTreePathToChildren",b,a),!this.na.jb))for(a=this.rg;a.next();)Ln(a.value)}); E.prototype.findTreeRoots=function(){for(var a=new K(G),b=this.rg;b.next();){var c=b.value;c.xq&&null===c.Qn()&&a.add(c)}return a.j};D.defineProperty(E,{pC:"treeCollapsePolicy"},function(){return this.lx},function(a){var b=this.lx;b!==a&&(a!==Dl&&a!==hn&&a!==jn&&D.k("Unknown Diagram.treeCollapsePolicy: "+a),this.lx=a,this.i("treeCollapsePolicy",b,a))});D.defineProperty(E,{Qh:null},function(){return this.AD},function(a){this.AD=a}); function Cl(a){function b(a){var b=a.toLowerCase(),h=new K("function");c.add(a,h);c.add(b,h);d.add(a,a);d.add(b,a)}var c=new oa("string",K),d=new oa("string","string");b("AnimationStarting");b("AnimationFinished");b("BackgroundSingleClicked");b("BackgroundDoubleClicked");b("BackgroundContextClicked");b("ClipboardChanged");b("ClipboardPasted");b("DocumentBoundsChanged");b("ExternalObjectsDropped");b("InitialLayoutCompleted");b("LayoutCompleted");b("LinkDrawn");b("LinkRelinked");b("LinkReshaped");b("Modified"); b("ObjectSingleClicked");b("ObjectDoubleClicked");b("ObjectContextClicked");b("PartCreated");b("PartResized");b("PartRotated");b("SelectionMoved");b("SelectionCopied");b("SelectionDeleting");b("SelectionDeleted");b("SelectionGrouped");b("SelectionUngrouped");b("ChangingSelection");b("ChangedSelection");b("SubGraphCollapsed");b("SubGraphExpanded");b("TextEdited");b("TreeCollapsed");b("TreeExpanded");b("ViewportBoundsChanged");a.Fz=c;a.Ez=d} function Ga(a,b){var c=a.Ez.oa(b);return null!==c?c:a.Ez.oa(b.toLowerCase())}function Mn(a,b){var c=a.Fz.oa(b);if(null!==c)return c;c=a.Fz.oa(b.toLowerCase());if(null!==c)return c;D.k("Unknown DiagramEvent name: "+b);return null}E.prototype.addDiagramListener=E.prototype.sx=function(a,b){D.h(a,"string",E,"addDiagramListener:name");D.h(b,"function",E,"addDiagramListener:listener");var c=Mn(this,a);null!==c&&c.add(b)}; E.prototype.removeDiagramListener=E.prototype.OB=function(a,b){D.h(a,"string",E,"removeDiagramListener:name");D.h(b,"function",E,"addDiagramListener:listener");var c=Mn(this,a);null!==c&&c.remove(b)}; E.prototype.raiseDiagramEvent=E.prototype.Ja=function(a,b,c){v&&D.h(a,"string",E,"raiseDiagramEvent:name");var d=Mn(this,a),e=new dg;e.g=this;a=Ga(this,a);null!==a&&(e.name=a);void 0!==b&&(e.fC=b);void 0!==c&&(e.JB=c);b=d.length;if(1===b)d=d.fa(0),d(e);else if(0!==b)for(c=d.oc(),a=0;a=d.top&&0>=d.left&&0>=d.right&&0>=d.bottom)return c;var e=a.vb,g=a.scale,e=D.vg(0,0,e.width*g,e.height*g),h=D.Fb(0,0);if(b.x>=e.x&&b.xe.x+e.width-d.right&&(k=Math.max(a.gv,1),k|=0,h.x+=k,b.x>e.x+e.width-d.right/2&&(h.x+=k),b.x>e.x+e.width-d.right/4&&(h.x+=4*k));b.y>=e.y&&b.ye.y+e.height-d.bottom&&(k=Math.max(a.hv,1),k|=0,h.y+=k,b.y>e.y+e.height-d.bottom/2&&(h.y+=k),b.y>e.y+e.height-d.bottom/4&&(h.y+=4*k));h.Uc(Kd)||(c=new N(c.x+h.x/g,c.y+h.y/g));D.Lb(e);D.A(h);return c}E.prototype.makeSvg=E.prototype.makeSVG=function(a){void 0===a&&(a=new ma);a.context="svg";a=Tn(this,a);return null!==a?a.Em:null}; E.prototype.makeImage=function(a){void 0===a&&(a=new ma);var b=(a.document||document).createElement("img");b.src=this.EJ(a);return b}; E.prototype.makeImageData=E.prototype.EJ=function(a){void 0===a&&(a=new ma);var b=Tn(this,a);if(null!==b){var c=a.returnType,c=void 0===c?"string":c.toLowerCase();switch(c){case "imagedata":return b.Uk.getImageData(0,0,b.width,b.height);case "blob":b=b.Wd;c=a.callback;if("function"!==typeof c){D.k('Error: Diagram.makeImageData called with "returnType: toBlob", but no "callback" function property defined.');break}if("function"===typeof b.toBlob)return b.toBlob(c,a.type,a.details),"toBlob";if("function"=== typeof b.msToBlob)return c(b.msToBlob()),"msToBlob";c(null);break;default:return b.toDataURL(a.type,a.details)}}return""};var Un=!1; function Tn(a,b){a.Ra.Zh();a.lg();if(null===a.Ib)return null;"object"!==typeof b&&D.k("properties argument must be an Object.");var c=!1,d=b.size||null,e=b.scale||null;void 0!==b.scale&&isNaN(b.scale)&&(e="NaN");var g=b.maxSize;void 0===b.maxSize&&(c=!0,g="svg"===b.context?new Ca(Infinity,Infinity):new Ca(2E3,2E3));var h=b.position||null,k=b.parts||null,l=void 0===b.padding?1:b.padding,m=b.background||null,n=b.omitTemporary;void 0===n&&(n=!0);var p=b.document||document,q=b.elementFinished||null,r= b.showTemporary;void 0===r&&(r=!n);n=b.showGrid;void 0===n&&(n=r);null!==d&&isNaN(d.width)&&isNaN(d.height)&&(d=null);"number"===typeof l?l=new Lb(l):l instanceof Lb||(l=new Lb(0));l.left=Math.max(l.left,0);l.right=Math.max(l.right,0);l.top=Math.max(l.top,0);l.bottom=Math.max(l.bottom,0);a.cd.De(!0);var s=new ja(null,p),u=s.Uk;if(!(d||e||k||h)){s.width=a.Pb+Math.ceil(l.left+l.right);s.height=a.Tb+Math.ceil(l.top+l.bottom);if("svg"===b.context)return u=new qd(s.Wd,p,q),Sm(a,u,l,new Ca(s.width,s.height), a.Db,a.tb,k,m,r,n),u;a.Rr=!1;Sm(a,u,l,new Ca(s.width,s.height),a.Db,a.tb,k,m,r,n);a.Rr=!0;return s}var t=a.yb.Jx,y=new N(0,0),w=a.hd.copy();w.xK(a.padding);if(r)for(var B=!0,B=a.dc.o,A=B.length,O=0;Ot?(e=t,h=w.width,ea=w.height):(h=g.width,ea=g.height)):(h=w.width*e,ea=w.height*e):(e=t,h=w.width,ea=w.height);null!==l?(h+=V,ea+=B):l=new Lb(0);null!==g&&(d=g.width,g=g.height,"svg"!==b.context&&c&&!Un&&(h>d||ea>g)&&(D.trace("Diagram.makeImage(data): Diagram width or height is larger than the default max size. ("+Math.ceil(h)+"x"+Math.ceil(ea)+" vs 2000x2000) Consider increasing the max size."), Un=!0),isNaN(d)&&(d=2E3),isNaN(g)&&(g=2E3),isFinite(d)&&(h=Math.min(h,d)),isFinite(g)&&(ea=Math.min(ea,g)));s.width=Math.ceil(h);s.height=Math.ceil(ea);if("svg"===b.context)return u=new qd(s.Wd,p,q),Sm(a,u,l,new Ca(Math.ceil(h),Math.ceil(ea)),e,y,k,m,r,n),u;a.Rr=!1;Sm(a,u,l,new Ca(Math.ceil(h),Math.ceil(ea)),e,y,k,m,r,n);a.Rr=!0;return s}E.inherit=function(a,b){D.h(a,"function",E,"inherit");D.h(b,"function",E,"inherit");b.MH&&D.k("Cannot inherit from "+D.wf(b));D.Ta(a,b)}; function Ll(){this.uE=null;this.OH="63ad05bbe23a1786468a4c741b6d2";this.ik=this.OH===this._tk?!0:null} Ll.prototype.Im=function(a){a.cd.setTransform(a.sd,0,0,a.sd,0,0);if(null===this.ik){var b="f",c=window[D.Wg("76a715b2f73f148a")][D.Wg("72ba13b5")];a=D.Wg;this.ik=!0;if(window[a("7da7")]&&window[a("7da7")][a("76a115b6ed251eaf4692")]){var d=window[a("7da7")][a("76a115b6ed251eaf4692")],d=a(d).split(a("39e9"));if(!(6>d.length)){var e=a(d[1]).split(".");if("7da71ca0"===d[4]){var g=a(D[a("6cae19")]).split(".");if(e[0]>g[0]||e[0]===g[0]&&e[1]>=g[1]){e=c[a("76ad18b4f73e")];for(g=c[a("73a612b6fb191d")](a("35e7"))+ 2;gc&&a(d[2])!==a("7da71ca0ad381e90")&&(c=b[a("73a612b6fb191d")](a("76a715b2ef3e149757")));0>c&&(c=b[a("73a612b6fb191d")](a("76a715b2ef3e149757")));if(this.ik=!(0<=c&&cd.length;)d+="9";d=d.substr(d.length-4);e=""+["gsh","gsf"][parseInt(d.substr(0,1),10)%2];e+=["Header","Background","Display","Feedback"][parseInt(d.substr(0, 1),10)%4];c[a("79a417a0f0181a8946")]=e;window.document[a("78a712aa")]?(window.document[a("78a712aa")][a("7bb806b6ed32388c4a875b")](c),d=window[a("7dad0290ec3b0b91578e5b40007031bf")](c)[a("7dad0283f1390b81519f4645156528bf")](a("78a704b7e62456904c9b12701b6532a8")),window.document[a("78a712aa")][a("68ad1bbcf533388c4a875b")](c),d&&-1!==d.indexOf(parseInt(b[1]+b[2],16))&&-1!==d.indexOf(parseInt(b[3]+b[4],16))&&(this.ik=!1)):(this.ik=null,this.ik=!1)}}}}}else{e=c[a("76ad18b4f73e")];for(g=c[a("73a612b6fb191d")](a("35e7"))+ 2;gb.timeStamp-a.wk)b.preventDefault();else if(a.uk)b.preventDefault();else{a.Fd=a.cc;a.cc=c;cm(a,a,b,c,!0);c.Wk=!0;c.Ee=b.detail;if(D.by||D.ey)b.timeStamp-a.wkb.timeStamp-a.wk){b.preventDefault();return}a.wk=b.timeStamp}if(D.Xn&&null!==a.Dt)a.Dt=null,b.preventDefault();else{a.Fd=a.cc;a.cc=c;cm(a,a,b,c,!0);c.up=!0;c.Ee=b.detail;if(D.by||D.ey)c.Ee=a.li;c.bubbles=b.bubbles;c.Pf=em(b);a.simulatedMouseUp(b,null,new N,c.Pf)||(a.doMouseUp(),Di(a),ga(a,c,b))}}};a.bh=function(b){if(a.isEnabled){var c= a.Fd;a.Fd=a.cc;a.cc=c;cm(a,a,b,c,!0);c.bubbles=!0;c.Vk=void 0!==b.wheelDelta?b.wheelDelta:-40*b.detail;a.doMouseWheel();ga(a,c,b)}};a.ko=function(){if(a.isEnabled){a.uh=!1;var b=a.eb;b.cancelWaitAfter();b.standardMouseOver()}};a.mC=function(b){if(a.isEnabled){a.Rp=!1;a.uk=!0;var c=fm(a,b,b.targetTouches[0],1n||Math.abs(m.y-b.screenY)>n)?a.li++:a.li=1;d.Ee=a.li;a.wk=b.timeStamp;a.rw.n(b.screenX,b.screenY); m=0;b.ctrlKey&&(m+=1);b.altKey&&(m+=2);b.shiftKey&&(m+=4);b.metaKey&&(m+=8);d.vd=m;d.button=b.button;void 0===b.buttons||D.gy||(d.buttons=b.buttons);D.Rh&&0===b.button&&b.ctrlKey&&(d.button=2);d.Wk=!1;d.up=!0;d.Vk=0;d.Bc=!1;d.bubbles=!1;d.event=b;d.timestamp=Date.now();d.Pf=null===e?em(b):e.ca?e.ca:null;d.Oe=null;a.simulatedMouseUp(b,null,new N,d.Pf)||(a.doMouseUp(),Di(a),ga(a,d,b),c&&(a.uk=!1))}else null!==d[1]&&d[1].pointerId===b.pointerId&&(d[1]=null)}};a.Hq=function(b){if(a.isEnabled){a.uh=!1; var c=a.jA;c[b.pointerId]&&delete c[b.pointerId];c=a.Cp;null!==c[0]&&c[0].pointerId===b.pointerId&&(c[0]=null);null!==c[1]&&c[1].pointerId===b.pointerId&&(c[1]=null);"touch"!==b.pointerType&&"pen"!==b.pointerType&&(b=a.eb,b.cancelWaitAfter(),b.standardMouseOver())}};d.De(!0);Pl(a)}function Vn(a){1a)&&D.ua(a,"0 <= loc <= 1",Ba,"addColorStop:loc");D.h(b,"string",Ba,"addColorStop:color");v&&!Aa(b)&&D.k('Color "'+b+'" is not a valid color string for Brush.addColorStop');null===this.qh&&(this.qh=new oa("number","string"));this.qh.add(a,b);this.da===Fg&&(this.type=Gg);this.rh=null}; D.defineProperty(Ba,{type:"type"},function(){return this.da},function(a){this.J&&D.qa(this,a);D.Da(a,Ba,Ba,"type");this.da=a;this.start.ce()&&(a===Gg?this.start=jc:a===Id&&(this.start=mc));this.end.ce()&&(a===Gg?this.end=uc:a===Id&&(this.end=mc));this.rh=null});D.defineProperty(Ba,{color:"color"},function(){return this.Ko},function(a){this.J&&D.qa(this,a);v&&!Aa(a)&&D.k('Color "'+a+'" is not a valid color string for Brush.color');this.Ko=a;this.rh=null}); D.defineProperty(Ba,{start:"start"},function(){return this.Lp},function(a){this.J&&D.qa(this,a);D.l(a,S,Ba,"start");this.Lp=a.V();this.rh=null});D.defineProperty(Ba,{end:"end"},function(){return this.Yo},function(a){this.J&&D.qa(this,a);D.l(a,S,Ba,"end");this.Yo=a.V();this.rh=null});D.defineProperty(Ba,{nv:"startRadius"},function(){return this.gx},function(a){this.J&&D.qa(this,a);D.p(a,Ba,"startRadius");0>a&&D.ua(a,">= zero",Ba,"startRadius");this.gx=a;this.rh=null}); D.defineProperty(Ba,{lu:"endRadius"},function(){return this.Yv},function(a){this.J&&D.qa(this,a);D.p(a,Ba,"endRadius");0>a&&D.ua(a,">= zero",Ba,"endRadius");this.Yv=a;this.rh=null});D.defineProperty(Ba,{Rk:"colorStops"},function(){return this.qh},function(a){this.J&&D.qa(this,a);v&&D.l(a,oa,Ba,"colorStops");this.qh=a;this.rh=null});D.defineProperty(Ba,{pattern:"pattern"},function(){return this.Ow},function(a){this.J&&D.qa(this,a);this.Ow=a;this.rh=null}); Ba.randomColor=function(a,b){void 0===a&&(a=128);v&&(D.p(a,Ba,"randomColor:min"),(0>a||255d.length&&(d="0"+d);2>e.length&&(e="0"+e);2>c.length&&(c="0"+c);return"#"+ d+e+c};var fo=(new ja(null)).Uk,Aa;Ba.isValidColor=Aa=function(a){if("black"===a)return!0;if(""===a)return!1;v&&D.h(a,"string",Ba,"isValidColor");fo.fillStyle="#000000";var b=fo.fillStyle;fo.fillStyle=a;if(fo.fillStyle!==b)return!0;fo.fillStyle="#FFFFFF";b=fo.fillStyle;fo.fillStyle=a;return fo.fillStyle!==b};var ho=new ao,io=new ao,jo=new ao,ko=new ao;Ba.lighten=function(a){return lo(a)}; Ba.prototype.lightenBy=function(a,b){this.J&&D.qa(this);var c=void 0===a||"number"!==typeof a?.2:a,d=void 0===b?co:b;if(this.type===Fg)mo(this.color),this.color=no(c,d);else if((this.type===Gg||this.type===Id)&&null!==this.Rk)for(var e=this.Rk.j;e.next();)mo(e.value),this.addColorStop(e.key,no(c,d));return this};var lo;Ba.lightenBy=lo=function(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?co:c;mo(a);return no(b,c)};Ba.darken=function(a){return oo(a)}; Ba.prototype.darkenBy=function(a,b){this.J&&D.qa(this);var c=void 0===a||"number"!==typeof a?.2:a,d=void 0===b?co:b;if(this.type===Fg)mo(this.color),this.color=no(-c,d);else if((this.type===Gg||this.type===Id)&&null!==this.Rk)for(var e=this.Rk.j;e.next();)mo(e.value),this.addColorStop(e.key,no(-c,d));return this};var oo;Ba.darkenBy=oo=function(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?co:c;mo(a);return no(-b,c)}; function no(a,b){switch(b){case co:var c=100*po(ho.Pc),d=100*po(ho.Nd),e=100*po(ho.ld);jo.Pc=.4124564*c+.3575761*d+.1804375*e;jo.Nd=.2126729*c+.7151522*d+.072175*e;jo.ld=.0193339*c+.119192*d+.9503041*e;jo.pg=ho.pg;c=qo(jo.Pc/ro[0]);d=qo(jo.Nd/ro[1]);e=qo(jo.ld/ro[2]);ko.Pc=116*d-16;ko.Nd=500*(c-d);ko.ld=200*(d-e);ko.pg=jo.pg;ko.Pc=Math.min(100,Math.max(0,ko.Pc+100*a));c=(ko.Pc+16)/116;d=c-ko.ld/200;jo.Pc=ro[0]*so(ko.Nd/500+c);jo.Nd=ro[1]*(ko.Pc>to*uo?Math.pow(c,3):ko.Pc/to);jo.ld=ro[2]*so(d);jo.pg= ko.pg;c=-.969266*jo.Pc+1.8760108*jo.Nd+.041556*jo.ld;d=.0556434*jo.Pc+-.2040259*jo.Nd+1.0572252*jo.ld;ho.Pc=255*vo((3.2404542*jo.Pc+-1.5371385*jo.Nd+-.4985314*jo.ld)/100);ho.Nd=255*vo(c/100);ho.ld=255*vo(d/100);ho.pg=jo.pg;ho.Pc=Math.round(ho.Pc);255ho.Pc&&(ho.Pc=0);ho.Nd=Math.round(ho.Nd);255ho.Nd&&(ho.Nd=0);ho.ld=Math.round(ho.ld);255ho.ld&&(ho.ld=0);return"rgba("+ho.Pc+", "+ho.Nd+", "+ho.ld+", "+ho.pg+")";case eo:var e=ho.Pc/255,g=ho.Nd/ 255,h=ho.ld/255,k=Math.max(e,g,h),d=Math.min(e,g,h),l=k-d,d=(k+d)/2;if(0===l)c=e=0;else{switch(k){case e:c=(g-h)/l%6;break;case g:c=(h-e)/l+2;break;case h:c=(e-g)/l+4}c*=60;0>c&&(c+=360);e=l/(1-Math.abs(2*d-1))}io.Pc=Math.round(c);io.Nd=Math.round(100*e);io.ld=Math.round(100*d);io.pg=ho.pg;io.ld=Math.min(100,Math.max(0,io.ld+100*a));return"hsla("+io.Pc+", "+io.Nd+"%, "+io.ld+"%, "+io.pg+")";default:return D.k("Unknown color space: "+b),"rgba(0, 0, 0, 1)"}} function mo(a){fo.clearRect(0,0,1,1);fo.fillStyle="#000000";var b=fo.fillStyle;fo.fillStyle=a;fo.fillStyle!==b?(fo.fillRect(0,0,1,1),a=fo.getImageData(0,0,1,1).data,ho.Pc=a[0],ho.Nd=a[1],ho.ld=a[2],ho.pg=a[3]/255):(fo.fillStyle="#FFFFFF",b=fo.fillStyle,fo.fillStyle=a,fo.fillStyle===b&&v&&D.k('Color "'+a+'" is not a valid color string for RGBA color conversion'),ho.Pc=0,ho.Nd=0,ho.ld=0,ho.pg=1)}function po(a){a/=255;return.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)} function vo(a){return.0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055}var uo=216/24389,to=24389/27,ro=[95.047,100,108.883];function qo(a){return a>uo?Math.pow(a,1/3):(to*a+16)/116}function so(a){var b=a*a*a;return b>uo?b:(116*a-16)/to} function P(){D.vc(this);this.T=4225027;this.Ic=1;this.Dh=null;this.$b="";this.kc=this.Mb=null;this.tb=(new N(NaN,NaN)).freeze();this.bf=ie;this.qi=Xd;this.pi=ge;this.Kc=new Ea;this.Qi=new Ea;this.jj=new Ea;this.Db=this.Wo=1;this.wg=0;this.Qg=wo;this.en=Sd;this.Dd=(new C(NaN,NaN,NaN,NaN)).freeze();this.bc=(new C(NaN,NaN,NaN,NaN)).freeze();this.ed=(new C(0,0,NaN,NaN)).freeze();this.$=this.et=this.ft=null;this.Lm=this.te=Vc;this.rt=0;this.tj=1;this.tr=0;this.Vi=1;this.Ht=null;this.vt=-Infinity;this.qn= 0;this.rn=Kd;this.sn=uj;this.Cr="";this.Ec=this.ma=null;this.Io=-1;this.wn=this.yg=this.Cl=this.Kp=null;this.kA=Pj;this.mn=null}D.Fi(P);D.ka("GraphObject",P); P.prototype.cloneProtected=function(a){a.T=this.T|6144;a.Ic=this.Ic;a.$b=this.$b;a.Mb=this.Mb;a.kc=this.kc;a.tb.assign(this.tb);a.bf=this.bf.V();a.qi=this.qi.V();a.pi=this.pi.V();a.jj=this.jj.copy();a.Db=this.Db;a.wg=this.wg;a.Qg=this.Qg;a.en=this.en.V();a.Dd.assign(this.Dd);a.bc.assign(this.bc);a.ed.assign(this.ed);a.et=this.et;null!==this.$&&(a.$=this.$.copy());a.te=this.te.V();a.Lm=this.Lm.V();a.rt=this.rt;a.tj=this.tj;a.tr=this.tr;a.Vi=this.Vi;a.Ht=this.Ht;a.vt=this.vt;a.qn=this.qn;a.rn=this.rn.V(); a.sn=this.sn;a.Cr=this.Cr;null!==this.ma&&(a.ma=this.ma.copy());a.Ec=this.Ec;a.Io=this.Io;null!==this.Cl&&(a.Cl=D.lm(this.Cl));null!==this.yg&&(a.yg=this.yg.copy());a.wn=this.wn};P.prototype.addCopyProperty=P.prototype.TH=function(a){var b=this.Cl;if(D.isArray(b))for(var c=0;ck;)k+=g[n++%l],p=!p;q=!1}else k=g[n++%l];k>m&&(k=m);var r=Math.sqrt(k*k/(1+e*e));0>d&&(r=-r);b+=r;c+=e*r;p?a.lineTo(b,c):a.moveTo(b,c);m-=k;p=!p}} P.prototype.raiseChangedEvent=P.prototype.md=function(a,b,c,d,e,g,h){var k=this.Y;if(null!==k&&(k.po(a,b,c,d,e,g,h),Ho(this)&&c===this&&a===fg&&Io(this,k,b),c===k&&0!==(k.T&16777216)&&null!==k.data))for(a=this.xa.o,c=a.length,d=0;da&&(a+=360));return a};P.prototype.getDocumentScale=P.prototype.Ij=function(){if(0!==(this.T&4096)===!1)return this.Wo;var a=this.Db;return null!==this.R?a*this.R.Ij():a};P.prototype.getLocalPoint=P.prototype.MF=function(a,b){void 0===b&&(b=new N);b.assign(a);this.Jh.Hi(b);return b}; P.prototype.getNearestIntersectionPoint=P.prototype.NF=function(a,b,c){return this.Tn(a.x,a.y,b.x,b.y,c)};f=P.prototype;f.Tn=function(a,b,c,d,e){var g=this.transform,h=1/(g.m11*g.m22-g.m12*g.m21),k=g.m22*h,l=-g.m12*h,m=-g.m21*h,n=g.m11*h,p=h*(g.m21*g.dy-g.m22*g.dx),q=h*(g.m12*g.dx-g.m11*g.dy);if(null!==this.hm)return g=this.Z,Je(g.left,g.top,g.right,g.bottom,a,b,c,d,e);h=a*k+b*m+p;a=a*l+b*n+q;b=c*k+d*m+p;c=c*l+d*n+q;e.n(0,0);d=this.Ga;c=Je(0,0,d.width,d.height,h,a,b,c,e);e.transform(g);return c}; function Gk(a,b,c,d,e){if(!1!==Mm(a)){var g=a.margin,h=g.right+g.left,g=g.top+g.bottom;b=Math.max(b-h,0);c=Math.max(c-g,0);e=e||0;d=Math.max((d||0)-h,0);e=Math.max(e-g,0);var h=a.angle,g=0,g=a.Ea,k=0;a instanceof z&&(k=a.mb);90===h||270===h?(b=isFinite(g.height)?g.height+k:b,c=isFinite(g.width)?g.width+k:c):(b=isFinite(g.width)?g.width+k:b,c=isFinite(g.height)?g.height+k:c);var g=d||0,k=e||0,l=a instanceof x;switch(Mo(a,!0)){case Yj:k=g=0;l&&(c=b=Infinity);break;case rf:isFinite(b)&&b>d&&(g=b);isFinite(c)&& c>e&&(k=c);break;case yo:isFinite(b)&&b>d&&(g=b);k=0;l&&(c=Infinity);break;case xo:isFinite(c)&&c>e&&(k=c),g=0,l&&(b=Infinity)}var l=a.pf,m=a.ah;g>l.width&&m.widthl.height&&m.heighta.height||this.sf.Qe>a.width))&&(c=!0);this.T=c?this.T|256:this.T&-257;this.bc.F()|| D.k("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.bc.toString());this.zy(g,this.bc);No(this,!1);D.Lb(g)};f.Bj=function(){}; function Oo(a,b,c,d,e){var g=a.Z;g.x=b;g.y=c;g.width=d;g.height=e;if(!a.Ea.F()){g=a.Dd;c=a.margin;b=c.right+c.left;var h=c.top+c.bottom;c=g.width+b;g=g.height+h;d+=b;e+=h;b=Mo(a,!0);c===d&&g===e&&(b=Yj);switch(b){case Yj:if(c>d||g>e)jm(a,!0),Gk(a,c>d?d:c,g>e?e:g);break;case rf:jm(a,!0);Gk(a,d,e,0,0);break;case yo:jm(a,!0);Gk(a,d,g,0,0);break;case xo:jm(a,!0),Gk(a,c,e,0,0)}}} f.zy=function(a,b){var c=this.Y;null!==c&&null!==c.g&&(c.so!==this&&c.OG!==this&&c.RB!==this||Po(c,!0),this.ra(),Db(a,b)||(c.dl(),this.Ws(c)))};f.Ws=function(a){null!==this.wd&&(Po(a,!0),a instanceof G&&Qo(a,this))};D.defineProperty(P,{Uq:"shadowVisible"},function(){return this.wn},function(a){var b=this.wn;b!==a&&(v&&null!==a&&D.h(a,"boolean",P,"shadowVisible"),this.wn=a,this.ra(),this.i("shadowVisible",b,a))}); P.prototype.He=function(a,b){if(this.visible){var c=this.bc;if(0!==c.width&&0!==c.height&&!isNaN(c.x)&&!isNaN(c.y)){var d=this.opacity,e=1;if(1!==d){if(0===d)return;e=a.globalAlpha;a.globalAlpha=e*d}if(a instanceof qd)a:{if(this.visible){var g=null,h=a.ny;if(this instanceof x&&(this.type===Ro||this.type===So))To(this,a,b);else{var k=this.bc;if(0!==k.width&&0!==k.height&&!isNaN(k.x)&&!isNaN(k.y)){var l=this.transform,m=this.R;0!==(this.T&4096)===!0&&Uo(this);var c=0!==(this.T&256),n=!1;this instanceof pa&&(a.font=this.font);if(c){n=m.lh()?m.Ga:m.Z;if(null!==this.yg)var p=this.yg,q=p.x,r=p.y,s=p.width,p=p.height;else q=Math.max(k.x,n.x),r=Math.max(k.y,n.y),s=Math.min(k.right,n.right)-q,p=Math.min(k.bottom,n.bottom)-r;if(q>k.width+k.x||k.x>n.width+n.x||r>k.height+k.y||k.y>n.height+n.y)break a;n=!0;sd(a,1,0,0,1,0,0);a.save();a.beginPath();a.rect(q,r,s,p);a.clip()}if(this.Nj()){var u=this;if(!u.isVisible())break a}a.Oh.ac=[1,0,0,1,0,0];this instanceof pa&&1c.width+c.x||c.x>n.width+n.x||l>c.height+c.y||c.y>n.height+n.y){1!==d&&(a.globalAlpha=e);return}v&&v.xF&&v.FI(a,k,l,u,q);a.save(); a.beginPath();a.rect(k,l,u,q);a.clip()}if(this.Nj()){if(!this.isVisible()){1!==d&&(a.globalAlpha=e);return}this.el&&b.Jj("drawShadows")&&(n=this.vn,a.dC(n.x*b.scale*b.sd,n.y*b.scale*b.sd,this.Pg),a.vo(),a.shadowColor=this.un)}n=!1;this.Y&&b.Jj("drawShadows")&&(n=this.Y.el);!0===this.Uq?a.vo():!1===this.Uq&&a.uo();null!==this.kc&&(Vo(this,a,this.kc,!0,!0),this.kc instanceof Ba&&this.kc.type===Id?(a.beginPath(),a.rect(c.x,c.y,c.width,c.height),a.Xg(this.kc)):a.fillRect(c.x,c.y,c.width,c.height));g.Iu()|| a.transform(g.m11,g.m12,g.m21,g.m22,g.dx,g.dy);null!==this.Mb&&(u=this.Ga,k=c=0,l=u.width,u=u.height,q=0,this instanceof z&&(u=this.ab.qb,c=u.x,k=u.y,l=u.width,u=u.height,q=this.Rg),Vo(this,a,this.Mb,!0,!1),this.Mb instanceof Ba&&this.Mb.type===Id?(a.beginPath(),a.rect(c-q/2,k-q/2,l+q,u+q),a.Xg(this.Mb)):a.fillRect(c-q/2,k-q/2,l+q,u+q));v&&v.Cj&&v.EI(a,this);n&&(null!==this.Mb||null!==this.kc||null!==h&&0!==(h.T&512)||null!==h&&(h.type===Ol||h.type===Wj)&&h.Xd()!==this)?(Wo(this,!0),null===this.Uq&& a.uo()):Wo(this,!1);this.Xk(a,b);n&&0!==(this.T&512)===!0&&a.vo();this.Nj()&&n&&a.uo();m?(a.restore(),this instanceof x?a.De(!0):a.De(!1)):g.Iu()||(h=1/(g.m11*g.m22-g.m12*g.m21),a.transform(g.m22*h,-g.m12*h,-g.m21*h,g.m11*h,h*(g.m21*g.dy-g.m22*g.dx),h*(g.m12*g.dx-g.m11*g.dy)))}1!==d&&(a.globalAlpha=e)}}}; function To(a,b,c){var d=a.bc;0===d.width||0===d.height||isNaN(d.x)||isNaN(d.y)||(null!==a.kc&&(Vo(a,b,a.kc,!0,!0),a.kc instanceof Ba&&a.kc.type===Id?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.Xg(a.kc)):b.fillRect(d.x,d.y,d.width,d.height)),null!==a.Mb&&(Vo(a,b,a.Mb,!0,!1),a.Mb instanceof Ba&&a.Mb.type===Id?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.Xg(a.Mb)):b.fillRect(d.x,d.y,d.width,d.height)),a.Xk(b,c))}P.prototype.Xk=function(){}; function Vo(a,b,c,d,e){if(null!==c){var g=1,h=1;if("string"===typeof c)d?b.fillStyle=c:b.strokeStyle=c;else if(c.type===Fg)d?b.fillStyle=c.color:b.strokeStyle=c.color;else{var k,h=a.Ga,g=h.width,h=h.height;if(e)var l=a.Z,g=l.width,h=l.height;var m=b instanceof Hd;if(m&&c.rh&&(c.type===bo||c.Lo===g&&c.xz===h))k=c.rh;else{var n=l=0,p=0,q=0,r=0,s=0,s=r=0;e&&(l=a.Z,g=l.width,h=l.height,r=l.x,s=l.y);l=c.start.x*g+c.start.offsetX;n=c.start.y*h+c.start.offsetY;p=c.end.x*g+c.end.offsetX;q=c.end.y*h+c.end.offsetY; l+=r;p+=r;n+=s;q+=s;if(c.type===Gg)k=b.createLinearGradient(l,n,p,q);else if(c.type===Id)s=isNaN(c.lu)?Math.max(g,h)/2:c.lu,isNaN(c.nv)?(r=0,s=Math.max(g,h)/2):r=c.nv,k=b.createRadialGradient(l,n,r,p,q,s);else if(c.type===bo)try{k=b.createPattern(c.pattern,"repeat")}catch(u){k=null}else D.jc(c.type,"Brush type");if(c.type!==bo&&(e=c.Rk,null!==e))for(e=e.j;e.next();)k.addColorStop(e.key,e.value);if(m&&(c.rh=k,null!==k&&(c.Lo=g,c.xz=h),null===k&&c.type===bo&&-1!==c.Lo)){c.Lo=-1;var t=a.g;null!==t&& -1===c.Lo&&D.setTimeout(function(){t.qo()},600)}}d?b.fillStyle=k:b.strokeStyle=k}}}P.prototype.isContainedBy=P.prototype.ym=function(a){if(a instanceof x)a:{if(this!==a&&null!==a)for(var b=this.R;null!==b;){if(b===a){a=!0;break a}b=b.R}a=!1}else a=!1;return a};P.prototype.isVisibleObject=P.prototype.Rj=function(){if(!this.visible)return!1;var a=this.R;return null!==a?a.Rj():!0}; P.prototype.isEnabledObject=P.prototype.Fu=function(){for(var a=this instanceof x?this:this.R;null!==a&&a.isEnabled;)a=a.R;return null===a};D.defineProperty(P,{zF:"enabledChanged"},function(){return null!==this.ma?this.ma.Vr:null},function(a){Co(this);var b=this.ma.Vr;b!==a&&(null!==a&&D.h(a,"function",P,"enabledChanged"),this.ma.Vr=a,this.i("enabledChanged",b,a))}); function Uo(a){if(0!==(a.T&2048)===!0){var b=a.Kc;b.reset();if(!a.bc.F()||!a.Dd.F()){Xo(a,!1);return}b.translate(a.bc.x,a.bc.y);b.translate(-a.Fa.x,-a.Fa.y);var c=a.Ga;Ko(a,b,c.x,c.y,c.width,c.height);Xo(a,!1);Yo(a,!0)}0!==(a.T&4096)===!0&&(b=a.R,null===b?(a.Qi.set(a.Kc),a.Wo=a.scale,Yo(a,!1)):null!==b.Jh&&(c=a.Qi,c.reset(),b.lh()?c.multiply(b.Qi):null!==b.R&&c.multiply(b.R.Qi),c.multiply(a.Kc),a.Wo=a.scale*b.Wo,Yo(a,!1)))} function Ko(a,b,c,d,e,g){1!==a.scale&&b.scale(a.scale);if(0!==a.angle){var h=mc;a.Nj()&&a.Nf.Vc()&&(h=a.Nf);var k=D.P();if(a instanceof F&&a.Bf!==a)for(c=a.Bf,d=c.Ga,k.kv(d.x,d.y,d.width,d.height,h),c.jj.xb(k),k.offset(-c.Fa.x,-c.Fa.y),h=c.R;null!==h&&h!==a;)h.jj.xb(k),k.offset(-h.Fa.x,-h.Fa.y),h=h.R;else k.kv(c,d,e,g,h);b.rotate(a.angle,k.x,k.y);D.A(k)}}f=P.prototype;f.K=function(a){void 0===a&&(a=!1);if(!0!==Mm(this)){jm(this,!0);No(this,!0);var b=this.R;null===b||a||b.K()}}; f.vq=function(){!0!==Mm(this)&&(jm(this,!0),No(this,!0))};function Zo(a){if(!1===Nm(a)){var b=a.R;null!==b?b.K():a.Nj()&&(b=a.g,null!==b&&(b.Gg.add(a),a instanceof G&&a.kg(),b.Xe()));No(a,!0)}}f.dj=function(){0!==(this.T&2048)===!1&&(Xo(this,!0),Yo(this,!0))};f.nB=function(){Yo(this,!0)};f.ra=function(){var a=this.Y;null!==a&&a.ra()}; function Mo(a,b){var c=a.stretch,d=a.R;if(null!==d&&d.da===fa)return $o(a,d.Zd(a.Sb),d.Yd(a.column),b);if(null!==d&&d.da===Ol&&d.Xd()===a)return ap(a,rf,b);if(c===wo){if(null!==d){if(d.da===Wj&&d.Xd()===a)return ap(a,rf,b);c=d.me;return c===wo?ap(a,Yj,b):ap(a,c,b)}return ap(a,Yj,b)}return ap(a,c,b)} function $o(a,b,c,d){var e=a.stretch;if(e!==wo)return ap(a,e,d);var g=e=null;switch(b.stretch){case xo:g=!0;break;case rf:g=!0}switch(c.stretch){case yo:e=!0;break;case rf:e=!0}b=a.R.me;null===e&&(e=b===yo||b===rf);null===g&&(g=b===xo||b===rf);return!0===e&&!0===g?ap(a,rf,d):!0===e?ap(a,yo,d):!0===g?ap(a,xo,d):ap(a,Yj,d)} function ap(a,b,c){if(c)return b;if(b===Yj)return Yj;c=a.Ea;if(c.F())return Yj;a=a.angle;if(!isNaN(c.width))if(90!==a&&270!==a){if(b===yo)return Yj;if(b===rf)return xo}else{if(b===xo)return Yj;if(b===rf)return yo}if(!isNaN(c.height))if(90!==a&&270!==a){if(b===xo)return Yj;if(b===rf)return yo}else{if(b===yo)return Yj;if(b===rf)return xo}return b} D.defineProperty(P,{Qq:"segmentOrientation"},function(){return this.sn},function(a){var b=this.sn;b!==a&&(v&&D.Da(a,J,P,"segmentOrientation"),this.sn=a,this.K(),this.i("segmentOrientation",b,a),a===uj&&(this.angle=0))});D.defineProperty(P,{Ye:"segmentIndex"},function(){return this.vt},function(a){v&&D.h(a,"number",P,"segmentIndex");a=Math.round(a);var b=this.vt;b!==a&&(this.vt=a,this.K(),this.i("segmentIndex",b,a))}); D.defineProperty(P,{UB:"segmentFraction"},function(){return this.qn},function(a){v&&D.h(a,"number",P,"segmentFraction");isNaN(a)?a=0:0>a?a=0:1a||1=a&&D.k("GraphObject.scale for "+this+" must be greater than zero, not: "+a),this.Db=a,this.dj(),this.K(),this.i("scale",b,a))});D.defineProperty(P,{angle:"angle"},function(){return this.wg},function(a){var b=this.wg;b!==a&&(v&&D.p(a,P,"angle"),a%=360,0>a&&(a+=360),b!==a&&(this.wg=a,bp(this),this.K(),this.dj(),this.i("angle",b,a)))}); D.defineProperty(P,{Ea:"desiredSize"},function(){return this.bf},function(a){v&&D.l(a,Ca,P,"desiredSize");var b=a.width,c=a.height,d=this.bf,e=d.width,g=d.height;(e===b||isNaN(e)&&isNaN(b))&&(g===c||isNaN(g)&&isNaN(c))||(this.bf=a=a.V(),this.K(),this instanceof z&&this.Ve(),this.i("desiredSize",d,a),Ho(this)&&(a=this.Y,null!==a&&(Io(this,a,"width"),Io(this,a,"height"))))}); D.defineProperty(P,{width:"width"},function(){return this.bf.width},function(a){var b=this.bf.width;b===a||isNaN(b)&&isNaN(a)||(v&&D.h(a,"number",P,"width"),b=this.bf,this.bf=a=(new Ca(a,this.bf.height)).freeze(),this.K(),this instanceof z&&this.Ve(),this.i("desiredSize",b,a),Ho(this)&&(a=this.Y,null!==a&&Io(this,a,"width")))}); D.defineProperty(P,{height:"height"},function(){return this.bf.height},function(a){var b=this.bf.height;b===a||isNaN(b)&&isNaN(a)||(v&&D.h(a,"number",P,"height"),b=this.bf,this.bf=a=(new Ca(this.bf.width,a)).freeze(),this.K(),this instanceof z&&this.Ve(),this.i("desiredSize",b,a),Ho(this)&&(a=this.Y,null!==a&&Io(this,a,"height")))}); D.defineProperty(P,{ah:"minSize"},function(){return this.qi},function(a){var b=this.qi;b.O(a)||(v&&D.l(a,Ca,P,"minSize"),a=a.copy(),isNaN(a.width)&&(a.width=0),isNaN(a.height)&&(a.height=0),a.freeze(),this.qi=a,this.K(),this.i("minSize",b,a))});D.defineProperty(P,{pf:"maxSize"},function(){return this.pi},function(a){var b=this.pi;b.O(a)||(v&&D.l(a,Ca,P,"maxSize"),a=a.copy(),isNaN(a.width)&&(a.width=Infinity),isNaN(a.height)&&(a.height=Infinity),a.freeze(),this.pi=a,this.K(),this.i("maxSize",b,a))}); D.w(P,{Fa:"measuredBounds"},function(){return this.Dd});D.w(P,{Ga:"naturalBounds"},function(){return this.ed},{configurable:!0});D.defineProperty(P,{margin:"margin"},function(){return this.en},function(a){"number"===typeof a?a=new Lb(a):v&&D.l(a,Lb,P,"margin");var b=this.en;b.O(a)||(this.en=a=a.V(),this.K(),this.i("margin",b,a))});D.w(P,{transform:null},function(){0!==(this.T&2048)===!0&&Uo(this);return this.Kc});D.w(P,{Jh:null},function(){0!==(this.T&4096)===!0&&Uo(this);return this.Qi}); D.defineProperty(P,{alignment:"alignment"},function(){return this.te},function(a){var b=this.te;b.O(a)||(v&&D.l(a,S,P,"alignment"),a.ce()&&!a.jd()&&D.k("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.te=a=a.V(),Zo(this),this.i("alignment",b,a))});D.defineProperty(P,{column:"column"},function(){return this.tr},function(a){v&&D.p(a,P,"column");a=Math.round(a);var b=this.tr;b!==a&&(0>a&&D.ua(a,">= 0",P,"column"),this.tr=a,this.K(),this.i("column",b,a))}); D.defineProperty(P,{iI:"columnSpan"},function(){return this.Vi},function(a){v&&D.h(a,"number",P,"columnSpan");a=Math.round(a);var b=this.Vi;b!==a&&(1>a&&D.ua(a,">= 1",P,"columnSpan"),this.Vi=a,this.K(),this.i("columnSpan",b,a))});D.defineProperty(P,{Sb:"row"},function(){return this.rt},function(a){v&&D.p(a,P,"row");a=Math.round(a);var b=this.rt;b!==a&&(0>a&&D.ua(a,">= 0",P,"row"),this.rt=a,this.K(),this.i("row",b,a))}); D.defineProperty(P,{rowSpan:"rowSpan"},function(){return this.tj},function(a){v&&D.h(a,"number",P,"rowSpan");a=Math.round(a);var b=this.tj;b!==a&&(1>a&&D.ua(a,">= 1",P,"rowSpan"),this.tj=a,this.K(),this.i("rowSpan",b,a))});D.defineProperty(P,{Vy:"spanAllocation"},function(){return this.Ht},function(a){var b=this.Ht;b!==a&&(null!==a&&D.h(a,"function",P,"spanAllocation"),this.Ht=a,this.K(),this.i("spanAllocation",b,a))}); D.defineProperty(P,{Ih:"alignmentFocus"},function(){return this.Lm},function(a){var b=this.Lm;b.O(a)||(v&&D.l(a,S,P,"alignmentFocus"),!a.ce()||a.jd()||a.O(dc)&&this instanceof G||D.k("GraphObject.alignmentFocus must be a real Spot or Spot.Default, not: "+a),this.Lm=a=a.V(),this.K(),this.i("alignmentFocus",b,a))}); D.defineProperty(P,{wd:"portId"},function(){return this.et},function(a){var b=this.et;if(b!==a){v&&null!==a&&D.h(a,"string",P,"portId");var c=this.Y;null===c||c instanceof G||(D.k("Cannot set portID on a Link: "+a),c=null);null!==b&&null!==c&&dp(c,this);this.et=a;if(null!==a&&c){c.cl=!0;null===c.ze&&ep(c);var d=this.wd;null!==d&&c.ze.add(d,this)}this.i("portId",b,a)}});function fp(a){var b=a.Y;if(b instanceof G&&(null!==a.wd||a===b.port)){var c=b.g;null===c||c.na.jb||Qo(b,a)}} function bp(a){var b=a.g;null===b||b.na.jb||(a instanceof x?a instanceof G?a.kg():gp(a,a,function(a){fp(a)}):fp(a))}D.defineProperty(P,{Hb:"toSpot"},function(){return null!==this.$?this.$.Mk:dc},function(a){this.$d();var b=this.$.Mk;b.O(a)||(v&&D.l(a,S,P,"toSpot"),a=a.V(),this.$.Mk=a,this.i("toSpot",b,a),fp(this))}); D.defineProperty(P,{Hm:"toEndSegmentLength"},function(){return null!==this.$?this.$.Kk:10},function(a){this.$d();var b=this.$.Kk;b!==a&&(v&&D.h(a,"number",P,"toEndSegmentLength"),0>a&&D.ua(a,">= 0",P,"toEndSegmentLength"),this.$.Kk=a,this.i("toEndSegmentLength",b,a),fp(this))}); D.defineProperty(P,{pv:"toEndSegmentDirection"},function(){return null!==this.$?this.$.Jk:Fo},function(a){this.$d();var b=this.$.Jk;b!==a&&(D.On("GraphObject.toEndSegmentDirection","2.0"),v&&D.Da(a,G,P,"toEndSegmentDirection"),this.$.Jk=a,this.i("toEndSegmentDirection",b,a),fp(this))});D.defineProperty(P,{qv:"toShortLength"},function(){return null!==this.$?this.$.Lk:0},function(a){this.$d();var b=this.$.Lk;b!==a&&(v&&D.h(a,"number",P,"toShortLength"),this.$.Lk=a,this.i("toShortLength",b,a),fp(this))}); D.defineProperty(P,{kH:"toLinkable"},function(){return null!==this.$?this.$.Ot:null},function(a){this.$d();var b=this.$.Ot;b!==a&&(v&&null!==a&&D.h(a,"boolean",P,"toLinkable"),this.$.Ot=a,this.i("toLinkable",b,a))});D.defineProperty(P,{CK:"toMaxLinks"},function(){return null!==this.$?this.$.Pt:Infinity},function(a){this.$d();var b=this.$.Pt;b!==a&&(v&&D.h(a,"number",P,"toMaxLinks"),0>a&&D.ua(a,">= 0",P,"toMaxLinks"),this.$.Pt=a,this.i("toMaxLinks",b,a))}); D.defineProperty(P,{Gb:"fromSpot"},function(){return null!==this.$?this.$.ok:dc},function(a){this.$d();var b=this.$.ok;b.O(a)||(v&&D.l(a,S,P,"fromSpot"),a=a.V(),this.$.ok=a,this.i("fromSpot",b,a),fp(this))});D.defineProperty(P,{sm:"fromEndSegmentLength"},function(){return null!==this.$?this.$.mk:10},function(a){this.$d();var b=this.$.mk;b!==a&&(v&&D.h(a,"number",P,"fromEndSegmentLength"),0>a&&D.ua(a,">= 0",P,"fromEndSegmentLength"),this.$.mk=a,this.i("fromEndSegmentLength",b,a),fp(this))}); D.defineProperty(P,{wu:"fromEndSegmentDirection"},function(){return null!==this.$?this.$.lk:Fo},function(a){this.$d();var b=this.$.lk;b!==a&&(D.On("GraphObject.fromEndSegmentDirection","2.0"),v&&D.Da(a,G,P,"fromEndSegmentDirection"),this.$.lk=a,this.i("fromEndSegmentDirection",b,a),fp(this))}); D.defineProperty(P,{xu:"fromShortLength"},function(){return null!==this.$?this.$.nk:0},function(a){this.$d();var b=this.$.nk;b!==a&&(v&&D.h(a,"number",P,"fromShortLength"),this.$.nk=a,this.i("fromShortLength",b,a),fp(this))});D.defineProperty(P,{JF:"fromLinkable"},function(){return null!==this.$?this.$.Yr:null},function(a){this.$d();var b=this.$.Yr;b!==a&&(v&&null!==a&&D.h(a,"boolean",P,"fromLinkable"),this.$.Yr=a,this.i("fromLinkable",b,a))}); D.defineProperty(P,{cB:"fromMaxLinks"},function(){return null!==this.$?this.$.Zr:Infinity},function(a){this.$d();var b=this.$.Zr;b!==a&&(v&&D.h(a,"number",P,"fromMaxLinks"),0>a&&D.ua(a,">= 0",P,"fromMaxLinks"),this.$.Zr=a,this.i("fromMaxLinks",b,a))});D.defineProperty(P,{cursor:"cursor"},function(){return this.Cr},function(a){var b=this.Cr;b!==a&&(D.h(a,"string",P,"cursor"),this.Cr=a,this.i("cursor",b,a))}); D.defineProperty(P,{click:"click"},function(){return null!==this.ma?this.ma.Ui:null},function(a){Co(this);var b=this.ma.Ui;b!==a&&(null!==a&&D.h(a,"function",P,"click"),this.ma.Ui=a,this.i("click",b,a))});D.defineProperty(P,{ku:"doubleClick"},function(){return null!==this.ma?this.ma.aj:null},function(a){Co(this);var b=this.ma.aj;b!==a&&(null!==a&&D.h(a,"function",P,"doubleClick"),this.ma.aj=a,this.i("doubleClick",b,a))}); D.defineProperty(P,{MA:"contextClick"},function(){return null!==this.ma?this.ma.Wi:null},function(a){Co(this);var b=this.ma.Wi;b!==a&&(null!==a&&D.h(a,"function",P,"contextClick"),this.ma.Wi=a,this.i("contextClick",b,a))});D.defineProperty(P,{Tu:"mouseEnter"},function(){return null!==this.ma?this.ma.Os:null},function(a){Co(this);var b=this.ma.Os;b!==a&&(null!==a&&D.h(a,"function",P,"mouseEnter"),this.ma.Os=a,this.i("mouseEnter",b,a))}); D.defineProperty(P,{Uu:"mouseLeave"},function(){return null!==this.ma?this.ma.Ps:null},function(a){Co(this);var b=this.ma.Ps;b!==a&&(null!==a&&D.h(a,"function",P,"mouseLeave"),this.ma.Ps=a,this.i("mouseLeave",b,a))});D.defineProperty(P,{DB:"mouseOver"},function(){return null!==this.ma?this.ma.oj:null},function(a){Co(this);var b=this.ma.oj;b!==a&&(null!==a&&D.h(a,"function",P,"mouseOver"),this.ma.oj=a,this.i("mouseOver",b,a))}); D.defineProperty(P,{CB:"mouseHover"},function(){return null!==this.ma?this.ma.nj:null},function(a){Co(this);var b=this.ma.nj;b!==a&&(null!==a&&D.h(a,"function",P,"mouseHover"),this.ma.nj=a,this.i("mouseHover",b,a))});D.defineProperty(P,{BB:"mouseHold"},function(){return null!==this.ma?this.ma.mj:null},function(a){Co(this);var b=this.ma.mj;b!==a&&(null!==a&&D.h(a,"function",P,"mouseHold"),this.ma.mj=a,this.i("mouseHold",b,a))}); D.defineProperty(P,{QJ:"mouseDragEnter"},function(){return null!==this.ma?this.ma.Ms:null},function(a){Co(this);var b=this.ma.Ms;b!==a&&(null!==a&&D.h(a,"function",P,"mouseDragEnter"),this.ma.Ms=a,this.i("mouseDragEnter",b,a))});D.defineProperty(P,{RJ:"mouseDragLeave"},function(){return null!==this.ma?this.ma.Ns:null},function(a){Co(this);var b=this.ma.Ns;b!==a&&(null!==a&&D.h(a,"function",P,"mouseDragLeave"),this.ma.Ns=a,this.i("mouseDragLeave",b,a))}); D.defineProperty(P,{AB:"mouseDrop"},function(){return null!==this.ma?this.ma.lj:null},function(a){Co(this);var b=this.ma.lj;b!==a&&(null!==a&&D.h(a,"function",P,"mouseDrop"),this.ma.lj=a,this.i("mouseDrop",b,a))});D.defineProperty(P,{PE:"actionDown"},function(){return null!==this.ma?this.ma.br:null},function(a){Co(this);var b=this.ma.br;b!==a&&(null!==a&&D.h(a,"function",P,"actionDown"),this.ma.br=a,this.i("actionDown",b,a))}); D.defineProperty(P,{QE:"actionMove"},function(){return null!==this.ma?this.ma.cr:null},function(a){Co(this);var b=this.ma.cr;b!==a&&(null!==a&&D.h(a,"function",P,"actionMove"),this.ma.cr=a,this.i("actionMove",b,a))});D.defineProperty(P,{RE:"actionUp"},function(){return null!==this.ma?this.ma.dr:null},function(a){Co(this);var b=this.ma.dr;b!==a&&(null!==a&&D.h(a,"function",P,"actionUp"),this.ma.dr=a,this.i("actionUp",b,a))}); D.defineProperty(P,{OE:"actionCancel"},function(){return null!==this.ma?this.ma.ar:null},function(a){Co(this);var b=this.ma.ar;b!==a&&(null!==a&&D.h(a,"function",P,"actionCancel"),this.ma.ar=a,this.i("actionCancel",b,a))});D.defineProperty(P,{jC:"toolTip"},function(){return null!==this.ma?this.ma.wj:null},function(a){Co(this);var b=this.ma.wj;b!==a&&(!v||null===a||a instanceof da||a instanceof gk||D.k("GraphObject.toolTip must be an Adornment or HTMLInfo."),this.ma.wj=a,this.i("toolTip",b,a))}); D.defineProperty(P,{contextMenu:"contextMenu"},function(){return null!==this.ma?this.ma.Xi:null},function(a){Co(this);var b=this.ma.Xi;b!==a&&(!v||a instanceof da||a instanceof gk||D.k("GraphObject.contextMenu must be an Adornment or HTMLInfo."),this.ma.Xi=a,this.i("contextMenu",b,a))});P.prototype.bind=P.prototype.bind=function(a){a.Sg=this;var b=this.rm();null!==b&&hp(b)&&D.k("Cannot add a Binding to a template that has already been copied: "+a);null===this.Ec&&(this.Ec=new K(ph));this.Ec.add(a)}; P.prototype.findTemplateBinder=P.prototype.rm=function(){for(var a=this instanceof x?this:this.R;null!==a;){if(null!==a.Al)return a;a=a.R}return null};P.prototype.setProperties=function(a){D.iv(this,a)};var ip; P.make=ip=function(a,b){var c=arguments,d=null,e=null;if("function"===typeof a)e=a;else if("string"===typeof a){var g=jp.oa(a);"function"===typeof g?(c=D.lm(arguments),d=g(c),D.Qa(d)||D.k('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):e=ba[a]}null===d&&(void 0!==e&&null!==e&&e.constructor||D.k("GraphObject.make requires a class function or GoJS class name or name of an object builder, not: "+a),d=new e);g=1;if(d instanceof E&&1e)&&D.k("Must specify non-negative integer row for RowColumnDefinition "+b+", not: "+e),a.Le=!0, a.index=e):void 0!==b.column&&(e=b.column,(void 0===e||null===e||Infinity===e||isNaN(e)||0>e)&&D.k("Must specify non-negative integer column for RowColumnDefinition "+b+", not: "+e),a.Le=!1,a.index=e);e=new ma;for(c in b)"row"!==c&&"column"!==c&&(e[c]=b[c]);D.iv(a,e)}else D.iv(a,b);else D.k('Unknown initializer "'+b+'" for object being constructed by GraphObject.make: '+a)}var jp=new oa("string","function"); P.getBuilders=function(){var a=new oa("string","function"),b;for(b in jp)if(b!==b.toLowerCase()){var c=jp.oa(b);"function"===typeof c&&a.add(b,c)}a.freeze();return a};var lp;P.defineBuilder=lp=function(a,b){D.h(a,"string",P,"defineBuilder:name");D.h(b,"function",P,"defineBuilder:func");var c=a.toLowerCase();""!==a&&"none"!==c&&a!==c||D.k("Shape.defineFigureGenerator name must not be empty or None or all-lower-case: "+a);jp.add(a,b)};var mp; P.takeBuilderArgument=mp=function(a,b,c){void 0===c&&(c=null);var d=a[1];if("function"===typeof c?c(d):"string"===typeof d)return a.splice(1,1),d;if(void 0===b)throw Error("no "+("function"===typeof c?"satisfactory":"string")+" argument for GraphObject builder "+a[0]);return b}; lp("Button",function(){var a=new Ba(Gg);a.addColorStop(0,"white");a.addColorStop(1,"lightgray");var b=new Ba(Gg);b.addColorStop(0,"white");b.addColorStop(1,"dodgerblue");a=ip(x,Ol,{Du:!0,zF:function(a,b){var e=a.Jd("ButtonBorder");null!==e&&(e.fill=b?a._buttonFillNormal:a._buttonFillDisabled)},_buttonFillNormal:a,_buttonStrokeNormal:"gray",_buttonFillOver:b,_buttonStrokeOver:"blue",_buttonFillDisabled:"darkgray"},ip(z,{name:"ButtonBorder",Kb:"Rectangle",C:new S(0,0,2.761423749153968,2.761423749153968), D:new S(1,1,-2.761423749153968,-2.761423749153968),fill:a,stroke:"gray"}));a.Tu=function(a,b){if(b.Fu()){var e=b.Jd("ButtonBorder");if(e instanceof z){var g=b._buttonFillOver;b._buttonFillNormal=e.fill;e.fill=g;g=b._buttonStrokeOver;b._buttonStrokeNormal=e.stroke;e.stroke=g}}};a.Uu=function(a,b){if(b.Fu()){var e=b.Jd("ButtonBorder");e instanceof z&&(e.fill=b._buttonFillNormal,e.stroke=b._buttonStrokeNormal)}};return a}); lp("TreeExpanderButton",function(){var a=ip("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},ip(z,{name:"ButtonIcon",Kb:"MinusLine",Ea:Zd},(new ph("figure","isTreeExpanded",function(a,c){var d=c.R;return a?d._treeExpandedFigure:d._treeCollapsedFigure})).yy()),{visible:!1},(new ph("visible","isTreeLeaf",function(a){return!a})).yy());a.click=function(a,c){var d=c.Y;d instanceof da&&(d=d.Hf);if(d instanceof G){var e=d.g;if(null!==e){e=e.yb;if(d.Cc){if(!e.canCollapseTree(d))return}else if(!e.canExpandTree(d))return; a.Bc=!0;d.Cc?e.collapseTree(d):e.expandTree(d)}}};return a}); lp("SubGraphExpanderButton",function(){var a=ip("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},ip(z,{name:"ButtonIcon",Kb:"MinusLine",Ea:Zd},(new ph("figure","isSubGraphExpanded",function(a,c){var d=c.R;return a?d._subGraphExpandedFigure:d._subGraphCollapsedFigure})).yy()));a.click=function(a,c){var d=c.Y;d instanceof da&&(d=d.Hf);if(d instanceof I){var e=d.g;if(null!==e){e=e.yb;if(d.kd){if(!e.canCollapseSubGraph(d))return}else if(!e.canExpandSubGraph(d))return;a.Bc= !0;d.kd?e.collapseSubGraph(d):e.expandSubGraph(d)}}};return a});lp("ContextMenuButton",function(){var a=ip("Button");a.stretch=yo;var b=a.Jd("ButtonBorder");b instanceof z&&(b.Kb="Rectangle",b.C=new S(0,0,2,3),b.D=new S(1,1,-2,-2));return a}); lp("PanelExpanderButton",function(a){var b=mp(a,"COLLAPSIBLE"),c=ip("Button",{_buttonExpandedFigure:"TriangleUp",_buttonCollapsedFigure:"TriangleDown"},ip(z,"TriangleUp",{name:"ButtonIcon",Ea:new Ca(6,4)},(new ph("figure","visible",function(a){return a?c._buttonExpandedFigure:c._buttonCollapsedFigure})).yy(b)));a=c.Jd("ButtonBorder");a instanceof z&&(a.stroke=null,a.fill="transparent");c.click=function(a,c){var g=c.g;if(null!==g&&!g.rb){var h=c.rm();null===h&&(h=c.Y);null!==h&&(h=h.Jd(b),null!==h&& (g.Nb("Collapse/Expand Panel"),h.visible=!h.visible,g.gd("Collapse/Expand Panel")))}};return c}); lp("CheckBoxButton",function(a){var b=mp(a);a=ip("Button",{"ButtonBorder.fill":"white","ButtonBorder.stroke":"gray",width:14,height:14},ip(z,{name:"ButtonIcon",QI:"M0 4 L3 9 9 0",mb:2,stretch:rf,dB:ak,visible:!1},""!==b?(new ph("visible",b)).FJ():[]));a.click=function(a,d){var e=a.g;if(!(null===e||e.rb||""!==b&&e.ea.rb)){a.Bc=!0;var g=d.Jd("ButtonIcon");e.Nb("checkbox");g.visible=!g.visible;"function"===typeof d._doClick&&d._doClick(a,d);e.gd("checkbox")}};return a}); lp("CheckBox",function(a){a=mp(a);a=ip("CheckBoxButton",a,{name:"Button",margin:new Lb(0,1,0,0)});var b=ip(x,"Horizontal",a,{Du:!0,margin:1,_buttonFillNormal:a._buttonFillNormal,_buttonStrokeNormal:a._buttonStrokeNormal,_buttonFillOver:a._buttonFillOver,_buttonStrokeOver:a._buttonStrokeOver,_buttonFillDisabled:a._buttonFillDisabled,Tu:a.Tu,Uu:a.Uu,click:a.click,_buttonClick:a.click});a.Tu=null;a.Uu=null;a.click=null;return b}); function Do(){this.Vr=this.Xi=this.wj=this.ar=this.dr=this.cr=this.br=this.lj=this.Ns=this.Ms=this.mj=this.nj=this.oj=this.Ps=this.Os=this.Wi=this.aj=this.Ui=null}Do.prototype.copy=function(){var a=new Do;a.Ui=this.Ui;a.aj=this.aj;a.Wi=this.Wi;a.Os=this.Os;a.Ps=this.Ps;a.oj=this.oj;a.nj=this.nj;a.mj=this.mj;a.Ms=this.Ms;a.Ns=this.Ns;a.lj=this.lj;a.br=this.br;a.cr=this.cr;a.dr=this.dr;a.ar=this.ar;a.wj=this.wj;a.Xi=this.Xi;a.Vr=this.Vr;return a}; function x(a){P.call(this);void 0===a?this.da=dk:(D.Da(a,x,x,"type"),this.da=a);this.xa=new K(P);this.tf=Sd;this.da===Rl&&(this.Yn=!0);this.Gr=Vc;this.$i=wo;this.da===fa&&np(this);this.Vp=ak;this.fs=ae;this.gs=Kd;this.cs=0;this.bs=100;this.es=10;this.ds=0;this.Al=this.Pd=this.pk=this.Tm=this.Vm=null;this.us=NaN;this.Ig=this.fj=null;this.np="category";this.Hg=null;this.yj=new C(NaN,NaN,NaN,NaN);this.Ik=this.st=this.Yl=null;this.ck=""}D.Ta(x,P);D.Fi(x);D.ka("Panel",x); function np(a){a.gk=Sd;a.gi=1;a.Zi=null;a.Rm=null;a.fi=1;a.ei=null;a.Qm=null;a.ke=[];a.he=[];a.pn=op;a.Pm=op;a.xj=0;a.ij=0} x.prototype.cloneProtected=function(a){P.prototype.cloneProtected.call(this,a);a.da=this.da;a.tf=this.tf.V();a.Gr=this.Gr.V();a.$i=this.$i;if(a.da===fa){a.gk=this.gk.V();a.gi=this.gi;a.Zi=this.Zi;a.Rm=this.Rm;a.fi=this.fi;a.ei=this.ei;a.Qm=this.Qm;var b=[];if(0a&&D.ua(a,">= 0",x,"padding"),a=new Lb(a)):(D.l(a,Lb,x,"padding"),0>a.left&&D.ua(a.left,">= 0",x,"padding:value.left"),0>a.right&&D.ua(a.right,">= 0",x,"padding:value.right"),0>a.top&&D.ua(a.top,">= 0",x,"padding:value.top"),0>a.bottom&&D.ua(a.bottom,">= 0",x,"padding:value.bottom"));var b=this.tf;b.O(a)||(this.tf=a=a.V(),this.K(),this.i("padding",b,a))}); D.defineProperty(x,{pm:"defaultAlignment"},function(){return this.Gr},function(a){var b=this.Gr;b.O(a)||(v&&D.l(a,S,x,"defaultAlignment"),this.Gr=a=a.V(),this.K(),this.i("defaultAlignment",b,a))});D.defineProperty(x,{me:"defaultStretch"},function(){return this.$i},function(a){var b=this.$i;b!==a&&(D.Da(a,P,x,"defaultStretch"),this.$i=a,this.K(),this.i("defaultStretch",b,a))}); D.defineProperty(x,{DL:"defaultSeparatorPadding"},function(){return void 0===this.gk?Sd:this.gk},function(a){if(void 0!==this.gk){"number"===typeof a?a=new Lb(a):v&&D.l(a,Lb,x,"defaultSeparatorPadding");var b=this.gk;b.O(a)||(this.gk=a=a.V(),this.K(),this.i("defaultSeparatorPadding",b,a))}}); D.defineProperty(x,{BL:"defaultRowSeparatorStroke"},function(){return void 0===this.Zi?null:this.Zi},function(a){var b=this.Zi;b!==a&&(null===a||"string"===typeof a||a instanceof Ba)&&(a instanceof Ba&&a.freeze(),this.Zi=a,this.ra(),this.i("defaultRowSeparatorStroke",b,a))}); D.defineProperty(x,{CL:"defaultRowSeparatorStrokeWidth"},function(){return void 0===this.gi?1:this.gi},function(a){if(void 0!==this.gi){var b=this.gi;b!==a&&isFinite(a)&&0<=a&&(this.gi=a,this.K(),this.i("defaultRowSeparatorStrokeWidth",b,a))}}); D.defineProperty(x,{AL:"defaultRowSeparatorDashArray"},function(){return void 0===this.Rm?null:this.Rm},function(a){if(void 0!==this.Rm){var b=this.Rm;if(b!==a){null===a||Array.isArray(a)||D.jc(a,"Array",x,"defaultRowSeparatorDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;e=c&&(c=1);var d=this.Xx,e=d.width,d=d.height,g=this.Ga,h=g.width,g=g.height,k=Math.ceil(h/e),l=Math.ceil(g/d),m=this.TF;a.save();a.beginPath();a.rect(0,0,h,g);a.clip();for(var n=[],p=this.xa.o,q=p.length,r=0;r e*u*c))){s=w.opacity;t=1;if(1!==s){if(0===s)continue;t=a.globalAlpha;a.globalAlpha=t*s}var y=n[r],B=!1,A=!0,O=w.gH;null!==O&&(B=!0,A=a.YA(O,w.Gf));if("LineV"===w.Kb&&null!==w.stroke){a.lineWidth=w.mb;Vo(this,a,w.stroke,!1,!1);a.beginPath();for(var H=Math.floor(-m.x/e),R=H;R<=H+k;R++){var aa=R*e+m.x;0<=aa&&aa<=h&&qp(R,u,y)&&(B&&!A?Go(a,aa,0,aa,g,O,w.Gf):(a.moveTo(aa,0),a.lineTo(aa,g)))}a.stroke()}else if("LineH"===w.Kb&&null!==w.stroke){a.lineWidth=w.mb;Vo(this,a,w.stroke,!1,!1);a.beginPath();for(R= H=Math.floor(-m.y/d);R<=H+l;R++)aa=R*d+m.y,0<=aa&&aa<=g&&qp(R,u,y)&&(B&&!A?Go(a,0,aa,h,aa,O,w.Gf):(a.moveTo(0,aa),a.lineTo(h,aa)));a.stroke()}else if("BarV"===w.Kb&&null!==w.fill)for(Vo(this,a,w.fill,!0,!1),w=w.width,isNaN(w)&&(w=e),R=H=Math.floor(-m.x/e);R<=H+k;R++)aa=R*e+m.x,0<=aa&&aa<=h&&qp(R,u,y)&&a.fillRect(aa,0,w,g);else if("BarH"===w.Kb&&null!==w.fill)for(Vo(this,a,w.fill,!0,!1),w=w.height,isNaN(w)&&(w=d),R=H=Math.floor(-m.y/d);R<=H+l;R++)aa=R*d+m.y,0<=aa&&aa<=g&&qp(R,u,y)&&a.fillRect(0,aa, h,w);B&&a.TA();1!==s&&(a.globalAlpha=t)}}a.restore();a.De(!1)}else if(this.da===pp){e=this.Ga;c=e.width;e=e.height;a.save();a.beginPath();a.rect(-1,-1,c+1,e+1);a.clip();c=this.Xd();c.He(a,b);e=this.Ij()*b.scale;0>=e&&(e=1);d=c.Z;h=this.xa.o;g=this.Vm;k=h.length;for(l=0;lthis.hB*q.interval*c.vf.su/this.zu*e))for(r=q.Fa,u=q.mb*q.scale,s=q.Ih,s.ce()&&(s=jc),p=0;pg.height)continue}else if(l.position>g.width)continue;var m=l.Sq;isNaN(m)&&(m=c?a.gi:a.fi);var n=l.Rq;null===n&&(n=c?a.Zi:a.ei);0!==m&&null!==n&&(Vo(a,b,n,!1,!1),b.beginPath(),n=l.position+m,c?n>g.height&&(m-=n-g.height):n>g.width&&(m-=n-g.width),l=l.position+m/2,b.lineWidth=m,n=a.padding,c?(l+=n.top,m=n.left,n=g.width-n.right,b.moveTo(m,l),b.lineTo(n,l)):(l+= n.left,m=n.top,n=g.height-n.bottom,b.moveTo(l,m),b.lineTo(l,n)),b.stroke())}}} function sp(a,b,c,d,e){for(var g=d.length,h=a.Z,k=0;km)){var n=l.kf(),p=l.Sq;isNaN(p)&&(p=c?a.gi:a.fi);var q=l.Rq;null===q&&(q=c?a.Zi:a.ei);null===q&&(p=0);n-=p;p=l.position+p;n+=l.hb;p+n>m&&(n=m-p);0>=n||(m=a.padding,Vo(a,b,l.background,!0,!1),c?b.fillRect(m.left,p+m.top,h.width-(m.left+m.right),n):b.fillRect(p+m.left,m.top,n,h.height-(m.top+m.bottom)))}}}} function qp(a,b,c){if(0!==a%b)return!1;b=c.length;for(var d=0;dm&&e.set(s),D.A(s));D.A(n);g&&e.transform(h)}return c}; f.K=function(a){P.prototype.K.call(this,a);a=null;if(this.da===Ol||this.da===rj)a=this.Xd();for(var b=this.xa.o,c=b.length,d=0;dOd&&(rc=Math.max(Od-sc,0));var ng=0===Z.hb;Z.hb+=rc;Od=Math.max(Od-(rc+(ng?sc:0)),0)}1!==ca.Vi||Tb!==Yj&&Tb!==xo||(Z=this.Yd(Kb),sc=Z.kf(),rc=Math.max(ff-Z.hb,0),rc+sc>cd&&(rc=Math.max(cd-sc,0)),ng=0===Z.hb,Z.hb+=rc,cd=Math.max(cd-(rc+(ng?sc:0)),0));oi&&ca.vq()}}}D.ya(bf);for(var Gc=0,Fb=0,Jb=this.dq,ka=0;ka=this.Pq);eb++)Z=this.Zd(ca.Sb+eb),rc=Tb===rf||Tb===xo?Math.max(Z.Uh,0===zd[ca.Sb+eb]?Z.re:Math.min(zd[ca.Sb+eb],Z.re)):Math.max(Z.Uh,isNaN(Z.uf)?Z.re:Math.min(Z.uf,Z.re)),Pd.height+=rc;for(eb=1;eb=this.dq);eb++)Z= this.Yd(ca.column+eb),rc=Tb===rf||Tb===yo?Math.max(Z.Uh,0===jf[ca.column+eb]?Z.re:Math.min(jf[ca.column+eb],Z.re)):Math.max(Z.Uh,isNaN(Z.uf)?Z.re:Math.min(Z.uf,Z.re)),Pd.width+=rc;tb.width+=Pd.width;tb.height+=Pd.height;Cc=ca.margin;Mf=Cc.right+Cc.left;mg=Cc.top+Cc.bottom;Gk(ca,tb.width,tb.height,xj,yj);for(var Nf=ca.Fa,ff=Math.max(Nf.width+Mf,0),gf=Math.max(Nf.height+mg,0),kf=0,eb=0;eb=this.Pq);eb++)Z=this.Zd(ca.Sb+eb),kf+=Z.total||0;if(kf=od)&&!(ca.Sb+eb>=this.Pq);eb++){var Z=this.Zd(ca.Sb+eb),Ic=Z.Ya||0,Pf=lf(ca,Z,Og);v&&"number"!==typeof Pf&&D.k(ca+" spanAllocation does not return a number: "+Pf);Z.hb=Math.min(Z.re,Ic+Pf);Z.Ya!==Ic&&(od-=Z.Ya-Ic)}for(;0Ic&&(Z.hb=Math.min(Z.re,Ic+od),Z.Ya!==Ic&&(od-=Z.Ya-Ic));if(0===Z.index)break;Z=this.Zd(Z.index-1)}}for(var Ne=0,eb=0;eb=this.dq);eb++)Z=this.Yd(ca.column+eb),Ne+=Z.total||0;if(Ne=od)&&!(ca.column+eb>=this.dq);eb++)Z=this.Yd(ca.column+eb),Ic=Z.Ya||0,Pf=lf(ca,Z,Og),v&&"number"!==typeof Pf&&D.k(ca+" spanAllocation does not return a number: "+Pf),Z.hb=Math.min(Z.re,Ic+Pf),Z.Ya!==Ic&&(od-=Z.Ya-Ic);for(;0Ic&&(Z.hb=Math.min(Z.re,Ic+od),Z.Ya!==Ic&&(od-=Z.Ya-Ic));if(0===Z.index)break;Z=this.Yd(Z.index-1)}}}D.ya(Me);D.$k(Pd);D.$k(tb);void 0!==zd&&D.ya(zd);void 0!==jf&&D.ya(jf);for(var Pg= 0,Qg=0,Tb=Mo(this,!0),Aj=this.Ea,Mk=this.pf,xe=Fb=Gc=0,dd=0,Jb=this.dq,ka=0;kasi)Gk(Yb,Infinity,Infinity),ye=Yb.Fa,nf.$h(ye),this.ph.add(ye);else{var Ad=Yb.Ye,Bt=Yb.UB,vp=Yb.Ih;vp.ce()&&(vp=mc);var og=Yb.Qq,jw=Yb.VB,Sk=0,Tk=0,vm=0;if(Ad<-si||Ad>=si){var Ct=Qk.uG,Qf=Qk.tG;og!==uj&&(vm=Qk.computeAngle(Yb,og,Qf),Yb.wg=vm);Sk=Ct.x-Rg.x;Tk=Ct.y-Rg.y}else{var Qd, of;if(0<=Ad)Qd=Hh.fa(Ad),of=AdEt+10?0<=Ad?ui.Wb(Qd):Qd.Wb(ui):Et>Dt+10?0<=Ad?of.Wb(vi):vi.Wb(of):0<=Ad?ui.Wb(vi):vi.Wb(ui)}else Qf=0<=Ad?Qd.Wb(of):of.Wb(Qd);og!==uj&&(vm=Qk.computeAngle(Yb,og,Qf),Yb.wg=vm);Sk=Qd.x+(of.x-Qd.x)*Bt-Rg.x;Tk=Qd.y+(of.y-Qd.y)*Bt-Rg.y}Gk(Yb, Infinity,Infinity);var ye=Yb.Fa,tm=Yb.Ga,Uk=0;Yb instanceof z&&(Uk=Yb.mb);var wi=tm.width+Uk,Cj=tm.height+Uk;Sg.reset();Sg.translate(-ye.x,-ye.y);Sg.scale(Yb.scale,Yb.scale);Sg.rotate(og===uj?Yb.angle:Qf,wi/2,Cj/2);og!==Xp&&og!==Yp||Sg.rotate(90,wi/2,Cj/2);og!==Zp&&og!==$p||Sg.rotate(-90,wi/2,Cj/2);og===aq&&(45Qf||225Qf)&&Sg.rotate(-Qf,wi/2,Cj/2);var Dj=new C(0,0,wi,Cj);Rk.to(Dj,vp);Sg.xb(Rk);var kw=-Rk.x+Uk/2*Yb.scale,lw=-Rk.y+Uk/2*Yb.scale;Tg.assign(jw);isNaN(Tg.x)&&(Tg.x=0<=Ad? wi/2+3:-(wi/2+3));isNaN(Tg.y)&&(Tg.y=-(Cj/2+3));Tg.rotate(Qf);Sk+=Tg.x;Tk+=Tg.y;Dj.set(ye);Dj.x=Sk+kw;Dj.y=Tk+lw;this.ph.add(Dj);nf.$h(Dj)}}if(this instanceof J)for(var Ft=this.Af;Ft.next();)Gk(Ft.value,Infinity,Infinity);this.yj=nf;var wp=this.kj;wp.n(wp.x+nf.x,wp.y+nf.y);Cb(e,nf.width||0,nf.height||0);D.Ke(Sg);D.A(Rk);D.A(Tg)}}}break;case "Grid":break;case "Graduated":var mw=a,nw=b,ow=c,pw=d,Ug=this.Xd();this.Tm=[];var Ej=Ug.margin,qw=Ej.right+Ej.left,rw=Ej.top+Ej.bottom;Gk(Ug,mw,nw,ow,pw);var Gt= Ug.Fa,sw=Gt.height,tw=Math.max(Gt.width+qw,0),uw=Math.max(sw+rw,0),Ht=new C(-Ej.left,-Ej.top,tw,uw);this.Tm.push(Ht);e.assign(Ht);for(var Zk=Ug.vf,It=Ug.mb,xp=Zk.Ux,Fj=Zk.ru,xi=Zk.su,vw=xp.length,yp=0,zp=0,Gj=D.nb(),Ap=0;ApBd&&(Bd+=360);Jt.push(Bd)}yp=Kt;zp=Lt}Gj.push(Jt)}var Mt;if(null===this.pk){for(var Nt=[],Cp=this.xa.o,Ot=Cp.length,Dp=0;Dp< Ot;Dp++){var $k=Cp[Dp],Pt=[];Nt.push(Pt);if($k.visible)for(var xw=$k.interval,Ep=0;Epxw&&Pt.push(Qt)}}}this.pk=Nt}Mt=this.pk;var Rt=this.xa.o,yw=Rt.length,Ih=0,St=0,Tt=xi;this.Vm=[];for(var xm=[],ym=0;ymVt*Ut*xi/this.zu)){var ee=this.SF,Wt=Mt[ym],yi=Fj[0][0],Rf= 0,Cd=0,St=xi*Jh.RF-1E-4,Tt=xi*Jh.PF+1E-4,Ij=Vt*Ut;if(eethis.bl+Ij&&(zi=Math.floor((ee-this.bl)/Ij),ee-=zi*Ij);for(;ee<=this.gB;){var Fp;a:{for(var zw=Wt.length,Gp=0;Gpxi&&(Ih=xi),St<=Ih&&Ih<=Tt)){for(var Bd=Gj[Rf][Cd],Jj=Fj[Rf][Cd];Rfyi&&Cdzm?0Fm;Fm++){switch(Fm){case 0:fe.n(Cm,Dm);break;case 1:fe.n(Cm+Kp,Dm);break;case 2:fe.n(Cm,Dm+Lp);break;case 3:fe.n(Cm+Kp,Dm+Lp)}fe.rotate(du+Kh.angle);fe.offset(bu,cu);0===Em&&0===Fm?Bi.n(fe.x,fe.y,0,0):Bi.Pi(fe);fe.offset(-bu,-cu);fe.rotate(-du-Kh.angle)}D.A(fe);this.Tm.push(Bi);Ub(Cw,Bi.x,Bi.y,Bi.width,Bi.height)}else if(Ai instanceof pa){var Gm= Ai,eu=Ip,Fw=e;null===this.Ik&&(this.Ik=new pa);var Sf=this.Ik;rp(Gm,Sf);var Np=Gm.Ih;Np.ce()&&(Np=jc);for(var Lh=Gm.Qq,Gw=Gm.VB,Ci=null,Hm=0,Im=0,Vg=0,Op=0,Hw=eu.length,Jm=0;JmVg||225Vg)&&Wg.rotate(-Vg,Mj/2,Nj/2);var fu=D.vg(0,0,Mj,Nj),bl=D.P();bl.to(fu,Np);Wg.xb(bl);var Iw=-bl.x,Jw=-bl.y,Xg=D.P();Xg.assign(Gw);isNaN(Xg.x)&&(Xg.x=Mj/2+3);isNaN(Xg.y)&&(Xg.y=-(Nj/2+3));Xg.rotate(Vg);var Hm=Hm+(Xg.x+Iw),Im=Im+(Xg.y+Jw),Pp=new C(Hm,Im,Mh.width,Mh.height),Kw=new C(Mh.x,Mh.y,Mh.width,Mh.height),Lw=new C(Lj.x,Lj.y,Lj.width,Lj.height),gu=new bq;gu.eq(Sf.sf);qg.push(Op);qg.push(Sf.we);qg.push(gu); qg.push(Pp);qg.push(Kw);qg.push(Lw);0===Jm?Ci=Pp.copy():Ci.$h(Pp);D.A(Xg);D.A(bl);D.Lb(fu);D.Ke(Wg)}this.Tm.push(Ci);Ub(Fw,Ci.x,Ci.y,Ci.width,Ci.height)}jm(Ai,!1)}}break;case "TableRow":case "TableColumn":D.k(this.toString()+" is not an element of a Table Panel. TableRow and TableColumn Panels can only be elements of a Table Panel.");break;default:D.k("Unknown panel type: "+n)}}var pf=e.width,qf=e.height,Km=this.padding,Mw=Km.top+Km.bottom,pf=pf+(Km.left+Km.right),qf=qf+Mw;isFinite(g.width)&&(pf= g.width);isFinite(g.height)&&(qf=g.height);pf=Math.min(k.width,pf);qf=Math.min(k.height,qf);pf=Math.max(h.width,pf);qf=Math.max(h.height,qf);pf=Math.max(c,pf);qf=Math.max(d,qf);e.width=pf;e.height=qf;Cb(this.ed,pf,qf);Jo(this,0,0,pf,qf)};x.prototype.findMainElement=x.prototype.Xd=function(){if(null===this.Yl){var a=this.xa.o,b=a.length;if(0===b)return null;for(var c=0;cc||p>d)this.K(),Gk(this,n>c?c:n,p>d?d:p);break;case rf:this.K(!0);Gk(this,c+r,d+s,0,0);break;case yo:this.K(!0);Gk(this,c+r,p+s,0,0);break;case xo:this.K(!0),Gk(this,n+r,d+s,0,0)}}k=this.Z;k.x=a;k.y=b; k.width=c;k.height=d;var u=this.da.$b;switch(u){case "Position":for(var t=g.length,y=e.x-this.padding.left,w=e.y-this.padding.top,B=0;B=this.Pq);Le++){var ji=this.Zd(nb+Le);ue.height+=ji.total}for(Le=1;Le=this.dq);Le++){var ki=this.Yd(bd+Le);ue.width+=ki.total}var xj=Kf.Ya+ue.width,yj=af.Ya+ue.height;h.x=Nd;h.y=gc;h.width=xj;h.height=yj;var Jb=Nd,Bh=gc,Ch=xj,ka=yj;Nd+xj>e.width&&(Ch=Math.max(e.width-Nd,0));gc+yj>e.height&&(ka=Math.max(e.height-gc,0));var ca=Ab.alignment,ic=0,kg=0,li=0,Kb=0;if(ca.jd()){ca=this.pm;ca.Vc()||(ca=mc);var ic=ca.x,kg=ca.y,li=ca.offsetX,Kb=ca.offsetY,mi=Kf.alignment, Xb=af.alignment;mi.Vc()&&(ic=mi.x,li=mi.offsetX);Xb.Vc()&&(kg=Xb.y,Kb=Xb.offsetY)}else ic=ca.x,kg=ca.y,li=ca.offsetX,Kb=ca.offsetY;if(isNaN(ic)||isNaN(kg))kg=ic=.5,Kb=li=0;var bf=de.width,Me=de.height,cf=Ab.margin,ve=cf.left+cf.right,we=cf.top+cf.bottom,cd=$o(Ab,af,Kf,!1);!isNaN(Ab.Ea.width)||cd!==rf&&cd!==yo||(bf=Math.max(xj-ve,0));!isNaN(Ab.Ea.height)||cd!==rf&&cd!==xo||(Me=Math.max(yj-we,0));var Od=Ab.pf,Dh=Ab.ah,bf=Math.min(Od.width,bf),Me=Math.min(Od.height,Me),bf=Math.max(Dh.width,bf),Me=Math.max(Dh.height, Me),Z=Me+we;h.x+=h.width*ic-(bf+ve)*ic+li+cf.left;h.y+=h.height*kg-Z*kg+Kb+cf.top;Ab.visible&&(Vb(Jb,Bh,Ch,ka,h.x,h.y,de.width,de.height)?Ab.rc(h.x,h.y,bf,Me):Ab.rc(h.x,h.y,bf,Me,new C(Jb,Bh,Ch,ka)))}else{Ab.dj();Ab.bc.Xa();var nd=Ab.bc,lg=D.vg(nd.x,nd.y,nd.width,nd.height);nd.x=md.type===Ro?zh:Nd;nd.y=md.type===So?Jg:gc;nd.width=de.width;nd.height=de.height;Ab.bc.freeze();No(Ab,!1);if(!Db(lg,nd)){var ni=Ab.Y;null!==ni&&(ni.dl(),Ab.Ws(ni))}D.Lb(lg)}}}}D.$k(ue);for(nb=0;nb=ng){var Ng=this.uG,tb=this.tG;zj!==uj&&(Mg=this.computeAngle(sc,zj,tb),sc.angle=Mg);Lg=Ng.x;Of=Ng.y}else{var ac=void 0,Hc=void 0;if(0<=Fb)ac=Gc.o[Fb],Hc=Fb eb+10?0<=Fb?Pd.Wb(ac):ac.Wb(Pd):eb>jf+10?0<=Fb?Hc.Wb(zd):zd.Wb(Hc):0<=Fb?Pd.Wb(zd):zd.Wb(Pd)}else tb=0<=Fb?ac.Wb(Hc):Hc.Wb(ac);zj!==uj&&(Mg=this.computeAngle(sc,zj,tb),sc.angle=Mg);Lg=ac.x+(Hc.x-ac.x)*pi;Of=ac.y+(Hc.y-ac.y)*pi}if(Kg.O(dc))sc.location=new N(Lg,Of);else{Kg.ce()&&(Kg=mc);var kf=D.Sf();kf.reset();kf.scale(sc.scale,sc.scale);kf.rotate(sc.angle,0,0);var od=sc.Ga,Og=D.vg(0,0,od.width,od.height),lf=D.P();lf.to(Og,Kg);kf.xb(lf);var Ic=-lf.x,Pf=-lf.y,Ne=tp.copy();isNaN(Ne.x)&&(Ne.x=0<=Fb?lf.x+ 3:-(lf.x+3));isNaN(Ne.y)&&(Ne.y=-(lf.y+3));Ne.rotate(tb);Lg+=Ne.x;Of+=Ne.y;kf.qH(Og);var Ic=Ic+Og.x,Pf=Pf+Og.y,Pg=D.Fb(Lg+Ic,Of+Pf);sc.move(Pg);D.A(Pg);D.A(lf);D.Lb(Og);D.Ke(kf)}}this.Ru(!1)}break;case "Grid":break;case "Graduated":if(null!==this.Tm){var Qg=this.Xd(),Aj=this.Vm,Mk=this.Tm,xe=0,dd=Mk[xe];xe++;Qg.rc(dd.x-e.x,dd.y-e.y,dd.width,dd.height);for(var Nk=g.length,Gh=0;Ghq.width||p.y>q.height||0>p.x+p.width||0>p.y+p.height)){p=n;n=n instanceof x?n:null;q=D.Sf();q.set(h);if(null!==n?n.Yk(a,b,c,d,e,q):Lo(p,a,d, q))null!==b&&(p=b(p)),null===p||null!==c&&!c(p)||e.add(p);D.Ke(q)}}}void 0===g&&D.Ke(h);return d}void 0===g&&D.Ke(h);return!1};function gq(a,b,c,d){for(var e=a.xa.o,g=e.length;g--;){var h=e[g];if(h.visible){var k=h.Z,l=a.Ga;k.x>l.width||k.y>l.height||0>k.x+k.width||0>k.y+k.height||(h instanceof x&&gq(h,b,c,d),null!==b&&(h=b(h)),null===h||null!==c&&!c(h)||d.add(h))}}} f.Pn=function(a,b,c,d,e,g){if(!1===this.tg)return!1;void 0===c&&(c=null);void 0===d&&(d=null);var h=this.Ga,k=this.lh(),l=k?a:kb(D.Fb(a.x,a.y),this.transform),m=k?b:kb(D.Fb(b.x,b.y),this.transform),n=l.Jf(m),p=0u.width||s.y>u.height||0>s.x+s.width||0>s.y+s.height||(r.lh()?(s=r.transform,kb(k.set(a),s),kb(l.set(b),s)):(k.set(a),l.set(b)),s=r,r=r instanceof x?r:null,null!==r?!r.Pn(k,l,c,d,e,g):!s.GF(k,l,e))||(null!==c&&(s=c(s)),null===s||null!==d&&!d(s)||g.add(s))}}D.A(k);D.A(l)}return e? p:h}return!1};function Sp(a){var b=null;a instanceof z&&(b=a.C,b===Vc&&(b=null),a=a.vf,null!==a&&null===b&&(b=a.C));null===b&&(b=ec);return b}function Tp(a){var b=null;a instanceof z&&(b=a.D,b===Vc&&(b=null),a=a.vf,null!==a&&null===b&&(b=a.D));null===b&&(b=vc);return b}x.prototype.add=x.prototype.add=function(a){D.l(a,P,x,"add:element");this.ae(this.xa.count,a)};x.prototype.elt=x.prototype.fa=function(a){return this.xa.fa(a)}; x.prototype.insertAt=x.prototype.ae=function(a,b){b instanceof F&&D.k("Cannot add a Part to a Panel: "+b+"; use a Panel instead");if(this===b||this.ym(b))this===b&&D.k("Cannot make a Panel contain itself: "+this.toString()),D.k("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+b.toString());var c=b.R;null!==c&&c!==this&&D.k("Cannot add a GraphObject that already belongs to another Panel to this Panel: "+b.toString()+", already contained by "+c.toString()+", cannot be shared by this Panel: "+ this.toString());this.da!==Rl||b instanceof z||D.k("Can only add Shapes to a Grid Panel, not: "+b);this.da!==pp||b instanceof z||b instanceof pa||D.k("Can only add Shapes or TextBlocks to a Graduated Panel, not: "+b);b.Cm(this);b.mn=null;if(null!==this.fl){var d=b.data;null!==d&&"object"===typeof d&&(null===this.Hg&&(this.Hg=new oa(Object,x)),this.Hg.add(d,b))}var e=this.xa,d=-1;if(c===this){for(var g=-1,h=this.xa.o,k=h.length,l=0;l=e.count&& a>=e.count)return;e.nd(g);d=g}else D.k("element "+b.toString()+" has panel "+c.toString()+" but is not contained by it.")}if(0>a||a>e.count)a=e.count;e.ae(a,b);if(0===a||b.We)this.Yl=null;this.K();b.K();null!==b.wd?this.cl=!0:b instanceof x&&!0===b.cl&&(this.cl=!0);this.pk=null;c=this.Y;null!==c&&(c.Tl=null,c.zk=NaN,this.cl&&c instanceof G&&(c.cl=!0),c.cl&&c instanceof G&&(c.ze=null),e=this.g,null!==e&&e.na.jb||(-1!==d&&c.md(sg,"elements",this,b,null,d,null),c.md(rg,"elements",this,null,b,null,a), this.Fu()||hq(this,b,!1)))};D.defineProperty(x,{cl:null},function(){return 0!==(this.T&8388608)},function(a){0!==(this.T&8388608)!==a&&(this.T^=8388608)});function iq(a,b){a.T=b?a.T|16777216:a.T&-16777217}x.prototype.remove=x.prototype.remove=function(a){D.l(a,P,x,"remove:element");for(var b=this.xa.o,c=b.length,d=-1,e=0;ea&&D.ua(a,">= 0",x,"getRowDefinition:idx");a=Math.round(a);var b=this.ke;if(void 0===b[a]){var c=new jh;c.Cm(this);c.Le=!0;c.index=a;b[a]=c}return b[a]};x.prototype.removeRowDefinition=x.prototype.IG=function(a){v&&D.p(a,x,"removeRowDefinition:idx");0>a&&D.ua(a,">= 0",x,"removeRowDefinition:idx");a=Math.round(a);var b=this.ke;this.md(sg,"coldefs",this,b[a],null,a,null);b[a]&&delete b[a];this.K()}; D.w(x,{dq:"columnCount"},function(){return void 0===this.he?0:this.he.length});x.prototype.getColumnDefinition=x.prototype.Yd=function(a){v&&D.p(a,x,"getColumnDefinition:idx");0>a&&D.ua(a,">= 0",x,"getColumnDefinition:idx");a=Math.round(a);var b=this.he;if(void 0===b[a]){var c=new jh;c.Cm(this);c.Le=!1;c.index=a;b[a]=c}return b[a]}; x.prototype.removeColumnDefinition=x.prototype.GG=function(a){v&&D.p(a,x,"removeColumnDefinition:idx");0>a&&D.ua(a,">= 0",x,"removeColumnDefinition:idx");a=Math.round(a);var b=this.he;this.md(sg,"coldefs",this,b[a],null,a,null);b[a]&&delete b[a];this.K()}; D.defineProperty(x,{kK:"rowSizing"},function(){return void 0===this.pn?op:this.pn},function(a){if(void 0!==this.pn){var b=this.pn;b!==a&&(a!==op&&a!==Vp&&D.k("Panel.rowSizing must be RowColumnDefinition.ProportionalExtra or RowColumnDefinition.None, not: "+a),this.pn=a,this.K(),this.i("rowSizing",b,a))}}); D.defineProperty(x,{hI:"columnSizing"},function(){return void 0===this.Pm?op:this.Pm},function(a){if(void 0!==this.Pm){var b=this.Pm;b!==a&&(a!==op&&a!==Vp&&D.k("Panel.columnSizing must be RowColumnDefinition.ProportionalExtra or RowColumnDefinition.None, not: "+a),this.Pm=a,this.K(),this.i("columnSizing",b,a))}}); D.defineProperty(x,{nH:"topIndex"},function(){return void 0===this.xj?0:this.xj},function(a){if(void 0!==this.xj){var b=this.xj;b!==a&&((!isFinite(a)||0>a)&&D.k("Panel.topIndex must be greater than zero and a real number, not: "+a),this.xj=a,this.K(),this.i("topIndex",b,a))}}); D.defineProperty(x,{pG:"leftIndex"},function(){return void 0===this.ij?0:this.ij},function(a){if(void 0!==this.ij){var b=this.ij;b!==a&&((!isFinite(a)||0>a)&&D.k("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.ij=a,this.K(),this.i("leftIndex",b,a))}});x.prototype.findRowForLocalY=function(a){if(0>a||this.type!==fa)return-1;for(var b=0,c=this.ke,d=c.length,e=this.xj;ea||this.type!==fa)return-1;for(var b=0,c=this.he,d=c.length,e=this.ij;e=c.elements.count&&!(c instanceof F)){if(1===c.elements.count){var d=null!==c.fl;if(!d)for(var e=b.j;e.next();)if("itemArray"=== e.value.ov){d=!0;break}}d||(D.trace("Auto, Spot, or Graduated Panel should not have zero or one elements: "+c.toString()+" in "+a.toString()),jq=!0)}}))}var jq=!1;x.prototype.copyTemplate=function(){var a=this.copy();a.JK(function(a){a instanceof x&&(a.Al=null,a.Pd=null);var c=a.Ec;null!==c&&(a.Ec=null,c.each(function(c){a.bind(c.copy())}))});return a}; x.prototype.updateTargetBindings=x.prototype.Ob=function(a){var b=this.Al;if(null!==b)for(void 0===a&&(a=""),b=b.j;b.next();){var c=b.value,d=c.dH;if(""===a||""===d||d===a)if(d=c.ov,null!==c.nI||""!==d){var d=this.data,e=c.Xq;if(null!==e)d=""===e?this:"/"===e?this:"."===e?this:".."===e?this:this.Jd(e);else{var g=this.g;null!==g&&c.ly&&(d=g.ea.gl)}if(null===d)v&&D.trace("Binding error: missing GraphObject named "+e+" in "+this.toString());else{var g=this,h=c.Fm;if(-1!==h){if(g=this.Qx(h),null===g)continue}else null!== c.Sg&&(g=c.Sg);"/"===e?d=g.Y:"."===e?d=g:".."===e&&(d=g.R);e=c.Lt;if(0!==e){if(!(g instanceof x))continue;h=g;1===e?g=h.Yd(c.Sp):2===e&&(g=h.Zd(c.Sp))}void 0!==g&&c.tH(g,d)}}}}; D.defineProperty(x,{fl:"itemArray"},function(){return this.fj},function(a){var b=this.fj;if(b!==a){v&&null!==a&&!D.isArray(a)&&D.k("Panel.itemArray must be an Array-like object or null, not: "+a);var c=this.g;null!==c&&null!==b&&bn(c,this);this.fj=a;null!==c&&null!==a&&Ym(c,this);this.i("itemArray",b,a);null!==c&&c.na.jb||this.NB()}});function un(a){return a.type===Wj||a.type===Ol||a.type===rj||a.type===fa&&0a;)this.yf(this.xa.length-1,!1);a=this.fl;if(null!==a)for(var b=D.cb(a),c=0;cc)){var d;d=kq(a,b);var e=a.vJ,g=null;null!==e&&(g=e.oa(d));null===g&&(lq||(lq=!0,D.trace('No item template Panel found for category "'+d+'" on '+a),D.trace(" Using default item template."),d=new x,e=new pa,e.bind(new ph("text","",ia)),d.add(e),mq=d),g=mq);d=g;null!==d&&(Sh(d),d=d.copy(),0!==(d.T&16777216)&&(e=a.rm(),null!==e&&iq(e,!0)),"object"===typeof b&&(null===a.Hg&&(a.Hg=new oa(Object,x)),a.Hg.add(b,d)),e=c,un(a)&&e++,a.ae(e,d),d.Pd=b,vn(a,e, c),d.Pd=null,d.data=b)}}function vn(a,b,c){for(a=a.xa;ba&&D.ua(a,">= 0",jh,"height"),this.uf=a,this.hb=this.Ya,null!==this.R&&this.R.K(),this.td("height",b,a))});D.defineProperty(jh,{width:"width"},function(){return this.uf},function(a){var b=this.uf;b!==a&&(v&&D.h(a,"number",jh,"width"),0>a&&D.ua(a,">= 0",jh,"width"),this.uf=a,this.hb=this.Ya,null!==this.R&&this.R.K(),this.td("width",b,a))}); D.defineProperty(jh,{Uh:"minimum"},function(){return this.Bk},function(a){var b=this.Bk;b!==a&&(v&&D.h(a,"number",jh,"minimum"),(0>a||!isFinite(a))&&D.ua(a,">= 0",jh,"minimum"),this.Bk=a,this.hb=this.Ya,null!==this.R&&this.R.K(),this.td("minimum",b,a))});D.defineProperty(jh,{re:"maximum"},function(){return this.Ak},function(a){var b=this.Ak;b!==a&&(v&&D.h(a,"number",jh,"maximum"),0>a&&D.ua(a,">= 0",jh,"maximum"),this.Ak=a,this.hb=this.Ya,null!==this.R&&this.R.K(),this.td("maximum",b,a))}); D.defineProperty(jh,{alignment:"alignment"},function(){return this.te},function(a){var b=this.te;b.O(a)||(v&&D.l(a,S,jh,"alignment"),this.te=a.V(),null!==this.R&&this.R.K(),this.td("alignment",b,a))});D.defineProperty(jh,{stretch:"stretch"},function(){return this.Qg},function(a){var b=this.Qg;b!==a&&(v&&D.Da(a,P,jh,"stretch"),this.Qg=a,null!==this.R&&this.R.K(),this.td("stretch",b,a))}); D.defineProperty(jh,{YG:"separatorPadding"},function(){return this.Fk},function(a){"number"===typeof a?a=new Lb(a):null!==a&&v&&D.l(a,Lb,jh,"separatorPadding");var b=this.Fk;null!==a&&null!==b&&b.O(a)||(null!==a&&(a=a.V()),this.Fk=a,null!==this.R&&this.R.K(),this.td("separatorPadding",b,a))}); D.defineProperty(jh,{Rq:"separatorStroke"},function(){return this.zt},function(a){var b=this.zt;b!==a&&(null===a||"string"===typeof a||a instanceof Ba)&&(a instanceof Ba&&a.freeze(),this.zt=a,null!==this.R&&this.R.K(),this.td("separatorStroke",b,a))});D.defineProperty(jh,{Sq:"separatorStrokeWidth"},function(){return this.At},function(a){var b=this.At;b!==a&&(this.At=a,null!==this.R&&this.R.K(),this.td("separatorStrokeWidth",b,a))}); D.defineProperty(jh,{CM:"separatorDashArray"},function(){return this.si},function(a){var b=this.si;if(b!==a){null===a||Array.isArray(a)||D.jc(a,"Array",jh,"separatorDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;ee)){for(var g=d.Fa,h=Math.max(1,g.width),g=g.height,k=c[0],l=c[1],m=0,n=0,p=0,q=0,r=0,s=0,u=q=0,t=D.nb(),y=2;yp&&(p=1);for(var e=c=p,m=h/2,n=0===m?!1:!0,y=0,q=t[y],p=q[0],s=q[1],r=q[2],q=q[3],w=0;.1<=u;){0===w&&(n?(e=c,e-=m,u-=m,n=!1):e=c,0===e&&(e=1));if(e>u){D.ya(t);return}e> q?(w=e-q,e=q):w=0;var B=Math.sqrt(e*e/(1+r*r));0>p&&(B=-B);k+=B;l+=r*B;a.translate(k,l);a.rotate(s);a.translate(-(h/2),-(g/2));0===w&&d.Xk(a,b);a.translate(h/2,g/2);a.rotate(-s);a.translate(-k,-l);u-=e;q-=e;if(0!==w){y++;if(y===t.length){D.ya(t);return}q=t[y];p=q[0];s=q[1];r=q[2];q=q[3];e=w}}D.ya(t)}} z.prototype.Xk=function(a,b){if(null!==this.zc||null!==this.Rd){null!==this.Rd&&Vo(this,a,this.Rd,!0,!1);null!==this.zc&&Vo(this,a,this.zc,!1,!1);var c=this.Rg;if(0===c){var d=this.Y;d instanceof da&&d.type===rj&&"Selection"===d.Hd&&d.Bb instanceof z&&d.Hf.Xd()===d.Bb&&(c=d.Bb.mb)}a.lineWidth=c;a.lineJoin=this.Pp;a.lineCap=this.Np;a.miterLimit=this.xn;var e=!1;this.Y&&b.Jj("drawShadows")&&(e=this.Y.el);var g=!0;null!==this.zc&&null===this.Rd&&(g=!1);var d=!1,h=!0,k=this.gH;null!==k&&(d=!0,h=a.YA(k, this.Gf));var l=this.ab;if(null!==l){if(l.da===sf)a.beginPath(),d&&!h?Go(a,l.yc,l.Jc,l.Cb,l.Jb,k,this.Gf):(a.moveTo(l.yc,l.Jc),a.lineTo(l.Cb,l.Jb)),null!==this.Rd&&a.Xg(this.Rd),0!==c&&null!==this.zc&&a.Yj();else if(l.da===tf){var m=l.yc,n=l.Jc,p=l.Cb,q=l.Jb,l=Math.min(m,p),r=Math.min(n,q),m=Math.abs(p-m),n=Math.abs(q-n);null!==this.Rd&&(a.beginPath(),a.rect(l,r,m,n),a.Xg(this.Rd));if(null!==this.zc){var s=p=0,u=0;g&&e&&(p=a.shadowOffsetX,s=a.shadowOffsetY,u=a.shadowBlur,a.shadowOffsetX=0,a.shadowOffsetY= 0,a.shadowBlur=0);d&&!h?(h=D.nb(),h.push(l),h.push(r),h.push(l+m),h.push(r),h.push(l+m),h.push(r+n),h.push(l),h.push(r+n),h.push(l),h.push(r),a.beginPath(),pq(a,h,k,this.Gf),a.Yj(),D.ya(h)):0!==c&&(a.beginPath(),a.rect(l,r,m,n),a.Yj());g&&e&&(a.shadowOffsetX=p,a.shadowOffsetY=s,a.shadowBlur=u)}}else if(l.da===uf)m=l.yc,n=l.Jc,p=l.Cb,q=l.Jb,l=Math.abs(p-m)/2,r=Math.abs(q-n)/2,m=Math.min(m,p)+l,n=Math.min(n,q)+r,a.beginPath(),a.moveTo(m,n-r),a.bezierCurveTo(m+Jd*l,n-r,m+l,n-Jd*r,m+l,n),a.bezierCurveTo(m+ l,n+Jd*r,m+Jd*l,n+r,m,n+r),a.bezierCurveTo(m-Jd*l,n+r,m-l,n+Jd*r,m-l,n),a.bezierCurveTo(m-l,n-Jd*r,m-Jd*l,n-r,m,n-r),a.closePath(),null!==this.Rd&&a.Xg(this.Rd),d&&!h&&(h=D.nb(),Be(m,n-r,m+Jd*l,n-r,m+l,n-Jd*r,m+l,n,.5,h),Be(m+l,n,m+l,n+Jd*r,m+Jd*l,n+r,m,n+r,.5,h),Be(m,n+r,m-Jd*l,n+r,m-l,n+Jd*r,m-l,n,.5,h),Be(m-l,n,m-l,n-Jd*r,m-Jd*l,n-r,m,n-r,.5,h),a.beginPath(),pq(a,h,k,this.Gf),D.ya(h)),0!==c&&null!==this.zc&&(g&&e?(p=a.shadowOffsetX,s=a.shadowOffsetY,u=a.shadowBlur,a.shadowOffsetX=0,a.shadowOffsetY= 0,a.shadowBlur=0,a.Yj(),a.shadowOffsetX=p,a.shadowOffsetY=s,a.shadowBlur=u):a.Yj());else if(l.da===We){r=l.jk;n=r.length;for(q=0;qy.Df);else{var t=Vf(y,m),w=t.length;if(0===w){a.lineTo(y.pa,y.va);break}for(var B=0;Be)){var g=.001,h=c.length,k=b[0],l=b[1];if(4===e)Go(a,k,l,b[2],b[3],c,d);else{a.moveTo(k,l);for(var m=g=0,n=0,p=0,q=0,r=p=0,s=D.nb(),u=2;ur&&(g=r);g>p?(t=g-p,g=p):t=0;var y=Math.sqrt(g*g/(1+q*q));0>n&&(y=-y);k+=y;l+= q*y;e?a.lineTo(k,l):a.moveTo(k,l);r-=g;p-=g;if(0!==t){u++;if(u===s.length){D.ya(s);return}p=s[u];n=p[0];q=p[1];p=p[2];g=t}else e=!e}D.ya(s)}}}z.prototype.getDocumentPoint=z.prototype.fb=function(a,b){void 0===b&&(b=new N);if(a instanceof S){a.ce()&&D.k("getDocumentPoint Spot must be a real, specific Spot, not: "+a.toString());var c=this.Ga,d=this.mb;b.n(a.x*(c.width+d)-d/2+c.x+a.offsetX,a.y*(c.height+d)-d/2+c.y+a.offsetY)}else b.set(a);this.Jh.xb(b);return b}; z.prototype.Sk=function(a,b){var c=this.vf;if(null===c||null===this.fill&&null===this.stroke)return!1;var d=c.qb,e=this.mb/2;c.type!==sf||b||(e+=2);var g=D.Rf();g.assign(d);g.ig(e+2,e+2);if(!g.Pa(a))return D.Lb(g),!1;d=e+1E-4;if(c.type===sf){if(null===this.stroke)return!1;d=(c.G-c.la)*(a.x-c.la)+(c.H-c.ja)*(a.y-c.ja);if(0>(c.la-c.G)*(a.x-c.G)+(c.ja-c.H)*(a.y-c.H)||0>d)return!1;D.Lb(g);return qe(c.la,c.ja,c.G,c.H,e,a.x,a.y)}if(c.type===tf){var h=c.la,k=c.ja,l=c.G,c=c.H;g.x=Math.min(h,l);g.y=Math.min(k, c);g.width=Math.abs(l-h);g.height=Math.abs(c-k);if(null===this.fill){g.ig(-d,-d);if(g.Pa(a))return D.Lb(g),!1;g.ig(d,d)}null!==this.stroke&&g.ig(e,e);d=g.Pa(a);D.Lb(g);return d}if(c.type===uf){var h=c.la,k=c.ja,l=c.G,c=c.H,e=Math.min(h,l),m=Math.min(k,c),h=Math.abs(l-h)/2,k=Math.abs(c-k)/2,e=a.x-(e+h),m=a.y-(m+k);if(null===this.fill){h-=d;k-=d;if(0>=h||0>=k||1>=e*e/(h*h)+m*m/(k*k))return D.Lb(g),!1;h+=d;k+=d}null!==this.stroke&&(h+=d,k+=d);D.Lb(g);return 0>=h||0>=k?!1:1>=e*e/(h*h)+m*m/(k*k)}if(c.type=== We)return D.Lb(g),null===this.fill?Yf(c,a.x,a.y,e):c.Pa(a,e,1=this.mb)n=Ie(p.yc,p.Jc,p.Cb,p.Jb,g,h,k,l,e);else{var r=0,s=0;p.yc===p.Cb?(r=m,s=0):(b=(p.Jb-p.Jc)/(p.Cb-p.yc),s=m/Math.sqrt(1+b*b),r=s*b);d=D.nb();b=new N;Ie(p.yc+ r,p.Jc+s,p.Cb+r,p.Jb+s,g,h,k,l,b)&&d.push(b);b=new N;Ie(p.yc-r,p.Jc-s,p.Cb-r,p.Jb-s,g,h,k,l,b)&&d.push(b);b=new N;Ie(p.yc+r,p.Jc+s,p.yc-r,p.Jc-s,g,h,k,l,b)&&d.push(b);b=new N;Ie(p.Cb+r,p.Jb+s,p.Cb-r,p.Jb-s,g,h,k,l,b)&&d.push(b);b=d.length;if(0===b)return D.ya(d),!1;n=!0;s=Infinity;for(r=0;rMath.abs(c)){n=h-b-c*(g-d);if(0>a*a*c*c+t*t-n*n){e.x=NaN;e.y=NaN;n=!1;break a}m=Math.sqrt(a*a*c*c+t*t-n*n);k=(-(a*a*c*n)+a*t*m)/(t*t+a*a*c*c)+d;a=(-(a*a*c*n)-a*t*m)/(t*t+a*a*c*c)+d;l=c*(k-d)+n+b;b=c*(a-d)+n+b;d=Math.abs((g-k)*(g-k))+Math.abs((h-l)*(h-l));h=Math.abs((g-a)*(g-a))+Math.abs((h-b)*(h- b));dk){e.x=NaN;e.y=NaN;n=!1;break a}m=Math.sqrt(k);l=b+m;b-=m;d=Math.abs(l-h);h=Math.abs(b-h);dc?a-c:c-a)<(b>d?b-d:d-b)?(e=be||Eb(l.y,e))&&(l.ye||Eb(l.x,e))&&(l.x=h&&d<=a}a=h&&g<=a} z.prototype.GF=function(a,b,c){function d(a,b){for(var c=a.length,d=0;de)return!0;return!1}if(c&&null!==this.fill&&this.Sk(a,!0))return!0;var e=a.Jf(b);b=e;1.5=e||ob(b,g,0,-p)>=e||ob(b,g,0,p)>=e||ob(b,g,n,0)>= e?!1:!0}else if(g.type===We){h=g.qb;k=h.x;l=h.y;m=h.x+h.width;h=h.y+h.height;if(a.x>m&&a.xh&&a.ye&&lb(a.x,a.y,k,l,m,l)>e&&lb(a.x,a.y,m,h,k,h)>e&&lb(a.x,a.y,m,h,m,l)>e)return!1;b=Math.sqrt(e);if(c){if(null===this.fill?Yf(g,a.x,a.y,b):g.Pa(a,b,!0))return!0}else{c=g.nc;for(b=0;be)return!1;l=k.Eb.o;m=l.length;for(h=0;he)return!1;break;case Ff:g=D.nb(); Be(n,p,q.Dc,q.Zc,q.Vh,q.Wh,q.G,q.H,.8,g);n=d(g,a);D.ya(g);if(n)return!1;n=q.G;p=q.H;if(a.kq(n,p)>e)return!1;break;case Gf:g=D.nb();Fe(n,p,q.Dc,q.Zc,q.G,q.H,.8,g);n=d(g,a);D.ya(g);if(n)return!1;n=q.G;p=q.H;if(a.kq(n,p)>e)return!1;break;case Tf:case Uf:var r=q.type===Tf?Vf(q,k):Wf(q,k,n,p),s=r.length;if(0===s){n=q.pa;p=q.va;if(a.kq(n,p)>e)return!1;break}q=null;g=D.nb();for(b=0;b= 0",z,"strokeWidth:value")}); D.defineProperty(z,{HM:"strokeCap"},function(){return this.Np},function(a){var b=this.Np;b!==a&&("string"!==typeof a||"butt"!==a&&"round"!==a&&"square"!==a?D.ua(a,'"butt", "round", or "square"',z,"strokeCap"):(this.Np=a,this.ra(),this.i("strokeCap",b,a)))}); D.defineProperty(z,{JM:"strokeJoin"},function(){return this.Pp},function(a){var b=this.Pp;b!==a&&("string"!==typeof a||"miter"!==a&&"bevel"!==a&&"round"!==a?D.ua(a,'"miter", "bevel", or "round"',z,"strokeJoin"):(this.Pp=a,this.ra(),this.i("strokeJoin",b,a)))}); D.defineProperty(z,{KM:"strokeMiterLimit"},function(){return this.xn},function(a){var b=this.xn;if(b!==a)if(v&&D.p(a,z,"strokeMiterLimit"),1<=a){this.xn=a;this.ra();var c=this.Y;null!==c&&(c.zk=NaN);this.i("strokeMiterLimit",b,a)}else D.ua(a,"value >= 1",z,"strokeWidth:value")}); D.defineProperty(z,{gH:"strokeDashArray"},function(){return this.Op},function(a){var b=this.Op;if(b!==a){null===a||Array.isArray(a)||D.jc(a,"Array",z,"strokeDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;ea?a=0:1a?a=0:1a?a=0:1a?a=0:1n*l*l&&(h=!0);b.cd!==a&&(h=!1);!1===b.Jj("textGreeking")&&(h=!1);n=this.xi;l=this.yi;switch(this.tu){case Ao:a.translate(c, 0);a.scale(-1,1);break;case zo:a.translate(0,d);a.scale(1,-1);break;case Bo:a.translate(c,d),a.scale(-1,-1)}var m=this.we,p=(n+e+l)*m;d>p&&(k=this.cm,k=k.y*d-k.y*p+k.offsetY);for(var p=this.sf,q=0;qc&&(r=c);var k=k+n,u=s,s=a,t=k,y=c,w=e,B=g,A=0;h?("left"===B?A=0:"right"===B?A=y-r:"center"===B&&(A=(y-r)/2),s.fillRect(0+A,t+.25*w,r,1)):("left"===B?A=0:"right"===B?A=y:"center"===B&&(A=y/2),s.fillText(u,0+A,t+w-.25*w),u=w/20|0,0===u&&(u=1),"right"===B?A-=r:"center"=== B&&(A-=r/2),this.vk&&(s.beginPath(),s.lineWidth=u,s.moveTo(0+A,t+w-.2*w),s.lineTo(0+A+r,t+w-.2*w),s.stroke()),this.tk&&(s.beginPath(),s.lineWidth=u,t=t+w-w/2.2|0,0!==u%2&&(t+=.5),s.moveTo(0+A,t),s.lineTo(0+A+r,t),s.stroke()));k+=e+l}switch(this.tu){case Ao:a.scale(-1,1);a.translate(-c,0);break;case zo:a.scale(1,-1);a.translate(0,-d);break;case Bo:a.scale(-1,-1),a.translate(-c,-d)}}}; pa.prototype.ho=function(a,b,c,d){this.qp=a;var e=this.sf;e.reset();var g=0,h=0;if(isNaN(this.Ea.width)){g=this.Vd.replace(/\r\n/g,"\n").replace(/\r/g,"\n");if(0===g.length)g=0;else if(this.ky){for(var k=h=0,l=!1;!l;){var m=g.indexOf("\n",k);-1===m&&(m=g.length,l=!0);k=Pq(g.substr(k,m-k).replace(/^\s+|\s+$/g,""),this.Bg);k>h&&(h=k);k=m+1}g=h}else h=g.indexOf("\n",0),0<=h&&(g=g.substr(0,h)),g=k=Pq(g,this.Bg);g=Math.min(g,a/this.scale);g=Math.max(8,g)}else g=this.Ea.width;null!==this.R&&(g=Math.min(g, this.R.pf.width));h=Nq(this,g,e);m=h=isNaN(this.Ea.height)?Math.min(h,b/this.scale):this.Ea.height;if(0!==e.Qe&&1!==e.af.length&&this.qj===Kq&&(b=this.Bg,l=this.qj===Kq?Qq(b):0,k=this.xi+this.yi,k=Math.max(0,Oq(this)+k),m=Math.min(this.HJ-1,Math.max(Math.floor(m/k+.01)-1,0)),!(m+1>=e.af.length))){k=e.af[m];for(l=Math.max(1,a-l);Pq(k,b)>l&&1=a.xh)return new Ca(0,l);if(a.Ok===Iq){c.zj=1;g=Pq(b,k);if(0===h||g<=d)return c.Qe=Math.max(c.Qe,g),c.Ef.push(c.Qe),c.af.push(b),new Ca(g,l);var m=Rq(b);b=b.substr(m.length);for(var n=Rq(b),g=Pq(m+n,k);0d&&1d;){n=1;g=Pq(m.substr(0,n),k);for(h=0;g<=d;)n++,h=g,g=Pq(m.substr(0,n),k);1===n?(c.Ef[a.we+p]=g,e=Math.max(e,g)):(c.Ef[a.we+p]=h,e=Math.max(e,h));n--;1>n&&(n=1);c.af[a.we+p]=m.substr(0,n);p++;m=m.substr(n);if(a.we+p>a.xh)break}n=Rq(b);for(g=Pq(m+n,k);0a.xh))break}c.zj=Math.min(a.xh,p);c.Qe=Math.max(c.Qe,e);return new Ca(c.Qe,l*c.zj)}function Rq(a){for(var b=a.length,c=0;c=b?a:a.substr(0,c)} function Pq(a,b){Gq!==b&&(Gq=Hq.font=b);return Hq.measureText(a).width}function Oq(a){if(null!==a.sf.kk)return a.sf.kk;var b=a.Bg;Gq!==b&&(Gq=Hq.font=b);var c=0;void 0!==Bq[b]&&5E3>Cq?c=Bq[b]:(c=1.3*Hq.measureText("M").width,Bq[b]=c,Cq++);return a.sf.kk=c}function Qq(a){Gq!==a&&(Gq=Hq.font=a);var b=0;void 0!==Dq[a]&&5E3>Eq?b=Dq[a]:(b=Hq.measureText(Fq).width,Dq[a]=b,Eq++);return b} function Nq(a,b,c){var d=a.Vd.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),e=a.xi+a.yi,e=Math.max(0,Oq(a)+e);if(0===d.length)return c.Qe=0,a.we=1,e;if(!a.ky){var g=d.indexOf("\n",0);0<=g&&(d=d.substr(0,g))}for(var g=0,h=a.we=0,k=-1,l=!1;!l;)k=d.indexOf("\n",h),-1===k&&(k=d.length,l=!0),h<=k&&(h=d.substr(h,k-h),a.Ok!==Iq?(c.zj=0,h=Mq(a,h,c,b),g+=h.height,a.we+=c.zj):(Mq(a,h,c,b),g+=e,a.we++),a.we===a.xh&&(l=!0)),h=k+1;return a.xw=g} D.defineProperty(pa,{hC:"textValidation"},function(){return this.$l},function(a){var b=this.$l;b!==a&&(null!==a&&D.h(a,"function",pa,"textValidation"),this.$l=a,this.i("textValidation",b,a))});D.defineProperty(pa,{iH:"textEdited"},function(){return this.Mt},function(a){var b=this.Mt;b!==a&&(null!==a&&D.h(a,"function",pa,"textEdited"),this.Mt=a,this.i("textEdited",b,a))}); D.defineProperty(pa,{EM:"spacingAbove"},function(){return this.xi},function(a){var b=this.xi;b!==a&&(v&&D.h(a,"number",pa,"spacingAbove"),this.xi=a,this.i("spacingAbove",b,a))});D.defineProperty(pa,{FM:"spacingBelow"},function(){return this.yi},function(a){var b=this.yi;b!==a&&(v&&D.h(a,"number",pa,"spacingBelow"),this.yi=a,this.i("spacingBelow",b,a))}); D.defineProperty(pa,{HJ:"maxLines"},function(){return this.xh},function(a){var b=this.xh;b!==a&&(v&&D.h(a,"number",pa,"maxLines"),a=Math.floor(a),0>=a&&D.ua(a,"> 0",pa,"maxLines"),this.xh=a,this.i("maxLines",b,a),this.K())});D.w(pa,{fM:"metrics"},function(){return this.sf});D.defineProperty(pa,{nL:"choices"},function(){return this.rr},function(a){var b=this.rr;b!==a&&(null===a||Array.isArray(a)||D.jc(a,"Array",pa,"choices:value"),this.rr=a,this.i("choices",b,a))}); function bq(){this.Qe=this.zj=0;this.Ef=[];this.af=[];this.kk=null}bq.prototype.reset=function(){this.Qe=this.zj=0;this.kk=null;this.Ef=[];this.af=[]};bq.prototype.eq=function(a){this.zj=a.zj;this.kk=a.kk;this.Qe=a.Qe;this.Ef=D.lm(a.Ef);this.af=D.lm(a.af)};D.w(bq,{kL:"arrSize"},function(){return this.Ef});D.w(bq,{lL:"arrText"},function(){return this.af});D.w(bq,{eM:"maxLineWidth"},function(){return this.Qe});D.w(bq,{PL:"fontHeight"},function(){return this.kk}); function Gl(){P.call(this);this.cf=null;this.Gt="";this.Gk=je;this.fp=rf;this.Bi=this.df=null;this.ep=mc;this.Ag=Yj;this.Qp=null;this.Xz=!1;this.$o=!0;this.vw=!1;this.Ip=null}D.Ta(Gl,P);D.ka("Picture",Gl);Gl.prototype.cloneProtected=function(a){P.prototype.cloneProtected.call(this,a);a.element=this.cf;a.Gt=this.Gt;a.Gk=this.Gk.V();a.fp=this.fp;a.Ag=this.Ag;a.df=this.df;a.Bi=this.Bi;a.ep=this.ep.V();a.$o=this.$o;a.Ip=this.Ip}; Gl.prototype.qc=function(a){a===Yj||a===ak||a===bk?this.eJ=a:P.prototype.qc.call(this,a)};Gl.prototype.toString=function(){return"Picture("+this.source+")#"+D.Kd(this)};var Sq=new ma,Tq=0,Al=[];function Uq(){var a=Al;if(0===a.length)for(var b=window.document.getElementsByTagName("canvas"),c=b.length,d=0;d=d.width&&(e=e+r.offsetX+(n*r.x-d.width*r.x));p>=d.height&&(g=g+r.offsetY+(p*r.y-d.height*r.y));k=Math.min(d.width,n);h=Math.min(d.height,p);break;case rf:n=d.width;p=d.height;break;case ak:case bk:var s=0;q===ak?(s=Math.min(d.height/p,d.width/n),n*=s,p*=s):q===bk&&(s=Math.max(d.height/p,d.width/n),n*=s,p*=s,n>=d.width&&(e=(e+r.offsetX+(n*r.x-d.width*r.x)/n)*k),p>=d.height&&(g=(g+r.offsetY+(p*r.y-d.height*r.y)/p)*h),k*=1/(n/d.width),h*=1/(p/d.height), n=d.width,p=d.height)}var q=this.Ij()*b.scale,u=k*h/(n*q*p*q),s=Sq[this.source],q=null;if(c.ms&&void 0!==s&&16s.Yp.length&&(Zq(s,4,l,m),Zq(s,16,l,m));for(var l=s.Yp,m=l.length,q=l[0],t=0;te;e++)a.lineTo(d[e].x*b,d[e].y*c);D.ya(d);X(a);b=a.q;b.C=new S(.2,.22);b.D=new S(.8, .9);D.u(a);return b},DataTransmission:"Hexagon",Hexagon:function(a,b,c){var d=cr(6);a=D.v();T(a,d[0].x*b,d[0].y*c,!0);for(var e=1;6>e;e++)a.lineTo(d[e].x*b,d[e].y*c);D.ya(d);X(a);b=a.q;b.C=new S(.07,.25);b.D=new S(.93,.75);D.u(a);return b},Heptagon:function(a,b,c){var d=cr(7);a=D.v();T(a,d[0].x*b,d[0].y*c,!0);for(var e=1;7>e;e++)a.lineTo(d[e].x*b,d[e].y*c);D.ya(d);X(a);b=a.q;b.C=new S(.2,.15);b.D=new S(.8,.85);D.u(a);return b},Octagon:function(a,b,c){var d=cr(8);a=D.v();T(a,d[0].x*b,d[0].y*c,!0); for(var e=1;8>e;e++)a.lineTo(d[e].x*b,d[e].y*c);D.ya(d);X(a);b=a.q;b.C=new S(.15,.15);b.D=new S(.85,.85);D.u(a);return b},Nonagon:function(a,b,c){var d=cr(9);a=D.v();T(a,d[0].x*b,d[0].y*c,!0);for(var e=1;9>e;e++)a.lineTo(d[e].x*b,d[e].y*c);D.ya(d);X(a);b=a.q;b.C=new S(.17,.13);b.D=new S(.82,.82);D.u(a);return b},Decagon:function(a,b,c){var d=cr(10);a=D.v();T(a,d[0].x*b,d[0].y*c,!0);for(var e=1;10>e;e++)a.lineTo(d[e].x*b,d[e].y*c);D.ya(d);X(a);b=a.q;b.C=new S(.16,.16);b.D=new S(.84,.84);D.u(a);return b}, Dodecagon:function(a,b,c){var d=cr(12);a=D.v();T(a,d[0].x*b,d[0].y*c,!0);for(var e=1;12>e;e++)a.lineTo(d[e].x*b,d[e].y*c);D.ya(d);X(a);b=a.q;b.C=new S(.16,.16);b.D=new S(.84,.84);D.u(a);return b},FivePointedStar:function(a,b,c){var d=br(5);a=D.v();T(a,d[0].x*b,d[0].y*c,!0);for(var e=1;10>e;e++)a.lineTo(d[e].x*b,d[e].y*c);D.ya(d);X(a);b=a.q;b.C=new S(.312,.383);b.D=new S(.693,.765);D.u(a);return b},SixPointedStar:function(a,b,c){var d=br(6);a=D.v();T(a,d[0].x*b,d[0].y*c,!0);for(var e=1;12>e;e++)a.lineTo(d[e].x* b,d[e].y*c);D.ya(d);X(a);b=a.q;b.C=new S(.17,.251);b.D=new S(.833,.755);D.u(a);return b},SevenPointedStar:function(a,b,c){var d=br(7);a=D.v();T(a,d[0].x*b,d[0].y*c,!0);for(var e=1;14>e;e++)a.lineTo(d[e].x*b,d[e].y*c);D.ya(d);X(a);b=a.q;b.C=new S(.363,.361);b.D=new S(.641,.709);D.u(a);return b},EightPointedStar:function(a,b,c){var d=br(8);a=D.v();T(a,d[0].x*b,d[0].y*c,!0);for(var e=1;16>e;e++)a.lineTo(d[e].x*b,d[e].y*c);D.ya(d);X(a);b=a.q;b.C=new S(.252,.255);b.D=new S(.75,.75);D.u(a);return b},NinePointedStar:function(a, b,c){var d=br(9);a=D.v();T(a,d[0].x*b,d[0].y*c,!0);for(var e=1;18>e;e++)a.lineTo(d[e].x*b,d[e].y*c);D.ya(d);X(a);b=a.q;b.C=new S(.355,.361);b.D=new S(.645,.651);D.u(a);return b},TenPointedStar:function(a,b,c){var d=br(10);a=D.v();T(a,d[0].x*b,d[0].y*c,!0);for(var e=1;20>e;e++)a.lineTo(d[e].x*b,d[e].y*c);D.ya(d);X(a);b=a.q;b.C=new S(.281,.261);b.D=new S(.723,.748);D.u(a);return b},FivePointedBurst:function(a,b,c){var d=ar(5);a=D.v();T(a,d[0].x*b,d[0].y*c,!0);for(var e=1;ea&&(a=.15);var d=D.v(),e=.2*Jd;T(d,0,.2*c,!0);U(d,0,(.2-e)*c,(.2-e)*b,0,.2*b,0);d.lineTo(.8*b,0);U(d,(.8+e)*b,0,1*b,(.2-e)*c,1*b,.2*c);d.lineTo(1*b,.8*c);U(d,1*b,(.8+e)*c,(.8+e)*b,1*c,.8*b,1*c);d.lineTo(.2*b,1*c);U(d,(.2-e)*b,1*c,0,(.8+e)*c,0,.8*c);d.lineTo(0,.2*c); T(d,0,a*c,!1);d.lineTo(1*b,a*c);d.kb(!1);b=d.q;b.C=new S(0,a);b.D=new S(1,1-a);D.u(d);return b},DividedProcess:function(a,b,c){a=a?a.Qc:NaN;if(isNaN(a)||.1>a)a=.1;var d=D.v();T(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(0,1*c);X(d);T(d,0,a*c,!1);d.lineTo(1*b,a*c);d.kb(!1);b=d.q;b.C=new S(0,a);b.D=vc;D.u(d);return b},Document:function(a,b,c){c/=.8;a=D.v();T(a,0,.7*c,!0);a.lineTo(0,0);a.lineTo(1*b,0);a.lineTo(1*b,.7*c);U(a,.5*b,.4*c,.5*b,1*c,0,.7*c);X(a);b=a.q;b.C=ec;b.D=new S(1,.6);D.u(a); return b},ExternalOrganization:function(a,b,c){a=a?a.Qc:NaN;if(isNaN(a)||.2>a)a=.2;var d=D.v();T(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(0,1*c);X(d);T(d,a*b,0,!1);d.lineTo(0,a*c);d.moveTo(1*b,a*c);d.lineTo((1-a)*b,0);d.moveTo(0,(1-a)*c);d.lineTo(a*b,1*c);d.moveTo((1-a)*b,1*c);d.lineTo(1*b,(1-a)*c);d.kb(!1);b=d.q;b.C=new S(a/2,a/2);b.D=new S(1-a/2,1-a/2);D.u(d);return b},ExternalProcess:function(a,b,c){a=D.v();T(a,.5*b,0,!0);a.lineTo(1*b,.5*c);a.lineTo(.5*b,1*c);a.lineTo(0,.5*c);X(a); T(a,.1*b,.4*c,!1);a.lineTo(.1*b,.6*c);a.moveTo(.9*b,.6*c);a.lineTo(.9*b,.4*c);a.moveTo(.6*b,.1*c);a.lineTo(.4*b,.1*c);a.moveTo(.4*b,.9*c);a.lineTo(.6*b,.9*c);a.kb(!1);b=a.q;b.C=new S(.25,.25);b.D=new S(.75,.75);D.u(a);return b},File:function(a,b,c){a=D.v();T(a,0,0,!0);a.lineTo(.75*b,0);a.lineTo(1*b,.25*c);a.lineTo(1*b,1*c);a.lineTo(0,1*c);X(a);T(a,.75*b,0,!1);a.lineTo(.75*b,.25*c);a.lineTo(1*b,.25*c);a.kb(!1);b=a.q;b.C=new S(0,.25);b.D=vc;D.u(a);return b},Interrupt:function(a,b,c){a=D.v();T(a,1*b, .5*c,!0);a.lineTo(0,1*c);a.lineTo(0,0);a.lineTo(1*b,.5*c);T(a,1*b,.5*c,!1);a.lineTo(1*b,1*c);T(a,1*b,.5*c,!1);a.lineTo(1*b,0);b=a.q;b.C=new S(0,.25);b.D=new S(.5,.75);D.u(a);return b},InternalStorage:function(a,b,c){var d=a?a.Qc:NaN;a=a?a.$u:NaN;isNaN(d)&&(d=.1);isNaN(a)&&(a=.1);var e=D.v();T(e,0,0,!0);e.lineTo(1*b,0);e.lineTo(1*b,1*c);e.lineTo(0,1*c);X(e);T(e,d*b,0,!1);e.lineTo(d*b,1*c);e.moveTo(0,a*c);e.lineTo(1*b,a*c);e.kb(!1);b=e.q;b.C=new S(d,a);b.D=vc;D.u(e);return b},Junction:function(a,b, c){a=D.v();var d=1/Math.SQRT2,e=(1-1/Math.SQRT2)/2,g=.5*Jd;T(a,1*b,.5*c,!0);U(a,1*b,(.5+g)*c,(.5+g)*b,1*c,.5*b,1*c);U(a,(.5-g)*b,1*c,0,(.5+g)*c,0,.5*c);U(a,0,(.5-g)*c,(.5-g)*b,0,.5*b,0);U(a,(.5+g)*b,0,1*b,(.5-g)*c,1*b,.5*c);T(a,(e+d)*b,(e+d)*c,!1);a.lineTo(e*b,e*c);a.moveTo(e*b,(e+d)*c);a.lineTo((e+d)*b,e*c);a.kb(!1);b=a.q;b.me=ak;D.u(a);return b},LinedDocument:function(a,b,c){c/=.8;a=D.v();T(a,0,.7*c,!0);a.lineTo(0,0);a.lineTo(1*b,0);a.lineTo(1*b,.7*c);U(a,.5*b,.4*c,.5*b,1*c,0,.7*c);X(a);T(a,.1* b,0,!1);a.lineTo(.1*b,.75*c);a.kb(!1);b=a.q;b.C=new S(.1,0);b.D=new S(1,.6);D.u(a);return b},LoopLimit:function(a,b,c){a=D.v();T(a,0,1*c,!0);a.lineTo(0,.25*c);a.lineTo(.25*b,0);a.lineTo(.75*b,0);a.lineTo(1*b,.25*c);a.lineTo(1*b,1*c);X(a);b=a.q;b.C=new S(0,.25);b.D=vc;D.u(a);return b},SequentialData:"MagneticTape",MagneticTape:function(a,b,c){a=D.v();var d=.5*Jd;T(a,.5*b,1*c,!0);U(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);U(a,0,(.5-d)*c,(.5-d)*b,0,.5*b,0);U(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);U(a,1*b,(.5+ d)*c,(.5+d)*b,.9*c,.6*b,.9*c);a.lineTo(1*b,.9*c);a.lineTo(1*b,1*c);a.lineTo(.5*b,1*c);b=a.q;b.C=new S(.15,.15);b.D=new S(.85,.8);D.u(a);return b},ManualInput:function(a,b,c){a=D.v();T(a,1*b,0,!0);a.lineTo(1*b,1*c);a.lineTo(0,1*c);a.lineTo(0,.25*c);X(a);b=a.q;b.C=new S(0,.25);b.D=vc;D.u(a);return b},MessageFromUser:function(a,b,c){a=a?a.Qc:NaN;isNaN(a)&&(a=.7);var d=D.v();T(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(a*b,.5*c);d.lineTo(1*b,1*c);d.lineTo(0,1*c);X(d);b=d.q;b.C=ec;b.D=new S(a,1);D.u(d);return b}, MicroformProcessing:function(a,b,c){a=a?a.Qc:NaN;isNaN(a)&&(a=.25);var d=D.v();T(d,0,0,!0);d.lineTo(.5*b,a*c);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(.5*b,(1-a)*c);d.lineTo(0,1*c);X(d);b=d.q;b.C=new S(0,a);b.D=new S(1,1-a);D.u(d);return b},MicroformRecording:function(a,b,c){a=D.v();T(a,0,0,!0);a.lineTo(.75*b,.25*c);a.lineTo(1*b,.15*c);a.lineTo(1*b,.85*c);a.lineTo(.75*b,.75*c);a.lineTo(0,1*c);X(a);b=a.q;b.C=new S(0,.25);b.D=new S(1,.75);D.u(a);return b},MultiDocument:function(a,b,c){c/=.8;a=D.v(); T(a,b,0,!0);a.lineTo(b,.5*c);U(a,.96*b,.47*c,.93*b,.45*c,.9*b,.44*c);a.lineTo(.9*b,.6*c);U(a,.86*b,.57*c,.83*b,.55*c,.8*b,.54*c);a.lineTo(.8*b,.7*c);U(a,.4*b,.4*c,.4*b,1*c,0,.7*c);a.lineTo(0,.2*c);a.lineTo(.1*b,.2*c);a.lineTo(.1*b,.1*c);a.lineTo(.2*b,.1*c);a.lineTo(.2*b,0);X(a);T(a,.1*b,.2*c,!1);a.lineTo(.8*b,.2*c);a.lineTo(.8*b,.54*c);a.moveTo(.2*b,.1*c);a.lineTo(.9*b,.1*c);a.lineTo(.9*b,.44*c);a.kb(!1);b=a.q;b.C=new S(0,.25);b.D=new S(.8,.77);D.u(a);return b},MultiProcess:function(a,b,c){a=D.v(); T(a,.1*b,.1*c,!0);a.lineTo(.2*b,.1*c);a.lineTo(.2*b,0);a.lineTo(1*b,0);a.lineTo(1*b,.8*c);a.lineTo(.9*b,.8*c);a.lineTo(.9*b,.9*c);a.lineTo(.8*b,.9*c);a.lineTo(.8*b,1*c);a.lineTo(0,1*c);a.lineTo(0,.2*c);a.lineTo(.1*b,.2*c);X(a);T(a,.2*b,.1*c,!1);a.lineTo(.9*b,.1*c);a.lineTo(.9*b,.8*c);a.moveTo(.1*b,.2*c);a.lineTo(.8*b,.2*c);a.lineTo(.8*b,.9*c);a.kb(!1);b=a.q;b.C=new S(0,.2);b.D=new S(.8,1);D.u(a);return b},OfflineStorage:function(a,b,c){a=a?a.Qc:NaN;isNaN(a)&&(a=.1);var d=1-a,e=D.v();T(e,0,0,!0);e.lineTo(1* b,0);e.lineTo(.5*b,1*c);X(e);T(e,.5*a*b,a*c,!1);e.lineTo((1-.5*a)*b,a*c);e.kb(!1);b=e.q;b.C=new S(d/4+.5*a,a);b.D=new S(3*d/4+.5*a,a+.5*d);D.u(e);return b},OffPageConnector:function(a,b,c){a=D.v();T(a,0,0,!0);a.lineTo(.75*b,0);a.lineTo(1*b,.5*c);a.lineTo(.75*b,1*c);a.lineTo(0,1*c);X(a);b=a.q;b.C=ec;b.D=new S(.75,1);D.u(a);return b},Or:function(a,b,c){a=D.v();var d=.5*Jd;T(a,1*b,.5*c,!0);U(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);U(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);U(a,0,(.5-d)*c,(.5-d)*b,0,.5*b,0);U(a, (.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);T(a,1*b,.5*c,!1);a.lineTo(0,.5*c);a.moveTo(.5*b,1*c);a.lineTo(.5*b,0);a.kb(!1);b=a.q;b.me=ak;D.u(a);return b},PaperTape:function(a,b,c){c/=.8;a=D.v();T(a,0,.7*c,!0);a.lineTo(0,.3*c);U(a,.5*b,.6*c,.5*b,0,1*b,.3*c);a.lineTo(1*b,.7*c);U(a,.5*b,.4*c,.5*b,1*c,0,.7*c);X(a);b=a.q;b.C=new S(0,.49);b.D=new S(1,.75);D.u(a);return b},PrimitiveFromCall:function(a,b,c){var d=a?a.Qc:NaN;a=a?a.$u:NaN;isNaN(d)&&(d=.1);isNaN(a)&&(a=.3);var e=D.v();T(e,0,0,!0);e.lineTo(1*b,0);e.lineTo((1- a)*b,.5*c);e.lineTo(1*b,1*c);e.lineTo(0,1*c);X(e);b=e.q;b.C=new S(d,0);b.D=new S(1-a,1);D.u(e);return b},PrimitiveToCall:function(a,b,c){var d=a?a.Qc:NaN;a=a?a.$u:NaN;isNaN(d)&&(d=.1);isNaN(a)&&(a=.3);var e=D.v();T(e,0,0,!0);e.lineTo((1-a)*b,0);e.lineTo(1*b,.5*c);e.lineTo((1-a)*b,1*c);e.lineTo(0,1*c);X(e);b=e.q;b.C=new S(d,0);b.D=new S(1-a,1);D.u(e);return b},Subroutine:"Procedure",Procedure:function(a,b,c){a=a?a.Qc:NaN;isNaN(a)&&(a=.1);var d=D.v();T(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(0, 1*c);X(d);T(d,(1-a)*b,0,!1);d.lineTo((1-a)*b,1*c);d.moveTo(a*b,0);d.lineTo(a*b,1*c);d.kb(!1);b=d.q;b.C=new S(a,0);b.D=new S(1-a,1);D.u(d);return b},Process:function(a,b,c){a=a?a.Qc:NaN;isNaN(a)&&(a=.1);var d=D.v();T(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(0,1*c);X(d);T(d,a*b,0,!1);d.lineTo(a*b,1*c);d.kb(!1);b=d.q;b.C=new S(a,0);b.D=vc;D.u(d);return b},Sort:function(a,b,c){a=D.v();T(a,.5*b,0,!0);a.lineTo(1*b,.5*c);a.lineTo(.5*b,1*c);a.lineTo(0,.5*c);X(a);T(a,0,.5*c,!1);a.lineTo(1*b,.5* c);a.kb(!1);b=a.q;b.C=new S(.25,.25);b.D=new S(.75,.5);D.u(a);return b},Start:function(a,b,c){a=D.v();T(a,.25*b,0,!0);T(a,.25*b,0,!0);a.arcTo(270,180,.75*b,.5*c,.25*b,.5*c);a.arcTo(90,180,.25*b,.5*c,.25*b,.5*c);T(a,.25*b,0,!1);a.lineTo(.25*b,1*c);a.moveTo(.75*b,0);a.lineTo(.75*b,1*c);a.kb(!1);b=a.q;b.C=new S(.25,0);b.D=new S(.75,1);D.u(a);return b},Terminator:function(a,b,c){a=D.v();T(a,.25*b,0,!0);a.arcTo(270,180,.75*b,.5*c,.25*b,.5*c);a.arcTo(90,180,.25*b,.5*c,.25*b,.5*c);b=a.q;b.C=new S(.23,0); b.D=new S(.77,1);D.u(a);return b},TransmittalTape:function(a,b,c){a=a?a.Qc:NaN;isNaN(a)&&(a=.1);var d=D.v();T(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(.75*b,(1-a)*c);d.lineTo(0,(1-a)*c);X(d);b=d.q;b.C=ec;b.D=new S(1,1-a);D.u(d);return b},AndGate:function(a,b,c){a=D.v();var d=.5*Jd;T(a,0,0,!0);a.lineTo(.5*b,0);U(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);U(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);a.lineTo(0,1*c);X(a);b=a.q;b.C=ec;b.D=new S(.55,1);D.u(a);return b},Buffer:function(a,b,c){a=D.v();T(a, 0,0,!0);a.lineTo(1*b,.5*c);a.lineTo(0,1*c);X(a);b=a.q;b.C=new S(0,.25);b.D=new S(.5,.75);D.u(a);return b},Clock:function(a,b,c){a=D.v();var d=.5*Jd;T(a,1*b,.5*c,!0);U(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);U(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);U(a,0,(.5-d)*c,(.5-d)*b,0,.5*b,0);U(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);T(a,1*b,.5*c,!1);a.lineTo(1*b,.5*c);T(a,.8*b,.75*c,!1);a.lineTo(.8*b,.25*c);a.lineTo(.6*b,.25*c);a.lineTo(.6*b,.75*c);a.lineTo(.4*b,.75*c);a.lineTo(.4*b,.25*c);a.lineTo(.2*b,.25*c);a.lineTo(.2* b,.75*c);a.kb(!1);b=a.q;b.me=ak;D.u(a);return b},Ground:function(a,b,c){a=D.v();T(a,.5*b,0,!1);a.lineTo(.5*b,.4*c);a.moveTo(.2*b,.6*c);a.lineTo(.8*b,.6*c);a.moveTo(.3*b,.8*c);a.lineTo(.7*b,.8*c);a.moveTo(.4*b,1*c);a.lineTo(.6*b,1*c);b=a.q;D.u(a);return b},Inverter:function(a,b,c){a=D.v();var d=.1*Jd;T(a,.8*b,.5*c,!0);a.lineTo(0,1*c);a.lineTo(0,0);a.lineTo(.8*b,.5*c);T(a,1*b,.5*c,!0);U(a,1*b,(.5+d)*c,(.9+d)*b,.6*c,.9*b,.6*c);U(a,(.9-d)*b,.6*c,.8*b,(.5+d)*c,.8*b,.5*c);U(a,.8*b,(.5-d)*c,(.9-d)*b,.4* c,.9*b,.4*c);U(a,(.9+d)*b,.4*c,1*b,(.5-d)*c,1*b,.5*c);b=a.q;b.C=new S(0,.25);b.D=new S(.4,.75);D.u(a);return b},NandGate:function(a,b,c){a=D.v();var d=.5*Jd,e=.4*Jd,g=.1*Jd;T(a,.8*b,.5*c,!0);U(a,.8*b,(.5+e)*c,(.4+d)*b,1*c,.4*b,1*c);a.lineTo(0,1*c);a.lineTo(0,0);a.lineTo(.4*b,0);U(a,(.4+d)*b,0,.8*b,(.5-e)*c,.8*b,.5*c);T(a,1*b,.5*c,!0);U(a,1*b,(.5+g)*c,(.9+g)*b,.6*c,.9*b,.6*c);U(a,(.9-g)*b,.6*c,.8*b,(.5+g)*c,.8*b,.5*c);U(a,.8*b,(.5-g)*c,(.9-g)*b,.4*c,.9*b,.4*c);U(a,(.9+g)*b,.4*c,1*b,(.5-g)*c,1*b,.5* c);b=a.q;b.C=new S(0,.05);b.D=new S(.55,.95);D.u(a);return b},NorGate:function(a,b,c){a=D.v();var d=.5,e=Jd*d,g=0,h=.5;T(a,.8*b,.5*c,!0);U(a,.7*b,(h+e)*c,(g+e)*b,(h+d)*c,0,1*c);U(a,.25*b,.75*c,.25*b,.25*c,0,0);U(a,(g+e)*b,(h-d)*c,.7*b,(h-e)*c,.8*b,.5*c);d=.1;e=.1*Jd;g=.9;h=.5;T(a,(g-d)*b,h*c,!0);U(a,(g-d)*b,(h-e)*c,(g-e)*b,(h-d)*c,g*b,(h-d)*c);U(a,(g+e)*b,(h-d)*c,(g+d)*b,(h-e)*c,(g+d)*b,h*c);U(a,(g+d)*b,(h+e)*c,(g+e)*b,(h+d)*c,g*b,(h+d)*c);U(a,(g-e)*b,(h+d)*c,(g-d)*b,(h+e)*c,(g-d)*b,h*c);b=a.q;b.C= new S(.2,.25);b.D=new S(.6,.75);D.u(a);return b},OrGate:function(a,b,c){a=D.v();var d=.5*Jd;T(a,0,0,!0);U(a,(0+d+d)*b,0*c,.8*b,(.5-d)*c,1*b,.5*c);U(a,.8*b,(.5+d)*c,(0+d+d)*b,1*c,0,1*c);U(a,.25*b,.75*c,.25*b,.25*c,0,0);X(a);b=a.q;b.C=new S(.2,.25);b.D=new S(.75,.75);D.u(a);return b},XnorGate:function(a,b,c){a=D.v();var d=.5,e=Jd*d,g=.2,h=.5;T(a,.1*b,0,!1);U(a,.35*b,.25*c,.35*b,.75*c,.1*b,1*c);T(a,.8*b,.5*c,!0);U(a,.7*b,(h+e)*c,(g+e)*b,(h+d)*c,.2*b,1*c);U(a,.45*b,.75*c,.45*b,.25*c,.2*b,0);U(a,(g+e)* b,(h-d)*c,.7*b,(h-e)*c,.8*b,.5*c);d=.1;e=.1*Jd;g=.9;h=.5;T(a,(g-d)*b,h*c,!0);U(a,(g-d)*b,(h-e)*c,(g-e)*b,(h-d)*c,g*b,(h-d)*c);U(a,(g+e)*b,(h-d)*c,(g+d)*b,(h-e)*c,(g+d)*b,h*c);U(a,(g+d)*b,(h+e)*c,(g+e)*b,(h+d)*c,g*b,(h+d)*c);U(a,(g-e)*b,(h+d)*c,(g-d)*b,(h+e)*c,(g-d)*b,h*c);b=a.q;b.C=new S(.4,.25);b.D=new S(.65,.75);D.u(a);return b},XorGate:function(a,b,c){a=D.v();var d=.5*Jd;T(a,.1*b,0,!1);U(a,.35*b,.25*c,.35*b,.75*c,.1*b,1*c);T(a,.2*b,0,!0);U(a,(.2+d)*b,0*c,.9*b,(.5-d)*c,1*b,.5*c);U(a,.9*b,(.5+d)* c,(.2+d)*b,1*c,.2*b,1*c);U(a,.45*b,.75*c,.45*b,.25*c,.2*b,0);X(a);b=a.q;b.C=new S(.4,.25);b.D=new S(.8,.75);D.u(a);return b},Capacitor:function(a,b,c){a=D.v();T(a,0,0,!1);a.lineTo(0,1*c);a.moveTo(1*b,0);a.lineTo(1*b,1*c);b=a.q;D.u(a);return b},Resistor:function(a,b,c){a=D.v();T(a,0,.5*c,!1);a.lineTo(.1*b,0);a.lineTo(.2*b,1*c);a.lineTo(.3*b,0);a.lineTo(.4*b,1*c);a.lineTo(.5*b,0);a.lineTo(.6*b,1*c);a.lineTo(.7*b,.5*c);b=a.q;D.u(a);return b},Inductor:function(a,b,c){a=D.v();var d=.1*Jd,e=.1;T(a,(e-.5* d)*b,c,!1);U(a,(e-d)*b,c,(e-.1)*b,0,(e+.1)*b,0);e=.3;U(a,(e+.1)*b,0,(e+d)*b,c,e*b,c);U(a,(e-d)*b,c,(e-.1)*b,0,(e+.1)*b,0);e=.5;U(a,(e+.1)*b,0,(e+d)*b,c,e*b,c);U(a,(e-d)*b,c,(e-.1)*b,0,(e+.1)*b,0);e=.7;U(a,(e+.1)*b,0,(e+d)*b,c,e*b,c);U(a,(e-d)*b,c,(e-.1)*b,0,(e+.1)*b,0);e=.9;U(a,(e+.1)*b,0,(e+d)*b,c,(e+.5*d)*b,c);b=a.q;D.u(a);return b},ACvoltageSource:function(a,b,c){a=D.v();var d=.5*Jd;T(a,0*b,.5*c,!1);U(a,0*b,(.5-d)*c,(.5-d)*b,0*c,.5*b,0*c);U(a,(.5+d)*b,0*c,1*b,(.5-d)*c,1*b,.5*c);U(a,1*b,(.5+d)* c,(.5+d)*b,1*c,.5*b,1*c);U(a,(.5-d)*b,1*c,0*b,(.5+d)*c,0*b,.5*c);a.moveTo(.1*b,.5*c);U(a,.5*b,0*c,.5*b,1*c,.9*b,.5*c);b=a.q;b.me=ak;D.u(a);return b},DCvoltageSource:function(a,b,c){a=D.v();T(a,0,.75*c,!1);a.lineTo(0,.25*c);a.moveTo(1*b,0);a.lineTo(1*b,1*c);b=a.q;D.u(a);return b},Diode:function(a,b,c){a=D.v();T(a,1*b,0,!1);a.lineTo(1*b,.5*c);a.lineTo(0,1*c);a.lineTo(0,0);a.lineTo(1*b,.5*c);a.lineTo(1*b,1*c);b=a.q;b.C=new S(0,.25);b.D=new S(.5,.75);D.u(a);return b},Wifi:function(a,b,c){var d=b,e=c; b*=.38;c*=.6;a=D.v();var g=.8*Jd,h=.8,k=0,l=.5,d=(d-b)/2,e=(e-c)/2;T(a,k*b+d,(l+h)*c+e,!0);U(a,(k-g)*b+d,(l+h)*c+e,(k-h)*b+d,(l+g)*c+e,(k-h)*b+d,l*c+e);U(a,(k-h)*b+d,(l-g)*c+e,(k-g)*b+d,(l-h)*c+e,k*b+d,(l-h)*c+e);U(a,k*b+d,(l-h)*c+e,(k-h+.5*g)*b+d,(l-g)*c+e,(k-h+.5*g)*b+d,l*c+e);U(a,(k-h+.5*g)*b+d,(l+g)*c+e,k*b+d,(l+h)*c+e,k*b+d,(l+h)*c+e);X(a);g=.4*Jd;h=.4;k=.2;l=.5;T(a,k*b+d,(l+h)*c+e,!0);U(a,(k-g)*b+d,(l+h)*c+e,(k-h)*b+d,(l+g)*c+e,(k-h)*b+d,l*c+e);U(a,(k-h)*b+d,(l-g)*c+e,(k-g)*b+d,(l-h)*c+e,k* b+d,(l-h)*c+e);U(a,k*b+d,(l-h)*c+e,(k-h+.5*g)*b+d,(l-g)*c+e,(k-h+.5*g)*b+d,l*c+e);U(a,(k-h+.5*g)*b+d,(l+g)*c+e,k*b+d,(l+h)*c+e,k*b+d,(l+h)*c+e);X(a);g=.2*Jd;h=.2;l=k=.5;T(a,(k-h)*b+d,l*c+e,!0);U(a,(k-h)*b+d,(l-g)*c+e,(k-g)*b+d,(l-h)*c+e,k*b+d,(l-h)*c+e);U(a,(k+g)*b+d,(l-h)*c+e,(k+h)*b+d,(l-g)*c+e,(k+h)*b+d,l*c+e);U(a,(k+h)*b+d,(l+g)*c+e,(k+g)*b+d,(l+h)*c+e,k*b+d,(l+h)*c+e);U(a,(k-g)*b+d,(l+h)*c+e,(k-h)*b+d,(l+g)*c+e,(k-h)*b+d,l*c+e);g=.4*Jd;h=.4;k=.8;l=.5;T(a,k*b+d,(l-h)*c+e,!0);U(a,(k+g)*b+d,(l- h)*c+e,(k+h)*b+d,(l-g)*c+e,(k+h)*b+d,l*c+e);U(a,(k+h)*b+d,(l+g)*c+e,(k+g)*b+d,(l+h)*c+e,k*b+d,(l+h)*c+e);U(a,k*b+d,(l+h)*c+e,(k+h-.5*g)*b+d,(l+g)*c+e,(k+h-.5*g)*b+d,l*c+e);U(a,(k+h-.5*g)*b+d,(l-g)*c+e,k*b+d,(l-h)*c+e,k*b+d,(l-h)*c+e);X(a);g=.8*Jd;h=.8;k=1;l=.5;T(a,k*b+d,(l-h)*c+e,!0);U(a,(k+g)*b+d,(l-h)*c+e,(k+h)*b+d,(l-g)*c+e,(k+h)*b+d,l*c+e);U(a,(k+h)*b+d,(l+g)*c+e,(k+g)*b+d,(l+h)*c+e,k*b+d,(l+h)*c+e);U(a,k*b+d,(l+h)*c+e,(k+h-.5*g)*b+d,(l+g)*c+e,(k+h-.5*g)*b+d,l*c+e);U(a,(k+h-.5*g)*b+d,(l-g)*c+ e,k*b+d,(l-h)*c+e,k*b+d,(l-h)*c+e);X(a);b=a.q;D.u(a);return b},Email:function(a,b,c){a=D.v();T(a,0,0,!0);a.lineTo(1*b,0);a.lineTo(1*b,1*c);a.lineTo(0,1*c);a.lineTo(0,0);X(a);T(a,0,0,!1);a.lineTo(.5*b,.6*c);a.lineTo(1*b,0);a.moveTo(0,1*c);a.lineTo(.45*b,.54*c);a.moveTo(1*b,1*c);a.lineTo(.55*b,.54*c);a.kb(!1);b=a.q;D.u(a);return b},Ethernet:function(a,b,c){a=D.v();T(a,.35*b,0,!0);a.lineTo(.65*b,0);a.lineTo(.65*b,.4*c);a.lineTo(.35*b,.4*c);a.lineTo(.35*b,0);X(a);T(a,.1*b,1*c,!0,!0);a.lineTo(.4*b,1*c); a.lineTo(.4*b,.6*c);a.lineTo(.1*b,.6*c);a.lineTo(.1*b,1*c);X(a);T(a,.6*b,1*c,!0,!0);a.lineTo(.9*b,1*c);a.lineTo(.9*b,.6*c);a.lineTo(.6*b,.6*c);a.lineTo(.6*b,1*c);X(a);T(a,0,.5*c,!1);a.lineTo(1*b,.5*c);a.moveTo(.5*b,.5*c);a.lineTo(.5*b,.4*c);a.moveTo(.75*b,.5*c);a.lineTo(.75*b,.6*c);a.moveTo(.25*b,.5*c);a.lineTo(.25*b,.6*c);a.kb(!1);b=a.q;D.u(a);return b},Power:function(a,b,c){a=D.v();var d=.4*Jd,e=.4,g=D.P(),h=D.P(),k=D.P(),l=D.P();Ce(.5,.5-e,.5+d,.5-e,.5+e,.5-d,.5+e,.5,.5,g,g,h,k,l);var m=D.Fb(h.x, h.y);T(a,h.x*b,h.y*c,!0);U(a,k.x*b,k.y*c,l.x*b,l.y*c,(.5+e)*b,.5*c);U(a,(.5+e)*b,(.5+d)*c,(.5+d)*b,(.5+e)*c,.5*b,(.5+e)*c);U(a,(.5-d)*b,(.5+e)*c,(.5-e)*b,(.5+d)*c,(.5-e)*b,.5*c);Ce(.5-e,.5,.5-e,.5-d,.5-d,.5-e,.5,.5-e,.5,k,l,h,g,g);U(a,k.x*b,k.y*c,l.x*b,l.y*c,h.x*b,h.y*c);d=.3*Jd;e=.3;Ce(.5-e,.5,.5-e,.5-d,.5-d,.5-e,.5,.5-e,.5,k,l,h,g,g);a.lineTo(h.x*b,h.y*c);U(a,l.x*b,l.y*c,k.x*b,k.y*c,(.5-e)*b,.5*c);U(a,(.5-e)*b,(.5+d)*c,(.5-d)*b,(.5+e)*c,.5*b,(.5+e)*c);U(a,(.5+d)*b,(.5+e)*c,(.5+e)*b,(.5+d)*c,(.5+ e)*b,.5*c);Ce(.5,.5-e,.5+d,.5-e,.5+e,.5-d,.5+e,.5,.5,g,g,h,k,l);U(a,l.x*b,l.y*c,k.x*b,k.y*c,h.x*b,h.y*c);X(a);T(a,.45*b,0,!0);a.lineTo(.45*b,.5*c);a.lineTo(.55*b,.5*c);a.lineTo(.55*b,0);X(a);D.A(g);D.A(h);D.A(k);D.A(l);D.A(m);b=a.q;b.C=new S(.25,.55);b.D=new S(.75,.8);D.u(a);return b},Fallout:function(a,b,c){a=D.v();var d=.5*Jd;T(a,0*b,.5*c,!0);U(a,0*b,(.5-d)*c,(.5-d)*b,0*c,.5*b,0*c);U(a,(.5+d)*b,0*c,1*b,(.5-d)*c,1*b,.5*c);U(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);U(a,(.5-d)*b,1*c,0*b,(.5+d)*c,0*b, .5*c);var e=d=0;T(a,(.3+d)*b,(.8+e)*c,!0,!0);a.lineTo((.5+d)*b,(.5+e)*c);a.lineTo((.1+d)*b,(.5+e)*c);a.lineTo((.3+d)*b,(.8+e)*c);d=.4;e=0;X(a);T(a,(.3+d)*b,(.8+e)*c,!0,!0);a.lineTo((.5+d)*b,(.5+e)*c);a.lineTo((.1+d)*b,(.5+e)*c);a.lineTo((.3+d)*b,(.8+e)*c);d=.2;e=-.3;X(a);T(a,(.3+d)*b,(.8+e)*c,!0,!0);a.lineTo((.5+d)*b,(.5+e)*c);a.lineTo((.1+d)*b,(.5+e)*c);a.lineTo((.3+d)*b,(.8+e)*c);X(a);b=a.q;b.me=ak;D.u(a);return b},IrritationHazard:function(a,b,c){a=D.v();T(a,.2*b,0*c,!0);a.lineTo(.5*b,.3*c);a.lineTo(.8* b,0*c);a.lineTo(1*b,.2*c);a.lineTo(.7*b,.5*c);a.lineTo(1*b,.8*c);a.lineTo(.8*b,1*c);a.lineTo(.5*b,.7*c);a.lineTo(.2*b,1*c);a.lineTo(0*b,.8*c);a.lineTo(.3*b,.5*c);a.lineTo(0*b,.2*c);X(a);b=a.q;b.C=new S(.3,.3);b.D=new S(.7,.7);D.u(a);return b},ElectricalHazard:function(a,b,c){a=D.v();T(a,.37*b,0*c,!0);a.lineTo(.5*b,.11*c);a.lineTo(.77*b,.04*c);a.lineTo(.33*b,.49*c);a.lineTo(1*b,.37*c);a.lineTo(.63*b,.86*c);a.lineTo(.77*b,.91*c);a.lineTo(.34*b,1*c);a.lineTo(.34*b,.78*c);a.lineTo(.44*b,.8*c);a.lineTo(.65* b,.56*c);a.lineTo(0*b,.68*c);X(a);b=a.q;D.u(a);return b},FireHazard:function(a,b,c){a=D.v();T(a,.1*b,1*c,!0);U(a,-.25*b,.63*c,.45*b,.44*c,.29*b,0*c);U(a,.48*b,.17*c,.54*b,.35*c,.51*b,.42*c);U(a,.59*b,.29*c,.58*b,.28*c,.59*b,.18*c);U(a,.8*b,.34*c,.88*b,.43*c,.75*b,.6*c);U(a,.87*b,.48*c,.88*b,.43*c,.88*b,.31*c);U(a,1.17*b,.76*c,.82*b,.8*c,.9*b,1*c);X(a);b=a.q;b.C=new S(.05,.645);b.D=new S(.884,.908);D.u(a);return b},BpmnActivityLoop:function(a,b,c){a=D.v();var d=4*(Math.SQRT2-1)/3*.5;T(a,.65*b,1*c, !1);U(a,(1-d+0)*b,1*c,1*b,(.5+d+0)*c,1*b,.5*c);U(a,1*b,(.5-d+0)*c,(.5+d+0)*b,0*c,.5*b,0*c);U(a,(.5-d+0)*b,0*c,0*b,(.5-d+0)*c,0*b,.5*c);U(a,0*b,(.5+d+0)*c,(.5-d+0)*b,1*c,.35*b,.98*c);a.moveTo(.25*b,.8*c);a.lineTo(.35*b,1*c);a.lineTo(.1*b,1*c);b=a.q;D.u(a);return b},BpmnActivityParallel:function(a,b,c){a=D.v();T(a,0,0,!1);a.lineTo(0,1*c);a.moveTo(.5*b,0);a.lineTo(.5*b,1*c);a.moveTo(1*b,0);a.lineTo(1*b,1*c);b=a.q;D.u(a);return b},BpmnActivitySequential:function(a,b,c){a=D.v();T(a,0,0,!1);a.lineTo(1* b,0);a.moveTo(0,.5*c);a.lineTo(1*b,.5*c);a.moveTo(0,1*c);a.lineTo(1*b,1*c);b=a.q;D.u(a);return b},BpmnActivityAdHoc:function(a,b,c){a=D.v();T(a,0,0,!1);T(a,1*b,1*c,!1);T(a,0,.5*c,!1);U(a,.2*b,.35*c,.3*b,.35*c,.5*b,.5*c);U(a,.7*b,.65*c,.8*b,.65*c,1*b,.5*c);b=a.q;D.u(a);return b},BpmnActivityCompensation:function(a,b,c){a=D.v();T(a,0,.5*c,!0);a.lineTo(.5*b,0);a.lineTo(.5*b,.5*c);a.lineTo(1*b,1*c);a.lineTo(1*b,0);a.lineTo(.5*b,.5*c);a.lineTo(.5*b,1*c);X(a);b=a.q;D.u(a);return b},BpmnTaskMessage:function(a, b,c){a=D.v();T(a,0,.2*c,!0);a.lineTo(1*b,.2*c);a.lineTo(1*b,.8*c);a.lineTo(0,.8*c);a.lineTo(0,.8*c);X(a);T(a,0,.2*c,!1);a.lineTo(.5*b,.5*c);a.lineTo(1*b,.2*c);a.kb(!1);b=a.q;D.u(a);return b},BpmnTaskScript:function(a,b,c){a=D.v();T(a,.7*b,1*c,!0);a.lineTo(.3*b,1*c);U(a,.6*b,.5*c,0,.5*c,.3*b,0);a.lineTo(.7*b,0);U(a,.4*b,.5*c,1*b,.5*c,.7*b,1*c);X(a);T(a,.45*b,.73*c,!1);a.lineTo(.7*b,.73*c);a.moveTo(.38*b,.5*c);a.lineTo(.63*b,.5*c);a.moveTo(.31*b,.27*c);a.lineTo(.56*b,.27*c);a.kb(!1);b=a.q;D.u(a);return b}, BpmnTaskUser:function(a,b,c){a=D.v();T(a,0,0,!1);T(a,.335*b,(1-.555)*c,!0);a.lineTo(.335*b,.595*c);a.lineTo(.665*b,.595*c);a.lineTo(.665*b,(1-.555)*c);U(a,.88*b,.46*c,.98*b,.54*c,1*b,.68*c);a.lineTo(1*b,1*c);a.lineTo(0,1*c);a.lineTo(0,.68*c);U(a,.02*b,.54*c,.12*b,.46*c,.335*b,(1-.555)*c);a.lineTo(.365*b,.405*c);var d=.5-.285,e=Math.PI/4,g=4*(1-Math.cos(e))/(3*Math.sin(e)),e=g*d,g=g*d;U(a,(.5-(e+d)/2)*b,(d+(d+g)/2)*c,(.5-d)*b,(d+g)*c,(.5-d)*b,d*c);U(a,(.5-d)*b,(d-g)*c,(.5-e)*b,(d-d)*c,.5*b,(d-d)*c); U(a,(.5+e)*b,(d-d)*c,(.5+d)*b,(d-g)*c,(.5+d)*b,d*c);U(a,(.5+d)*b,(d+g)*c,(.5+(e+d)/2)*b,(d+(d+g)/2)*c,.635*b,.405*c);a.lineTo(.635*b,.405*c);a.lineTo(.665*b,(1-.555)*c);a.lineTo(.665*b,.595*c);a.lineTo(.335*b,.595*c);T(a,.2*b,1*c,!1);a.lineTo(.2*b,.8*c);T(a,.8*b,1*c,!1);a.lineTo(.8*b,.8*c);b=a.q;D.u(a);return b},BpmnEventConditional:function(a,b,c){a=D.v();T(a,.1*b,0,!0);a.lineTo(.9*b,0);a.lineTo(.9*b,1*c);a.lineTo(.1*b,1*c);X(a);T(a,.2*b,.2*c,!1);a.lineTo(.8*b,.2*c);a.moveTo(.2*b,.4*c);a.lineTo(.8* b,.4*c);a.moveTo(.2*b,.6*c);a.lineTo(.8*b,.6*c);a.moveTo(.2*b,.8*c);a.lineTo(.8*b,.8*c);a.kb(!1);b=a.q;D.u(a);return b},BpmnEventError:function(a,b,c){a=D.v();T(a,0,1*c,!0);a.lineTo(.33*b,0);a.lineTo(.66*b,.5*c);a.lineTo(1*b,0);a.lineTo(.66*b,1*c);a.lineTo(.33*b,.5*c);X(a);b=a.q;D.u(a);return b},BpmnEventEscalation:function(a,b,c){a=D.v();T(a,0,0,!1);T(a,1*b,1*c,!1);T(a,.1*b,1*c,!0);a.lineTo(.5*b,0);a.lineTo(.9*b,1*c);a.lineTo(.5*b,.5*c);X(a);b=a.q;D.u(a);return b},BpmnEventTimer:function(a,b,c){a= D.v();var d=.5*Jd;T(a,1*b,.5*c,!0);U(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);U(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);U(a,0,(.5-d)*c,(.5-d)*b,0,.5*b,0);U(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);T(a,.5*b,0,!1);a.lineTo(.5*b,.15*c);a.moveTo(.5*b,1*c);a.lineTo(.5*b,.85*c);a.moveTo(0,.5*c);a.lineTo(.15*b,.5*c);a.moveTo(1*b,.5*c);a.lineTo(.85*b,.5*c);a.moveTo(.5*b,.5*c);a.lineTo(.58*b,.1*c);a.moveTo(.5*b,.5*c);a.lineTo(.78*b,.54*c);a.kb(!1);b=a.q;b.me=ak;D.u(a);return b}},dr;for(dr in qq)qq[dr.toLowerCase()]=dr; var xq={"":"",Standard:"F1 m 0,0 l 8,4 -8,4 2,-4 z",Backward:"F1 m 8,0 l -2,4 2,4 -8,-4 z",Triangle:"F1 m 0,0 l 8,4.62 -8,4.62 z",BackwardTriangle:"F1 m 8,4 l 0,4 -8,-4 8,-4 0,4 z",Boomerang:"F1 m 0,0 l 8,4 -8,4 4,-4 -4,-4 z",BackwardBoomerang:"F1 m 8,0 l -8,4 8,4 -4,-4 4,-4 z",SidewaysV:"m 0,0 l 8,4 -8,4 0,-1 6,-3 -6,-3 0,-1 z",BackwardV:"m 8,0 l -8,4 8,4 0,-1 -6,-3 6,-3 0,-1 z",OpenTriangle:"m 0,0 l 8,4 -8,4",BackwardOpenTriangle:"m 8,0 l -8,4 8,4",OpenTriangleLine:"m 0,0 l 8,4 -8,4 m 8.5,0 l 0,-8", BackwardOpenTriangleLine:"m 8,0 l -8,4 8,4 m -8.5,0 l 0,-8",OpenTriangleTop:"m 0,0 l 8,4 m 0,4",BackwardOpenTriangleTop:"m 8,0 l -8,4 m 0,4",OpenTriangleBottom:"m 0,8 l 8,-4",BackwardOpenTriangleBottom:"m 0,4 l 8,4",HalfTriangleTop:"F1 m 0,0 l 0,4 8,0 z m 0,8",BackwardHalfTriangleTop:"F1 m 8,0 l 0,4 -8,0 z m 0,8",HalfTriangleBottom:"F1 m 0,4 l 0,4 8,-4 z",BackwardHalfTriangleBottom:"F1 m 8,4 l 0,4 -8,-4 z",ForwardSemiCircle:"m 4,0 b 270 180 0 4 4",BackwardSemiCircle:"m 4,8 b 90 180 0 -4 4",Feather:"m 0,0 l 3,4 -3,4", BackwardFeather:"m 3,0 l -3,4 3,4",DoubleFeathers:"m 0,0 l 3,4 -3,4 m 3,-8 l 3,4 -3,4",BackwardDoubleFeathers:"m 3,0 l -3,4 3,4 m 3,-8 l -3,4 3,4",TripleFeathers:"m 0,0 l 3,4 -3,4 m 3,-8 l 3,4 -3,4 m 3,-8 l 3,4 -3,4",BackwardTripleFeathers:"m 3,0 l -3,4 3,4 m 3,-8 l -3,4 3,4 m 3,-8 l -3,4 3,4",ForwardSlash:"m 0,8 l 5,-8",BackSlash:"m 0,0 l 5,8",DoubleForwardSlash:"m 0,8 l 4,-8 m -2,8 l 4,-8",DoubleBackSlash:"m 0,0 l 4,8 m -2,-8 l 4,8",TripleForwardSlash:"m 0,8 l 4,-8 m -2,8 l 4,-8 m -2,8 l 4,-8", TripleBackSlash:"m 0,0 l 4,8 m -2,-8 l 4,8 m -2,-8 l 4,8",Fork:"m 0,4 l 8,0 m -8,0 l 8,-4 m -8,4 l 8,4",BackwardFork:"m 8,4 l -8,0 m 8,0 l -8,-4 m 8,4 l -8,4",LineFork:"m 0,0 l 0,8 m 0,-4 l 8,0 m -8,0 l 8,-4 m -8,4 l 8,4",BackwardLineFork:"m 8,4 l -8,0 m 8,0 l -8,-4 m 8,4 l -8,4 m 8,-8 l 0,8",CircleFork:"F1 m 6,4 b 0 360 -3 0 3 z m 0,0 l 6,0 m -6,0 l 6,-4 m -6,4 l 6,4",BackwardCircleFork:"F1 m 0,4 l 6,0 m -6,-4 l 6,4 m -6,4 l 6,-4 m 6,0 b 0 360 -3 0 3",CircleLineFork:"F1 m 6,4 b 0 360 -3 0 3 z m 1,-4 l 0,8 m 0,-4 l 6,0 m -6,0 l 6,-4 m -6,4 l 6,4", BackwardCircleLineFork:"F1 m 0,4 l 6,0 m -6,-4 l 6,4 m -6,4 l 6,-4 m 0,-4 l 0,8 m 7,-4 b 0 360 -3 0 3",Circle:"F1 m 8,4 b 0 360 -4 0 4 z",Block:"F1 m 0,0 l 0,8 8,0 0,-8 z",StretchedDiamond:"F1 m 0,3 l 5,-3 5,3 -5,3 -5,-3 z",Diamond:"F1 m 0,4 l 4,-4 4,4 -4,4 -4,-4 z",Chevron:"F1 m 0,0 l 5,0 3,4 -3,4 -5,0 3,-4 -3,-4 z",StretchedChevron:"F1 m 0,0 l 8,0 3,4 -3,4 -8,0 3,-4 -3,-4 z",NormalArrow:"F1 m 0,2 l 4,0 0,-2 4,4 -4,4 0,-2 -4,0 z",X:"m 0,0 l 8,8 m 0,-8 l -8,8",TailedNormalArrow:"F1 m 0,0 l 2,0 1,2 3,0 0,-2 2,4 -2,4 0,-2 -3,0 -1,2 -2,0 1,-4 -1,-4 z", DoubleTriangle:"F1 m 0,0 l 4,4 -4,4 0,-8 z m 4,0 l 4,4 -4,4 0,-8 z",BigEndArrow:"F1 m 0,0 l 5,2 0,-2 3,4 -3,4 0,-2 -5,2 0,-8 z",ConcaveTailArrow:"F1 m 0,2 h 4 v -2 l 4,4 -4,4 v -2 h -4 l 2,-2 -2,-2 z",RoundedTriangle:"F1 m 0,1 a 1,1 0 0 1 1,-1 l 7,3 a 0.5,1 0 0 1 0,2 l -7,3 a 1,1 0 0 1 -1,-1 l 0,-6 z",SimpleArrow:"F1 m 1,2 l -1,-2 2,0 1,2 -1,2 -2,0 1,-2 5,0 0,-2 2,2 -2,2 0,-2 z",AccelerationArrow:"F1 m 0,0 l 0,8 0.2,0 0,-8 -0.2,0 z m 2,0 l 0,8 1,0 0,-8 -1,0 z m 3,0 l 2,0 2,4 -2,4 -2,0 0,-8 z",BoxArrow:"F1 m 0,0 l 4,0 0,2 2,0 0,-2 2,4 -2,4 0,-2 -2,0 0,2 -4,0 0,-8 z", TriangleLine:"F1 m 8,4 l -8,-4 0,8 8,-4 z m 0.5,4 l 0,-8",CircleEndedArrow:"F1 m 10,4 l -2,-3 0,2 -2,0 0,2 2,0 0,2 2,-3 z m -4,0 b 0 360 -3 0 3 z",DynamicWidthArrow:"F1 m 0,3 l 2,0 2,-1 2,-2 2,4 -2,4 -2,-2 -2,-1 -2,0 0,-2 z",EquilibriumArrow:"m 0,3 l 8,0 -3,-3 m 3,5 l -8,0 3,3",FastForward:"F1 m 0,0 l 3.5,4 0,-4 3.5,4 0,-4 1,0 0,8 -1,0 0,-4 -3.5,4 0,-4 -3.5,4 0,-8 z",Kite:"F1 m 0,4 l 2,-4 6,4 -6,4 -2,-4 z",HalfArrowTop:"F1 m 0,0 l 4,4 4,0 -8,-4 z m 0,8",HalfArrowBottom:"F1 m 0,8 l 4,-4 4,0 -8,4 z", OpposingDirectionDoubleArrow:"F1 m 0,4 l 2,-4 0,2 4,0 0,-2 2,4 -2,4 0,-2 -4,0 0,2 -2,-4 z",PartialDoubleTriangle:"F1 m 0,0 4,3 0,-3 4,4 -4,4 0,-3 -4,3 0,-8 z",LineCircle:"F1 m 0,0 l 0,8 m 7 -4 b 0 360 -3 0 3 z",DoubleLineCircle:"F1 m 0,0 l 0,8 m 2,-8 l 0,8 m 7 -4 b 0 360 -3 0 3 z",TripleLineCircle:"F1 m 0,0 l 0,8 m 2,-8 l 0,8 m 2,-8 l 0,8 m 7 -4 b 0 360 -3 0 3 z",CircleLine:"F1 m 6 4 b 0 360 -3 0 3 z m 1,-4 l 0,8",DiamondCircle:"F1 m 8,4 l -4,4 -4,-4 4,-4 4,4 m 8,0 b 0 360 -4 0 4 z",PlusCircle:"F1 m 8,4 b 0 360 -4 0 4 l -8 0 z m -4 -4 l 0 8", OpenRightTriangleTop:"m 8,0 l 0,4 -8,0 m 0,4",OpenRightTriangleBottom:"m 8,8 l 0,-4 -8,0",Line:"m 0,0 l 0,8",DoubleLine:"m 0,0 l 0,8 m 2,0 l 0,-8",TripleLine:"m 0,0 l 0,8 m 2,0 l 0,-8 m 2,0 l 0,8",PentagonArrow:"F1 m 8,4 l -4,-4 -4,0 0,8 4,0 4,-4 z"}; function uq(a){var b=ne[a];if(void 0===b){var c=a.toLowerCase();if("none"===c)return"None";b=ne[c];if(void 0===b){var d=null,e;for(e in xq)if(e.toLowerCase()===c){d=e;break}if(null!==d)return a=yf(xq[d],!1),ne[d]=a,c!==d&&(ne[c]=d),d}}return"string"===typeof b?b:b instanceof Ve?a:null} function F(a){x.call(this,a);this.S=2408959;this.Ol=this.Si="";this.nt=this.kt=this.wt=this.ws=null;this.yt="";this.mh=this.hs=this.xt=this.tn=null;this.mt="";this.Ep=null;this.lt=ie;this.ot="";this.Fp=null;this.Vd="";this.sw=this.ur=this.Bl=null;this.kj=(new N(NaN,NaN)).freeze();this.Bs="";this.Rl=null;this.Cs=ec;this.Ks=Vd;this.Ds=Wd;this.Qr=null;this.xs=er;this.vn=Ud;this.un="gray";this.Pg=4;this.OD=-1;this.Vt=NaN;this.BH=new C;this.Tl=null;this.zk=NaN}D.Ta(F,x);D.ka("Part",F); F.prototype.cloneProtected=function(a){x.prototype.cloneProtected.call(this,a);a.S=this.S&-4097|49152;a.Si=this.Si;a.Ol=this.Ol;a.ws=this.ws;a.wt=this.wt;a.kt=this.kt;a.nt=this.nt;a.yt=this.yt;a.xt=this.xt;a.hs=this.hs;a.mh=null;a.mt=this.mt;a.lt=this.lt.V();a.ot=this.ot;a.Vd=this.Vd;a.ur=this.ur;a.kj.assign(this.kj);a.Bs=this.Bs;a.Cs=this.Cs.V();a.Ks=this.Ks.V();a.Ds=this.Ds.V();a.Qr=this.Qr;a.xs=this.xs;a.vn=this.vn.V();a.un=this.un;a.Pg=this.Pg;a.Vt=this.Vt}; F.prototype.Gi=function(a){x.prototype.Gi.call(this,a);a.dl();a.tn=null;a.Ep=null;a.Fp=null;a.Rl=null;a.Tl=null};F.prototype.toString=function(){var a=D.wf(Object.getPrototypeOf(this))+"#"+D.Kd(this);null!==this.data&&(a+="("+ia(this.data)+")");return a};F.LayoutNone=0;var Vm;F.LayoutAdded=Vm=1;var dn;F.LayoutRemoved=dn=2;F.LayoutShown=4;F.LayoutHidden=8;F.LayoutNodeSized=16;var Kn;F.LayoutGroupLayout=Kn=32;F.LayoutNodeReplaced=64;var er;F.LayoutStandard=er=Vm|dn|28|Kn|64;F.LayoutAll=16777215; F.prototype.po=function(a,b,c,d,e,g,h){var k=this.g;null!==k&&(a===rg&&"elements"===b?e instanceof x?Wm(e,function(a){Ym(k,a);Xm(k,a)}):e instanceof Gl&&wn(k,e):a===sg&&"elements"===b&&(e instanceof x?Wm(e,function(a){bn(k,a);an(k,a)}):e instanceof Gl&&xn(k,e)),k.md(a,b,c,d,e,g,h))};F.prototype.updateTargetBindings=F.prototype.Ob=function(a){x.prototype.Ob.call(this,a);if(null!==this.data){a=this.xa.o;for(var b=a.length,c=0;ch&&a.y>k&&a.righth&&b.y>k&&b.right=c.JJ)){this.S^=4096;var d=!1;if(null!==c){d=c.lb;c.lb=!0;var e=c.selection;e.Xa();a?e.add(this):e.remove(this);e.freeze()}this.i("isSelected",b,a);this.oe();a=this.oK;null!==a&&a(this);null!==c&&(c.Xe(),c.lb=d)}}}); D.defineProperty(F,{Zg:"isHighlighted"},function(){return 0!==(this.S&524288)},function(a){var b=0!==(this.S&524288);if(b!==a){v&&D.h(a,"boolean",F,"isHighlighted");this.S^=524288;var c=this.g;null!==c&&(c=c.wm,c.Xa(),a?c.add(this):c.remove(this),c.freeze());this.i("isHighlighted",b,a);this.ra();a=this.cJ;null!==a&&a(this)}}); D.defineProperty(F,{el:"isShadowed"},function(){return 0!==(this.S&8192)},function(a){var b=0!==(this.S&8192);b!==a&&(v&&D.h(a,"boolean",F,"isShadowed"),this.S^=8192,this.i("isShadowed",b,a),this.ra())});function Om(a){return 0!==(a.S&32768)}function hr(a,b){a.S=b?a.S|32768:a.S&-32769}function Po(a,b){a.S=b?a.S|65536:a.S&-65537}function sl(a){return 0!==(a.S&131072)}F.prototype.Of=function(a){this.S=a?this.S|131072:this.S&-131073};function qr(a,b){a.S=b?a.S|1048576:a.S&-1048577} D.defineProperty(F,{bG:"isAnimated"},function(){return 0!==(this.S&262144)},function(a){var b=0!==(this.S&262144);b!==a&&(v&&D.h(a,"boolean",F,"isAnimated"),this.S^=262144,this.i("isAnimated",b,a))});D.defineProperty(F,{cJ:"highlightedChanged"},function(){return this.hs},function(a){var b=this.hs;b!==a&&(null!==a&&D.h(a,"function",F,"highlightedChanged"),this.hs=a,this.i("highlightedChanged",b,a))}); D.defineProperty(F,{Py:"selectionObjectName"},function(){return this.yt},function(a){var b=this.yt;b!==a&&(v&&D.h(a,"string",F,"selectionObjectName"),this.yt=a,this.tn=null,this.i("selectionObjectName",b,a))});D.defineProperty(F,{nK:"selectionAdornmentTemplate"},function(){return this.wt},function(a){var b=this.wt;b!==a&&(v&&D.l(a,da,F,"selectionAdornmentTemplate"),this instanceof J&&(a.type=rj),this.wt=a,this.i("selectionAdornmentTemplate",b,a))}); D.w(F,{so:"selectionObject"},function(){if(null===this.tn){var a=this.Py;null!==a&&""!==a?(a=this.Jd(a),this.tn=null!==a?a:this):this instanceof J?(a=this.path,this.tn=null!==a?a:this):this.tn=this}return this.tn});D.defineProperty(F,{oK:"selectionChanged"},function(){return this.xt},function(a){var b=this.xt;b!==a&&(null!==a&&D.h(a,"function",F,"selectionChanged"),this.xt=a,this.i("selectionChanged",b,a))}); D.defineProperty(F,{NG:"resizeAdornmentTemplate"},function(){return this.kt},function(a){var b=this.kt;b!==a&&(v&&D.l(a,da,F,"resizeAdornmentTemplate"),this.kt=a,this.i("resizeAdornmentTemplate",b,a))});D.defineProperty(F,{PG:"resizeObjectName"},function(){return this.mt},function(a){var b=this.mt;b!==a&&(v&&D.h(a,"string",F,"resizeObjectName"),this.mt=a,this.Ep=null,this.i("resizeObjectName",b,a))}); D.w(F,{OG:"resizeObject"},function(){if(null===this.Ep){var a=this.PG;null!==a&&""!==a?(a=this.Jd(a),this.Ep=null!==a?a:this):this.Ep=this}return this.Ep});D.defineProperty(F,{eK:"resizeCellSize"},function(){return this.lt},function(a){var b=this.lt;b.O(a)||(v&&D.l(a,Ca,F,"resizeCellSize"),this.lt=a=a.V(),this.i("resizeCellSize",b,a))}); D.defineProperty(F,{gK:"rotateAdornmentTemplate"},function(){return this.nt},function(a){var b=this.nt;b!==a&&(v&&D.l(a,da,F,"rotateAdornmentTemplate"),this.nt=a,this.i("rotateAdornmentTemplate",b,a))});D.defineProperty(F,{hK:"rotateObjectName"},function(){return this.ot},function(a){var b=this.ot;b!==a&&(v&&D.h(a,"string",F,"rotateObjectName"),this.ot=a,this.Fp=null,this.i("rotateObjectName",b,a))}); D.w(F,{RB:"rotateObject"},function(){if(null===this.Fp){var a=this.hK;null!==a&&""!==a?(a=this.Jd(a),this.Fp=null!==a?a:this):this.Fp=this}return this.Fp});D.defineProperty(F,{text:"text"},function(){return this.Vd},function(a){var b=this.Vd;b!==a&&(v&&D.h(a,"string",F,"text"),this.Vd=a,this.i("text",b,a))}); D.defineProperty(F,{Ka:"containingGroup"},function(){return this.Bl},function(a){if(this.pe()){var b=this.Bl;if(b!==a){v&&null!==a&&D.l(a,I,F,"containingGroup");null===a||this!==a&&!a.Ii(this)||(this===a&&D.k("Cannot make a Group a member of itself: "+this.toString()),D.k("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString()));this.N(dn);var c=this.g;null!==b?rr(b,this):this instanceof I&&null!==c&&c.am.remove(this);this.Bl=a;null!==a?sr(a,this):this instanceof I&&null!==c&&c.am.add(this);this.N(Vm);if(null!==c){var d=this.data,e=c.ea;null!==d&&e instanceof Y&&e.YB(d,e.zb(null!==a?a.data:null))}d=this.hF;null!==d&&(e=!0,null!==c&&(e=c.$a,c.$a=!0),d(this,b,a),null!==c&&(c.$a=e));if(this instanceof I)for(c=new L(F),Qh(c,this,!0,0,!0),c=c.j;c.next();)if(d=c.value,d instanceof G)for(d=d.Ld;d.next();)zn(d.value);if(this instanceof G){for(d=this.Ld;d.next();)zn(d.value);c=this.Xb;null!==c&&zn(c)}this.i("containingGroup",b,a);null!==a&&(b=a.layer,null!==b&&xl(b, -1,a))}}else D.k("cannot set the Part.containingGroup of a Link or Adornment")});f=F.prototype;f.dl=function(){var a=this.Ka;null!==a&&(a.K(),null!==a.Rb&&a.Rb.K(),a.kg())};f.ra=function(){var a=this.g;null!==a&&!Nm(this)&&!Om(this)&&this.isVisible()&&this.bc.F()&&a.ra(wl(this,this.bc))};f.K=function(){x.prototype.K.call(this);var a=this.g;null!==a&&(a.Gg.add(this),this instanceof G&&null!==this.Xb&&Zo(this.Xb),a.Xe(!0))};f.Bu=function(a){a||(a=this.Bl,null!==a&&sr(a,this))}; f.Cu=function(a){a||(a=this.Bl,null!==a&&rr(a,this))};f.Nn=function(){var a=this.data;if(null!==a){var b=this.g;null!==b&&(b=b.ea,null!==b&&b.Ky(a))}};D.defineProperty(F,{hF:"containingGroupChanged"},function(){return this.ur},function(a){var b=this.ur;b!==a&&(null!==a&&D.h(a,"function",F,"containingGroupChanged"),this.ur=a,this.i("containingGroupChanged",b,a))});F.prototype.findSubGraphLevel=function(){return tr(this,this)}; function tr(a,b){var c=b.Ka;return null!==c?1+tr(a,c):b instanceof G&&(c=b.Xb,null!==c)?tr(a,c):0}F.prototype.findTopLevelPart=function(){return ur(this,this)};function ur(a,b){var c=b.Ka;return null!==c?ur(a,c):b instanceof G&&(c=b.Xb,null!==c)?ur(a,c):b}D.w(F,{xq:"isTopLevel"},function(){return null!==this.Ka||this instanceof G&&null!==this.Xb?!1:!0});F.prototype.isMemberOf=F.prototype.Ii=function(a){return a instanceof I?vr(this,this,a):!1}; function vr(a,b,c){if(b===c||null===c)return!1;var d=b.Ka;return null===d||d!==c&&!vr(a,d,c)?b instanceof G&&(b=b.Xb,null!==b)?vr(a,b,c):!1:!0} F.prototype.findCommonContainingGroup=F.prototype.JI=function(a){if(null===a)return null;v&&D.l(a,F,F,"findCommonContainingGroup:other");if(this===a)return this.Ka;for(var b=this;null!==b;){b instanceof I&&qr(b,!0);if(b instanceof G){var c=b.Xb;null!==c&&(b=c)}b=b.Ka}for(var d=null,b=a;null!==b;){if(0!==(b.S&1048576)){d=b;break}b instanceof G&&(c=b.Xb,null!==c&&(b=c));b=b.Ka}for(b=this;null!==b;)b instanceof I&&qr(b,!1),b instanceof G&&(c=b.Xb,null!==c&&(b=c)),b=b.Ka;return d}; D.defineProperty(F,{zJ:"layoutConditions"},function(){return this.xs},function(a){var b=this.xs;b!==a&&(v&&D.h(a,"number",F,"layoutConditions"),this.xs=a,this.i("layoutConditions",b,a))});F.prototype.canLayout=function(){if(!this.rB||!this.isVisible())return!1;var a=this.layer;return null!==a&&a.Wc||this instanceof G&&this.Kf?!1:!0}; F.prototype.invalidateLayout=F.prototype.N=function(a){void 0===a&&(a=16777215);var b;this.rB&&0!==(a&this.zJ)?(b=this.layer,null!==b&&b.Wc||this instanceof G&&this.Kf?b=!1:(b=this.g,b=null!==b&&b.na.jb?!1:!0)):b=!1;if(b)if(b=this.Bl,null!==b){var c=b.Yb;null!==c?c.N():b.N(a)}else a=this.g,null!==a&&(c=a.Yb,null!==c&&c.N())};function $m(a){if(!a.isVisible())return!1;a=a.layer;return null!==a&&a.Wc?!1:!0} D.defineProperty(F,{tF:"dragComputation"},function(){return this.Qr},function(a){var b=this.Qr;b!==a&&(null!==a&&D.h(a,"function",F,"dragComputation"),this.Qr=a,this.i("dragComputation",b,a))});D.defineProperty(F,{rK:"shadowOffset"},function(){return this.vn},function(a){var b=this.vn;b.O(a)||(v&&D.l(a,N,F,"shadowOffset"),this.vn=a=a.V(),this.ra(),this.i("shadowOffset",b,a))}); D.defineProperty(F,{shadowColor:"shadowColor"},function(){return this.un},function(a){var b=this.un;b!==a&&(v&&D.h(a,"string",F,"shadowColor"),this.un=a,this.ra(),this.i("shadowColor",b,a))});D.defineProperty(F,{shadowBlur:"shadowBlur"},function(){return this.Pg},function(a){var b=this.Pg;b!==a&&(v&&D.h(a,"number",F,"shadowBlur"),this.Pg=a,this.ra(),this.i("shadowBlur",b,a))}); function da(a){0===arguments.length?F.call(this,dk):F.call(this,a);this.S&=-257;this.Ol="Adornment";this.Rc=null;this.YD=0;this.ME=!1;this.Rb=this.ph=null}D.Ta(da,F);D.ka("Adornment",da);da.prototype.toString=function(){var a=this.Hf;return"Adornment("+this.Hd+")"+(null!==a?a.toString():"")};da.prototype.updateRelationshipsFromData=function(){}; da.prototype.Ru=function(a){var b=this.Bb.Y,c=this.Bb;if(b instanceof J&&c instanceof z){var d=b.path,c=d.vf;b.Ru(a);c=d.vf;a=this.xa.o;b=a.length;for(d=0;da&&(a=1);var b=this.g;if(null!==b&&!b.Qh){b.Qh=!0;var c=new L(G);c.add(this);Hr(this,c,b.de,a,b.Ra,this,b.pC===Dl);b.Qh=!1}}; function Hr(a,b,c,d,e,g,h){if(1a&&(a=2);var b=this.g;if(null!==b&&!b.Qh){b.Qh=!0;var c=new L(G);c.add(this);Jr(this,c,b.de,a,b.Ra,this,b.pC===Dl);b.Qh=!1}};function Jr(a,b,c,d,e,g,h){for(var k=g===a?!1:a.Cc,l=c?a.Rx():a.Yg();l.next();){var m=l.value;m.Xc&&(k||m.Uf||m.ec(),m=m.fB(a),null!==m&&m!==a&&!b.contains(m)&&(b.add(m),k||(m.Md(!0),m.dl(),h&&ol(e,m,g)),2c&&(c-=180);break;case Yp:c=Re(b+90);90c&&(c-=180);break;case $p:c=Re(b-90);90c&&(c-=180);break;case aq:c=Re(b);if(45c||225c)return 0;90c&&(c-=180)}return Re(c)}; D.defineProperty(J,{aa:"fromNode"},function(){return this.Cg},function(a){var b=this.Cg;if(b!==a){v&&null!==a&&D.l(a,G,J,"fromNode");var c=this.Ac;null!==b&&(this.Tg!==b&&Er(b,this,c),Rr(this),this.N(dn));this.Cg=a;null!==a&&this.Md(a.isVisible());this.bj=null;this.ec();var d=this.g;if(null!==d){var e=this.data,g=d.ea;if(null!==e)if(g instanceof Y){var h=null!==a?a.data:null;g.WB(e,g.zb(h))}else g instanceof Bg&&(h=null!==a?a.data:null,d.de?g.Li(e,g.zb(h)):(null!==b&&g.Li(b.data,void 0),g.Li(h,g.zb(null!== this.Tg?this.Tg.data:null))))}e=this.Ac;g=this.KF;null!==g&&(h=!0,null!==d&&(h=d.$a,d.$a=!0),g(this,c,e),null!==d&&(d.$a=h));null!==a&&(this.Tg!==a&&Dr(a,this,e),Sr(this),this.N(Vm));this.i("fromNode",b,a);zn(this)}}); D.defineProperty(J,{hg:"fromPortId"},function(){return this.hi},function(a){var b=this.hi;if(b!==a){v&&D.h(a,"string",J,"fromPortId");var c=this.aa,d=this.Ac;null!==d&&Cr(c,d);Rr(this);this.hi=a;var e=this.Ac;null!==e&&Cr(c,e);c=this.g;if(null!==c){var g=this.data,h=c.ea;null!==g&&h instanceof Y&&h.XB(g,a)}d!==e&&(this.bj=null,this.ec(),g=this.KF,null!==g&&(h=!0,null!==c&&(h=c.$a,c.$a=!0),g(this,d,e),null!==c&&(c.$a=h)));Sr(this);this.i("fromPortId",b,a)}}); D.w(J,{Ac:"fromPort"},function(){var a=this.Cg;return null===a?null:a.aB(this.hi)});D.defineProperty(J,{KF:"fromPortChanged"},function(){return this.$r},function(a){var b=this.$r;b!==a&&(null!==a&&D.h(a,"function",J,"fromPortChanged"),this.$r=a,this.i("fromPortChanged",b,a))}); D.defineProperty(J,{ba:"toNode"},function(){return this.Tg},function(a){var b=this.Tg;if(b!==a){v&&null!==a&&D.l(a,G,J,"toNode");var c=this.ad;null!==b&&(this.Cg!==b&&Er(b,this,c),Rr(this),this.N(dn));this.Tg=a;null!==a&&this.Md(a.isVisible());this.bj=null;this.ec();var d=this.g;if(null!==d){var e=this.data,g=d.ea;if(null!==e)if(g instanceof Y){var h=null!==a?a.data:null;g.bC(e,g.zb(h))}else g instanceof Bg&&(h=null!==a?a.data:null,d.de?(null!==b&&g.Li(b.data,void 0),g.Li(h,g.zb(null!==this.Cg?this.Cg.data: null))):g.Li(e,g.zb(h)))}e=this.ad;g=this.lH;null!==g&&(h=!0,null!==d&&(h=d.$a,d.$a=!0),g(this,c,e),null!==d&&(d.$a=h));null!==a&&(this.Cg!==a&&Dr(a,this,e),Sr(this),this.N(Vm));this.i("toNode",b,a);zn(this)}}); D.defineProperty(J,{kh:"toPortId"},function(){return this.Ci},function(a){var b=this.Ci;if(b!==a){v&&D.h(a,"string",J,"toPortId");var c=this.ba,d=this.ad;null!==d&&Cr(c,d);Rr(this);this.Ci=a;var e=this.ad;null!==e&&Cr(c,e);c=this.g;if(null!==c){var g=this.data,h=c.ea;null!==g&&h instanceof Y&&h.cC(g,a)}d!==e&&(this.bj=null,this.ec(),g=this.lH,null!==g&&(h=!0,null!==c&&(h=c.$a,c.$a=!0),g(this,d,e),null!==c&&(c.$a=h)));Sr(this);this.i("toPortId",b,a)}}); D.w(J,{ad:"toPort"},function(){var a=this.Tg;return null===a?null:a.aB(this.Ci)});D.defineProperty(J,{lH:"toPortChanged"},function(){return this.Qt},function(a){var b=this.Qt;b!==a&&(null!==a&&D.h(a,"function",J,"toPortChanged"),this.Qt=a,this.i("toPortChanged",b,a))});D.defineProperty(J,{Gb:"fromSpot"},function(){return null!==this.$?this.$.ok:Vc},function(a){this.$d();var b=this.$.ok;b.O(a)||(v&&D.l(a,S,J,"fromSpot"),a=a.V(),this.$.ok=a,this.i("fromSpot",b,a),this.ec())}); D.defineProperty(J,{sm:"fromEndSegmentLength"},function(){return null!==this.$?this.$.mk:NaN},function(a){this.$d();var b=this.$.mk;b!==a&&(v&&D.h(a,"number",J,"fromEndSegmentLength"),0>a&&D.ua(a,">= 0",J,"fromEndSegmentLength"),this.$.mk=a,this.i("fromEndSegmentLength",b,a),this.ec())}); D.defineProperty(J,{wu:"fromEndSegmentDirection"},function(){return null!==this.$?this.$.lk:xr},function(a){this.$d();var b=this.$.lk;b!==a&&(D.On("Link.fromEndSegmentDirection","2.0"),v&&D.Da(a,G,J,"fromEndSegmentDirection"),this.$.lk=a,this.i("fromEndSegmentDirection",b,a),this.ec())}); D.defineProperty(J,{xu:"fromShortLength"},function(){return null!==this.$?this.$.nk:NaN},function(a){this.$d();var b=this.$.nk;b!==a&&(v&&D.h(a,"number",J,"fromShortLength"),this.$.nk=a,this.i("fromShortLength",b,a),this.ec())});D.defineProperty(J,{Hb:"toSpot"},function(){return null!==this.$?this.$.Mk:Vc},function(a){this.$d();var b=this.$.Mk;b.O(a)||(v&&D.l(a,S,J,"toSpot"),a=a.V(),this.$.Mk=a,this.i("toSpot",b,a),this.ec())}); D.defineProperty(J,{Hm:"toEndSegmentLength"},function(){return null!==this.$?this.$.Kk:NaN},function(a){this.$d();var b=this.$.Kk;b!==a&&(v&&D.h(a,"number",J,"toEndSegmentLength"),0>a&&D.ua(a,">= 0",J,"toEndSegmentLength"),this.$.Kk=a,this.i("toEndSegmentLength",b,a),this.ec())}); D.defineProperty(J,{pv:"toEndSegmentDirection"},function(){return null!==this.$?this.$.Jk:xr},function(a){this.$d();var b=this.$.Jk;b!==a&&(D.On("Link.toEndSegmentDirection","2.0"),v&&D.Da(a,G,J,"toEndSegmentDirection"),this.$.Jk=a,this.i("toEndSegmentDirection",b,a),this.ec())});D.defineProperty(J,{qv:"toShortLength"},function(){return null!==this.$?this.$.Lk:NaN},function(a){this.$d();var b=this.$.Lk;b!==a&&(v&&D.h(a,"number",J,"toShortLength"),this.$.Lk=a,this.i("toShortLength",b,a),this.ec())}); function zn(a){var b=a.aa,c=a.ba,d=null,b=d=null!==b?null!==c?b.JI(c):b.Ka:null!==c?c.Ka:null,c=a.Bl;if(c!==b){null!==c&&rr(c,a);a.Bl=b;null!==b&&sr(b,a);var e=a.hF;if(null!==e){var g=!0,h=a.g;null!==h&&(g=h.$a,h.$a=!0);e(a,c,b);null!==h&&(h.$a=g)}!a.Uf||a.xE!==c&&a.yE!==c||a.ec()}if(a.oJ)for(a=a.Af;a.next();)a.value.Ka=d}J.prototype.dl=function(){var a=this.Ka;null!==a&&this.aa!==a&&this.ba!==a&&a.Ex&&F.prototype.dl.call(this)}; J.prototype.getOtherNode=J.prototype.fB=function(a){v&&D.l(a,G,J,"getOtherNode:node");var b=this.aa;return a===b?this.ba:b};J.prototype.getOtherPort=function(a){v&&D.l(a,P,J,"getOtherPort:port");var b=this.Ac;return a===b?this.ad:b};D.w(J,{oJ:"isLabeledLink"},function(){return null===this.Ff?!1:0=d&&(h=d-1);var l=this.m(h-1),g=this.m(h);Ae(e.x,e.y,k.x,k.y,l.x,l.y,g.x,g.y,.5,a);b=Math.min(g.x,b);c=Math.min(g.y,c);e=g}else for(e=this.m(0),g=this.m(1),b=Math.min(e.x,g.x),c=Math.min(e.y,g.y),a.n(e.x,e.y,0,0),a.Pi(g),h=2;hc&&(c=-c)):Eb(c.y,d.y)?(c=d.x-c.x,0>c&&(c=-c)):c=Math.sqrt(c.Jf(d)),g.push(c),e+=c;for(d=h=c=0;ce/2)break;c+=d;h++}D.ya(g);b=this.m(h);g=this.m(h+1);b.x===g.x?b.y>g.y?a.n(b.x,b.y-(e/2-c)):a.n(b.x,b.y+(e/2-c)):b.y===g.y?b.x>g.x?a.n(b.x-(e/2-c),b.y):a.n(b.x+(e/2-c),b.y):(c=(e/2-c)/d,a.n(b.x+c*(g.x-b.x),b.y+c*(g.y-b.y)));return a};D.w(J,{tG:"midAngle"},function(){this.yo();return this.computeMidAngle()}); J.prototype.computeMidAngle=function(){var a=this.ta;if(2>a)return NaN;if(this.computeCurve()===Tj&&4<=a&&!this.ic){var b=(a-1)/3|0,c=3*(b/2|0);if(1===b%2){var c=Math.floor(c),b=this.m(c),d=this.m(c+1),a=this.m(c+2),c=this.m(c+3),e=d.x,d=d.y,g=a.x,a=a.y,h=(e+g)/2,k=(d+a)/2;return Bb(((b.x+e)/2+h)/2,((b.y+d)/2+k)/2,(h+(g+c.x)/2)/2,(k+(a+c.y)/2)/2)}if(0e+10?b.Wb(d):e>c+10?d.Wb(a):b.Wb(a)):null===this.ab||this.ic?b.Wb(d):this.ab.LF(.5);if(null!==this.ab&&!this.ic)return this.ab.LF(.5);b=this.m(c-1);d=this.m(c);a=this.m(c+1);c=b.Jf(d);e=d.Jf(a);return c>e+10?b.Wb(d):e>c+10?d.Wb(a):b.Wb(a)}; D.defineProperty(J,{points:"points"},function(){return this.fd},function(a){var b=this.fd;if(b!==a){var c=null;if(Array.isArray(a)){var d=0===a.length%2;if(d)for(var e=0;em&&(p=-p),u=(0> l?-1:1)*p+r,t=n*(u-r)+s);var r=h.x+2*k/3,s=h.y+2*l/3,y=r,w=s;Q(l,0)?w=0l?-1:1)*p+r,w=n*(y-r)+s);this.bq();this.Ei(h);this.Aj(u,t);this.Aj(y,w);this.Ei(q);this.hh(0,this.getLinkPoint(b,c,d,!0,!1,e,g));this.hh(3,this.getLinkPoint(e,g,a,!1,!1,b,c))}else d=this.getLinkPoint(b,c,d,!0,!1,e,g),a=this.getLinkPoint(e,g,a,!1,!1,b,c),this.hasCurviness()?(q=a.x-d.x,e=a.y-d.y,g=this.computeCurviness(),b=d.x+q/2,c=d.y+e/2,h=b,k=c,Q(e,0)?k=0g&&(h=-h), h=(0>e?-1:1)*h+b,k=q*(h-b)+c),this.Ei(d),this.Aj(h,k)):this.Ei(d),this.Ei(a)}else{p=this.Mj;q&&(n&&p||m)&&this.bq();var B=m?this.computeCurviness():0,p=this.getLinkPoint(b,c,d,!0,n,e,g),r=u=s=0;if(n||!k||m)if(t=this.computeEndSegmentLength(b,c,d,!0),r=this.getLinkDirection(b,c,p,d,!0,n,e,g),m&&(k||d.O(a)||!n&&1===d.x+a.x&&1===d.y+a.y)&&(r-=n?90:30,0>B&&(r-=180)),0>r?r+=360:360<=r&&(r-=360),m&&(t+=Math.abs(B)*(n?1:2)),0===r?s=t:90===r?u=t:180===r?s=-t:270===r?u=-t:(s=t*Math.cos(r*Math.PI/180),u=t* Math.sin(r*Math.PI/180)),d.ce()&&m){var A=c.fb(mc,D.P()),O=D.Fb(A.x+1E3*s,A.y+1E3*u);this.getLinkPointFromPoint(b,c,A,O,!0,p);D.A(A);D.A(O)}var t=this.getLinkPoint(e,g,a,!1,n,b,c),H=w=y=0;if(n||!l||m)A=this.computeEndSegmentLength(e,g,a,!1),H=this.getLinkDirection(e,g,t,a,!1,n,b,c),m&&(l||d.O(a)||!n&&1===d.x+a.x&&1===d.y+a.y)&&(H+=n?0:30,0>B&&(H+=180)),0>H?H+=360:360<=H&&(H-=360),m&&(A+=Math.abs(B)*(n?1:2)),0===H?y=A:90===H?w=A:180===H?y=-A:270===H?w=-A:(y=A*Math.cos(H*Math.PI/180),w=A*Math.sin(H* Math.PI/180)),a.ce()&&m&&(A=g.fb(mc,D.P()),O=D.Fb(A.x+1E3*y,A.y+1E3*w),this.getLinkPointFromPoint(e,g,A,O,!1,t),D.A(A),D.A(O));a=p;if(n||!k||m)a=new N(p.x+s,p.y+u);d=t;if(n||!l||m)d=new N(t.x+y,t.y+w);!q&&!n&&k&&3Math.abs(b.y-a.y)?(b.x=b.x>=a.x?a.x+9E9:a.x-9E9,b.y=a.y):(b.y=b.y>=a.y?a.y+9E9:a.y-9E9,b.x=a.x);return b} J.prototype.getLinkPointFromPoint=function(a,b,c,d,e,g){void 0===g&&(g=new N);if(null===a||null===b)return g.assign(c),g;a.isVisible()||(e=a.findVisibleNode(),null!==e&&e!==a&&(b=e.port));var h=e=0,k=0,l=0;a=null;e=b.R;null===e||e.lh()||(e=e.R);if(null===e)e=d.x,h=d.y,k=c.x,l=c.y;else{a=e.Jh;e=1/(a.m11*a.m22-a.m12*a.m21);var k=a.m22*e,l=-a.m12*e,m=-a.m21*e,n=a.m11*e,p=e*(a.m21*a.dy-a.m22*a.dx),q=e*(a.m12*a.dx-a.m11*a.dy);e=d.x*k+d.y*m+p;h=d.x*l+d.y*n+q;k=c.x*k+c.y*m+p;l=c.x*l+c.y*n+q}b.Tn(e,h,k,l, g);null!==a&&g.transform(a);return g};function Xr(a,b){var c=b.ft;null===c&&(c=new Yr,c.port=b,c.Yc=b.Y,b.ft=c);return Zr(c,a)} J.prototype.getLinkPoint=function(a,b,c,d,e,g,h,k){void 0===k&&(k=new N);if(c.Vc())return b.fb(c,k),k;if(c.Oj()){var l=Xr(this,b);if(null!==l){k.assign(l.Aq);if(e&&this.My===Or){var m=Xr(this,h);if(null!==m&&l.Ln=n.y&&a.y<=n.y+n.height?k.y=a.y:(c.Lj(wc)||c.Lj(Dc))&&a.x>=n.x&&a.x<=n.x+n.width&&(k.x=a.x);D.A(l);D.A(m)}}return k}}c=b.fb(mc,D.P());l=g=null; this.ta>(e?6:2)?(l=d?this.m(1):this.m(this.ta-2),e&&(l=Wr(c,l.copy()))):(g=D.P(),l=h.fb(mc,g),e&&(l=Wr(c,l)),D.A(g));this.getLinkPointFromPoint(a,b,c,l,d,k);D.A(c);return k}; J.prototype.getLinkDirection=function(a,b,c,d,e,g,h,k){a:if(d.Vc())c=d.x>d.y?d.x>1-d.y?0:d.x<1-d.y?270:315:d.x1-d.y?90:d.x<1-d.y?180:135:.5>d.x?225:.5(g?6:2)?(n=e?this.m(1):this.m(this.ta-2),n=g?Wr(l,n.copy()):c):(m=D.P(),n=k.fb(mc,m),D.A(m));c=0;c=Math.abs(n.x-l.x)>Math.abs(n.y- l.y)?n.x>=l.x?0:180:n.y>=l.y?90:270;D.A(l)}d.ce()&&h.Ii(a)&&(c+=180,360<=c&&(c-=360));a=xr;a=e?this.wu:this.pv;a===xr&&(a=e?b.wu:b.pv);switch(a){case yr:b=b.tm();c+=b;360<=c&&(c-=360);break;case xr:case Fo:if(d.rJ())break;b=b.tm();if(0===b)break;45<=b&&135>b?c+=90:135<=b&&225>b?c+=180:225<=b&&315>b&&(c+=270);360<=c&&(c-=360)}return c}; J.prototype.computeEndSegmentLength=function(a,b,c,d){if(null!==b&&c.Oj()&&(a=Xr(this,b),null!==a))return a.Nx;a=NaN;a=d?this.sm:this.Hm;null!==b&&isNaN(a)&&(a=d?b.sm:b.Hm);isNaN(a)&&(a=10);return a};J.prototype.computeSpot=function(a,b){var c;if(a)if(c=b?b:this.Ac,null===c)c=mc;else{var d=this.Gb;d.jd()&&null!==c&&(d=c.Gb);c=d===Vc?dc:d}else c=b?b:this.ad,null===c?c=mc:(d=this.Hb,d.jd()&&null!==c&&(d=c.Hb),c=d===Vc?dc:d);return c}; J.prototype.computeOtherPoint=function(a,b){var c=b.fb(mc),d;d=b.ft;d=null!==d?Zr(d,this):null;null!==d&&(c=d.Aq);return c};J.prototype.computeShortLength=function(a){if(a){if(a=this.xu,isNaN(a)){var b=this.Ac;null!==b&&(a=b.xu)}}else a=this.qv,isNaN(a)&&(b=this.ad,null!==b&&(a=b.qv));return isNaN(a)?0:a}; J.prototype.Yk=function(a,b,c,d,e,g){if(!1===this.tg)return!1;void 0===b&&(b=null);void 0===c&&(c=null);var h=g;void 0===g&&(h=D.Sf(),h.reset());h.multiply(this.transform);if(this.In(a,h))return gq(this,b,c,e),void 0===g&&D.Ke(h),!0;if(this.jg(a,h)){var k=!1;if(!this.Yn)for(var l=this.xa.o,m=l.length;m--;){var n=l[m];if(n.visible||n===this.Bf){var p=n.Z,q=this.Ga;if(!(p.x>q.width||p.y>q.height||0>p.x+p.width||0>p.y+p.height)){p=D.Sf();p.set(h);if(n instanceof x)k=n.Yk(a,b,c,d,e,p);else if(this.path=== n){if(n instanceof z){var k=n,r=a,s=d,q=p;if(!1===k.tg)k=!1;else if(q.multiply(k.transform),s)b:{var u=r,t=q;if(k.In(u,t))k=!0;else{if(void 0===t&&(t=k.transform,u.Tk(k.Z))){k=!0;break b}var q=u.left,r=u.right,s=u.top,u=u.bottom,y=D.P(),w=D.P(),B=D.P(),A=D.Sf();A.set(t);A.EB(k.transform);A.Zx();w.x=r;w.y=s;w.transform(A);y.x=q;y.y=s;y.transform(A);t=!1;tq(k,y,w,B)?t=!0:(y.x=r,y.y=u,y.transform(A),tq(k,y,w,B)?t=!0:(w.x=q,w.y=u,w.transform(A),tq(k,y,w,B)?t=!0:(y.x=q,y.y=s,y.transform(A),tq(k,y,w,B)&& (t=!0))));D.Ke(A);D.A(y);D.A(w);D.A(B);k=t}}else k=k.In(r,q)}}else k=Lo(n,a,d,p);k&&(null!==b&&(n=b(n)),n&&(null===c||c(n))&&(e instanceof L&&e.add(n),e instanceof K&&e.add(n)));D.Ke(p)}}}void 0===g&&D.Ke(h);return k||null!==this.background||null!==this.hm}void 0===g&&D.Ke(h);return!1};D.w(J,{ic:"isOrthogonal"},function(){return 2===(this.on.value&2)});D.w(J,{Mj:"isAvoiding"},function(){return 4===(this.on.value&4)}); J.prototype.computeCurve=function(){if(null===this.bj){var a=this.Ac,b=this.ic;this.bj=null!==a&&a===this.ad&&!b}return this.bj?Tj:this.lf};J.prototype.computeCorner=function(){if(this.lf===Tj)return 0;var a=this.QA;if(isNaN(a)||0>a)a=10;return a};J.prototype.findMidLabel=function(){for(var a=this.path,b=this.xa.o,c=b.length,d=0;dl?-Math.PI/2:Math.PI/2:(n=Math.atan(l/Math.abs(k)),0>k&&(n=Math.PI-n));var h=b.x,p=b.y,l=d.x-h,q=d.y-p,r=Math.sqrt(l*l+q*q),k=0;Eb(l,0)?k=0>q?-Math.PI/2:Math.PI/2:(k=Math.atan(q/Math.abs(l)),0>l&&(k=Math.PI-k));m=r/m;n=k-n;this.hh(a,b);for(a+= 1;al?-Math.PI/2:Math.PI/2:(q=Math.atan(l/Math.abs(k)),0>k&&(q=Math.PI-q)),k=q+n,b*=m,this.ia(a,h+b*Math.cos(k),p+b*Math.sin(k)));this.hh(c,d)}}return!0;case Nr:g=this.m(a);p=this.m(c);if(!g.Uc(b)||!p.Uc(d)){var e=g.x,g=g.y,h=p.x,p=p.y,m=(h-e)*(h-e)+(p-g)*(p-g),k=b.x,n=b.y,l=d.x,q=d.y,r=0,s=1;0!==l-k?(r=(q-n)/(l-k),s=Math.sqrt(1+1/(r*r))):r=9E9;this.hh(a,b);for(a+=1;ab?0:45<=b&&135>b?90:135<=b&&225>b?180:270;d=-45<=d&&45>d?0:45<=d&&135>d?90:135<=d&&225>d?180:270;var h=e.Z.copy(),k=g.Z.copy();if(h.F()&&k.F()){h.ig(8,8);k.ig(8,8);h.Pi(a);k.Pi(c);var l,m;if(0===b)if(c.x>a.x||270===d&&c.ya.x||90===d&&c.y>a.y&&k.right>a.x)l=new N(c.x,a.y),m=new N(c.x,(a.y+c.y)/2),180===d?(l.x=this.computeMidOrthoPosition(a.x,c.x,!1),m.x=l.x,m.y=c.y):270===d&&c.ya.y?(l.x=a.xk.bottom)?this.computeMidOrthoPosition(a.x,c.x,!1):k.right,m.x=l.x,m.y=c.y):0===d&&a.xk.top&&a.yh.bottom)180===d&&(k.Pa(a)||h.Pa(c))?l.y=this.computeMidOrthoPosition(a.y,c.y,!0):c.ya.y&&(180===d||270===d)&&(l.y=this.computeMidOrthoPosition(h.bottom,Math.min(c.y,k.top),!0)),m.x=c.x,m.y=l.y;if(l.y>h.top&&l.y=h.left&&c.x<=a.x||a.x<=k.right&&a.x>=c.x){if(90===d||270===d)l=new N(Math.max((a.x+c.x)/2,a.x),a.y),m=new N(l.x,c.y)}else l.y=270===d||(0===d||180===d)&&c.ya.y&&k.lefta.y?(l.x=a.x>k.right?this.computeMidOrthoPosition(a.x,k.right,!1):a.x>k.left&&(270===d&&a.yk.bottom)?this.computeMidOrthoPosition(a.x,c.x,!1):k.left,m.x=l.x,m.y=c.y):180===d&&a.x>k.right&&a.y>k.top&&a.yh.bottom)0===d&&(k.Pa(a)||h.Pa(c))?l.y=this.computeMidOrthoPosition(a.y,c.y,!0):c.ya.y&&(0===d||270===d)&&(l.y=this.computeMidOrthoPosition(h.bottom,Math.min(c.y,k.top),!0)),m.x=c.x,m.y=l.y;if(l.y>h.top&&l.y=a.x||a.x>=k.left&&a.x<=c.x){if(90===d||270===d)l=new N(Math.min((a.x+c.x)/2,a.x),a.y),m=new N(l.x,c.y)}else l.y=270=== d||(0===d||180===d)&&c.ya.y||180===d&&c.xa.y||0===d&&c.x>a.x&&k.bottom>a.y)l=new N(a.x,c.y),m=new N((a.x+c.x)/2,c.y),270===d?(l.y=this.computeMidOrthoPosition(a.y,c.y,!0),m.x=c.x,m.y=l.y):180===d&&c.xa.x?(l.y=a.yk.right)? this.computeMidOrthoPosition(a.y,c.y,!0):k.bottom,m.x=c.x,m.y=l.y):90===d&&a.yk.left&&a.xh.right)270===d&&(k.Pa(a)||h.Pa(c))?l.x=this.computeMidOrthoPosition(a.x,c.x,!1):c.xa.x&&(270===d||180===d)&&(l.x=this.computeMidOrthoPosition(h.right, Math.min(c.x,k.left),!1)),m.x=l.x,m.y=c.y;if(l.x>h.left&&l.x=h.top&&c.y<=a.y||a.y<=k.bottom&&a.y>=c.y){if(0===d||180===d)l=new N(a.x,Math.max((a.y+c.y)/2,a.y)),m=new N(c.x,l.y)}else l.x=180===d||(90===d||270===d)&&c.xa.x&&k.top=a.x?(l.y=a.y>k.bottom?this.computeMidOrthoPosition(a.y,k.bottom,!0):a.y>k.top&&(180===d&&a.xk.right)?this.computeMidOrthoPosition(a.y,c.y,!0):k.top,m.x=c.x,m.y=l.y):270===d&&a.y>k.bottom&&a.x>k.left&&a.xh.right)90===d&&(k.Pa(a)||h.Pa(c))?l.x=this.computeMidOrthoPosition(a.x, c.x,!1):c.xa.x&&(90===d||180===d)&&(l.x=this.computeMidOrthoPosition(h.right,Math.min(c.x,k.left),!1)),m.x=l.x,m.y=c.y;if(l.x>h.left&&l.x=a.y||a.y>=k.top&&a.y<=c.y){if(0===d||180===d)l=new N(a.x,Math.min((a.y+c.y)/2,a.y)),m=new N(c.x,l.y)}else l.x=180===d||(90===d||270===d)&&c.xk&&0!==bs(s,c.x,c.y)){cs(this,s,c.x,c.y,d,!0);h=this.m(2);if(4>this.ta)0===b||180===b?(h.x=a.x,h.y=c.y):(h.x=c.x,h.y=a.y),this.ia(2,h.x,h.y),this.B(3,h.x,h.y);else if(c= this.m(3),0===b||180===b)Q(h.x,c.x)?(h=0===b?Math.max(h.x,a.x):Math.min(h.x,a.x),this.ia(2,h,a.y),this.ia(3,h,c.y)):Q(h.y,c.y)?(Math.abs(a.y-h.y)<=s.Zp/2&&(this.ia(2,h.x,a.y),this.ia(3,c.x,a.y)),this.B(2,h.x,a.y)):this.ia(2,a.x,h.y);else if(90===b||270===b)Q(h.y,c.y)?(h=90===b?Math.max(h.y,a.y):Math.min(h.y,a.y),this.ia(2,a.x,h),this.ia(3,c.x,h)):Q(h.x,c.x)?(Math.abs(a.x-h.x)<=s.aq/2&&(this.ia(2,a.x,h.y),this.ia(3,a.x,c.y)),this.B(2,a.x,h.y)):this.ia(2,h.x,a.y);null!==r&&(a=this.m(1),c=this.m(2), a.x!==c.x&&a.y!==c.y?0===b||180===b?this.B(2,a.x,c.y):this.B(2,c.x,a.y):0===b||180===b?this.B(2,e.x,r.y):this.B(2,r.x,e.y));null!==u&&(0===d||180===d?this.Aj(g.x,u.y):this.Aj(u.x,g.y));b=!0}else b=!1}}}else b=!1;b||(this.Ei(l),this.Ei(m))}};J.prototype.computeMidOrthoPosition=function(a,b){if(this.hasCurviness()){var c=this.computeCurviness();return(a+b)/2+c}return(a+b)/2}; function Mi(a){if(null===a.g||!a.Mj)return!1;var b=a.points.o,c=b.length;if(4>c)return!1;a=ha(a.g,!0,a.Ka,null);for(var d=1;da)return new Ve(sf);var b=!1,c=this.g;null!==c&&Tr(this)&&c.Dl.contains(this)&&null!==this.Qw&&(b=!0);var d=c=0,e=this.m(0).copy(),g=e.copy(),c=this.fd.o,h=this.computeCurve();if(h===Tj&&3<=a&&!Eb(this.Vq,0))if(3===a)var k=this.m(1),c=Math.min(e.x,k.x),d=Math.min(e.y,k.y),k=this.m(2),c=Math.min(c,k.x),d=Math.min(d,k.y);else{if(this.ic)for(k=0;k=a&&(k=a-1),c=this.m(k), g.x=Math.min(c.x,g.x),g.y=Math.min(c.y,g.y);c=g.x;d=g.y}else{for(k=0;ky?r>q?(u.x=w-A,u.y=q-A,t.x=w+s,t.y=q+s):(u.x=w-A,u.y=q+A,t.x=w+s,t.y=q-s):r>q?(u.x=w+A,u.y=q-A,t.x=w-s,t.y=q+s):(u.x=w+A,u.y=q+A,t.x=w-s,t.y=q-s));Eb(y,w)&&Eb(q,r)&&(q>p?(B>w?(u.x= w-A,u.y=q-A,t.x=w+s):(u.x=w+A,u.y=q-A,t.x=w-s),t.y=q+s):(B>w?(u.x=w-A,u.y=q+A,t.x=w+s):(u.x=w+A,u.y=q+A,t.x=w-s),t.y=q-s));if(Eb(y,w)&&Eb(w,B)||Eb(p,q)&&Eb(q,r))y=.5*(y+B),p=.5*(p+r),u.x=y,u.y=p,t.x=y,t.y=p;1===k?(e.x=.5*(b.x+m.x),e.y=.5*(b.y+m.y)):2===k&&Eb(b.x,this.m(0).x)&&Eb(b.y,this.m(0).y)&&(e.x=.5*(b.x+m.x),e.y=.5*(b.y+m.y));U(l,e.x-c,e.y-d,h.x-c,h.y-d,m.x-c,m.y-d);g.set(h);e.set(a);b=m}}k=b.x;b=b.y;g=this.m(this.ta-1);0!==this.computeShortLength(!1)&&(g=ds(this,g.copy(),!1,Kd));k=.5*(k+g.x); b=.5*(b+g.y);U(l,a.x-c,a.y-d,k-c,b-d,g.x-c,g.y-d)}else for(k=3;k=a&&(k=a-1),g=this.m(k-1),e=this.m(k),k===a-1&&0!==this.computeShortLength(!1)&&(e=ds(this,e.copy(),!1,Kd)),U(l,b.x-c,b.y-d,g.x-c,g.y-d,e.x-c,e.y-d);else{g=D.P();g.assign(this.m(0));k=1;for(e=0;k=a-1){if(!g.O(u))0!==this.computeShortLength(!1)&&(u=ds(this,u.copy(),!1,Kd)),gs(this,l,-c,-d,g,u,b);else if(0===e)for(k=1;kn.x?u.x-s:u.x+s,A=t.y>u.y?u.y+w:u.y-w,gs(this,k,h,m,n,new N(q,B),p),zf(k,u.x+h,u.y+m,r+h,A+m),y.n(r,A))):Q(n.x,u.x)&&Q(u.y,t.y)?(s=this.computeCorner(),w=Math.min(s,Math.abs(u.y-n.y)/2),w=s=Math.min(w,Math.abs(t.x-u.x)/2),Q(s,0)?(gs(this,k,h,m,n,u, p),y.assign(u)):(q=u.x,A=B=u.y,B=u.y>n.y?u.y-w:u.y+w,r=t.x>u.x?u.x+s:u.x-s,gs(this,k,h,m,n,new N(q,B),p),zf(k,u.x+h,u.y+m,r+h,A+m),y.n(r,A))):(gs(this,k,h,m,n,u,p),y.assign(u));k=e}D.A(g)}c=l.q;D.u(l)}else l=this.m(1).copy(),l.x-=c,l.y-=d,0!==this.computeShortLength(!0)&&(e=ds(this,e,!0,g)),0!==this.computeShortLength(!1)&&(l=ds(this,l,!1,g)),c=new Ve(sf),c.la=e.x,c.ja=e.y,c.G=l.x,c.H=l.y;return c}; function fs(a,b,c,d){a=c-a;if(isNaN(a)||Infinity===a||-Infinity===a)return NaN;0>a&&(a=-a);b=d-b;if(isNaN(b)||Infinity===b||-Infinity===b)return NaN;0>b&&(b=-b);return Eb(a,0)?b:Eb(b,0)?a:Math.sqrt(a*a+b*b)} function ds(a,b,c,d){var e=a.ta;if(2>e)return b;if(c){var g=a.m(1);c=g.x-d.x;d=g.y-d.y;g=fs(b.x,b.y,c,d);if(0===g)return b;e=2===e?.5*g:g;a=a.computeShortLength(!0);a>e&&(a=e);c=a*(c-b.x)/g;a=a*(d-b.y)/g;b.x+=c;b.y+=a}else{g=a.m(e-2);c=g.x-d.x;d=g.y-d.y;g=fs(b.x,b.y,c,d);if(0===g)return b;e=2===e?.5*g:g;a=a.computeShortLength(!1);a>e&&(a=e);c=a*(b.x-c)/g;a=a*(b.y-d)/g;b.x-=c;b.y-=a}return b} function es(a,b,c,d){for(var e=a.ta,g=b;Eb(b.x,g.x)&&Eb(b.y,g.y);){if(c>=e)return e-1;g=a.m(c++)}if(!Eb(b.x,g.x)&&!Eb(b.y,g.y))return c-1;for(var h=g;Eb(b.x,g.x)&&Eb(g.x,h.x)&&(!d||(b.y>=g.y?g.y>=h.y:g.y<=h.y))||Eb(b.y,g.y)&&Eb(g.y,h.y)&&(!d||(b.x>=g.x?g.x>=h.x:g.x<=h.x));){if(c>=e)return e-1;h=a.m(c++)}return c-2} function gs(a,b,c,d,e,g,h){if(!h&&Tr(a)){h=[];var k=0;a.isVisible()&&(k=hs(a,e,g,h));var l=e.x,l=e.y;if(0p-10)m--,p=Math.max(q-5,g.x);else break;q=g.y-10+d;n=p+c;p=g.y+d;a.lf===tj?T(b,n,p,!1,!1):U(b,l,q,n,q,n,p)}else if(Q(e.x,g.x))if(e.yp-10)m--,p=Math.max(q-5,g.y);else break;q=g.x-10+c;n=g.x+c;p+=d;a.lf===tj?T(b,n,p,!1,!1):U(b,q,l,q,p,n,p)}}b.lineTo(g.x+c,g.y+d)} function hs(a,b,c,d){var e=a.g;if(null===e||b.O(c))return 0;for(e=e.ao;e.next();){var g=e.value;if(null!==g&&g.visible)for(var g=g.sb.o,h=g.length,k=0;kh.x&&n.x>m.x||m.xh.y&&n.y>m.y||m.yu&&Math.min(h,y)q&&!Q(h,y)){n.x=u;n.y=q;n=!0;break a}}else if(!Q(q,s)&&Q(h,y)&&Math.min(q,s)h&&Math.min(u,t)p&&!Q(u,t)){n.x=p;n.y=h;n=!0;break a}n.x=0;n.y=0;n=!1}n&&(e?c.push(k.x):c.push(k.y));h=m}D.A(k)}D.w(J,{qu:"firstPickIndex"},function(){var a;2>=this.ta?a=0:((a=this.ic)||(a=this.computeSpot(!0)!==dc),a=a?1:0);return a});D.w(J,{oy:"lastPickIndex"},function(){var a=this.ta;if(0===a)a=0;else if(2>=a)a-=1;else{var b;(b=this.ic)||(b=this.computeSpot(!1)!==dc);a=b?a-2:a-1}return a});function Tr(a){a=a.lf;return a===sj||a===tj} function Vr(a,b){if(b||Tr(a)){var c=a.g;null===c||c.Dl.contains(a)||null===a.Qw||c.Dl.add(a,a.Qw)}}function vj(a,b){var c=a.layer;if(null!==c&&c.visible&&!c.Wc){var d=c.g;if(null!==d)for(var e=!1,d=d.ao;d.next();){var g=d.value;if(g.visible)if(g===c)for(var e=!0,h=!1,g=g.sb.o,k=g.length,l=0;l=a.width||0>=a.height)){var b=a.y,c=a.x+a.width,d=a.y+a.height;this.$f=Math.floor((a.x-this.ge)/this.ge)*this.ge;this.ag=Math.floor((b-this.Od)/this.Od)*this.Od;this.Es=Math.ceil((c+2*this.ge)/this.ge)*this.ge;this.Fs=Math.ceil((d+2*this.Od)/this.Od)*this.Od;a=1+(Math.ceil((this.Es-this.$f)/this.ge)|0);b=1+(Math.ceil((this.Fs-this.ag)/this.Od)|0);if(null===this.qd||this.znthis.Es||a+cthis.Fs||b+da&&(c+=a,a=0);0>b&&(e+=b,b=0);if(0>c||0>e)return!0;d=Math.min(a+c-1,this.zn)|0;for(c=Math.min(b+e-1,this.An)|0;a<=d;a++)for(e=b;e<=c;e++)if(0===this.qd[a][e])return!1;return!0}; function ks(a,b,c,d,e,g,h,k,l){if(!(bh||cl)){var m,n;m=b|0;n=c|0;var p=a.qd[m][n];if(1<=p&&999999>p)for(e?n+=d:m+=d,p+=1;g<=m&&m<=h&&k<=n&&n<=l&&!(p>=a.qd[m][n]);)a.qd[m][n]=p,p+=1,e?n+=d:m+=d;m=e?n:m;if(e)if(0m;c+=d)ks(a,b,c,1,!e,g,h,k,l),ks(a,b,c,-1,!e,g,h,k,l);else if(0m;b+=d)ks(a,b,c,1,!e,g,h,k,l),ks(a,b,c,-1,!e,g,h, k,l)}}function ls(a,b,c,d,e,g,h,k,l){b|=0;c|=0;var m=0,n=1;for(a.qd[b][c]=n;0===m&&b>g&&bk&&cg&&bk&&c=Math.abs(h-b)&&1>=Math.abs(k-d))a.abort=!0;else{var l=g.x,m=g.y,n=g.x+g.width,p=g.y+g.height,l=l-a.$f,l=l/a.ge,m=m-a.ag,m=m/a.Od,n=n-a.$f,n=n/a.ge,p=p-a.ag,p=p/a.Od;g=Math.max(0,Math.min(a.zn,l|0));n=Math.min(a.zn,Math.max(0,n|0));m=Math.max(0,Math.min(a.An,m|0));p=Math.min(a.An,Math.max(0,p|0));h|=0;k|=0;b|=0;d|=0;l=0===c|| 90===c?1:-1;c=90===c||270===c;0===a.qd[h][k]?(ls(a,h,k,l,c,g,n,m,p),ls(a,h,k,1,!c,g,n,m,p),ls(a,h,k,-1,!c,g,n,m,p)):ls(a,h,k,l,c,h,k,h,k);0===a.qd[b][d]?(ms(a,b,d,0===e||90===e?1:-1,90===e||270===e,g,n,m,p),ms(a,b,d,1,!(90===e||270===e),g,n,m,p),ms(a,b,d,-1,!(90===e||270===e),g,n,m,p)):ms(a,b,d,l,c,b,d,b,d);a.abort||(ks(a,h,k,1,!1,g,n,m,p),ks(a,h,k,-1,!1,g,n,m,p),ks(a,h,k,1,!0,g,n,m,p),ks(a,h,k,-1,!0,g,n,m,p))}}}function Yr(){D.vc(this);this.port=this.Yc=null;this.og=[];this.Cq=!1} D.ne(Yr,{Yc:!0,port:!0,og:!0,Cq:!0});Yr.prototype.toString=function(){for(var a=this.og,b=this.Yc.toString()+" "+a.length.toString()+":",c=0;c=c?180:0}a=180*Math.atan2(a.height,a.width)/Math.PI;switch(b){case D.bd|D.yd:return c>a&&c<=180+a?180:270;case D.yd|D.pd:return c>180-a&&c<=360-a?270:0;case D.pd|D.od:return c>a&&c<=180+a?90:0;case D.od|D.bd:return c>180-a&&c<=360-a?180:90;case D.bd|D.yd|D.pd:return 90180+a&&c<=360- a?270:0;case D.yd|D.pd|D.od:return 180a&&180>=c?90:0;case D.pd|D.od|D.bd:return c>a&&c<=180-a?90:c>180-a&&270>=c?180:0;case D.od|D.bd|D.yd:return c>180-a&&c<=180+a?180:c>180+a?270:90}d&&b!==(D.bd|D.yd|D.pd|D.od)&&(c-=15,0>c&&(c+=360));return c>a&&c<180-a?90:c>=180-a&&c<=180+a?180:c>180+a&&c<360-a?270:0}Yr.prototype.uq=function(){this.og.length=0}; function Zr(a,b){var c=a.og;if(0===c.length){a:if(!a.Cq){c=a.Cq;a.Cq=!0;var d,e=null,g=a.Yc,g=g instanceof I?g:null;if(null===g||g.kd)d=a.Yc.CF(a.port.wd);else{if(!g.Z.F()){a.Cq=c;break a}e=g;d=e.BF()}var h=a.og.length=0,k=a.port.fb(ec,D.P()),l=a.port.fb(vc,D.P()),g=D.vg(k.x,k.y,0,0);g.Pi(l);D.A(k);D.A(l);k=D.Fb(g.x+g.width/2,g.y+g.height/2);l=a.port.tm();for(d=d.j;d.next();){var m=d.value;if(m.isVisible()&&m.Ac!==m.ad){var n=m.Ac===a.port||m.aa.Ii(e),p=m.computeSpot(n,a.port);if(p.Oj()&&(n=n?m.ad: m.Ac,null!==n)){var q=n.Y;if(null!==q){var r=q.findVisibleNode();null!==r&&r!==q&&(q=r,n=q.port);n=m.computeOtherPoint(q,n);q=k.Wb(n);q-=l;0>q&&(q+=360);p=ns(g,p,q,m.ic);r=0;0===p?(r=D.pd,180Math.abs(H)?(B=Math.abs(H)/q,q=Math.abs(H)):B=1;break;case D.bd:r>Math.abs(O)?(B=Math.abs(O)/r,r=Math.abs(O)):B=1;break;case D.yd:p>Math.abs(H)?(B=Math.abs(H)/p,p=Math.abs(H)):B=1;break;default:case D.pd:n>Math.abs(O)?(B=Math.abs(O)/n,n=Math.abs(O)):B=1}w=0}var R=u.Aq;if(e===zr){t=u.link.computeThickness();t*=B;R.set(A);switch(y){case D.od:R.x=A.x+H/2+q/2-w-t/2;break;case D.bd:R.y=A.y+O/2+r/2-w-t/2;break;case D.yd:R.x= A.x+H/2-p/2+w+t/2;break;default:case D.pd:R.y=A.y+O/2-n/2+w+t/2}w+=t}else t=.5,e===wr&&(t=(u.rq+1)/(u.Ln+1)),R.x=A.x+H*t,R.y=A.y+O*t}D.A(k);D.A(l);D.A(d);D.A(m);A=a.og;for(H=0;Hb.Me?1:a.angleb.angle?1:0}; Yr.prototype.computeEndSegmentLength=function(a){var b=a.link,c=b.computeEndSegmentLength(this.Yc,this.port,dc,b.Ac===this.port),d=a.rq;if(0>d)return c;var e=a.Ln;if(1>=e||!b.ic)return c;var b=a.Ay,g=a.Aq;if(a.Me===D.bd||a.Me===D.od)d=e-1-d;return((a=a.Me===D.bd||a.Me===D.pd)?b.ye&&(e=k.right);k.bottom>g&&(g=k.bottom)}}isFinite(c)&&isFinite(d)?a.n(c,d,e-c,g-d):(b=b.location,c=this.padding,a.n(b.x+c.left,b.y+c.top,0,0));return a}; D.defineProperty(Xj,{padding:"padding"},function(){return this.tf},function(a){"number"===typeof a?a=new Lb(a):D.l(a,Lb,Xj,"padding");var b=this.tf;b.O(a)||(this.tf=a=a.V(),this.i("padding",b,a))});function $g(){0=c-1?(h=0,e=d,g+=k+20,k=0):h++}null!==a&&a.gd("Layout")}this.zf=!0};$g.prototype.mo=function(a){return!a.location.F()||a instanceof I&&a.mo?!0:!1}; function rs(a,b,c,d,e,g,h,k){for(c=c.j;c.next();){var l=c.value;d&&!l.xq||null!==e&&!e(l)||!l.canLayout()||(g&&l instanceof G?l.Kf||(l instanceof I?null===l.Yb?rs(a,b,l.Oc,!1,e,g,h,k):(ss(l),b.add(l)):(ss(l),b.add(l))):h&&l instanceof J?b.add(l):!k||!l.pe()||l instanceof G||(ss(l),b.add(l)))}}function ss(a){var b=a.Z;(0===b.width||0===b.height||isNaN(b.width)||isNaN(b.height))&&a.Te()} $g.prototype.collectParts=$g.prototype.gI=function(a){var b=new L(F);a instanceof E?(rs(this,b,a.rg,!0,null,!0,!0,!0),rs(this,b,a.links,!0,null,!0,!0,!0),rs(this,b,a.Ki,!0,null,!0,!0,!0)):a instanceof I?rs(this,b,a.Oc,!1,null,!0,!0,!0):rs(this,b,a.j,!1,null,!0,!0,!0);return b};D.defineProperty($g,{Ce:"arrangementOrigin"},function(){return this.jr},function(a){D.l(a,N,$g,"arrangementOrigin");this.jr.O(a)||(this.jr.assign(a),this.N())}); $g.prototype.initialOrigin=function(a){var b=this.group;if(null!==b){var c=b.position.copy();(isNaN(c.x)||isNaN(c.y))&&c.set(a);b=b.placeholder;null!==b&&(c=b.fb(ec),(isNaN(c.x)||isNaN(c.y))&&c.set(a),c.x+=b.padding.left,c.y+=b.padding.top);return c}return a}; function ua(){D.vc(this);this.ve=null;if(this.vertexes)for(var a=this.vertexes.j;a.next();){var b=a.value;b.clear();b.network=null}if(this.edges)for(a=this.edges.j;a.next();)b=a.value,b.clear(),b.network=null;this.vertexes=new L(va);this.edges=new L(wa);this.xy=new oa(G,va);this.qy=new oa(J,wa)}D.ka("LayoutNetwork",ua); ua.prototype.clear=function(){if(this.vertexes)for(var a=this.vertexes.j;a.next();){var b=a.value;b.clear();b.network=null}if(this.edges)for(a=this.edges.j;a.next();)b=a.value,b.clear(),b.network=null;this.vertexes=new L(va);this.edges=new L(wa);this.xy=new oa(G,va);this.qy=new oa(J,wa)}; ua.prototype.toString=function(a){void 0===a&&(a=0);var b="LayoutNetwork"+(null!==this.Yb?"("+this.Yb.toString()+")":"");if(0>=a)return b;b+=" vertexes: "+this.vertexes.count+" edges: "+this.edges.count;if(1d?1:0):1:null!==d?-1:0}; va.smartComparer=function(a,b){v&&D.l(a,va,va,"smartComparer:m");v&&D.l(b,va,va,"smartComparer:n");if(null!==a){if(null!==b){var c=a.Ed,d=b.Ed;if(null!==c){if(null!==d){for(var c=c.text.toLocaleLowerCase().split(/([+\-]?[\.]?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/),d=d.text.toLocaleLowerCase().split(/([+\-]?[\.]?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/),e=0;e=g&&0>=h&&(g=1);a=this.spacing.width;isFinite(a)||(a=0);c=this.spacing.height;isFinite(c)||(c=0);null!==b&&b.Nb("Layout");d=[];switch(this.alignment){case Gs:var k=a,l=c,m=Math.max(this.$p.width,1);if(!isFinite(m))for(var n=m=0;ng-1||0h)d.push(new C(0,y,h+k,B)),w=0,t=u,y+=B,B=0;B=Math.max(B,O);O=0;switch(s){case Fs:O=-q.width;break;default:O=0}p.moveTo(t+O,y);switch(s){case Fs:t-=A;break; default:t+=A}w++}d.push(new C(0,y,h+k,B));break;case ys:k=g;l=a;m=c;n=Math.max(this.$p.width,1);p=y=A=0;q=D.P();for(g=0;g=A&&(h-=A);for(var A=O=0,H=Math.max(this.$p.height,1),aa=p=0,V=!0,ea=D.P(),g=0;gk-1||0h){d.push(new C(0,V?w-p:w,h+l,aa+p+m));for(R=0;RA&&(e.width+=e.x-A,e.x=A)}for(k=g=h=e=0;kd?1:0}; Wn.smartComparer=function(a,b){v&&D.l(a,F,Wn,"standardComparer:a");v&&D.l(b,F,Wn,"standardComparer:b");if(null!==a){if(null!==b){for(var c=a.text.toLocaleLowerCase().split(/([+\-]?[\.]?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/),d=b.text.toLocaleLowerCase().split(/([+\-]?[\.]?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/),e=0;e=a.count)1===a.count&&(a=a.first(),a.pa=0,a.va=0);else{var b=new K(Zs);b.Tc(a.j);a=new K(Zs);var c=new K(Zs),d;d=this.sort(b);var e=this.Kz,g=this.rD,h=this.Qd,k=this.Xo,l=this.Lz,m=this.Tr,b=this.El,n=this.GE,p=this.dg,q=this.Lv, e=this.eg,g=this.wy,h=this.ZJ;if(!isFinite(h)||0>=h)h=NaN;k=this.aI;if(!isFinite(k)||0>=k)k=1;l=this.Ne;isFinite(l)||(l=0);m=this.Df;if(!isFinite(m)||360m)m=360;b=this.spacing;isFinite(b)||(b=NaN);e===Ws&&g===Xs?e=Is:e===Ws&&g!==Xs&&(g=Xs,e=this.eg);if((this.direction===Rs||this.direction===Ss)&&this.sorting!==Ls){for(var r=0;!(r>=d.length);r+=2){a.add(d.fa(r));if(r+1>=d.length)break;c.add(d.fa(r+1))}this.direction===Rs?(this.eg===Ws&&a.reverse(),d=new K(Zs),d.Tc(a),d.Tc(c)):(this.eg===Ws&& c.reverse(),d=new K(Zs),d.Tc(c),d.Tc(a))}for(var s=d.length,u=n=0,r=0;rm&&(0===r||r===d.length-1)&&(t/=2);n+=t;u++}if(isNaN(h)||e===Ws){isNaN(b)&&(b=6);if(e!==Is&&e!==Ws){t=-Infinity;for(r=0;rh?(h=r,p=h*k):q=u/(360<=m?s:s-1)}this.Kz=e;this.rD=g;this.Qd=h;this.Xo=k;this.Lz=l;this.Tr=m;this.El=b;this.GE=n;this.dg=p;this.Lv=q;b=d;d=this.Kz;e=this.Qd;g=this.Lz;k=this.Tr;l=this.El;m=this.dg;n=this.Lv;if(this.direction!==Rs&&this.direction!==Ss||d!==Ws)if(this.direction===Rs||this.direction===Ss){h=0;switch(d){case Vs:h=180*ct(this,e,m,g,n)/Math.PI;break;case Is:n=b=0;h=a.first();null!==h&&(b=$s(h,Math.PI/2));h=c.first();null!== h&&(n=$s(h,Math.PI/2));h=180*ct(this,e,m,g,l+(b+n)/2)/Math.PI;break;case Us:h=k/b.length}if(this.direction===Rs){switch(d){case Vs:dt(this,a,g,Ts);break;case Is:et(this,a,g,Ts);break;case Us:ft(this,a,k/2,g,Ts)}switch(d){case Vs:dt(this,c,g+h,Ks);break;case Is:et(this,c,g+h,Ks);break;case Us:ft(this,c,k/2,g+h,Ks)}}else{switch(d){case Vs:dt(this,c,g,Ts);break;case Is:et(this,c,g,Ts);break;case Us:ft(this,c,k/2,g,Ts)}switch(d){case Vs:dt(this,a,g+h,Ks);break;case Is:et(this,a,g+h,Ks);break;case Us:ft(this, a,k/2,g+h,Ks)}}}else switch(d){case Vs:dt(this,b,g,this.direction);break;case Is:et(this,b,g,this.direction);break;case Us:ft(this,b,k,g,this.direction);break;case Ws:gt(this,b,k,g,this.direction)}else gt(this,b,k,g-k/2,Ks)}this.updateParts();this.network=null;this.zf=!0}; function ft(a,b,c,d,e){var g=a.Tr,h=a.Qd;a=a.dg;d=d*Math.PI/180;c=c*Math.PI/180;for(var k=b.length,l=0;lc){for(g=d+(e===Ks?g:-g);0>g;)g+=360;g%=360;180=n.length-1)break;jt(a,l,m,n,p,e,g)||kt(a,l,m,n,p,e,g);l=g.x;m=g.y}D.A(g);a.kn++;if(!(23Math.abs(r)?Math.abs(l-g)<(n[0].width+n[n.length-1].width)/2&&(h=0):h=0Math.abs(q)?0:q;q=!1;q=Math.abs(g)>Math.abs(p)?0p:0a.kn?a.Qd-h/(2*Math.PI):5>n.length&&10=p.length-1)break;jt(a,l,m,p,q,e,n)||kt(a,l,m,p,q,e,n);l=n.x;m=n.y}D.A(n);a.kn++;if(!(23a.kn?a.Qd-g/(2*Math.PI):a.Qd-(0k){m=b-a;if(m<-k)return h.x=m,h.y=n,!1;p=!0}}else if(m=b-a,m<-k){m=b+a;if(m>k)return h.x=m,h.y=n,!1;p=!0}n=Math.sqrt(1-Math.min(1,m*m/(k*k)))*l;0>c!==p&&(n=-n);if(Math.abs(c-n)>(d[e].height+d[e+1].height)/2)return h.x=m,h.y=n,!1;h.x=m;h.y=n;return!0} function kt(a,b,c,d,e,g,h){var k=a.Qd,l=a.dg,m=0,n=0;a=(d[e].height+d[e+1].height)/2+a.El;d=!1;if(0<=b!==(g===Ks)){if(n=c-a,n<-l){n=c+a;if(n>l){h.x=m;h.y=n;return}d=!0}}else if(n=c+a,n>l){n=c-a;if(n<-l){h.x=m;h.y=n;return}d=!0}m=Math.sqrt(1-Math.min(1,n*n/(l*l)))*k;0>b!==d&&(m=-m);h.x=m;h.y=n}Hs.prototype.commitLayout=function(){this.commitNodes();this.Ku&&this.commitLinks()}; Hs.prototype.commitNodes=function(){var a=this.SH,b=null!==this.group&&null!==this.group.placeholder&&this.group.kd,c=b?this.group.location.copy():null;b?a=new N(0,0):(a.x=this.Ce.x+this.Qd,a.y=this.Ce.y+this.dg);for(var d=this.network.vertexes.j;d.next();){var e=d.value;e.x+=a.x;e.y+=a.y;e.commit()}b&&(this.group.Te(),a=this.group.position.copy(),b=this.group.location.copy(),c=c.Zj(b.Zj(a)),this.group.move(c),this.FC=c.Zj(a))};Hs.prototype.commitLinks=function(){for(var a=this.network.edges.j;a.next();)a.value.commit()}; function bt(a,b,c,d,e){var g=a.JH;if(.001>Math.abs(a.Xo-1))return void 0!==d&&void 0!==e?e*b:2*Math.PI*b;a=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c;for(var h=0,k=0,k=void 0!==d&&void 0!==e?e/(g+1):Math.PI/(2*(g+1)),l=0,m=0;m<=g;m++)l=void 0!==d&&void 0!==e?d+m*e/g:m*Math.PI/(2*g),l=Math.sin(l),h+=Math.sqrt(1-a*a*l*l)*k;return void 0!==d&&void 0!==e?(b>c?b:c)*h:4*(b>c?b:c)*h}function at(a,b,c,d,e){var g=0,g=void 0!==d&&void 0!==e?bt(a,1,c,d,e):bt(a,1,c);return b/g} function ct(a,b,c,d,e){if(.001>Math.abs(a.Xo-1))return e/b;var g=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c,h=0;a=2*Math.PI/(700*a.network.vertexes.count);b>c&&(d+=Math.PI/2);for(var k=0;;k++){var l=Math.sin(d+k*a),h=h+(b>c?b:c)*Math.sqrt(1-g*g*l*l)*a;if(h>=e)return k*a}} Hs.prototype.sort=function(a){switch(this.sorting){case Ps:break;case Qs:a.reverse();break;case Ns:a.sort(this.comparer);break;case Os:a.sort(this.comparer);a.reverse();break;case Ls:for(var b=[],c=0;ce&&(e=k,g=h)}else for(h=0;he&&(e=k,g=h);d.add(a.fa(g));b[g]=-1;g=a.fa(g);e=0;for(h=g.uc;h.next();)e=a.indexOf(h.value.fromVertex),0>e||0<=b[e]&& b[e]++;for(g=g.sc;g.next();)e=a.indexOf(g.value.toVertex),0>e||0<=b[e]&&b[e]++}a=[];for(g=0;ga[g].indexOf(l)&&a[g].push(l);for(b=b.uc;b.next();)l=d.indexOf(b.value.fromVertex),l!==g&&0>a[g].indexOf(l)&&a[g].push(l)}h=[];for(g=0;ga[b[p]].indexOf(b[p===b.length-1?0:p+1])&&u.push(p===b.length-1?0:p+1);if(0===u.length)for(p=0;pO.indexOf(V)||eaO.indexOf(V)|| ea=t?l+1:l)),w+=l=t&&l++,A>=t&&A++,l>A&&(O=A,A=l,l=O),A-l<(b.length+2)/2===(lq||q===l||(s=q>l?q-l:l-q,p+=qh-s?1:-1);b.splice(0>p?l:l+1,0,m);c.splice(k,1);k--}else g=!1;if(g)break;else b.push(c[0]),c.splice(0,1)}for(g=0;g=a?a:360,this.N())}); D.defineProperty(Hs,{eg:"arrangement"},function(){return this.zd},function(a){this.zd!==a&&(D.Da(a,Hs,Hs,"arrangement"),a===Ws||a===Is||a===Vs||a===Us)&&(this.zd=a,this.N())});D.defineProperty(Hs,{direction:"direction"},function(){return this.ga},function(a){this.ga!==a&&(D.Da(a,Hs,Hs,"direction"),a===Ks||a===Ts||a===Rs||a===Ss)&&(this.ga=a,this.N())}); D.defineProperty(Hs,{sorting:"sorting"},function(){return this.vi},function(a){this.vi!==a&&(D.Da(a,Hs,Hs,"sorting"),a===Ps||a===Qs||a===Ns||Os||a===Ls)&&(this.vi=a,this.N())});D.defineProperty(Hs,{comparer:"comparer"},function(){return this.di},function(a){this.di!==a&&(D.h(a,"function",Hs,"comparer"),this.di=a,this.N())});D.defineProperty(Hs,{spacing:"spacing"},function(){return this.wi},function(a){this.wi!==a&&(D.h(a,"number",Hs,"spacing"),this.wi=a,this.N())}); D.defineProperty(Hs,{wy:"nodeDiameterFormula"},function(){return this.Vs},function(a){this.Vs!==a&&(D.Da(a,Hs,Hs,"nodeDiameterFormula"),a===Ms||a===Xs)&&(this.Vs=a,this.N())});D.w(Hs,{NK:"actualXRadius"},function(){return this.Qd});D.w(Hs,{OK:"actualYRadius"},function(){return this.dg});D.w(Hs,{MK:"actualSpacing"},function(){return this.El});D.w(Hs,{SH:"actualCenter"},function(){return this.FC});var Is;Hs.ConstantSpacing=Is=D.s(Hs,"ConstantSpacing",0);var Vs; Hs.ConstantDistance=Vs=D.s(Hs,"ConstantDistance",1);var Us;Hs.ConstantAngle=Us=D.s(Hs,"ConstantAngle",2);var Ws;Hs.Packed=Ws=D.s(Hs,"Packed",3);var Ks;Hs.Clockwise=Ks=D.s(Hs,"Clockwise",4);var Ts;Hs.Counterclockwise=Ts=D.s(Hs,"Counterclockwise",5);var Rs;Hs.BidirectionalLeft=Rs=D.s(Hs,"BidirectionalLeft",6);var Ss;Hs.BidirectionalRight=Ss=D.s(Hs,"BidirectionalRight",7);var Ps;Hs.Forwards=Ps=D.s(Hs,"Forwards",8);var Qs;Hs.Reverse=Qs=D.s(Hs,"Reverse",9);var Ns;Hs.Ascending=Ns=D.s(Hs,"Ascending",10); var Os;Hs.Descending=Os=D.s(Hs,"Descending",11);var Ls;Hs.Optimized=Ls=D.s(Hs,"Optimized",12);var Ms;Hs.Pythagorean=Ms=D.s(Hs,"Pythagorean",13);var Xs;Hs.Circular=Xs=D.s(Hs,"Circular",14);function Js(){this.oq=-Infinity;this.$q=this.Ao=null}Js.prototype.compare=function(a,b){if(0this.oq||Math.abs(a)a&&0g?(e=n.x+n.width/2,k=n.y+n.height/2,l[0]=new N(n.x+n.width+d.width,n.y),l[1]=new N(n.x,n.y+n.height+d.height),g=2):(p=pt(l,g, e,k,n.width,n.height,d),q=l[p],r=new N(q.x+n.width+d.width,q.y),s=new N(q.x,q.y+n.height+d.height),p+1this.network.vertexes.count)return!1;for(var a=0,b=0,c=this.network.vertexes.first().qb,d=this.network.vertexes.j;d.next();){if(d.value.qb.jg(c)&&(a++,2a.network.vertexes.count)return!1;null===a.Ug?a.Ug=new K(ku):a.Ug.clear();a.Ug.Tc(a.network.vertexes);var c=a.Ug;c.sort(function(a,b){return null===a||null===b||a===b?0:b.sg-a.sg});for(var d=c.count-1;0<=d&&1>=c.fa(d).sg;)d--;return 1=h))){for(var m=0,n=0,p=l.count-h;ps&&(s=1);m=pe((m+s+n*n*4/(h*h))/s);h=(m-1)*p/2;m=(m-1)*q/2;g.qb=new C(k-r.x-h,l-r.y-m,p+2*h,q+2*m);g.focus=new N(r.x+h,r.y+m)}a.network=d;return c}function ju(a,b,c){v&&(D.l(b,nt,mt,"popNetwork:oldnet"),D.p(c,mt,"popNetwork:level"));for(c=a.network.vertexes.j;c.next();){var d=c.value;d.network=b;if(null!==d.Yh){var e=d.Yh.fa(d.SB);d.sg=e.cz;var g=e.xC,h=e.yC;d.qb=new C(d.pa-g,d.va-h,e.dz,e.bz);d.focus=new N(g,h);d.SB--}}for(c=a.network.edges.j;c.next();)c.value.network=b;a.network=b} function lu(a,b,c){v&&(D.l(b,ku,mt,"surroundNode:oldnet"),D.p(c,mt,"surroundNode:level"));var d=b.Hn;if(null!==d&&0!==d.count){c=b.pa;var e=b.va,g=b.width,h=b.height;null!==b.Yh&&0=p.sg?l++:(k=!0,m++,h+=Math.atan2(b.va-p.va,b.pa-p.pa))}if(0!==l)for(0>1)+m)*(0===k%2?1:-1);l.pa=c+n*Math.cos(p);l.va=e+n*Math.sin(p);k++}}} function pt(a,b,c,d,e,g,h){var k=9E19,l=-1,m=0;a:for(;mn.y&&a[q].x-n.xn.x&&a[q].y-n.yl+h?(d=d+g-k,e=e-l-h,pe(d*d+e*e)):e+ck+m?e>l+h?(d=d-k-m,e=e-l-h,pe(d*d+e*e)):e+cl+h?e-(l+h):e+c=b.length)return!1;var c=b[0];c.forceX=0;c.forceY=0;for(var d=c.pa,e=d,g=c.va,h=g,c=1;ch-g)?b.sort(function(a,b){return null===a||null===b||a===b?0:a.pa-b.pa}):b.sort(function(a,b){return null===a||null===b||a===b?0:a.va-b.va});for(var h=a.ii,m=0,n=0,p=0,c=0;ch||p-d>h){if(g)break}else if(l-r>h||r-l>h){if(!g)break}else{var s=nu(k,e);1>s?(n=a.Fy,null===n&&(a.Fy=n=new Ia(0)),m=n.random(),s=n.random(),d>p?(n=Math.abs(e.Q.right-k.Q.x),n=(1+n)*m):dr?(p=Math.abs(e.Q.bottom-k.Q.y),p=(1+p)*s):ds?(n=a.Fy,null===n&&(a.Fy=n=new Ia(0)),m=n.random(),s= n.random(),n=(d>p?1:-1)*(1+(e.width>k.width?e.width:k.width))*m,p=(l>r?1:-1)*(1+(e.height>k.height?e.height:k.height))*s):(m=g.stiffness*(s-g.length),n=(p-d)/s*m,p=(r-l)/s*m),k.forceX+=n,k.forceY+=p,e.forceX-=n,e.forceY-=p;c=0;d=Math.max(a.ii/20,50);for(e=0;ed&&(g=d),h<-d?h=-d:h>d&&(h=d),k.pa+=g,k.va+=h,c=Math.max(c,g*g+h*h));return c>a.AF*a.AF}mt.prototype.moveFixedVertex=function(){}; mt.prototype.commitLayout=function(){this.ZB();this.commitNodes();this.Ku&&this.commitLinks()};mt.prototype.ZB=function(){if(this.Tq)for(var a=this.network.edges.j;a.next();){var b=a.value.link;null!==b&&(b.Gb=Vc,b.Hb=Vc)}};mt.prototype.commitNodes=function(){var a=0,b=0;if(this.$H){var c=D.Rf();this.Mh(this.network,c);b=this.Ce;a=b.x-c.x;b=b.y-c.y;D.Lb(c)}for(var c=D.Rf(),d=this.network.vertexes.j;d.next();){var e=d.value;if(0!==a||0!==b)c.assign(e.qb),c.x+=a,c.y+=b,e.qb=c;e.commit()}D.Lb(c)}; mt.prototype.commitLinks=function(){for(var a=this.network.edges.j;a.next();)a.value.commit()};mt.prototype.springStiffness=function(a){a=a.stiffness;return isNaN(a)?this.Uo:a};mt.prototype.springLength=function(a){a=a.length;return isNaN(a)?this.To:a};mt.prototype.electricalCharge=function(a){a=a.charge;return isNaN(a)?this.Ro:a};mt.prototype.electricalFieldX=function(){return 0};mt.prototype.electricalFieldY=function(){return 0}; mt.prototype.gravitationalMass=function(a){a=a.mass;return isNaN(a)?this.So:a};mt.prototype.gravitationalFieldX=function(){return 0};mt.prototype.gravitationalFieldY=function(){return 0};mt.prototype.isFixed=function(a){return a.isFixed};D.w(mt,{tL:"currentIteration"},function(){return this.vs});D.defineProperty(mt,{ZE:"arrangementSpacing"},function(){return this.xg},function(a){D.l(a,Ca,mt,"arrangementSpacing");this.xg.O(a)||(this.xg.assign(a),this.N())}); D.defineProperty(mt,{$H:"arrangesToOrigin"},function(){return this.kr},function(a){this.kr!==a&&(D.h(a,"boolean",mt,"arrangesToOrigin"),this.kr=a,this.N())});D.defineProperty(mt,{Tq:"setsPortSpots"},function(){return this.ui},function(a){this.ui!==a&&(D.h(a,"boolean",mt,"setsPortSpots"),this.ui=a,this.N())});D.defineProperty(mt,{comments:"comments"},function(){return this.ci},function(a){this.ci!==a&&(D.h(a,"boolean",mt,"comments"),this.ci=a,this.N())}); D.defineProperty(mt,{yB:"maxIterations"},function(){return this.wp},function(a){this.wp!==a&&(D.h(a,"number",mt,"maxIterations"),0<=a&&(this.wp=a,this.N()))});D.defineProperty(mt,{AF:"epsilonDistance"},function(){return this.Wr},function(a){this.Wr!==a&&(D.h(a,"number",mt,"epsilonDistance"),0b.toVertex.index&&(a.Ly(b),b.rev=!0);break;case ru:for(d=this.network.vertexes.j;d.next();)a=d.value,a.jq=-1,a.finish=-1;for(a=this.network.edges.j;a.next();)a.value.forest=!1;this.Rs=0;for(d.reset();d.next();)b=d.value,0===b.uc.count&&Bu(this,b);for(d.reset();d.next();)b=d.value,-1===b.jq&&Bu(this,b);for(a.reset();a.next();)d=a.value,d.forest||(b=d.fromVertex,c=b.finish,e=d.toVertex,g=e.finish,e.jqu&&0u&&0d[this.Zf]&&(this.ww=d[b]-1,this.Zf=b),d[b]h)for(var p=h+1;pn;p--)l=d[p],l.near===m&&l.En===m.En||k++;var m=0,q,r=q=p=l=0,s,u=0,t=0;s=0;var y;if(0<=c)for(n=d[h].$e,m=0;mu||l===u&&q>s)&&k++,tl||u===l&&s>q)&&k++);if(0>=c)for(n=d[h].Se,m=0;mu||l===u&&p>t)&&k++, sl||u===l&&t>p)&&k++);g[h*e+h]=k;for(n=h+1;n=c)for(k=d[h].Se,y=d[n].Se,m=0;m=c&&(l=k.$e);var m=null;0<=c&&(m=k.Se);var n=0,p=0,q=k.near;null!==q&&q.layer===k.layer&&(n+=q.column-1,p++);if(null!==l)for(q=0;q=c&&(l=k.$e);var m=null;0<=c&&(m=k.Se);var n=0,p=[],q=k.near;null!==q&&q.layer===k.layer&&(p[n]=q.column-1,n++);if(null!==l)for(q=0;q>1,g[h]=0!==(n&1)?p[m]:p[m-1]+p[m]>>1)}Fu(a,b,d);return g}function Nu(a,b,c,d,e,g){if(b.component===d){b.component=c;var h=0,k=0;if(e)for(var l=b.sc;l.next();){var k=l.value,m=k.toVertex,h=b.layer-m.layer,k=a.linkMinLength(k);h===k&&Nu(a,m,c,d,e,g)}if(g)for(l=b.uc;l.next();)k=l.value,m=k.fromVertex,h=m.layer-b.layer,k=a.linkMinLength(k),h===k&&Nu(a,m,c,d,e,g)}} function Ou(a,b,c,d,e,g){if(b.component===d){b.component=c;if(e)for(var h=b.sc;h.next();)Ou(a,h.value.toVertex,c,d,e,g);if(g)for(b=b.uc;b.next();)Ou(a,b.value.fromVertex,c,d,e,g)}}function yu(a){for(a=a.vertexes.j;a.next();){var b=a.value;if(b.valid)return b}return null}function zu(a){for(a=a.vertexes.j;a.next();){var b=a.value;if(b.valid){for(var c=!0,d=b.sc;d.next();)if(d.value.toVertex.valid){c=!1;break}if(c)return b}}return null} function Au(a){for(a=a.vertexes.j;a.next();){var b=a.value;if(b.valid){for(var c=!0,d=b.uc;d.next();)if(d.value.fromVertex.valid){c=!1;break}if(c)return b}}return null}function Bu(a,b){b.jq=a.Rs;a.Rs++;for(var c=b.sc;c.next();){var d=c.value,e=d.toVertex;-1===e.jq&&(d.forest=!0,Bu(a,e))}b.finish=a.Rs;a.Rs++} qu.prototype.assignLayers=function(){switch(this.rp){case Pu:Qu(this);break;case Ru:for(var a=0,b=this.network.vertexes.j;b.next();)a=Su(this,b.value),this.Ab=Math.max(a,this.Ab);for(b.reset();b.next();)a=b.value,a.layer=this.Ab-a.layer;break;default:case su:Qu(this);for(b=this.network.vertexes.j;b.next();)b.value.valid=!1;for(b.reset();b.next();)a=b.value,0===a.uc.count&&Tu(this,a);a=Infinity;for(b.reset();b.next();)a=Math.min(a,b.value.layer);this.Ab=-1;for(b.reset();b.next();){var c=b.value;c.layer-= a;this.Ab=Math.max(this.Ab,c.layer)}}};function Qu(a){for(var b=a.network.vertexes.j;b.next();){var c=Uu(a,b.value);a.Ab=Math.max(c,a.Ab)}}function Uu(a,b){var c=0;if(-1===b.layer){for(var d=b.sc;d.next();)var e=d.value,g=e.toVertex,e=a.linkMinLength(e),c=Math.max(c,Uu(a,g)+e);b.layer=c}else c=b.layer;return c}function Su(a,b){var c=0;if(-1===b.layer){for(var d=b.uc;d.next();)var e=d.value,g=e.fromVertex,e=a.linkMinLength(e),c=Math.max(c,Su(a,g)+e);b.layer=c}else c=b.layer;return c} function Tu(a,b){if(!b.valid){b.valid=!0;for(var c=b.sc;c.next();)Tu(a,c.value.toVertex);for(c=a.network.vertexes.j;c.next();)c.value.component=-1;for(var d=b.$e.o,e=d.length,g=0;gh&&Nu(a,k,0,-1,!0,!1)}for(Nu(a,b,1,-1,!0,!0);0!==b.component;){for(var k=0,d=Infinity,l=0,m=null,n=a.network.vertexes.j;n.next();){var p=n.value;if(1===p.component){for(var q=0,r=!1,s=p.$e.o,e=s.length,g=0;gd)&&!n&&(h=l,d=m)}if(0>g){for(c.reset();c.next();)g=c.value,1===g.component&&(g.layer-=e);b.component=0}else h.component=0}}} function Du(a,b,c){return 90===a.ga?c&&!b.rev||!c&&b.rev?270:90:180===a.ga?c&&!b.rev||!c&&b.rev?0:180:270===a.ga?c&&!b.rev||!c&&b.rev?90:270:c&&!b.rev||!c&&b.rev?180:0} qu.prototype.initializeIndices=function(){switch(this.hp){default:case Vu:for(var a=this.network.vertexes.j;a.next();){var b=a.value,c=b.layer;b.index=this.ue[c];this.ue[c]++}break;case tu:a=this.network.vertexes.j;for(b=this.Ab;0<=b;b--)for(a.reset();a.next();)c=a.value,c.layer===b&&-1===c.index&&Wu(this,c);break;case Xu:for(a=this.network.vertexes.j,b=0;b<=this.Ab;b++)for(a.reset();a.next();)c=a.value,c.layer===b&&-1===c.index&&Yu(this,c)}}; function Wu(a,b){var c=b.layer;b.index=a.ue[c];a.ue[c]++;for(var c=b.Se.oc(),d=!0;d;)for(var d=!1,e=0;eh.portFromColOffset&&(d=!0,c[e]=h,c[e+1]=g)}for(e=0;eh.portToColOffset&&(d=!0,c[e]=h,c[e+1]=g)}for(e=0;e=h;d--)g=$u(this,d,-1)||g;e=this.countCrossings();e>=a?Iu(this,b):(a=e,b=Hu(this));for(g=!0;g;)for(g=!1,d=c;d>=h;d--)g=$u(this,d,1)||g;e=this.countCrossings();e>=a?Iu(this,b):(a=e,b=Hu(this));for(g=!0;g;)for(g=!1,d=h;d<=c;d++)g=$u(this,d,1)||g;e>=a?Iu(this,b):(a=e,b=Hu(this));for(g=!0;g;)for(g=!1, d=h;d<=c;d++)g=$u(this,d,-1)||g;e>=a?Iu(this,b):(a=e,b=Hu(this));for(g=!0;g;)for(g=!1,d=c;d>=h;d--)g=$u(this,d,0)||g;e>=a?Iu(this,b):(a=e,b=Hu(this));for(g=!0;g;)for(g=!1,d=h;d<=c;d++)g=$u(this,d,0)||g;e>=a?Iu(this,b):(a=e,b=Hu(this))}break;default:case uu:for(c=this.Ab,h=0,k=a+1;(d=this.countCrossings())=h;d--)g=$u(this,d,-1)||g;e=this.countCrossings();e>=a?Iu(this,b):(a=e,b=Hu(this));for(g=!0;g;)for(g=!1,d=c;d>=h;d--)g=$u(this,d,1)||g;e=this.countCrossings(); e>=a?Iu(this,b):(a=e,b=Hu(this));for(g=!0;g;)for(g=!1,d=h;d<=c;d++)g=$u(this,d,1)||g;e>=a?Iu(this,b):(a=e,b=Hu(this));for(g=!0;g;)for(g=!1,d=h;d<=c;d++)g=$u(this,d,-1)||g;e>=a?Iu(this,b):(a=e,b=Hu(this));for(g=!0;g;)for(g=!1,d=c;d>=h;d--)g=$u(this,d,0)||g;e>=a?Iu(this,b):(a=e,b=Hu(this));for(g=!0;g;)for(g=!1,d=h;d<=c;d++)g=$u(this,d,0)||g;e>=a?Iu(this,b):(a=e,b=Hu(this))}}Iu(this,b)}; function Zu(a,b,c){v&&(D.p(b,qu,"medianBarycenterCrossingReduction:unfixedLayer"),D.p(c,qu,"medianBarycenterCrossingReduction:direction"));var d=0,e=Eu(a,b),g=a.ue[b],h=Mu(a,b,c);c=Lu(a,b,c);for(d=0;dg+1&&(q+=4*(w-g),r+=4*(w-(g+1)))}A=d[g].sc.j;for(A.reset();A.next();)if(w=A.value,B=w.toVertex,w.valid&&B.layer===b){for(w=0;d[w]!==B;)w++;w===g+1&&(r+=1)}A=d[g+1].uc.j;for(A.reset();A.next();)if(w=A.value,B=w.fromVertex,w.valid&&B.layer===b){for(w=0;d[w]!==B;)w++;wg+1&&(q+=4*(w-(g+1)),r+=4*(w-g))}A=d[g+1].sc.j;for(A.reset();A.next();)if(w=A.value,B=w.toVertex,w.valid&& B.layer===b){for(w=0;d[w]!==B;)w++;w===g&&(q+=1)}var w=B=0,A=h[d[g].index],O=k[d[g].index],H=h[d[g+1].index],R=k[d[g+1].index];-1!==A&&(B+=Math.abs(A-s),w+=Math.abs(A-y));-1!==O&&(B+=Math.abs(O-s),w+=Math.abs(O-y));-1!==H&&(B+=Math.abs(H-u),w+=Math.abs(H-t));-1!==R&&(B+=Math.abs(R-u),w+=Math.abs(R-t));if(r>1)+8*d;this.Qb*=8}if(0!==(this.rj&dv))for(b=!0;b;){b=!1;for(a=this.Zf+1;a<=this.Ab;a++)b=ev(this,a,1)||b; for(a=this.Zf-1;0<=a;a--)b=ev(this,a,-1)||b;b=ev(this,this.Zf,0)||b}if(0!==(this.rj&fv)){for(a=this.Zf+1;a<=this.Ab;a++)gv(this,a,1);for(a=this.Zf-1;0<=a;a--)gv(this,a,-1);gv(this,this.Zf,0)}c&&(hv(this,-1),hv(this,1));if(0!==(this.rj&dv))for(b=!0;b;){b=!1;b=ev(this,this.Zf,0)||b;for(a=this.Zf+1;a<=this.Ab;a++)b=ev(this,a,0)||b;for(a=this.Zf-1;0<=a;a--)b=ev(this,a,0)||b}}; function ev(a,b,c){v&&(D.p(b,qu,"bendStraighten:unfixedLayer"),D.p(c,qu,"bendStraighten:direction"));for(var d=!1;iv(a,b,c);)d=!0;return d} function iv(a,b,c){v&&(D.p(b,qu,"shiftbendStraighten:unfixedLayer"),D.p(c,qu,"shiftbendStraighten:direction"));var d=0,e=Eu(a,b),g=a.ue[b],h=Lu(a,b,-1);if(0c)for(d=0;dd-1||n-e[d-1].column-1>p+a.nodeMinColumnSpace(e[d-1],!1)?n-1:n,p=0,p=d+1>=g||e[d+1].column-n-1>q+a.nodeMinColumnSpace(e[d+1],!0)?n+1:n,s=q= 0,u=0,t=0,y=0,w=0;if(0>=c)for(var B=e[d].uc.j;B.next();){var w=B.value,A=w.fromVertex;w.valid&&A.layer!==b&&(t=Gu(w),y=w.portFromColOffset,w=w.portToColOffset,A=A.column,q+=(Math.abs(n+w-(A+y))+1)*t,s+=(Math.abs(r+w-(A+y))+1)*t,u+=(Math.abs(p+w-(A+y))+1)*t)}if(0<=c)for(B=e[d].sc.j;B.next();)w=B.value,A=w.toVertex,w.valid&&A.layer!==b&&(t=Gu(w),y=w.portFromColOffset,w=w.portToColOffset,A=A.column,q+=(Math.abs(n+y-(A+w))+1)*t,s+=(Math.abs(r+y-(A+w))+1)*t,u+=(Math.abs(p+y-(A+w))+1)*t);w=y=t=0;B=h[e[d].index]; A=k[e[d].index];-1!==B&&(t+=Math.abs(B-n),y+=Math.abs(B-r),w+=Math.abs(B-p));-1!==A&&(t+=Math.abs(A-n),y+=Math.abs(A-r),w+=Math.abs(A-p));if(s=c[d]?n=q:p<=c[d]&&(n=p));n!==k&&(h=!0,e[d].column=n)}Fu(a,b,e);a.normalize()} function jv(a,b){v&&(D.p(b,qu,"packAux:column"),D.p(1,qu,"packAux:direction"));for(var c=!0,d=a.network.vertexes.j;d.next();){var e=d.value,g=a.nodeMinColumnSpace(e,!0),h=a.nodeMinColumnSpace(e,!1);if(e.column-g<=b&&e.column+h>=b){c=!1;break}}e=!1;if(c)for(d.reset();d.next();)c=d.value,c.column>b&&(c.column-=1,e=!0);return e} function kv(a,b){v&&(D.p(b,qu,"tightPackAux:column"),D.p(1,qu,"tightPackAux:direction"));for(var c=b,c=b+1,d=0,e=[],g=[],d=0;d<=a.Ab;d++)e[d]=!1,g[d]=!1;for(var h=a.network.vertexes.j;h.next();){var d=h.value,k=d.column-a.nodeMinColumnSpace(d,!0),l=d.column+a.nodeMinColumnSpace(d,!1);k<=b&&l>=b&&(e[d.layer]=!0);k<=c&&l>=c&&(g[d.layer]=!0)}k=!0;c=!1;for(d=0;d<=a.Ab;d++)k=k&&!(e[d]&&g[d]);if(k)for(h.reset();h.next();)e=h.value,e.column>b&&(e.column-=1,c=!0);return c} function hv(a,b){v&&D.p(b,qu,"componentPack:direction");for(var c=0;c<=a.Qb;c++)for(;jv(a,c););a.normalize();for(c=0;ce?Iu(a,d):hb)for(c=a.Qb;0<=c;c--)for(d=Hu(a),e=Ku(a),g=e+1;ee?Iu(a,d):hc)for(d.reset();d.next();)e=d.value,e.column+a.nodeMinColumnSpace(e,!1)>=b&&(e.component=a.Lg);a.Lg++;for(d.reset();d.next();)b=d.value,-1===b.component&&(Ou(a,b,a.Lg,-1,!0,!0),a.Lg++);var g=0;b=[];for(g=0;gc)for(k=a.Qb;0c)for(d.reset();d.next();)c=d.value,e[c.component]&&(c.column+=1)} qu.prototype.commitLayout=function(){if(this.Tq)for(var a=Cu(this,!0),b=Cu(this,!1),c=this.network.edges.j;c.next();){var d=c.value.link;null!==d&&(d.Gb=a,d.Hb=b)}this.commitNodes();this.JA();this.Ku&&this.commitLinks()};function Cu(a,b){return 270===a.ga?b?$c:gd:90===a.ga?b?gd:$c:180===a.ga?b?ed:fd:b?fd:ed} qu.prototype.commitNodes=function(){this.Jg=[];this.Yf=[];this.Xf=[];this.Vb=[];for(var a=0;a<=this.Ab;a++)this.Jg[a]=0,this.Yf[a]=0,this.Xf[a]=0,this.Vb[a]=0;for(a=this.network.vertexes.j;a.next();){var b=a.value,c=b.layer;this.Jg[c]=Math.max(this.Jg[c],this.nodeMinLayerSpace(b,!0));this.Yf[c]=Math.max(this.Yf[c],this.nodeMinLayerSpace(b,!1))}for(var b=0,d=this.an,c=0;c<=this.Ab;c++){var e=d;0>=this.Jg[c]+this.Yf[c]&&(e=0);0=r.Q.bottom?(Ra=r.Q.y+r.Q.height, b.B(W++,sa,Ra+pb),b.B(W++,sa,Ra),b.B(W++,sa,Ra-Oa)):(b.B(W++,sa,na+pb),b.B(W++,sa,na),b.B(W++,sa,na-Oa)):270===this.ga?na<=r.Q.y?(Ra=r.Q.y,b.B(W++,sa,Ra-Oa),b.B(W++,sa,Ra),b.B(W++,sa,Ra+pb)):(b.B(W++,sa,na-Oa),b.B(W++,sa,na),b.B(W++,sa,na+pb)):0===this.ga&&(sa>=r.Q.right?(Ra=r.Q.x+r.Q.width,b.B(W++,Ra+pb,na),b.B(W++,Ra,na),b.B(W++,Ra-Oa,na)):(b.B(W++,sa+pb,na),b.B(W++,sa,na),b.B(W++,sa-Oa,na)));else{b.B(W++,hb,ub);var ud=0;if(180===this.ga||0===this.ga){if(180===this.ga?sa>=r.Q.right:sa<=r.Q.x)ud= (0===this.ga?-Oa:pb)/2;b.B(W++,hb+ud,na)}else{if(270===this.ga?na>=r.Q.bottom:na<=r.Q.y)ud=(90===this.ga?-Oa:pb)/2;b.B(W++,sa,ub+ud)}b.B(W++,sa,na)}else Oa=Math.max(10,this.Jg[Sa.layer]),pb=Math.max(10,this.Yf[Sa.layer]),180===this.ga?(La&&b.B(W++,sa-Oa,na),b.B(W++,sa,na),La&&b.B(W++,sa+pb,na)):90===this.ga?(La&&b.B(W++,sa,na+pb),b.B(W++,sa,na),La&&b.B(W++,sa,na-Oa)):270===this.ga?(La&&b.B(W++,sa,na-Oa),b.B(W++,sa,na),La&&b.B(W++,sa,na+pb)):(La&&b.B(W++,sa+pb,na),b.B(W++,sa,na),La&&b.B(W++,sa-Oa, na));r=Sa}if(null===k||n!==dc||gb)if(hb=b.m(W-1).x,ub=b.m(W-1).y,sa=b.m(W).x,na=b.m(W).y,gb){var vd=this.Yf[q.layer],Rc=0;180===this.ga||0===this.ga?(Rc=ub,Rc>=q.Q.y&&Rc<=q.Q.bottom&&(180===this.ga?sa>=q.Q.x:sa<=q.Q.right)&&(Ra=q.pa+(180===this.ga?-vd:vd),Rc=Rc=q.Q.x&&Rc<=q.Q.right&&(270===this.ga?na>=q.Q.y:na<=q.Q.bottom)&&(Ra=q.va+(270===this.ga?-vd:vd),Rc=Rc=q.Q.x?(Ra=q.Q.x+q.Q.width,b.ia(W-2,Ra,ub),b.ia(W-1,Ra+pb,ub)):90===this.ga&&na<=q.Q.bottom?(Ra=q.Q.y,b.ia(W-2,hb,Ra),b.ia(W-1,hb,Ra-Oa)):270===this.ga&&na>=q.Q.y?(Ra=q.Q.y+q.Q.height,b.ia(W-2,hb,Ra),b.ia(W-1,hb,Ra+pb)):0===this.ga&&sa<=q.Q.right&&(Ra=q.Q.x,b.ia(W-2,Ra,ub),b.ia(W-1,Ra-Oa,ub));else{Oa=Math.max(10, this.Jg[q.layer]);pb=Math.max(10,this.Yf[q.layer]);ud=0;if(180===this.ga||0===this.ga){if(180===this.ga?sa<=q.Q.x:sa>=q.Q.right)ud=(0===this.ga?pb:-Oa)/2;b.B(W++,sa+ud,ub)}else{if(270===this.ga?na<=q.Q.y:na>=q.Q.bottom)ud=(90===this.ga?pb:-Oa)/2;b.B(W++,hb,na+ud)}b.B(W++,sa,na)}}else{for(;null!==q&&q!==r;){Qc=Sa=null;for(var uh=q.sc.j;uh.next();){var Ye=uh.value;if(Ye.link===c.link&&(Sa=Ye.toVertex,Qc=Ye.fromVertex,null!==Qc.Ed&&(Qc=null),null===Sa.Ed))break}var hb=0,ub=0,sa=0,na=0,ab=0,Oa=0,pb=0; if(Sa!==r)if(hb=b.m(W-1).x,ub=b.m(W-1).y,sa=Sa.pa,na=Sa.va,gb)if(180===this.ga||0===this.ga){var Md=null!==Qc?Qc.va:ub;Md!==na&&(ab=this.Vb[Sa.layer],2===W&&(ab=0===this.ga?Math.max(ab,hb):Math.min(ab,hb)),b.B(W++,ab,ub),b.B(W++,ab,na))}else{var Hf=null!==Qc?Qc.pa:hb;Hf!==sa&&(ab=this.Vb[Sa.layer],2===W&&(ab=90===this.ga?Math.max(ab,ub):Math.min(ab,ub)),b.B(W++,hb,ab),b.B(W++,sa,ab))}else Oa=Math.max(10,this.Jg[Sa.layer]),pb=Math.max(10,this.Yf[Sa.layer]),180===this.ga?(b.B(W++,sa+pb,na),La&&b.B(W++, sa,na),b.B(W++,sa-Oa,na)):90===this.ga?(b.B(W++,sa,na-Oa),La&&b.B(W++,sa,na),b.B(W++,sa,na+pb)):270===this.ga?(b.B(W++,sa,na+pb),La&&b.B(W++,sa,na),b.B(W++,sa,na-Oa)):(b.B(W++,sa-Oa,na),La&&b.B(W++,sa,na),b.B(W++,sa+pb,na));q=Sa}gb&&(hb=b.m(W-1).x,ub=b.m(W-1).y,sa=b.m(W).x,na=b.m(W).y,180===this.ga||0===this.ga?ub!==na&&(ab=0===this.ga?Math.min(Math.max((sa+hb)/2,this.Vb[r.layer]),sa):Math.max(Math.min((sa+hb)/2,this.Vb[r.layer]),sa),b.B(W++,ab,ub),b.B(W++,ab,na)):hb!==sa&&(ab=90===this.ga?Math.min(Math.max((na+ ub)/2,this.Vb[r.layer]),na):Math.max(Math.min((na+ub)/2,this.Vb[r.layer]),na),b.B(W++,hb,ab),b.B(W++,sa,ab)))}if(null!==d&&La){if(null!==h){if(n===dc){var re=b.m(0),be=b.m(2);re.O(be)||b.ia(1,(re.x+be.x)/2,(re.y+be.y)/2)}Da=b.getLinkPoint(e,h,dc,!0,!1,g,k);Da.F()||Da.set(e.Z.km);b.ia(0,Da.x,Da.y)}null!==k&&(p===dc&&(re=b.m(b.ta-1),be=b.m(b.ta-3),re.O(be)||b.ia(b.ta-2,(re.x+be.x)/2,(re.y+be.y)/2)),Da=b.getLinkPoint(g,k,dc,!1,!1,e,h),Da.F()||Da.set(g.Z.km),b.ia(b.ta-1,Da.x,Da.y))}b.Dj();c.commit()}}}for(var jd= new K(J),vh=this.network.edges.j;vh.next();){var If=vh.value.link;null!==If&&If.ic&&!jd.contains(If)&&jd.add(If)}if(0oc.y&&(zc=ib.y>oc.y?0:wd.xqc.x&&(Jg=zh.x>qc.x?0:fc.yb.layer?1:a.jfb.jf?1:a.Feb.Fe?1:0:0};qu.prototype.UG=function(a,b){return a instanceof mv&&b instanceof mv&&a!==b?a.firstb.first||a.Oib.Oi||a.jfb.jf?1:a.Feb.Fe?1:0:0}; qu.prototype.Oy=function(a,b){return a instanceof mv&&b instanceof mv&&a!==b?a.qeb.qe||a.Oib.Oi||a.jfb.jf?1:a.Feb.Fe?1:0:0};function nv(a,b){v&&(D.p(a,qu,"isApprox:a"),D.p(b,qu,"isApprox:b"));var c=a-b;return-1c}function ov(a,b,c,d){v&&(D.p(a,qu,"isUnoccupied2:px"),D.p(b,qu,"isUnoccupied2:py"),D.p(c,qu,"isUnoccupied2:qx"),D.p(d,qu,"isUnoccupied2:qy"));return!0} function Eu(a,b){var c,d=a.ue[b];if(d>=a.zh.length){c=[];for(var e=0;ea&&(this.rj=a,this.N()))});D.defineProperty(qu,{Tq:"setsPortSpots"},function(){return this.ui},function(a){this.ui!==a&&(D.h(a,"boolean",qu,"setsPortSpots"),this.ui=a,this.N())});D.defineProperty(qu,{qG:"linkSpacing"},function(){return this.As},function(a){this.As!==a&&(D.h(a,"number",qu,"linkSpacing"),0<=a&&(this.As=a,this.N()))});D.w(qu,{GJ:"maxLayer"},function(){return this.Ab}); D.w(qu,{cM:"maxIndex"},function(){return this.ww});D.w(qu,{bM:"maxColumn"},function(){return this.Qb});D.w(qu,{hM:"minIndexLayer"},function(){return this.Js});D.w(qu,{dM:"maxIndexLayer"},function(){return this.Zf});var ru;qu.CycleDepthFirst=ru=D.s(qu,"CycleDepthFirst",0);var xu;qu.CycleGreedy=xu=D.s(qu,"CycleGreedy",1);var su;qu.LayerOptimalLinkLength=su=D.s(qu,"LayerOptimalLinkLength",0);var Pu;qu.LayerLongestPathSink=Pu=D.s(qu,"LayerLongestPathSink",1);var Ru; qu.LayerLongestPathSource=Ru=D.s(qu,"LayerLongestPathSource",2);var tu;qu.InitDepthFirstOut=tu=D.s(qu,"InitDepthFirstOut",0);var Xu;qu.InitDepthFirstIn=Xu=D.s(qu,"InitDepthFirstIn",1);var Vu;qu.InitNaive=Vu=D.s(qu,"InitNaive",2);var av;qu.AggressiveNone=av=D.s(qu,"AggressiveNone",0);var uu;qu.AggressiveLess=uu=D.s(qu,"AggressiveLess",1);var bv;qu.AggressiveMore=bv=D.s(qu,"AggressiveMore",2);qu.PackNone=0;var cv;qu.PackExpand=cv=1;var dv;qu.PackStraighten=dv=2;var fv;qu.PackMedian=fv=4;var vu; qu.PackAll=vu=7;function mv(){this.index=this.Fe=this.jf=this.qe=this.first=this.layer=0;this.link=null;this.Oi=0}D.ne(mv,{layer:!0,first:!0,qe:!0,jf:!0,Fe:!0,index:!0,link:!0,Oi:!0});function wu(){ua.call(this)}D.Ta(wu,ua);D.ka("LayeredDigraphNetwork",wu);wu.prototype.createVertex=function(){return new pv};wu.prototype.createEdge=function(){return new qv}; function pv(){va.call(this);this.index=this.column=this.layer=-1;this.component=NaN;this.near=null;this.valid=!1;this.finish=this.jq=NaN;this.En=0;this.FB=this.GB=null}D.Ta(pv,va);D.ka("LayeredDigraphVertex",pv);function qv(){wa.call(this);this.forest=this.rev=this.valid=!1;this.portToPos=this.portFromPos=NaN;this.portToColOffset=this.portFromColOffset=0}D.Ta(qv,wa);D.ka("LayeredDigraphEdge",qv); function $(){0b.level)return!1;a.removeChild(c.parent,c)}return!0} $.prototype.removeChild=function(a,b){if(null!==a&&null!==b){v&&D.l(a,wv,$,"removeChild:p");v&&D.l(b,wv,$,"removeChild:c");for(var c=a.children,d=0,e=0;eg?gw(a,k,za,B,A):hw(a,k,za,B,A);za=A.x;B=A.width;A=A.height;break;case Vv:for(m=0;ms&&(eawb&&(Rw(a,-wb,0,gb,m-1),Sw(H,-wb,0),Sw(R,-wb,0),wb=0)}n.sa.n(wb,la);B=Math.max(B,aa);A=Math.max(A,O+(0===Da?0:y)+W.height);ea=aa}else{0s&&(lawb&&(Rw(a,0,-wb,gb,m-1),Sw(H,0,-wb),Sw(R,0,-wb),wb=0);n.sa.n(ea,wb);A=Math.max(A,V);B=Math.max(B,O+(0===Da?0:y)+W.width);la=V}La++}0< Da&&(b?(A+=Math.max(0,c),eaq&&(q=0),135w&&(w=0),p===Wv&&(l+=u/2+a.W.y),k+=d+c):b?(null===a.comments?d>B&&(p=Ww(p,d-B,0),k=p.x,l=p.y,B=d,q=0):B=Uw(a,B,q),0>q&&(k-=q,q=0),135A&&(p=Ww(p,0,e-A),k=p.x,l=p.y,A=e,w=0):A=Vw(a,A,w),0>w&&(l-=w,w=0),k+=d+c);if(0g[0].x?g[2].assign(g[1]):g[1].assign(g[2])),g[3].yg[0].x?g[3].assign(g[2]):g[2].assign(g[3])),p[0].n(q+d,0),p[1].n(p[0].x,e),p[2].yg[0].y?g[2].assign(g[1]):g[1].assign(g[2])),g[3].xg[0].y?g[3].assign(g[2]):g[2].assign(g[3])),p[0].n(0,w+e),p[1].n(d,p[0].y),p[2].xc?gw(b,e,La,O,H):hw(b,e,La,O,H);La=H.x;O=H.width;H=H.height;break;case Vv:for(k=0;kr&&(aar&&(Vp&&(p=0),135B&&(B=0));b.Wa.n(p,B);b.ub.n(O,H)}} function gw(a,b,c,d,e){v&&D.l(a,wv,$,"layoutBusChildrenPosDir:v");var g=b.length;if(0===g)return new C(c,0,d,e);if(1===g){var h=b[0];d=h.ub.width;e=h.ub.height;return new C(c,0,d,e)}for(var k=a.nodeSpacing,l=a.rowSpacing,m=90===bw(a),n=0,p=0,q=0,r=0;rm&&(d-=m),e=Math.max(e,Math.max(w,q)+b+s.height),0>h.sa.x&&(c=$w(a,h.sa.x,!1,c,k))):(h.sa.n(d+b,c+k/2-h.W.y-h.Wa.y),d=Math.max(d,Math.max(y,p)+b+s.width),m=c+k/2-h.W.y-h.Wa.y,e=Math.max(e,m+s.height),0>m&&(e-=m),0>h.sa.y&&(c=$w(a,h.sa.y,!0,c,k))));return new C(c,0,d,e)} function hw(a,b,c,d,e){v&&D.l(a,wv,$,"layoutBusChildrenNegDir:v");var g=b.length;if(0===g)return new C(c,0,d,e);if(1===g){var h=b[0];d=h.ub.width;e=h.ub.height;return new C(c,0,d,e)}for(var k=a.nodeSpacing,l=a.rowSpacing,m=270===bw(a),n=0,p=0,q=0,r=0;rp&&(d-=p),e=Math.max(e,Math.abs(Math.min(w,q))+l+s.height),0>h.sa.x&&(c=$w(a,h.sa.x,!1,c,k))):(h.sa.n(-d-s.width-l,c+k/2-h.W.y-h.Wa.y),d=Math.max(d,Math.abs(Math.min(y,p))+l+s.width),p=c+k/2-h.W.y-h.Wa.y,e=Math.max(e,p+s.height),0>p&&(e-=p),0>h.sa.y&&(c=$w(a,h.sa.y,!0,c,k))));for(r=0;rd&&(d=c+a.width);0>c&&(d-=c);return d;case cw:return a.width>b?a.width:b;case dw:return 2*a.W.x>b?a.width:b+a.width-2*a.W.x;case Uv:case Jv:return d=Math.min(0,c),c=Math.max(b,c+a.width),Math.max(a.width,c-d);case Vv:return a.width-a.W.x+a.nodeSpacing/2+b;case Wv:return Math.max(a.width,a.W.x+a.nodeSpacing/2+b);default:return b}} function Vw(a,b,c){v&&D.l(a,wv,$,"calculateSubheight:v");switch(a.alignment){case Sv:case Tw:var d=b;c+a.height>d&&(d=c+a.height);0>c&&(d-=c);return d;case cw:return a.height>b?a.height:b;case dw:return 2*a.W.y>b?a.height:b+a.height-2*a.W.y;case Uv:case Jv:return d=Math.min(0,c),c=Math.max(b,c+a.height),Math.max(a.height,c-d);case Vv:return a.height-a.W.y+a.nodeSpacing/2+b;case Wv:return Math.max(a.height,a.W.y+a.nodeSpacing/2+b);default:return b}} function Ww(a,b,c){v&&D.l(a,ya,$,"alignOffset:align");switch(a){case Tw:b/=2;c/=2;break;case Sv:b/=2;c/=2;break;case cw:c=b=0;break;case dw:break;default:D.k("Unhandled alignment value "+a.toString())}return new N(b,c)}function Ow(a,b,c,d,e,g){v&&D.l(a,wv,$,"shiftRelPosAlign:v");v&&D.l(b,ya,$,"shiftRelPosAlign:align");b=Ww(b,c,d);Rw(a,b.x,b.y,e,g)}function Rw(a,b,c,d,e){v&&D.l(a,wv,$,"shiftRelPos:v");if(0!==b||0!==c)for(a=a.children;d<=e;d++){var g=a[d].sa;g.x+=b;g.y+=c}} function Pw(a,b,c,d){v&&(D.l(b,wv,$,"recordMidPoints:v"),D.h(c,"number",$,"recordMidPoints:x"),D.h(d,"number",$,"recordMidPoints:y"));var e=b.parent;switch(a.Wf){case sv:for(a=b.uc;a.next();)b=a.value,b.fromVertex===e&&b.jt.n(c,d);break;case zv:for(a=b.sc;a.next();)b=a.value,b.toVertex===e&&b.jt.n(c,d);break;default:D.k("Unhandled path value "+a.Wf.toString())}}function Sw(a,b,c){for(var d=0;dp.length||null===q||2>q.length))for(m= l=0;lt&&e.ye.y&&tb.length||null===l||2>l.length)d=null;else{n=Nw(a,b.length+l.length);for(d=g=e=0;ge;)t=l[g++],n[d++].n(t.x+m,t.y);l=Nw(a,d);for(e=0;ep.length||null===g||2>g.length)e=null;else{n=Nw(a,p.length+g.length);for(m=y=l=0;lg;)e=p[l++], n[m++].n(e.x,e.y);e=Nw(a,m);for(l=0;lp.length||null===q||2>q.length))for(m=l=0;lg&&e.xe.x&&gb.length||null===l||2>l.length)d=null;else{n=Nw(a,b.length+l.length);for(d=g=e=0;ge;)t=l[g++],n[d++].n(t.x,t.y+m);l=Nw(a,d);for(e=0;ep.length||null===g||2>g.length)e=null;else{n=Nw(a,p.length+g.length);for(m=y=l=0;lg;)e=p[l++],n[m++].n(e.x,e.y);e=Nw(a,m);for(l=0;l=a?0:135>=a?90:225>=a?180:315>=a?270:0} function ew(a){v&&D.l(a,wv,$,"computeLayerSpacing:v");var b=bw(a),b=90===b||270===b,c=a.layerSpacing;if(0=a&&(this.Aa.nodeIndentPastParent=a,this.N()))}); D.defineProperty($,{nodeSpacing:"nodeSpacing"},function(){return this.Aa.nodeSpacing},function(a){this.Aa.nodeSpacing!==a&&(D.h(a,"number",$,"nodeSpacing"),this.Aa.nodeSpacing=a,this.N())});D.defineProperty($,{layerSpacing:"layerSpacing"},function(){return this.Aa.layerSpacing},function(a){this.Aa.layerSpacing!==a&&(D.h(a,"number",$,"layerSpacing"),this.Aa.layerSpacing=a,this.N())}); D.defineProperty($,{layerSpacingParentOverlap:"layerSpacingParentOverlap"},function(){return this.Aa.layerSpacingParentOverlap},function(a){this.Aa.layerSpacingParentOverlap!==a&&(D.h(a,"number",$,"layerSpacingParentOverlap"),0<=a&&1>=a&&(this.Aa.layerSpacingParentOverlap=a,this.N()))});D.defineProperty($,{compaction:"compaction"},function(){return this.Aa.compaction},function(a){this.Aa.compaction!==a&&(D.Da(a,$,$,"compaction"),a===Zv||a===aw)&&(this.Aa.compaction=a,this.N())}); D.defineProperty($,{breadthLimit:"breadthLimit"},function(){return this.Aa.breadthLimit},function(a){this.Aa.breadthLimit!==a&&(D.h(a,"number",$,"breadthLimit"),0<=a&&(this.Aa.breadthLimit=a,this.N()))});D.defineProperty($,{rowSpacing:"rowSpacing"},function(){return this.Aa.rowSpacing},function(a){this.Aa.rowSpacing!==a&&(D.h(a,"number",$,"rowSpacing"),this.Aa.rowSpacing=a,this.N())}); D.defineProperty($,{rowIndent:"rowIndent"},function(){return this.Aa.rowIndent},function(a){this.Aa.rowIndent!==a&&(D.h(a,"number",$,"rowIndent"),0<=a&&(this.Aa.rowIndent=a,this.N()))});D.defineProperty($,{commentSpacing:"commentSpacing"},function(){return this.Aa.commentSpacing},function(a){this.Aa.commentSpacing!==a&&(D.h(a,"number",$,"commentSpacing"),this.Aa.commentSpacing=a,this.N())}); D.defineProperty($,{commentMargin:"commentMargin"},function(){return this.Aa.commentMargin},function(a){this.Aa.commentMargin!==a&&(D.h(a,"number",$,"commentMargin"),this.Aa.commentMargin=a,this.N())});D.defineProperty($,{setsPortSpot:"setsPortSpot"},function(){return this.Aa.setsPortSpot},function(a){this.Aa.setsPortSpot!==a&&(D.h(a,"boolean",$,"setsPortSpot"),this.Aa.setsPortSpot=a,this.N())}); D.defineProperty($,{portSpot:"portSpot"},function(){return this.Aa.portSpot},function(a){D.l(a,S,$,"portSpot");this.Aa.portSpot.O(a)||(this.Aa.portSpot=a,this.N())});D.defineProperty($,{setsChildPortSpot:"setsChildPortSpot"},function(){return this.Aa.setsChildPortSpot},function(a){this.Aa.setsChildPortSpot!==a&&(D.h(a,"boolean",$,"setsChildPortSpot"),this.Aa.setsChildPortSpot=a,this.N())}); D.defineProperty($,{childPortSpot:"childPortSpot"},function(){return this.Aa.childPortSpot},function(a){D.l(a,S,$,"childPortSpot");this.Aa.childPortSpot.O(a)||(this.Aa.childPortSpot=a,this.N())});D.defineProperty($,{iL:"alternateSorting"},function(){return this.Ba.sorting},function(a){this.Ba.sorting!==a&&(D.Da(a,$,$,"alternateSorting"),a===Ov||a===Pv||a===Qv||Rv)&&(this.Ba.sorting=a,this.N())}); D.defineProperty($,{XK:"alternateComparer"},function(){return this.Ba.comparer},function(a){this.Ba.comparer!==a&&(D.h(a,"function",$,"alternateComparer"),this.Ba.comparer=a,this.N())});D.defineProperty($,{RK:"alternateAngle"},function(){return this.Ba.angle},function(a){this.Ba.angle!==a&&(D.h(a,"number",$,"alternateAngle"),0===a||90===a||180===a||270===a)&&(this.Ba.angle=a,this.N())}); D.defineProperty($,{QK:"alternateAlignment"},function(){return this.Ba.alignment},function(a){this.Ba.alignment!==a&&(D.Da(a,$,$,"alternateAlignment"),this.Ba.alignment=a,this.N())});D.defineProperty($,{aL:"alternateNodeIndent"},function(){return this.Ba.nodeIndent},function(a){this.Ba.nodeIndent!==a&&(D.h(a,"number",$,"alternateNodeIndent"),0<=a&&(this.Ba.nodeIndent=a,this.N()))}); D.defineProperty($,{bL:"alternateNodeIndentPastParent"},function(){return this.Ba.nodeIndentPastParent},function(a){this.Ba.nodeIndentPastParent!==a&&(D.h(a,"number",$,"alternateNodeIndentPastParent"),0<=a&&1>=a&&(this.Ba.nodeIndentPastParent=a,this.N()))});D.defineProperty($,{cL:"alternateNodeSpacing"},function(){return this.Ba.nodeSpacing},function(a){this.Ba.nodeSpacing!==a&&(D.h(a,"number",$,"alternateNodeSpacing"),this.Ba.nodeSpacing=a,this.N())}); D.defineProperty($,{ZK:"alternateLayerSpacing"},function(){return this.Ba.layerSpacing},function(a){this.Ba.layerSpacing!==a&&(D.h(a,"number",$,"alternateLayerSpacing"),this.Ba.layerSpacing=a,this.N())});D.defineProperty($,{$K:"alternateLayerSpacingParentOverlap"},function(){return this.Ba.layerSpacingParentOverlap},function(a){this.Ba.layerSpacingParentOverlap!==a&&(D.h(a,"number",$,"alternateLayerSpacingParentOverlap"),0<=a&&1>=a&&(this.Ba.layerSpacingParentOverlap=a,this.N()))}); D.defineProperty($,{WK:"alternateCompaction"},function(){return this.Ba.compaction},function(a){this.Ba.compaction!==a&&(D.Da(a,$,$,"alternateCompaction"),a===Zv||a===aw)&&(this.Ba.compaction=a,this.N())});D.defineProperty($,{SK:"alternateBreadthLimit"},function(){return this.Ba.breadthLimit},function(a){this.Ba.breadthLimit!==a&&(D.h(a,"number",$,"alternateBreadthLimit"),0<=a&&(this.Ba.breadthLimit=a,this.N()))}); D.defineProperty($,{fL:"alternateRowSpacing"},function(){return this.Ba.rowSpacing},function(a){this.Ba.rowSpacing!==a&&(D.h(a,"number",$,"alternateRowSpacing"),this.Ba.rowSpacing=a,this.N())});D.defineProperty($,{eL:"alternateRowIndent"},function(){return this.Ba.rowIndent},function(a){this.Ba.rowIndent!==a&&(D.h(a,"number",$,"alternateRowIndent"),0<=a&&(this.Ba.rowIndent=a,this.N()))}); D.defineProperty($,{VK:"alternateCommentSpacing"},function(){return this.Ba.commentSpacing},function(a){this.Ba.commentSpacing!==a&&(D.h(a,"number",$,"alternateCommentSpacing"),this.Ba.commentSpacing=a,this.N())});D.defineProperty($,{UK:"alternateCommentMargin"},function(){return this.Ba.commentMargin},function(a){this.Ba.commentMargin!==a&&(D.h(a,"number",$,"alternateCommentMargin"),this.Ba.commentMargin=a,this.N())}); D.defineProperty($,{hL:"alternateSetsPortSpot"},function(){return this.Ba.setsPortSpot},function(a){this.Ba.setsPortSpot!==a&&(D.h(a,"boolean",$,"alternateSetsPortSpot"),this.Ba.setsPortSpot=a,this.N())});D.defineProperty($,{dL:"alternatePortSpot"},function(){return this.Ba.portSpot},function(a){D.l(a,S,$,"alternatePortSpot");this.Ba.portSpot.O(a)||(this.Ba.portSpot=a,this.N())}); D.defineProperty($,{gL:"alternateSetsChildPortSpot"},function(){return this.Ba.setsChildPortSpot},function(a){this.Ba.setsChildPortSpot!==a&&(D.h(a,"boolean",$,"alternateSetsChildPortSpot"),this.Ba.setsChildPortSpot=a,this.N())});D.defineProperty($,{TK:"alternateChildPortSpot"},function(){return this.Ba.childPortSpot},function(a){D.l(a,S,$,"alternateChildPortSpot");this.Ba.childPortSpot.O(a)||(this.Ba.childPortSpot=a,this.N())});var rv;$.PathDefault=rv=D.s($,"PathDefault",-1);var sv; $.PathDestination=sv=D.s($,"PathDestination",0);var zv;$.PathSource=zv=D.s($,"PathSource",1);var Ov;$.SortingForwards=Ov=D.s($,"SortingForwards",10);var Pv;$.SortingReverse=Pv=D.s($,"SortingReverse",11);var Qv;$.SortingAscending=Qv=D.s($,"SortingAscending",12);var Rv;$.SortingDescending=Rv=D.s($,"SortingDescending",13);var Tw;$.AlignmentCenterSubtrees=Tw=D.s($,"AlignmentCenterSubtrees",20);var Sv;$.AlignmentCenterChildren=Sv=D.s($,"AlignmentCenterChildren",21);var cw; $.AlignmentStart=cw=D.s($,"AlignmentStart",22);var dw;$.AlignmentEnd=dw=D.s($,"AlignmentEnd",23);var Uv;$.AlignmentBus=Uv=D.s($,"AlignmentBus",24);var Jv;$.AlignmentBusBranching=Jv=D.s($,"AlignmentBusBranching",25);var Vv;$.AlignmentTopLeftBus=Vv=D.s($,"AlignmentTopLeftBus",26);var Wv;$.AlignmentBottomRightBus=Wv=D.s($,"AlignmentBottomRightBus",27);var Zv;$.CompactionNone=Zv=D.s($,"CompactionNone",30);var aw;$.CompactionBlock=aw=D.s($,"CompactionBlock",31);var tv; $.StyleLayered=tv=D.s($,"StyleLayered",40);var Nv;$.StyleLastParents=Nv=D.s($,"StyleLastParents",41);var Mv;$.StyleAlternating=Mv=D.s($,"StyleAlternating",42);var Lv;$.StyleRootOnly=Lv=D.s($,"StyleRootOnly",43);var vv;$.ArrangementVertical=vv=D.s($,"ArrangementVertical",50);var bx;$.ArrangementHorizontal=bx=D.s($,"ArrangementHorizontal",51);var yv;$.ArrangementFixedRoots=yv=D.s($,"ArrangementFixedRoots",52);var uv;$.LayerIndividual=uv=D.s($,"LayerIndividual",60);var Hv; $.LayerSiblings=Hv=D.s($,"LayerSiblings",61);var Gv;$.LayerUniform=Gv=D.s($,"LayerUniform",62);function xv(){ua.call(this)}D.Ta(xv,ua);D.ka("TreeNetwork",xv);xv.prototype.createVertex=function(){return new wv};xv.prototype.createEdge=function(){return new dx}; function wv(){va.call(this);this.initialized=!1;this.parent=null;this.children=[];this.maxGenerationCount=this.maxChildrenCount=this.descendantCount=this.level=0;this.comments=null;this.sa=new N(0,0);this.ub=new Ca(0,0);this.Wa=new N(0,0);this.Oq=this.Nq=this.jK=!1;this.fv=this.Mu=null;this.sorting=Ov;this.comparer=xs;this.angle=0;this.alignment=Sv;this.nodeIndentPastParent=this.nodeIndent=0;this.nodeSpacing=20;this.layerSpacing=50;this.layerSpacingParentOverlap=0;this.compaction=aw;this.breadthLimit= 0;this.rowSpacing=25;this.commentSpacing=this.rowIndent=10;this.commentMargin=20;this.setsPortSpot=!0;this.portSpot=Vc;this.setsChildPortSpot=!0;this.childPortSpot=Vc}D.Ta(wv,va);D.ka("TreeVertex",wv); wv.prototype.copyInheritedPropertiesFrom=function(a){null!==a&&(this.sorting=a.sorting,this.comparer=a.comparer,this.angle=a.angle,this.alignment=a.alignment,this.nodeIndent=a.nodeIndent,this.nodeIndentPastParent=a.nodeIndentPastParent,this.nodeSpacing=a.nodeSpacing,this.layerSpacing=a.layerSpacing,this.layerSpacingParentOverlap=a.layerSpacingParentOverlap,this.compaction=a.compaction,this.breadthLimit=a.breadthLimit,this.rowSpacing=a.rowSpacing,this.rowIndent=a.rowIndent,this.commentSpacing=a.commentSpacing, this.commentMargin=a.commentMargin,this.setsPortSpot=a.setsPortSpot,this.portSpot=a.portSpot,this.setsChildPortSpot=a.setsChildPortSpot,this.childPortSpot=a.childPortSpot)};D.w(wv,{Gn:"childrenCount"},function(){return this.children.length});D.defineProperty(wv,{zM:"relativePosition"},function(){return this.sa},function(a){this.sa.set(a)});D.defineProperty(wv,{MM:"subtreeSize"},function(){return this.ub},function(a){this.ub.set(a)}); D.defineProperty(wv,{LM:"subtreeOffset"},function(){return this.Wa},function(a){this.Wa.set(a)});function dx(){wa.call(this);this.jt=new N(0,0)}D.Ta(dx,wa);D.ka("TreeEdge",dx); dx.prototype.commit=function(){var a=this.link;if(null!==a&&!a.Mj){var b=this.network.Yb,c=null,d=null;switch(b.Wf){case sv:c=this.fromVertex;d=this.toVertex;break;case zv:c=this.toVertex;d=this.fromVertex;break;default:D.k("Unhandled path value "+b.Wf.toString())}if(null!==c&&null!==d)if(b=this.jt,0!==b.x||0!==b.y||c.jK){var d=c.qb,e=bw(c),g=ew(c),h=c.rowSpacing;a.yo();var k=a.lf===Tj,l=a.ic,m=0,n,p;a.Dm();if(l||k){for(m=2;4q.y+c.rowIndent&&(r=Math.min(r,Math.max(n.y,r-fw(c))))):c.alignment===cw?(r=d.top+b.y,0===b.y&&n.yq.x+c.rowIndent&&(r=Math.min(r,Math.max(n.x,r-fw(c))))):c.alignment===cw?(r=d.left+b.x,0===b.x&&n.xq.y+c.rowIndent&&(r=Math.min(r,Math.max(n.y,r-fw(c))))):c.alignment===cw?(r=d.top+b.y,0===b.y&&n.yq.x+c.rowIndent&&(r=Math.min(r,Math.max(n.x,r-fw(c))))):c.alignment===cw?(r=d.left+b.x,0===b.x&&n.x