@ -42,57 +42,57 @@ new ActiveXObject("Microsoft.XMLDOM");a.async=!1;a.validateOnParse=!1;a.resolveE
window . getSelection ( ) . removeAllRanges ( ) } : function ( ) { } } ( ) , removeWhitespace : function ( a , b ) { for ( var c = b ? a . previousSibling : a . nextSibling ; null != c && c . nodeType == mxConstants . NODETYPE _TEXT ; ) { var d = b ? c . previousSibling : c . nextSibling , e = mxUtils . getTextContent ( c ) ; 0 == mxUtils . trim ( e ) . length && c . parentNode . removeChild ( c ) ; c = d } } , htmlEntities : function ( a , b ) { a = String ( a || "" ) ; a = a . replace ( /&/g , "&" ) ; a = a . replace ( /"/g , """ ) ; a = a . replace ( /\'/g , "'" ) ; a = a . replace ( /</g , "<" ) ; a = a . replace ( />/g , ">" ) ; if ( null == b || b ) a = a . replace ( /\n/g ,
"
" ) ; return a } , isVml : function ( a ) { return null != a && "urn:schemas-microsoft-com:vml" == a . tagUrn } , getXml : function ( a , b ) { var c = "" ; mxClient . IS _IE || mxClient . IS _IE11 ? c = mxUtils . getPrettyXml ( a , "" , "" , "" ) : null != window . XMLSerializer ? c = ( new XMLSerializer ) . serializeToString ( a ) : null != a . xml && ( c = a . xml . replace ( /\r\n\t[\t]*/g , "" ) . replace ( />\r\n/g , ">" ) . replace ( /\r\n/g , "\n" ) ) ; return c = c . replace ( /\n/g , b || "
" ) } , getPrettyXml : function ( a , b , c , d , e ) { var f = [ ] ; if ( null != a ) if ( b = null != b ? b : " " , c = null != c ? c : "" , d = null != d ? d : "\n" ,
null != a . namespaceURI && a . namespaceURI != e && ( e = a . namespaceURI , null == a . getAttribute ( "xmlns" ) && a . setAttribute ( "xmlns" , a . namespaceURI ) ) , a . nodeType == mxConstants . NODETYPE _DOCUMENT ) f . push ( mxUtils . getPrettyXml ( a . documentElement , b , c , d , e ) ) ; else if ( a . nodeType == mxConstants . NODETYPE _DOCUMENT _FRAGMENT ) { var g = a . firstChild ; if ( null != g ) for ( ; null != g ; ) f . push ( mxUtils . getPrettyXml ( g , b , c , d , e ) ) , g = g . nextSibling } else if ( a . nodeType == mxConstants . NODETYPE _COMMENT ) a = mxUtils . getTextContent ( a ) , 0 < a . length && f . push ( c + "\x3c!--" + a + "--\x3e" +
d ) ; else if ( a . nodeType == mxConstants . NODETYPE _TEXT ) a = mxUtils . getTextContent ( a ) , 0 < a . length && f . push ( c + mxUtils . htmlEntities ( mxUtils . trim ( a ) , ! 1 ) + d ) ; else { f . push ( c + "<" + a . nodeName ) ; g = a . attributes ; if ( null != g ) for ( var k = 0 ; k < g . length ; k ++ ) { var l = mxUtils . htmlEntities ( g [ k ] . value ) ; f . push ( " " + g [ k ] . nodeName + '="' + l + '"' ) } g = a . firstChild ; if ( null != g ) { for ( f . push ( ">" + d ) ; null != g ; ) f . push ( mxUtils . getPrettyXml ( g , b , c + b , d , e ) ) , g = g . nextSibling ; f . push ( c + "</" + a . nodeName + ">" + d ) } else f . push ( " />" + d ) } return f . join ( "" ) } , extractTextWithWhitespace : function ( a ) { function b ( a ) { if ( 1 !=
a . length || "BR" != a [ 0 ] . nodeName && "\n" != a [ 0 ] . innerHTML ) for ( var e = 0 ; e < a . length ; e ++ ) { var g = a [ e ] ; "BR" == g . nodeName || "\n" == g . innerHTML || ( 1 == a . length || 0 == e ) && "DIV" == g . nodeName && "<br>" == g . innerHTML . toLowerCase ( ) ? d . push ( "\n" ) : ( 3 === g . nodeType || 4 === g . nodeType ? 0 < g . nodeValue . length && d . push ( g . nodeValue ) : 8 !== g . nodeType && 0 < g . childNodes . length && b ( g . childNodes ) , e < a . length - 1 && 0 <= mxUtils . indexOf ( c , a [ e + 1 ] . nodeName ) && d . push ( "\n" ) ) } } var c = "BLOCKQUOTE DIV H1 H2 H3 H4 H5 H6 OL P PRE TABLE UL" . split ( " " ) , d = [ ] ; b ( a ) ; return d . join ( "" ) } ,
replaceTrailingNewlines : function ( a , b ) { for ( var c = "" ; 0 < a . length && "\n" == a . charAt ( a . length - 1 ) ; ) a = a . substring ( 0 , a . length - 1 ) , c += b ; return a + c } , getTextContent : function ( a ) { return mxClient . IS _IE && void 0 !== a . innerText ? a . innerText : null != a ? a [ void 0 === a . textContent ? "text" : "textContent" ] : "" } , setTextContent : function ( a , b ) { void 0 !== a . innerText ? a . innerText = b : a [ void 0 === a . textContent ? "text" : "textContent" ] = b } , getInnerHtml : function ( ) { return mxClient . IS _IE ? function ( a ) { return null != a ? a . innerHTML : "" } : function ( a ) { return null !=
a ? ( new XMLSerializer ) . serializeToString ( a ) : "" } } ( ) , getOuterHtml : function ( ) { return mxClient . IS _IE ? function ( a ) { if ( null != a ) { if ( null != a . outerHTML ) return a . outerHTML ; var b = [ ] ; b . push ( "<" + a . nodeName ) ; var c = a . attributes ; if ( null != c ) for ( var d = 0 ; d < c . length ; d ++ ) { var e = c [ d ] . value ; null != e && 0 < e . length && ( b . push ( " " ) , b . push ( c [ d ] . nodeName ) , b . push ( '="' ) , b . push ( e ) , b . push ( '"' ) ) } 0 == a . innerHTML . length ? b . push ( "/>" ) : ( b . push ( ">" ) , b . push ( a . innerHTML ) , b . push ( "</" + a . nodeName + ">" ) ) ; return b . join ( "" ) } return "" } : function ( a ) { return null !=
a ? ( new XMLSerializer ) . serializeToString ( a ) : "" } } ( ) , write : function ( a , b ) { var c = a . ownerDocument . createTextNode ( b ) ; null != a && a . appendChild ( c ) ; return c } , writeln : function ( a , b ) { var c = a . ownerDocument . createTextNode ( b ) ; null != a && ( a . appendChild ( c ) , a . appendChild ( document . createElement ( "br" ) ) ) ; return c } , br : function ( a , b ) { b = b || 1 ; for ( var c = null , d = 0 ; d < b ; d ++ ) null != a && ( c = a . ownerDocument . createElement ( "br" ) , a . appendChild ( c ) ) ; return c } , button : function ( a , b , c ) { c = null != c ? c : document ; c = c . createElement ( "button" ) ; mxUtils . write ( c ,
a ) ; mxEvent . addListener ( c , "click" , function ( a ) { b ( a ) } ) ; return c } , para : function ( a , b ) { var c = document . createElement ( "p" ) ; mxUtils . write ( c , b ) ; null != a && a . appendChild ( c ) ; return c } , addTransparentBackgroundFilter : function ( a ) { a . style . filter += "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + mxClient . imageBasePath + "/transparent.gif', sizingMethod='scale')" } , linkAction : function ( a , b , c , d , e ) { return mxUtils . link ( a , b , function ( ) { c . execute ( d ) } , e ) } , linkInvoke : function ( a , b , c , d , e , f ) { return mxUtils . link ( a , b , function ( ) { c [ d ] ( e ) } ,
f ) } , link : function ( a , b , c , d ) { var e = document . createElement ( "span" ) ; e . style . color = "blue" ; e . style . textDecoration = "underline" ; e . style . cursor = "pointer" ; null != d && ( e . style . paddingLeft = d + "px" ) ; mxEvent . addListener ( e , "click" , c ) ; mxUtils . write ( e , b ) ; null != a && a . appendChild ( e ) ; return e } , getDocumentSize : function ( ) { var a = document . body , b = document . documentElement ; try { return new mxRectangle ( 0 , 0 , a . clientWidth || b . clientWidth , Math . max ( a . clientHeight || 0 , b . clientHeight ) ) } catch ( c ) { return new mxRectangle } } , fit : function ( a ) { var b =
mxUtils . getDocumentSize ( ) , c = parseInt ( a . offsetLeft ) , d = parseInt ( a . offsetWidth ) , e = mxUtils . getDocumentScrollOrigin ( a . ownerDocument ) , f = e . x , e = e . y , g = f + b . width ; c + d > g && ( a . style . left = Math . max ( f , g - d ) + "px" ) ; c = parseInt ( a . offsetTop ) ; d = parseInt ( a . offsetHeight ) ; b = e + b . height ; c + d > b && ( a . style . top = Math . max ( e , b - d ) + "px" ) } , load : function ( a ) { a = new mxXmlRequest ( a , null , "GET" , ! 1 ) ; a . send ( ) ; return a } , get : function ( a , b , c , d , e , f , g ) { a = new mxXmlRequest ( a , null , "GET" ) ; var k = a . setRequestHeaders ; g && ( a . setRequestHeaders = function ( a , b ) { k . apply ( this ,
arguments ) ; for ( var c in g ) a . setRequestHeader ( c , g [ c ] ) } ) ; null != d && a . setBinary ( d ) ; a . send ( b , c , e , f ) ; return a } , getAll : function ( a , b , c ) { for ( var d = a . length , e = [ ] , f = 0 , g = function ( ) { 0 == f && null != c && c ( ) ; f ++ } , k = 0 ; k < a . length ; k ++ ) ( function ( a , c ) { mxUtils . get ( a , function ( a ) { var f = a . getStatus ( ) ; 200 > f || 299 < f ? g ( ) : ( e [ c ] = a , 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 } , getNumber : function ( a , b , c ) { a = null != a ? a [ b ] : null ; null == a && ( a = c || 0 ) ; return Number ( a ) } , getColor : function ( a , b , c ) { a = null != a ? a [ b ] : null ; null == a ? a = c : a == mxConstants . NONE && ( a = null ) ; return a } , clone : function ( a , b , c ) { c = null != c ? c : ! 1 ; var d = null ; if ( null != a && "function" == typeof a . constructor ) { var d = new a . constructor , e ; for ( 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 = 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 q ; c = Math . abs ( c ) ; d = Math . abs ( d ) ; var m = - k / 2 , n = - l / 2 , p = Math . cos ( e * Math . PI / 180 ) , q = Math . sin ( e * Math . PI / 180 ) ; e = p * m + q * n ; var m = - 1 *
q * m + p * n , n = e * e , r = m * m , t = c * c , u = d * d , x = n / t + r / u ; 1 < x ? ( c *= Math . sqrt ( x ) , d *= Math . sqrt ( x ) , f = 0 ) : ( x = 1 , f === g && ( x = - 1 ) , f = x * Math . sqrt ( ( t * u - t * r - u * n ) / ( t * r + u * n ) ) ) ; n = f * c * m / d ; r = - 1 * f * d * e / c ; k = p * n - q * r + k / 2 ; l = q * n + p * r + l / 2 ; t = Math . atan2 ( ( m - r ) / d , ( e - n ) / c ) - Math . atan2 ( 0 , 1 ) ; f = 0 <= t ? t : 2 * Math . PI + t ; t = Math . atan2 ( ( - m - r ) / d , ( - e - n ) / c ) - Math . atan2 ( ( m - r ) / d , ( e - n ) / c ) ; e = 0 <= t ? t : 2 * Math . PI + t ; 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 *= q ; d *=
q ; for ( var y = Math . cos ( f ) , B = Math . sin ( f ) , r = - m * ( n * B + d * y ) , t = - m * ( c * B - p * y ) , q = [ ] , A = 0 ; A < g ; ++ A ) { f += e ; var y = Math . cos ( f ) , B = Math . sin ( f ) , u = n * y - d * B + k , x = c * y + p * B + l , z = - m * ( n * B + d * y ) , y = - m * ( c * B - p * y ) , B = 6 * A ; q [ B ] = Number ( r + a ) ; q [ B + 1 ] = Number ( t + b ) ; q [ B + 2 ] = Number ( u - z + a ) ; q [ B + 3 ] = Number ( x - y + b ) ; q [ B + 4 ] = Number ( u + a ) ; q [ B + 5 ] = Number ( x + b ) ; r = u + z ; t = x + y } return q } , getBoundingBox : function ( a , b , c ) { var d = null ; if ( null != a && null != b && 0 != b ) { b = mxUtils . toRadians ( b ) ; var d = Math . cos ( b ) , 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 ; 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 = null , e = 0 ; e < a . length - 1 ; e ++ ) { var f = mxUtils . intersection ( a [ e ] . x , a [ e ] . y , a [ e + 1 ] . x , a [ e + 1 ] . y , b . x , b . y , c . x , c . y ) ; if ( null != f ) { var g = c . x - f . x , k = c . y - f . y , f = { p : f , distSq : k * k + g * g } ; null != f && ( null == d || d . distSq > f . distSq ) && ( d = f ) } } return null != d ? d . p : null } , rectangleIntersectsSegment : function ( a , b , c ) { var d = a . y , e = a . x , f = d + a . height , g = e + a . width ; a = b . x ; var k = c . x ; b . x > c . x && ( a = c . x , k = b . x ) ; k > g && ( k = g ) ; a < e && ( a = e ) ; if ( a > k ) return ! 1 ; var e = b . y , g = c . y , l = c . x - b . x ; 1E-7 < Math . abs ( l ) &&
( c = ( c . y - b . y ) / l , b = b . y - c * b . x , e = c * a + b , g = c * k + b ) ; e > g && ( b = g , g = e , e = b ) ; g > f && ( g = f ) ; e < d && ( e = d ) ; return e > g ? ! 1 : ! 0 } , contains : function ( a , b , c ) { return a . x <= b && a . x + a . width >= b && a . y <= c && a . y + a . height >= c } , intersects : function ( a , b ) { var c = a . width , d = a . height , e = b . width , f = b . height ; if ( 0 >= e || 0 >= f || 0 >= c || 0 >= d ) return ! 1 ; var g = a . x , k = a . y , l = b . x , m = b . y , e = e + l , f = f + m , c = c + g , d = d + k ; return ( e < l || e > g ) && ( f < m || f > k ) && ( c < g || c > l ) && ( d < k || d > m ) } , intersectsHotspot : function ( a , b , c , d , e , f ) { d = null != d ? d : 1 ; e = null != e ? e : 0 ; f = null != f ? f : 0 ; if ( 0 < d ) { var g = a . getCenterX ( ) ,
k = a . getCenterY ( ) , l = a . width , m = a . height , n = mxUtils . getValue ( a . style , mxConstants . STYLE _STARTSIZE ) * a . view . scale ; 0 < n && ( mxUtils . getValue ( a . style , mxConstants . STYLE _HORIZONTAL , ! 0 ) ? ( k = a . y + n / 2 , m = n ) : ( g = a . x + n / 2 , l = n ) ) ; l = Math . max ( e , l * d ) ; m = Math . max ( e , m * d ) ; 0 < f && ( l = Math . min ( l , f ) , m = Math . min ( m , f ) ) ; d = new mxRectangle ( g - l / 2 , k - m / 2 , l , m ) ; g = mxUtils . toRadians ( mxUtils . getValue ( a . style , mxConstants . STYLE _ROTATION ) || 0 ) ; 0 != g && ( e = Math . cos ( - g ) , f = Math . sin ( - g ) , g = new mxPoint ( a . getCenterX ( ) , a . getCenterY ( ) ) , a = mxUtils . getRotatedPoint ( new mxPoint ( b ,
c ) , e , f , g ) , b = a . x , c = a . y ) ; return mxUtils . contains ( d , b , c ) } return ! 0 } , getOffset : function ( a , b ) { for ( var c = 0 , d = 0 , e = ! 1 , f = a , g = document . body , k = document . documentElement ; null != f && f != g && f != k && ! e ; ) { var l = mxUtils . getCurrentStyle ( f ) ; null != l && ( e = e || "fixed" == l . position ) ; f = f . parentNode } b || e || ( e = mxUtils . getDocumentScrollOrigin ( a . ownerDocument ) , c += e . x , d += e . y ) ; e = a . getBoundingClientRect ( ) ; null != e && ( c += e . left , d += e . top ) ; return new mxPoint ( c , d ) } , getDocumentScrollOrigin : function ( a ) { if ( mxClient . IS _QUIRKS ) return new mxPoint ( a . body . scrollLeft ,
a . body . scrollTop ) ; a = a . defaultView || a . parentWindow ; return new mxPoint ( null != a && void 0 !== window . pageXOffset ? window . pageXOffset : ( document . documentElement || document . body . parentNode || document . body ) . scrollLeft , null != a && void 0 !== window . pageYOffset ? window . pageYOffset : ( document . documentElement || document . body . parentNode || document . body ) . scrollTop ) } , getScrollOrigin : function ( a , b , c ) { b = null != b ? b : ! 1 ; c = null != c ? c : ! 0 ; for ( var d = null != a ? a . ownerDocument : document , e = d . body , f = d . documentElement , g = new mxPoint , k = ! 1 ; null != a &&
a != e && a != f ; ) { isNaN ( a . scrollLeft ) || isNaN ( a . scrollTop ) || ( g . x += a . scrollLeft , g . y += a . scrollTop ) ; var l = mxUtils . getCurrentStyle ( a ) ; null != l && ( k = k || "fixed" == l . position ) ; a = b ? a . parentNode : null } ! k && c && ( a = mxUtils . getDocumentScrollOrigin ( d ) , g . x += a . x , g . y += a . y ) ; return g } , convertPoint : function ( a , b , c ) { var d = mxUtils . getScrollOrigin ( a , ! 1 ) ; a = mxUtils . getOffset ( a ) ; a . x -= d . x ; a . y -= d . y ; return new mxPoint ( b - a . x , c - a . y ) } , ltrim : function ( a , b ) { return null != a ? a . replace ( new RegExp ( "^[" + ( b || "\\s" ) + "]+" , "g" ) , "" ) : null } , rtrim : function ( a ,
b ) { return null != a ? a . replace ( new RegExp ( "[" + ( b || "\\s" ) + "]+$" , "g" ) , "" ) : null } , trim : function ( a , b ) { return mxUtils . ltrim ( mxUtils . rtrim ( a , b ) , b ) } , isNumeric : function ( a ) { return ! isNaN ( parseFloat ( a ) ) && isFinite ( a ) && ( "string" != typeof a || 0 > a . toLowerCase ( ) . indexOf ( "0x" ) ) } , isInteger : function ( a ) { return String ( parseInt ( a ) ) === String ( a ) } , mod : function ( a , b ) { return ( a % b + b ) % b } , intersection : function ( a , b , c , d , e , f , g , k ) { var l = ( k - f ) * ( c - a ) - ( g - e ) * ( d - b ) ; g = ( ( g - e ) * ( b - f ) - ( k - f ) * ( a - e ) ) / l ; e = ( ( c - a ) * ( b - f ) - ( d - b ) * ( a - e ) ) / l ; return 0 <= g && 1 >= g &&
0 <= e && 1 >= e ? new mxPoint ( a + g * ( c - a ) , b + g * ( d - b ) ) : 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 - e , f = d - f , a = e * c + f * d , c = 0 >= a ? 0 : a * a / ( c * c + d * d ) ) ; e = e * e + f * f - c ; 0 > e && ( e = 0 ) ; return e } , ptLineDist : function ( a , b , c , d , e , f ) { return Math . abs ( ( d - b ) * e - ( c - a ) * f + c * b - d * a ) / Math . sqrt ( ( d - b ) * ( d - b ) + ( c - a ) * ( c - a ) ) } , relativeCcw : function ( a , b , c , d , e , f ) { c -= a ; d -= b ; e -= a ; f -= b ; a = e * d - f * c ; 0 == a && ( a = e * c + f * d , 0 < a && ( a = ( e - c ) * c + ( f - d ) * d , 0 > a && ( a = 0 ) ) ) ; return 0 > a ? - 1 : 0 < a ? 1 : 0 } , animateChanges : function ( a , b ) { mxEffects . animateChanges . apply ( this ,
arguments ) } , cascadeOpacity : function ( a , b , c ) { mxEffects . cascadeOpacity . apply ( this , arguments ) } , fadeOut : function ( a , b , c , d , e , f ) { mxEffects . fadeOut . apply ( this , arguments ) } , setOpacity : function ( a , b ) { mxUtils . isVml ( a ) ? a . style . filter = 100 <= b ? "" : "alpha(opacity=" + b / 5 + ")" : mxClient . IS _IE && ( "undefined" === typeof document . documentMode || 9 > document . documentMode ) ? a . style . filter = 100 <= b ? "" : "alpha(opacity=" + b + ")" : a . style . opacity = b / 100 } , createImage : function ( a ) { var b ; mxClient . IS _IE6 && "CSS1Compat" != document . compatMode ? ( b = document . createElement ( mxClient . VML _PREFIX +
":image" ) , b . setAttribute ( "src" , a ) , b . style . borderStyle = "none" ) : ( 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 ( a , e ) { var d = c . get ( a ) ; null == d && ( d = mxCellPath . create ( a ) . split ( mxCellPath . PATH _SEPARATOR ) , c . put ( a , d ) ) ; var g = c . get ( e ) ; null == g && ( g = mxCellPath . create ( e ) . split ( mxCellPath . PATH _SEPARATOR ) , c . put ( e , g ) ) ; d = mxCellPath . compare ( d , g ) ; return 0 == d ? 0 : 0 < d == 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 ) for ( var c = a . split ( ";" ) , d = 0 , e = 0 ; e < c . length ; e ++ ) { if ( c [ e ] == b ) return d ; d += c [ e ] . 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 ) for ( var d = a . split ( ";" ) , e = 0 ; e < d . length ; e ++ ) d [ e ] != b && c . push ( d [ e ] ) ; 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 ( ) } } } , 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 ) , g ; 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 = Math . round ( b * mxConstants . LINE _HEIGHT ) +
"px" ; 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 = mxClient . IS _QUIRKS ? "inline" :
"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 = b . getGraphBounds ( ) . clone ( ) ; 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 ; ) { var g =
Math . floor ( c ) / c , 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 ( ) ; a . getGraphBounds ( ) ; 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" ; var d = document . createElement ( "pre" ) ; d . innerHTML = mxUtils . htmlEntities ( a , ! 1 ) . replace ( /\n/g , "<br>" ) . replace ( / /g , " " ) ; c . appendChild ( d ) ; 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 ( ) , d = c . document . createElement ( "pre" ) , d . innerHTML = mxUtils . htmlEntities ( a , ! 1 ) . replace ( /\n/g , "<br>" ) . replace ( / /g , " " ) , c . document . body . appendChild ( d ) ) } , 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 ( a ) { 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 ( a ) { return "function" == typeof b ? b ( a ) : b } ; null != d && ( a . createDragElement = function ( ) { return d . cloneNode ( ! 0 ) } , k && ( a . createPreviewElement = function ( a ) { var b = d . cloneNode ( ! 0 ) , c = parseInt ( b . style . width ) , e =
parseInt ( b . style . height ) ; b . style . width = Math . round ( c * a . view . scale ) + "px" ; b . style . height = Math . round ( e * a . view . scale ) + "px" ; return b } ) ) ; return a } } , 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 _VML : "vml" , 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" ,
d ) ; else if ( a . nodeType == mxConstants . NODETYPE _TEXT ) a = mxUtils . getTextContent ( a ) , 0 < a . length && f . push ( c + mxUtils . htmlEntities ( mxUtils . trim ( a ) , ! 1 ) + d ) ; else if ( a . nodeType == mxConstants . NODETYPE _CDATA ) a = mxUtils . getTextContent ( a ) , 0 < a . length && f . push ( c + "<![CDATA[" + a + "]]" + d ) ; else { f . push ( c + "<" + a . nodeName ) ; g = a . attributes ; if ( null != g ) for ( var k = 0 ; k < g . length ; k ++ ) { var l = mxUtils . htmlEntities ( g [ k ] . value ) ; f . push ( " " + g [ k ] . nodeName + '="' + l + '"' ) } g = a . firstChild ; if ( null != g ) { for ( f . push ( ">" + d ) ; null != g ; ) f . push ( mxUtils . getPrettyXml ( g ,
b , c + b , d , e ) ) , g = g . nextSibling ; f . push ( c + "</" + a . nodeName + ">" + d ) } else f . push ( " />" + d ) } return f . join ( "" ) } , extractTextWithWhitespace : function ( a ) { function b ( a ) { if ( 1 != a . length || "BR" != a [ 0 ] . nodeName && "\n" != a [ 0 ] . innerHTML ) for ( var e = 0 ; e < a . length ; e ++ ) { var g = a [ e ] ; "BR" == g . nodeName || "\n" == g . innerHTML || ( 1 == a . length || 0 == e ) && "DIV" == g . nodeName && "<br>" == g . innerHTML . toLowerCase ( ) ? d . push ( "\n" ) : ( 3 === g . nodeType || 4 === g . nodeType ? 0 < g . nodeValue . length && d . push ( g . nodeValue ) : 8 !== g . nodeType && 0 < g . childNodes . length && b ( g . childNodes ) ,
e < a . length - 1 && 0 <= mxUtils . indexOf ( c , a [ e + 1 ] . nodeName ) && d . push ( "\n" ) ) } } var c = "BLOCKQUOTE DIV H1 H2 H3 H4 H5 H6 OL P PRE TABLE UL" . split ( " " ) , d = [ ] ; b ( a ) ; return d . join ( "" ) } , replaceTrailingNewlines : function ( a , b ) { for ( var c = "" ; 0 < a . length && "\n" == a . charAt ( a . length - 1 ) ; ) a = a . substring ( 0 , a . length - 1 ) , c += b ; return a + c } , getTextContent : function ( a ) { return mxClient . IS _IE && void 0 !== a . innerText ? a . innerText : null != a ? a [ void 0 === a . textContent ? "text" : "textContent" ] : "" } , setTextContent : function ( a , b ) { void 0 !== a . innerText ? a . innerText =
b : a [ void 0 === a . textContent ? "text" : "textContent" ] = b } , getInnerHtml : function ( ) { return mxClient . IS _IE ? function ( a ) { return null != a ? a . innerHTML : "" } : function ( a ) { return null != a ? ( new XMLSerializer ) . serializeToString ( a ) : "" } } ( ) , getOuterHtml : function ( ) { return mxClient . IS _IE ? function ( a ) { if ( null != a ) { if ( null != a . outerHTML ) return a . outerHTML ; var b = [ ] ; b . push ( "<" + a . nodeName ) ; var c = a . attributes ; if ( null != c ) for ( var d = 0 ; d < c . length ; d ++ ) { var e = c [ d ] . value ; null != e && 0 < e . length && ( b . push ( " " ) , b . push ( c [ d ] . nodeName ) , b . push ( '="' ) ,
b . push ( e ) , b . push ( '"' ) ) } 0 == a . innerHTML . length ? b . push ( "/>" ) : ( b . push ( ">" ) , b . push ( a . innerHTML ) , b . push ( "</" + a . nodeName + ">" ) ) ; return b . join ( "" ) } return "" } : function ( a ) { return null != a ? ( new XMLSerializer ) . serializeToString ( a ) : "" } } ( ) , write : function ( a , b ) { var c = a . ownerDocument . createTextNode ( b ) ; null != a && a . appendChild ( c ) ; return c } , writeln : function ( a , b ) { var c = a . ownerDocument . createTextNode ( b ) ; null != a && ( a . appendChild ( c ) , a . appendChild ( document . createElement ( "br" ) ) ) ; return c } , br : function ( a , b ) { b = b || 1 ; for ( var c = null ,
d = 0 ; d < b ; d ++ ) null != a && ( c = a . ownerDocument . createElement ( "br" ) , a . appendChild ( c ) ) ; return c } , button : function ( a , b , c ) { c = null != c ? c : document ; c = c . createElement ( "button" ) ; mxUtils . write ( c , a ) ; mxEvent . addListener ( c , "click" , function ( a ) { b ( a ) } ) ; return c } , para : function ( a , b ) { var c = document . createElement ( "p" ) ; mxUtils . write ( c , b ) ; null != a && a . appendChild ( c ) ; return c } , addTransparentBackgroundFilter : function ( a ) { a . style . filter += "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + mxClient . imageBasePath + "/transparent.gif', sizingMethod='scale')" } ,
linkAction : function ( a , b , c , d , e ) { return mxUtils . link ( a , b , function ( ) { c . execute ( d ) } , e ) } , linkInvoke : function ( a , b , c , d , e , f ) { return mxUtils . link ( a , b , function ( ) { c [ d ] ( e ) } , f ) } , link : function ( a , b , c , d ) { var e = document . createElement ( "span" ) ; e . style . color = "blue" ; e . style . textDecoration = "underline" ; e . style . cursor = "pointer" ; null != d && ( e . style . paddingLeft = d + "px" ) ; mxEvent . addListener ( e , "click" , c ) ; mxUtils . write ( e , b ) ; null != a && a . appendChild ( e ) ; return e } , getDocumentSize : function ( ) { var a = document . body , b = document . documentElement ;
try { return new mxRectangle ( 0 , 0 , a . clientWidth || b . clientWidth , Math . max ( a . clientHeight || 0 , b . clientHeight ) ) } catch ( c ) { return new mxRectangle } } , fit : function ( a ) { var b = mxUtils . getDocumentSize ( ) , c = parseInt ( a . offsetLeft ) , d = parseInt ( a . offsetWidth ) , e = mxUtils . getDocumentScrollOrigin ( a . ownerDocument ) , f = e . x , e = e . y , g = f + b . width ; c + d > g && ( a . style . left = Math . max ( f , g - d ) + "px" ) ; c = parseInt ( a . offsetTop ) ; d = parseInt ( a . offsetHeight ) ; b = e + b . height ; c + d > b && ( a . style . top = Math . max ( e , b - d ) + "px" ) } , load : function ( a ) { a = new mxXmlRequest ( a , null ,
"GET" , ! 1 ) ; a . send ( ) ; return a } , get : function ( a , b , c , d , e , f , g ) { a = new mxXmlRequest ( a , null , "GET" ) ; var k = a . setRequestHeaders ; g && ( a . setRequestHeaders = function ( a , b ) { k . apply ( this , arguments ) ; for ( var c in g ) a . setRequestHeader ( c , g [ c ] ) } ) ; null != d && a . setBinary ( d ) ; a . send ( b , c , e , f ) ; return a } , getAll : function ( a , b , c ) { for ( var d = a . length , e = [ ] , f = 0 , g = function ( ) { 0 == f && null != c && c ( ) ; f ++ } , k = 0 ; k < a . length ; k ++ ) ( function ( a , c ) { mxUtils . get ( a , function ( a ) { var f = a . getStatus ( ) ; 200 > f || 299 < f ? g ( ) : ( e [ c ] = a , 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 } , getNumber : function ( a , b , c ) { a = null != a ? a [ b ] : null ; null == a && ( a = c || 0 ) ; return Number ( a ) } , getColor : function ( a , b , c ) { a = null != a ? a [ b ] : null ; null == a ? a = c : a == mxConstants . NONE &&
( a = null ) ; return a } , clone : function ( a , b , c ) { c = null != c ? c : ! 1 ; var d = null ; if ( null != a && "function" == typeof a . constructor ) { var d = new a . constructor , e ; for ( 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 = 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 q ; c = Math . abs ( c ) ; d = Math . abs ( d ) ; var m = - k / 2 , n = - l / 2 , p = Math . cos ( e * Math . PI / 180 ) , q = Math . sin ( e * Math . PI / 180 ) ; e = p * m + q * n ; var m = - 1 * q * m + p * n , n = e * e , r = m * m , t = c * c , u = d * d , x = n / t + r / u ; 1 < x ? ( c *= Math . sqrt ( x ) , d *= Math . sqrt ( x ) , f = 0 ) : ( x = 1 , f === g && ( x = - 1 ) , f = x * Math . sqrt ( ( t * u - t * r - u * n ) / ( t * r + u * n ) ) ) ; n = f * c * m / d ; r = - 1 * f * d * e / c ; k = p * n - q * r + k / 2 ; l = q * n + p * r + l / 2 ; t = Math . atan2 ( ( m - r ) / d , ( e - n ) / c ) - Math . atan2 ( 0 , 1 ) ; f = 0 <= t ? t : 2 * Math . PI + t ; t = Math . atan2 ( ( - m - r ) / d , ( - e - n ) / c ) - Math . atan2 ( ( m - r ) / d , ( e - n ) / c ) ; e = 0 <= t ? t : 2 *
Math . PI + t ; 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 *= q ; d *= q ; for ( var y = Math . cos ( f ) , B = Math . sin ( f ) , r = - m * ( n * B + d * y ) , t = - m * ( c * B - p * y ) , q = [ ] , A = 0 ; A < g ; ++ A ) { f += e ; var y = Math . cos ( f ) , B = Math . sin ( f ) , u = n * y - d * B + k , x = c * y + p * B + l , z = - m * ( n * B + d * y ) , y = - m * ( c * B - p * y ) , B = 6 * A ; q [ B ] = Number ( r + a ) ; q [ B + 1 ] = Number ( t + b ) ; q [ B + 2 ] = Number ( u - z + a ) ; q [ B + 3 ] = Number ( x - y + b ) ; q [ B + 4 ] = Number ( u + a ) ; q [ B + 5 ] = Number ( x + b ) ; r = u + z ; t = x + y } return q } , getBoundingBox : function ( a ,
b , c ) { var d = null ; if ( null != a && null != b && 0 != b ) { b = mxUtils . toRadians ( b ) ; var d = Math . cos ( b ) , 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 ; 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 = null , e = 0 ; e < a . length - 1 ; e ++ ) { var f = mxUtils . intersection ( a [ e ] . x , a [ e ] . y , a [ e + 1 ] . x , a [ e + 1 ] . y , b . x , b . y , c . x , c . y ) ; if ( null != f ) { var g = c . x - f . x , k = c . y - f . y , f = { p : f , distSq : k * k + g * g } ; null != f && ( null == d || d . distSq > f . distSq ) && ( d = f ) } } return null != d ? d . p : null } , rectangleIntersectsSegment : function ( a ,
b , c ) { var d = a . y , e = a . x , f = d + a . height , g = e + a . width ; a = b . x ; var k = c . x ; b . x > c . x && ( a = c . x , k = b . x ) ; k > g && ( k = g ) ; a < e && ( a = e ) ; if ( a > k ) return ! 1 ; var e = b . y , g = c . y , l = c . x - b . x ; 1E-7 < Math . abs ( l ) && ( c = ( c . y - b . y ) / l , b = b . y - c * b . x , e = c * a + b , g = c * k + b ) ; e > g && ( b = g , g = e , e = b ) ; g > f && ( g = f ) ; e < d && ( e = d ) ; return e > g ? ! 1 : ! 0 } , contains : function ( a , b , c ) { return a . x <= b && a . x + a . width >= b && a . y <= c && a . y + a . height >= c } , intersects : function ( a , b ) { var c = a . width , d = a . height , e = b . width , f = b . height ; if ( 0 >= e || 0 >= f || 0 >= c || 0 >= d ) return ! 1 ; var g = a . x , k = a . y , l = b . x , m = b . y , e = e + l , f = f + m , c = c +
g , d = d + k ; return ( e < l || e > g ) && ( f < m || f > k ) && ( c < g || c > l ) && ( d < k || d > m ) } , intersectsHotspot : function ( a , b , c , d , e , f ) { d = null != d ? d : 1 ; e = null != e ? e : 0 ; f = null != f ? f : 0 ; if ( 0 < d ) { var g = a . getCenterX ( ) , k = a . getCenterY ( ) , l = a . width , m = a . height , n = mxUtils . getValue ( a . style , mxConstants . STYLE _STARTSIZE ) * a . view . scale ; 0 < n && ( mxUtils . getValue ( a . style , mxConstants . STYLE _HORIZONTAL , ! 0 ) ? ( k = a . y + n / 2 , m = n ) : ( g = a . x + n / 2 , l = n ) ) ; l = Math . max ( e , l * d ) ; m = Math . max ( e , m * d ) ; 0 < f && ( l = Math . min ( l , f ) , m = Math . min ( m , f ) ) ; d = new mxRectangle ( g - l / 2 , k - m / 2 , l , m ) ; g = mxUtils . toRadians ( mxUtils . getValue ( a . style ,
mxConstants . STYLE _ROTATION ) || 0 ) ; 0 != g && ( e = Math . cos ( - g ) , f = Math . sin ( - g ) , g = new mxPoint ( a . getCenterX ( ) , a . getCenterY ( ) ) , a = mxUtils . getRotatedPoint ( new mxPoint ( b , c ) , e , f , g ) , b = a . x , c = a . y ) ; return mxUtils . contains ( d , b , c ) } return ! 0 } , getOffset : function ( a , b ) { for ( var c = 0 , d = 0 , e = ! 1 , f = a , g = document . body , k = document . documentElement ; null != f && f != g && f != k && ! e ; ) { var l = mxUtils . getCurrentStyle ( f ) ; null != l && ( e = e || "fixed" == l . position ) ; f = f . parentNode } b || e || ( e = mxUtils . getDocumentScrollOrigin ( a . ownerDocument ) , c += e . x , d += e . y ) ; e = a . getBoundingClientRect ( ) ;
null != e && ( c += e . left , d += e . top ) ; return new mxPoint ( c , d ) } , getDocumentScrollOrigin : function ( a ) { if ( mxClient . IS _QUIRKS ) return new mxPoint ( a . body . scrollLeft , a . body . scrollTop ) ; a = a . defaultView || a . parentWindow ; return new mxPoint ( null != a && void 0 !== window . pageXOffset ? window . pageXOffset : ( document . documentElement || document . body . parentNode || document . body ) . scrollLeft , null != a && void 0 !== window . pageYOffset ? window . pageYOffset : ( document . documentElement || document . body . parentNode || document . body ) . scrollTop ) } , getScrollOrigin : function ( a ,
b , c ) { b = null != b ? b : ! 1 ; c = null != c ? c : ! 0 ; for ( var d = null != a ? a . ownerDocument : document , e = d . body , f = d . documentElement , g = new mxPoint , k = ! 1 ; null != a && a != e && a != f ; ) { isNaN ( a . scrollLeft ) || isNaN ( a . scrollTop ) || ( g . x += a . scrollLeft , g . y += a . scrollTop ) ; var l = mxUtils . getCurrentStyle ( a ) ; null != l && ( k = k || "fixed" == l . position ) ; a = b ? a . parentNode : null } ! k && c && ( a = mxUtils . getDocumentScrollOrigin ( d ) , g . x += a . x , g . y += a . y ) ; return g } , convertPoint : function ( a , b , c ) { var d = mxUtils . getScrollOrigin ( a , ! 1 ) ; a = mxUtils . getOffset ( a ) ; a . x -= d . x ; a . y -= d . y ; return new mxPoint ( b -
a . x , c - a . y ) } , ltrim : function ( a , b ) { return null != a ? a . replace ( new RegExp ( "^[" + ( b || "\\s" ) + "]+" , "g" ) , "" ) : null } , rtrim : function ( a , b ) { return null != a ? a . replace ( new RegExp ( "[" + ( b || "\\s" ) + "]+$" , "g" ) , "" ) : null } , trim : function ( a , b ) { return mxUtils . ltrim ( mxUtils . rtrim ( a , b ) , b ) } , isNumeric : function ( a ) { return ! isNaN ( parseFloat ( a ) ) && isFinite ( a ) && ( "string" != typeof a || 0 > a . toLowerCase ( ) . indexOf ( "0x" ) ) } , isInteger : function ( a ) { return String ( parseInt ( a ) ) === String ( a ) } , mod : function ( a , b ) { return ( a % b + b ) % b } , intersection : function ( a , b ,
c , d , e , f , g , k ) { var l = ( k - f ) * ( c - a ) - ( g - e ) * ( d - b ) ; g = ( ( g - e ) * ( b - f ) - ( k - f ) * ( a - e ) ) / l ; e = ( ( c - a ) * ( b - f ) - ( d - b ) * ( a - e ) ) / l ; return 0 <= g && 1 >= g && 0 <= e && 1 >= e ? new mxPoint ( a + g * ( c - a ) , b + g * ( d - b ) ) : 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 - e , f = d - f , a = e * c + f * d , c = 0 >= a ? 0 : a * a / ( c * c + d * d ) ) ; e = e * e + f * f - c ; 0 > e && ( e = 0 ) ; return e } , ptLineDist : function ( a , b , c , d , e , f ) { return Math . abs ( ( d - b ) * e - ( c - a ) * f + c * b - d * a ) / Math . sqrt ( ( d - b ) * ( d - b ) + ( c - a ) * ( c - a ) ) } , relativeCcw : function ( a , b , c , d , e , f ) { c -= a ; d -= b ; e -= a ; f -= b ; a = e * d - f * c ; 0 == a &&
( a = e * c + f * d , 0 < a && ( a = ( e - c ) * c + ( f - d ) * d , 0 > a && ( a = 0 ) ) ) ; return 0 > a ? - 1 : 0 < a ? 1 : 0 } , animateChanges : function ( a , b ) { mxEffects . animateChanges . apply ( this , arguments ) } , cascadeOpacity : function ( a , b , c ) { mxEffects . cascadeOpacity . apply ( this , arguments ) } , fadeOut : function ( a , b , c , d , e , f ) { mxEffects . fadeOut . apply ( this , arguments ) } , setOpacity : function ( a , b ) { mxUtils . isVml ( a ) ? a . style . filter = 100 <= b ? "" : "alpha(opacity=" + b / 5 + ")" : mxClient . IS _IE && ( "undefined" === typeof document . documentMode || 9 > document . documentMode ) ? a . style . filter = 100 <= b ? "" :
"alpha(opacity=" + b + ")" : a . style . opacity = b / 100 } , createImage : function ( a ) { var b ; mxClient . IS _IE6 && "CSS1Compat" != document . compatMode ? ( b = document . createElement ( mxClient . VML _PREFIX + ":image" ) , b . setAttribute ( "src" , a ) , b . style . borderStyle = "none" ) : ( 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 ( a , e ) { var d = c . get ( a ) ; null == d && ( d = mxCellPath . create ( a ) . split ( mxCellPath . PATH _SEPARATOR ) , c . put ( a ,
d ) ) ; var g = c . get ( e ) ; null == g && ( g = mxCellPath . create ( e ) . split ( mxCellPath . PATH _SEPARATOR ) , c . put ( e , g ) ) ; d = mxCellPath . compare ( d , g ) ; return 0 == d ? 0 : 0 < d == 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 ) for ( var c = a . split ( ";" ) , d = 0 , e = 0 ; e < c . length ; e ++ ) { if ( c [ e ] == b ) return d ; d += c [ e ] . 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 ) for ( var d = a . split ( ";" ) , e = 0 ; e < d . length ; e ++ ) d [ e ] != b && c . push ( d [ e ] ) ; 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 ( ) } } } , 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 ) , g ; 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 = Math . round ( b * mxConstants . LINE _HEIGHT ) + "px" ; 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 = mxClient . IS _QUIRKS ? "inline" : "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 = b . getGraphBounds ( ) . clone ( ) ; 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 ; ) { var g = Math . floor ( c ) / c , 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 ( ) ; a . getGraphBounds ( ) ; 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" ; var d = document . createElement ( "pre" ) ; d . innerHTML = mxUtils . htmlEntities ( a , ! 1 ) . replace ( /\n/g , "<br>" ) . replace ( / /g , " " ) ; c . appendChild ( d ) ;
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 ( ) , d = c . document . createElement ( "pre" ) , d . innerHTML = mxUtils . htmlEntities ( a , ! 1 ) . replace ( /\n/g , "<br>" ) . replace ( / /g , " " ) , c . document . body . appendChild ( d ) ) } , 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 ( a ) { 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 ( a ) { return "function" == typeof b ? b ( a ) : b } ; null != d && ( a . createDragElement = function ( ) { return d . cloneNode ( ! 0 ) } , k && ( a . createPreviewElement = function ( a ) { var b = d . cloneNode ( ! 0 ) ,
c = parseInt ( b . style . width ) , e = parseInt ( b . style . height ) ; b . style . width = Math . round ( c * a . view . scale ) + "px" ; b . style . height = Math . round ( e * a . view . scale ) + "px" ; return b } ) ) ; return a } } , 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 _VML : "vml" , 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 : "gray" , VML _SHADOWCOLOR : "gray" , SHADOW _OFFSET _X : 2 , SHADOW _OFFSET _Y : 3 , 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" ,
@ -787,8 +787,8 @@ mxGraphModel.prototype.endUpdate=function(){this.updateLevel--;0==this.updateLev
"edit" , a ) ) } } finally { this . endingUpdate = ! 1 } } } ; mxGraphModel . prototype . createUndoableEdit = function ( a ) { var b = new mxUndoableEdit ( this , null != a ? a : ! 0 ) ; b . notify = function ( ) { b . source . fireEvent ( new mxEventObject ( mxEvent . CHANGE , "edit" , b , "changes" , b . changes ) ) ; b . source . fireEvent ( new mxEventObject ( mxEvent . NOTIFY , "edit" , b , "changes" , b . changes ) ) } ; return b } ;
mxGraphModel . prototype . mergeChildren = function ( a , b , c ) { c = null != c ? c : ! 0 ; this . beginUpdate ( ) ; try { var d = { } ; this . mergeChildrenImpl ( a , b , c , d ) ; for ( var e in d ) { var f = d [ e ] , g = this . getTerminal ( f , ! 0 ) ; null != g && ( g = d [ mxCellPath . create ( g ) ] , this . setTerminal ( f , g , ! 0 ) ) ; g = this . getTerminal ( f , ! 1 ) ; null != g && ( g = d [ mxCellPath . create ( g ) ] , this . setTerminal ( f , g , ! 1 ) ) } } finally { this . endUpdate ( ) } } ;
mxGraphModel . prototype . mergeChildrenImpl = function ( a , b , c , d ) { this . beginUpdate ( ) ; try { for ( var e = a . getChildCount ( ) , f = 0 ; f < e ; f ++ ) { var g = a . getChildAt ( f ) ; if ( "function" == typeof g . getId ) { var k = g . getId ( ) , l = null == k || this . isEdge ( g ) && c ? null : this . getCell ( k ) ; if ( null == l ) { var m = g . clone ( ) ; m . setId ( k ) ; m . setTerminal ( g . getTerminal ( ! 0 ) , ! 0 ) ; m . setTerminal ( g . getTerminal ( ! 1 ) , ! 1 ) ; l = b . insert ( m ) ; this . cellAdded ( l ) } d [ mxCellPath . create ( g ) ] = l ; this . mergeChildrenImpl ( g , l , c , d ) } } } finally { this . endUpdate ( ) } } ;
mxGraphModel . prototype . getParents = function ( a ) { var b = [ ] ; if ( null != a ) for ( var c = new mxDictionary , d = 0 ; d < a . length ; d ++ ) { var e = this . getParent ( a [ d ] ) ; null == e || c . get ( e ) || ( c . put ( e , ! 0 ) , b . push ( e ) ) } return b } ; mxGraphModel . prototype . cloneCell = function ( a ){ return null != a ? this . cloneCells ( [ a ] , ! 0 ) [ 0 ] : null } ;
mxGraphModel . prototype . cloneCells = function ( a , b , c ) { c= null != c ? c : { } ; for ( var d = [ ] , e = 0 ; e < a . length ; e ++ ) null != a [ e ] ? d . push ( this . cloneCellImpl ( a [ e ] , c , b ) ) : d . push ( null ) ; for ( e = 0 ; e < d . length ; e ++ ) null != d [ e ] && this . restoreClone ( d [ e ] , a [ e ] , c ) ; return d } ; mxGraphModel . prototype . cloneCellImpl = function ( a , b , c ) { var d = mxObjectIdentity . get ( a ) , e = b [ d ] ; if ( null == e && ( e = this . cellCloned ( a ) , b [ d ] = e , c ) ) for ( c = this . getChildCount ( a ) , d = 0 ; d < c ; d ++ ) { var f = this . cloneCellImpl ( this . getChildAt ( a , d ) , b , ! 0 ) ; e . insert ( f ) } return e } ;
mxGraphModel . prototype . getParents = function ( a ) { var b = [ ] ; if ( null != a ) for ( var c = new mxDictionary , d = 0 ; d < a . length ; d ++ ) { var e = this . getParent ( a [ d ] ) ; null == e || c . get ( e ) || ( c . put ( e , ! 0 ) , b . push ( e ) ) } return b } ; mxGraphModel . prototype . cloneCell = function ( a ,b ){ return null != a ? this . cloneCells ( [ a ] , b ) [ 0 ] : null } ;
mxGraphModel . prototype . cloneCells = function ( a , b , c ) { b= null != b ? b : ! 0 ; c= null != c ? c : { } ; for ( var d = [ ] , e = 0 ; e < a . length ; e ++ ) null != a [ e ] ? d . push ( this . cloneCellImpl ( a [ e ] , c , b ) ) : d . push ( null ) ; for ( e = 0 ; e < d . length ; e ++ ) null != d [ e ] && this . restoreClone ( d [ e ] , a [ e ] , c ) ; return d } ; mxGraphModel . prototype . cloneCellImpl = function ( a , b , c ) { var d = mxObjectIdentity . get ( a ) , e = b [ d ] ; if ( null == e && ( e = this . cellCloned ( a ) , b [ d ] = e , c ) ) for ( c = this . getChildCount ( a ) , d = 0 ; d < c ; d ++ ) { var f = this . cloneCellImpl ( this . getChildAt ( a , d ) , b , ! 0 ) ; e . insert ( f ) } return e } ;
mxGraphModel . prototype . cellCloned = function ( a ) { return a . clone ( ) } ; mxGraphModel . prototype . restoreClone = function ( a , b , c ) { var d = this . getTerminal ( b , ! 0 ) ; null != d && ( d = c [ mxObjectIdentity . get ( d ) ] , null != d && d . insertEdge ( a , ! 0 ) ) ; d = this . getTerminal ( b , ! 1 ) ; null != d && ( d = c [ mxObjectIdentity . get ( d ) ] , null != d && d . insertEdge ( a , ! 1 ) ) ; for ( var d = this . getChildCount ( a ) , e = 0 ; e < d ; e ++ ) this . restoreClone ( this . getChildAt ( a , e ) , this . getChildAt ( b , e ) , c ) } ; function mxRootChange ( a , b ) { this . model = a ; this . previous = this . root = b }
mxRootChange . prototype . execute = function ( ) { this . root = this . previous ; this . previous = this . model . rootChanged ( this . previous ) } ; function mxChildChange ( a , b , c , d ) { this . model = a ; this . previous = this . parent = b ; this . child = c ; this . previousIndex = this . index = d }
mxChildChange . prototype . execute = function ( ) { if ( null != this . child ) { var a = this . model . getParent ( this . child ) , b = null != a ? a . getIndex ( this . child ) : 0 ; null == this . previous && this . connect ( this . child , ! 1 ) ; a = this . model . parentForCellChanged ( this . child , this . previous , this . previousIndex ) ; null != this . previous && this . connect ( this . child , ! 0 ) ; this . parent = this . previous ; this . previous = a ; this . index = this . previousIndex ; this . previousIndex = b } } ;
@ -1158,8 +1158,8 @@ mxGraph.prototype.removeCells=function(a,b){b=null!=b?b:!0;null==a&&(a=this.getD
a , "includeEdges" , b ) ) } finally { this . model . endUpdate ( ) } return a } ;
mxGraph . prototype . cellsRemoved = function ( a ) { if ( null != a && 0 < a . length ) { var b = this . view . scale , c = this . view . translate ; this . model . beginUpdate ( ) ; try { for ( var d = new mxDictionary , e = 0 ; e < a . length ; e ++ ) d . put ( a [ e ] , ! 0 ) ; for ( e = 0 ; e < a . length ; e ++ ) { for ( var f = this . getAllEdges ( [ a [ e ] ] ) , g = mxUtils . bind ( this , function ( d , f ) { var g = this . model . getGeometry ( d ) ; if ( null != g ) { for ( var k = this . model . getTerminal ( d , f ) , l = ! 1 , m = k ; null != m ; ) { if ( a [ e ] == m ) { l = ! 0 ; break } m = this . model . getParent ( m ) } l && ( g = g . clone ( ) , l = this . view . getState ( d ) , null != l && null != l . absolutePoints ?
( k = l . absolutePoints , m = f ? 0 : k . length - 1 , g . setTerminalPoint ( new mxPoint ( k [ m ] . x / b - c . x - l . origin . x , k [ m ] . y / b - c . y - l . origin . y ) , f ) ) : ( k = this . view . getState ( k ) , null != k && g . setTerminalPoint ( new mxPoint ( k . getCenterX ( ) / b - c . x , k . getCenterY ( ) / b - c . y ) , f ) ) , this . model . setGeometry ( d , g ) , this . model . setTerminal ( d , null , f ) ) } } ) , k = 0 ; k < f . length ; k ++ ) d . get ( f [ k ] ) || ( d . put ( f [ k ] , ! 0 ) , g ( f [ k ] , ! 0 ) , g ( f [ k ] , ! 1 ) ) ; this . model . remove ( a [ e ] ) } this . fireEvent ( new mxEventObject ( mxEvent . CELLS _REMOVED , "cells" , a ) ) } finally { this . model . endUpdate ( ) } } } ;
mxGraph . prototype . splitEdge = function ( a , b , c , d , e ){ d = d || 0 ; e = e || 0 ; var f = this . model . getParent ( a ) , g = this . model . getTerminal ( a , ! 0 ) ; this . model . beginUpdate ( ) ; try { if ( null == c ) { c = this . cloneCell ( a ) ; var k = this . view . getState ( a ) , l = this . getCellGeometry ( c ) ; if ( null != l&& null != l . points && null != k ) { var m = this . view . translate , n = this . view . scale , p = mxUtils . findNearestSegment ( k , ( d + m . x ) * n , ( e + m . y ) * n ) ; l . points = l . points . slice ( 0 , p ) ; l = this . getCellGeometry ( a ) ; null != l&& null != l . points && ( l = l . clone ( ) , l . points = l . points . slice ( p ) , this . model . setGeometry ( a ,
l ) ) } } this . cellsMoved ( b , d , e , ! 1 , ! 1 ) ; this . cellsAdded ( b , f, this . model . getChildCount ( f ) , null , null , ! 0 ) ; this . cellsAdded ( [ c ] , f, this . model . getChildCount ( f ) , g , b [ 0 ] , ! 1 ) ; this . cellConnected ( a , b [ 0 ] , ! 0 ) ; this . fireEvent ( new mxEventObject ( mxEvent . SPLIT _EDGE , "edge" , a , "cells" , b , "newEdge" , c , "dx" , d , "dy" , e ) ) } finally { this . model . endUpdate ( ) } return c } ;
mxGraph . prototype . splitEdge = function ( a , b , c , d , e ,f , g , k ){ d = d || 0 ; e = e || 0 ; k = null != k ? k : this . model . getParent ( a ) ; f = this . model . getTerminal ( a , ! 0 ) ; this . model . beginUpdate ( ) ; try { if ( null == c ) { c = this . cloneCell ( a ) ; var l = this . view . getState ( a ) , m = this . getCellGeometry ( c ) ; if ( null != m&& null != m . points && null != l ) { var n = this . view . translate , p = this . view . scale , q = mxUtils . findNearestSegment ( l , ( d + n . x ) * p , ( e + n . y ) * p ) ; m . points = m . points . slice ( 0 , q ) ; m = this . getCellGeometry ( a ) ; null != m&& null != m . points && ( m = m . clone ( ) , m . points = m . points . slice ( q ) ,
this . model . setGeometry ( a , m ) ) } } this . cellsMoved ( b , d , e , ! 1 , ! 1 ) ; this . cellsAdded ( b , k, this . model . getChildCount ( k ) , null , null , ! 0 ) ; this . cellsAdded ( [ c ] , k, this . model . getChildCount ( k ) , f , b [ 0 ] , ! 1 ) ; this . cellConnected ( a , b [ 0 ] , ! 0 ) ; this . fireEvent ( new mxEventObject ( mxEvent . SPLIT _EDGE , "edge" , a , "cells" , b , "newEdge" , c , "dx" , d , "dy" , e ) ) } finally { this . model . endUpdate ( ) } return c } ;
mxGraph . prototype . toggleCells = function ( a , b , c ) { null == b && ( b = this . getSelectionCells ( ) ) ; c && ( b = this . addAllEdges ( b ) ) ; this . model . beginUpdate ( ) ; try { this . cellsToggled ( b , a ) , this . fireEvent ( new mxEventObject ( mxEvent . TOGGLE _CELLS , "show" , a , "cells" , b , "includeEdges" , c ) ) } finally { this . model . endUpdate ( ) } return b } ; mxGraph . prototype . cellsToggled = function ( a , b ) { if ( null != a && 0 < a . length ) { this . model . beginUpdate ( ) ; try { for ( var c = 0 ; c < a . length ; c ++ ) this . model . setVisible ( a [ c ] , b ) } finally { this . model . endUpdate ( ) } } } ;
mxGraph . prototype . foldCells = function ( a , b , c , d , e ) { b = null != b ? b : ! 1 ; null == c && ( c = this . getFoldableCells ( this . getSelectionCells ( ) , a ) ) ; this . stopEditing ( ! 1 ) ; this . model . beginUpdate ( ) ; try { this . cellsFolded ( c , a , b , d ) , this . fireEvent ( new mxEventObject ( mxEvent . FOLD _CELLS , "collapse" , a , "recurse" , b , "cells" , c ) ) } finally { this . model . endUpdate ( ) } return c } ;
mxGraph . prototype . cellsFolded = function ( a , b , c , d ) { if ( null != a && 0 < a . length ) { this . model . beginUpdate ( ) ; try { for ( var e = 0 ; e < a . length ; e ++ ) if ( ( ! d || this . isCellFoldable ( a [ e ] , b ) ) && b != this . isCellCollapsed ( a [ e ] ) ) { this . model . setCollapsed ( a [ e ] , b ) ; this . swapBounds ( a [ e ] , b ) ; this . isExtendParent ( a [ e ] ) && this . extendParent ( a [ e ] ) ; if ( c ) { var f = this . model . getChildren ( a [ e ] ) ; this . cellsFolded ( f , b , c ) } this . constrainChild ( a [ e ] ) } this . fireEvent ( new mxEventObject ( mxEvent . CELLS _FOLDED , "cells" , a , "collapse" , b , "recurse" , c ) ) } finally { this . model . endUpdate ( ) } } } ;
@ -1247,17 +1247,18 @@ mxGraph.prototype.setHtmlLabels=function(a){this.htmlLabels=a};mxGraph.prototype
mxGraph . prototype . getTooltip = function ( a , b , c , d ) { var e = null ; null != a && ( null == a . control || b != a . control . node && b . parentNode != a . control . node || ( e = this . collapseExpandResource , e = mxUtils . htmlEntities ( mxResources . get ( e ) || e ) . replace ( /\\n/g , "<br>" ) ) , null == e && null != a . overlays && a . overlays . visit ( function ( a , c ) { null != e || b != c . node && b . parentNode != c . node || ( e = c . overlay . toString ( ) ) } ) , null == e && ( c = this . selectionCellsHandler . getHandler ( a . cell ) , null != c && "function" == typeof c . getTooltipForNode && ( e = c . getTooltipForNode ( b ) ) ) , null ==
e && ( e = this . getTooltipForCell ( a . cell ) ) ) ; return e } ; mxGraph . prototype . getTooltipForCell = function ( a ) { return null != a && null != a . getTooltip ? a . getTooltip ( ) : this . convertValueToString ( a ) } ; mxGraph . prototype . getLinkForCell = function ( a ) { return null } ; mxGraph . prototype . getCursorForMouseEvent = function ( a ) { return this . getCursorForCell ( a . getCell ( ) ) } ; mxGraph . prototype . getCursorForCell = function ( a ) { return null } ;
mxGraph . prototype . getStartSize = function ( a , b ) { var c = new mxRectangle , d = this . getCurrentCellStyle ( a , b ) , e = parseInt ( mxUtils . getValue ( d , mxConstants . STYLE _STARTSIZE , mxConstants . DEFAULT _STARTSIZE ) ) ; mxUtils . getValue ( d , mxConstants . STYLE _HORIZONTAL , ! 0 ) ? c . height = e : c . width = e ; return c } ;
mxGraph . prototype . getActualStartSize = function ( a , b ) { var c = new mxRectangle ; if ( this . isSwimlane ( a ) ) { var d = this . getCurrentCellStyle ( a , b ) , e = parseInt ( mxUtils . getValue ( d , mxConstants . STYLE _STARTSIZE , mxConstants . DEFAULT _STARTSIZE ) ) , f = 1 == mxUtils . getValue ( d , mxConstants . STYLE _FLIPH , 0 ) , g = 1 == mxUtils . getValue ( d , mxConstants . STYLE _FLIPV , 0 ) , k = 0 ; mxUtils . getValue ( d , mxConstants . STYLE _HORIZONTAL , ! 0 ) || k ++ ; d = mxUtils . getValue ( d , mxConstants . STYLE _DIRECTION , mxConstants . DIRECTION _EAST ) ; d == mxConstants . DIRECTION _NORTH ? k ++ : d == mxConstants . DIRECTION _WEST ?
k += 2 : d == mxConstants . DIRECTION _SOUTH && ( k += 3 ) ; k = mxUtils . mod ( k , 4 ) ; 0 == k ? c . y = e : 1 == k ? c . x = e : 2 == k ? c . height = e : 3 == k && ( c . width = e ) ; g && ( e = c . y , c . y = c . height , c . height = e ) ; f && ( e = c . x , c . x = c . width , c . width = e ) } return c } ; mxGraph . prototype . getImage = function ( a ) { return null != a && null != a . style ? a . style [ mxConstants . STYLE _IMAGE ] : null } ;
mxGraph . prototype . isTransparentState = function ( a ) { var b = ! 1 ; if ( null != a ) var b = mxUtils . getValue ( a . style , mxConstants . STYLE _STROKECOLOR , mxConstants . NONE ) , c = mxUtils . getValue ( a . style , mxConstants . STYLE _FILLCOLOR , mxConstants . NONE ) , b = b == mxConstants . NONE && c == mxConstants . NONE && null == this . getImage ( a ) ; return b } ; mxGraph . prototype . getVerticalAlign = function ( a ) { return null != a && null != a . style ? a . style [ mxConstants . STYLE _VERTICAL _ALIGN ] || mxConstants . ALIGN _MIDDLE : null } ;
mxGraph . prototype . getIndicatorColor = function ( a ) { return null != a && null != a . style ? a . style [ mxConstants . STYLE _INDICATOR _COLOR ] : null } ; mxGraph . prototype . getIndicatorGradientColor = function ( a ) { return null != a && null != a . style ? a . style [ mxConstants . STYLE _INDICATOR _GRADIENTCOLOR ] : null } ; mxGraph . prototype . getIndicatorShape = function ( a ) { return null != a && null != a . style ? a . style [ mxConstants . STYLE _INDICATOR _SHAPE ] : null } ;
mxGraph . prototype . getIndicatorImage = function ( a ) { return null != a && null != a . style ? a . style [ mxConstants . STYLE _INDICATOR _IMAGE ] : null } ; mxGraph . prototype . getBorder = function ( ) { return this . border } ; mxGraph . prototype . setBorder = function ( a ) { this . border = a } ; mxGraph . prototype . isSwimlane = function ( a ) { return null == a || this . model . getParent ( a ) == this . model . getRoot ( ) || this . model . isEdge ( a ) ? ! 1 : this . getCurrentCellStyle ( a ) [ mxConstants . STYLE _SHAPE ] == mxConstants . SHAPE _SWIMLANE } ; mxGraph . prototype . isResizeContainer = function ( ) { return this . resizeContainer } ;
mxGraph . prototype . setResizeContainer = function ( a ) { this . resizeContainer = a } ; mxGraph . prototype . isEnabled = function ( ) { return this . enabled } ; mxGraph . prototype . setEnabled = function ( a ) { this . enabled = a } ; mxGraph . prototype . isEscapeEnabled = function ( ) { return this . escapeEnabled } ; mxGraph . prototype . setEscapeEnabled = function ( a ) { this . escapeEnabled = a } ; mxGraph . prototype . isInvokesStopCellEditing = function ( ) { return this . invokesStopCellEditing } ;
mxGraph . prototype . setInvokesStopCellEditing = function ( a ) { this . invokesStopCellEditing = a } ; mxGraph . prototype . isEnterStopsCellEditing = function ( ) { return this . enterStopsCellEditing } ; mxGraph . prototype . setEnterStopsCellEditing = function ( a ) { this . enterStopsCellEditing = a } ; mxGraph . prototype . isCellLocked = function ( a ) { var b = this . model . getGeometry ( a ) ; return this . isCellsLocked ( ) || null != b && this . model . isVertex ( a ) && b . relative } ; mxGraph . prototype . isCellsLocked = function ( ) { return this . cellsLocked } ;
mxGraph . prototype . setCellsLocked = function ( a ) { this . cellsLocked = a } ; mxGraph . prototype . getCloneableCells = function ( a ) { return this . model . filterCells ( a , mxUtils . bind ( this , function ( a ) { return this . isCellCloneable ( a ) } ) ) } ; mxGraph . prototype . isCellCloneable = function ( a ) { a = this . getCurrentCellStyle ( a ) ; return this . isCellsCloneable ( ) && 0 != a [ mxConstants . STYLE _CLONEABLE ] } ; mxGraph . prototype . isCellsCloneable = function ( ) { return this . cellsCloneable } ; mxGraph . prototype . setCellsCloneable = function ( a ) { this . cellsCloneable = a } ;
mxGraph . prototype . getExportableCells = function ( a ) { return this . model . filterCells ( a , mxUtils . bind ( this , function ( a ) { return this . canExportCell ( a ) } ) ) } ; mxGraph . prototype . canExportCell = function ( a ) { return this . exportEnabled } ; mxGraph . prototype . getImportableCells = function ( a ) { return this . model . filterCells ( a , mxUtils . bind ( this , function ( a ) { return this . canImportCell ( a ) } ) ) } ; mxGraph . prototype . canImportCell = function ( a ) { return this . importEnabled } ; mxGraph . prototype . isCellSelectable = function ( a ) { return this . isCellsSelectable ( ) } ;
mxGraph . prototype . isCellsSelectable = function ( ) { return this . cellsSelectable } ; mxGraph . prototype . setCellsSelectable = function ( a ) { this . cellsSelectable = a } ; mxGraph . prototype . getDeletableCells = function ( a ) { return this . model . filterCells ( a , mxUtils . bind ( this , function ( a ) { return this . isCellDeletable ( a ) } ) ) } ; mxGraph . prototype . isCellDeletable = function ( a ) { a = this . getCurrentCellStyle ( a ) ; return this . isCellsDeletable ( ) && 0 != a [ mxConstants . STYLE _DELETABLE ] } ; mxGraph . prototype . isCellsDeletable = function ( ) { return this . cellsDeletable } ;
mxGraph . prototype . setCellsDeletable = function ( a ) { this . cellsDeletable = a } ; mxGraph . prototype . isLabelMovable = function ( a ) { return ! this . isCellLocked ( a ) && ( this . model . isEdge ( a ) && this . edgeLabelsMovable || this . model . isVertex ( a ) && this . vertexLabelsMovable ) } ; mxGraph . prototype . isCellRotatable = function ( a ) { return 0 != this . getCurrentCellStyle ( a ) [ mxConstants . STYLE _ROTATABLE ] } ; mxGraph . prototype . getMovableCells = function ( a ) { return this . model . filterCells ( a , mxUtils . bind ( this , function ( a ) { return this . isCellMovable ( a ) } ) ) } ;
mxGraph . prototype . getSwimlaneDirection = function ( a ) { var b = mxUtils . getValue ( a , mxConstants . STYLE _DIRECTION , mxConstants . DIRECTION _EAST ) , c = 1 == mxUtils . getValue ( a , mxConstants . STYLE _FLIPH , 0 ) , d = 1 == mxUtils . getValue ( a , mxConstants . STYLE _FLIPV , 0 ) ; a = mxUtils . getValue ( a , mxConstants . STYLE _HORIZONTAL , ! 0 ) ? 0 : 3 ; b == mxConstants . DIRECTION _NORTH ? a -- : b == mxConstants . DIRECTION _WEST ? a += 2 : b == mxConstants . DIRECTION _SOUTH && ( a += 1 ) ; b = mxUtils . mod ( a , 2 ) ; c && 1 == b && ( a += 2 ) ; d && 0 == b && ( a += 2 ) ; return [ mxConstants . DIRECTION _NORTH , mxConstants . DIRECTION _EAST ,
mxConstants . DIRECTION _SOUTH , mxConstants . DIRECTION _WEST ] [ mxUtils . mod ( a , 4 ) ] } ; mxGraph . prototype . getActualStartSize = function ( a , b ) { var c = new mxRectangle ; if ( this . isSwimlane ( a ) ) { var d = this . getCurrentCellStyle ( a , b ) , e = parseInt ( mxUtils . getValue ( d , mxConstants . STYLE _STARTSIZE , mxConstants . DEFAULT _STARTSIZE ) ) , d = this . getSwimlaneDirection ( d ) ; d == mxConstants . DIRECTION _NORTH ? c . y = e : d == mxConstants . DIRECTION _WEST ? c . x = e : d == mxConstants . DIRECTION _SOUTH ? c . height = e : c . width = e } return c } ;
mxGraph . prototype . getImage = function ( a ) { return null != a && null != a . style ? a . style [ mxConstants . STYLE _IMAGE ] : null } ; mxGraph . prototype . isTransparentState = function ( a ) { var b = ! 1 ; if ( null != a ) var b = mxUtils . getValue ( a . style , mxConstants . STYLE _STROKECOLOR , mxConstants . NONE ) , c = mxUtils . getValue ( a . style , mxConstants . STYLE _FILLCOLOR , mxConstants . NONE ) , b = b == mxConstants . NONE && c == mxConstants . NONE && null == this . getImage ( a ) ; return b } ;
mxGraph . prototype . getVerticalAlign = function ( a ) { return null != a && null != a . style ? a . style [ mxConstants . STYLE _VERTICAL _ALIGN ] || mxConstants . ALIGN _MIDDLE : null } ; mxGraph . prototype . getIndicatorColor = function ( a ) { return null != a && null != a . style ? a . style [ mxConstants . STYLE _INDICATOR _COLOR ] : null } ; mxGraph . prototype . getIndicatorGradientColor = function ( a ) { return null != a && null != a . style ? a . style [ mxConstants . STYLE _INDICATOR _GRADIENTCOLOR ] : null } ;
mxGraph . prototype . getIndicatorShape = function ( a ) { return null != a && null != a . style ? a . style [ mxConstants . STYLE _INDICATOR _SHAPE ] : null } ; mxGraph . prototype . getIndicatorImage = function ( a ) { return null != a && null != a . style ? a . style [ mxConstants . STYLE _INDICATOR _IMAGE ] : null } ; mxGraph . prototype . getBorder = function ( ) { return this . border } ; mxGraph . prototype . setBorder = function ( a ) { this . border = a } ;
mxGraph . prototype . isSwimlane = function ( a ) { return null == a || this . model . getParent ( a ) == this . model . getRoot ( ) || this . model . isEdge ( a ) ? ! 1 : this . getCurrentCellStyle ( a ) [ mxConstants . STYLE _SHAPE ] == mxConstants . SHAPE _SWIMLANE } ; mxGraph . prototype . isResizeContainer = function ( ) { return this . resizeContainer } ; mxGraph . prototype . setResizeContainer = function ( a ) { this . resizeContainer = a } ; mxGraph . prototype . isEnabled = function ( ) { return this . enabled } ; mxGraph . prototype . setEnabled = function ( a ) { this . enabled = a } ;
mxGraph . prototype . isEscapeEnabled = function ( ) { return this . escapeEnabled } ; mxGraph . prototype . setEscapeEnabled = function ( a ) { this . escapeEnabled = a } ; mxGraph . prototype . isInvokesStopCellEditing = function ( ) { return this . invokesStopCellEditing } ; mxGraph . prototype . setInvokesStopCellEditing = function ( a ) { this . invokesStopCellEditing = a } ; mxGraph . prototype . isEnterStopsCellEditing = function ( ) { return this . enterStopsCellEditing } ; mxGraph . prototype . setEnterStopsCellEditing = function ( a ) { this . enterStopsCellEditing = a } ;
mxGraph . prototype . isCellLocked = function ( a ) { var b = this . model . getGeometry ( a ) ; return this . isCellsLocked ( ) || null != b && this . model . isVertex ( a ) && b . relative } ; mxGraph . prototype . isCellsLocked = function ( ) { return this . cellsLocked } ; mxGraph . prototype . setCellsLocked = function ( a ) { this . cellsLocked = a } ; mxGraph . prototype . getCloneableCells = function ( a ) { return this . model . filterCells ( a , mxUtils . bind ( this , function ( a ) { return this . isCellCloneable ( a ) } ) ) } ;
mxGraph . prototype . isCellCloneable = function ( a ) { a = this . getCurrentCellStyle ( a ) ; return this . isCellsCloneable ( ) && 0 != a [ mxConstants . STYLE _CLONEABLE ] } ; mxGraph . prototype . isCellsCloneable = function ( ) { return this . cellsCloneable } ; mxGraph . prototype . setCellsCloneable = function ( a ) { this . cellsCloneable = a } ; mxGraph . prototype . getExportableCells = function ( a ) { return this . model . filterCells ( a , mxUtils . bind ( this , function ( a ) { return this . canExportCell ( a ) } ) ) } ; mxGraph . prototype . canExportCell = function ( a ) { return this . exportEnabled } ;
mxGraph . prototype . getImportableCells = function ( a ) { return this . model . filterCells ( a , mxUtils . bind ( this , function ( a ) { return this . canImportCell ( a ) } ) ) } ; mxGraph . prototype . canImportCell = function ( a ) { return this . importEnabled } ; mxGraph . prototype . isCellSelectable = function ( a ) { return this . isCellsSelectable ( ) } ; mxGraph . prototype . isCellsSelectable = function ( ) { return this . cellsSelectable } ; mxGraph . prototype . setCellsSelectable = function ( a ) { this . cellsSelectable = a } ;
mxGraph . prototype . getDeletableCells = function ( a ) { return this . model . filterCells ( a , mxUtils . bind ( this , function ( a ) { return this . isCellDeletable ( a ) } ) ) } ; mxGraph . prototype . isCellDeletable = function ( a ) { a = this . getCurrentCellStyle ( a ) ; return this . isCellsDeletable ( ) && 0 != a [ mxConstants . STYLE _DELETABLE ] } ; mxGraph . prototype . isCellsDeletable = function ( ) { return this . cellsDeletable } ; mxGraph . prototype . setCellsDeletable = function ( a ) { this . cellsDeletable = a } ;
mxGraph . prototype . isLabelMovable = function ( a ) { return ! this . isCellLocked ( a ) && ( this . model . isEdge ( a ) && this . edgeLabelsMovable || this . model . isVertex ( a ) && this . vertexLabelsMovable ) } ; mxGraph . prototype . isCellRotatable = function ( a ) { return 0 != this . getCurrentCellStyle ( a ) [ mxConstants . STYLE _ROTATABLE ] } ; mxGraph . prototype . getMovableCells = function ( a ) { return this . model . filterCells ( a , mxUtils . bind ( this , function ( a ) { return this . isCellMovable ( a ) } ) ) } ;
mxGraph . prototype . isCellMovable = function ( a ) { var b = this . getCurrentCellStyle ( a ) ; return this . isCellsMovable ( ) && ! this . isCellLocked ( a ) && 0 != b [ mxConstants . STYLE _MOVABLE ] } ; mxGraph . prototype . isCellsMovable = function ( ) { return this . cellsMovable } ; mxGraph . prototype . setCellsMovable = function ( a ) { this . cellsMovable = a } ; mxGraph . prototype . isGridEnabled = function ( ) { return this . gridEnabled } ; mxGraph . prototype . setGridEnabled = function ( a ) { this . gridEnabled = a } ; mxGraph . prototype . isPortsEnabled = function ( ) { return this . portsEnabled } ;
mxGraph . prototype . setPortsEnabled = function ( a ) { this . portsEnabled = a } ; mxGraph . prototype . getGridSize = function ( ) { return this . gridSize } ; mxGraph . prototype . setGridSize = function ( a ) { this . gridSize = a } ; mxGraph . prototype . getTolerance = function ( ) { return this . tolerance } ; mxGraph . prototype . setTolerance = function ( a ) { this . tolerance = a } ; mxGraph . prototype . isVertexLabelsMovable = function ( ) { return this . vertexLabelsMovable } ; mxGraph . prototype . setVertexLabelsMovable = function ( a ) { this . vertexLabelsMovable = a } ;
mxGraph . prototype . isEdgeLabelsMovable = function ( ) { return this . edgeLabelsMovable } ; mxGraph . prototype . setEdgeLabelsMovable = function ( a ) { this . edgeLabelsMovable = a } ; mxGraph . prototype . isSwimlaneNesting = function ( ) { return this . swimlaneNesting } ; mxGraph . prototype . setSwimlaneNesting = function ( a ) { this . swimlaneNesting = a } ; mxGraph . prototype . isSwimlaneSelectionEnabled = function ( ) { return this . swimlaneSelectionEnabled } ; mxGraph . prototype . setSwimlaneSelectionEnabled = function ( a ) { this . swimlaneSelectionEnabled = a } ;
@ -1386,8 +1387,9 @@ mxGraphHandler.prototype.isEnabled=function(){return this.enabled};mxGraphHandle
mxGraphHandler . prototype . setSelectEnabled = function ( a ) { this . selectEnabled = a } ; mxGraphHandler . prototype . isRemoveCellsFromParent = function ( ) { return this . removeCellsFromParent } ; mxGraphHandler . prototype . setRemoveCellsFromParent = function ( a ) { this . removeCellsFromParent = a } ;
mxGraphHandler . prototype . isPropagateSelectionCell = function ( a , b ) { var c = this . graph . model . getParent ( a ) ; if ( b ) { var d = this . graph . getCellGeometry ( a ) ; return ! this . graph . model . isEdge ( a ) && ! this . graph . model . isEdge ( c ) && ! this . graph . isSiblingSelected ( a ) && ( null == d || d . relative || ! this . graph . isSwimlane ( c ) ) } return ! this . graph . isCellSelected ( c ) } ;
mxGraphHandler . prototype . getInitialCellForEvent = function ( a ) { var b = a . getState ( ) ; if ( ! this . graph . isToggleEvent ( a . getEvent ( ) ) && null != b && ! this . graph . isCellSelected ( b . cell ) ) { a = this . graph . model ; for ( var c = this . graph . view . getState ( a . getParent ( b . cell ) ) ; null != c && ! this . graph . isCellSelected ( c . cell ) && ( a . isVertex ( c . cell ) || a . isEdge ( c . cell ) ) && this . isPropagateSelectionCell ( b . cell , ! 0 ) ; ) b = c , c = this . graph . view . getState ( this . graph . getModel ( ) . getParent ( b . cell ) ) } return null != b ? b . cell : null } ;
mxGraphHandler . prototype . isDelayedSelection = function ( a , b ) { if ( ! this . graph . isToggleEvent ( b . getEvent ( ) ) ) for ( ; null != a ; ) { if ( this . graph . selectionCellsHandler . isHandled ( a ) ) return this . graph . cellEditor . getEditingCell ( ) != a ; a = this . graph . model . getParent ( a ) } return ! 1 } ;
mxGraphHandler . prototype . selectDelayed = function ( a ) { if ( ! this . graph . popupMenuHandler . isPopupTrigger ( a ) ) { var b = a . getCell ( ) ; null == b && ( b = this . cell ) ; var c = this . graph . view . getState ( b ) ; if ( null != c ) { if ( ! a . isSource ( c . control ) ) for ( var c = this . graph . getModel ( ) , d = c . getParent ( b ) ; null != this . graph . view . getState ( d ) && ( c . isVertex ( d ) || c . isEdge ( d ) ) && this . isPropagateSelectionCell ( b , ! 1 ) ; ) b = d , d = c . getParent ( b ) ; this . graph . selectCellForEvent ( b , a . getEvent ( ) ) } } } ; mxGraphHandler . prototype . consumeMouseEvent = function ( a , b ) { b . consume ( ) } ;
mxGraphHandler . prototype . isDelayedSelection = function ( a , b ) { if ( ! this . graph . isToggleEvent ( b . getEvent ( ) ) ) for ( ; null != a ; ) { if ( this . graph . selectionCellsHandler . isHandled ( a ) ) return this . graph . cellEditor . getEditingCell ( ) != a ; a = this . graph . model . getParent ( a ) } return this . graph . isToggleEvent ( b . getEvent ( ) ) } ;
mxGraphHandler . prototype . selectDelayed = function ( a ) { if ( ! this . graph . popupMenuHandler . isPopupTrigger ( a ) ) { var b = a . getCell ( ) ; null == b && ( b = this . cell ) ; var c = this . graph . view . getState ( b ) ; if ( null != c ) { if ( ! a . isSource ( c . control ) && ! this . graph . isToggleEvent ( a . getEvent ( ) ) ) for ( var c = this . graph . getModel ( ) , d = c . getParent ( b ) ; null != this . graph . view . getState ( d ) && ( c . isVertex ( d ) || c . isEdge ( d ) ) && this . isPropagateSelectionCell ( b , ! 1 ) ; ) b = d , d = c . getParent ( b ) ; this . graph . selectCellForEvent ( b , a . getEvent ( ) ) } } } ;
mxGraphHandler . prototype . consumeMouseEvent = function ( a , b ) { b . consume ( ) } ;
mxGraphHandler . prototype . mouseDown = function ( a , b ) { if ( ! b . isConsumed ( ) && this . isEnabled ( ) && this . graph . isEnabled ( ) && null != b . getState ( ) && ! mxEvent . isMultiTouchEvent ( b . getEvent ( ) ) ) { var c = this . getInitialCellForEvent ( b ) ; this . delayedSelection = this . isDelayedSelection ( c , b ) ; this . cell = null ; this . isSelectEnabled ( ) && ! this . delayedSelection && this . graph . selectCellForEvent ( c , b . getEvent ( ) ) ; if ( this . isMoveEnabled ( ) ) { var d = this . graph . model , e = d . getGeometry ( c ) ; this . graph . isCellMovable ( c ) && ( ! d . isEdge ( c ) || 1 < this . graph . getSelectionCount ( ) ||
null != e . points && 0 < e . points . length || null == d . getTerminal ( c , ! 0 ) || null == d . getTerminal ( c , ! 1 ) || this . graph . allowDanglingEdges || this . graph . isCloneEvent ( b . getEvent ( ) ) && this . graph . isCellsCloneable ( ) ) ? this . start ( c , b . getX ( ) , b . getY ( ) ) : this . delayedSelection && ( this . cell = c ) ; this . cellWasClicked = ! 0 ; this . consumeMouseEvent ( mxEvent . MOUSE _DOWN , b ) } } } ;
mxGraphHandler . prototype . getGuideStates = function ( ) { var a = this . graph . getDefaultParent ( ) , b = this . graph . getModel ( ) , c = mxUtils . bind ( this , function ( a ) { return null != this . graph . view . getState ( a ) && b . isVertex ( a ) && null != b . getGeometry ( a ) && ! b . getGeometry ( a ) . relative } ) ; return this . graph . view . getCellStates ( b . filterDescendants ( c , a ) ) } ; mxGraphHandler . prototype . getCells = function ( a ) { return ! this . delayedSelection && this . graph . isCellMovable ( a ) ? [ a ] : this . graph . getMovableCells ( this . graph . getSelectionCells ( ) ) } ;
@ -1414,7 +1416,7 @@ mxGraphHandler.prototype.suspend=function(){this.suspended||(this.livePreviewUse
mxGraphHandler . prototype . resetLivePreview = function ( ) { null != this . allCells && ( this . allCells . visit ( mxUtils . bind ( this , function ( a , b ) { null != b . shape && null != b . shape . originalPointerEvents && ( b . shape . pointerEvents = b . shape . originalPointerEvents , b . shape . originalPointerEvents = null , b . shape . bounds = null , null != b . text && ( b . text . pointerEvents = b . text . originalPointerEvents , b . text . originalPointerEvents = null ) ) ; null != b . control && null != b . control . node && "hidden" == b . control . node . style . visibility && ( b . control . node . style . visibility =
"" ) ; b . view . invalidate ( b . cell ) } ) ) , this . graph . view . validate ( ) ) } ; mxGraphHandler . prototype . setHandlesVisibleForCells = function ( a , b ) { if ( this . handlesVisible != b ) { this . handlesVisible = b ; for ( var c = 0 ; c < a . length ; c ++ ) { var d = this . graph . selectionCellsHandler . getHandler ( a [ c ] ) ; null != d && ( d . setHandlesVisible ( b ) , b && d . redraw ( ) ) } } } ; mxGraphHandler . prototype . setHighlightColor = function ( a ) { null != this . highlight && this . highlight . setHighlightColor ( a ) } ;
mxGraphHandler . prototype . mouseUp = function ( a , b ) { if ( ! b . isConsumed ( ) ) if ( this . livePreviewUsed && this . resetLivePreview ( ) , null == this . cell || null == this . first || null == this . shape && ! this . livePreviewUsed || null == this . currentDx || null == this . currentDy ) this . isSelectEnabled ( ) && this . delayedSelection && null != this . cell && this . selectDelayed ( b ) ; else { var c = this . graph , d = b . getCell ( ) ; if ( this . connectOnDrop && null == this . target && null != d && c . getModel ( ) . isVertex ( d ) && c . isCellConnectable ( d ) && c . isEdgeValid ( null , this . cell , d ) ) c . connectionHandler . connect ( this . cell ,
d , b . getEvent ( ) ) ; else { var d = c . isCloneEvent ( b . getEvent ( ) ) && c . isCellsCloneable ( ) && this . isCloneEnabled ( ) , e = c . getView ( ) . scale , f = this . roundLength ( this . currentDx / e ) , e = this . roundLength ( this . currentDy / e ) , g = this . target ; c . isSplitEnabled ( ) && c . isSplitTarget ( g , this . cells , b . getEvent ( ) ) ? c . splitEdge ( g , this . cells , null , f , e ): this . moveCells ( this . cells , f , e , d , this . target , b . getEvent ( ) ) } } this . cellWasClicked && this . consumeMouseEvent ( mxEvent . MOUSE _UP , b ) ; this . reset ( ) } ;
d , b . getEvent ( ) ) ; else { var d = c . isCloneEvent ( b . getEvent ( ) ) && c . isCellsCloneable ( ) && this . isCloneEnabled ( ) , e = c . getView ( ) . scale , f = this . roundLength ( this . currentDx / e ) , e = this . roundLength ( this . currentDy / e ) , g = this . target ; c . isSplitEnabled ( ) && c . isSplitTarget ( g , this . cells , b . getEvent ( ) ) ? c . splitEdge ( g , this . cells , null , f , e ,b . getGraphX ( ) , b . getGraphY ( ) ): this . moveCells ( this . cells , f , e , d , this . target , b . getEvent ( ) ) } } this . cellWasClicked && this . consumeMouseEvent ( mxEvent . MOUSE _UP , b ) ; this . reset ( ) } ;
mxGraphHandler . prototype . reset = function ( ) { this . livePreviewUsed && ( this . resetLivePreview ( ) , this . setHandlesVisibleForCells ( this . graph . selectionCellsHandler . getHandledSelectionCells ( ) , ! 0 ) ) ; this . destroyShapes ( ) ; this . removeHint ( ) ; this . delayedSelection = ! 1 ; this . livePreviewUsed = this . livePreviewActive = null ; this . cellWasClicked = ! 1 ; this . cellCount = this . currentDy = this . currentDx = this . suspended = null ; this . cloning = ! 1 ; this . cell = this . cells = this . first = this . target = this . guides = this . pBounds = this . allCells = null } ;
mxGraphHandler . prototype . shouldRemoveCellsFromParent = function ( a , b , c ) { if ( this . graph . getModel ( ) . isVertex ( a ) && ( a = this . graph . getView ( ) . getState ( a ) , null != a ) ) { c = mxUtils . convertPoint ( this . graph . container , mxEvent . getClientX ( c ) , mxEvent . getClientY ( c ) ) ; var d = mxUtils . toRadians ( mxUtils . getValue ( a . style , mxConstants . STYLE _ROTATION ) || 0 ) ; if ( 0 != d ) { b = Math . cos ( - d ) ; var d = Math . sin ( - d ) , e = new mxPoint ( a . getCenterX ( ) , a . getCenterY ( ) ) ; c = mxUtils . getRotatedPoint ( c , b , d , e ) } return ! mxUtils . contains ( a , c . x , c . y ) } return ! 1 } ;
mxGraphHandler . prototype . moveCells = function ( a , b , c , d , e , f ) { d && ( a = this . graph . getCloneableCells ( a ) ) ; var g = this . graph . getModel ( ) . getParent ( this . cell ) ; null == e && this . isRemoveCellsFromParent ( ) && this . shouldRemoveCellsFromParent ( g , a , f ) && ( e = this . graph . getDefaultParent ( ) ) ; d = d && ! this . graph . isCellLocked ( e || this . graph . getDefaultParent ( ) ) ; this . graph . getModel ( ) . beginUpdate ( ) ; try { g = [ ] ; if ( ! d && null != e && this . removeEmptyParents ) { for ( var k = new mxDictionary , l = 0 ; l < a . length ; l ++ ) k . put ( a [ l ] , ! 0 ) ; for ( l = 0 ; l < a . length ; l ++ ) { var m =
@ -1543,7 +1545,7 @@ mxRubberband.prototype.reset=function(){if(null!=this.div)if(mxClient.IS_SVG&&(!
this . currentX = 0 ; this . div = this . first = null } ; mxRubberband . prototype . update = function ( a , b ) { this . currentX = a ; this . currentY = b ; this . repaint ( ) } ;
mxRubberband . prototype . repaint = function ( ) { if ( null != this . div ) { var a = this . currentX - this . graph . panDx , b = this . currentY - this . graph . panDy ; this . x = Math . min ( this . first . x , a ) ; this . y = Math . min ( this . first . y , b ) ; this . width = Math . max ( this . first . x , a ) - this . x ; this . height = Math . max ( this . first . y , b ) - this . y ; a = mxClient . IS _VML ? this . graph . panDy : 0 ; this . div . style . left = this . x + ( mxClient . IS _VML ? this . graph . panDx : 0 ) + "px" ; this . div . style . top = this . y + a + "px" ; this . div . style . width = Math . max ( 1 , this . width ) + "px" ; this . div . style . height = Math . max ( 1 ,
this . height ) + "px" } } ; mxRubberband . prototype . destroy = function ( ) { this . destroyed || ( this . destroyed = ! 0 , this . graph . removeMouseListener ( this ) , this . graph . removeListener ( this . forceRubberbandHandler ) , this . graph . removeListener ( this . panHandler ) , this . reset ( ) , null != this . sharedDiv && ( this . sharedDiv = null ) ) } ; function mxHandle ( a , b , c , d ) { this . graph = a . view . graph ; this . state = a ; this . cursor = null != b ? b : this . cursor ; this . image = null != c ? c : this . image ; this . shape = null != d ? d : null ; this . init ( ) } mxHandle . prototype . cursor = "default" ;
mxHandle . prototype . image = null ; mxHandle . prototype . ignoreGrid = ! 1 ; mxHandle . prototype . getPosition = function ( a ) { } ; mxHandle . prototype . setPosition = function ( a , b , c ) { } ; mxHandle . prototype . execute = function ( ) { } ; mxHandle . prototype . copyStyle = function ( a ) { this . graph . setCellStyles ( a , this . state . style [ a ] , [ this . state . cell ] ) } ;
mxHandle . prototype . image = null ; mxHandle . prototype . ignoreGrid = ! 1 ; mxHandle . prototype . getPosition = function ( a ) { } ; mxHandle . prototype . setPosition = function ( a , b , c ) { } ; mxHandle . prototype . execute = function ( a ) { } ; mxHandle . prototype . copyStyle = function ( a ) { this . graph . setCellStyles ( a , this . state . style [ a ] , [ this . state . cell ] ) } ;
mxHandle . prototype . processEvent = function ( a ) { var b = this . graph . view . scale , c = this . graph . view . translate , c = new mxPoint ( a . getGraphX ( ) / b - c . x , a . getGraphY ( ) / b - c . y ) ; null != this . shape && null != this . shape . bounds && ( c . x -= this . shape . bounds . width / b / 4 , c . y -= this . shape . bounds . height / b / 4 ) ; var b = - mxUtils . toRadians ( this . getRotation ( ) ) , d = - mxUtils . toRadians ( this . getTotalRotation ( ) ) - b , c = this . flipPoint ( this . rotatePoint ( this . snapPoint ( this . rotatePoint ( c , b ) , this . ignoreGrid || ! this . graph . isGridEnabledEvent ( a . getEvent ( ) ) ) , d ) ) ; this . setPosition ( this . state . getPaintBounds ( ) ,
c , a ) ; this . positionChanged ( ) ; this . redraw ( ) } ; mxHandle . prototype . positionChanged = function ( ) { null != this . state . text && this . state . text . apply ( this . state ) ; null != this . state . shape && this . state . shape . apply ( this . state ) ; this . graph . cellRenderer . redraw ( this . state , ! 0 ) } ; mxHandle . prototype . getRotation = function ( ) { return null != this . state . shape ? this . state . shape . getRotation ( ) : 0 } ; mxHandle . prototype . getTotalRotation = function ( ) { return null != this . state . shape ? this . state . shape . getShapeRotation ( ) : 0 } ;
mxHandle . prototype . init = function ( ) { var a = this . isHtmlRequired ( ) ; null != this . image ? ( this . shape = new mxImageShape ( new mxRectangle ( 0 , 0 , this . image . width , this . image . height ) , this . image . src ) , this . shape . preserveImageAspect = ! 1 ) : null == this . shape && ( this . shape = this . createShape ( a ) ) ; this . initShape ( a ) } ; mxHandle . prototype . createShape = function ( a ) { a = new mxRectangle ( 0 , 0 , mxConstants . HANDLE _SIZE , mxConstants . HANDLE _SIZE ) ; return new mxRectangleShape ( a , mxConstants . HANDLE _FILLCOLOR , mxConstants . HANDLE _STROKECOLOR ) } ;
@ -1578,8 +1580,9 @@ c==mxEvent.ROTATION_HANDLE&&(b=this.getRotationHandlePosition(),a=b.x-this.state
null != this . customHandles && this . customHandles [ mxEvent . CUSTOM _HANDLE - c ] . setVisible ( ! 0 ) , c = this . graph . getEdges ( this . state . cell ) , this . edgeHandlers = [ ] , a = 0 ; a < c . length ; a ++ ) b = this . graph . selectionCellsHandler . getHandler ( c [ a ] ) , null != b && this . edgeHandlers . push ( b ) } } ; mxVertexHandler . prototype . setHandlesVisible = function ( a ) { if ( null != this . sizers ) for ( var b = 0 ; b < this . sizers . length ; b ++ ) this . sizers [ b ] . node . style . display = a ? "" : "none" ; if ( null != this . customHandles ) for ( b = 0 ; b < this . customHandles . length ; b ++ ) this . customHandles [ b ] . setVisible ( a ) } ;
mxVertexHandler . prototype . hideSizers = function ( ) { this . setHandlesVisible ( ! 1 ) } ; mxVertexHandler . prototype . checkTolerance = function ( a ) { this . inTolerance && null != this . startX && null != this . startY && ( mxEvent . isMouseEvent ( a . getEvent ( ) ) || Math . abs ( a . getGraphX ( ) - this . startX ) > this . graph . tolerance || Math . abs ( a . getGraphY ( ) - this . startY ) > this . graph . tolerance ) && ( this . inTolerance = ! 1 ) } ; mxVertexHandler . prototype . updateHint = function ( a ) { } ; mxVertexHandler . prototype . removeHint = function ( ) { } ;
mxVertexHandler . prototype . roundAngle = function ( a ) { return Math . round ( 10 * a ) / 10 } ; mxVertexHandler . prototype . roundLength = function ( a ) { return Math . round ( 100 * a ) / 100 } ;
mxVertexHandler . prototype . mouseMove = function ( a , b ) { b . isConsumed ( ) || null == this . index ? this . graph . isMouseDown || null == this . getHandleForEvent ( b ) || b . consume ( ! 1 ) : ( this . checkTolerance ( b ) , this . inTolerance || ( this . index <= mxEvent . CUSTOM _HANDLE ? null != this . customHandles && ( this . customHandles [ mxEvent . CUSTOM _HANDLE - this . index ] . processEvent ( b ) , this . customHandles [ mxEvent . CUSTOM _HANDLE - this . index ] . active = ! 0 ) : this . index == mxEvent . LABEL _HANDLE ? this . moveLabel ( b ) : this . index == mxEvent . ROTATION _HANDLE ? this . rotateVertex ( b ) : ( this . resizeVertex ( b ) ,
this . updateHint ( b ) ) ) , b . consume ( ) ) } ; mxVertexHandler . prototype . moveLabel = function ( a ) { var b = new mxPoint ( a . getGraphX ( ) , a . getGraphY ( ) ) , c = this . graph . view . translate , d = this . graph . view . scale ; this . graph . isGridEnabledEvent ( a . getEvent ( ) ) && ( b . x = ( this . graph . snap ( b . x / d - c . x ) + c . x ) * d , b . y = ( this . graph . snap ( b . y / d - c . y ) + c . y ) * d ) ; this . moveSizerTo ( this . sizers [ null != this . rotationShape ? this . sizers . length - 2 : this . sizers . length - 1 ] , b . x , b . y ) } ;
mxVertexHandler . prototype . mouseMove = function ( a , b ) { b . isConsumed ( ) || null == this . index ? this . graph . isMouseDown || null == this . getHandleForEvent ( b ) || b . consume ( ! 1 ) : ( this . checkTolerance ( b ) , this . inTolerance || ( this . index <= mxEvent . CUSTOM _HANDLE ? null != this . customHandles && ( this . customHandles [ mxEvent . CUSTOM _HANDLE - this . index ] . processEvent ( b ) , this . customHandles [ mxEvent . CUSTOM _HANDLE - this . index ] . active = ! 0 , this . isMoveCustomHandlePreviewToFront ( this . customHandles [ mxEvent . CUSTOM _HANDLE - this . index ] ) && this . moveToFront ( ) ) :
this . index == mxEvent . LABEL _HANDLE ? this . moveLabel ( b ) : this . index == mxEvent . ROTATION _HANDLE ? this . rotateVertex ( b ) : ( this . resizeVertex ( b ) , this . updateHint ( b ) ) ) , b . consume ( ) ) } ; mxVertexHandler . prototype . isMoveCustomHandlePreviewToFront = function ( a ) { return ! 1 } ;
mxVertexHandler . prototype . moveLabel = function ( a ) { var b = new mxPoint ( a . getGraphX ( ) , a . getGraphY ( ) ) , c = this . graph . view . translate , d = this . graph . view . scale ; this . graph . isGridEnabledEvent ( a . getEvent ( ) ) && ( b . x = ( this . graph . snap ( b . x / d - c . x ) + c . x ) * d , b . y = ( this . graph . snap ( b . y / d - c . y ) + c . y ) * d ) ; this . moveSizerTo ( this . sizers [ null != this . rotationShape ? this . sizers . length - 2 : this . sizers . length - 1 ] , b . x , b . y ) } ;
mxVertexHandler . prototype . rotateVertex = function ( a ) { var b = new mxPoint ( a . getGraphX ( ) , a . getGraphY ( ) ) , c = this . state . x + this . state . width / 2 - b . x , d = this . state . y + this . state . height / 2 - b . y ; this . currentAlpha = 0 != c ? 180 * Math . atan ( d / c ) / Math . PI + 90 : 0 > d ? 180 : 0 ; 0 < c && ( this . currentAlpha -= 180 ) ; this . currentAlpha -= this . startAngle ; this . rotationRaster && this . graph . isGridEnabledEvent ( a . getEvent ( ) ) ? ( c = b . x - this . state . getCenterX ( ) , d = b . y - this . state . getCenterY ( ) , a = Math . sqrt ( c * c + d * d ) , raster = 2 > a - this . startDist ? 15 : 25 > a - this . startDist ? 5 :
1 , this . currentAlpha = Math . round ( this . currentAlpha / raster ) * raster ) : this . currentAlpha = this . roundAngle ( this . currentAlpha ) ; this . selectionBorder . rotation = this . currentAlpha ; this . selectionBorder . redraw ( ) ; this . livePreviewActive && this . redrawHandles ( ) } ;
mxVertexHandler . prototype . resizeVertex = function ( a ) { var b = new mxPoint ( this . state . getCenterX ( ) , this . state . getCenterY ( ) ) , c = mxUtils . toRadians ( this . state . style [ mxConstants . STYLE _ROTATION ] || "0" ) , d = new mxPoint ( a . getGraphX ( ) , a . getGraphY ( ) ) , e = this . graph . view . translate , f = this . graph . view . scale , g = Math . cos ( - c ) , k = Math . sin ( - c ) , l = d . x - this . startX , m = d . y - this . startY , d = k * l + g * m , l = g * l - k * m , m = d , g = this . graph . getCellGeometry ( this . state . cell ) ; this . unscaledBounds = this . union ( g , l / f , m / f , this . index , this . graph . isGridEnabledEvent ( a . getEvent ( ) ) ,
@ -1589,11 +1592,11 @@ k.y+k.height&&(this.unscaledBounds.height-=this.unscaledBounds.y+this.unscaledBo
k = Math . sin ( c ) ; c = new mxPoint ( this . bounds . getCenterX ( ) , this . bounds . getCenterY ( ) ) ; l = c . x - b . x ; m = c . y - b . y ; b = g * l - k * m - l ; c = k * l + g * m - m ; l = this . bounds . x - this . state . x ; m = this . bounds . y - this . state . y ; e = g * l - k * m ; g = k * l + g * m ; this . bounds . x += b ; this . bounds . y += c ; this . unscaledBounds . x = this . roundLength ( this . unscaledBounds . x + b / f ) ; this . unscaledBounds . y = this . roundLength ( this . unscaledBounds . y + c / f ) ; this . unscaledBounds . width = this . roundLength ( this . unscaledBounds . width ) ; this . unscaledBounds . height = this . roundLength ( this . unscaledBounds . height ) ;
this . graph . isCellCollapsed ( this . state . cell ) || 0 == b && 0 == c ? this . childOffsetY = this . childOffsetX = 0 : ( this . childOffsetX = this . state . x - this . bounds . x + e , this . childOffsetY = this . state . y - this . bounds . y + g ) ; d . equals ( this . bounds ) || ( this . livePreviewActive && this . updateLivePreview ( a ) , null != this . preview ? this . drawPreview ( ) : this . updateParentHighlight ( ) ) } ;
mxVertexHandler . prototype . updateLivePreview = function ( a ) { var b = this . graph . view . scale , c = this . graph . view . translate ; a = this . state . clone ( ) ; this . state . x = this . bounds . x ; this . state . y = this . bounds . y ; this . state . origin = new mxPoint ( this . state . x / b - c . x , this . state . y / b - c . y ) ; this . state . width = this . bounds . width ; this . state . height = this . bounds . height ; b = this . state . absoluteOffset ; new mxPoint ( b . x , b . y ) ; this . state . absoluteOffset . x = 0 ; this . state . absoluteOffset . y = 0 ; b = this . graph . getCellGeometry ( this . state . cell ) ; null != b && ( c = b . offset ||
this . EMPTY _POINT , null == c || b . relative || ( this . state . absoluteOffset . x = this . state . view . scale * c . x , this . state . absoluteOffset . y = this . state . view . scale * c . y ) , this . state . view . updateVertexLabelOffset ( this . state ) ) ; this . state . view . graph . cellRenderer . redraw ( this . state , ! 0 ) ; this . state . view . invalidate ( this . state . cell ) ; this . state . invalid = ! 1 ; this . state . view . validate ( ) ; this . redrawHandles ( ) ; if( null != this . state . text && null != this . state . text . node && null != this . state . text . node . nextSibling || null != this . state . shape && null != this . state . shape . node &&
null != this . state . shape . node . nextSibling && ( null == this . state . text || this . state . shape . node . nextSibling != this . state . text . node ) ) null != this . state . shape && null != this . state . shape . node && this . state . shape . node . parentNode . appendChild ( this . state . shape . node ) , null != this . state . text && null != this . state . text . node && this . state . text . node . parentNode . appendChild ( this . state . text . node ) ;null != this . state . control && null != this . state . control . node && ( this . state . control . node . style . visibility = "hidden" ) ; this . state . setState ( a ) };
mxVertexHandler . prototype . mouseUp = function ( a , b ) { if ( null != this . index && null != this . state ) { var c = new mxPoint ( b . getGraphX ( ) , b . getGraphY ( ) ) , d = this . index ; this . index = null ; this . graph. getModel ( ) . beginUpdate ( ) ; try { if ( d <= mxEvent . CUSTOM _HANDLE ) null != this . customHandles && ( this . customHandles [ mxEvent . CUSTOM _HANDLE - d ] . active = ! 1 , this . customHandles [ mxEvent . CUSTOM _HANDLE - d ] . execute ( ) ) ; else if ( d == mxEvent . ROTATION _HANDLE ) if ( null != this . currentAlpha ) { var e = this . currentAlpha - ( this . state . style [ mxConstants . STYLE _ROTATION ] ||
0 ) ; 0 != e && this . rotateCell ( this . state . cell , e ) } else this . rotateClick ( ) ; else { var f = this . graph . isGridEnabledEvent ( b . getEvent ( ) ) , g = mxUtils . toRadians ( this . state . style [ mxConstants . STYLE _ROTATION ] || "0" ) , k = Math . cos ( - g ) , l = Math . sin ( - g ) , m = c . x - this . startX , n = c . y - this . startY , c = l * m + k * n , m = k * m - l * n , n = c , p = this . graph . view . scale , q = this . isRecursiveResize ( this . state , b ) ; this . resizeCell ( this . state . cell , this . roundLength ( m / p ) , this . roundLength ( n / p ) , d , f , this . isConstrainedEvent ( b ) , q ) } } finally { this . graph . getModel ( ) . endUpdate ( ) } b . consume ( ) ;
this . reset ( ) } } ; mxVertexHandler . prototype . isRecursiveResize = function ( a , b ) { return this . graph . isRecursiveResize ( this . state ) } ; mxVertexHandler . prototype . rotateClick = function ( ) { } ;
this . EMPTY _POINT , null == c || b . relative || ( this . state . absoluteOffset . x = this . state . view . scale * c . x , this . state . absoluteOffset . y = this . state . view . scale * c . y ) , this . state . view . updateVertexLabelOffset ( this . state ) ) ; this . state . view . graph . cellRenderer . redraw ( this . state , ! 0 ) ; this . state . view . invalidate ( this . state . cell ) ; this . state . invalid = ! 1 ; this . state . view . validate ( ) ; this . redrawHandles ( ) ; this. moveToFront ( ) ; null != this . state . control && null != this . state . control . node && ( this . state . control . node . style . visibility = "hidden" ) ; this . state . setState ( a ) } ;
mxVertexHandler . prototype . moveToFront = function ( ) { if ( null != this . state . text && null != this . state . text . node && null != this . state . text . node . nextSibling || null != this . state . shape && null != this . state . shape . node && null != this . state . shape . node . nextSibling && ( null == this . state . text || this . state . shape . node . nextSibling != this . state . text . node ) ) null != this . state . shape && null != this . state . shape . node && this . state . shape . node . parentNode . appendChild ( this . state . shape . node ) , null != this . state . text && null != this . state . text . node && this . state . text . node . parentNode . appendChild ( this . state . text . node ) };
mxVertexHandler . prototype . mouseUp = function ( a , b ) { if ( null != this . index && null != this . state ) { var c = new mxPoint ( b . getGraphX ( ) , b . getGraphY ( ) ) , d = this . index ; this . index = null ; this . state. view . invalidate ( this . state . cell , ! 1 , ! 1 ) ; this . state . view . validate ( ) ; this . graph. getModel ( ) . beginUpdate ( ) ; try { if ( d <= mxEvent . CUSTOM _HANDLE ) null != this . customHandles && ( this . customHandles [ mxEvent . CUSTOM _HANDLE - d ] . active = ! 1 , this . customHandles [ mxEvent . CUSTOM _HANDLE - d ] . execute ( b ) ) ; else if ( d == mxEvent . ROTATION _HANDLE ) if ( null != this . currentAlpha ) { var e =
this . currentAlpha - ( this . state . style [ mxConstants . STYLE _ROTATION ] || 0 ) ; 0 != e && this . rotateCell ( this . state . cell , e ) } else this . rotateClick ( ) ; else { var f = this . graph . isGridEnabledEvent ( b . getEvent ( ) ) , g = mxUtils . toRadians ( this . state . style [ mxConstants . STYLE _ROTATION ] || "0" ) , k = Math . cos ( - g ) , l = Math . sin ( - g ) , m = c . x - this . startX , n = c . y - this . startY , c = l * m + k * n , m = k * m - l * n , n = c , p = this . graph . view . scale , q = this . isRecursiveResize ( this . state , b ) ; this . resizeCell ( this . state . cell , this . roundLength ( m / p ) , this . roundLength ( n / p ) , d , f , this . isConstrainedEvent ( b ) ,
q ) } } finally { this . graph . getModel ( ) . endUpdate ( ) } b . consume ( ) ; this . reset ( ) } } ; mxVertexHandler . prototype . isRecursiveResize = function ( a , b ) { return this . graph . isRecursiveResize ( this . state ) } ; mxVertexHandler . prototype . rotateClick = function ( ) { } ;
mxVertexHandler . prototype . rotateCell = function ( a , b , c ) { if ( 0 != b ) { var d = this . graph . getModel ( ) ; if ( d . isVertex ( a ) || d . isEdge ( a ) ) { if ( ! d . isEdge ( a ) ) { var e = ( this . graph . getCurrentCellStyle ( a ) [ mxConstants . STYLE _ROTATION ] || 0 ) + b ; this . graph . setCellStyles ( mxConstants . STYLE _ROTATION , e , [ a ] ) } e = this . graph . getCellGeometry ( a ) ; if ( null != e ) { var f = this . graph . getCellGeometry ( c ) ; null == f || d . isEdge ( c ) || ( e = e . clone ( ) , e . rotate ( b , new mxPoint ( f . width / 2 , f . height / 2 ) ) , d . setGeometry ( a , e ) ) ; if ( d . isVertex ( a ) && ! e . relative || d . isEdge ( a ) ) for ( c =
d . getChildCount ( a ) , e = 0 ; e < c ; e ++ ) this . rotateCell ( d . getChildAt ( a , e ) , b , a ) } } } } ;
mxVertexHandler . prototype . reset = function ( ) { null != this . sizers && null != this . index && null != this . sizers [ this . index ] && "none" == this . sizers [ this . index ] . node . style . display && ( this . sizers [ this . index ] . node . style . display = "" ) ; this . index = this . inTolerance = this . currentAlpha = null ; null != this . preview && ( this . preview . destroy ( ) , this . preview = null ) ; if ( this . livePreviewActive && null != this . sizers ) { for ( var a = 0 ; a < this . sizers . length ; a ++ ) null != this . sizers [ a ] && ( this . sizers [ a ] . node . style . display = "" ) ; null != this . state . control && null !=
@ -1669,7 +1672,7 @@ this.customHandles&&this.customHandles[mxEvent.CUSTOM_HANDLE-this.index].process
else if ( this . outlineConnect ) { var d = this . isSource || this . isTarget ? this . isOutlineConnectEvent ( b ) : ! 1 ; d ? c = this . marker . highlight . state : null != c && c != b . getState ( ) && this . graph . isCellConnectable ( b . getCell ( ) ) && null != this . marker . highlight . shape && ( this . marker . highlight . shape . stroke = "transparent" , this . marker . highlight . repaint ( ) , c = null ) } null == c || this . isCellEnabled ( c . cell ) || ( c = null , this . marker . reset ( ) ) ; var e = this . clonePreviewState ( this . currentPoint , null != c ? c . cell : null ) ; this . updatePreviewState ( e , this . currentPoint ,
c , b , d ) ; this . setPreviewColor ( null == this . error ? this . marker . validColor : this . marker . invalidColor ) ; this . abspoints = e . absolutePoints ; this . active = ! 0 ; this . updateHint ( b , this . currentPoint ) } this . drawPreview ( ) ; mxEvent . consume ( b . getEvent ( ) ) ; b . consume ( ) } else mxClient . IS _IE && null != this . getHandleForEvent ( b ) && b . consume ( ! 1 ) } ;
mxEdgeHandler . prototype . mouseUp = function ( a , b ) { if ( null != this . index && null != this . marker ) { var c = this . state . cell , d = this . index ; this . index = null ; if ( b . getX ( ) != this . startX || b . getY ( ) != this . startY ) { var e = ! this . graph . isIgnoreTerminalEvent ( b . getEvent ( ) ) && this . graph . isCloneEvent ( b . getEvent ( ) ) && this . cloneEnabled && this . graph . isCellsCloneable ( ) ; if ( null != this . error ) 0 < this . error . length && this . graph . validationAlert ( this . error ) ; else if ( d <= mxEvent . CUSTOM _HANDLE && d > mxEvent . VIRTUAL _HANDLE ) { if ( null != this . customHandles ) { var f =
this . graph . getModel ( ) ; f . beginUpdate ( ) ; try { this . customHandles [ mxEvent . CUSTOM _HANDLE - d ] . execute ( ) } finally { f . endUpdate ( ) } } } else if ( this . isLabel ) this . moveLabel ( this . state , this . label . x , this . label . y ) ; else if ( this . isSource || this . isTarget ) if ( d = null , null != this . constraintHandler . currentConstraint && null != this . constraintHandler . currentFocus && ( d = this . constraintHandler . currentFocus . cell ) , null == d && this . marker . hasValidState ( ) && null != this . marker . highlight && null != this . marker . highlight . shape && "transparent" != this . marker . highlight . shape . stroke &&
this . graph . getModel ( ) ; f . beginUpdate ( ) ; try { this . customHandles [ mxEvent . CUSTOM _HANDLE - d ] . execute ( b ) } finally { f . endUpdate ( ) } } } else if ( this . isLabel ) this . moveLabel ( this . state , this . label . x , this . label . y ) ; else if ( this . isSource || this . isTarget ) if ( d = null , null != this . constraintHandler . currentConstraint && null != this . constraintHandler . currentFocus && ( d = this . constraintHandler . currentFocus . cell ) , null == d && this . marker . hasValidState ( ) && null != this . marker . highlight && null != this . marker . highlight . shape && "transparent" != this . marker . highlight . shape . stroke &&
"white" != this . marker . highlight . shape . stroke && ( d = this . marker . validState . cell ) , null != d ) { var f = this . graph . getModel ( ) , g = f . getParent ( c ) ; f . beginUpdate ( ) ; try { if ( e ) { var k = f . getGeometry ( c ) , e = this . graph . cloneCell ( c ) ; f . add ( g , e , f . getChildCount ( g ) ) ; null != k && ( k = k . clone ( ) , f . setGeometry ( e , k ) ) ; var l = f . getTerminal ( c , ! this . isSource ) ; this . graph . connectCell ( e , l , ! this . isSource ) ; c = e } c = this . connect ( c , d , this . isSource , e , b ) } finally { f . endUpdate ( ) } } else this . graph . isAllowDanglingEdges ( ) && ( f = this . abspoints [ this . isSource ? 0 : this . abspoints . length -
1 ] , f . x = this . roundLength ( f . x / this . graph . view . scale - this . graph . view . translate . x ) , f . y = this . roundLength ( f . y / this . graph . view . scale - this . graph . view . translate . y ) , k = this . graph . getView ( ) . getState ( this . graph . getModel ( ) . getParent ( c ) ) , null != k && ( f . x -= k . origin . x , f . y -= k . origin . y ) , f . x -= this . graph . panDx / this . graph . view . scale , f . y -= this . graph . panDy / this . graph . view . scale , c = this . changeTerminalPoint ( c , f , this . isSource , e ) ) ; else this . active ? c = this . changePoints ( c , this . points , e ) : ( this . graph . getView ( ) . invalidate ( this . state . cell ) ,
this . graph . getView ( ) . validate ( this . state . cell ) ) } else this . graph . isToggleEvent ( b . getEvent ( ) ) && this . graph . selectCellForEvent ( this . state . cell , b . getEvent ( ) ) ; null != this . marker && ( this . reset ( ) , c != this . state . cell && this . graph . setSelectionCell ( c ) ) ; b . consume ( ) } } ;