! function ( a ) { "use strict" ; function b ( a ) { var b = this . internal = new c ( this ) ; b . loadConfig ( a ) , b . init ( ) , function d ( a , b , c ) { for ( var e in a ) b [ e ] = a [ e ] . bind ( c ) , Object . keys ( a [ e ] ) . length > 0 && d ( a [ e ] , b [ e ] , c ) } ( e , this , this ) } function c ( b ) { var c = this ; c . d3 = a . d3 ? a . d3 : "undefined" != typeof require ? require ( "d3" ) : void 0 , c . api = b , c . config = c . getDefaultConfig ( ) , c . data = { } , c . cache = { } , c . axes = { } } function d ( a , b ) { function c ( a , b ) { a . attr ( "transform" , function ( a ) { return "translate(" + Math . ceil ( b ( a ) + s ) + ", 0)" } ) } function d ( a , b ) { a . attr ( "transform" , function ( a ) { return "translate(0," + Math . ceil ( b ( a ) ) + ")" } ) } function e ( a ) { var b = a [ 0 ] , c = a [ a . length - 1 ] ; return c > b ? [ b , c ] : [ c , b ] } function f ( a ) { var b , c , d = [ ] ; if ( a . ticks ) return a . ticks . apply ( a , l ) ; for ( c = a . domain ( ) , b = Math . ceil ( c [ 0 ] ) ; b < c [ 1 ] ; b ++ ) d . push ( b ) ; return d . length > 0 && d [ 0 ] > 0 && d . unshift ( d [ 0 ] - ( d [ 1 ] - d [ 0 ] ) ) , d } function g ( ) { var a , c = n . copy ( ) ; return b . isCategory && ( a = n . domain ( ) , c . domain ( [ a [ 0 ] , a [ 1 ] - 1 ] ) ) , c } function h ( a ) { return k ? k ( a ) : a } function i ( i ) { i . each ( function ( ) { function i ( a ) { var b = n ( a ) + s ; return C [ 0 ] < b && b < C [ 1 ] ? p : 0 } var k , l , t , u = a . select ( this ) , v = this . _ _chart _ _ || n , w = this . _ _chart _ _ = g ( ) , x = r ? r : f ( w ) , y = u . selectAll ( ".tick" ) . data ( x , w ) , z = y . enter ( ) . insert ( "g" , ".domain" ) . attr ( "class" , "tick" ) . style ( "opacity" , 1e-6 ) , A = y . exit ( ) . remove ( ) , B = a . transition ( y ) . style ( "opacity" , 1 ) , C = n . rangeExtent ? n . rangeExtent ( ) : e ( n . range ( ) ) , D = u . selectAll ( ".domain" ) . data ( [ 0 ] ) , E = ( D . enter ( ) . append ( "path" ) . attr ( "class" , "domain" ) , a . transition ( D ) ) ; z . append ( "line" ) , z . append ( "text" ) ; var F = z . select ( "line" ) , G = B . select ( "line" ) , H = y . select ( "text" ) . text ( h ) , I = z . select ( "text" ) , J = B . select ( "text" ) ; switch ( b . isCategory ? ( s = Math . ceil ( ( w ( 1 ) - w ( 0 ) ) / 2 ) , l = m ? 0 : s , t = m ? s : 0 ) : s = l = 0 , o ) { case "bottom" : k = c , F . attr ( "y2" , p ) , I . attr ( "y" , Math . max ( p , 0 ) + q ) , G . attr ( "x1" , l ) . attr ( "x2" , l ) . attr ( "y2" , i ) , J . attr ( "x" , 0 ) . attr ( "y" , Math . max ( p , 0 ) + q ) , H . attr ( "dy" , ".71em" ) . style ( "text-anchor" , "middle" ) , E . attr ( "d" , "M" + C [ 0 ] + "," + j + "V0H" + C [ 1 ] + "V" + j ) ; break ; case "top" : k = c , F . attr ( "y2" , - p ) , I . attr ( "y" , - ( Math . max ( p , 0 ) + q ) ) , G . attr ( "x2" , 0 ) . attr ( "y2" , - p ) , J . attr ( "x" , 0 ) . attr ( "y" , - ( Math . max ( p , 0 ) + q ) ) , H . attr ( "dy" , "0em" ) . style ( "text-anchor" , "middle" ) , E . attr ( "d" , "M" + C [ 0 ] + "," + - j + "V0H" + C [ 1 ] + "V" + - j ) ; break ; case "left" : k = d , F . attr ( "x2" , - p ) , I . attr ( "x" , - ( Math . max ( p , 0 ) + q ) ) , G . attr ( "x2" , - p ) . attr ( "y1" , t ) . attr ( "y2" , t ) , J . attr ( "x" , - ( Math . max ( p , 0 ) + q ) ) . attr ( "y" , s ) , H . attr ( "dy" , ".32em" ) . style ( "text-anchor" , "end" ) , E . attr ( "d" , "M" + - j + "," + C [ 0 ] + "H0V" + C [ 1 ] + "H" + - j ) ; break ; case "right" : k = d , F . attr ( "x2" , p ) , I . attr ( "x" , Math . max ( p , 0 ) + q ) , G . attr ( "x2" , p ) . attr ( "y2" , 0 ) , J . attr ( "x" , Math . max ( p , 0 ) + q ) . attr ( "y" , 0 ) , H . attr ( "dy" , ".32em" ) . style ( "text-anchor" , "start" ) , E . attr ( "d" , "M" + j + "," + C [ 0 ] + "H0V" + C [ 1 ] + "H" + j ) } if ( w . rangeBand ) { var K = w , L = K . rangeBand ( ) / 2 ; v = w = function ( a ) { return K ( a ) + L } } else v . rangeBand ? v = w : A . call ( k , w ) ; z . call ( k , v ) , B . call ( k , w ) } ) } var j , k , l , m , n = a . scale . linear ( ) , o = "bottom" , p = 6 , q = 3 , r = null , s = 0 , t = ! 0 ; return b = b || { } , j = b . withOuterTick ? 6 : 0 , i . scale = function ( a ) { return arguments . length ? ( n = a , i ) : n } , i . orient = function ( a ) { return arguments . length ? ( o = a in { top : 1 , right : 1 , bottom : 1 , left : 1 } ? a + "" : "bottom" , i ) : o } , i . tickFormat = function ( a ) { return arguments . length ? ( k = a , i ) : k } , i . tickCentered = function ( a ) { return arguments . length ? ( m = a , i ) : m } , i . tickOffset = function ( ) { return s } , i . ticks = function ( ) { return arguments . length ? ( l = arguments , i ) : l } , i . tickCulling = function ( a ) { return arguments . length ? ( t = a , i ) : t } , i . tickValues = function ( a ) { if ( "function" == typeof a ) r = function ( ) { return a ( n . domain ( ) ) } ; else { if ( ! arguments . length ) return r ; r = a } return i } , i } var e , f , g = { version : "0.3.0" } ; g . generate = function ( a ) { return new b ( a ) } , g . chart = { fn : b . prototype , internal : { fn : c . prototype } } , e = g . chart . fn , f = g . chart . internal . fn , f . init = function ( ) { var a = this , b = a . config ; if ( a . initParams ( ) , b . data _url ) a . convertUrlToData ( b . data _url , b . data _mimeType , b . data _keys , a . initWithData ) ; else if ( b . data _json ) a . initWithData ( a . convertJsonToData ( b . data _json , b . data _keys ) ) ; else if ( b . data _rows ) a . initWithData ( a . convertRowsToData ( b . data _rows ) ) ; else { if ( ! b . data _columns ) throw Error ( "url or json or rows or columns is required." ) ; a . initWithData ( a . convertColumnsToData ( b . data _columns ) ) } } , f . initParams = function ( ) { var a = this , b = a . d3 , c = a . config ; a . clipId = "c3-" + + new Date + "-clip" , a . clipIdForXAxis = a . clipId + "-xaxis" , a . clipIdForYAxi
} ) } ) ) ) . values ( ) ; return c . map ( b . isTimeSeries ( ) ? function ( a ) { return new Date ( + a ) } : function ( a ) { return + a } ) } , f . addHiddenTargetIds = function ( a ) { this . hiddenTargetIds = this . hiddenTargetIds . concat ( a ) } , f . removeHiddenTargetIds = function ( a ) { this . hiddenTargetIds = this . hiddenTargetIds . filter ( function ( b ) { return a . indexOf ( b ) < 0 } ) } , f . addHiddenLegendIds = function ( a ) { this . hiddenLegendIds = this . hiddenLegendIds . concat ( a ) } , f . removeHiddenLegendIds = function ( a ) { this . hiddenLegendIds = this . hiddenLegendIds . filter ( function ( b ) { return a . indexOf ( b ) < 0 } ) } , f . getValuesAsIdKeyed = function ( a ) { var b = { } ; return a . forEach ( function ( a ) { b [ a . id ] = [ ] , a . values . forEach ( function ( c ) { b [ a . id ] . push ( c . value ) } ) } ) , b } , f . checkValueInTargets = function ( a , b ) { var c , d , e , f = Object . keys ( a ) ; for ( c = 0 ; c < f . length ; c ++ ) for ( e = a [ f [ c ] ] . values , d = 0 ; d < e . length ; d ++ ) if ( b ( e [ d ] . value ) ) return ! 0 ; return ! 1 } , f . hasNegativeValueInTargets = function ( a ) { return this . checkValueInTargets ( a , function ( a ) { return 0 > a } ) } , f . hasPositiveValueInTargets = function ( a ) { return this . checkValueInTargets ( a , function ( a ) { return a > 0 } ) } , f . isOrderDesc = function ( ) { var a = this . config ; return "string" == typeof a . data _order && "desc" === a . data _order . toLowerCase ( ) } , f . isOrderAsc = function ( ) { var a = this . config ; return "string" == typeof a . data _order && "asc" === a . data _order . toLowerCase ( ) } , f . orderTargets = function ( a ) { var b = this , c = b . config , d = b . isOrderAsc ( ) , e = b . isOrderDesc ( ) ; return d || e ? a . sort ( function ( a , b ) { var c = function ( a , b ) { return a + Math . abs ( b . value ) } , e = a . values . reduce ( c , 0 ) , f = b . values . reduce ( c , 0 ) ; return d ? f - e : e - f } ) : j ( c . data _order ) && a . sort ( c . data _order ) , a } , f . filterByX = function ( a , b ) { return this . d3 . merge ( a . map ( function ( a ) { return a . values } ) ) . filter ( function ( a ) { return a . x - b === 0 } ) } , f . filterRemoveNull = function ( a ) { return a . filter ( function ( a ) { return i ( a . value ) } ) } , f . filterByXDomain = function ( a , b ) { return a . map ( function ( a ) { return { id : a . id , id _org : a . id _org , values : a . values . filter ( function ( a ) { return b [ 0 ] <= a . x && a . x <= b [ 1 ] } ) } } ) } , f . hasDataLabel = function ( ) { var a = this . config ; return "boolean" == typeof a . data _labels && a . data _labels ? ! 0 : "object" == typeof a . data _labels && r ( a . data _labels ) ? ! 0 : ! 1 } , f . getDataLabelLength = function ( a , b , c , d ) { var e = this , f = [ 0 , 0 ] , g = 1.3 ; return e . selectChart . select ( "svg" ) . selectAll ( ".dummy" ) . data ( [ a , b ] ) . enter ( ) . append ( "text" ) . text ( function ( a ) { return e . formatByAxisId ( c ) ( a ) } ) . each ( function ( a , b ) { f [ b ] = this . getBoundingClientRect ( ) [ d ] * g } ) . remove ( ) , f } , f . isNoneArc = function ( a ) { return this . hasTarget ( this . data . targets , a . id ) } , f . isArc = function ( a ) { return "data" in a && this . hasTarget ( this . data . targets , a . data . id ) } , f . findSameXOfValues = function ( a , b ) { var c , d = a [ b ] . x , e = [ ] ; for ( c = b - 1 ; c >= 0 && d === a [ c ] . x ; c -- ) e . push ( a [ c ] ) ; for ( c = b ; c < a . length && d === a [ c ] . x ; c ++ ) e . push ( a [ c ] ) ; return e } , f . findClosestFromTargets = function ( a , b ) { var c , d = this ; return c = a . map ( function ( a ) { return d . findClosest ( a . values , b ) } ) , d . findClosest ( c , b ) } , f . findClosest = function ( a , b ) { var c , d , e = this ; return a . forEach ( function ( a ) { var f = e . dist ( a , b ) ; ( c > f || ! c ) && ( c = f , d = a ) } ) , d } , f . dist = function ( a , b ) { var c = this , d = c . config , e = "y" === c . getAxisId ( a . id ) ? c . y : c . y2 , f = d . axis _rotated ? 1 : 0 , g = d . axis _rotated ? 0 : 1 ; return Math . pow ( c . x ( a . x ) - b [ f ] , 2 ) + Math . pow ( e ( a . value ) - b [ g ] , 2 ) } , f . convertValuesToStep = function ( a ) { var b , c = [ ] . concat ( a ) ; if ( ! this . isCategorized ( ) ) return a ; for ( b = a . length + 1 ; b > 0 ; b -- ) c [ b ] = c [ b - 1 ] ; return c [ 0 ] = { x : c [ 0 ] . x - 1 , value : c [ 0 ] . value , id : c [ 0 ] . id } , c [ a . length + 1 ] = { x : c [ a . length ] . x + 1 , value : c [ a . length ] . value , id : c [ a . length ] . id } , c } , f . convertUrlToData = function ( a , b , c , d ) { var e = this , f = b ? b : "csv" ; e . d3 . xhr ( a , function ( a , b ) { var g ; g = "json" === f ? e . convertJsonToData ( JSON . parse ( b . response ) , c ) : "tsv" === f ? e . convertTsvToData ( b . response ) : e . convertCsvToData ( b . response ) , d . call ( e , g ) } ) } , f . convertXsvToData = function ( a , b ) { var c , d = b . parseRows ( a ) ; return 1 === d . length ? ( c = [ { } ] , d [ 0 ] . forEach ( function ( a ) { c [ 0 ] [ a ] = null } ) ) : c = b . parse ( a ) , c } , f . convertCsvToData = function ( a ) { return this . convertXsvToData ( a , this . d3 . csv ) } , f . convertTsvToData = function ( a ) { return this . convertXsvToData ( a , this . d3 . tsv ) } , f . convertJsonToData = function ( a , b ) { var c , d , e = this , f = [ ] ; return b ? ( c = b . value , b . x && ( c . push ( b . x ) , e . config . data _x = b . x ) , f . push ( c ) , a . forEach ( function ( a ) { var b = [ ] ; c . forEach ( function ( c ) { var d = l ( a [ c ] ) ? null : a [ c ] ; b . push ( d ) } ) , f . push ( b ) } ) , d = e . convertRowsToData ( f ) ) :
} , f . updateXGrid = function ( a ) { var b = this , c = b . config , d = b . d3 , e = b . generateGridData ( c . grid _x _type , b . x ) , f = b . isCategorized ( ) ? b . xAxis . tickOffset ( ) : 0 ; b . xgridAttr = c . axis _rotated ? { x1 : 0 , x2 : b . width , y1 : function ( a ) { return b . x ( a ) - f } , y2 : function ( a ) { return b . x ( a ) - f } } : { x1 : function ( a ) { return b . x ( a ) + f } , x2 : function ( a ) { return b . x ( a ) + f } , y1 : 0 , y2 : b . height } , b . xgrid = b . main . select ( "." + h . xgrids ) . selectAll ( "." + h . xgrid ) . data ( e ) , b . xgrid . enter ( ) . append ( "line" ) . attr ( "class" , h . xgrid ) , a || b . xgrid . attr ( b . xgridAttr ) . style ( "opacity" , function ( ) { return + d . select ( this ) . attr ( c . axis _rotated ? "y1" : "x1" ) === ( c . axis _rotated ? b . height : 0 ) ? 0 : 1 } ) , b . xgrid . exit ( ) . remove ( ) } , f . updateYGrid = function ( ) { var a = this , b = a . config ; a . ygrid = a . main . select ( "." + h . ygrids ) . selectAll ( "." + h . ygrid ) . data ( a . y . ticks ( b . grid _y _ticks ) ) , a . ygrid . enter ( ) . append ( "line" ) . attr ( "class" , h . ygrid ) , a . ygrid . attr ( "x1" , b . axis _rotated ? a . y : 0 ) . attr ( "x2" , b . axis _rotated ? a . y : a . width ) . attr ( "y1" , b . axis _rotated ? 0 : a . y ) . attr ( "y2" , b . axis _rotated ? a . height : a . y ) , a . ygrid . exit ( ) . remove ( ) , a . smoothLines ( a . ygrid , "grid" ) } , f . redrawGrid = function ( a , b ) { var c , d , e , f = this , g = f . main , i = f . config ; f . grid . style ( "visibility" , f . hasArcType ( ) ? "hidden" : "visible" ) , g . select ( "line." + h . xgridFocus ) . style ( "visibility" , "hidden" ) , i . grid _x _show && f . updateXGrid ( ) , f . xgridLines = g . select ( "." + h . xgridLines ) . selectAll ( "." + h . xgridLine ) . data ( i . grid _x _lines ) , c = f . xgridLines . enter ( ) . append ( "g" ) . attr ( "class" , function ( a ) { return h . xgridLine + ( a [ "class" ] ? " " + a [ "class" ] : "" ) } ) , c . append ( "line" ) . style ( "opacity" , 0 ) , c . append ( "text" ) . attr ( "text-anchor" , "end" ) . attr ( "transform" , i . axis _rotated ? "" : "rotate(-90)" ) . attr ( "dx" , i . axis _rotated ? 0 : - f . margin . top ) . attr ( "dy" , - 5 ) . style ( "opacity" , 0 ) , f . xgridLines . exit ( ) . transition ( ) . duration ( a ) . style ( "opacity" , 0 ) . remove ( ) , b && i . grid _y _show && f . updateYGrid ( ) , b && ( f . ygridLines = g . select ( "." + h . ygridLines ) . selectAll ( "." + h . ygridLine ) . data ( i . grid _y _lines ) , d = f . ygridLines . enter ( ) . append ( "g" ) . attr ( "class" , function ( a ) { return h . ygridLine + ( a [ "class" ] ? " " + a [ "class" ] : "" ) } ) , d . append ( "line" ) . style ( "opacity" , 0 ) , d . append ( "text" ) . attr ( "text-anchor" , "end" ) . attr ( "transform" , i . axis _rotated ? "rotate(-90)" : "" ) . attr ( "dx" , i . axis _rotated ? 0 : - f . margin . top ) . attr ( "dy" , - 5 ) . style ( "opacity" , 0 ) , e = f . yv . bind ( f ) , f . ygridLines . select ( "line" ) . transition ( ) . duration ( a ) . attr ( "x1" , i . axis _rotated ? e : 0 ) . attr ( "x2" , i . axis _rotated ? e : f . width ) . attr ( "y1" , i . axis _rotated ? 0 : e ) . attr ( "y2" , i . axis _rotated ? f . height : e ) . style ( "opacity" , 1 ) , f . ygridLines . select ( "text" ) . transition ( ) . duration ( a ) . attr ( "x" , i . axis _rotated ? 0 : f . width ) . attr ( "y" , e ) . text ( function ( a ) { return a . text } ) . style ( "opacity" , 1 ) , f . ygridLines . exit ( ) . transition ( ) . duration ( a ) . style ( "opacity" , 0 ) . remove ( ) ) } , f . addTransitionForGrid = function ( a ) { var b = this , c = b . config , d = b . xv . bind ( b ) ; a . push ( b . xgridLines . select ( "line" ) . transition ( ) . attr ( "x1" , c . axis _rotated ? 0 : d ) . attr ( "x2" , c . axis _rotated ? b . width : d ) . attr ( "y1" , c . axis _rotated ? d : b . margin . top ) . attr ( "y2" , c . axis _rotated ? d : b . height ) . style ( "opacity" , 1 ) ) , a . push ( b . xgridLines . select ( "text" ) . transition ( ) . attr ( "x" , c . axis _rotated ? b . width : 0 ) . attr ( "y" , d ) . text ( function ( a ) { return a . text } ) . style ( "opacity" , 1 ) ) } , f . showXGridFocus = function ( a ) { var b = this , c = b . config , d = a . filter ( function ( a ) { return a && i ( a . value ) } ) , e = b . main . selectAll ( "line." + h . xgridFocus ) , f = b . xx . bind ( b ) ; c . tooltip _show && ( b . hasType ( "scatter" ) || b . hasArcType ( ) || ( e . style ( "visibility" , "visible" ) . data ( [ d [ 0 ] ] ) . attr ( c . axis _rotated ? "y1" : "x1" , f ) . attr ( c . axis _rotated ? "y2" : "x2" , f ) , b . smoothLines ( e , "grid" ) ) ) } , f . hideXGridFocus = function ( ) { this . main . select ( "line." + h . xgridFocus ) . style ( "visibility" , "hidden" ) } , f . updateXgridFocus = function ( ) { var a = this , b = a . config ; a . main . select ( "line." + h . xgridFocus ) . attr ( "x1" , b . axis _rotated ? 0 : - 10 ) . attr ( "x2" , b . axis _rotated ? a . width : - 10 ) . attr ( "y1" , b . axis _rotated ? - 10 : 0 ) . attr ( "y2" , b . axis _rotated ? - 10 : a . height ) } , f . generateGridData = function ( a , b ) { var c , d , e , f , g = this , i = [ ] , j = g . main . select ( "." + h . axisX ) . selectAll ( ".tick" ) . size ( ) ; if ( "year" === a ) for ( c = g . getXDomain ( ) , d = c [ 0 ] . getFullYear ( ) , e = c [ 1 ] . getFullYear ( ) , f = d ; e >= f ; f ++ ) i . push ( new Date ( f + "-01-01 00:00:00" ) ) ; else i = b . ticks ( 10 ) , i . length > j && ( i = i . filter ( function ( a ) { return ( "" + a ) . indexOf ( "." ) < 0 } ) ) ; return i } , f . getGridFilterToRemove = function ( a ) { return a ? function
} , f . addTransitionForRegion = function ( a ) { var b = this , c = b . regionX . bind ( b ) , d = b . regionY . bind ( b ) , e = b . regionWidth . bind ( b ) , f = b . regionHeight . bind ( b ) ; a . push ( b . mainRegion . selectAll ( "rect" ) . transition ( ) . attr ( "x" , c ) . attr ( "y" , d ) . attr ( "width" , e ) . attr ( "height" , f ) . style ( "fill-opacity" , function ( a ) { return i ( a . opacity ) ? a . opacity : . 1 } ) ) } , f . regionX = function ( a ) { var b , c = this , d = c . config , e = "y" === a . axis ? c . y : c . y2 ; return b = "y" === a . axis || "y2" === a . axis ? d . axis _rotated && "start" in a ? e ( a . start ) : 0 : d . axis _rotated ? 0 : "start" in a ? c . x ( c . isTimeSeries ( ) ? c . parseDate ( a . start ) : a . start ) : 0 } , f . regionY = function ( a ) { var b , c = this , d = c . config , e = "y" === a . axis ? c . y : c . y2 ; return b = "y" === a . axis || "y2" === a . axis ? d . axis _rotated ? 0 : "end" in a ? e ( a . end ) : 0 : d . axis _rotated && "start" in a ? c . x ( c . isTimeSeries ( ) ? c . parseDate ( a . start ) : a . start ) : 0 } , f . regionWidth = function ( a ) { var b , c = this , d = c . config , e = c . regionX ( a ) , f = "y" === a . axis ? c . y : c . y2 ; return b = "y" === a . axis || "y2" === a . axis ? d . axis _rotated && "end" in a ? f ( a . end ) : c . width : d . axis _rotated ? c . width : "end" in a ? c . x ( c . isTimeSeries ( ) ? c . parseDate ( a . end ) : a . end ) : c . width , e > b ? 0 : b - e } , f . regionHeight = function ( a ) { var b , c = this , d = c . config , e = this . regionY ( a ) , f = "y" === a . axis ? c . y : c . y2 ; return b = "y" === a . axis || "y2" === a . axis ? d . axis _rotated ? c . height : "start" in a ? f ( a . start ) : c . height : d . axis _rotated && "end" in a ? c . x ( c . isTimeSeries ( ) ? c . parseDate ( a . end ) : a . end ) : c . height , e > b ? 0 : b - e } , f . isRegionOnX = function ( a ) { return ! a . axis || "x" === a . axis } , f . drag = function ( a ) { var b , c , d , e , f , g , i , j , k = this , l = k . config , m = k . main , n = k . d3 ; k . hasArcType ( ) || l . data _selection _enabled && ( ! l . zoom _enabled || k . zoom . altDomain ) && l . data _selection _multiple && ( b = k . dragStart [ 0 ] , c = k . dragStart [ 1 ] , d = a [ 0 ] , e = a [ 1 ] , f = Math . min ( b , d ) , g = Math . max ( b , d ) , i = l . data _selection _grouped ? k . margin . top : Math . min ( c , e ) , j = l . data _selection _grouped ? k . height : Math . max ( c , e ) , m . select ( "." + h . dragarea ) . attr ( "x" , f ) . attr ( "y" , i ) . attr ( "width" , g - f ) . attr ( "height" , j - i ) , m . selectAll ( "." + h . shapes ) . selectAll ( "." + h . shape ) . filter ( function ( a ) { return l . data _selection _isselectable ( a ) } ) . each ( function ( a , b ) { var c , d , e , l , m , o , p = n . select ( this ) , q = p . classed ( h . SELECTED ) , r = p . classed ( h . INCLUDED ) , s = ! 1 ; if ( p . classed ( h . circle ) ) c = 1 * p . attr ( "cx" ) , d = 1 * p . attr ( "cy" ) , m = k . togglePoint , s = c > f && g > c && d > i && j > d ; else { if ( ! p . classed ( h . bar ) ) return ; o = u ( this ) , c = o . x , d = o . y , e = o . width , l = o . height , m = k . togglePath , s = ! ( c > g || f > c + e || d > j || i > d + l ) } s ^ r && ( p . classed ( h . INCLUDED , ! r ) , p . classed ( h . SELECTED , ! q ) , m . call ( k , ! q , p , a , b ) ) } ) ) } , f . dragstart = function ( a ) { var b = this , c = b . config ; b . hasArcType ( ) || c . data _selection _enabled && ( b . dragStart = a , b . main . select ( "." + h . chart ) . append ( "rect" ) . attr ( "class" , h . dragarea ) . style ( "opacity" , . 1 ) , b . dragging = ! 0 , b . config . data _ondragstart ( ) ) } , f . dragend = function ( ) { var a = this , b = a . config ; a . hasArcType ( ) || b . data _selection _enabled && ( a . main . select ( "." + h . dragarea ) . transition ( ) . duration ( 100 ) . style ( "opacity" , 0 ) . remove ( ) , a . main . selectAll ( "." + h . shape ) . classed ( h . INCLUDED , ! 1 ) , a . dragging = ! 1 , a . config . data _ondragend ( ) ) } , f . selectPoint = function ( a , b , c ) { var d = this , e = d . config , f = ( e . axis _rotated ? d . circleY : d . circleX ) . bind ( d ) , g = ( e . axis _rotated ? d . circleX : d . circleY ) . bind ( d ) , i = d . pointSelectR . bind ( d ) ; e . data _onselected . call ( d . api , b , a . node ( ) ) , d . main . select ( "." + h . selectedCircles + d . getTargetSelectorSuffix ( b . id ) ) . selectAll ( "." + h . selectedCircle + "-" + c ) . data ( [ b ] ) . enter ( ) . append ( "circle" ) . attr ( "class" , function ( ) { return d . generateClass ( h . selectedCircle , c ) } ) . attr ( "cx" , f ) . attr ( "cy" , g ) . attr ( "stroke" , function ( ) { return d . color ( b ) } ) . attr ( "r" , function ( a ) { return 1.4 * d . pointSelectR ( a ) } ) . transition ( ) . duration ( 100 ) . attr ( "r" , i ) } , f . unselectPoint = function ( a , b , c ) { var d = this ; d . config . data _onunselected ( b , a . node ( ) ) , d . main . select ( "." + h . selectedCircles + d . getTargetSelectorSuffix ( b . id ) ) . selectAll ( "." + h . selectedCircle + "-" + c ) . transition ( ) . duration ( 100 ) . attr ( "r" , 0 ) . remove ( ) } , f . togglePoint = function ( a , b , c , d ) { a ? this . selectPoint ( b , c , d ) : this . unselectPoint ( b , c , d ) } , f . selectPath = function ( a , b ) { var c = this ; c . config . data _onselected . call ( c , b , a . node ( ) ) , a . transition ( ) . duration ( 100 ) . style ( "fill" , function ( ) { return c . d3 . rgb ( c . color ( b ) ) . brighter ( . 75 ) } ) } , f . unselectPath = function ( a , b ) { var c = this ; c . config . data _onunselected . call ( c , b , a . node ( ) ) , a . transition ( ) . duration ( 100 ) . style ( "fill" , function ( ) { return c . color ( b ) } ) } , f . togglePat