@ -1,4 +1,4 @@
var mxClient = { VERSION : "28.2. 3 ", IS _IE : null != navigator . userAgent && 0 <= navigator . userAgent . indexOf ( "MSIE" ) , IS _IE11 : null != navigator . userAgent && ! ! navigator . userAgent . match ( /Trident\/7\./ ) , IS _EDGE : null != navigator . userAgent && ! ! navigator . userAgent . match ( /Edge\// ) , IS _EM : "spellcheck" in document . createElement ( "textarea" ) && 8 == document . documentMode , VML _PREFIX : "v" , OFFICE _PREFIX : "o" , IS _NS : null != navigator . userAgent && 0 <= navigator . userAgent . indexOf ( "Mozilla/" ) && 0 > navigator . userAgent . indexOf ( "MSIE" ) && 0 > navigator . userAgent . indexOf ( "Edge/" ) ,
var mxClient = { VERSION : "28.2. 5 ", IS _IE : null != navigator . userAgent && 0 <= navigator . userAgent . indexOf ( "MSIE" ) , IS _IE11 : null != navigator . userAgent && ! ! navigator . userAgent . match ( /Trident\/7\./ ) , IS _EDGE : null != navigator . userAgent && ! ! navigator . userAgent . match ( /Edge\// ) , IS _EM : "spellcheck" in document . createElement ( "textarea" ) && 8 == document . documentMode , VML _PREFIX : "v" , OFFICE _PREFIX : "o" , IS _NS : null != navigator . userAgent && 0 <= navigator . userAgent . indexOf ( "Mozilla/" ) && 0 > navigator . userAgent . indexOf ( "MSIE" ) && 0 > navigator . userAgent . indexOf ( "Edge/" ) ,
IS _OP : null != navigator . userAgent && ( 0 <= navigator . userAgent . indexOf ( "Opera/" ) || 0 <= navigator . userAgent . indexOf ( "OPR/" ) ) , IS _OT : null != navigator . userAgent && 0 <= navigator . userAgent . indexOf ( "Presto/" ) && 0 > navigator . userAgent . indexOf ( "Presto/2.4." ) && 0 > navigator . userAgent . indexOf ( "Presto/2.3." ) && 0 > navigator . userAgent . indexOf ( "Presto/2.2." ) && 0 > navigator . userAgent . indexOf ( "Presto/2.1." ) && 0 > navigator . userAgent . indexOf ( "Presto/2.0." ) && 0 > navigator . userAgent . indexOf ( "Presto/1." ) , IS _SF : /Apple Computer, Inc/ . test ( navigator . vendor ) ,
IS _ANDROID : 0 <= navigator . appVersion . indexOf ( "Android" ) , IS _IOS : /iP(hone|od|ad)/ . test ( navigator . platform ) || navigator . userAgent . match ( /Mac/ ) && navigator . maxTouchPoints && 2 < navigator . maxTouchPoints , IS _WEBVIEW : /((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i . test ( navigator . userAgent ) , IS _GC : /Google Inc/ . test ( navigator . vendor ) , IS _CHROMEAPP : null != window . chrome && null != chrome . app && null != chrome . app . runtime , IS _FF : - 1 < navigator . userAgent . toLowerCase ( ) . indexOf ( "firefox" ) , IS _MT : 0 <= navigator . userAgent . indexOf ( "Firefox/" ) &&
0 > navigator . userAgent . indexOf ( "Firefox/1." ) && 0 > navigator . userAgent . indexOf ( "Firefox/2." ) || 0 <= navigator . userAgent . indexOf ( "Iceweasel/" ) && 0 > navigator . userAgent . indexOf ( "Iceweasel/1." ) && 0 > navigator . userAgent . indexOf ( "Iceweasel/2." ) || 0 <= navigator . userAgent . indexOf ( "SeaMonkey/" ) && 0 > navigator . userAgent . indexOf ( "SeaMonkey/1." ) || 0 <= navigator . userAgent . indexOf ( "Iceape/" ) && 0 > navigator . userAgent . indexOf ( "Iceape/1." ) , IS _SVG : "MICROSOFT INTERNET EXPLORER" != navigator . appName . toUpperCase ( ) , NO _FO : ! document . createElementNS ||
@ -29,7 +29,7 @@ mxRectangle.prototype.equals=function(a){return null!=a&&a.x==this.x&&a.y==this.
var mxEffects = { animateChanges : function ( a , b , c ) { var d = 0 , e = function ( ) { for ( var g = ! 1 , k = 0 ; k < b . length ; k ++ ) { var l = b [ k ] ; if ( l instanceof mxGeometryChange || l instanceof mxTerminalChange || l instanceof mxValueChange || l instanceof mxChildChange || l instanceof mxStyleChange ) { var m = a . getView ( ) . getState ( l . cell || l . child , ! 1 ) ; if ( null != m ) if ( g = ! 0 , l . constructor != mxGeometryChange || a . model . isEdge ( l . cell ) ) mxUtils . setOpacity ( m . shape . node , 100 * d / 10 ) ; else { var n = a . getView ( ) . scale , p = ( l . geometry . x - l . previous . x ) * n , q = ( l . geometry . y -
l . previous . y ) * n , r = ( l . geometry . width - l . previous . width ) * n ; n *= l . geometry . height - l . previous . height ; 0 == d ? ( m . x -= p , m . y -= q , m . width -= r , m . height -= n ) : ( m . x += p / 10 , m . y += q / 10 , m . width += r / 10 , m . height += n / 10 ) ; a . cellRenderer . redraw ( m ) ; mxEffects . cascadeOpacity ( a , l . cell , 100 * d / 10 ) } } } 10 > d && g ? ( d ++ , window . setTimeout ( e , f ) ) : null != c && c ( ) } , f = 30 ; e ( ) } , cascadeOpacity : function ( a , b , c ) { for ( var d = a . model . getChildCount ( b ) , e = 0 ; e < d ; e ++ ) { var f = a . model . getChildAt ( b , e ) , g = a . getView ( ) . getState ( f ) ; null != g && ( mxUtils . setOpacity ( g . shape . node , c ) ,
mxEffects . cascadeOpacity ( a , f , c ) ) } b = a . model . getEdges ( b ) ; if ( null != b ) for ( e = 0 ; e < b . length ; e ++ ) d = a . getView ( ) . getState ( b [ e ] ) , null != d && mxUtils . setOpacity ( d . shape . node , c ) } , fadeOut : function ( a , b , c , d , e , f ) { d = d || 40 ; e = e || 30 ; var g = b || 100 ; mxUtils . setOpacity ( a , g ) ; if ( f || null == f ) { var k = function ( ) { g = Math . max ( g - d , 0 ) ; mxUtils . setOpacity ( a , g ) ; 0 < g ? window . setTimeout ( k , e ) : ( a . style . visibility = "hidden" , c && a . parentNode && a . parentNode . removeChild ( a ) ) } ; window . setTimeout ( k , e ) } else a . style . visibility = "hidden" , c && a . parentNode && a . parentNode . removeChild ( a ) } } ,
mxUtils = { errorResource : "none" != mxClient . language ? "error" : "" , closeResource : "none" != mxClient . language ? "close" : "" , errorImage : mxClient . imageBasePath + "/error.gif" , lightDarkColorSupported : function ( ) { var a = document . createElement ( "div" ) ; a . style . color = "light-dark(white, black)" ; a = a . style . color ; null != a && "generic-light-dark(" === a . substring ( 0 , 19 ) && ( a = a . replace ( "generic-light-dark" , "light-dark" ) ) ; return "light-dark(white, black)" === a } ( ) , preferDarkColor : ! 1 , lightDarkColorRegex : /light-dark\(\s*(#[0-9a-fA-F]{3, 6}|rgba?\([^)]+\)|var\([^)]+\)|[a-zA-Z]+)\s*,\s*(#[0-9a-fA-F]{3,6 }|rgba?\([^)]+\)|var\([^)]+\)|[a-zA-Z]+)\s*\)/,
mxUtils = { errorResource : "none" != mxClient . language ? "error" : "" , closeResource : "none" != mxClient . language ? "close" : "" , errorImage : mxClient . imageBasePath + "/error.gif" , lightDarkColorSupported : function ( ) { var a = document . createElement ( "div" ) ; a . style . color = "light-dark(white, black)" ; a = a . style . color ; null != a && "generic-light-dark(" === a . substring ( 0 , 19 ) && ( a = a . replace ( "generic-light-dark" , "light-dark" ) ) ; return "light-dark(white, black)" === a } ( ) , preferDarkColor : ! 1 , lightDarkColorRegex : /light-dark\(\s*(#[0-9a-fA-F]{3, 8}|rgba?\([^)]+\)|var\([^)]+\)|[a-zA-Z]+)\s*,\s*(#[0-9a-fA-F]{3,8 }|rgba?\([^)]+\)|var\([^)]+\)|[a-zA-Z]+)\s*\)/,
varColorRegex : /^var\([^)]+\)/ , hexColorRegex : /(^#[a-zA-Z0-9]*$)/ , rgbaColorRegex : /^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i , canvasContext : function ( ) { var a = null ; try { a = document . createElement ( "canvas" ) . getContext ( "2d" ) } catch ( b ) { } return a } ( ) , validInvalidColor : "rgba(0, 0, 0, 0)" , normalizedValidInvalidColor : "rgba(0,0,0,0)" , removeCursors : function ( a ) { null != a . style && ( a . style . cursor = "" ) ; a = a . childNodes ; if ( null != a ) for ( var b = a . length , c = 0 ; c < b ; c += 1 ) mxUtils . removeCursors ( a [ c ] ) } , getCurrentStyle : function ( ) { return mxClient . IS _IE &&
( null == document . documentMode || 9 > document . documentMode ) ? function ( a ) { return null != a ? a . currentStyle : null } : function ( a ) { return null != a ? window . getComputedStyle ( a , "" ) : null } } ( ) , getCssFontFamily : function ( a ) { if ( "string" === typeof a ) { a = a . split ( "," ) ; for ( var b = 0 ; b < a . length ; b ++ ) a [ b ] = mxUtils . trim ( a [ b ] ) , '"' == a [ b ] . charAt ( 0 ) && '"' == a [ b ] . charAt ( a [ b ] . length - 1 ) && ( a [ b ] = a [ b ] . substring ( 1 , a [ b ] . length - 1 ) ) ; a = a . join ( ", " ) } return a } , parseCssFontFamily : function ( a , b ) { if ( "string" === typeof a ) { a = a . split ( "," ) ; for ( var c = 0 ; c < a . length ; c ++ ) { a [ c ] =
mxUtils . trim ( a [ c ] ) ; var d = 2 < a [ c ] . length && '"' == a [ c ] . charAt ( a [ c ] . length - 1 ) && '"' == a [ c ] . charAt ( 0 ) ; d && ( a [ c ] = a [ c ] . substring ( 1 , a [ c ] . length - 1 ) ) ; b && ( a [ c ] = mxUtils . htmlEntities ( a [ c ] ) ) ; if ( d || 0 <= a [ c ] . indexOf ( " " ) ) a [ c ] = '"' + a [ c ] + '"' } a = a . join ( ", " ) } return a } , parseCssNumber : function ( a ) { "thin" == a ? a = "2" : "medium" == a ? a = "4" : "thick" == a && ( a = "6" ) ; a = parseFloat ( a ) ; isNaN ( a ) && ( a = 0 ) ; return a } , setPrefixedStyle : function ( ) { var a = null ; mxClient . IS _OT ? a = "O" : mxClient . IS _SF || mxClient . IS _GC ? a = "Webkit" : mxClient . IS _MT ? a = "Moz" : mxClient . IS _IE &&
@ -56,19 +56,19 @@ b,c-e)+"px")},load:function(a){a=new mxXmlRequest(a,null,"GET",!1);a.send();retu
p || 299 < p ? g ( ) : ( e [ m ] = n , d -- , 0 == d && b ( e ) ) } , g ) } ) ( a [ k ] , k ) ; 0 == d && b ( e ) } , post : function ( a , b , c , d ) { return ( new mxXmlRequest ( a , b ) ) . send ( c , d ) } , submit : function ( a , b , c , d ) { return ( new mxXmlRequest ( a , b ) ) . simulate ( c , d ) } , loadInto : function ( a , b , c ) { mxClient . IS _IE ? b . onreadystatechange = function ( ) { 4 == b . readyState && c ( ) } : b . addEventListener ( "load" , c , ! 1 ) ; b . load ( a ) } , getValue : function ( a , b , c ) { a = null != a ? a [ b ] : null ; null == a && ( a = c ) ; return a } , getColorValue : function ( a , b , c ) { a = null != a ? a [ b ] : null ; if ( null == a || "default" == a ) a = c ; return a } , getNumber : function ( a ,
b , c ) { a = null != a ? a [ b ] : null ; null == a && ( a = c || 0 ) ; return Number ( a ) } , isLightDarkColor : function ( a ) { return "string" === typeof a && "light-dark" == mxUtils . ltrim ( a ) . substring ( 0 , 10 ) } , isVarColor : function ( a ) { return mxUtils . varColorRegex . test ( a ) } , isHexColor : function ( a ) { return mxUtils . hexColorRegex . test ( a ) } , isRgbColor : function ( a ) { return mxUtils . rgbaColorRegex . test ( a ) } , isValidColor : function ( a ) { if ( null == a ) return ! 1 ; a = String ( a ) . replace ( /\s/g , "" ) ; if ( a . toLowerCase ( ) == mxUtils . normalizedValidInvalidColor ) return ! 0 ; mxUtils . canvasContext . fillStyle =
mxUtils . validInvalidColor ; mxUtils . canvasContext . fillStyle = a ; return mxUtils . canvasContext . fillStyle != mxUtils . validInvalidColor } , isDarkColor : function ( a ) { a = mxUtils . parseColor ( a ) ; return null != a ? 128 > . 213 * a . r + . 715 * a . g + . 072 * a . b : ! 1 } , parseLightDarkColor : function ( a , b , c ) { var d = a , e = null ; null != a && ( a = a . match ( mxUtils . lightDarkColorRegex ) ) && 3 === a . length && ( d = mxUtils . trim ( a [ 1 ] ) , e = mxUtils . trim ( a [ 2 ] ) ) ; null == e && ( c || mxUtils . isVarColor ( d ) ) && ( e = d ) ; e = null != e ? e : null != b ? b : mxUtils . getInverseColor ( d ) ; return { light : d , dark : e } } ,
getInverseColor : function ( a , b , c ) { function d ( m ) { return Math . round ( b / 100 * ( 255 - m) + m * ( 1 - b / 100 ) ) } function e ( m ) { return Math . round ( Math . max ( 0 , Math . min ( 255 , m ) ) ) } c = null != c ? c : 180 ; b = null != b ? b : 93 ; var f = 0 , g = 0 , k = 0 ;if ( "transparent" == a . toLowerCase ( ) ) return a ; k = mxUtils . parseColor ( a ) ; if ( null == k) return a ; f = k . r ; g = k . g ; k = k . b ; f = d ( f ) ; g = d ( g ) ; k = d ( k ) ; a = [ 1 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 1 ] ; var l = Math . cos ( c * Math . PI / 180 ) ; c = Math . sin ( c * Math . PI / 180 ) ; a [ 0 ] = . 2126 + . 7874 * l - . 2126 * c ; a [ 1 ] = . 7152 - . 7152 * l - . 7152 * c ; a [ 2 ] = . 0722 - . 0722 * l + . 9278 * c ; a [ 3 ] = . 2126 - . 2126 *
l + . 143 * c ; a [ 4 ] = . 7152 + ( 1 - . 7152 ) * l + . 14 * c ; a [ 5 ] = . 0722 - . 0722 * l - . 283 * c ; a [ 6 ] = . 2126 - . 2126 * l - . 7874 * c ; a [ 7 ] = . 7152 - . 7152 * l + . 7152 * c ; a [ 8 ] = . 0722 + . 9278 * l + . 0722 * c ; c = e ( a [ 0 ] * f + a [ 1 ] * g + a [ 2 ] * k ) ; l = e ( a [ 3 ] * f + a [ 4 ] * g + a [ 5 ] * k ) ; f = e ( a [ 6 ] * f + a [ 7 ] * g + a [ 8 ] * k ) ; return "#" + ( 16777216 | c << 16 | l << 8 | f ) . toString ( 16 ) . slice ( 1 ) } , addAlphaToColor : function ( a , b ) { null != b && null != a && "transparent" != a && ( a = mxUtils . parseColor ( a ) , a = "rgba(" + a . r + "," + a . g + "," + a . b + "," + b+ ")" ) ; return a } , getLightDarkColor : function ( a , b , c , d ) { var e = { light : "transparent" , dark : "transparent" ,
cssText : "transparent" } ; null != a && a != mxConstants . NONE && ( "string" === typeof a ? ( a = mxUtils . parseLightDarkColor ( a , c , d ) , e . light = mxUtils . addAlphaToColor ( a . light , b ) , e . dark = mxUtils . addAlphaToColor ( a . dark , b ) , e . cssText = mxUtils . lightDarkColorSupported ? e . light == e . dark ? e . light : "light-dark(" + e . light + ", " + e . dark + ")" : mxUtils . preferDarkColor ? e . dark : e . light ) : ( e . light = a , e . dark = a , e . cssText = a ) ) ; return e } , invertLightDarkColor : function ( a ) { var b = { } ; b . light = a . dark ; b . dark = a . light ; b . cssText = b . light == b . dark ? b . light : "light-dark(" +
b . light + ", " + b . dark + ")" ; return b } , getColor : function ( a , b , c ) { a = null != a ? a [ b ] : null ; null == a ? a = c : a == mxConstants . NONE && ( a = null ) ; return a } , isEmptyObject : function ( a ) { for ( var b in a ) return ! 1 ; return ! 0 } , clone : function ( a , b , c ) { c = null != c ? c : ! 1 ; var d = null ; if ( null != a && "function" == typeof a . constructor ) if ( a . constructor === Element ) d = a . cloneNode ( null != c ? ! c : ! 1 ) ; else { d = new a . constructor ; for ( var e in a ) e != mxObjectIdentity . FIELD _NAME && ( null == b || 0 > mxUtils . indexOf ( b , e ) ) && ( d [ e ] = c || "object" != typeof a [ e ] ? a [ e ] : mxUtils . clone ( a [ e ] ) ) } return d } ,
equalPoints : function ( a , b ) { if ( null == a && null != b || null != a && null == b || null != a && null != b && a . length != b . length ) return ! 1 ; if ( null != a && null != b ) for ( var c = 0 ; c < a . length ; c ++ ) if ( null != a [ c ] && null == b [ c ] || null == a [ c ] && null != b [ c ] || null != a [ c ] && null != b [ c ] && ( a [ c ] . x != b [ c ] . x || a [ c ] . y != b [ c ] . y ) ) return ! 1 ; return ! 0 } , equalEntries : function ( a , b ) { var c = 0 ; if ( null == a && null != b || null != a && null == b || null != a && null != b && a . length != b . length ) return ! 1 ; if ( null != a && null != b ) { for ( var d in b ) c ++ ; for ( d in a ) if ( c -- , ! ( mxUtils . isNaN ( a [ d ] ) && mxUtils . isNaN ( b [ d ] ) ||
a [ d ] == b [ d ] ) ) return ! 1 } return 0 == c } , removeDuplicates : function ( a ) { for ( var b = new mxDictionary , c = [ ] , d = 0 ; d < a . length ; d ++ ) b . get ( a [ d ] ) || ( c . push ( a [ d ] ) , b . put ( a [ d ] , ! 0 ) ) ; return c } , isNaN : function ( a ) { return "number" == typeof a && isNaN ( a ) } , extend : function ( a , b ) { var c = function ( ) { } ; c . prototype = b . prototype ; a . prototype = new c ; a . prototype . constructor = a } , toString : function ( a ) { var b = "" , c ; for ( c in a ) try { if ( null == a [ c ] ) b += c + " = [null]\n" ; else if ( "function" == typeof a [ c ] ) b += c + " => [Function]\n" ; else if ( "object" == typeof a [ c ] ) { var d =
mxUtils . getFunctionName ( a [ c ] . constructor ) ; b += c + " => [" + d + "]\n" } else b += c + " = " + a [ c ] + "\n" } catch ( e ) { b += c + "=" + e . message } return b } , toRadians : function ( a ) { return Math . PI * a / 180 } , toDegree : function ( a ) { return 180 * a / Math . PI } , arcToCurves : function ( a , b , c , d , e , f , g , k , l ) { k -= a ; l -= b ; if ( 0 === c || 0 === d ) return A ; c = Math . abs ( c ) ; d = Math . abs ( d ) ; var m = - k / 2 , n = - l / 2 , p = Math . cos ( e * Math . PI / 180 ) ; A = Math . sin ( e * Math . PI / 180 ) ; e = p * m + A * n ; m = - 1 * A * m + p * n ; n = e * e ; var q = m * m , r = c * c , t = d * d , u = n / r + q / t ; 1 < u ? ( c *= Math . sqrt ( u ) , d *= Math . sqrt ( u ) , f = 0 ) : ( u = 1 , f === g &&
( u = - 1 ) , f = u * Math . sqrt ( ( r * t - r * q - t * n ) / ( r * q + t * n ) ) ) ; n = f * c * m / d ; q = - 1 * f * d * e / c ; k = p * n - A * q + k / 2 ; l = A * n + p * q + l / 2 ; r = Math . atan2 ( ( m - q ) / d , ( e - n ) / c ) - Math . atan2 ( 0 , 1 ) ; f = 0 <= r ? r : 2 * Math . PI + r ; r = Math . atan2 ( ( - m - q ) / d , ( - e - n ) / c ) - Math . atan2 ( ( m - q ) / d , ( e - n ) / c ) ; e = 0 <= r ? r : 2 * Math . PI + r ; 0 == g && 0 < e ? e -= 2 * Math . PI : 0 != g && 0 > e && ( e += 2 * Math . PI ) ; g = 2 * e / Math . PI ; g = Math . ceil ( 0 > g ? - 1 * g : g ) ; e /= g ; m = 8 / 3 * Math . sin ( e / 4 ) * Math . sin ( e / 4 ) / Math . sin ( e / 2 ) ; n = p * c ; p *= d ; c *= A ; d *= A ; var v = Math . cos ( f ) , y = Math . sin ( f ) ; q = - m * ( n * y + d * v ) ; r = - m * ( c * y - p * v ) ; for ( var A = [ ] , z = 0 ; z < g ; ++ z ) { f += e ; v =
Math . cos ( f ) ; y = Math . sin ( f ) ; t = n * v - d * y + k ; u = c * v + p * y + l ; var C = - m * ( n * y + d * v ) ; v = - m * ( c * y - p * v ) ; y = 6 * z ; A [ y ] = Number ( q + a ) ; A [ y + 1 ] = Number ( r + b ) ; A [ y + 2 ] = Number ( t - C + a ) ; A [ y + 3 ] = Number ( u - v + b ) ; A [ y + 4 ] = Number ( t + a ) ; A [ y + 5 ] = Number ( u + b ) ; q = t + C ; r = u + v } return A } , getBoundingBox : function ( a , b , c ) { var d = null ; if ( null != a && null != b && 0 != b ) { b = mxUtils . toRadians ( b ) ; d = Math . cos ( b ) ; var e = Math . sin ( b ) ; c = null != c ? c : new mxPoint ( a . x + a . width / 2 , a . y + a . height / 2 ) ; var f = new mxPoint ( a . x , a . y ) ; b = new mxPoint ( a . x + a . width , a . y ) ; var g = new mxPoint ( b . x , a . y + a . height ) ; a =
new mxPoint ( a . x , g . y ) ; f = mxUtils . getRotatedPoint ( f , d , e , c ) ; b = mxUtils . getRotatedPoint ( b , d , e , c ) ; g = mxUtils . getRotatedPoint ( g , d , e , c ) ; a = mxUtils . getRotatedPoint ( a , d , e , c ) ; d = new mxRectangle ( f . x , f . y , 0 , 0 ) ; d . add ( new mxRectangle ( b . x , b . y , 0 , 0 ) ) ; d . add ( new mxRectangle ( g . x , g . y , 0 , 0 ) ) ; d . add ( new mxRectangle ( a . x , a . y , 0 , 0 ) ) } return d } , getRotatedPoint : function ( a , b , c , d ) { d = null != d ? d : new mxPoint ; var e = a . x - d . x ; a = a . y - d . y ; return new mxPoint ( e * b - a * c + d . x , a * b + e * c + d . y ) } , getPortConstraints : function ( a , b , c , d ) { b = mxUtils . getValue ( a . style ,
mxConstants . STYLE _PORT _CONSTRAINT , mxUtils . getValue ( b . style , c ? mxConstants . STYLE _SOURCE _PORT _CONSTRAINT : mxConstants . STYLE _TARGET _PORT _CONSTRAINT , null ) ) ; if ( null == b ) return d ; d = b . toString ( ) ; b = mxConstants . DIRECTION _MASK _NONE ; c = 0 ; 1 == mxUtils . getValue ( a . style , mxConstants . STYLE _PORT _CONSTRAINT _ROTATION , 0 ) && ( c = mxUtils . getValue ( a . style , mxConstants . STYLE _ROTATION , 0 ) ) ; a = 0 ; 45 < c ? ( a = 1 , 135 <= c && ( a = 2 ) ) : - 45 > c && ( a = 3 , - 135 >= c && ( a = 2 ) ) ; if ( 0 <= d . indexOf ( mxConstants . DIRECTION _NORTH ) ) switch ( a ) { case 0 : b |= mxConstants . DIRECTION _MASK _NORTH ;
break ; case 1 : b |= mxConstants . DIRECTION _MASK _EAST ; break ; case 2 : b |= mxConstants . DIRECTION _MASK _SOUTH ; break ; case 3 : b |= mxConstants . DIRECTION _MASK _WEST } if ( 0 <= d . indexOf ( mxConstants . DIRECTION _WEST ) ) switch ( a ) { case 0 : b |= mxConstants . DIRECTION _MASK _WEST ; break ; case 1 : b |= mxConstants . DIRECTION _MASK _NORTH ; break ; case 2 : b |= mxConstants . DIRECTION _MASK _EAST ; break ; case 3 : b |= mxConstants . DIRECTION _MASK _SOUTH } if ( 0 <= d . indexOf ( mxConstants . DIRECTION _SOUTH ) ) switch ( a ) { case 0 : b |= mxConstants . DIRECTION _MASK _SOUTH ; break ; case 1 : b |=
mxConstants . DIRECTION _MASK _WEST ; break ; case 2 : b |= mxConstants . DIRECTION _MASK _NORTH ; break ; case 3 : b |= mxConstants . DIRECTION _MASK _EAST } if ( 0 <= d . indexOf ( mxConstants . DIRECTION _EAST ) ) switch ( a ) { case 0 : b |= mxConstants . DIRECTION _MASK _EAST ; break ; case 1 : b |= mxConstants . DIRECTION _MASK _SOUTH ; break ; case 2 : b |= mxConstants . DIRECTION _MASK _WEST ; break ; case 3 : b |= mxConstants . DIRECTION _MASK _NORTH } return b } , reversePortConstraints : function ( a ) { var b = ( a & mxConstants . DIRECTION _MASK _WEST ) << 3 ; b |= ( a & mxConstants . DIRECTION _MASK _NORTH ) <<
getInverseColor : function ( a , b , c ) { function d ( n ) { return Math . round ( b / 100 * ( 255 - n) + n * ( 1 - b / 100 ) ) } function e ( n ) { return Math . round ( Math . max ( 0 , Math . min ( 255 , n ) ) ) } c = null != c ? c : 180 ; b = null != b ? b : 93 ; var f = 0 , g = 0 , k = 0 ,l = 1 ;if ( "transparent" == a . toLowerCase ( ) ) return a ; l = mxUtils . parseColor ( a ) ; if ( null == l) return a ; f = l . r ; g = l . g ; k = l . b ; l = l . a ; f = d ( f ) ; g = d ( g ) ; k = d ( k ) ; a = [ 1 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 1 ] ; var m = Math . cos ( c * Math . PI / 180 ) ; c = Math . sin ( c * Math . PI / 180 ) ; a [ 0 ] = . 2126 + . 7874 * m - . 2126 * c ; a [ 1 ] = . 7152 - . 7152 * m - . 7152 * c ; a [ 2 ] = . 0722 - . 0722 * m + . 9278 * c ; a [ 3 ] = . 2126 -
. 2126 * m + . 143 * c ; a [ 4 ] = . 7152 + ( 1 - . 7152 ) * m + . 14 * c ; a [ 5 ] = . 0722 - . 0722 * m - . 283 * c ; a [ 6 ] = . 2126 - . 2126 * m - . 7874 * c ; a [ 7 ] = . 7152 - . 7152 * m + . 7152 * c ; a [ 8 ] = . 0722 + . 9278 * m + . 0722 * c ; c = e ( a [ 0 ] * f + a [ 1 ] * g + a [ 2 ] * k ) ; m = e ( a [ 3 ] * f + a [ 4 ] * g + a [ 5 ] * k ) ; f = e ( a [ 6 ] * f + a [ 7 ] * g + a [ 8 ] * k ) ; return "#" + ( 16777216 | c << 16 | m << 8 | f ) . toString ( 16 ) . slice ( 1 ) + ( 1 > l ? ( "0" + Math . round ( 255 * l ) . toString ( 16 ) ) . slice ( - 2 ) : "" ) } , addAlphaToColor : function ( a , b ) { null != b && null != a && "transparent" != a && ( a = mxUtils . parseColor ( a ) , a = "rgba(" + a . r + "," + a . g + "," + a . b + "," + a. a * b+ ")" ) ; return a } , getLightDarkColor : function ( a ,
b , c , d ) { var e = { light : "transparent" , dark : "transparent" , cssText : "transparent" } ; null != a && a != mxConstants . NONE && ( "string" === typeof a ? ( a = mxUtils . parseLightDarkColor ( a , c , d ) , e . light = mxUtils . addAlphaToColor ( a . light , b ) , e . dark = mxUtils . addAlphaToColor ( a . dark , b ) , e . cssText = mxUtils . lightDarkColorSupported ? e . light == e . dark ? e . light : "light-dark(" + e . light + ", " + e . dark + ")" : mxUtils . preferDarkColor ? e . dark : e . light ) : ( e . light = a , e . dark = a , e . cssText = a ) ) ; return e } , invertLightDarkColor : function ( a ) { var b = { } ; b . light = a . dark ; b . dark =
a . light ; b . cssText = b . light == b . dark ? b . light : "light-dark(" + b . light + ", " + b . dark + ")" ; return b } , getColor : function ( a , b , c ) { a = null != a ? a [ b ] : null ; null == a ? a = c : a == mxConstants . NONE && ( a = null ) ; return a } , isEmptyObject : function ( a ) { for ( var b in a ) return ! 1 ; return ! 0 } , clone : function ( a , b , c ) { c = null != c ? c : ! 1 ; var d = null ; if ( null != a && "function" == typeof a . constructor ) if ( a . constructor === Element ) d = a . cloneNode ( null != c ? ! c : ! 1 ) ; else { d = new a . constructor ; for ( var e in a ) e != mxObjectIdentity . FIELD _NAME && ( null == b || 0 > mxUtils . indexOf ( b , e ) ) &&
( d [ e ] = c || "object" != typeof a [ e ] ? a [ e ] : mxUtils . clone ( a [ e ] ) ) } return d } , equalPoints : function ( a , b ) { if ( null == a && null != b || null != a && null == b || null != a && null != b && a . length != b . length ) return ! 1 ; if ( null != a && null != b ) for ( var c = 0 ; c < a . length ; c ++ ) if ( null != a [ c ] && null == b [ c ] || null == a [ c ] && null != b [ c ] || null != a [ c ] && null != b [ c ] && ( a [ c ] . x != b [ c ] . x || a [ c ] . y != b [ c ] . y ) ) return ! 1 ; return ! 0 } , equalEntries : function ( a , b ) { var c = 0 ; if ( null == a && null != b || null != a && null == b || null != a && null != b && a . length != b . length ) return ! 1 ; if ( null != a && null != b ) { for ( var d in b ) c ++ ;
for ( d in a ) if ( c -- , ! ( mxUtils . isNaN ( a [ d ] ) && mxUtils . isNaN ( b [ d ] ) || a [ d ] == b [ d ] ) ) return ! 1 } return 0 == c } , removeDuplicates : function ( a ) { for ( var b = new mxDictionary , c = [ ] , d = 0 ; d < a . length ; d ++ ) b . get ( a [ d ] ) || ( c . push ( a [ d ] ) , b . put ( a [ d ] , ! 0 ) ) ; return c } , isNaN : function ( a ) { return "number" == typeof a && isNaN ( a ) } , extend : function ( a , b ) { var c = function ( ) { } ; c . prototype = b . prototype ; a . prototype = new c ; a . prototype . constructor = a } , toString : function ( a ) { var b = "" , c ; for ( c in a ) try { if ( null == a [ c ] ) b += c + " = [null]\n" ; else if ( "function" == typeof a [ c ] ) b +=
c + " => [Function]\n" ; else if ( "object" == typeof a [ c ] ) { var d = mxUtils . getFunctionName ( a [ c ] . constructor ) ; b += c + " => [" + d + "]\n" } else b += c + " = " + a [ c ] + "\n" } catch ( e ) { b += c + "=" + e . message } return b } , toRadians : function ( a ) { return Math . PI * a / 180 } , toDegree : function ( a ) { return 180 * a / Math . PI } , arcToCurves : function ( a , b , c , d , e , f , g , k , l ) { k -= a ; l -= b ; if ( 0 === c || 0 === d ) return A ; c = Math . abs ( c ) ; d = Math . abs ( d ) ; var m = - k / 2 , n = - l / 2 , p = Math . cos ( e * Math . PI / 180 ) ; A = Math . sin ( e * Math . PI / 180 ) ; e = p * m + A * n ; m = - 1 * A * m + p * n ; n = e * e ; var q = m * m , r = c * c , t = d * d , u = n / r +
q / t ; 1 < u ? ( c *= Math . sqrt ( u ) , d *= Math . sqrt ( u ) , f = 0 ) : ( u = 1 , f === g && ( u = - 1 ) , f = u * Math . sqrt ( ( r * t - r * q - t * n ) / ( r * q + t * n ) ) ) ; n = f * c * m / d ; q = - 1 * f * d * e / c ; k = p * n - A * q + k / 2 ; l = A * n + p * q + l / 2 ; r = Math . atan2 ( ( m - q ) / d , ( e - n ) / c ) - Math . atan2 ( 0 , 1 ) ; f = 0 <= r ? r : 2 * Math . PI + r ; r = Math . atan2 ( ( - m - q ) / d , ( - e - n ) / c ) - Math . atan2 ( ( m - q ) / d , ( e - n ) / c ) ; e = 0 <= r ? r : 2 * Math . PI + r ; 0 == g && 0 < e ? e -= 2 * Math . PI : 0 != g && 0 > e && ( e += 2 * Math . PI ) ; g = 2 * e / Math . PI ; g = Math . ceil ( 0 > g ? - 1 * g : g ) ; e /= g ; m = 8 / 3 * Math . sin ( e / 4 ) * Math . sin ( e / 4 ) / Math . sin ( e / 2 ) ; n = p * c ; p *= d ; c *= A ; d *= A ; var v = Math . cos ( f ) , y = Math . sin ( f ) ; q = - m *
( n * y + d * v ) ; r = - m * ( c * y - p * v ) ; for ( var A = [ ] , z = 0 ; z < g ; ++ z ) { f += e ; v = Math . cos ( f ) ; y = Math . sin ( f ) ; t = n * v - d * y + k ; u = c * v + p * y + l ; var x = - m * ( n * y + d * v ) ; v = - m * ( c * y - p * v ) ; y = 6 * z ; A [ y ] = Number ( q + a ) ; A [ y + 1 ] = Number ( r + b ) ; A [ y + 2 ] = Number ( t - x + a ) ; A [ y + 3 ] = Number ( u - v + b ) ; A [ y + 4 ] = Number ( t + a ) ; A [ y + 5 ] = Number ( u + b ) ; q = t + x ; r = u + v } return A } , getBoundingBox : function ( a , b , c ) { var d = null ; if ( null != a && null != b && 0 != b ) { b = mxUtils . toRadians ( b ) ; d = Math . cos ( b ) ; var e = Math . sin ( b ) ; c = null != c ? c : new mxPoint ( a . x + a . width / 2 , a . y + a . height / 2 ) ; var f = new mxPoint ( a . x , a . y ) ; b = new mxPoint ( a . x +
a . width , a . y ) ; var g = new mxPoint ( b . x , a . y + a . height ) ; a = new mxPoint ( a . x , g . y ) ; f = mxUtils . getRotatedPoint ( f , d , e , c ) ; b = mxUtils . getRotatedPoint ( b , d , e , c ) ; g = mxUtils . getRotatedPoint ( g , d , e , c ) ; a = mxUtils . getRotatedPoint ( a , d , e , c ) ; d = new mxRectangle ( f . x , f . y , 0 , 0 ) ; d . add ( new mxRectangle ( b . x , b . y , 0 , 0 ) ) ; d . add ( new mxRectangle ( g . x , g . y , 0 , 0 ) ) ; d . add ( new mxRectangle ( a . x , a . y , 0 , 0 ) ) } return d } , getRotatedPoint : function ( a , b , c , d ) { d = null != d ? d : new mxPoint ; var e = a . x - d . x ; a = a . y - d . y ; return new mxPoint ( e * b - a * c + d . x , a * b + e * c + d . y ) } , getPortConstraints : function ( a ,
b , c , d ) { b = mxUtils . getValue ( a . style , mxConstants . STYLE _PORT _CONSTRAINT , mxUtils . getValue ( b . style , c ? mxConstants . STYLE _SOURCE _PORT _CONSTRAINT : mxConstants . STYLE _TARGET _PORT _CONSTRAINT , null ) ) ; if ( null == b ) return d ; d = b . toString ( ) ; b = mxConstants . DIRECTION _MASK _NONE ; c = 0 ; 1 == mxUtils . getValue ( a . style , mxConstants . STYLE _PORT _CONSTRAINT _ROTATION , 0 ) && ( c = mxUtils . getValue ( a . style , mxConstants . STYLE _ROTATION , 0 ) ) ; a = 0 ; 45 < c ? ( a = 1 , 135 <= c && ( a = 2 ) ) : - 45 > c && ( a = 3 , - 135 >= c && ( a = 2 ) ) ; if ( 0 <= d . indexOf ( mxConstants . DIRECTION _NORTH ) ) switch ( a ) { case 0 : b |=
mxConstants . DIRECTION _MASK _NORTH ; break ; case 1 : b |= mxConstants . DIRECTION _MASK _EAST ; break ; case 2 : b |= mxConstants . DIRECTION _MASK _SOUTH ; break ; case 3 : b |= mxConstants . DIRECTION _MASK _WEST } if ( 0 <= d . indexOf ( mxConstants . DIRECTION _WEST ) ) switch ( a ) { case 0 : b |= mxConstants . DIRECTION _MASK _WEST ; break ; case 1 : b |= mxConstants . DIRECTION _MASK _NORTH ; break ; case 2 : b |= mxConstants . DIRECTION _MASK _EAST ; break ; case 3 : b |= mxConstants . DIRECTION _MASK _SOUTH } if ( 0 <= d . indexOf ( mxConstants . DIRECTION _SOUTH ) ) switch ( a ) { case 0 : b |= mxConstants . DIRECTION _MASK _SOUTH ;
break ; case 1 : b |= mxConstants . DIRECTION _MASK _WEST ; break ; case 2 : b |= mxConstants . DIRECTION _MASK _NORTH ; break ; case 3 : b |= mxConstants . DIRECTION _MASK _EAST } if ( 0 <= d . indexOf ( mxConstants . DIRECTION _EAST ) ) switch ( a ) { case 0 : b |= mxConstants . DIRECTION _MASK _EAST ; break ; case 1 : b |= mxConstants . DIRECTION _MASK _SOUTH ; break ; case 2 : b |= mxConstants . DIRECTION _MASK _WEST ; break ; case 3 : b |= mxConstants . DIRECTION _MASK _NORTH } return b } , reversePortConstraints : function ( a ) { var b = ( a & mxConstants . DIRECTION _MASK _WEST ) << 3 ; b |= ( a & mxConstants . DIRECTION _MASK _NORTH ) <<
1 ; b |= ( a & mxConstants . DIRECTION _MASK _SOUTH ) >> 1 ; return b |= ( a & mxConstants . DIRECTION _MASK _EAST ) >> 3 } , findNearestSegment : function ( a , b , c ) { var d = - 1 ; if ( 0 < a . absolutePoints . length ) for ( var e = a . absolutePoints [ 0 ] , f = null , g = 1 ; g < a . absolutePoints . length ; g ++ ) { var k = a . absolutePoints [ g ] ; e = mxUtils . ptSegDistSq ( e . x , e . y , k . x , k . y , b , c ) ; if ( null == f || e < f ) f = e , d = g - 1 ; e = k } return d } , getDirectedBounds : function ( a , b , c , d , e ) { var f = mxUtils . getValue ( c , mxConstants . STYLE _DIRECTION , mxConstants . DIRECTION _EAST ) ; d = null != d ? d : mxUtils . getValue ( c , mxConstants . STYLE _FLIPH ,
! 1 ) ; e = null != e ? e : mxUtils . getValue ( c , mxConstants . STYLE _FLIPV , ! 1 ) ; b . x = Math . round ( Math . max ( 0 , Math . min ( a . width , b . x ) ) ) ; b . y = Math . round ( Math . max ( 0 , Math . min ( a . height , b . y ) ) ) ; b . width = Math . round ( Math . max ( 0 , Math . min ( a . width , b . width ) ) ) ; b . height = Math . round ( Math . max ( 0 , Math . min ( a . height , b . height ) ) ) ; if ( e && ( f == mxConstants . DIRECTION _SOUTH || f == mxConstants . DIRECTION _NORTH ) || d && ( f == mxConstants . DIRECTION _EAST || f == mxConstants . DIRECTION _WEST ) ) c = b . x , b . x = b . width , b . width = c ; if ( d && ( f == mxConstants . DIRECTION _SOUTH || f == mxConstants . DIRECTION _NORTH ) ||
e && ( f == mxConstants . DIRECTION _EAST || f == mxConstants . DIRECTION _WEST ) ) c = b . y , b . y = b . height , b . height = c ; d = mxRectangle . fromRectangle ( b ) ; f == mxConstants . DIRECTION _SOUTH ? ( d . y = b . x , d . x = b . height , d . width = b . y , d . height = b . width ) : f == mxConstants . DIRECTION _WEST ? ( d . y = b . height , d . x = b . width , d . width = b . x , d . height = b . y ) : f == mxConstants . DIRECTION _NORTH && ( d . y = b . width , d . x = b . y , d . width = b . height , d . height = b . x ) ; return new mxRectangle ( a . x + d . x , a . y + d . y , a . width - d . width - d . x , a . height - d . height - d . y ) } , getPerimeterPoint : function ( a , b , c ) { for ( var d =
@ -84,43 +84,43 @@ null},ptSegDistSq:function(a,b,c,d,e,f){c-=a;d-=b;e-=a;f-=b;0>=e*c+f*d?c=0:(e=c-
b , c ) { mxEffects . cascadeOpacity . apply ( this , arguments ) } , fadeOut : function ( a , b , c , d , e , f ) { mxEffects . fadeOut . apply ( this , arguments ) } , setOpacity : function ( a , b ) { mxClient . IS _IE && ( "undefined" === typeof document . documentMode || 9 > document . documentMode ) ? a . style . filter = 100 <= b ? "" : "alpha(opacity=" + b + ")" : a . style . opacity = b / 100 } , createElementNs : function ( a , b , c ) { if ( null != a . createElementNS ) return a . createElementNS ( b , c ) ; a = a . createElement ( c ) ; null != namespace && a . setAttribute ( "xmlns" , b ) ; return a } , createImage : function ( a ) { var b = document . createElement ( "img" ) ;
b . setAttribute ( "src" , a ) ; b . setAttribute ( "border" , "0" ) ; return b } , sortCells : function ( a , b ) { b = null != b ? b : ! 0 ; var c = new mxDictionary ; a . sort ( function ( d , e ) { var f = c . get ( d ) ; null == f && ( f = mxCellPath . create ( d ) . split ( mxCellPath . PATH _SEPARATOR ) , c . put ( d , f ) ) ; d = c . get ( e ) ; null == d && ( d = mxCellPath . create ( e ) . split ( mxCellPath . PATH _SEPARATOR ) , c . put ( e , d ) ) ; e = mxCellPath . compare ( f , d ) ; return 0 == e ? 0 : 0 < e == b ? 1 : - 1 } ) ; return a } , getStylename : function ( a ) { return null != a && ( a = a . split ( ";" ) [ 0 ] , 0 > a . indexOf ( "=" ) ) ? a : "" } , getStylenames : function ( a ) { var b =
[ ] ; if ( null != a ) { a = a . split ( ";" ) ; for ( var c = 0 ; c < a . length ; c ++ ) 0 > a [ c ] . indexOf ( "=" ) && b . push ( a [ c ] ) } return b } , indexOfStylename : function ( a , b ) { if ( null != a && null != b ) { a = a . split ( ";" ) ; for ( var c = 0 , d = 0 ; d < a . length ; d ++ ) { if ( a [ d ] == b ) return c ; c += a [ d ] . length + 1 } } return - 1 } , addStylename : function ( a , b ) { 0 > mxUtils . indexOfStylename ( a , b ) && ( null == a ? a = "" : 0 < a . length && ";" != a . charAt ( a . length - 1 ) && ( a += ";" ) , a += b ) ; return a } , removeStylename : function ( a , b ) { var c = [ ] ; if ( null != a ) { a = a . split ( ";" ) ; for ( var d = 0 ; d < a . length ; d ++ ) a [ d ] != b && c . push ( a [ d ] ) } return c . join ( ";" ) } ,
removeAllStylenames : function ( a ) { var b = [ ] ; if ( null != a ) { a = a . split ( ";" ) ; for ( var c = 0 ; c < a . length ; c ++ ) 0 <= a [ c ] . indexOf ( "=" ) && b . push ( a [ c ] ) } return b . join ( ";" ) } , setCellStyles : function ( a , b , c , d ) { if ( null != b && 0 < b . length ) { a . beginUpdate ( ) ; try { for ( var e = 0 ; e < b . length ; e ++ ) if ( null != b [ e ] ) { var f = mxUtils . setStyle ( a . getStyle ( b [ e ] ) , c , d ) ; a . setStyle ( b [ e ] , f ) } } finally { a . endUpdate ( ) } } } , parseColor : function ( a , b ) { b = null != b ? b : 1 ; var c = null ; if ( null != a && a != mxConstants . NONE ) { if ( mxUtils . isRgbColor ( a ) ) { a = a . replace ( /[^\d, ]/g, "" ) . split ( "," ) ;
removeAllStylenames : function ( a ) { var b = [ ] ; if ( null != a ) { a = a . split ( ";" ) ; for ( var c = 0 ; c < a . length ; c ++ ) 0 <= a [ c ] . indexOf ( "=" ) && b . push ( a [ c ] ) } return b . join ( ";" ) } , setCellStyles : function ( a , b , c , d ) { if ( null != b && 0 < b . length ) { a . beginUpdate ( ) ; try { for ( var e = 0 ; e < b . length ; e ++ ) if ( null != b [ e ] ) { var f = mxUtils . setStyle ( a . getStyle ( b [ e ] ) , c , d ) ; a . setStyle ( b [ e ] , f ) } } finally { a . endUpdate ( ) } } } , parseColor : function ( a , b ) { b = null != b ? b : 1 ; var c = null ; if ( null != a && a != mxConstants . NONE ) { if ( mxUtils . isRgbColor ( a ) ) { a = a . replace ( /[^\d, . ]/g, "" ) . split ( "," ) ;
c = parseInt ( a [ 0 ] ) ; var d = parseInt ( a [ 1 ] ) , e = parseInt ( a [ 2 ] ) ; 4 == a . length && ( b = parseFloat ( a [ 3 ] ) ) } else mxUtils . isHexColor ( a ) || ( a = mxUtils . color2hex ( a ) ) , a = a . substring ( 1 ) , c = parseInt ( a . substr ( 0 , 2 ) , 16 ) , d = parseInt ( a . substr ( 2 , 2 ) , 16 ) , e = parseInt ( a . substr ( 4 , 2 ) , 16 ) , 6 < a . length && ( b = parseInt ( a . substr ( 6 , 2 ) , 16 ) / 255 ) ; c = { r : c , g : d , b : e , a : b } } return c } , hex2rgb : function ( a ) { var b = mxUtils . parseColor ( a ) ; null != b && ( a = "rgb(" + b . r + ", " + b . g + ", " + b . b + ")" ) ; return a } , hex2rgba : function ( a , b ) { b = mxUtils . parseColor ( a , b ) ; null != b && ( a = "rgba(" + b . r + ", " +
b . g + ", " + b . b + ", " + b . a + ")" ) ; return a } , rgba2hex : function ( a ) { var b = mxUtils . parseColor ( a ) ; return null != b ? "#" + ( "0" + b . r . toString ( 16 ) ) . slice ( - 2 ) + ( "0" + b . g . toString ( 16 ) ) . slice ( - 2 ) + ( "0" + b . b . toString ( 16 ) ) . slice ( - 2 ) :a } , color2hex : function ( a , b ) { b = null != b ? b : "#000000" ; try { null != a && ( a = String ( a ) . replace ( /\s/g , "" ) , a . toLowerCase ( ) == mxUtils . normalizedValidInvalidColor ? b = "#000000" : ( mxUtils . canvasContext . fillStyle = mxUtils . validInvalidColor , mxUtils . canvasContext . fillStyle = a , mxUtils . canvasContext . fillStyle != mxUtils . validInvalidColor ?
b = mxUtils . canvasContext . fillStyle : 1 < a . length && "#" == a . charAt ( 0 ) && ( mxUtils . canvasContext . fillStyle = a . substring ( 1 ) , mxUtils . canvasContext . fillStyle != mxUtils . validInvalidColor && ( b = mxUtils . canvasContext . fillStyle ) ) ) ) } catch ( c ) { } return b } , setStyle : function ( a , b , c ) { var d = null != c && ( "undefined" == typeof c . length || 0 < c . length ) ; if ( null == a || 0 == a . length ) d && ( a = b + "=" + c + ";" ) ; else if ( a . substring ( 0 , b . length + 1 ) == b + "=" ) { var e = a . indexOf ( ";" ) ; a = d ? b + "=" + c + ( 0 > e ? ";" : a . substring ( e ) ) : 0 > e || e == a . length - 1 ? "" : a . substring ( e + 1 ) } else { var f =
a . indexOf ( ";" + b + "=" ) ; 0 > f ? d && ( d = ";" == a . charAt ( a . length - 1 ) ? "" : ";" , a = a + d + b + "=" + c + ";" ) : ( e = a . indexOf ( ";" , f + 1 ) , a = d ? a . substring ( 0 , f + 1 ) + b + "=" + c + ( 0 > e ? ";" : a . substring ( e ) ) : a . substring ( 0 , f ) + ( 0 > e ? ";" : a . substring ( e ) ) ) } return a } , setCellStyleFlags : function ( a , b , c , d , e ) { if ( null != b && 0 < b . length ) { a . beginUpdate ( ) ; try { for ( var f = 0 ; f < b . length ; f ++ ) if ( null != b [ f ] ) { var g = mxUtils . setStyleFlag ( a . getStyle ( b [ f ] ) , c , d , e ) ; a . setStyle ( b [ f ] , g ) } } finally { a . endUpdate ( ) } } } , setStyleFlag : function ( a , b , c , d ) { if ( null == a || 0 == a . length ) a = d || null == d ?
b + "=" + c : b + "=0" ; else { var e = a . indexOf ( b + "=" ) ; if ( 0 > e ) e = ";" == a . charAt ( a . length - 1 ) ? "" : ";" , a = d || null == d ? a + e + b + "=" + c : a + e + b + "=0" ; else { var f = a . indexOf ( ";" , e ) ; var g = 0 > f ? a . substring ( e + b . length + 1 ) : a . substring ( e + b . length + 1 , f ) ; g = null == d ? parseInt ( g ) ^ c : d ? parseInt ( g ) | c : parseInt ( g ) & ~ c ; a = a . substring ( 0 , e ) + b + "=" + g + ( 0 <= f ? a . substring ( f ) : "" ) } } return a } , getAlignmentAsPoint : function ( a , b ) { var c = - . 5 , d = - . 5 ; a == mxConstants . ALIGN _LEFT ? c = 0 : a == mxConstants . ALIGN _RIGHT && ( c = - 1 ) ; b == mxConstants . ALIGN _TOP ? d = 0 : b == mxConstants . ALIGN _BOTTOM &&
( d = - 1 ) ; return new mxPoint ( c , d ) } , getSizeForString : function ( a , b , c , d , e ) { b = null != b ? b : mxConstants . DEFAULT _FONTSIZE ; c = null != c ? c : mxConstants . DEFAULT _FONTFAMILY ; var f = document . createElement ( "div" ) ; f . style . fontFamily = c ; f . style . fontSize = Math . round ( b ) + "px" ; f . style . lineHeight = mxConstants . ABSOLUTE _LINE _HEIGHT ? b * mxConstants . LINE _HEIGHT + "px" : mxConstants . LINE _HEIGHT * mxSvgCanvas2D . prototype . lineHeightCorrection ; null != e && ( ( e & mxConstants . FONT _BOLD ) == mxConstants . FONT _BOLD && ( f . style . fontWeight = "bold" ) , ( e & mxConstants . FONT _ITALIC ) ==
mxConstants . FONT _ITALIC && ( f . style . fontStyle = "italic" ) , b = [ ] , ( e & mxConstants . FONT _UNDERLINE ) == mxConstants . FONT _UNDERLINE && b . push ( "underline" ) , ( e & mxConstants . FONT _STRIKETHROUGH ) == mxConstants . FONT _STRIKETHROUGH && b . push ( "line-through" ) , 0 < b . length && ( f . style . textDecoration = b . join ( " " ) ) ) ; f . style . position = "absolute" ; f . style . visibility = "hidden" ; f . style . display = "inline-block" ; f . style . zoom = "1" ; null != d ? ( f . style . width = d + "px" , f . style . whiteSpace = "normal" ) : f . style . whiteSpace = "nowrap" ; f . innerHTML = a ; document . body . appendChild ( f ) ;
a = new mxRectangle ( 0 , 0 , f . offsetWidth , f . offsetHeight ) ; document . body . removeChild ( f ) ; return a } , getViewXml : function ( a , b , c , d , e ) { d = null != d ? d : 0 ; e = null != e ? e : 0 ; b = null != b ? b : 1 ; null == c && ( c = [ a . getModel ( ) . getRoot ( ) ] ) ; var f = a . getView ( ) , g = null , k = f . isEventsEnabled ( ) ; f . setEventsEnabled ( ! 1 ) ; var l = f . drawPane , m = f . overlayPane ; a . dialect == mxConstants . DIALECT _SVG ? ( f . drawPane = document . createElementNS ( mxConstants . NS _SVG , "g" ) , f . canvas . appendChild ( f . drawPane ) , f . overlayPane = document . createElementNS ( mxConstants . NS _SVG , "g" ) ) : ( f . drawPane =
f . drawPane . cloneNode ( ! 1 ) , f . canvas . appendChild ( f . drawPane ) , f . overlayPane = f . overlayPane . cloneNode ( ! 1 ) ) ; f . canvas . appendChild ( f . overlayPane ) ; var n = f . getTranslate ( ) ; f . translate = new mxPoint ( d , e ) ; b = new mxTemporaryCellStates ( a . getView ( ) , b , c ) ; try { g = ( new mxCodec ) . encode ( a . getView ( ) ) } finally { b . destroy ( ) , f . translate = n , f . canvas . removeChild ( f . drawPane ) , f . canvas . removeChild ( f . overlayPane ) , f . drawPane = l , f . overlayPane = m , f . setEventsEnabled ( k ) } return g } , getScaleForPageCount : function ( a , b , c , d ) { if ( 1 > a ) return 1 ; c = null !=
c ? c : mxConstants . PAGE _FORMAT _A4 _PORTRAIT ; d = null != d ? d : 0 ; var e = c . width - 2 * d ; c = c . height - 2 * d ; d = mxRectangle . fromRectangle ( b . getGraphBounds ( ) ) ; b = b . getView ( ) . getScale ( ) ; d . width /= b ; d . height /= b ; b = d . width ; var f = Math . sqrt ( a ) ; d = Math . sqrt ( b / d . height / ( e / c ) ) ; c = f * d ; d = f / d ; if ( 1 > c && d > a ) { var g = d / a ; d = a ; c /= g } 1 > d && c > a && ( g = c / a , c = a , d /= g ) ; g = Math . ceil ( c ) * Math . ceil ( d ) ; for ( f = 0 ; g > a ; ) { g = Math . floor ( c ) / c ; var k = Math . floor ( d ) / d ; 1 == g && ( g = Math . floor ( c - 1 ) / c ) ; 1 == k && ( k = Math . floor ( d - 1 ) / d ) ; g = g > k ? g : k ; c *= g ; d *= g ; g = Math . ceil ( c ) * Math . ceil ( d ) ; f ++ ;
if ( 10 < f ) break } return e * c / b * . 99999 } , show : function ( a , b , c , d , e , f ) { c = null != c ? c : 0 ; d = null != d ? d : 0 ; null == b ? b = window . open ( ) . document : b . open ( ) ; 9 == document . documentMode && b . writeln ( '\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=9"><![endif]--\x3e' ) ; var g = a . getGraphBounds ( ) , k = Math . ceil ( c - g . x ) , l = Math . ceil ( d - g . y ) ; null == e && ( e = Math . ceil ( g . width + c ) + Math . ceil ( Math . ceil ( g . x ) - g . x ) ) ; null == f && ( f = Math . ceil ( g . height + d ) + Math . ceil ( Math . ceil ( g . y ) - g . y ) ) ; if ( mxClient . IS _IE || 11 == document . documentMode ) { d = "<html><head>" ;
g = document . getElementsByTagName ( "base" ) ; for ( c = 0 ; c < g . length ; c ++ ) d += g [ c ] . outerHTML ; d += "<style>" ; for ( c = 0 ; c < document . styleSheets . length ; c ++ ) try { d += document . styleSheets [ c ] . cssText } catch ( m ) { } d = d + '</style></head><body style="margin:0px;"><div style="position:absolute;overflow:hidden;width:' + ( e + "px;height:" + f + 'px;"><div style="position:relative;left:' + k + "px;top:" + l + 'px;">' ) + a . container . innerHTML ; b . writeln ( d + "</div></div></body><html>" ) ; b . close ( ) } else { b . writeln ( "<html><head>" ) ; g = document . getElementsByTagName ( "base" ) ;
for ( c = 0 ; c < g . length ; c ++ ) b . writeln ( mxUtils . getOuterHtml ( g [ c ] ) ) ; d = document . getElementsByTagName ( "link" ) ; for ( c = 0 ; c < d . length ; c ++ ) b . writeln ( mxUtils . getOuterHtml ( d [ c ] ) ) ; d = document . getElementsByTagName ( "style" ) ; for ( c = 0 ; c < d . length ; c ++ ) b . writeln ( mxUtils . getOuterHtml ( d [ c ] ) ) ; b . writeln ( '</head><body style="margin:0px;"></body></html>' ) ; b . close ( ) ; c = b . createElement ( "div" ) ; c . position = "absolute" ; c . overflow = "hidden" ; c . style . width = e + "px" ; c . style . height = f + "px" ; e = b . createElement ( "div" ) ; e . style . position = "absolute" ; e . style . left =
k + "px" ; e . style . top = l + "px" ; f = a . container . firstChild ; for ( d = null ; null != f ; ) g = f . cloneNode ( ! 0 ) , f == a . view . drawPane . ownerSVGElement ? ( c . appendChild ( g ) , d = g ) : e . appendChild ( g ) , f = f . nextSibling ; b . body . appendChild ( c ) ; null != e . firstChild && b . body . appendChild ( e ) ; null != d && ( d . style . minWidth = "" , d . style . minHeight = "" , d . firstChild . setAttribute ( "transform" , "translate(" + k + "," + l + ")" ) ) } mxUtils . removeCursors ( b . body ) ; return b } , printScreen : function ( a ) { var b = window . open ( ) ; mxUtils . show ( a , b . document ) ; a = function ( ) { b . focus ( ) ; b . print ( ) ;
b . close ( ) } ; mxClient . IS _GC ? b . setTimeout ( a , 500 ) : a ( ) } , popup : function ( a , b ) { if ( b ) { var c = document . createElement ( "div" ) ; c . style . overflow = "scroll" ; c . style . width = "636px" ; c . style . height = "460px" ; b = document . createElement ( "pre" ) ; b . innerHTML = mxUtils . htmlEntities ( a , ! 1 ) . replace ( /\n/g , "<br>" ) . replace ( / /g , " " ) ; c . appendChild ( b ) ; c = new mxWindow ( "Popup Window" , c , document . body . clientWidth / 2 - 320 , Math . max ( document . body . clientHeight || 0 , document . documentElement . clientHeight ) / 2 - 240 , 640 , 480 , ! 1 , ! 0 ) ; c . setClosable ( ! 0 ) ; c . setVisible ( ! 0 ) } else mxClient . IS _NS ?
( c = window . open ( ) , c . document . writeln ( "<pre>" + mxUtils . htmlEntities ( a ) + "</pre" ) , c . document . close ( ) ) : ( c = window . open ( ) , b = c . document . createElement ( "pre" ) , b . innerHTML = mxUtils . htmlEntities ( a , ! 1 ) . replace ( /\n/g , "<br>" ) . replace ( / /g , " " ) , c . document . body . appendChild ( b ) ) } , alert : function ( a ) { alert ( a ) } , prompt : function ( a , b ) { return prompt ( a , null != b ? b : "" ) } , confirm : function ( a ) { return confirm ( a ) } , error : function ( a , b , c , d ) { var e = document . createElement ( "div" ) ; e . style . padding = "20px" ; var f = document . createElement ( "img" ) ;
f . setAttribute ( "src" , d || mxUtils . errorImage ) ; f . setAttribute ( "valign" , "bottom" ) ; f . style . verticalAlign = "middle" ; e . appendChild ( f ) ; e . appendChild ( document . createTextNode ( " " ) ) ; e . appendChild ( document . createTextNode ( " " ) ) ; e . appendChild ( document . createTextNode ( " " ) ) ; mxUtils . write ( e , a ) ; a = document . body . clientWidth ; d = document . body . clientHeight || document . documentElement . clientHeight ; var g = new mxWindow ( mxResources . get ( mxUtils . errorResource ) || mxUtils . errorResource , e , ( a - b ) / 2 , d / 4 , b , null , ! 1 , ! 0 ) ; c && ( mxUtils . br ( e ) , b =
document . createElement ( "p" ) , c = document . createElement ( "button" ) , mxClient . IS _IE ? c . style . cssText = "float:right" : c . setAttribute ( "style" , "float:right" ) , mxEvent . addListener ( c , "click" , function ( k ) { g . destroy ( ) } ) , mxUtils . write ( c , mxResources . get ( mxUtils . closeResource ) || mxUtils . closeResource ) , b . appendChild ( c ) , e . appendChild ( b ) , mxUtils . br ( e ) , g . setClosable ( ! 0 ) ) ; g . setVisible ( ! 0 ) ; return g } , makeDraggable : function ( a , b , c , d , e , f , g , k , l , m ) { a = new mxDragSource ( a , c ) ; a . dragOffset = new mxPoint ( null != e ? e : 0 , null != f ? f : mxConstants . TOOLTIP _VERTICAL _OFFSET ) ;
a . autoscroll = g ; a . setGuidesEnabled ( ! 1 ) ; null != l && ( a . highlightDropTargets = l ) ; null != m && ( a . getDropTarget = m ) ; a . getGraphForEvent = function ( n ) { return "function" == typeof b ? b ( n ) : b } ; null != d && ( a . createDragElement = function ( ) { return d . cloneNode ( ! 0 ) } , k && ( a . createPreviewElement = function ( n ) { var p = d . cloneNode ( ! 0 ) , q = parseInt ( p . style . width ) , r = parseInt ( p . style . height ) ; p . style . width = Math . round ( q * n . view . scale ) + "px" ; p . style . height = Math . round ( r * n . view . scale ) + "px" ; return p } ) ) ; return a } , format : function ( a ) { return parseFloat ( parseFloat ( a ) . toFixed ( 2 ) ) } } ,
mxConstants = { DEFAULT _HOTSPOT : . 3 , MIN _HOTSPOT _SIZE : 8 , MAX _HOTSPOT _SIZE : 0 , RENDERING _HINT _EXACT : "exact" , RENDERING _HINT _FASTER : "faster" , RENDERING _HINT _FASTEST : "fastest" , DIALECT _SVG : "svg" , DIALECT _MIXEDHTML : "mixedHtml" , DIALECT _PREFERHTML : "preferHtml" , DIALECT _STRICTHTML : "strictHtml" , NS _SVG : "http://www.w3.org/2000/svg" , NS _XHTML : "http://www.w3.org/1999/xhtml" , NS _XLINK : "http://www.w3.org/1999/xlink" , SHADOWCOLOR : "#808080" , VML _SHADOWCOLOR : "#808080" , SHADOW _OFFSET _X : 2 , SHADOW _OFFSET _Y : 3 , SHADOW _BLUR : 2 , SHADOW _OPACITY : 1 ,
NODETYPE _ELEMENT : 1 , NODETYPE _ATTRIBUTE : 2 , NODETYPE _TEXT : 3 , NODETYPE _CDATA : 4 , NODETYPE _ENTITY _REFERENCE : 5 , NODETYPE _ENTITY : 6 , NODETYPE _PROCESSING _INSTRUCTION : 7 , NODETYPE _COMMENT : 8 , NODETYPE _DOCUMENT : 9 , NODETYPE _DOCUMENTTYPE : 10 , NODETYPE _DOCUMENT _FRAGMENT : 11 , NODETYPE _NOTATION : 12 , TOOLTIP _VERTICAL _OFFSET : 16 , DEFAULT _VALID _COLOR : "#00FF00" , DEFAULT _INVALID _COLOR : "#FF0000" , OUTLINE _HIGHLIGHT _COLOR : "#00FF00" , OUTLINE _HIGHLIGHT _STROKEWIDTH : 5 , HIGHLIGHT _STROKEWIDTH : 3 , HIGHLIGHT _SIZE : 2 , HIGHLIGHT _OPACITY : 100 , CURSOR _MOVABLE _VERTEX : "move" ,
CURSOR _MOVABLE _EDGE : "move" , CURSOR _LABEL _HANDLE : "default" , CURSOR _TERMINAL _HANDLE : "pointer" , CURSOR _BEND _HANDLE : "crosshair" , CURSOR _VIRTUAL _BEND _HANDLE : "crosshair" , CURSOR _CONNECT : "pointer" , HIGHLIGHT _COLOR : "#00FF00" , CONNECT _TARGET _COLOR : "#0000FF" , INVALID _CONNECT _TARGET _COLOR : "#FF0000" , DROP _TARGET _COLOR : "#0000FF" , VALID _COLOR : "#00FF00" , INVALID _COLOR : "#FF0000" , EDGE _SELECTION _COLOR : "#00FF00" , VERTEX _SELECTION _COLOR : "#00FF00" , VERTEX _SELECTION _STROKEWIDTH : 1 , EDGE _SELECTION _STROKEWIDTH : 1 , VERTEX _SELECTION _DASHED : ! 0 ,
EDGE _SELECTION _DASHED : ! 0 , GUIDE _COLOR : "#FF0000" , GUIDE _STROKEWIDTH : 1 , OUTLINE _COLOR : "#0099FF" , OUTLINE _STROKEWIDTH : mxClient . IS _IE ? 2 : 3 , HANDLE _SIZE : 6 , LABEL _HANDLE _SIZE : 4 , HANDLE _FILLCOLOR : "#00FF00" , HANDLE _STROKECOLOR : "black" , LABEL _HANDLE _FILLCOLOR : "yellow" , CONNECT _HANDLE _FILLCOLOR : "#0000FF" , LOCKED _HANDLE _FILLCOLOR : "#FF0000" , OUTLINE _HANDLE _FILLCOLOR : "#00FFFF" , OUTLINE _HANDLE _STROKECOLOR : "#0033FF" , DEFAULT _FONTFAMILY : "Arial,Helvetica" , DEFAULT _FONTSIZE : 11 , DEFAULT _TEXT _DIRECTION : "" , LINE _HEIGHT : 1.2 , WORD _WRAP : "normal" ,
ABSOLUTE _LINE _HEIGHT : ! 1 , DEFAULT _FONTSTYLE : 0 , DEFAULT _STARTSIZE : 40 , DEFAULT _MARKERSIZE : 6 , DEFAULT _IMAGESIZE : 24 , ENTITY _SEGMENT : 30 , RECTANGLE _ROUNDING _FACTOR : . 15 , LINE _ARCSIZE : 20 , ARROW _SPACING : 0 , ARROW _WIDTH : 30 , ARROW _SIZE : 30 , PAGE _FORMAT _A4 _PORTRAIT : new mxRectangle ( 0 , 0 , 827 , 1169 ) , PAGE _FORMAT _A4 _LANDSCAPE : new mxRectangle ( 0 , 0 , 1169 , 827 ) , PAGE _FORMAT _LETTER _PORTRAIT : new mxRectangle ( 0 , 0 , 850 , 1100 ) , PAGE _FORMAT _LETTER _LANDSCAPE : new mxRectangle ( 0 , 0 , 1100 , 850 ) , NONE : "none" , STYLE _PERIMETER : "perimeter" , STYLE _SOURCE _PORT : "sourcePort" ,
STYLE _TARGET _PORT : "targetPort" , STYLE _PORT _CONSTRAINT : "portConstraint" , STYLE _PORT _CONSTRAINT _ROTATION : "portConstraintRotation" , STYLE _SOURCE _PORT _CONSTRAINT : "sourcePortConstraint" , STYLE _TARGET _PORT _CONSTRAINT : "targetPortConstraint" , STYLE _OPACITY : "opacity" , STYLE _FILL _OPACITY : "fillOpacity" , STYLE _FILL _STYLE : "fillStyle" , STYLE _STROKE _OPACITY : "strokeOpacity" , STYLE _TEXT _OPACITY : "textOpacity" , STYLE _TEXT _DIRECTION : "textDirection" , STYLE _OVERFLOW : "overflow" , STYLE _BLOCK _SPACING : "blockSpacing" , STYLE _ORTHOGONAL : "orthogonal" ,
STYLE _EXIT _X : "exitX" , STYLE _EXIT _Y : "exitY" , STYLE _EXIT _DX : "exitDx" , STYLE _EXIT _DY : "exitDy" , STYLE _EXIT _PERIMETER : "exitPerimeter" , STYLE _ENTRY _X : "entryX" , STYLE _ENTRY _Y : "entryY" , STYLE _ENTRY _DX : "entryDx" , STYLE _ENTRY _DY : "entryDy" , STYLE _ENTRY _PERIMETER : "entryPerimeter" , STYLE _WHITE _SPACE : "whiteSpace" , STYLE _ROTATION : "rotation" , STYLE _FILLCOLOR : "fillColor" , STYLE _POINTER _EVENTS : "pointerEvents" , STYLE _SWIMLANE _FILLCOLOR : "swimlaneFillColor" , STYLE _MARGIN : "margin" , STYLE _GRADIENTCOLOR : "gradientColor" , STYLE _GRADIENT _DIRECTION : "gradientDirection" ,
STYLE _STROKECOLOR : "strokeColor" , STYLE _SEPARATORCOLOR : "separatorColor" , STYLE _STROKEWIDTH : "strokeWidth" , STYLE _ALIGN : "align" , STYLE _VERTICAL _ALIGN : "verticalAlign" , STYLE _LABEL _WIDTH : "labelWidth" , STYLE _LABEL _POSITION : "labelPosition" , STYLE _VERTICAL _LABEL _POSITION : "verticalLabelPosition" , STYLE _IMAGE _ASPECT : "imageAspect" , STYLE _IMAGE _ALIGN : "imageAlign" , STYLE _IMAGE _VERTICAL _ALIGN : "imageVerticalAlign" , STYLE _GLASS : "glass" , STYLE _IMAGE : "image" , STYLE _IMAGE _WIDTH : "imageWidth" , STYLE _IMAGE _HEIGHT : "imageHeight" , STYLE _IMAGE _BACKGROUND : "imageBackground" ,
STYLE _IMAGE _BORDER : "imageBorder" , STYLE _FLIPH : "flipH" , STYLE _FLIPV : "flipV" , STYLE _NOLABEL : "noLabel" , STYLE _NOEDGESTYLE : "noEdgeStyle" , STYLE _LABEL _BACKGROUNDCOLOR : "labelBackgroundColor" , STYLE _LABEL _BORDERCOLOR : "labelBorderColor" , STYLE _LABEL _PADDING : "labelPadding" , STYLE _INDICATOR _SHAPE : "indicatorShape" , STYLE _INDICATOR _IMAGE : "indicatorImage" , STYLE _INDICATOR _COLOR : "indicatorColor" , STYLE _INDICATOR _STROKECOLOR : "indicatorStrokeColor" , STYLE _INDICATOR _GRADIENTCOLOR : "indicatorGradientColor" , STYLE _INDICATOR _SPACING : "indicatorSpacing" ,
STYLE _INDICATOR _WIDTH : "indicatorWidth" , STYLE _INDICATOR _HEIGHT : "indicatorHeight" , STYLE _INDICATOR _DIRECTION : "indicatorDirection" , STYLE _SHADOW : "shadow" , STYLE _TEXT _SHADOW : "textShadow" , STYLE _SHADOW _OFFSET _X : "shadowOffsetX" , STYLE _SHADOW _OFFSET _Y : "shadowOffsetY" , STYLE _SHADOW _BLUR : "shadowBlur" , STYLE _SHADOWCOLOR : "shadowColor" , STYLE _SHADOW _OPACITY : "shadowOpacity" , STYLE _SEGMENT : "segment" , STYLE _ENDARROW : "endArrow" , STYLE _STARTARROW : "startArrow" , STYLE _ENDSIZE : "endSize" , STYLE _STARTSIZE : "startSize" , STYLE _SWIMLANE _LINE : "swimlaneLine" ,
STYLE _SWIMLANE _HEAD : "swimlaneHead" , STYLE _SWIMLANE _BODY : "swimlaneBody" , STYLE _ENDFILL : "endFill" , STYLE _ENDFILLCOLOR : "endFillColor" , STYLE _STARTFILL : "startFill" , STYLE _STARTFILLCOLOR : "startFillColor" , STYLE _DASHED : "dashed" , STYLE _DASH _PATTERN : "dashPattern" , STYLE _FIX _DASH : "fixDash" , STYLE _ROUNDED : "rounded" , STYLE _CURVED : "curved" , STYLE _ARCSIZE : "arcSize" , STYLE _ABSOLUTE _ARCSIZE : "absoluteArcSize" , STYLE _SOURCE _PERIMETER _SPACING : "sourcePerimeterSpacing" , STYLE _TARGET _PERIMETER _SPACING : "targetPerimeterSpacing" , STYLE _PERIMETER _SPACING : "perimeterSpacing" ,
STYLE _SPACING : "spacing" , STYLE _SPACING _TOP : "spacingTop" , STYLE _SPACING _LEFT : "spacingLeft" , STYLE _SPACING _BOTTOM : "spacingBottom" , STYLE _SPACING _RIGHT : "spacingRight" , STYLE _HORIZONTAL : "horizontal" , STYLE _DIRECTION : "direction" , STYLE _ANCHOR _POINT _DIRECTION : "anchorPointDirection" , STYLE _ELBOW : "elbow" , STYLE _FONTCOLOR : "fontColor" , STYLE _FONTFAMILY : "fontFamily" , STYLE _FONTSIZE : "fontSize" , STYLE _FONTSTYLE : "fontStyle" , STYLE _ASPECT : "aspect" , STYLE _AUTOSIZE : "autosize" , STYLE _AUTOSIZE _GRID : "autosizeGrid" , STYLE _FIXED _WIDTH : "fixedWidth" ,
STYLE _FOLDABLE : "foldable" , STYLE _EDITABLE : "editable" , STYLE _BACKGROUND _OUTLINE : "backgroundOutline" , STYLE _BENDABLE : "bendable" , STYLE _MOVABLE : "movable" , STYLE _RESIZABLE : "resizable" , STYLE _RESIZE _WIDTH : "resizeWidth" , STYLE _RESIZE _HEIGHT : "resizeHeight" , STYLE _ROTATABLE : "rotatable" , STYLE _CLONEABLE : "cloneable" , STYLE _DELETABLE : "deletable" , STYLE _SHAPE : "shape" , STYLE _EDGE : "edgeStyle" , STYLE _JETTY _SIZE : "jettySize" , STYLE _SOURCE _JETTY _SIZE : "sourceJettySize" , STYLE _TARGET _JETTY _SIZE : "targetJettySize" , STYLE _LOOP : "loopStyle" ,
STYLE _ORTHOGONAL _LOOP : "orthogonalLoop" , STYLE _ROUTING _CENTER _X : "routingCenterX" , STYLE _ROUTING _CENTER _Y : "routingCenterY" , STYLE _CLIP _PATH : "clipPath" , FONT _BOLD : 1 , FONT _ITALIC : 2 , FONT _UNDERLINE : 4 , FONT _STRIKETHROUGH : 8 , SHAPE _RECTANGLE : "rectangle" , SHAPE _ELLIPSE : "ellipse" , SHAPE _DOUBLE _ELLIPSE : "doubleEllipse" , SHAPE _RHOMBUS : "rhombus" , SHAPE _LINE : "line" , SHAPE _IMAGE : "image" , SHAPE _ARROW : "arrow" , SHAPE _ARROW _CONNECTOR : "arrowConnector" , SHAPE _LABEL : "label" , SHAPE _CYLINDER : "cylinder" , SHAPE _SWIMLANE : "swimlane" , SHAPE _CONNECTOR : "connector" ,
SHAPE _ACTOR : "actor" , SHAPE _CLOUD : "cloud" , SHAPE _TRIANGLE : "triangle" , SHAPE _HEXAGON : "hexagon" , ARROW _CLASSIC : "classic" , ARROW _CLASSIC _THIN : "classicThin" , ARROW _BLOCK : "block" , ARROW _BLOCK _THIN : "blockThin" , ARROW _OPEN : "open" , ARROW _OPEN _THIN : "openThin" , ARROW _OVAL : "oval" , ARROW _DIAMOND : "diamond" , ARROW _DIAMOND _THIN : "diamondThin" , ALIGN _LEFT : "left" , ALIGN _CENTER : "center" , ALIGN _RIGHT : "right" , ALIGN _TOP : "top" , ALIGN _MIDDLE : "middle" , ALIGN _BOTTOM : "bottom" , DIRECTION _NORTH : "north" , DIRECTION _SOUTH : "south" , DIRECTION _EAST : "east" ,
DIRECTION _WEST : "west" , DIRECTION _RADIAL : "radial" , TEXT _DIRECTION _DEFAULT : "" , TEXT _DIRECTION _AUTO : "auto" , TEXT _DIRECTION _LTR : "ltr" , TEXT _DIRECTION _RTL : "rtl" , TEXT _DIRECTION _VERTICAL _LR : "vertical-lr" , TEXT _DIRECTION _VERTICAL _RL : "vertical-rl" , DIRECTION _MASK _NONE : 0 , DIRECTION _MASK _WEST : 1 , DIRECTION _MASK _NORTH : 2 , DIRECTION _MASK _SOUTH : 4 , DIRECTION _MASK _EAST : 8 , DIRECTION _MASK _ALL : 15 , ELBOW _VERTICAL : "vertical" , ELBOW _HORIZONTAL : "horizontal" , EDGESTYLE _ELBOW : "elbowEdgeStyle" , EDGESTYLE _ENTITY _RELATION : "entityRelationEdgeStyle" ,
EDGESTYLE _LOOP : "loopEdgeStyle" , EDGESTYLE _SIDETOSIDE : "sideToSideEdgeStyle" , EDGESTYLE _TOPTOBOTTOM : "topToBottomEdgeStyle" , EDGESTYLE _ORTHOGONAL : "orthogonalEdgeStyle" , EDGESTYLE _SEGMENT : "segmentEdgeStyle" , PERIMETER _ELLIPSE : "ellipsePerimeter" , PERIMETER _RECTANGLE : "rectanglePerimeter" , PERIMETER _RHOMBUS : "rhombusPerimeter" , PERIMETER _HEXAGON : "hexagonPerimeter" , PERIMETER _TRIANGLE : "trianglePerimeter" } ;
b . g + ", " + b . b + ", " + b . a + ")" ) ; return a } , rgba2hex : function ( a ) { var b = mxUtils . parseColor ( a ) ; return null != b ? "#" + ( "0" + b . r . toString ( 16 ) ) . slice ( - 2 ) + ( "0" + b . g . toString ( 16 ) ) . slice ( - 2 ) + ( "0" + b . b . toString ( 16 ) ) . slice ( - 2 ) +( 1 > b . a ? ( "0" + Math . round ( 255 * b . a ) . toString ( 16 ) ) . slice ( - 2 ) : "" ) :a } , color2hex : function ( a , b ) { b = null != b ? b : "#000000" ; try { null != a && ( a = String ( a ) . replace ( /\s/g , "" ) , a . toLowerCase ( ) == mxUtils . normalizedValidInvalidColor ? b = "#000000" : ( mxUtils . canvasContext . fillStyle = mxUtils . validInvalidColor , mxUtils . canvasContext . fillStyle =
a , mxUtils . canvasContext . fillStyle != mxUtils . validInvalidColor ? ( b = mxUtils . canvasContext . fillStyle , mxUtils . isRgbColor ( b ) && ( b = mxUtils . rgba2hex ( b ) ) ) : 1 < a . length && "#" == a . charAt ( 0 ) && ( mxUtils . canvasContext . fillStyle = a . substring ( 1 ) , mxUtils . canvasContext . fillStyle != mxUtils . validInvalidColor && ( b = mxUtils . canvasContext . fillStyle ) ) ) ) } catch ( c ) { } return b } , setStyle : function ( a , b , c ) { var d = null != c && ( "undefined" == typeof c . length || 0 < c . length ) ; if ( null == a || 0 == a . length ) d && ( a = b + "=" + c + ";" ) ; else if ( a . substring ( 0 , b . length + 1 ) ==
b + "=" ) { var e = a . indexOf ( ";" ) ; a = d ? b + "=" + c + ( 0 > e ? ";" : a . substring ( e ) ) : 0 > e || e == a . length - 1 ? "" : a . substring ( e + 1 ) } else { var f = a . indexOf ( ";" + b + "=" ) ; 0 > f ? d && ( d = ";" == a . charAt ( a . length - 1 ) ? "" : ";" , a = a + d + b + "=" + c + ";" ) : ( e = a . indexOf ( ";" , f + 1 ) , a = d ? a . substring ( 0 , f + 1 ) + b + "=" + c + ( 0 > e ? ";" : a . substring ( e ) ) : a . substring ( 0 , f ) + ( 0 > e ? ";" : a . substring ( e ) ) ) } return a } , setCellStyleFlags : function ( a , b , c , d , e ) { if ( null != b && 0 < b . length ) { a . beginUpdate ( ) ; try { for ( var f = 0 ; f < b . length ; f ++ ) if ( null != b [ f ] ) { var g = mxUtils . setStyleFlag ( a . getStyle ( b [ f ] ) , c , d ,
e ) ; a . setStyle ( b [ f ] , g ) } } finally { a . endUpdate ( ) } } } , setStyleFlag : function ( a , b , c , d ) { if ( null == a || 0 == a . length ) a = d || null == d ? b + "=" + c : b + "=0" ; else { var e = a . indexOf ( b + "=" ) ; if ( 0 > e ) e = ";" == a . charAt ( a . length - 1 ) ? "" : ";" , a = d || null == d ? a + e + b + "=" + c : a + e + b + "=0" ; else { var f = a . indexOf ( ";" , e ) ; var g = 0 > f ? a . substring ( e + b . length + 1 ) : a . substring ( e + b . length + 1 , f ) ; g = null == d ? parseInt ( g ) ^ c : d ? parseInt ( g ) | c : parseInt ( g ) & ~ c ; a = a . substring ( 0 , e ) + b + "=" + g + ( 0 <= f ? a . substring ( f ) : "" ) } } return a } , getAlignmentAsPoint : function ( a , b ) { var c = - . 5 , d = - . 5 ; a == mxConstants . ALIGN _LEFT ?
c = 0 : a == mxConstants . ALIGN _RIGHT && ( c = - 1 ) ; b == mxConstants . ALIGN _TOP ? d = 0 : b == mxConstants . ALIGN _BOTTOM && ( d = - 1 ) ; return new mxPoint ( c , d ) } , getSizeForString : function ( a , b , c , d , e ) { b = null != b ? b : mxConstants . DEFAULT _FONTSIZE ; c = null != c ? c : mxConstants . DEFAULT _FONTFAMILY ; var f = document . createElement ( "div" ) ; f . style . fontFamily = c ; f . style . fontSize = Math . round ( b ) + "px" ; f . style . lineHeight = mxConstants . ABSOLUTE _LINE _HEIGHT ? b * mxConstants . LINE _HEIGHT + "px" : mxConstants . LINE _HEIGHT * mxSvgCanvas2D . prototype . lineHeightCorrection ; null !=
e && ( ( e & mxConstants . FONT _BOLD ) == mxConstants . FONT _BOLD && ( f . style . fontWeight = "bold" ) , ( e & mxConstants . FONT _ITALIC ) == mxConstants . FONT _ITALIC && ( f . style . fontStyle = "italic" ) , b = [ ] , ( e & mxConstants . FONT _UNDERLINE ) == mxConstants . FONT _UNDERLINE && b . push ( "underline" ) , ( e & mxConstants . FONT _STRIKETHROUGH ) == mxConstants . FONT _STRIKETHROUGH && b . push ( "line-through" ) , 0 < b . length && ( f . style . textDecoration = b . join ( " " ) ) ) ; f . style . position = "absolute" ; f . style . visibility = "hidden" ; f . style . display = "inline-block" ; f . style . zoom = "1" ; null !=
d ? ( f . style . width = d + "px" , f . style . whiteSpace = "normal" ) : f . style . whiteSpace = "nowrap" ; f . innerHTML = a ; document . body . appendChild ( f ) ; a = new mxRectangle ( 0 , 0 , f . offsetWidth , f . offsetHeight ) ; document . body . removeChild ( f ) ; return a } , getViewXml : function ( a , b , c , d , e ) { d = null != d ? d : 0 ; e = null != e ? e : 0 ; b = null != b ? b : 1 ; null == c && ( c = [ a . getModel ( ) . getRoot ( ) ] ) ; var f = a . getView ( ) , g = null , k = f . isEventsEnabled ( ) ; f . setEventsEnabled ( ! 1 ) ; var l = f . drawPane , m = f . overlayPane ; a . dialect == mxConstants . DIALECT _SVG ? ( f . drawPane = document . createElementNS ( mxConstants . NS _SVG ,
"g" ) , f . canvas . appendChild ( f . drawPane ) , f . overlayPane = document . createElementNS ( mxConstants . NS _SVG , "g" ) ) : ( f . drawPane = f . drawPane . cloneNode ( ! 1 ) , f . canvas . appendChild ( f . drawPane ) , f . overlayPane = f . overlayPane . cloneNode ( ! 1 ) ) ; f . canvas . appendChild ( f . overlayPane ) ; var n = f . getTranslate ( ) ; f . translate = new mxPoint ( d , e ) ; b = new mxTemporaryCellStates ( a . getView ( ) , b , c ) ; try { g = ( new mxCodec ) . encode ( a . getView ( ) ) } finally { b . destroy ( ) , f . translate = n , f . canvas . removeChild ( f . drawPane ) , f . canvas . removeChild ( f . overlayPane ) , f . drawPane =
l , f . overlayPane = m , f . setEventsEnabled ( k ) } return g } , getScaleForPageCount : function ( a , b , c , d ) { if ( 1 > a ) return 1 ; c = null != c ? c : mxConstants . PAGE _FORMAT _A4 _PORTRAIT ; d = null != d ? d : 0 ; var e = c . width - 2 * d ; c = c . height - 2 * d ; d = mxRectangle . fromRectangle ( b . getGraphBounds ( ) ) ; b = b . getView ( ) . getScale ( ) ; d . width /= b ; d . height /= b ; b = d . width ; var f = Math . sqrt ( a ) ; d = Math . sqrt ( b / d . height / ( e / c ) ) ; c = f * d ; d = f / d ; if ( 1 > c && d > a ) { var g = d / a ; d = a ; c /= g } 1 > d && c > a && ( g = c / a , c = a , d /= g ) ; g = Math . ceil ( c ) * Math . ceil ( d ) ; for ( f = 0 ; g > a ; ) { g = Math . floor ( c ) / c ; var k = Math . floor ( d ) /
d ; 1 == g && ( g = Math . floor ( c - 1 ) / c ) ; 1 == k && ( k = Math . floor ( d - 1 ) / d ) ; g = g > k ? g : k ; c *= g ; d *= g ; g = Math . ceil ( c ) * Math . ceil ( d ) ; f ++ ; if ( 10 < f ) break } return e * c / b * . 99999 } , show : function ( a , b , c , d , e , f ) { c = null != c ? c : 0 ; d = null != d ? d : 0 ; null == b ? b = window . open ( ) . document : b . open ( ) ; 9 == document . documentMode && b . writeln ( '\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=9"><![endif]--\x3e' ) ; var g = a . getGraphBounds ( ) , k = Math . ceil ( c - g . x ) , l = Math . ceil ( d - g . y ) ; null == e && ( e = Math . ceil ( g . width + c ) + Math . ceil ( Math . ceil ( g . x ) - g . x ) ) ; null == f && ( f =
Math . ceil ( g . height + d ) + Math . ceil ( Math . ceil ( g . y ) - g . y ) ) ; if ( mxClient . IS _IE || 11 == document . documentMode ) { d = "<html><head>" ; g = document . getElementsByTagName ( "base" ) ; for ( c = 0 ; c < g . length ; c ++ ) d += g [ c ] . outerHTML ; d += "<style>" ; for ( c = 0 ; c < document . styleSheets . length ; c ++ ) try { d += document . styleSheets [ c ] . cssText } catch ( m ) { } d = d + '</style></head><body style="margin:0px;"><div style="position:absolute;overflow:hidden;width:' + ( e + "px;height:" + f + 'px;"><div style="position:relative;left:' + k + "px;top:" + l + 'px;">' ) + a . container . innerHTML ;
b . writeln ( d + "</div></div></body><html>" ) ; b . close ( ) } else { b . writeln ( "<html><head>" ) ; g = document . getElementsByTagName ( "base" ) ; for ( c = 0 ; c < g . length ; c ++ ) b . writeln ( mxUtils . getOuterHtml ( g [ c ] ) ) ; d = document . getElementsByTagName ( "link" ) ; for ( c = 0 ; c < d . length ; c ++ ) b . writeln ( mxUtils . getOuterHtml ( d [ c ] ) ) ; d = document . getElementsByTagName ( "style" ) ; for ( c = 0 ; c < d . length ; c ++ ) b . writeln ( mxUtils . getOuterHtml ( d [ c ] ) ) ; b . writeln ( '</head><body style="margin:0px;"></body></html>' ) ; b . close ( ) ; c = b . createElement ( "div" ) ; c . position = "absolute" ;
c . overflow = "hidden" ; c . style . width = e + "px" ; c . style . height = f + "px" ; e = b . createElement ( "div" ) ; e . style . position = "absolute" ; e . style . left = k + "px" ; e . style . top = l + "px" ; f = a . container . firstChild ; for ( d = null ; null != f ; ) g = f . cloneNode ( ! 0 ) , f == a . view . drawPane . ownerSVGElement ? ( c . appendChild ( g ) , d = g ) : e . appendChild ( g ) , f = f . nextSibling ; b . body . appendChild ( c ) ; null != e . firstChild && b . body . appendChild ( e ) ; null != d && ( d . style . minWidth = "" , d . style . minHeight = "" , d . firstChild . setAttribute ( "transform" , "translate(" + k + "," + l + ")" ) ) } mxUtils . removeCursors ( b . body ) ;
return b } , printScreen : function ( a ) { var b = window . open ( ) ; mxUtils . show ( a , b . document ) ; a = function ( ) { b . focus ( ) ; b . print ( ) ; b . close ( ) } ; mxClient . IS _GC ? b . setTimeout ( a , 500 ) : a ( ) } , popup : function ( a , b ) { if ( b ) { var c = document . createElement ( "div" ) ; c . style . overflow = "scroll" ; c . style . width = "636px" ; c . style . height = "460px" ; b = document . createElement ( "pre" ) ; b . innerHTML = mxUtils . htmlEntities ( a , ! 1 ) . replace ( /\n/g , "<br>" ) . replace ( / /g , " " ) ; c . appendChild ( b ) ; c = new mxWindow ( "Popup Window" , c , document . body . clientWidth / 2 - 320 , Math . max ( document . body . clientHeight ||
0 , document . documentElement . clientHeight ) / 2 - 240 , 640 , 480 , ! 1 , ! 0 ) ; c . setClosable ( ! 0 ) ; c . setVisible ( ! 0 ) } else mxClient . IS _NS ? ( c = window . open ( ) , c . document . writeln ( "<pre>" + mxUtils . htmlEntities ( a ) + "</pre" ) , c . document . close ( ) ) : ( c = window . open ( ) , b = c . document . createElement ( "pre" ) , b . innerHTML = mxUtils . htmlEntities ( a , ! 1 ) . replace ( /\n/g , "<br>" ) . replace ( / /g , " " ) , c . document . body . appendChild ( b ) ) } , alert : function ( a ) { alert ( a ) } , prompt : function ( a , b ) { return prompt ( a , null != b ? b : "" ) } , confirm : function ( a ) { return confirm ( a ) } ,
error : function ( a , b , c , d ) { var e = document . createElement ( "div" ) ; e . style . padding = "20px" ; var f = document . createElement ( "img" ) ; f . setAttribute ( "src" , d || mxUtils . errorImage ) ; f . setAttribute ( "valign" , "bottom" ) ; f . style . verticalAlign = "middle" ; e . appendChild ( f ) ; e . appendChild ( document . createTextNode ( " " ) ) ; e . appendChild ( document . createTextNode ( " " ) ) ; e . appendChild ( document . createTextNode ( " " ) ) ; mxUtils . write ( e , a ) ; a = document . body . clientWidth ; d = document . body . clientHeight || document . documentElement . clientHeight ; var g = new mxWindow ( mxResources . get ( mxUtils . errorResource ) ||
mxUtils . errorResource , e , ( a - b ) / 2 , d / 4 , b , null , ! 1 , ! 0 ) ; c && ( mxUtils . br ( e ) , b = document . createElement ( "p" ) , c = document . createElement ( "button" ) , mxClient . IS _IE ? c . style . cssText = "float:right" : c . setAttribute ( "style" , "float:right" ) , mxEvent . addListener ( c , "click" , function ( k ) { g . destroy ( ) } ) , mxUtils . write ( c , mxResources . get ( mxUtils . closeResource ) || mxUtils . closeResource ) , b . appendChild ( c ) , e . appendChild ( b ) , mxUtils . br ( e ) , g . setClosable ( ! 0 ) ) ; g . setVisible ( ! 0 ) ; return g } , makeDraggable : function ( a , b , c , d , e , f , g , k , l , m ) { a = new mxDragSource ( a ,
c ) ; a . dragOffset = new mxPoint ( null != e ? e : 0 , null != f ? f : mxConstants . TOOLTIP _VERTICAL _OFFSET ) ; a . autoscroll = g ; a . setGuidesEnabled ( ! 1 ) ; null != l && ( a . highlightDropTargets = l ) ; null != m && ( a . getDropTarget = m ) ; a . getGraphForEvent = function ( n ) { return "function" == typeof b ? b ( n ) : b } ; null != d && ( a . createDragElement = function ( ) { return d . cloneNode ( ! 0 ) } , k && ( a . createPreviewElement = function ( n ) { var p = d . cloneNode ( ! 0 ) , q = parseInt ( p . style . width ) , r = parseInt ( p . style . height ) ; p . style . width = Math . round ( q * n . view . scale ) + "px" ; p . style . height = Math . round ( r *
n . view . scale ) + "px" ; return p } ) ) ; return a } , format : function ( a ) { return parseFloat ( parseFloat ( a ) . toFixed ( 2 ) ) } } , mxConstants = { DEFAULT _HOTSPOT : . 3 , MIN _HOTSPOT _SIZE : 8 , MAX _HOTSPOT _SIZE : 0 , RENDERING _HINT _EXACT : "exact" , RENDERING _HINT _FASTER : "faster" , RENDERING _HINT _FASTEST : "fastest" , DIALECT _SVG : "svg" , DIALECT _MIXEDHTML : "mixedHtml" , DIALECT _PREFERHTML : "preferHtml" , DIALECT _STRICTHTML : "strictHtml" , NS _SVG : "http://www.w3.org/2000/svg" , NS _XHTML : "http://www.w3.org/1999/xhtml" , NS _XLINK : "http://www.w3.org/1999/xlink" , SHADOWCOLOR : "#808080" ,
VML _SHADOWCOLOR : "#808080" , SHADOW _OFFSET _X : 2 , SHADOW _OFFSET _Y : 3 , SHADOW _BLUR : 2 , SHADOW _OPACITY : 1 , NODETYPE _ELEMENT : 1 , NODETYPE _ATTRIBUTE : 2 , NODETYPE _TEXT : 3 , NODETYPE _CDATA : 4 , NODETYPE _ENTITY _REFERENCE : 5 , NODETYPE _ENTITY : 6 , NODETYPE _PROCESSING _INSTRUCTION : 7 , NODETYPE _COMMENT : 8 , NODETYPE _DOCUMENT : 9 , NODETYPE _DOCUMENTTYPE : 10 , NODETYPE _DOCUMENT _FRAGMENT : 11 , NODETYPE _NOTATION : 12 , TOOLTIP _VERTICAL _OFFSET : 16 , DEFAULT _VALID _COLOR : "#00FF00" , DEFAULT _INVALID _COLOR : "#FF0000" , OUTLINE _HIGHLIGHT _COLOR : "#00FF00" , OUTLINE _HIGHLIGHT _STROKEWIDTH : 5 ,
HIGHLIGHT _STROKEWIDTH : 3 , HIGHLIGHT _SIZE : 2 , HIGHLIGHT _OPACITY : 100 , CURSOR _MOVABLE _VERTEX : "move" , CURSOR _MOVABLE _EDGE : "move" , CURSOR _LABEL _HANDLE : "default" , CURSOR _TERMINAL _HANDLE : "pointer" , CURSOR _BEND _HANDLE : "crosshair" , CURSOR _VIRTUAL _BEND _HANDLE : "crosshair" , CURSOR _CONNECT : "pointer" , HIGHLIGHT _COLOR : "#00FF00" , CONNECT _TARGET _COLOR : "#0000FF" , INVALID _CONNECT _TARGET _COLOR : "#FF0000" , DROP _TARGET _COLOR : "#0000FF" , VALID _COLOR : "#00FF00" , INVALID _COLOR : "#FF0000" , EDGE _SELECTION _COLOR : "#00FF00" , VERTEX _SELECTION _COLOR : "#00FF00" ,
VERTEX _SELECTION _STROKEWIDTH : 1 , EDGE _SELECTION _STROKEWIDTH : 1 , VERTEX _SELECTION _DASHED : ! 0 , EDGE _SELECTION _DASHED : ! 0 , GUIDE _COLOR : "#FF0000" , GUIDE _STROKEWIDTH : 1 , OUTLINE _COLOR : "#0099FF" , OUTLINE _STROKEWIDTH : mxClient . IS _IE ? 2 : 3 , HANDLE _SIZE : 6 , LABEL _HANDLE _SIZE : 4 , HANDLE _FILLCOLOR : "#00FF00" , HANDLE _STROKECOLOR : "black" , LABEL _HANDLE _FILLCOLOR : "yellow" , CONNECT _HANDLE _FILLCOLOR : "#0000FF" , LOCKED _HANDLE _FILLCOLOR : "#FF0000" , OUTLINE _HANDLE _FILLCOLOR : "#00FFFF" , OUTLINE _HANDLE _STROKECOLOR : "#0033FF" , DEFAULT _FONTFAMILY : "Arial,Helvetica" ,
DEFAULT _FONTSIZE : 11 , DEFAULT _TEXT _DIRECTION : "" , LINE _HEIGHT : 1.2 , WORD _WRAP : "normal" , ABSOLUTE _LINE _HEIGHT : ! 1 , DEFAULT _FONTSTYLE : 0 , DEFAULT _STARTSIZE : 40 , DEFAULT _MARKERSIZE : 6 , DEFAULT _IMAGESIZE : 24 , ENTITY _SEGMENT : 30 , RECTANGLE _ROUNDING _FACTOR : . 15 , LINE _ARCSIZE : 20 , ARROW _SPACING : 0 , ARROW _WIDTH : 30 , ARROW _SIZE : 30 , PAGE _FORMAT _A4 _PORTRAIT : new mxRectangle ( 0 , 0 , 827 , 1169 ) , PAGE _FORMAT _A4 _LANDSCAPE : new mxRectangle ( 0 , 0 , 1169 , 827 ) , PAGE _FORMAT _LETTER _PORTRAIT : new mxRectangle ( 0 , 0 , 850 , 1100 ) , PAGE _FORMAT _LETTER _LANDSCAPE : new mxRectangle ( 0 ,
0 , 1100 , 850 ) , NONE : "none" , STYLE _PERIMETER : "perimeter" , STYLE _SOURCE _PORT : "sourcePort" , STYLE _TARGET _PORT : "targetPort" , STYLE _PORT _CONSTRAINT : "portConstraint" , STYLE _PORT _CONSTRAINT _ROTATION : "portConstraintRotation" , STYLE _SOURCE _PORT _CONSTRAINT : "sourcePortConstraint" , STYLE _TARGET _PORT _CONSTRAINT : "targetPortConstraint" , STYLE _OPACITY : "opacity" , STYLE _FILL _OPACITY : "fillOpacity" , STYLE _FILL _STYLE : "fillStyle" , STYLE _STROKE _OPACITY : "strokeOpacity" , STYLE _TEXT _OPACITY : "textOpacity" , STYLE _TEXT _DIRECTION : "textDirection" ,
STYLE _OVERFLOW : "overflow" , STYLE _BLOCK _SPACING : "blockSpacing" , STYLE _ORTHOGONAL : "orthogonal" , STYLE _EXIT _X : "exitX" , STYLE _EXIT _Y : "exitY" , STYLE _EXIT _DX : "exitDx" , STYLE _EXIT _DY : "exitDy" , STYLE _EXIT _PERIMETER : "exitPerimeter" , STYLE _ENTRY _X : "entryX" , STYLE _ENTRY _Y : "entryY" , STYLE _ENTRY _DX : "entryDx" , STYLE _ENTRY _DY : "entryDy" , STYLE _ENTRY _PERIMETER : "entryPerimeter" , STYLE _WHITE _SPACE : "whiteSpace" , STYLE _ROTATION : "rotation" , STYLE _FILLCOLOR : "fillColor" , STYLE _POINTER _EVENTS : "pointerEvents" , STYLE _SWIMLANE _FILLCOLOR : "swimlaneFillColor" ,
STYLE _MARGIN : "margin" , STYLE _GRADIENTCOLOR : "gradientColor" , STYLE _GRADIENT _DIRECTION : "gradientDirection" , STYLE _STROKECOLOR : "strokeColor" , STYLE _SEPARATORCOLOR : "separatorColor" , STYLE _STROKEWIDTH : "strokeWidth" , STYLE _ALIGN : "align" , STYLE _VERTICAL _ALIGN : "verticalAlign" , STYLE _LABEL _WIDTH : "labelWidth" , STYLE _LABEL _POSITION : "labelPosition" , STYLE _VERTICAL _LABEL _POSITION : "verticalLabelPosition" , STYLE _IMAGE _ASPECT : "imageAspect" , STYLE _IMAGE _ALIGN : "imageAlign" , STYLE _IMAGE _VERTICAL _ALIGN : "imageVerticalAlign" , STYLE _GLASS : "glass" ,
STYLE _IMAGE : "image" , STYLE _IMAGE _WIDTH : "imageWidth" , STYLE _IMAGE _HEIGHT : "imageHeight" , STYLE _IMAGE _BACKGROUND : "imageBackground" , STYLE _IMAGE _BORDER : "imageBorder" , STYLE _FLIPH : "flipH" , STYLE _FLIPV : "flipV" , STYLE _NOLABEL : "noLabel" , STYLE _NOEDGESTYLE : "noEdgeStyle" , STYLE _LABEL _BACKGROUNDCOLOR : "labelBackgroundColor" , STYLE _LABEL _BORDERCOLOR : "labelBorderColor" , STYLE _LABEL _PADDING : "labelPadding" , STYLE _INDICATOR _SHAPE : "indicatorShape" , STYLE _INDICATOR _IMAGE : "indicatorImage" , STYLE _INDICATOR _COLOR : "indicatorColor" , STYLE _INDICATOR _STROKECOLOR : "indicatorStrokeColor" ,
STYLE _INDICATOR _GRADIENTCOLOR : "indicatorGradientColor" , STYLE _INDICATOR _SPACING : "indicatorSpacing" , STYLE _INDICATOR _WIDTH : "indicatorWidth" , STYLE _INDICATOR _HEIGHT : "indicatorHeight" , STYLE _INDICATOR _DIRECTION : "indicatorDirection" , STYLE _SHADOW : "shadow" , STYLE _TEXT _SHADOW : "textShadow" , STYLE _SHADOW _OFFSET _X : "shadowOffsetX" , STYLE _SHADOW _OFFSET _Y : "shadowOffsetY" , STYLE _SHADOW _BLUR : "shadowBlur" , STYLE _SHADOWCOLOR : "shadowColor" , STYLE _SHADOW _OPACITY : "shadowOpacity" , STYLE _SEGMENT : "segment" , STYLE _ENDARROW : "endArrow" ,
STYLE _STARTARROW : "startArrow" , STYLE _ENDSIZE : "endSize" , STYLE _STARTSIZE : "startSize" , STYLE _SWIMLANE _LINE : "swimlaneLine" , STYLE _SWIMLANE _HEAD : "swimlaneHead" , STYLE _SWIMLANE _BODY : "swimlaneBody" , STYLE _ENDFILL : "endFill" , STYLE _ENDFILLCOLOR : "endFillColor" , STYLE _STARTFILL : "startFill" , STYLE _STARTFILLCOLOR : "startFillColor" , STYLE _DASHED : "dashed" , STYLE _DASH _PATTERN : "dashPattern" , STYLE _FIX _DASH : "fixDash" , STYLE _ROUNDED : "rounded" , STYLE _CURVED : "curved" , STYLE _ARCSIZE : "arcSize" , STYLE _ABSOLUTE _ARCSIZE : "absoluteArcSize" ,
STYLE _SOURCE _PERIMETER _SPACING : "sourcePerimeterSpacing" , STYLE _TARGET _PERIMETER _SPACING : "targetPerimeterSpacing" , STYLE _PERIMETER _SPACING : "perimeterSpacing" , STYLE _SPACING : "spacing" , STYLE _SPACING _TOP : "spacingTop" , STYLE _SPACING _LEFT : "spacingLeft" , STYLE _SPACING _BOTTOM : "spacingBottom" , STYLE _SPACING _RIGHT : "spacingRight" , STYLE _HORIZONTAL : "horizontal" , STYLE _DIRECTION : "direction" , STYLE _ANCHOR _POINT _DIRECTION : "anchorPointDirection" , STYLE _ELBOW : "elbow" , STYLE _FONTCOLOR : "fontColor" , STYLE _FONTFAMILY : "fontFamily" ,
STYLE _FONTSIZE : "fontSize" , STYLE _FONTSTYLE : "fontStyle" , STYLE _ASPECT : "aspect" , STYLE _AUTOSIZE : "autosize" , STYLE _AUTOSIZE _GRID : "autosizeGrid" , STYLE _FIXED _WIDTH : "fixedWidth" , STYLE _FOLDABLE : "foldable" , STYLE _EDITABLE : "editable" , STYLE _BACKGROUND _OUTLINE : "backgroundOutline" , STYLE _BENDABLE : "bendable" , STYLE _MOVABLE : "movable" , STYLE _RESIZABLE : "resizable" , STYLE _RESIZE _WIDTH : "resizeWidth" , STYLE _RESIZE _HEIGHT : "resizeHeight" , STYLE _ROTATABLE : "rotatable" , STYLE _CLONEABLE : "cloneable" , STYLE _DELETABLE : "deletable" , STYLE _SHAPE : "shape" ,
STYLE _EDGE : "edgeStyle" , STYLE _JETTY _SIZE : "jettySize" , STYLE _SOURCE _JETTY _SIZE : "sourceJettySize" , STYLE _TARGET _JETTY _SIZE : "targetJettySize" , STYLE _LOOP : "loopStyle" , STYLE _ORTHOGONAL _LOOP : "orthogonalLoop" , STYLE _ROUTING _CENTER _X : "routingCenterX" , STYLE _ROUTING _CENTER _Y : "routingCenterY" , STYLE _CLIP _PATH : "clipPath" , FONT _BOLD : 1 , FONT _ITALIC : 2 , FONT _UNDERLINE : 4 , FONT _STRIKETHROUGH : 8 , SHAPE _RECTANGLE : "rectangle" , SHAPE _ELLIPSE : "ellipse" , SHAPE _DOUBLE _ELLIPSE : "doubleEllipse" , SHAPE _RHOMBUS : "rhombus" , SHAPE _LINE : "line" , SHAPE _IMAGE : "image" ,
SHAPE _ARROW : "arrow" , SHAPE _ARROW _CONNECTOR : "arrowConnector" , SHAPE _LABEL : "label" , SHAPE _CYLINDER : "cylinder" , SHAPE _SWIMLANE : "swimlane" , SHAPE _CONNECTOR : "connector" , SHAPE _ACTOR : "actor" , SHAPE _CLOUD : "cloud" , SHAPE _TRIANGLE : "triangle" , SHAPE _HEXAGON : "hexagon" , ARROW _CLASSIC : "classic" , ARROW _CLASSIC _THIN : "classicThin" , ARROW _BLOCK : "block" , ARROW _BLOCK _THIN : "blockThin" , ARROW _OPEN : "open" , ARROW _OPEN _THIN : "openThin" , ARROW _OVAL : "oval" , ARROW _DIAMOND : "diamond" , ARROW _DIAMOND _THIN : "diamondThin" , ALIGN _LEFT : "left" , ALIGN _CENTER : "center" ,
ALIGN _RIGHT : "right" , ALIGN _TOP : "top" , ALIGN _MIDDLE : "middle" , ALIGN _BOTTOM : "bottom" , DIRECTION _NORTH : "north" , DIRECTION _SOUTH : "south" , DIRECTION _EAST : "east" , DIRECTION _WEST : "west" , DIRECTION _RADIAL : "radial" , TEXT _DIRECTION _DEFAULT : "" , TEXT _DIRECTION _AUTO : "auto" , TEXT _DIRECTION _LTR : "ltr" , TEXT _DIRECTION _RTL : "rtl" , TEXT _DIRECTION _VERTICAL _LR : "vertical-lr" , TEXT _DIRECTION _VERTICAL _RL : "vertical-rl" , DIRECTION _MASK _NONE : 0 , DIRECTION _MASK _WEST : 1 , DIRECTION _MASK _NORTH : 2 , DIRECTION _MASK _SOUTH : 4 , DIRECTION _MASK _EAST : 8 , DIRECTION _MASK _ALL : 15 ,
ELBOW _VERTICAL : "vertical" , ELBOW _HORIZONTAL : "horizontal" , EDGESTYLE _ELBOW : "elbowEdgeStyle" , EDGESTYLE _ENTITY _RELATION : "entityRelationEdgeStyle" , EDGESTYLE _LOOP : "loopEdgeStyle" , EDGESTYLE _SIDETOSIDE : "sideToSideEdgeStyle" , EDGESTYLE _TOPTOBOTTOM : "topToBottomEdgeStyle" , EDGESTYLE _ORTHOGONAL : "orthogonalEdgeStyle" , EDGESTYLE _SEGMENT : "segmentEdgeStyle" , PERIMETER _ELLIPSE : "ellipsePerimeter" , PERIMETER _RECTANGLE : "rectanglePerimeter" , PERIMETER _RHOMBUS : "rhombusPerimeter" , PERIMETER _HEXAGON : "hexagonPerimeter" , PERIMETER _TRIANGLE : "trianglePerimeter" } ;
function mxEventObject ( a ) { this . name = a ; this . properties = [ ] ; for ( var b = 1 ; b < arguments . length ; b += 2 ) null != arguments [ b + 1 ] && ( this . properties [ arguments [ b ] ] = arguments [ b + 1 ] ) } mxEventObject . prototype . name = null ; mxEventObject . prototype . properties = null ; mxEventObject . prototype . consumed = ! 1 ; mxEventObject . prototype . getName = function ( ) { return this . name } ; mxEventObject . prototype . getProperties = function ( ) { return this . properties } ; mxEventObject . prototype . getProperty = function ( a ) { return this . properties [ a ] } ;
mxEventObject . prototype . isConsumed = function ( ) { return this . consumed } ; mxEventObject . prototype . consume = function ( ) { this . consumed = ! 0 } ; function mxMouseEvent ( a , b ) { this . evt = a ; this . sourceState = this . state = b } mxMouseEvent . prototype . consumed = ! 1 ; mxMouseEvent . prototype . evt = null ; mxMouseEvent . prototype . graphX = null ; mxMouseEvent . prototype . graphY = null ; mxMouseEvent . prototype . state = null ; mxMouseEvent . prototype . sourceState = null ; mxMouseEvent . prototype . getEvent = function ( ) { return this . evt } ;
mxMouseEvent . prototype . getSource = function ( ) { return mxEvent . getSource ( this . evt ) } ; mxMouseEvent . prototype . isSource = function ( a ) { return null != a ? mxUtils . isAncestorNode ( a . node , this . getSource ( ) ) : ! 1 } ; mxMouseEvent . prototype . getX = function ( ) { return mxEvent . getClientX ( this . getEvent ( ) ) } ; mxMouseEvent . prototype . getY = function ( ) { return mxEvent . getClientY ( this . getEvent ( ) ) } ; mxMouseEvent . prototype . getGraphX = function ( ) { return this . graphX } ; mxMouseEvent . prototype . getGraphY = function ( ) { return this . graphY } ;
@ -370,8 +370,8 @@ mxSvgCanvas2D.prototype.addForeignObject=function(a,b,c,d,e,f,g,k,l,m,n,p,q,r,t)
d , e , f , g , k , l , m , n , p ) , null != a && ( v . setAttribute ( "requiredFeatures" , "http://www.w3.org/TR/SVG11/feature#Extensibility" ) , b = this . createElement ( "switch" ) , b . appendChild ( v ) , b . appendChild ( a ) , u . appendChild ( b ) ) ) ; t . appendChild ( u ) } ;
mxSvgCanvas2D . prototype . updateTextNodes = function ( a , b , c , d , e , f , g , k , l , m , n , p ) { var q = this . state . scale , r = "" , t = "" ; null != n && "vertical-" == n . substring ( 0 , 9 ) ? ( r = "-rl" == n . substring ( n . length - 3 ) , t = e == mxConstants . ALIGN _LEFT ? r ? "flex-end" : "flex-start" : e == mxConstants . ALIGN _RIGHT ? r ? "flex-start" : "flex-end" : "center" , r = f == mxConstants . ALIGN _TOP ? "flex-start" : f == mxConstants . ALIGN _BOTTOM ? "flex-end" : "center" ) : ( t = f == mxConstants . ALIGN _TOP ? "flex-start" : f == mxConstants . ALIGN _BOTTOM ? "flex-end" : "center" , r = e == mxConstants . ALIGN _LEFT ?
"flex-start" : e == mxConstants . ALIGN _RIGHT ? "flex-end" : "center" ) ; var u = null != this . state . fontBackgroundColor ? this . getLightDarkColor ( this . state . fontBackgroundColor ) : null , v = null != this . state . fontBorderColor ? this . getLightDarkColor ( this . state . fontBorderColor ) : null ; mxSvgCanvas2D . createCss ( c + this . foreignObjectPadding , d , e , f , g , k , l , n , null != u ? u . cssText : null , null != v ? v . cssText : null , "display: flex; align-items: unsafe " + t + "; justify-content: unsafe " + r + "; " + ( null != n && "vertical-" == n . substring ( 0 , 9 ) ? "writing-mode: " + n +
";" : "" ) , this . getTextCss ( ) , q , mxUtils . bind ( this , function ( y , A , z , C , B ) { a += this . state . dx ; b += this . state . dy ; var x= p . firstChild ; "title" == x . nodeName && ( x = x . nextSibling ) ; C += "color: " + this . getLightDarkColor ( this . state . fontColor ) . light + "; " ; C += null != u ? "background-color: " + u . light + "; " : "" ; C += null != v ? "border-color: " + v . light + "; " : "" ; var D= x . firstChild , E = D . firstChild , I = ( this . rotateHtml ? this . state . rotation : 0 ) + ( null != m ? m : 0 ) , F = ( 0 != this . foOffset ? "translate(" + this . foOffset + " " + this . foOffset + ")" : "" ) + ( 1 != q ? "scale(" + q + ")" :
"" ) ; this . setCssText ( E . firstChild , B ) ; this . setCssText ( E, C ) ; x . setAttribute ( "width" , Math . ceil ( 1 / Math . min ( 1 , q ) * 100 ) + "%" ) ; x . setAttribute ( "height" , Math . ceil ( 1 / Math . min ( 1 , q ) * 100 ) + "%" ) ; A = Math . round ( b + A ) ; 0 > A ? ( x . setAttribute ( "y" , A ) , z += "padding-top: 0; " ) : ( x . removeAttribute ( "y" ) , z += "padding-top: " + A + "px; " ) ; this . setCssText ( D , z + "margin-left: " + Math . round ( a + y ) + "px;" ) ; F += 0 != I ? "rotate(" + I + " " + a + " " + b + ")" : "" ; "" != F ? p . setAttribute ( "transform" , F ) : p . removeAttribute ( "transform" ) ; 1 != this . state . alpha ? p . setAttribute ( "opacity" ,
";" : "" ) , this . getTextCss ( ) , q , mxUtils . bind ( this , function ( y , A , z , x , B ) { a += this . state . dx ; b += this . state . dy ; var C= p . firstChild ; "title" == C . nodeName && ( C = C . nextSibling ) ; x += "color: " + this . getLightDarkColor ( this . state . fontColor ) . light + "; " ; x += null != u ? "background-color: " + u . light + "; " : "" ; x += null != v ? "border-color: " + v . light + "; " : "" ; var E= C . firstChild , D = E . firstChild , I = ( this . rotateHtml ? this . state . rotation : 0 ) + ( null != m ? m : 0 ) , F = ( 0 != this . foOffset ? "translate(" + this . foOffset + " " + this . foOffset + ")" : "" ) + ( 1 != q ? "scale(" + q + ")" :
"" ) ; this . setCssText ( D . firstChild , B ) ; this . setCssText ( D, x ) ; C . setAttribute ( "width" , Math . ceil ( 1 / Math . min ( 1 , q ) * 100 ) + "%" ) ; C . setAttribute ( "height" , Math . ceil ( 1 / Math . min ( 1 , q ) * 100 ) + "%" ) ; A = Math . round ( b + A ) ; 0 > A ? ( C . setAttribute ( "y" , A ) , z += "padding-top: 0; " ) : ( C . removeAttribute ( "y" ) , z += "padding-top: " + A + "px; " ) ; this . setCssText ( E , z + "margin-left: " + Math . round ( a + y ) + "px;" ) ; F += 0 != I ? "rotate(" + I + " " + a + " " + b + ")" : "" ; "" != F ? p . setAttribute ( "transform" , F ) : p . removeAttribute ( "transform" ) ; 1 != this . state . alpha ? p . setAttribute ( "opacity" ,
this . state . alpha ) : p . removeAttribute ( "opacity" ) } ) ) } ;
mxSvgCanvas2D . createCss = function ( a , b , c , d , e , f , g , k , l , m , n , p , q , r ) { k = null != k && "vertical-" == k . substring ( 0 , 9 ) ; q = "box-sizing: border-box; font-size: 0; " ; q = k ? q + ( "text-align: " + ( d == mxConstants . ALIGN _TOP ? "left" : d == mxConstants . ALIGN _BOTTOM ? "right" : "center" ) + "; " ) : q + ( "text-align: " + ( c == mxConstants . ALIGN _LEFT ? "left" : c == mxConstants . ALIGN _RIGHT ? "right" : "center" ) + "; " ) ; var t = mxUtils . getAlignmentAsPoint ( c , d ) ; c = "overflow: hidden; " ; var u = "width: 1px; " , v = "height: 1px; " , y = t . x * a ; t = t . y * b ; g ? ( u = "width: " + Math . round ( a ) +
"px; " , q += "max-height: " + Math . round ( b ) + "px; " , t = 0 ) : "fill" == f ? ( u = "width: " + Math . round ( a ) + "px; " , v = "height: " + Math . round ( b ) + "px; " , p += "width: 100%; height: 100%; " , q += "width: " + Math . round ( a - 2 ) + "px; " + v ) : "width" == f ? ( u = "width: " + Math . round ( a - 2 ) + "px; " , p += "width: 100%; " , q += u , t = 0 , 0 < b && ( q += "max-height: " + Math . round ( b ) + "px; " ) ) : "block" == f ? ( u = "width: " + Math . round ( a - 2 ) + "px; " , p += "width: 100%; " , c = "" , t = 0 , q += u , "middle" == d && ( q += "max-height: " + Math . round ( b ) + "px; " ) ) : ( c = "" , k ? y = 0 : t = 0 ) ; d = "" ; null != l && ( d += "background-color: " +
@ -407,9 +407,9 @@ m.scale,e*m.scale,(f+1)*m.scale);null!=n&&(b=this.createElement("rect"),c=null!=
2 ) ) , b . setAttribute ( "height" , Math . ceil ( n . height ) ) , null != c && ( b . style . fill = c . cssText ) , d && ( b . style . stroke = d . cssText ) , m = null != m . fontBorderColor ? Math . max ( 1 , this . format ( m . scale ) ) : 0 , b . setAttribute ( "stroke-width" , m ) , this . root . ownerDocument == document && 1 == mxUtils . mod ( m , 2 ) && b . setAttribute ( "transform" , "translate(0.5, 0.5)" ) , a . insertBefore ( b , a . firstChild ) ) } } ; mxSvgCanvas2D . prototype . stroke = function ( ) { this . addNode ( ! 1 , ! 0 ) } ; mxSvgCanvas2D . prototype . fill = function ( ) { this . addNode ( ! 0 , ! 1 ) } ;
mxSvgCanvas2D . prototype . fillAndStroke = function ( ) { this . addNode ( ! 0 , ! 0 ) } ; function mxGuide ( a , b ) { this . graph = a ; this . setStates ( b ) } mxGuide . prototype . graph = null ; mxGuide . prototype . states = null ; mxGuide . prototype . horizontal = ! 0 ; mxGuide . prototype . vertical = ! 0 ; mxGuide . prototype . guideX = null ; mxGuide . prototype . guideY = null ; mxGuide . prototype . rounded = ! 1 ; mxGuide . prototype . tolerance = 2 ; mxGuide . prototype . setStates = function ( a ) { this . states = a } ; mxGuide . prototype . isEnabledForEvent = function ( a ) { return ! 0 } ;
mxGuide . prototype . getGuideTolerance = function ( a ) { return a && this . graph . gridEnabled ? this . graph . gridSize / 2 : this . tolerance } ; mxGuide . prototype . createGuideShape = function ( a ) { a = new mxPolyline ( [ ] , mxConstants . GUIDE _COLOR , mxConstants . GUIDE _STROKEWIDTH ) ; a . isDashed = ! 0 ; return a } ; mxGuide . prototype . isStateIgnored = function ( a ) { return ! 1 } ;
mxGuide . prototype . move = function ( a , b , c , d ) { if ( null != this . states && ( this . horizontal || this . vertical ) && null != a && null != b ) { d = function ( B , x, D ) { var E = ! 1 ; D && Math . abs ( B - C ) < t ? ( b . y = B - a . getCenterY ( ) , t = Math . abs ( B - C) , E = ! 0 ) : D || ( Math . abs ( B - A ) < t ? ( b . y = B - a . y , t = Math . abs ( B - A ) , E = ! 0 ) : Math . abs ( B - z ) < t && ( b . y = B - a . y - a . height , t = Math . abs ( B - z ) , E= ! 0 ) ) ; E && ( p = x , q = B , null == this . guideY && ( this . guideY = this . createGuideShape ( ! 1 ) , this . guideY . dialect = mxConstants . DIALECT _SVG , this . guideY . pointerEvents = ! 1 , this . guideY . init ( this . graph . getView ( ) . getOverlayPane ( ) ) ) ) ;
n = n || E} ; var e = function ( B , x , D ) { var E = ! 1 ; D && Math . abs ( B - y ) < r ? ( b . x = B - a . getCenterX ( ) , r = Math . abs ( B - y ) , E= ! 0 ) : D || ( Math . abs ( B - u ) < r ? ( b . x = B - a . x , r = Math . abs ( B - u ) , E = ! 0 ) : Math . abs ( B - v ) < r && ( b . x = B - a . x - a . width , r = Math . abs ( B - v ) , E= ! 0 ) ) ; E && ( l = x , m = B , null == this . guideX && ( this . guideX = this . createGuideShape ( ! 0 ) , this . guideX . dialect = mxConstants . DIALECT _SVG , this . guideX . pointerEvents = ! 1 , this . guideX . init ( this . graph . getView ( ) . getOverlayPane ( ) ) ) ) ; k = k || E } , f = this . graph . getView ( ) . scale ; f *= this . getGuideTolerance ( c ) ; var g = a . clone ( ) ; g . x +=
b . x ; g . y += b . y ; var k = ! 1 , l = null , m = null , n = ! 1 , p = null , q = null , r = f , t = f , u = g . x , v = g . x + g . width , y = g . getCenterX ( ) , A = g . y , z = g . y + g . height , C = g . getCenterY ( ) ; for ( f = 0 ; f < this . states . length ; f ++ ) g = this . states [ f ] , null == g || this . isStateIgnored ( g ) || ( this . horizontal && ( e . call ( this , g . getCenterX ( ) , g , ! 0 ) , e . call ( this , g . x , g , ! 1 ) , e . call ( this , g . x + g . width , g , ! 1 ) , null == g . cell && e . call ( this , g . getCenterX ( ) , g , ! 1 ) ) , this . vertical && ( d . call ( this , g . getCenterY ( ) , g , ! 0 ) , d . call ( this , g . y , g , ! 1 ) , d . call ( this , g . y + g . height , g , ! 1 ) , null == g . cell && d . call ( this ,
mxGuide . prototype . move = function ( a , b , c , d ) { if ( null != this . states && ( this . horizontal || this . vertical ) && null != a && null != b ) { d = function ( B , C, E ) { var D = ! 1 ; E && Math . abs ( B - x ) < t ? ( b . y = B - a . getCenterY ( ) , t = Math . abs ( B - x) , D = ! 0 ) : E || ( Math . abs ( B - A ) < t ? ( b . y = B - a . y , t = Math . abs ( B - A ) , D = ! 0 ) : Math . abs ( B - z ) < t && ( b . y = B - a . y - a . height , t = Math . abs ( B - z ) , D= ! 0 ) ) ; D && ( p = C , q = B , null == this . guideY && ( this . guideY = this . createGuideShape ( ! 1 ) , this . guideY . dialect = mxConstants . DIALECT _SVG , this . guideY . pointerEvents = ! 1 , this . guideY . init ( this . graph . getView ( ) . getOverlayPane ( ) ) ) ) ;
n = n || D} ; var e = function ( B , C , E ) { var D = ! 1 ; E && Math . abs ( B - y ) < r ? ( b . x = B - a . getCenterX ( ) , r = Math . abs ( B - y ) , D= ! 0 ) : E || ( Math . abs ( B - u ) < r ? ( b . x = B - a . x , r = Math . abs ( B - u ) , D = ! 0 ) : Math . abs ( B - v ) < r && ( b . x = B - a . x - a . width , r = Math . abs ( B - v ) , D= ! 0 ) ) ; D && ( l = C , m = B , null == this . guideX && ( this . guideX = this . createGuideShape ( ! 0 ) , this . guideX . dialect = mxConstants . DIALECT _SVG , this . guideX . pointerEvents = ! 1 , this . guideX . init ( this . graph . getView ( ) . getOverlayPane ( ) ) ) ) ; k = k || D } , f = this . graph . getView ( ) . scale ; f *= this . getGuideTolerance ( c ) ; var g = a . clone ( ) ; g . x +=
b . x ; g . y += b . y ; var k = ! 1 , l = null , m = null , n = ! 1 , p = null , q = null , r = f , t = f , u = g . x , v = g . x + g . width , y = g . getCenterX ( ) , A = g . y , z = g . y + g . height , x = g . getCenterY ( ) ; for ( f = 0 ; f < this . states . length ; f ++ ) g = this . states [ f ] , null == g || this . isStateIgnored ( g ) || ( this . horizontal && ( e . call ( this , g . getCenterX ( ) , g , ! 0 ) , e . call ( this , g . x , g , ! 1 ) , e . call ( this , g . x + g . width , g , ! 1 ) , null == g . cell && e . call ( this , g . getCenterX ( ) , g , ! 1 ) ) , this . vertical && ( d . call ( this , g . getCenterY ( ) , g , ! 0 ) , d . call ( this , g . y , g , ! 1 ) , d . call ( this , g . y + g . height , g , ! 1 ) , null == g . cell && d . call ( this ,
g . getCenterY ( ) , g , ! 1 ) ) ) ; this . graph . snapDelta ( b , a , ! c , k , n ) ; b = this . getDelta ( a , l , b . x , p , b . y ) ; c = this . graph . container ; k || null == this . guideX ? null != this . guideX && ( e = d = null , null != l && null != a && ( d = Math . min ( a . y + b . y - this . graph . panDy , l . y ) , e = Math . max ( a . y + a . height + b . y - this . graph . panDy , l . y + l . height ) ) , this . guideX . points = null != d && null != e ? [ new mxPoint ( m , d ) , new mxPoint ( m , e ) ] : [ new mxPoint ( m , - this . graph . panDy ) , new mxPoint ( m , c . scrollHeight - 3 - this . graph . panDy ) ] , this . guideX . stroke = this . getGuideColor ( l , ! 0 ) , this . guideX . node . style . visibility =
"visible" , this . guideX . redraw ( ) ) : this . guideX . node . style . visibility = "hidden" ; n || null == this . guideY ? null != this . guideY && ( e = d = null , null != p && null != a && ( d = Math . min ( a . x + b . x - this . graph . panDx , p . x ) , e = Math . max ( a . x + a . width + b . x - this . graph . panDx , p . x + p . width ) ) , this . guideY . points = null != d && null != e ? [ new mxPoint ( d , q ) , new mxPoint ( e , q ) ] : [ new mxPoint ( - this . graph . panDx , q ) , new mxPoint ( c . scrollWidth - 3 - this . graph . panDx , q ) ] , this . guideY . stroke = this . getGuideColor ( p , ! 1 ) , this . guideY . node . style . visibility = "visible" , this . guideY . redraw ( ) ) :
this . guideY . node . style . visibility = "hidden" } return b } ; mxGuide . prototype . getDelta = function ( a , b , c , d , e ) { var f = this . graph . view . scale ; if ( this . rounded || null != b && null == b . cell ) c = Math . round ( ( a . x + c ) / f ) * f - a . x ; if ( this . rounded || null != d && null == d . cell ) e = Math . round ( ( a . y + e ) / f ) * f - a . y ; return new mxPoint ( c , e ) } ; mxGuide . prototype . getGuideColor = function ( a , b ) { return mxConstants . GUIDE _COLOR } ; mxGuide . prototype . hide = function ( ) { this . setVisible ( ! 1 ) } ;
@ -504,14 +504,14 @@ function mxArrowConnector(a,b,c,d,e,f,g){mxShape.call(this);this.points=a;this.f
mxArrowConnector . prototype . resetStyles = function ( ) { mxShape . prototype . resetStyles . apply ( this , arguments ) ; this . arrowSpacing = mxConstants . ARROW _SPACING } ; mxArrowConnector . prototype . apply = function ( a ) { mxShape . prototype . apply . apply ( this , arguments ) ; null != this . style && ( this . startSize = 3 * mxUtils . getNumber ( this . style , mxConstants . STYLE _STARTSIZE , mxConstants . ARROW _SIZE / 5 ) , this . endSize = 3 * mxUtils . getNumber ( this . style , mxConstants . STYLE _ENDSIZE , mxConstants . ARROW _SIZE / 5 ) ) } ;
mxArrowConnector . prototype . augmentBoundingBox = function ( a ) { mxShape . prototype . augmentBoundingBox . apply ( this , arguments ) ; var b = this . getEdgeWidth ( ) ; this . isMarkerStart ( ) && ( b = Math . max ( b , this . getStartArrowWidth ( ) ) ) ; this . isMarkerEnd ( ) && ( b = Math . max ( b , this . getEndArrowWidth ( ) ) ) ; a . grow ( ( b / 2 + this . strokewidth ) * this . scale ) } ;
mxArrowConnector . prototype . paintEdgeShape = function ( a , b ) { var c = this . strokewidth ; this . outline && ( c = Math . max ( 1 , mxUtils . getNumber ( this . style , mxConstants . STYLE _STROKEWIDTH , this . strokewidth ) ) ) ; var d = this . getStartArrowWidth ( ) + c , e = this . getEndArrowWidth ( ) + c , f = this . outline ? this . getEdgeWidth ( ) + c : this . getEdgeWidth ( ) , g = this . isOpenEnded ( ) , k = this . isMarkerStart ( ) , l = this . isMarkerEnd ( ) , m = g ? 0 : this . arrowSpacing + c / 2 , n = this . startSize + c ; c = this . endSize + c ; var p = this . isArrowRounded ( ) , q = b [ b . length - 1 ] , r = b [ 1 ] . x - b [ 0 ] . x , t = b [ 1 ] . y -
b [ 0 ] . y , u = Math . sqrt ( r * r + t * t ) ; if ( 0 != u ) { var v = r / u , y = v , A = t / u , z = A ; u = f * A ; var C = - f * v , B = [ ] ; p ? a . setLineJoin ( "round" ) : 2 < b . length && a . setMiterLimit ( 1.42 ) ; a . begin ( ) ; r = v ; t = A ; if ( k && ! g ) this . paintMarker ( a , b [ 0 ] . x , b [ 0 ] . y , v , A , n , d , f , m , ! 0 ) ; else { var x = b [ 0 ] . x + u / 2 + m * v ; var D= b [ 0 ] . y + C / 2 + m * A ; var E = b [ 0 ] . x - u / 2 + m * v , I = b [ 0 ] . y - C / 2 + m * A ; g ? ( a . moveTo ( x, D ) , B . push ( function ( ) { a . lineTo ( E , I ) } ) ) : ( a . moveTo ( E, I ) , a . lineTo ( x , D ) ) } var F = D = x = 0 ; for ( u = 0 ; u < b . length - 2 ; u ++ ) if ( C = mxUtils . relativeCcw ( b [ u ] . x , b [ u ] . y , b [ u + 1 ] . x , b [ u + 1 ] . y , b [ u + 2 ] . x , b [ u + 2 ] . y ) , x = b [ u +
2 ] . x - b [ u + 1 ] . x , D = b [ u + 2 ] . y - b [ u + 1 ] . y , F = Math . sqrt ( x* x + D * D ) , 0 != F ) { y = x / F ; z = D / F ; F = Math . max ( Math . sqrt ( ( v * y + A * z + 1 ) / 2 ) , . 04 ) ; x= v + y ; D = A + z ; var H = Math . sqrt ( x* x + D * D ) ; if ( 0 != H ) { x /= H ; D /= H ; H = Math . max ( F , Math . min ( this . strokewidth / 200 + . 04 , . 35 ) ) ; F = 0 != C && p ? Math . max ( . 1 , H ) : Math . max ( F , . 06 ) ; var K = b [ u + 1 ] . x + D * f / 2 / F , G = b [ u + 1 ] . y - x* f / 2 / F ; D = b [ u + 1 ] . x - D * f / 2 / F ; x = b [ u + 1 ] . y + x * f / 2 / F ; 0 != C && p ? - 1 == C ? ( C = D + z * f , F = x - y * f , a . lineTo ( D + A * f , x - v * f ) , a . quadTo ( K , G , C , F ) , function ( L , M ) { B . push ( function ( ) { a . lineTo ( L , M ) } ) } ( D, x ) ) : ( a . lineTo ( K , G ) , function ( L , M ) { var O =
K - A * f , P = G + v * f , Q = K - z * f , R = G + y * f ; B . push ( function ( ) { a . quadTo ( L , M , O , P ) } ) ; B . push ( function ( ) { a . lineTo ( Q , R ) } ) } ( D, x ) ) : ( a . lineTo ( K , G ) , function ( L , M ) { B . push ( function ( ) { a . lineTo ( L , M ) } ) } ( D, x ) ) ; v = y ; A = z } } u = f * z ; C = - f * y ; if ( l && ! g ) this . paintMarker ( a , q . x , q . y , - v , - A , c , e , f , m , ! 1 ) ; else { a . lineTo ( q . x - m * y + u / 2 , q . y - m * z + C / 2 ) ; var J = q . x - m * y - u / 2 , N = q . y - m * z - C / 2 ; g ? ( a . moveTo ( J , N ) , B . splice ( 0 , 0 , function ( ) { a . moveTo ( J , N ) } ) ) : a . lineTo ( J , N ) } for ( u = B . length - 1 ; 0 <= u ; u -- ) B [ u ] ( ) ; g ? ( a . end ( ) , a . stroke ( ) ) : ( a . close ( ) , a . fillAndStroke ( ) ) ; a . setShadow ( ! 1 ) ; a . setMiterLimit ( 4 ) ;
b [ 0 ] . y , u = Math . sqrt ( r * r + t * t ) ; if ( 0 != u ) { var v = r / u , y = v , A = t / u , z = A ; u = f * A ; var x = - f * v , B = [ ] ; p ? a . setLineJoin ( "round" ) : 2 < b . length && a . setMiterLimit ( 1.42 ) ; a . begin ( ) ; r = v ; t = A ; if ( k && ! g ) this . paintMarker ( a , b [ 0 ] . x , b [ 0 ] . y , v , A , n , d , f , m , ! 0 ) ; else { var C = b [ 0 ] . x + u / 2 + m * v ; var E= b [ 0 ] . y + x / 2 + m * A ; var D = b [ 0 ] . x - u / 2 + m * v , I = b [ 0 ] . y - x / 2 + m * A ; g ? ( a . moveTo ( C, E ) , B . push ( function ( ) { a . lineTo ( D , I ) } ) ) : ( a . moveTo ( D, I ) , a . lineTo ( C , E ) ) } var F = E = C = 0 ; for ( u = 0 ; u < b . length - 2 ; u ++ ) if ( x = mxUtils . relativeCcw ( b [ u ] . x , b [ u ] . y , b [ u + 1 ] . x , b [ u + 1 ] . y , b [ u + 2 ] . x , b [ u + 2 ] . y ) , C = b [ u +
2 ] . x - b [ u + 1 ] . x , E = b [ u + 2 ] . y - b [ u + 1 ] . y , F = Math . sqrt ( C* C + E * E ) , 0 != F ) { y = C / F ; z = E / F ; F = Math . max ( Math . sqrt ( ( v * y + A * z + 1 ) / 2 ) , . 04 ) ; C= v + y ; E = A + z ; var H = Math . sqrt ( C* C + E * E ) ; if ( 0 != H ) { C /= H ; E /= H ; H = Math . max ( F , Math . min ( this . strokewidth / 200 + . 04 , . 35 ) ) ; F = 0 != x && p ? Math . max ( . 1 , H ) : Math . max ( F , . 06 ) ; var K = b [ u + 1 ] . x + E * f / 2 / F , G = b [ u + 1 ] . y - C* f / 2 / F ; E = b [ u + 1 ] . x - E * f / 2 / F ; C = b [ u + 1 ] . y + C * f / 2 / F ; 0 != x && p ? - 1 == x ? ( x = E + z * f , F = C - y * f , a . lineTo ( E + A * f , C - v * f ) , a . quadTo ( K , G , x , F ) , function ( L , M ) { B . push ( function ( ) { a . lineTo ( L , M ) } ) } ( E, C ) ) : ( a . lineTo ( K , G ) , function ( L , M ) { var O =
K - A * f , P = G + v * f , Q = K - z * f , R = G + y * f ; B . push ( function ( ) { a . quadTo ( L , M , O , P ) } ) ; B . push ( function ( ) { a . lineTo ( Q , R ) } ) } ( E, C ) ) : ( a . lineTo ( K , G ) , function ( L , M ) { B . push ( function ( ) { a . lineTo ( L , M ) } ) } ( E, C ) ) ; v = y ; A = z } } u = f * z ; x = - f * y ; if ( l && ! g ) this . paintMarker ( a , q . x , q . y , - v , - A , c , e , f , m , ! 1 ) ; else { a . lineTo ( q . x - m * y + u / 2 , q . y - m * z + x / 2 ) ; var J = q . x - m * y - u / 2 , N = q . y - m * z - x / 2 ; g ? ( a . moveTo ( J , N ) , B . splice ( 0 , 0 , function ( ) { a . moveTo ( J , N ) } ) ) : a . lineTo ( J , N ) } for ( u = B . length - 1 ; 0 <= u ; u -- ) B [ u ] ( ) ; g ? ( a . end ( ) , a . stroke ( ) ) : ( a . close ( ) , a . fillAndStroke ( ) ) ; a . setShadow ( ! 1 ) ; a . setMiterLimit ( 4 ) ;
p && a . setLineJoin ( "flat" ) ; 2 < b . length && ( a . setMiterLimit ( 4 ) , k && ! g && ( a . begin ( ) , this . paintMarker ( a , b [ 0 ] . x , b [ 0 ] . y , r , t , n , d , f , m , ! 0 ) , a . stroke ( ) , a . end ( ) ) , l && ! g && ( a . begin ( ) , this . paintMarker ( a , q . x , q . y , - v , - A , c , e , f , m , ! 0 ) , a . stroke ( ) , a . end ( ) ) ) } } ; mxArrowConnector . prototype . paintMarker = function ( a , b , c , d , e , f , g , k , l , m ) { g = k / g ; var n = k * e / 2 ; k = - k * d / 2 ; var p = ( l + f ) * d ; f = ( l + f ) * e ; m ? a . moveTo ( b - n + p , c - k + f ) : a . lineTo ( b - n + p , c - k + f ) ; a . lineTo ( b - n / g + p , c - k / g + f ) ; a . lineTo ( b + l * d , c + l * e ) ; a . lineTo ( b + n / g + p , c + k / g + f ) ; a . lineTo ( b + n + p , c + k + f ) } ;
mxArrowConnector . prototype . isArrowRounded = function ( ) { return this . isRounded } ; mxArrowConnector . prototype . getStartArrowWidth = function ( ) { return mxConstants . ARROW _WIDTH } ; mxArrowConnector . prototype . getEndArrowWidth = function ( ) { return mxConstants . ARROW _WIDTH } ; mxArrowConnector . prototype . getEdgeWidth = function ( ) { return mxConstants . ARROW _WIDTH / 3 } ; mxArrowConnector . prototype . isOpenEnded = function ( ) { return ! 1 } ;
mxArrowConnector . prototype . isMarkerStart = function ( ) { return mxUtils . getValue ( this . style , mxConstants . STYLE _STARTARROW , mxConstants . NONE ) != mxConstants . NONE } ; mxArrowConnector . prototype . isMarkerEnd = function ( ) { return mxUtils . getValue ( this . style , mxConstants . STYLE _ENDARROW , mxConstants . NONE ) != mxConstants . NONE } ;
function mxText ( a , b , c , d , e , f , g , k , l , m , n , p , q , r , t , u , v , y , A , z , C ) { mxShape . call ( this ) ; this . value = a ; this . bounds = b ; this . color = null != e ? e : "black" ; this . align = null != c ? c : mxConstants . ALIGN _CENTER ; this . valign = null != d ? d : mxConstants . ALIGN _MIDDLE ; this . family = null != f ? f : mxConstants . DEFAULT _FONTFAMILY ; this . size = null != g ? g : mxConstants . DEFAULT _FONTSIZE ; this . fontStyle = null != k ? k : mxConstants . DEFAULT _FONTSTYLE ; this . spacing = parseInt ( l || 2 ) ; this . spacingTop = this . spacing + parseInt ( m || 0 ) ; this . spacingRight = this . spacing + parseInt ( n || 0 ) ;
this . spacingBottom = this . spacing + parseInt ( p || 0 ) ; this . spacingLeft = this . spacing + parseInt ( q || 0 ) ; this . horizontal = null != r ? r : ! 0 ; this . background = t ; this . border = u ; this . wrap = null != v ? v : ! 1 ; this . clipped = null != y ? y : ! 1 ; this . overflow = null != A ? A : "visible" ; this . labelPadding = null != z ? z : 0 ; this . textDirection = C ; this . rotation = 0 ; this . updateMargin ( ) } mxUtils . extend ( mxText , mxShape ) ; mxText . prototype . baseSpacingTop = 0 ; mxText . prototype . baseSpacingBottom = 0 ; mxText . prototype . baseSpacingLeft = 0 ; mxText . prototype . baseSpacingRight = 0 ;
function mxText ( a , b , c , d , e , f , g , k , l , m , n , p , q , r , t , u , v , y , A , z , x ) { mxShape . call ( this ) ; this . value = a ; this . bounds = b ; this . color = null != e ? e : "black" ; this . align = null != c ? c : mxConstants . ALIGN _CENTER ; this . valign = null != d ? d : mxConstants . ALIGN _MIDDLE ; this . family = null != f ? f : mxConstants . DEFAULT _FONTFAMILY ; this . size = null != g ? g : mxConstants . DEFAULT _FONTSIZE ; this . fontStyle = null != k ? k : mxConstants . DEFAULT _FONTSTYLE ; this . spacing = parseInt ( l || 2 ) ; this . spacingTop = this . spacing + parseInt ( m || 0 ) ; this . spacingRight = this . spacing + parseInt ( n || 0 ) ;
this . spacingBottom = this . spacing + parseInt ( p || 0 ) ; this . spacingLeft = this . spacing + parseInt ( q || 0 ) ; this . horizontal = null != r ? r : ! 0 ; this . background = t ; this . border = u ; this . wrap = null != v ? v : ! 1 ; this . clipped = null != y ? y : ! 1 ; this . overflow = null != A ? A : "visible" ; this . labelPadding = null != z ? z : 0 ; this . textDirection = x ; this . rotation = 0 ; this . updateMargin ( ) } mxUtils . extend ( mxText , mxShape ) ; mxText . prototype . baseSpacingTop = 0 ; mxText . prototype . baseSpacingBottom = 0 ; mxText . prototype . baseSpacingLeft = 0 ; mxText . prototype . baseSpacingRight = 0 ;
mxText . prototype . replaceLinefeeds = ! 0 ; mxText . prototype . verticalTextRotation = - 90 ; mxText . prototype . ignoreClippedStringSize = ! 0 ; mxText . prototype . ignoreStringSize = ! 1 ; mxText . prototype . textWidthPadding = 8 != document . documentMode || mxClient . IS _EM ? 3 : 4 ; mxText . prototype . lastValue = null ; mxText . prototype . cacheEnabled = ! 0 ; mxText . prototype . isHtmlAllowed = function ( ) { return 8 != document . documentMode || mxClient . IS _EM } ; mxText . prototype . getSvgScreenOffset = function ( ) { return 0 } ;
mxText . prototype . checkBounds = function ( ) { return ! isNaN ( this . scale ) && isFinite ( this . scale ) && 0 < this . scale && null != this . bounds && ! isNaN ( this . bounds . x ) && ! isNaN ( this . bounds . y ) && ! isNaN ( this . bounds . width ) && ! isNaN ( this . bounds . height ) } ; mxText . prototype . configurePointerEvents = function ( a ) { } ;
mxText . prototype . getActualTextDirection = function ( ) { var a = this . textDirection ; a == mxConstants . TEXT _DIRECTION _AUTO && ( a = this . getAutoDirection ( ) ) ; a != mxConstants . TEXT _DIRECTION _LTR && a != mxConstants . TEXT _DIRECTION _RTL && a != mxConstants . TEXT _DIRECTION _VERTICAL _LR && a != mxConstants . TEXT _DIRECTION _VERTICAL _RL && ( a = null ) ; return a } ;
@ -723,7 +723,7 @@ k}else for(c++,e=0;e<this.nestedBestRanks.length;e++)for(f=a.ranks[e],g=0;g<f.le
mxMedianHybridCrossingReduction . prototype . calculateRankCrossing = function ( a , b ) { var c = 0 , d = b . ranks [ a ] , e = b . ranks [ a - 1 ] , f = [ ] ; for ( b = 0 ; b < d . length ; b ++ ) { var g = d [ b ] , k = g . getGeneralPurposeVariable ( a ) ; g = g . getPreviousLayerConnectedCells ( a ) ; for ( var l = [ ] , m = 0 ; m < g . length ; m ++ ) { var n = g [ m ] . getGeneralPurposeVariable ( a - 1 ) ; l . push ( n ) } l . sort ( function ( p , q ) { return p - q } ) ; f [ k ] = l } a = [ ] ; for ( b = 0 ; b < f . length ; b ++ ) a = a . concat ( f [ b ] ) ; for ( d = 1 ; d < e . length ; ) d <<= 1 ; f = 2 * d - 1 ; -- d ; e = [ ] ; for ( b = 0 ; b < f ; ++ b ) e [ b ] = 0 ; for ( b = 0 ; b < a . length ; b ++ ) for ( f = a [ b ] + d , ++ e [ f ] ; 0 <
f ; ) f % 2 && ( c += e [ f + 1 ] ) , f = f - 1 >> 1 , ++ e [ f ] ; return c } ;
mxMedianHybridCrossingReduction . prototype . transpose = function ( a , b ) { for ( var c = ! 0 , d = 0 ; c && 10 > d ++ ; ) { var e = 1 == a % 2 && 1 == d % 2 ; c = ! 1 ; for ( var f = 0 ; f < b . ranks . length ; f ++ ) { for ( var g = b . ranks [ f ] , k = [ ] , l = 0 ; l < g . length ; l ++ ) { var m = g [ l ] , n = m . getGeneralPurposeVariable ( f ) ; 0 > n && ( n = l ) ; k [ n ] = m } var p = null , q = null , r = null , t = null , u = null ; for ( l = 0 ; l < g . length - 1 ; l ++ ) { if ( 0 == l ) { var v = k [ l ] ; m = v . getNextLayerConnectedCells ( f ) ; n = v . getPreviousLayerConnectedCells ( f ) ; var y = [ ] ; var A = [ ] ; for ( var z = 0 ; z < m . length ; z ++ ) y [ z ] = m [ z ] . getGeneralPurposeVariable ( f +
1 ) ; for ( z = 0 ; z < n . length ; z ++ ) A [ z ] = n [ z ] . getGeneralPurposeVariable ( f - 1 ) } else m = p , n = q , y = r , A = t , v = u ; u = k [ l + 1 ] ; p = u . getNextLayerConnectedCells ( f ) ; q = u . getPreviousLayerConnectedCells ( f ) ; r = [ ] ; t = [ ] ; for ( z = 0 ; z < p . length ; z ++ ) r [ z ] = p [ z ] . getGeneralPurposeVariable ( f + 1 ) ; for ( z = 0 ; z < q . length ; z ++ ) t [ z ] = q [ z ] . getGeneralPurposeVariable ( f - 1 ) ; var C = 0 , B = 0 ; for ( z = 0 ; z < y . length ; z ++ ) for ( var x= 0 ; x < r . length ; x ++ ) y [ z ] > r [ x ] && C ++ , y [ z ] < r [ x ] && B ++ ; for ( z = 0 ; z < A . length ; z ++ ) for ( x= 0 ; x < t . length ; x ++ ) A [ z ] > t [ x ] && C ++ , A [ z ] < t [ x ] && B ++ ; if ( B < C|| B == C && e ) p = v . getGeneralPurposeVariable ( f ) ,
1 ) ; for ( z = 0 ; z < n . length ; z ++ ) A [ z ] = n [ z ] . getGeneralPurposeVariable ( f - 1 ) } else m = p , n = q , y = r , A = t , v = u ; u = k [ l + 1 ] ; p = u . getNextLayerConnectedCells ( f ) ; q = u . getPreviousLayerConnectedCells ( f ) ; r = [ ] ; t = [ ] ; for ( z = 0 ; z < p . length ; z ++ ) r [ z ] = p [ z ] . getGeneralPurposeVariable ( f + 1 ) ; for ( z = 0 ; z < q . length ; z ++ ) t [ z ] = q [ z ] . getGeneralPurposeVariable ( f - 1 ) ; var x = 0 , B = 0 ; for ( z = 0 ; z < y . length ; z ++ ) for ( var C= 0 ; C < r . length ; C ++ ) y [ z ] > r [ C ] && x ++ , y [ z ] < r [ C ] && B ++ ; for ( z = 0 ; z < A . length ; z ++ ) for ( C= 0 ; C < t . length ; C ++ ) A [ z ] > t [ C ] && x ++ , A [ z ] < t [ C ] && B ++ ; if ( B < x|| B == x && e ) p = v . getGeneralPurposeVariable ( f ) ,
v . setGeneralPurposeVariable ( f , u . getGeneralPurposeVariable ( f ) ) , u . setGeneralPurposeVariable ( f , p ) , p = m , q = n , r = y , t = A , u = v , e || ( c = ! 0 ) } } } } ; mxMedianHybridCrossingReduction . prototype . weightedMedian = function ( a , b ) { if ( a = 0 == a % 2 ) for ( var c = b . maxRank - 1 ; 0 <= c ; c -- ) this . medianRank ( c , a ) ; else for ( c = 1 ; c < b . maxRank ; c ++ ) this . medianRank ( c , a ) } ;
mxMedianHybridCrossingReduction . prototype . medianRank = function ( a , b ) { for ( var c = this . nestedBestRanks [ a ] . length , d = [ ] , e = [ ] , f = 0 ; f < c ; f ++ ) { var g = this . nestedBestRanks [ a ] [ f ] , k = new MedianCellSorter ; k . cell = g ; var l = b ? g . getNextLayerConnectedCells ( a ) : g . getPreviousLayerConnectedCells ( a ) ; var m = b ? a + 1 : a - 1 ; null != l && 0 != l . length ? ( k . medianValue = this . medianValue ( l , m ) , d . push ( k ) ) : e [ g . getGeneralPurposeVariable ( a ) ] = ! 0 } d . sort ( MedianCellSorter . prototype . compare ) ; for ( f = 0 ; f < c ; f ++ ) null == e [ f ] && ( g = d . shift ( ) . cell , g . setGeneralPurposeVariable ( a ,
f ) ) } ; mxMedianHybridCrossingReduction . prototype . medianValue = function ( a , b ) { for ( var c = [ ] , d = 0 , e = 0 ; e < a . length ; e ++ ) { var f = a [ e ] ; c [ d ++ ] = f . getGeneralPurposeVariable ( b ) } c . sort ( function ( g , k ) { return g - k } ) ; if ( 1 == d % 2 ) return c [ Math . floor ( d / 2 ) ] ; if ( 2 == d ) return ( c [ 0 ] + c [ 1 ] ) / 2 ; a = d / 2 ; b = c [ a - 1 ] - c [ 0 ] ; d = c [ d - 1 ] - c [ a ] ; return ( c [ a - 1 ] * d + c [ a ] * b ) / ( b + d ) } ; function MedianCellSorter ( ) { } MedianCellSorter . prototype . medianValue = 0 ; MedianCellSorter . prototype . cell = ! 1 ;
@ -759,7 +759,7 @@ if(r.isVertex()){var t=0==k?e.connectsAsSource:e.connectsAsTarget;for(var u=0;u<
2 ? p += this . prefVertEdgeOff : m > f / 2 && ( p -= this . prefVertEdgeOff ) , t = 0 ; t < q ; t ++ ) r [ 4 * t + 2 * k ] = n , n += l , r [ 4 * t + 2 * k + 1 ] = p } f = e . getNextLayerConnectedCells ( b ) ; g = b + 1 } } } ;
mxCoordinateAssignment . prototype . setEdgePosition = function ( a ) { var b = 0 ; if ( 101207 != a . temp [ 0 ] ) { var c = a . maxRank , d = a . minRank ; c == d && ( c = a . source . maxRank , d = a . target . minRank ) ; for ( var e = 0 , f = this . jettyPositions [ a . ids [ 0 ] ] , g = a . isReversed ? a . target . cell : a . source . cell , k = this . layout . graph , l = this . orientation == mxConstants . DIRECTION _EAST || this . orientation == mxConstants . DIRECTION _SOUTH , m = 0 ; m < a . edges . length ; m ++ ) { var n = a . edges [ m ] , p = this . layout . getVisibleTerminal ( n , ! 0 ) , q = [ ] , r = a . isReversed ; p != g && ( r = ! r ) ; if ( null != f ) { var t = r ?
2 : 0 , u = r ? l ? this . rankBottomY [ d ] : this . rankTopY [ d ] : l ? this . rankTopY [ c ] : this . rankBottomY [ c ] , v = f [ 4 * e + 1 + t ] ; r != l && ( v = - v ) ; u += v ; t = f [ 4 * e + t ] ; var y = k . model . getTerminal ( n , ! 0 ) ; this . layout . isPort ( y ) && k . model . getParent ( y ) == p && ( t = k . view . getState ( y ) , t = null != t ? t . x : p . geometry . x + a . source . width * y . geometry . x ) ; this . orientation == mxConstants . DIRECTION _NORTH || this . orientation == mxConstants . DIRECTION _SOUTH ? ( q . push ( new mxPoint ( t , u ) ) , this . layout . edgeStyle == mxHierarchicalEdgeStyle . CURVE && q . push ( new mxPoint ( t , u + v ) ) ) : ( q . push ( new mxPoint ( u ,
t ) ) , this . layout . edgeStyle == mxHierarchicalEdgeStyle . CURVE && q . push ( new mxPoint ( u + v , t ) ) ) } t = a . x . length - 1 ; u = v = - 1 ; p = a . maxRank - 1 ; r && ( t = 0 , v = a . x . length , u = 1 , p = a . minRank + 1 ) ; for ( ; a . maxRank != a . minRank && t != v ; t += u ) { y = a . x [ t ] + b ; var A = ( this . rankTopY [ p ] + this . rankBottomY [ p + 1 ] ) / 2 , z = ( this . rankTopY [ p - 1 ] + this . rankBottomY [ p ] ) / 2 ; if ( r ) { var C= A ; A = z ; z = C } this . orientation == mxConstants . DIRECTION _NORTH || this . orientation == mxConstants . DIRECTION _SOUTH ? ( q . push ( new mxPoint ( y , A ) ) , q . push ( new mxPoint ( y , z ) ) ) : ( q . push ( new mxPoint ( A , y ) ) , q . push ( new mxPoint ( z ,
t ) ) , this . layout . edgeStyle == mxHierarchicalEdgeStyle . CURVE && q . push ( new mxPoint ( u + v , t ) ) ) } t = a . x . length - 1 ; u = v = - 1 ; p = a . maxRank - 1 ; r && ( t = 0 , v = a . x . length , u = 1 , p = a . minRank + 1 ) ; for ( ; a . maxRank != a . minRank && t != v ; t += u ) { y = a . x [ t ] + b ; var A = ( this . rankTopY [ p ] + this . rankBottomY [ p + 1 ] ) / 2 , z = ( this . rankTopY [ p - 1 ] + this . rankBottomY [ p ] ) / 2 ; if ( r ) { var x= A ; A = z ; z = x } this . orientation == mxConstants . DIRECTION _NORTH || this . orientation == mxConstants . DIRECTION _SOUTH ? ( q . push ( new mxPoint ( y , A ) ) , q . push ( new mxPoint ( y , z ) ) ) : ( q . push ( new mxPoint ( A , y ) ) , q . push ( new mxPoint ( z ,
y ) ) ) ; this . limitX = Math . max ( this . limitX , y ) ; p += u } null != f && ( t = r ? 2 : 0 , u = r ? l ? this . rankTopY [ c ] : this . rankBottomY [ c ] : l ? this . rankBottomY [ d ] : this . rankTopY [ d ] , v = f [ 4 * e + 3 - t ] , r != l && ( v = - v ) , u -= v , t = f [ 4 * e + 2 - t ] , r = k . model . getTerminal ( n , ! 1 ) , p = this . layout . getVisibleTerminal ( n , ! 1 ) , this . layout . isPort ( r ) && k . model . getParent ( r ) == p && ( t = k . view . getState ( r ) , t = null != t ? t . x : p . geometry . x + a . target . width * r . geometry . x ) , this . orientation == mxConstants . DIRECTION _NORTH || this . orientation == mxConstants . DIRECTION _SOUTH ? ( this . layout . edgeStyle == mxHierarchicalEdgeStyle . CURVE &&
q . push ( new mxPoint ( t , u - v ) ) , q . push ( new mxPoint ( t , u ) ) ) : ( this . layout . edgeStyle == mxHierarchicalEdgeStyle . CURVE && q . push ( new mxPoint ( u - v , t ) ) , q . push ( new mxPoint ( u , t ) ) ) ) ; a . isReversed && this . processReversedEdge ( a , n ) ; this . layout . setEdgePoints ( n , q ) ; this . layout . resetEdgeLabels && null != n . geometry && ( geometry = n . geometry . clone ( ) , geometry . relative = ! 0 , geometry . x = 0 , geometry . y = 0 , k . model . setGeometry ( n , geometry ) ) ; b = 0 == b ? this . parallelEdgeSpacing : 0 < b ? - b : - b + this . parallelEdgeSpacing ; e ++ } a . temp [ 0 ] = 101207 } } ;
mxCoordinateAssignment . prototype . setVertexLocation = function ( a ) { var b = a . cell , c = a . x [ 0 ] - a . width / 2 , d = a . y [ 0 ] - a . height / 2 ; this . rankTopY [ a . minRank ] = Math . min ( this . rankTopY [ a . minRank ] , d ) ; this . rankBottomY [ a . minRank ] = Math . max ( this . rankBottomY [ a . minRank ] , d + a . height ) ; this . orientation == mxConstants . DIRECTION _NORTH || this . orientation == mxConstants . DIRECTION _SOUTH ? this . layout . setVertexLocation ( b , c , d ) : this . layout . setVertexLocation ( b , d , c ) ; this . limitX = Math . max ( this . limitX , c + a . width ) } ;
@ -886,18 +886,18 @@ mxPrintPreview.prototype.getPageClassCss=function(a,b){var c=this.pageMargin,d=t
mxUtils . htmlEntities ( ( c / d ) . toFixed ( 2 ) ) + "in;\n}\n" ) ; return b } ;
mxPrintPreview . prototype . open = function ( a , b , c , d , e , f , g ) { c = null ; try { var k = this . graph . cellRenderer . initializeOverlay , l = null != f ; f = mxRectangle . fromRectangle ( null != f ? f : this . pageFormat ) ; var m = f . width + 1 , n = f . height + 1 ; this . printOverlays && ( this . graph . cellRenderer . initializeOverlay = function ( G , J ) { J . init ( G . view . getDrawPane ( ) ) } ) ; this . printControls && ( this . graph . cellRenderer . initControl = function ( G , J , N , L ) { J . dialect = G . view . graph . dialect ; J . init ( G . view . getDrawPane ( ) ) } ) ; this . wnd = null != b ? b : this . wnd ; b = ! 1 ; null == this . wnd &&
( b = ! 0 , this . wnd = window . open ( ) ) ; var p = this . wnd . document ; if ( b ) { var q = this . getDoctype ( ) ; null != q && 0 < q . length && p . writeln ( q ) ; "CSS1Compat" === document . compatMode && p . writeln ( "<!DOCTYPE html>" ) ; p . writeln ( "<html>" ) ; p . writeln ( "<head>" ) ; this . writeHead ( p , a ) ; p . writeln ( "</head>" ) ; p . writeln ( "<body>" ) } var r = mxRectangle . fromRectangle ( null != g ? this . graph . getBoundingBox ( g ) : this . graph . getGraphBounds ( ) ) , t = this . graph . getView ( ) . getScale ( ) , u = t / this . scale , v = this . graph . getView ( ) . getTranslate ( ) ; this . autoOrigin || ( this . x0 -= v . x * this . scale ,
this . y0 -= v . y * this . scale , r . width += r . x , r . height += r . y , r . x = 0 , this . border = r . y = 0 ) ; var y = m - 2 * this . border , A = n - 2 * this . border ; n += this . marginTop + this . marginBottom ; r . width /= u ; r . height /= u ; var z = Math . max ( 1 , Math . ceil ( ( r . width + this . x0 ) / y ) ) , C = Math . max ( 1 , Math . ceil ( ( r . height + this . y0 ) / A ) ) ; this . pageCount = z * C ; var B = null ; l && ( null == this . pendingCss && ( this . pageFormatClass = { } , this . pendingCss = "" ) , B = mxUtils . htmlEntities ( "gePageFormat-" + String ( f . width ) . replace ( /\./g , "_" ) + "-" + String ( f . height ) . replace ( /\./g , "_" ) ) , null == this . pageFormatClass [ B ] &&
( this . pageFormatClass [ B ] = ! 0 , this . pendingCss += this . getPageClassCss ( B , f ) ) ) ; var x = mxUtils . bind ( this , function ( G ) { null != this . borderColor && ( G . style . borderColor = this . borderColor , G . style . borderStyle = "solid" , G . style . borderWidth = "1px" ) ; G . style . background = this . backgroundColor ; null != B ? G . classList . add ( B ) : ( G . style . width = f . width + "px" , G . style . height = f . height + "px" ) ; p . body . appendChild ( G ) } ) , D = this . getCoverPages ( m , n ) ; if ( null != D) for ( var E = 0 ; E < D . length ; E ++ ) x ( D [ E ] , ! 0 ) ; var I = this . getAppendices ( m , n ) ; for ( E= 0 ; E < C ; E ++ ) { var F =
E * A / this . scale - this . y0 / this . scale + ( r . y - v . y * t ) / t - E ; for ( a = 0 ; a < z ; a ++ ) { if ( null == this . wnd ) return null ; var H = a * y / this . scale - this . x0 / this . scale + ( r . x - v . x * t ) / t - a ; g = E * z + a + 1 ; c = p . createElement ( "div" ) ; c . style . display = "flex" ; c . style . alignItems = "center" ; c . style . justifyContent = "center" ; var K = new mxRectangle ( H , F , y , A ) ; this . addGraphFragment ( - H , - F , this . scale , g , c , K ) ; null != e && 0 == E && 0 == a && c . setAttribute ( "id" , e ) ; x ( c , ! 0 ) } } if ( null != I ) for ( E= 0 ; E < I . length ; E ++ ) x ( I [ E ] , E < I . length - 1 ) ; b && ! d && this . closeDocument ( ) ; this . wnd . focus ( ) } catch ( G ) { null !=
this . y0 -= v . y * this . scale , r . width += r . x , r . height += r . y , r . x = 0 , this . border = r . y = 0 ) ; var y = m - 2 * this . border , A = n - 2 * this . border ; n += this . marginTop + this . marginBottom ; r . width /= u ; r . height /= u ; var z = Math . max ( 1 , Math . ceil ( ( r . width + this . x0 ) / y ) ) , x = Math . max ( 1 , Math . ceil ( ( r . height + this . y0 ) / A ) ) ; this . pageCount = z * x ; var B = null ; l && ( null == this . pendingCss && ( this . pageFormatClass = { } , this . pendingCss = "" ) , B = mxUtils . htmlEntities ( "gePageFormat-" + String ( f . width ) . replace ( /\./g , "_" ) + "-" + String ( f . height ) . replace ( /\./g , "_" ) ) , null == this . pageFormatClass [ B ] &&
( this . pageFormatClass [ B ] = ! 0 , this . pendingCss += this . getPageClassCss ( B , f ) ) ) ; var C = mxUtils . bind ( this , function ( G ) { null != this . borderColor && ( G . style . borderColor = this . borderColor , G . style . borderStyle = "solid" , G . style . borderWidth = "1px" ) ; G . style . background = this . backgroundColor ; null != B ? G . classList . add ( B ) : ( G . style . width = f . width + "px" , G . style . height = f . height + "px" ) ; p . body . appendChild ( G ) } ) , E = this . getCoverPages ( m , n ) ; if ( null != E) for ( var D = 0 ; D < E . length ; D ++ ) C ( E [ D ] , ! 0 ) ; var I = this . getAppendices ( m , n ) ; for ( D= 0 ; D < x ; D ++ ) { var F =
D * A / this . scale - this . y0 / this . scale + ( r . y - v . y * t ) / t - D ; for ( a = 0 ; a < z ; a ++ ) { if ( null == this . wnd ) return null ; var H = a * y / this . scale - this . x0 / this . scale + ( r . x - v . x * t ) / t - a ; g = D * z + a + 1 ; c = p . createElement ( "div" ) ; c . style . display = "flex" ; c . style . alignItems = "center" ; c . style . justifyContent = "center" ; var K = new mxRectangle ( H , F , y , A ) ; this . addGraphFragment ( - H , - F , this . scale , g , c , K ) ; null != e && 0 == D && 0 == a && c . setAttribute ( "id" , e ) ; C ( c , ! 0 ) } } if ( null != I ) for ( D= 0 ; D < I . length ; D ++ ) C ( I [ D ] , D < I . length - 1 ) ; b && ! d && this . closeDocument ( ) ; this . wnd . focus ( ) } catch ( G ) { null !=
c && null != c . parentNode && c . parentNode . removeChild ( c ) , null != window . console && console . error ( G ) } finally { this . graph . cellRenderer . initializeOverlay = k } return this . wnd } ; mxPrintPreview . prototype . addPendingCss = function ( a ) { if ( null != this . pendingCss ) { var b = a . createElement ( "style" ) ; b . setAttribute ( "type" , "text/css" ) ; b . appendChild ( a . createTextNode ( this . pendingCss ) ) ; a . getElementsByTagName ( "head" ) [ 0 ] . appendChild ( b ) ; this . pendingCss = null } } ;
mxPrintPreview . prototype . closeDocument = function ( ) { try { if ( null != this . wnd && null != this . wnd . document ) { var a = this . wnd . document ; this . writePostfix ( a ) ; a . writeln ( "</body>" ) ; a . writeln ( "</html>" ) ; a . close ( ) ; this . addPendingCss ( a ) ; mxEvent . release ( a . body ) } } catch ( b ) { } } ;
mxPrintPreview . prototype . writeHead = function ( a , b ) { null != this . title && a . writeln ( "<title>" + mxUtils . htmlEntities ( this . title ) + "</title>" ) ; mxClient . link ( "stylesheet" , mxClient . basePath + "/css/common.css" , a ) ; a . writeln ( '<style type="text/css">' ) ; a . writeln ( this . defaultCss ) ; var c = this . pageFormat ; this . addPageCss && null != c && ( c = ( c . width / this . pixelsPerInch ) . toFixed ( 2 ) + "in " + ( c . height / this . pixelsPerInch ) . toFixed ( 2 ) + "in" , a . writeln ( "@page {" ) , a . writeln ( " margin: " + mxUtils . htmlEntities ( ( this . pageMargin / this . pixelsPerInch ) . toFixed ( 2 ) ) +
"in;" ) , a . writeln ( " size: " + mxUtils . htmlEntities ( c ) + ";" ) , a . writeln ( "}" ) ) ; null != b && a . writeln ( mxUtils . htmlEntities ( b , ! 1 , ! 1 , ! 1 ) ) ; a . writeln ( "</style>" ) } ; mxPrintPreview . prototype . writePostfix = function ( a ) { } ; mxPrintPreview . prototype . getRoot = function ( ) { var a = this . graph . view . currentRoot ; null == a && ( a = this . graph . getModel ( ) . getRoot ( ) ) ; return a } ; mxPrintPreview . prototype . useCssTransforms = function ( ) { return ! mxClient . NO _FO && ! mxClient . IS _SF } ; mxPrintPreview . prototype . isCellVisible = function ( a ) { return ! 0 } ;
mxPrintPreview . prototype . drawBackgroundImage = function ( a ) { a . redraw ( ) } ;
mxPrintPreview . prototype . addGraphFragment = function ( a , b , c , d , e , f ) { var g = this . graph . getView ( ) ; d = this . graph . container ; this . graph . container = e ; var k = g . getCanvas ( ) , l = g . getBackgroundPane ( ) , m = g . getDrawPane ( ) , n = g . getOverlayPane ( ) , p = c ; if ( this . graph . dialect == mxConstants . DIALECT _SVG ) { if ( g . createSvg ( ) , this . useCssTransforms ( ) ) { var q = g . getDrawPane ( ) . parentNode ; q . setAttribute ( "transformOrigin" , "0 0" ) ; q . setAttribute ( "transform" , "scale(" + c + "," + c + ")translate(" + a + "," + b + ")" ) ; c = 1 ; b = a = 0 } } else g . createHtml ( ) ; q = g . isEventsEnabled ( ) ;
g . setEventsEnabled ( ! 1 ) ; var r = this . graph . isEnabled ( ) ; this . graph . setEnabled ( ! 1 ) ; var t = g . getTranslate ( ) ; g . translate = new mxPoint ( a , b ) ; var u = this . graph . selectionCellsHandler . updateHandler ; this . graph . selectionCellsHandler . updateHandler = function ( ) { } ; var v = this . graph . cellRenderer . redraw , y = g . states , A = g . scale , z = null ; if ( this . printBackgroundImage ) { var C = this . getBackgroundImage ( ) ; null != C && ( z = new mxRectangle ( Math . round ( a * A + C . x ) , Math . round ( b * A + C. y ) , C . width - 1 , C . height - 1 ) , z = new mxImageShape ( z , C . src ) , z . dialect = this . graph . dialect ) } if ( this . clipping ) { var B =
new mxRectangle ( ( f . x + t . x + 1.5 ) * A , ( f . y + t . y + 1.5 ) * A , ( f . width - 1.5 ) * A / p , ( f . height - 1.5 ) * A / p ) , x = this ; this . graph . cellRenderer . redraw = function ( E , I , F ) { if ( null != E) { var H = y . get ( E . cell ) ; if ( null != H && ( H = g . getBoundingBox ( H , ! 1 ) , null != H && 0 < H . width && 0 < H . height && ! mxUtils . intersects ( B , H ) ) || ! x. isCellVisible ( E . cell ) ) return } v . apply ( this , arguments ) } ; null != z && ( a = new mxRectangle ( z . bounds . x * A + ( t . x - a ) * A , z . bounds . y * A + ( t . y - b ) * A , z . bounds . width * A , z . bounds . height * A ) , mxUtils . intersects ( B , a ) || ( z = null ) ) } null != z && ( z . init ( g . backgroundPane ) ,
this . drawBackgroundImage ( z ) ) ; a = null ; try { var D = [ this . getRoot ( ) ] ; a = new mxTemporaryCellStates ( g , c , D , null , mxUtils . bind ( this , function ( E) { return this . getLinkForCellState ( E ) } ) ) } finally { for ( c = e . firstChild ; null != c ; ) e = c . nextSibling , "svg" == c . nodeName . toLowerCase ( ) ? ( c . style . top = "" , c . style . left = "" , c . style . width = "" , c . style . height = "" , c . style . display = "" , c . style . maxWidth = "100%" , c . style . maxHeight = "100%" , c . style . overflow = mxClient . IS _SF ? "hidden" : "clip" , c . style . overflowClipMargin = this . overflowClipMargin , c . setAttribute ( "viewBox" ,
g . setEventsEnabled ( ! 1 ) ; var r = this . graph . isEnabled ( ) ; this . graph . setEnabled ( ! 1 ) ; var t = g . getTranslate ( ) ; g . translate = new mxPoint ( a , b ) ; var u = this . graph . selectionCellsHandler . updateHandler ; this . graph . selectionCellsHandler . updateHandler = function ( ) { } ; var v = this . graph . cellRenderer . redraw , y = g . states , A = g . scale , z = null ; if ( this . printBackgroundImage ) { var x = this . getBackgroundImage ( ) ; null != x && ( z = new mxRectangle ( Math . round ( a * A + x . x ) , Math . round ( b * A + x. y ) , x . width - 1 , x . height - 1 ) , z = new mxImageShape ( z , x . src ) , z . dialect = this . graph . dialect ) } if ( this . clipping ) { var B =
new mxRectangle ( ( f . x + t . x + 1.5 ) * A , ( f . y + t . y + 1.5 ) * A , ( f . width - 1.5 ) * A / p , ( f . height - 1.5 ) * A / p ) , C = this ; this . graph . cellRenderer . redraw = function ( D , I , F ) { if ( null != D) { var H = y . get ( D . cell ) ; if ( null != H && ( H = g . getBoundingBox ( H , ! 1 ) , null != H && 0 < H . width && 0 < H . height && ! mxUtils . intersects ( B , H ) ) || ! C. isCellVisible ( D . cell ) ) return } v . apply ( this , arguments ) } ; null != z && ( a = new mxRectangle ( z . bounds . x * A + ( t . x - a ) * A , z . bounds . y * A + ( t . y - b ) * A , z . bounds . width * A , z . bounds . height * A ) , mxUtils . intersects ( B , a ) || ( z = null ) ) } null != z && ( z . init ( g . backgroundPane ) ,
this . drawBackgroundImage ( z ) ) ; a = null ; try { var E = [ this . getRoot ( ) ] ; a = new mxTemporaryCellStates ( g , c , E , null , mxUtils . bind ( this , function ( D) { return this . getLinkForCellState ( D ) } ) ) } finally { for ( c = e . firstChild ; null != c ; ) e = c . nextSibling , "svg" == c . nodeName . toLowerCase ( ) ? ( c . style . top = "" , c . style . left = "" , c . style . width = "" , c . style . height = "" , c . style . display = "" , c . style . maxWidth = "100%" , c . style . maxHeight = "100%" , c . style . overflow = mxClient . IS _SF ? "hidden" : "clip" , c . style . overflowClipMargin = this . overflowClipMargin , c . setAttribute ( "viewBox" ,
"0 0 " + ( mxClient . IS _SF ? f . width + 1 + " " + ( f . height + 1 ) : f . width - 1 + " " + ( f . height - 1 ) ) ) , this . addGrid ( c , f ) , mxClient . IS _SF && ( f . width > f . height ? c . style . height = "100%" : c . style . width = "100%" ) ) : this . isTextLabel ( c ) || c . parentNode . removeChild ( c ) , c = e ; g . overlayPane . parentNode . removeChild ( g . overlayPane ) ; this . graph . setEnabled ( r ) ; this . graph . container = d ; this . graph . cellRenderer . redraw = v ; this . graph . selectionCellsHandler . updateHandler = u ; g . canvas = k ; g . backgroundPane = l ; g . drawPane = m ; g . overlayPane = n ; g . translate = t ; a . destroy ( ) ; g . setEventsEnabled ( q ) } } ;
mxPrintPreview . prototype . addGrid = function ( a , b ) { 0 < this . gridSize && 0 < this . gridSteps && null != this . gridColor && ( b = this . createSvgGrid ( a , b ) , a = mxUtils . getSvgDefs ( a ) , null != a . nextSibling ? a . parentNode . insertBefore ( b , a . nextSibling ) : a . parentNode . appendChild ( b ) ) } ;
mxPrintPreview . prototype . createSvgGrid = function ( a , b ) { var c = this . gridSize ; a = a . ownerDocument ; var d = null != a . createElementNS ? a . createElementNS ( mxConstants . NS _SVG , "g" ) : a . createElement ( "g" ) , e = mxUtils . mod ( Math . ceil ( Math . round ( b . x ) / c ) , this . gridSteps ) , f = mxUtils . mod ( c - mxUtils . mod ( Math . round ( b . x ) , c ) , c ) , g = mxUtils . mod ( Math . ceil ( Math . round ( b . y ) / c ) , this . gridSteps ) , k = mxUtils . mod ( c - mxUtils . mod ( Math . round ( b . y ) , c ) , c ) ; f *= this . scale ; k *= this . scale ; c *= this . scale ; for ( var l = Math . ceil ( b . height / c ) , m = 0 ; m < l ; m ++ ) { var n = null !=
@ -1023,30 +1023,30 @@ k)),mxUtils.contains(c,a,f)||mxUtils.contains(b,a,f)||e.push(new mxPoint(a,f)),1
c . x = g . x , c . y = g . y ) ; null != b && null != c && ( k = Math . max ( b . y , c . y ) , g = Math . min ( b . y + b . height , c . y + c . height ) , a = f . getRoutingCenterX ( b ) , null != d && d . x >= b . x && d . x <= b . x + b . width && ( a = d . x ) , k = null != d ? d . y : Math . round ( g + ( k - g ) / 2 ) , mxUtils . contains ( c , a , k ) || mxUtils . contains ( b , a , k ) || e . push ( new mxPoint ( a , k ) ) , a = null != d && d . x >= c . x && d . x <= c . x + c . width ? d . x : f . getRoutingCenterX ( c ) , mxUtils . contains ( c , a , k ) || mxUtils . contains ( b , a , k ) || e . push ( new mxPoint ( a , k ) ) , 1 == e . length && ( null != d && 1 == e . length ? mxUtils . contains ( c , d . x , k ) || mxUtils . contains ( b , d . x , k ) ||
e . push ( new mxPoint ( d . x , k ) ) : ( f = Math . max ( b . x , c . x ) , e . push ( new mxPoint ( f + ( Math . min ( b . x + b . width , c . x + c . width ) - f ) / 2 , k ) ) ) ) ) } , SegmentConnector : function ( a , b , c , d , e ) { var f = mxEdgeStyle . scalePointArray ( a . absolutePoints , a . view . scale ) ; b = mxEdgeStyle . scaleCellState ( b , a . view . scale ) ; var g = mxEdgeStyle . scaleCellState ( c , a . view . scale ) ; c = [ ] ; var k = 0 < e . length ? e [ 0 ] : null , l = ! 0 , m = f [ 0 ] ; null == m && null != b ? m = new mxPoint ( a . view . getRoutingCenterX ( b ) , a . view . getRoutingCenterY ( b ) ) : null != m && ( m = m . clone ( ) ) ; var n = f . length - 1 ; if ( null != d && 0 < d . length ) { for ( var p =
[ ] , q = 0 ; q < d . length ; q ++ ) { var r = a . view . transformControlPoint ( a , d [ q ] , ! 0 ) ; null != r && p . push ( r ) } if ( 0 == p . length ) return ; null != m && null != p [ 0 ] && ( 1 > Math . abs ( p [ 0 ] . x - m . x ) && ( p [ 0 ] . x = m . x ) , 1 > Math . abs ( p [ 0 ] . y - m . y ) && ( p [ 0 ] . y = m . y ) ) ; r = f [ n ] ; null != r && null != p [ p . length - 1 ] && ( 1 > Math . abs ( p [ p . length - 1 ] . x - r . x ) && ( p [ p . length - 1 ] . x = r . x ) , 1 > Math . abs ( p [ p . length - 1 ] . y - r . y ) && ( p [ p . length - 1 ] . y = r . y ) ) ; d = p [ 0 ] ; var t = b , u = f [ 0 ] ; var v = d ; null != u && ( t = null ) ; for ( q = 0 ; 2 > q ; q ++ ) { var y = null != u && u . x == v . x , A = null != u && u . y == v . y , z = null != t && v . y >= t . y && v . y <= t . y + t . height ,
C = null != t && v . x >= t . x && v . x <= t . x + t . width ; t = A || null == u && z ; v = y || null == u && C ; if ( 0 != q || ! ( t && v || y && A ) ) { if ( null != u && ! A && ! y && ( z || C ) ) { l = z ? ! 1 : ! 0 ; break } if ( v || t ) { l = t ; 1 == q && ( l = 0 == p . length % 2 ? t : v ) ; break } } t = g ; u = f [ n ] ; null != u && ( t = null ) ; v = p [ p . length - 1 ] ; y && A && ( p = p . slice ( 1 ) ) } l && ( null != f [ 0 ] && f [ 0 ] . y != d . y || null == f [ 0 ] && null != b && ( d . y < b . y || d . y > b . y + b . height ) ) ? c . push ( new mxPoint ( m . x , d . y ) ) : ! l && ( null != f [ 0 ] && f [ 0 ] . x != d . x || null == f [ 0 ] && null != b && ( d . x < b . x || d . x > b . x + b . width ) ) && c . push ( new mxPoint ( d . x , m . y ) ) ; l ? m . y = d . y : m . x = d . x ; for ( q = 0 ; q < p . length ; q ++ ) l =
x = null != t && v . x >= t . x && v . x <= t . x + t . width ; t = A || null == u && z ; v = y || null == u && x ; if ( 0 != q || ! ( t && v || y && A ) ) { if ( null != u && ! A && ! y && ( z || x ) ) { l = z ? ! 1 : ! 0 ; break } if ( v || t ) { l = t ; 1 == q && ( l = 0 == p . length % 2 ? t : v ) ; break } } t = g ; u = f [ n ] ; null != u && ( t = null ) ; v = p [ p . length - 1 ] ; y && A && ( p = p . slice ( 1 ) ) } l && ( null != f [ 0 ] && f [ 0 ] . y != d . y || null == f [ 0 ] && null != b && ( d . y < b . y || d . y > b . y + b . height ) ) ? c . push ( new mxPoint ( m . x , d . y ) ) : ! l && ( null != f [ 0 ] && f [ 0 ] . x != d . x || null == f [ 0 ] && null != b && ( d . x < b . x || d . x > b . x + b . width ) ) && c . push ( new mxPoint ( d . x , m . y ) ) ; l ? m . y = d . y : m . x = d . x ; for ( q = 0 ; q < p . length ; q ++ ) l =
! l , d = p [ q ] , l ? m . y = d . y : m . x = d . x , c . push ( m . clone ( ) ) } else d = m , l = ! 0 ; m = f [ n ] ; null == m && null != g && ( m = new mxPoint ( a . view . getRoutingCenterX ( g ) , a . view . getRoutingCenterY ( g ) ) ) ; null != m && null != d && ( l && ( null != f [ n ] && f [ n ] . y != d . y || null == f [ n ] && null != g && ( d . y < g . y || d . y > g . y + g . height ) ) ? c . push ( new mxPoint ( m . x , d . y ) ) : ! l && ( null != f [ n ] && f [ n ] . x != d . x || null == f [ n ] && null != g && ( d . x < g . x || d . x > g . x + g . width ) ) && c . push ( new mxPoint ( d . x , m . y ) ) ) ; if ( null == f [ 0 ] && null != b ) for ( ; 0 < c . length && null != c [ 0 ] && mxUtils . contains ( b , c [ 0 ] . x , c [ 0 ] . y ) ; ) c . splice ( 0 , 1 ) ; if ( null ==
f [ n ] && null != g ) for ( ; 0 < c . length && null != c [ c . length - 1 ] && mxUtils . contains ( g , c [ c . length - 1 ] . x , c [ c . length - 1 ] . y ) ; ) c . splice ( c . length - 1 , 1 ) ; for ( q = 0 ; q < c . length ; q ++ ) if ( f = c [ q ] , f . x = Math . round ( f . x * a . view . scale * 10 ) / 10 , f . y = Math . round ( f . y * a . view . scale * 10 ) / 10 , null == k || 1 <= Math . abs ( k . x - f . x ) || Math . abs ( k . y - f . y ) >= Math . max ( 1 , a . view . scale ) ) e . push ( f ) , k = f ; null != r && null != e [ e . length - 1 ] && 1 >= Math . abs ( r . x - e [ e . length - 1 ] . x ) && 1 >= Math . abs ( r . y - e [ e . length - 1 ] . y ) && ( e . splice ( e . length - 1 , 1 ) , null != e [ e . length - 1 ] && ( 1 > Math . abs ( e [ e . length - 1 ] . x - r . x ) &&
( e [ e . length - 1 ] . x = r . x ) , 1 > Math . abs ( e [ e . length - 1 ] . y - r . y ) && ( e [ e . length - 1 ] . y = r . y ) ) ) } , orthBuffer : 10 , orthPointsFallback : ! 0 , dirVectors : [ [ - 1 , 0 ] , [ 0 , - 1 ] , [ 1 , 0 ] , [ 0 , 1 ] , [ - 1 , 0 ] , [ 0 , - 1 ] , [ 1 , 0 ] ] , wayPoints1 : [ [ 0 , 0 ] , [ 0 , 0 ] , [ 0 , 0 ] , [ 0 , 0 ] , [ 0 , 0 ] , [ 0 , 0 ] , [ 0 , 0 ] , [ 0 , 0 ] , [ 0 , 0 ] , [ 0 , 0 ] , [ 0 , 0 ] , [ 0 , 0 ] ] , routePatterns : [ [ [ 513 , 2308 , 2081 , 2562 ] , [ 513 , 1090 , 514 , 2184 , 2114 , 2561 ] , [ 513 , 1090 , 514 , 2564 , 2184 , 2562 ] , [ 513 , 2308 , 2561 , 1090 , 514 , 2568 , 2308 ] ] , [ [ 514 , 1057 , 513 , 2308 , 2081 , 2562 ] , [ 514 , 2184 , 2114 , 2561 ] , [ 514 , 2184 , 2562 , 1057 , 513 , 2564 , 2184 ] , [ 514 , 1057 , 513 , 2568 , 2308 ,
2561 ] ] , [ [ 1090 , 514 , 1057 , 513 , 2308 , 2081 , 2562 ] , [ 2114 , 2561 ] , [ 1090 , 2562 , 1057 , 513 , 2564 , 2184 ] , [ 1090 , 514 , 1057 , 513 , 2308 , 2561 , 2568 ] ] , [ [ 2081 , 2562 ] , [ 1057 , 513 , 1090 , 514 , 2184 , 2114 , 2561 ] , [ 1057 , 513 , 1090 , 514 , 2184 , 2562 , 2564 ] , [ 1057 , 2561 , 1090 , 514 , 2568 , 2308 ] ] ] , inlineRoutePatterns : [ [ null , [ 2114 , 2568 ] , null , null ] , [ null , [ 514 , 2081 , 2114 , 2568 ] , null , null ] , [ null , [ 2114 , 2561 ] , null , null ] , [ [ 2081 , 2562 ] , [ 1057 , 2114 , 2568 ] , [ 2184 , 2562 ] , null ] ] , vertexSeperations : [ ] , limits : [ [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ] , [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ] ] , LEFT _MASK : 32 , TOP _MASK : 64 , RIGHT _MASK : 128 ,
BOTTOM _MASK : 256 , LEFT : 1 , TOP : 2 , RIGHT : 4 , BOTTOM : 8 , SIDE _MASK : 480 , CENTER _MASK : 512 , SOURCE _MASK : 1024 , TARGET _MASK : 2048 , VERTEX _MASK : 3072 , getJettySize : function ( a , b ) { var c = mxUtils . getValue ( a . style , b ? mxConstants . STYLE _SOURCE _JETTY _SIZE : mxConstants . STYLE _TARGET _JETTY _SIZE , mxUtils . getValue ( a . style , mxConstants . STYLE _JETTY _SIZE , mxEdgeStyle . orthBuffer ) ) ; "auto" == c && ( mxUtils . getValue ( a . style , b ? mxConstants . STYLE _STARTARROW : mxConstants . STYLE _ENDARROW , mxConstants . NONE ) != mxConstants . NONE ? ( a = mxUtils . getNumber ( a . style , b ? mxConstants . STYLE _STARTSIZE :
mxConstants . STYLE _ENDSIZE , mxConstants . DEFAULT _MARKERSIZE ) , c = Math . max ( 2 , Math . ceil ( ( a + mxEdgeStyle . orthBuffer ) / mxEdgeStyle . orthBuffer ) ) * mxEdgeStyle . orthBuffer ) : c = 2 * mxEdgeStyle . orthBuffer ) ; return c } , scalePointArray : function ( a , b ) { var c = [ ] ; if ( null != a ) for ( var d = 0 ; d < a . length ; d ++ ) if ( null != a [ d ] ) { var e = new mxPoint ( Math . round ( a [ d ] . x / b * 10 ) / 10 , Math . round ( a [ d ] . y / b * 10 ) / 10 ) ; c [ d ] = e } else c [ d ] = null ; else c = null ; return c } , scaleCellState : function ( a , b ) { if ( null != a ) { var c = a . clone ( ) ; c . setRect ( Math . round ( a . x / b * 10 ) / 10 , Math . round ( a . y /
b * 10 ) / 10 , Math . round ( a . width / b * 10 ) / 10 , Math . round ( a . height / b * 10 ) / 10 ) } else c = null ; return c } , OrthConnector : function ( a , b , c , d , e ) { var f = a. view . graph , g = null == l ? ! 1 : f . getModel ( ) . isEdge ( l . cell ) , k = null == m ? ! 1 : f . getModel ( ) . isEdge ( m . cell ) ; f = mxEdgeStyle. scalePointArray ( a . absolutePoints , a . view . scale ) ;var l = mxEdgeStyle . scaleCellState ( b , a . view . scale ) , m = mxEdgeStyle . scaleCellState ( c , a . view . scale ) , n= f [ 0 ] , p = f [ f . length - 1 ] , q = null != l ? l . x : n . x , r = null != l ? l . y : n . y , t = null != l ? l . width : 1 , u = null != l ? l . height : 1 , v = null != m ? m . x : p . x , y = null !=
m ? m . y : p . y , A = null != m ? m . width : 1 , z = null != m ? m . height : 1 ; f = mxEdgeStyle . getJettySize ( a , ! 0 ) ; var C = mxEdgeStyle . getJettySize ( a , ! 1 ) ; null != l&& m == l && ( f = C = Math . max ( f , C ) ) ; var B = C + f , x = ! 1 ; if ( null != n&& null != p ) { x = p . x - n . x ; var D = p . y - n . y ; x = x * x + D * D < B * B } if ( x || mxEdgeStyle . orthPointsFallback && null != d && 0 < d . length || g || k ) mxEdgeStyle . SegmentConnector ( a , b , c , d , e ) ; else if ( c = [ mxConstants . DIRECTION _MASK _ALL , mxConstants . DIRECTION _MASK _ALL ] , null != l && ( c [ 0 ] = mxUtils . getPortConstraints ( l , a , ! 0 , mxConstants . DIRECTION _MASK _ALL ) , b = mxUtils . getValue ( l. style ,
mxConstants . STYLE _ROTATION , 0 ) , 0 != b && ( b = mxUtils . getBoundingBox ( new mxRectangle ( q , r , t , u ) , b ) , q = b . x , r = b . y , t = b . width , u = b . height ) ) , null != m && ( c [ 1 ] = mxUtils . getPortConstraints ( m , a , ! 1 , mxConstants . DIRECTION _MASK _ALL ) , b = mxUtils . getValue ( m . style , mxConstants . STYLE _ROTATION , 0 ) , 0 != b && ( b = mxUtils . getBoundingBox ( new mxRectangle ( v, y , A , z ) , b ) , v = b . x , y = b . y , A = b . width , z = b . height ) ) , 0 != t && 0 != u && 0 != A && 0 != z ) { b = [ 0 , 0 ] ; q = [ [ q , r , t , u ] , [ v , y , A , z ] ] ; C = [ f , C ] ; for ( x = 0 ; 2 > x ; x ++ ) mxEdgeStyle . limits [ x ] [ 1 ] = q[ x ] [ 0 ] - C [ x ] , mxEdgeStyle . limits [ x ] [ 2] =
q[ x ] [ 1 ] - C [ x ] , mxEdgeStyle . limits [ x ] [ 4 ] = q [ x ] [ 0 ] + q [ x ] [ 2 ] + C [ x ] , mxEdgeStyle . limits [ x ] [ 8 ] = q [ x ] [ 1 ] + q [ x ] [ 3 ] + C [ x ] ; C = q [ 0 ] [ 1 ] + q [ 0 ] [ 3 ] / 2 ; r = q [ 1 ] [ 1 ] + q [ 1 ] [ 3 ] / 2 ; x = q[ 0 ] [ 0 ] + q [ 0 ] [ 2 ] / 2 - ( q [ 1 ] [ 0 ] + q [ 1 ] [ 2 ] / 2 ) ; D = C - r ; C = 0 ; 0 > x ? C = 0 > D ? 2 : 1 : 0 >= D && ( C = 3 , 0 == x && ( C = 2 ) ) ; r = null ; null != l && ( r = n ) ; l = [ [ . 5 , . 5 ] , [ . 5 , . 5 ] ] ; for ( x = 0 ; 2 > x ; x ++ ) null != r && ( l [ x ] [ 0 ] = ( r. x - q [ x ] [ 0 ] ) / q [ x ] [ 2 ] , 1 >= Math . abs ( r. x - q [ x ] [ 0 ] ) ? b [ x ] = mxConstants . DIRECTION _MASK _WEST : 1 >= Math . abs ( r. x - q [ x ] [ 0 ] - q [ x ] [ 2 ] ) && ( b [ x ] = mxConstants . DIRECTION _MASK _EAST ) , l [ x ] [ 1 ] = ( r. y - q [ x ] [ 1 ] ) / q [ x ] [ 3 ] , 1 >= Math . abs ( r. y -
q [ x ] [ 1 ] ) ? b [ x ] = mxConstants . DIRECTION _MASK _NORTH : 1 >= Math . abs ( r . y - q [ x ] [ 1 ] - q [ x ] [ 3 ] ) && ( b [ x ] = mxConstants . DIRECTION _MASK _SOUTH ) ) , r= null , null != m && ( r = p ) ; x = q [ 0 ] [ 1 ] - ( q [ 1 ] [ 1 ] + q [ 1 ] [ 3 ] ) ; p = q [ 0 ] [ 0 ] - ( q [ 1 ] [ 0 ] + q [ 1 ] [ 2 ] ) ; r = q [ 1 ] [ 1 ] - ( q [ 0 ] [ 1 ] + q [ 0 ] [ 3 ] ) ; t = q [ 1 ] [ 0 ] - ( q [ 0 ] [ 0 ] + q [ 0 ] [ 2 ] ) ; mxEdgeStyle . vertexSeperations [ 1 ] = Math . max ( p- B , 0 ) ; mxEdgeStyle . vertexSeperations [ 2 ] = Math . max ( x - B , 0 ) ; mxEdgeStyle . vertexSeperations [ 4 ] = Math . max ( r- B , 0 ) ; mxEdgeStyle . vertexSeperations [ 3 ] = Math . max ( t- B , 0 ) ; B = [ ] ; m = [ ] ; n = [ ] ; m [ 0 ] = p >= t ? mxConstants . DIRECTION _MASK _WEST :
mxConstants . DIRECTION _MASK _EAST ; n [ 0 ] = x >= r ? mxConstants . DIRECTION _MASK _NORTH : mxConstants . DIRECTION _MASK _SOUTH ; m [ 1 ] = mxUtils . reversePortConstraints ( m[ 0 ] ) ; n [ 1 ] = mxUtils . reversePortConstraints ( n[ 0 ] ) ; p = p >= t ? p : t ; r = x >= r ? x : r ; t = [ [ 0 , 0 ] , [ 0 , 0 ] ] ; u = ! 1 ; for ( x = 0 ; 2 > x ; x ++ ) 0 == b [ x ] && ( 0 == ( m [ x ] & c [ x ] ) && ( m [ x ] = mxUtils . reversePortConstraints ( m[ x ] ) ) , 0 == ( n [ x ] & c [ x ] ) && ( n [ x ] = mxUtils . reversePortConstraints ( n[ x ] ) ) , t [ x ] [ 0 ] = n [ x ] , t [ x ] [ 1 ] = m [ x ] ) ; 0 < r && 0 < p && ( 0 < ( m [ 0 ] & c [ 0 ] ) && 0 < ( n [ 1 ] & c [ 1 ] ) ? ( t[ 0 ] [ 0 ] = m [ 0 ] , t [ 0 ] [ 1 ] = n [ 0 ] , t [ 1 ] [ 0 ] = n [ 1 ] , t [ 1 ] [ 1 ] = m [ 1 ] ,
u= ! 0 ) : 0 < ( n [ 0 ] & c [ 0 ] ) && 0 < ( m [ 1 ] & c [ 1 ] ) && ( t [ 0 ] [ 0 ] = n [ 0 ] , t [ 0 ] [ 1 ] = m [ 0 ] , t [ 1 ] [ 0 ] = m [ 1 ] , t [ 1 ] [ 1 ] = n [ 1 ] , u = ! 0 ) ) ; 0 < r && ! u && ( t [ 0 ] [ 0 ] = n [ 0 ] , t [ 0 ] [ 1 ] = m [ 0 ] , t [ 1 ] [ 0 ] = n [ 1 ] , t [ 1 ] [ 1 ] = m [ 1 ] , u = ! 0 ) ; 0 < p && ! u && ( t [ 0 ] [ 0 ] = m [ 0 ] , t [ 0 ] [ 1 ] = n [ 0 ] , t [ 1 ] [ 0 ] = m [ 1 ] , t [ 1 ] [ 1 ] = n [ 1 ] ) ; for ( x = 0 ; 2 > x ; x ++ ) 0 == b [ x ] && ( 0 == ( t [ x ] [ 0 ] & c [ x ] ) && ( t[ x ] [ 0 ] = t [ x ] [ 1 ] ) , B [ x ] = t [ x ] [ 0 ] & c [ x ] , B[ x ] |= ( t [ x ] [ 1 ] & c [ x ] ) << 8 , B[ x ] |= ( t [ 1 - x ] [ x ] & c [ x ] ) << 16 , B[ x ] |= ( t [ 1 - x ] [ 1 - x ] & c [ x ] ) << 24 , 0 == ( B[ x ] & 15 ) && ( B [ x ] <<= 8 ) , 0 == ( B[ x ] & 3840 ) && ( B [ x ] = B [ x ] & 15 | B [ x ] >> 8 ) , 0 == ( B[ x ] & 983040 ) && ( B [ x ] = B [ x ] & 65535 | ( B [ x ] & 251658240 ) >>
8 ) , b [ x ] = B [ x ] & 15 , c [ x ] == mxConstants . DIRECTION _MASK _WEST || c [ x ] == mxConstants . DIRECTION _MASK _NORTH || c [ x ] == mxConstants . DIRECTION _MASK _EAST || c [ x ] == mxConstants . DIRECTION _MASK _SOUTH ) && ( b [ x ] = c [ x ] ) ; c = b [ 0 ] == mxConstants . DIRECTION _MASK _EAST ? 3 : b [ 0 ] ; B = b [ 1 ] == mxConstants . DIRECTION _MASK _EAST ? 3 : b [ 1 ] ; c -= C; B -= C ; 1 > c && ( c += 4 ) ; 1 > B&& ( B += 4 ) ; c = mxEdgeStyle . routePatterns [ c - 1 ] [ B - 1 ] ; mxEdgeStyle . wayPoints1 [ 0 ] [ 0 ] = q [ 0 ] [ 0 ] ; mxEdgeStyle . wayPoints1 [ 0 ] [ 1 ] = q [ 0 ] [ 1 ] ; switch ( b [ 0 ] ) { case mxConstants . DIRECTION _MASK _WEST : mxEdgeStyle . wayPoints1 [ 0 ] [ 0 ] -=
f; mxEdgeStyle . wayPoints1 [ 0 ] [ 1 ] += l [ 0 ] [ 1 ] * q [ 0 ] [ 3 ] ; break ; case mxConstants . DIRECTION _MASK _SOUTH : mxEdgeStyle . wayPoints1 [ 0 ] [ 0 ] += l [ 0 ] [ 0 ] * q [ 0 ] [ 2 ] ; mxEdgeStyle . wayPoints1 [ 0 ] [ 1 ] += q[ 0 ] [ 3 ] + f ; break ; case mxConstants . DIRECTION _MASK _EAST : mxEdgeStyle . wayPoints1 [ 0 ] [ 0 ] += q[ 0 ] [ 2 ] + f ; mxEdgeStyle . wayPoints1 [ 0 ] [ 1 ] += l [ 0 ] [ 1 ] * q [ 0 ] [ 3 ] ; break ; case mxConstants . DIRECTION _MASK _NORTH : mxEdgeStyle . wayPoints1 [ 0 ] [ 0 ] += l [ 0 ] [ 0 ] * q [ 0 ] [ 2 ] , mxEdgeStyle . wayPoints1 [ 0 ] [ 1 ] -= f} f = 0 ; m = B = 0 < ( b [ 0 ] & ( mxConstants . DIRECTION _MASK _EAST | mxConstants . DIRECTION _MASK _WEST ) ) ?
0: 1 ; for ( x = 0 ; x < c . length ; x ++ ) n = c [ x ] & 15 , u = n == mxConstants . DIRECTION _MASK _EAST ? 3 : n , u += C , 4 < u && ( u -= 4 ) , p = mxEdgeStyle . dirVectors [ u - 1 ] , n = 0 < u % 2 ? 0 : 1 , n != B && ( f ++ , mxEdgeStyle . wayPoints1 [ f ] [ 0 ] = mxEdgeStyle . wayPoints1 [ f - 1 ] [ 0 ] , mxEdgeStyle . wayPoints1 [ f ] [ 1 ] = mxEdgeStyle . wayPoints1 [ f- 1 ] [ 1 ] ) , v = 0 < ( c [ x ] & mxEdgeStyle . TARGET _MASK ) , y = 0 < ( c [ x ] & mxEdgeStyle . SOURCE _MASK ) , r = ( c [ x ] & mxEdgeStyle . SIDE _MASK ) >> 5 , r<<= C , 15 < r && ( r >>= 4 ) , t = 0 < ( c [ x ] & mxEdgeStyle . CENTER _MASK ) , ( y|| v ) && 9 > r ? ( u = y ? 0 : 1 , r = t && 0 == n ? q [ u ] [ 0 ] + l [ u ] [ 0 ] * q [ u ] [ 2 ] : t ? q [ u ] [ 1 ] + l [ u ] [ 1 ] *
q [ u ] [ 3 ] : mxEdgeStyle . limits [ u ] [ r ] , 0 == n ? ( r = ( r - mxEdgeStyle . wayPoints1 [ f] [ 0 ] ) * p [ 0 ] , 0 < r && ( mxEdgeSt yle. wayPoints1 [ f ] [ 0 ] += p [ 0 ] * r ) ) : ( r = ( r - mxEdgeStyle . wayPoints1 [ f ] [ 1 ] ) * p[ 1 ] , 0 < r && ( mxEdgeStyle . wayPoints1 [ f ] [ 1 ] += p [ 1 ] * r ) ) ) : t && ( mxEdgeStyle . wayPoints1 [ f ] [ 0 ] += p [ 0 ] * Math . abs ( mxEdgeStyle . vertexSeperations [ u ] / 2 ) , mxEdgeStyle . wayPoints1 [ f] [ 1 ] += p [ 1 ] * Math . abs ( mxEdgeStyle . vertexSeperations [ u] / 2 ) ) , 0 < f && mxEdgeStyle . wayPoints1 [ f ] [ n ] == mxEdgeStyle . wayPoints1 [ f - 1 ] [ n ] ? f -- : B = n ; for ( x = 0 ; x <= f && ( x != f || ( ( 0 < ( b [ 1 ] & ( mxConstants . DIRECTION _MASK _EAST |
mxConstants . DIRECTION _MASK _WEST ) ) ? 0 : 1 ) == m ? 0 : 1 ) == ( f + 1 ) % 2 ) ; x ++ ) e . push ( new mxPoint ( Math . round ( mxEdgeStyle . wayPoints1 [ x ] [ 0 ] * a . view . scale * 10 ) / 10 , Math . round ( mxEdgeStyle . wayPoints1 [ x ] [ 1 ] * a . view . scale * 10 ) / 10 ) ) ; for ( a = 1 ; a < e . length ; ) null == e [ a - 1 ] || null == e [ a ] || e [ a - 1 ] . x != e [ a ] . x || e [ a - 1 ] . y != e [ a ] . y ? a ++ : e . splice ( a , 1 ) } } , getRoutePattern : function ( a , b , c , d ) { var e = a [ 0 ] == mxConstants . DIRECTION _MASK _EAST ? 3 : a [ 0 ] ; a = a [ 1 ] == mxConstants . DIRECTION _MASK _EAST ? 3 : a [ 1 ] ; e -= b ; a -= b ; 1 > e && ( e += 4 ) ; 1 > a && ( a += 4 ) ; b = routePatterns [ e - 1 ] [ a - 1 ] ; 0 != c &&
0 != d || null == inlineRoutePatterns [ e - 1 ] [ a - 1 ] || ( b = inlineRoutePatterns [ e - 1 ] [ a - 1 ] ) ; return b } } , mxStyleRegistry = { values : [ ] , putValue : function ( a , b ) { mxStyleRegistry . values [ a ] = b } , getValue : function ( a ) { return mxStyleRegistry . values [ a ] } , getName : function ( a ) { for ( var b in mxStyleRegistry . values ) if ( mxStyleRegistry . values [ b ] == a ) return b ; return null } } ; mxStyleRegistry . putValue ( mxConstants . EDGESTYLE _ELBOW , mxEdgeStyle . ElbowConnector ) ; mxStyleRegistry . putValue ( mxConstants . EDGESTYLE _ENTITY _RELATION , mxEdgeStyle . EntityRelation ) ;
mxStyleRegistry . putValue ( mxConstants . EDGESTYLE _LOOP , mxEdgeStyle . Loop ) ; mxStyleRegistry . putValue ( mxConstants . EDGESTYLE _SIDETOSIDE , mxEdgeStyle . SideToSide ) ; mxStyleRegistry . putValue ( mxConstants . EDGESTYLE _TOPTOBOTTOM , mxEdgeStyle . TopToBottom ) ; mxStyleRegistry . putValue ( mxConstants . EDGESTYLE _ORTHOGONAL , mxEdgeStyle . OrthConnector ) ; mxStyleRegistry . putValue ( mxConstants . EDGESTYLE _SEGMENT , mxEdgeStyle . SegmentConnector ) ; mxStyleRegistry . putValue ( mxConstants . PERIMETER _ELLIPSE , mxPerimeter . EllipsePerimeter ) ;
mxStyleRegistry . putValue ( mxConstants . PERIMETER _RECTANGLE , mxPerimeter . RectanglePerimeter ) ; mxStyleRegistry . putValue ( mxConstants . PERIMETER _RHOMBUS , mxPerimeter . RhombusPerimeter ) ; mxStyleRegistry . putValue ( mxConstants . PERIMETER _TRIANGLE , mxPerimeter . TrianglePerimeter ) ; mxStyleRegistry . putValue ( mxConstants . PERIMETER _HEXAGON , mxPerimeter . HexagonPerimeter ) ; function mxGraphView ( a ) { this . graph = a ; this . translate = new mxPoint ; this . graphBounds = new mxRectangle ; this . states = new mxDictionary } mxGraphView . prototype = new mxEventSource ;
mxGraphView . prototype . constructor = mxGraphView ; mxGraphView . prototype . EMPTY _POINT = new mxPoint ; mxGraphView . prototype . doneResource = "none" != mxClient . language ? "done" : "" ; mxGraphView . prototype . updatingDocumentResource = "none" != mxClient . language ? "updatingDocument" : "" ; mxGraphView . prototype . allowEval = ! 1 ; mxGraphView . prototype . captureDocumentGesture = ! 0 ; mxGraphView . prototype . rendering = ! 0 ; mxGraphView . prototype . graph = null ; mxGraphView . prototype . currentRoot = null ; mxGraphView . prototype . graphBounds = null ;
mxGraphView . prototype . scale = 1 ; mxGraphView . prototype . translate = null ; mxGraphView . prototype . states = null ; mxGraphView . prototype . updateStyle = ! 1 ; mxGraphView . prototype . lastNode = null ; mxGraphView . prototype . lastHtmlNode = null ; mxGraphView . prototype . lastForegroundNode = null ; mxGraphView . prototype . lastForegroundHtmlNode = null ; mxGraphView . prototype . getGraphBounds = function ( ) { return this . graphBounds } ; mxGraphView . prototype . setGraphBounds = function ( a ) { this . graphBounds = a } ;
b * 10 ) / 10 , Math . round ( a . width / b * 10 ) / 10 , Math . round ( a . height / b * 10 ) / 10 ) } else c = null ; return c } , OrthConnector : function ( a , b , c , d , e ) { var f = mxEdgeStyle. scalePointArray ( a . absolutePoints , a . view . scale ) ,g = mxEdgeStyle . scaleCellState ( b , a . view . scale ) , k = mxEdgeStyle . scaleCellState ( c , a . view . scale ) , l= f [ 0 ] , m = f [ f . length - 1 ] ; f = null != g ? g . x : l . x ; var n = null != g ? g . y : l . y , p = null != g ? g . width : 1 , q = null != g ? g . height : 1 , r = null != k ? k . x : m . x , t = null != k ? k . y : m . y , u = null != k ? k . width : 1 , v = null != k ? k . height : 1 , y = mxEdgeStyle . getJettySize ( a , ! 0 ) , A = mxEdgeStyle . getJettySize ( a ,
! 1 ) ; null != g&& k == g && ( y = A = Math . max ( y , A ) ) ; var z = A + y , x = ! 1 ; if ( null != l&& null != m ) { x = m . x - l . x ; var B = m . y - l . y ; x = x * x + B * B < z * z } if ( x || mxEdgeStyle . orthPointsFallback && null != d && 0 < d . length ) mxEdgeStyle . SegmentConnector ( a , b , c , d , e ) ; else if ( c = [ mxConstants . DIRECTION _MASK _ALL , mxConstants . DIRECTION _MASK _ALL ] , null != g && ( c [ 0 ] = mxUtils . getPortConstraints ( g , a , ! 0 , mxConstants . DIRECTION _MASK _ALL ) , b = mxUtils . getValue ( g. style , mxConstants . STYLE _ROTATION , 0 ) , 0 != b && ( b = mxUtils . getBoundingBox ( new mxRectangle ( f , n , p , q ) , b ) , f = b . x , n = b . y , p = b . width ,
q = b . height ) ) , null != k && ( c [ 1 ] = mxUtils . getPortConstraints ( k , a , ! 1 , mxConstants . DIRECTION _MASK _ALL ) , b = mxUtils . getValue ( k . style , mxConstants . STYLE _ROTATION , 0 ) , 0 != b && ( b = mxUtils . getBoundingBox ( new mxRectangle ( r, t , u , v ) , b ) , r = b . x , t = b . y , u = b . width , v = b . height ) ) , 0 != p && 0 != q && 0 != u && 0 != v ) { b = [ 0 , 0 ] ; f = [ [ f , n , p , q ] , [ r , t , u , v ] ] ; A = [ y , A ] ; for ( x = 0 ; 2 > x ; x ++ ) mxEdgeStyle . limits [ x ] [ 1 ] = f[ x ] [ 0 ] - A [ x ] , mxEdgeStyle . limits [ x ] [ 2 ] = f [ x ] [ 1 ] - A [ x ] , mxEdgeStyle . limits [ x ] [ 4] = f [ x ] [ 0 ] + f [ x ] [ 2] +A [ x ] , mxEdgeStyle . limits [ x ] [ 8 ] =f [ x ] [ 1 ] + f [ x ] [ 3 ] + A [ x ] ; A = f [ 0 ] [ 1 ] +
f[ 0 ] [ 3 ] / 2 ; n = f [ 1 ] [ 1 ] + f [ 1 ] [ 3 ] / 2 ; x = f[ 0 ] [ 0 ] + f [ 0 ] [ 2 ] / 2 - ( f [ 1 ] [ 0 ] + f [ 1 ] [ 2 ] / 2 ) ; B = A - n ; A = 0 ; 0 > x ? A = 0 > B ? 2 : 1 : 0 >= B && ( A = 3 , 0 == x && ( A = 2 ) ) ; n = null ; null != g && ( n = l ) ; l = [ [ . 5 , . 5 ] , [ . 5 , . 5 ] ] ; g || ( l [ 0 ] = [ 0 , 0 ] ) ; k || ( l [ 1 ] = [ 0 , 0 ] ) ; for ( x = 0 ; 2 > x ; x ++ ) null != n && ( l [ x ] [ 0 ] = ( n. x - f [ x ] [ 0 ] ) / f [ x ] [ 2 ] , 1 >= Math . abs ( n. x - f [ x ] [ 0 ] ) ? b [ x ] = mxConstants . DIRECTION _MASK _WEST : 1 >= Math . abs ( n. x - f [ x ] [ 0 ] - f [ x ] [ 2 ] ) && ( b [ x ] = mxConstants . DIRECTION _MASK _EAST ) , l [ x ] [ 1 ] = ( n. y - f [ x ] [ 1 ] ) / f [ x ] [ 3 ] , 1 >= Math . abs ( n. y - f [ x ] [ 1 ] ) ? b [ x ] = mxConstants . DIRECTION _MASK _NORTH : 1 >= Math . abs ( n . y - f [ x ] [ 1 ] - f [ x ] [ 3 ] ) &&
( b [ x ] = mxConstants . DIRECTION _MASK _SOUTH ) ) , n= null , null != k && ( n = m ) ; x = f [ 0 ] [ 1 ] - ( f [ 1 ] [ 1 ] + f [ 1 ] [ 3 ] ) ; m = f [ 0 ] [ 0 ] - ( f [ 1 ] [ 0 ] + f [ 1 ] [ 2 ] ) ; n = f [ 1 ] [ 1 ] - ( f [ 0 ] [ 1 ] + f [ 0 ] [ 3 ] ) ; p = f [ 1 ] [ 0 ] - ( f [ 0 ] [ 0 ] + f [ 0 ] [ 2 ] ) ; mxEdgeStyle . vertexSeperations [ 1 ] = Math . max ( m- z , 0 ) ; mxEdgeStyle . vertexSeperations [ 2 ] = Math . max ( x - z , 0 ) ; mxEdgeStyle . vertexSeperations [ 4 ] = Math . max ( n- z , 0 ) ; mxEdgeStyle . vertexSeperations [ 3 ] = Math . max ( p- z , 0 ) ; z = [ ] ; g = [ ] ; k = [ ] ; g [ 0 ] = m >= p ? mxConstants . DIRECTION _MASK _WEST : mxConstants . DIRECTION _MASK _EAST ; k [ 0 ] = x >= n ? mxConstants . DIRECTION _MASK _NORTH :
mxConstants . DIRECTION _MASK _SOUTH ; g [ 1 ] = mxUtils . reversePortConstraints ( g[ 0 ] ) ; k [ 1 ] = mxUtils . reversePortConstraints ( k[ 0 ] ) ; m = m >= p ? m : p ; n = x >= n ? x : n ; p = [ [ 0 , 0 ] , [ 0 , 0 ] ] ; q = ! 1 ; for ( x = 0 ; 2 > x ; x ++ ) 0 == b [ x ] && ( 0 == ( g [ x ] & c [ x ] ) && ( g [ x ] = mxUtils . reversePortConstraints ( g[ x ] ) ) , 0 == ( k [ x ] & c [ x ] ) && ( k [ x ] = mxUtils . reversePortConstraints ( k[ x ] ) ) , p [ x ] [ 0 ] = k [ x ] , p [ x ] [ 1 ] = g [ x ] ) ; 0 < n && 0 < m && ( 0 < ( g [ 0 ] & c [ 0 ] ) && 0 < ( k [ 1 ] & c [ 1 ] ) ? ( p[ 0 ] [ 0 ] = g [ 0 ] , p [ 0 ] [ 1 ] = k [ 0 ] , p [ 1 ] [ 0 ] = k [ 1 ] , p [ 1 ] [ 1 ] = g [ 1 ] , q = ! 0 ) : 0 < ( k [ 0 ] & c [ 0 ] ) && 0 < ( g [ 1 ] & c [ 1 ] ) && ( p [ 0 ] [ 0 ] = k [ 0 ] , p [ 0 ] [ 1 ] = g [ 0 ] , p [ 1 ] [ 0 ] = g [ 1 ] ,
p[ 1 ] [ 1 ] = k [ 1 ] , q = ! 0 ) ) ; 0 < n && ! q && ( p [ 0 ] [ 0 ] = k [ 0 ] , p [ 0 ] [ 1 ] = g [ 0 ] , p [ 1 ] [ 0 ] = k [ 1 ] , p [ 1 ] [ 1 ] = g [ 1 ] , q = ! 0 ) ; 0 < m && ! q && ( p [ 0 ] [ 0 ] = g [ 0 ] , p [ 0 ] [ 1 ] = k [ 0 ] , p [ 1 ] [ 0 ] = g [ 1 ] , p [ 1 ] [ 1 ] = k [ 1 ] ) ; for ( x = 0 ; 2 > x ; x ++ ) 0 == b [ x ] && ( 0 == ( p [ x ] [ 0 ] & c [ x ] ) && ( p[ x ] [ 0 ] = p [ x ] [ 1 ] ) , z [ x ] = p [ x ] [ 0 ] & c [ x ] , z[ x ] |= ( p [ x ] [ 1 ] & c [ x ] ) << 8 , z[ x ] |= ( p [ 1 - x ] [ x ] & c [ x ] ) << 16 , z[ x ] |= ( p [ 1 - x ] [ 1 - x ] & c [ x ] ) << 24 , 0 == ( z[ x ] & 15 ) && ( z [ x ] <<= 8 ) , 0 == ( z[ x ] & 3840 ) && ( z [ x ] = z [ x ] & 15 | z [ x ] >> 8 ) , 0 == ( z[ x ] & 983040 ) && ( z [ x ] = z [ x ] & 65535 | ( z [ x ] & 251658240 ) >> 8 ) , b [ x ] = z [ x ] & 15 , c [ x ] == mxConstants . DIRECTION _MASK _WEST || c [ x ] == mxConstants . DIRECTION _MASK _NORTH ||
c [ x ] == mxConstants . DIRECTION _MASK _EAST || c [ x ] == mxConstants . DIRECTION _MASK _SOUTH ) && ( b [ x ] = c [ x ] ) ; c = b [ 0 ] == mxConstants . DIRECTION _MASK _EAST ? 3 : b [ 0 ] ; z = b [ 1 ] == mxConstants . DIRECTION _MASK _EAST ? 3 : b [ 1 ] ; c -= A; z -= A ; 1 > c && ( c += 4 ) ; 1 > z&& ( z += 4 ) ; c = mxEdgeStyle . routePatterns [ c - 1 ] [ z - 1 ] ; mxEdgeStyle . wayPoints1 [ 0 ] [ 0 ] = f [ 0 ] [ 0 ] ; mxEdgeStyle . wayPoints1 [ 0 ] [ 1 ] = f [ 0 ] [ 1 ] ; switch ( b [ 0 ] ) { case mxConstants . DIRECTION _MASK _WEST : mxEdgeStyle . wayPoints1 [ 0 ] [ 0 ] -= y ; mxEdgeStyle . wayPoints1 [ 0 ] [ 1 ] += l [ 0 ] [ 1 ] * f [ 0 ] [ 3 ] ; break ; case mxConstants . DIRECTION _MASK _SOUTH : mxEdgeStyle . wayPoints1 [ 0 ] [ 0 ] +=
l[ 0 ] [ 0 ] * f [ 0 ] [ 2 ] ; mxEdgeStyle . wayPoints1 [ 0 ] [ 1 ] += f[ 0 ] [ 3 ] + y ; break ; case mxConstants . DIRECTION _MASK _EAST : mxEdgeStyle . wayPoints1 [ 0 ] [ 0 ] += f[ 0 ] [ 2 ] + y ; mxEdgeStyle . wayPoints1 [ 0 ] [ 1 ] += l [ 0 ] [ 1 ] * f [ 0 ] [ 3 ] ; break ; case mxConstants . DIRECTION _MASK _NORTH : mxEdgeStyle . wayPoints1 [ 0 ] [ 0 ] += l [ 0 ] [ 0 ] * f [ 0 ] [ 2 ] , mxEdgeStyle . wayPoints1 [ 0 ] [ 1 ] -= y} y = 0 ; g = z = 0 < ( b [ 0 ] & ( mxConstants . DIRECTION _MASK _EAST | mxConstants . DIRECTION _MASK _WEST ) ) ? 0 : 1 ; for ( x = 0 ; x < c . length ; x ++ ) k = c [ x ] & 15 , q = k == mxConstants . DIRECTION _MASK _EAST ? 3 : k , q += A , 4 < q && ( q -= 4 ) , m = mxEdgeStyle . dirVectors [ q -
1] , k = 0 < q % 2 ? 0 : 1 , k != z && ( y ++ , mxEdgeStyle . wayPoints1 [ y ] [ 0 ] = mxEdgeStyle . wayPoints1 [ y - 1 ] [ 0 ] , mxEdgeStyle . wayPoints1 [ y ] [ 1 ] = mxEdgeStyle . wayPoints1 [ y- 1 ] [ 1 ] ) , r = 0 < ( c [ x ] & mxEdgeStyle . TARGET _MASK ) , t = 0 < ( c [ x ] & mxEdgeStyle . SOURCE _MASK ) , n = ( c [ x ] & mxEdgeStyle . SIDE _MASK ) >> 5 , n<<= A , 15 < n && ( n >>= 4 ) , p = 0 < ( c [ x ] & mxEdgeStyle . CENTER _MASK ) , ( t|| r ) && 9 > n ? ( q = t ? 0 : 1 , n = p && 0 == k ? f [ q ] [ 0 ] + l [ q ] [ 0 ] * f [ q ] [ 2 ] : p ? f [ q ] [ 1 ] + l [ q ] [ 1 ] * f [ q ] [ 3 ] : mxEdgeStyle . limits [ q ] [ n ] , 0 == k ? ( n = ( n - mxEdgeStyle . wayPoints1 [ y ] [ 0 ] ) * m [ 0 ] , 0 < n && ( mxEdgeStyle . wayPoints1 [ y ] [ 0 ] += m [ 0 ] * n ) ) :
( n = ( n - mxEdgeStyle . wayPoints1 [ y] [ 1 ] ) * m[ 1 ] , 0 < n && ( mxEdgeStyle . wayPoints1 [ y ] [ 1 ] += m [ 1 ] * n ) ) ) : p && ( mxEdgeStyle . wayPoints1 [ y ] [ 0 ] += m [ 0 ] * Math . abs ( mxEdgeStyle . vertexSeperations [ q ] / 2 ) , mxEdgeStyle . wayPoints1 [ y] [ 1 ] += m [ 1 ] * Math . abs ( mxEdgeStyle . vertexSeperations [ q] / 2 ) ) , 0 < y && mxEdgeStyle . wayPoints1 [ y ] [ k ] == mxEdgeStyle . wayPoints1 [ y - 1 ] [ k ] ? y -- : z = k ; for ( x = 0 ; x <= y && ( x != y || ( ( 0 < ( b [ 1 ] & ( mxConstants . DIRECTION _MASK _EAST | mxConstants . DIRECTION _MASK _WEST ) ) ? 0 : 1 ) == g ? 0 : 1 ) == ( y + 1 ) % 2 ) ; x ++ ) e . push ( new mxPoint ( Math . round ( mxEdgeStyle . wayPoints1 [ x ] [ 0 ] *
a . view . scale * 10 ) / 10 , Math . round ( mxEdgeStyle . wayPoints1 [ x ] [ 1 ] * a . view . scale * 10 ) / 10 ) ) ; for ( a = 1 ; a < e . length ; ) null == e [ a - 1 ] || null == e [ a ] || e [ a - 1 ] . x != e [ a ] . x || e [ a - 1 ] . y != e [ a ] . y ? a ++ : e . splice ( a , 1 ) } } , getRoutePattern : function ( a , b , c , d ) { var e = a [ 0 ] == mxConstants . DIRECTION _MASK _EAST ? 3 : a [ 0 ] ; a = a [ 1 ] == mxConstants . DIRECTION _MASK _EAST ? 3 : a [ 1 ] ; e -= b ; a -= b ; 1 > e && ( e += 4 ) ; 1 > a && ( a += 4 ) ; b = routePatterns [ e - 1 ] [ a - 1 ] ; 0 != c && 0 != d || null == inlineRoutePatterns [ e - 1 ] [ a - 1 ] || ( b = inlineRoutePatterns [ e - 1 ] [ a - 1 ] ) ; return b } } , mxStyleRegistry = { values : [ ] , putValue : function ( a ,
b ) { mxStyleRegistry . values [ a ] = b } , getValue : function ( a ) { return mxStyleRegistry . values [ a ] } , getName : function ( a ) { for ( var b in mxStyleRegistry . values ) if ( mxStyleRegistry . values [ b ] == a ) return b ; return null } } ; mxStyleRegistry . putValue ( mxConstants . EDGESTYLE _ELBOW , mxEdgeStyle . ElbowConnector ) ; mxStyleRegistry . putValue ( mxConstants . EDGESTYLE _ENTITY _RELATION , mxEdgeStyle . EntityRelation ) ; mxStyleRegistry . putValue ( mxConstants . EDGESTYLE _LOOP , mxEdgeStyle . Loop ) ; mxStyleRegistry . putValue ( mxConstants . EDGESTYLE _SIDETOSIDE , mxEdgeStyle . SideToSide ) ;
mxStyleRegistry . putValue ( mxConstants . EDGESTYLE _TOPTOBOTTOM , mxEdgeStyle . TopToBottom ) ; mxStyleRegistry . putValue ( mxConstants . EDGESTYLE _ORTHOGONAL , mxEdgeStyle . OrthConnector ) ; mxStyleRegistry . putValue ( mxConstants . EDGESTYLE _SEGMENT , mxEdgeStyle . SegmentConnector ) ; mxStyleRegistry . putValue ( mxConstants . PERIMETER _ELLIPSE , mxPerimeter . EllipsePerimeter ) ; mxStyleRegistry . putValue ( mxConstants . PERIMETER _RECTANGLE , mxPerimeter . RectanglePerimeter ) ; mxStyleRegistry . putValue ( mxConstants . PERIMETER _RHOMBUS , mxPerimeter . RhombusPerimeter ) ;
mxStyleRegistry . putValue ( mxConstants . PERIMETER _TRIANGLE , mxPerimeter . TrianglePerimeter ) ; mxStyleRegistry . putValue ( mxConstants . PERIMETER _HEXAGON , mxPerimeter . HexagonPerimeter ) ; function mxGraphView ( a ) { this . graph = a ; this . translate = new mxPoint ; this . graphBounds = new mxRectangle ; this . states = new mxDictionary } mxGraphView . prototype = new mxEventSource ; mxGraphView . prototype . constructor = mxGraphView ; mxGraphView . prototype . EMPTY _POINT = new mxPoint ; mxGraphView . prototype . doneResource = "none" != mxClient . language ? "done" : "" ;
mxGraphView . prototype . updatingDocumentResource = "none" != mxClient . language ? "updatingDocument" : "" ; mxGraphView . prototype . allowEval = ! 1 ; mxGraphView . prototype . captureDocumentGesture = ! 0 ; mxGraphView . prototype . rendering = ! 0 ; mxGraphView . prototype . graph = null ; mxGraphView . prototype . currentRoot = null ; mxGraphView . prototype . graphBounds = null ; mxGraphView . prototype . scale = 1 ; mxGraphView . prototype . translate = null ; mxGraphView . prototype . states = null ; mxGraphView . prototype . updateStyle = ! 1 ; mxGraphView . prototype . lastNode = null ;
mxGraphView . prototype . lastHtmlNode = null ; mxGraphView . prototype . lastForegroundNode = null ; mxGraphView . prototype . lastForegroundHtmlNode = null ; mxGraphView . prototype . getGraphBounds = function ( ) { return this . graphBounds } ; mxGraphView . prototype . setGraphBounds = function ( a ) { this . graphBounds = a } ;
mxGraphView . prototype . getBounds = function ( a ) { var b = null ; if ( null != a && 0 < a . length ) for ( var c = this . graph . getModel ( ) , d = 0 ; d < a . length ; d ++ ) if ( c . isVertex ( a [ d ] ) || c . isEdge ( a [ d ] ) ) { var e = this . getState ( a [ d ] ) ; null != e && ( null == b ? b = mxRectangle . fromRectangle ( e ) : b . add ( e ) ) } return b } ; mxGraphView . prototype . setCurrentRoot = function ( a ) { if ( this . currentRoot != a ) { var b = new mxCurrentRootChange ( this , a ) ; b . execute ( ) ; var c = new mxUndoableEdit ( this , ! 0 ) ; c . add ( b ) ; this . fireEvent ( new mxEventObject ( mxEvent . UNDO , "edit" , c ) ) ; this . graph . sizeDidChange ( ) } return a } ;
mxGraphView . prototype . scaleAndTranslate = function ( a , b , c ) { var d = this . scale , e = new mxPoint ( this . translate . x , this . translate . y ) ; if ( this . scale != a || this . translate . x != b || this . translate . y != c ) this . scale = a , this . translate . x = b , this . translate . y = c , this . isEventsEnabled ( ) && this . viewStateChanged ( ) ; this . fireEvent ( new mxEventObject ( mxEvent . SCALE _AND _TRANSLATE , "scale" , a , "previousScale" , d , "translate" , this . translate , "previousTranslate" , e ) ) } ; mxGraphView . prototype . getScale = function ( ) { return this . scale } ;
mxGraphView . prototype . setScale = function ( a ) { var b = this . scale ; this . scale != a && ( this . scale = a , this . isEventsEnabled ( ) && this . viewStateChanged ( ) ) ; this . fireEvent ( new mxEventObject ( mxEvent . SCALE , "scale" , a , "previousScale" , b ) ) } ; mxGraphView . prototype . getTranslate = function ( ) { return this . translate } ;