/*! fineui 2020-05-13 18:04:40 */
function _classCallCheck ( instance , Constructor ) { if ( ! ( instance instanceof Constructor ) ) throw new TypeError ( "Cannot call a class as a function" ) } ! function ( r ) { function i ( t ) { if ( e [ t ] ) return e [ t ] . exports ; var n = e [ t ] = { i : t , l : ! 1 , exports : { } } ; return r [ t ] . call ( n . exports , n , n . exports , i ) , n . l = ! 0 , n . exports } var e = { } ; i . m = r , i . c = e , i . d = function ( t , n , r ) { i . o ( t , n ) || Object . defineProperty ( t , n , { enumerable : ! 0 , get : r } ) } , i . r = function ( t ) { "undefined" != typeof Symbol && Symbol . toStringTag && Object . defineProperty ( t , Symbol . toStringTag , { value : "Module" } ) , Object . defineProperty ( t , "__esModule" , { value : ! 0 } ) } , i . t = function ( n , t ) { if ( 1 & t && ( n = i ( n ) ) , 8 & t ) return n ; if ( 4 & t && "object" == typeof n && n && n . _ _esModule ) return n ; var r = Object . create ( null ) ; if ( i . r ( r ) , Object . defineProperty ( r , "default" , { enumerable : ! 0 , value : n } ) , 2 & t && "string" != typeof n ) for ( var e in n ) i . d ( r , e , function ( t ) { return n [ t ] } . bind ( null , e ) ) ; return r } , i . n = function ( t ) { var n = t && t . _ _esModule ? function ( ) { return t [ "default" ] } : function ( ) { return t } ; return i . d ( n , "a" , n ) , n } , i . o = function ( t , n ) { return Object . prototype . hasOwnProperty . call ( t , n ) } , i . p = "" , i ( i . s = 121 ) } ( [ function ( t , n , r ) { var v = r ( 1 ) , y = r ( 7 ) , g = r ( 14 ) , m = r ( 11 ) , b = r ( 17 ) , w = "prototype" , x = function ( t , n , r ) { var e , i , o , u , c = t & x . F , f = t & x . G , a = t & x . S , s = t & x . P , l = t & x . B , h = f ? v : a ? v [ n ] || ( v [ n ] = { } ) : ( v [ n ] || { } ) [ w ] , p = f ? y : y [ n ] || ( y [ n ] = { } ) , d = p [ w ] || ( p [ w ] = { } ) ; for ( e in f && ( r = n ) , r ) o = ( ( i = ! c && h && void 0 !== h [ e ] ) ? h : r ) [ e ] , u = l && i ? b ( o , v ) : s && "function" == typeof o ? b ( Function . call , o ) : o , h && m ( h , e , o , t & x . U ) , p [ e ] != o && g ( p , e , u ) , s && d [ e ] != o && ( d [ e ] = o ) } ; v . core = y , x . F = 1 , x . G = 2 , x . S = 4 , x . P = 8 , x . B = 16 , x . W = 32 , x . U = 64 , x . R = 128 , t . exports = x } , function ( t , n ) { var r = t . exports = "undefined" != typeof window && window . Math == Math ? window : "undefined" != typeof self && self . Math == Math ? self : Function ( "return this" ) ( ) ; "number" == typeof _ _g && ( _ _g = r ) } , function ( t , n ) { t . exports = function ( t ) { try { return ! ! t ( ) } catch ( n ) { return ! 0 } } } , function ( t , n , r ) { var e = r ( 4 ) ; t . exports = function ( t ) { if ( ! e ( t ) ) throw TypeError ( t + " is not an object!" ) ; return t } } , function ( t , n ) { t . exports = function ( t ) { return "object" == typeof t ? null !== t : "function" == typeof t } } , function ( t , n , r ) { var e = r ( 48 ) ( "wks" ) , i = r ( 29 ) , o = r ( 1 ) . Symbol , u = "function" == typeof o ; ( t . exports = function ( t ) { return e [ t ] || ( e [ t ] = u && o [ t ] || ( u ? o : i ) ( "Symbol." + t ) ) } ) . store = e } , function ( t , n , r ) { var e = r ( 19 ) , i = Math . min ; t . exports = function ( t ) { return 0 < t ? i ( e ( t ) , 9007199254740991 ) : 0 } } , function ( t , n ) { var r = t . exports = { version : "2.6.11" } ; "number" == typeof _ _e && ( _ _e = r ) } , function ( t , n , r ) { t . exports = ! r ( 2 ) ( function ( ) { return 7 != Object . defineProperty ( { } , "a" , { get : function ( ) { return 7 } } ) . a } ) } , function ( t , n , r ) { var i = r ( 3 ) , o = r ( 88 ) , u = r ( 26 ) , c = Object . defineProperty ; n . f = r ( 8 ) ? Object . defineProperty : function ( t , n , r ) { if ( i ( t ) , n = u ( n , ! 0 ) , i ( r ) , o ) try { return c ( t , n , r ) } catch ( e ) { } if ( "get" in r || "set" in r ) throw TypeError ( "Accessors not supported!" ) ; return "value" in r && ( t [ n ] = r . value ) , t } } , function ( t , n , r ) { var e = r ( 24 ) ; t . exports = function ( t ) { return Object ( e ( t ) ) } } , function ( t , n , r ) { var o = r ( 1 ) , u = r ( 14 ) , c = r ( 13 ) , f = r ( 29 ) ( "src" ) , e = r ( 126 ) , i = "toString" , a = ( "" + e ) . split ( i ) ; r ( 7 ) . inspectSource = function ( t ) { return e . call ( t ) } , ( t . exports = function ( t , n , r , e ) { var i = "function" == typeof r ; i && ( c ( r , "name" ) || u ( r , "name" , n ) ) , t [ n ] !== r && ( i && ( c ( r , f ) || u ( r , f , t [ n ] ? "" + t [ n ] : a . join ( String ( n ) ) ) ) , t === o ? t [ n ] = r : e ? t [ n ] ? t [ n ] = r : u ( t , n , r ) : ( delete t [ n ] , u ( t , n , r ) ) ) } ) ( Function . prototype , i , function ( ) { return "function" == typeof this && this [ f ] || e . call ( this ) } ) } , function ( t , n , r ) { var e = r ( 0 ) , i = r ( 2 ) , u = r ( 24 ) , c = /"/g , o = function ( t , n , r , e ) { var i = String ( u ( t ) ) , o = "<" + n ; return "" !== r && ( o += " " + r + '="' + String ( e ) . replace ( c , """ ) + '"' ) , o + ">" + i + "</" + n + ">" } ; t . exports = function ( n , t ) { var r = { } ; r [ n ] = t ( o ) , e ( e . P + e . F * i ( function ( ) { var t = "" [ n ] ( '"' ) ; return t !== t . toLowerCase ( ) || 3 < t . split ( '"' ) . length } ) , "String" , r ) } } , function ( t , n ) { var r = { } . hasOwnProperty ; t . exports = function ( t , n ) { return r . call ( t , n ) } } , function ( t , n , r ) { var e = r ( 9 ) , i = r ( 28 ) ; t . exports = r ( 8 ) ? function ( t , n , r ) { return e . f ( t , n , i ( 1 , r ) ) } : function ( t , n , r ) { return t [ n ] = r , t } } , function ( t , n , r ) { var e = r ( 44 ) , i = r ( 24 ) ; t . exports = function ( t ) { return e ( i ( t ) ) } } , function ( t , n , r ) { "use strict" ; var e = r ( 2 ) ; t . exports = function ( t , n ) { return ! ! t && e ( function ( ) { n ? t . call ( null , function ( ) { } , 1 ) : t . call ( null ) } ) } } , function ( t , n , r ) { var o = r ( 18 ) ; t . exports = function ( e , i , t ) { if ( o ( e ) , void 0 === i ) return e ; switch ( t ) { case 1 : return
t . exports = function ( t , n , r ) { var e = void 0 === r ; switch ( n . length ) { case 0 : return e ? t ( ) : t . call ( r ) ; case 1 : return e ? t ( n [ 0 ] ) : t . call ( r , n [ 0 ] ) ; case 2 : return e ? t ( n [ 0 ] , n [ 1 ] ) : t . call ( r , n [ 0 ] , n [ 1 ] ) ; case 3 : return e ? t ( n [ 0 ] , n [ 1 ] , n [ 2 ] ) : t . call ( r , n [ 0 ] , n [ 1 ] , n [ 2 ] ) ; case 4 : return e ? t ( n [ 0 ] , n [ 1 ] , n [ 2 ] , n [ 3 ] ) : t . call ( r , n [ 0 ] , n [ 1 ] , n [ 2 ] , n [ 3 ] ) } return t . apply ( r , n ) } } , function ( t , n , r ) { var e = r ( 1 ) . parseInt , i = r ( 39 ) . trim , o = r ( 66 ) , u = /^[-+]?0[xX]/ ; t . exports = 8 !== e ( o + "08" ) || 22 !== e ( o + "0x16" ) ? function ( t , n ) { var r = i ( String ( t ) , 3 ) ; return e ( r , n >>> 0 || ( u . test ( r ) ? 16 : 10 ) ) } : e } , function ( t , n , r ) { var e = r ( 1 ) . parseFloat , i = r ( 39 ) . trim ; t . exports = 1 / e ( r ( 66 ) + "-0" ) != - ( 1 / 0 ) ? function ( t ) { var n = i ( String ( t ) , 3 ) , r = e ( n ) ; return 0 === r && "-" == n . charAt ( 0 ) ? - 0 : r } : e } , function ( t , n , r ) { var e = r ( 23 ) ; t . exports = function ( t , n ) { if ( "number" != typeof t && "Number" != e ( t ) ) throw TypeError ( n ) ; return + t } } , function ( t , n , r ) { var e = r ( 4 ) , i = Math . floor ; t . exports = function ( t ) { return ! e ( t ) && isFinite ( t ) && i ( t ) === t } } , function ( t , n ) { t . exports = Math . log1p || function ( t ) { return - 1e-8 < ( t = + t ) && t < 1e-8 ? t - t * t / 2 : Math . log ( 1 + t ) } } , function ( t , n , r ) { "use strict" ; var e = r ( 33 ) , i = r ( 28 ) , o = r ( 38 ) , u = { } ; r ( 14 ) ( u , r ( 5 ) ( "iterator" ) , function ( ) { return this } ) , t . exports = function ( t , n , r ) { t . prototype = e ( u , { next : i ( 1 , r ) } ) , o ( t , n + " Iterator" ) } } , function ( t , n , r ) { var u = r ( 3 ) ; t . exports = function ( t , n , r , e ) { try { return e ? n ( u ( r ) [ 0 ] , r [ 1 ] ) : n ( r ) } catch ( o ) { var i = t [ "return" ] ; throw void 0 !== i && u ( i . call ( t ) ) , o } } } , function ( t , n , r ) { var e = r ( 216 ) ; t . exports = function ( t , n ) { return new ( e ( t ) ) ( n ) } } , function ( t , n , r ) { var s = r ( 18 ) , l = r ( 10 ) , h = r ( 44 ) , p = r ( 6 ) ; t . exports = function ( t , n , r , e , i ) { s ( n ) ; var o = l ( t ) , u = h ( o ) , c = p ( o . length ) , f = i ? c - 1 : 0 , a = i ? - 1 : 1 ; if ( r < 2 ) for ( ; ; ) { if ( f in u ) { e = u [ f ] , f += a ; break } if ( f += a , i ? f < 0 : c <= f ) throw TypeError ( "Reduce of empty array with no initial value" ) } for ( ; i ? 0 <= f : f < c ; f += a ) f in u && ( e = n ( e , u [ f ] , f , o ) ) ; return e } } , function ( t , n , r ) { "use strict" ; var a = r ( 10 ) , s = r ( 32 ) , l = r ( 6 ) ; t . exports = [ ] . copyWithin || function ( t , n ) { var r = a ( this ) , e = l ( r . length ) , i = s ( t , e ) , o = s ( n , e ) , u = 2 < arguments . length ? arguments [ 2 ] : void 0 , c = Math . min ( ( void 0 === u ? e : s ( u , e ) ) - o , e - i ) , f = 1 ; for ( o < i && i < o + c && ( f = - 1 , o += c - 1 , i += c - 1 ) ; 0 < c -- ; ) o in r ? r [ i ] = r [ o ] : delete r [ i ] , i += f , o += f ; return r } } , function ( t , n ) { t . exports = function ( t , n ) { return { value : n , done : ! ! t } } } , function ( t , n , r ) { "use strict" ; var e = r ( 81 ) ; r ( 0 ) ( { target : "RegExp" , proto : ! 0 , forced : e !== /./ . exec } , { exec : e } ) } , function ( t , n , r ) { r ( 8 ) && "g" != /./g . flags && r ( 9 ) . f ( RegExp . prototype , "flags" , { configurable : ! 0 , get : r ( 53 ) } ) } , function ( t , n , e ) { "use strict" ; var r , i , o , u , c = e ( 30 ) , f = e ( 1 ) , a = e ( 17 ) , s = e ( 46 ) , l = e ( 0 ) , h = e ( 4 ) , p = e ( 18 ) , d = e ( 42 ) , v = e ( 56 ) , y = e ( 47 ) , g = e ( 83 ) . set , m = e ( 236 ) ( ) , b = e ( 111 ) , w = e ( 237 ) , x = e ( 57 ) , S = e ( 112 ) , _ = "Promise" , E = f . TypeError , O = f . process , P = O && O . versions , F = P && P . v8 || "" , M = f [ _ ] , A = "process" == s ( O ) , j = function ( ) { } , I = i = b . f , T = ! ! function ( ) { try { var t = M . resolve ( 1 ) , n = ( t . constructor = { } ) [ e ( 5 ) ( "species" ) ] = function ( t ) { t ( j , j ) } ; return ( A || "function" == typeof PromiseRejectionEvent ) && t . then ( j ) instanceof n && 0 !== F . indexOf ( "6.6" ) && - 1 === x . indexOf ( "Chrome/66" ) } catch ( r ) { } } ( ) , N = function ( t ) { var n ; return ! ( ! h ( t ) || "function" != typeof ( n = t . then ) ) && n } , L = function ( l , r ) { var e ; l . _n || ( l . _n = ! 0 , e = l . _c , m ( function ( ) { for ( var a = l . _v , s = 1 == l . _s , t = 0 , n = function ( t ) { var n , r , e , i = s ? t . ok : t . fail , o = t . resolve , u = t . reject , c = t . domain ; try { i ? ( s || ( 2 == l . _h && C ( l ) , l . _h = 1 ) , ! 0 === i ? n = a : ( c && c . enter ( ) , n = i ( a ) , c && ( c . exit ( ) , e = ! 0 ) ) , n === t . promise ? u ( E ( "Promise-chain cycle" ) ) : ( r = N ( n ) ) ? r . call ( n , o , u ) : o ( n ) ) : u ( a ) } catch ( f ) { c && ! e && c . exit ( ) , u ( f ) } } ; e . length > t ; ) n ( e [ t ++ ] ) ; l . _c = [ ] , l . _n = ! 1 , r && ! l . _h && R ( l ) } ) ) } , R = function ( o ) { g . call ( f , function ( ) { var t , n , r , e = o . _v , i = k ( o ) ; if ( i && ( t = w ( function ( ) { A ? O . emit ( "unhandledRejection" , e , o ) : ( n = f . onunhandledrejection ) ? n ( { promise : o , reason : e } ) : ( r = f . console ) && r . error && r . error ( "Unhandled promise rejection" , e ) } ) , o . _h = A || k ( o ) ? 2 : 1 ) , o . _a = void 0 , i && t . e ) throw t . v } ) } , k = function ( t ) { return 1 !== t . _h && 0 === ( t . _a || t . _c ) . length } , C = function ( n ) { g . call ( f , function ( ) { var t ; A ? O . emit ( "rejectionHandled" , n ) : ( t = f . onrejectionhandled ) && t ( { promise : n , reason : n . _v } ) } ) } , D = function ( t ) { var n = this ; n . _d || ( n . _d = ! 0 , ( n = n . _w || n ) . _v = t , n . _s = 2 , n . _a || ( n . _a = n . _c . slice ( ) ) , L ( n , ! 0 ) ) } , U = function ( r ) { var e , i = this ; if ( ! i . _d ) { i . _d = ! 0 , i = i . _w || i ; try { if ( i === r ) throw E ( "Promise can't be resolved itself" ) ; ( e = N ( r ) ) ? m ( function ( ) { var t = { _w : i , _d : ! 1 } ; try { e . call ( r , a ( U , t , 1 ) , a ( D , t , 1 ) ) } catch ( n
return s [ n ] } , set : function ( t ) { s [ n ] = t } } ) } ) , y = u ( s ) , g = 0 ; y . length > g ; ) v ( y [ g ++ ] ) ; ( l . constructor = a ) . prototype = l , r ( 11 ) ( e , "RegExp" , a ) } r ( 41 ) ( "RegExp" ) } , function ( t , n , r ) { "use strict" ; r ( 109 ) ; var e = r ( 3 ) , i = r ( 53 ) , o = r ( 8 ) , u = "toString" , c = /./ [ u ] , f = function ( t ) { r ( 11 ) ( RegExp . prototype , u , t , ! 0 ) } ; r ( 2 ) ( function ( ) { return "/a/b" != c . call ( { source : "a" , flags : "b" } ) } ) ? f ( function ( ) { var t = e ( this ) ; return "/" . concat ( t . source , "/" , "flags" in t ? t . flags : ! o && t instanceof RegExp ? i . call ( t ) : void 0 ) } ) : c . name != u && f ( function ( ) { return c . call ( this ) } ) } , function ( t , n , r ) { "use strict" ; var l = r ( 3 ) , h = r ( 6 ) , p = r ( 82 ) , d = r ( 54 ) ; r ( 55 ) ( "match" , 1 , function ( e , i , a , s ) { return [ function ( t ) { var n = e ( this ) , r = void 0 == t ? void 0 : t [ i ] ; return void 0 !== r ? r . call ( t , n ) : new RegExp ( t ) [ i ] ( String ( n ) ) } , function ( t ) { var n = s ( a , t , this ) ; if ( n . done ) return n . value ; var r = l ( t ) , e = String ( this ) ; if ( ! r . global ) return d ( r , e ) ; for ( var i , o = r . unicode , u = [ ] , c = r . lastIndex = 0 ; null !== ( i = d ( r , e ) ) ; ) { var f = String ( i [ 0 ] ) ; "" === ( u [ c ] = f ) && ( r . lastIndex = p ( e , h ( r . lastIndex ) , o ) ) , c ++ } return 0 === c ? null : u } ] } ) } , function ( t , n , r ) { "use strict" ; var E = r ( 3 ) , e = r ( 10 ) , O = r ( 6 ) , P = r ( 19 ) , F = r ( 82 ) , M = r ( 54 ) , A = Math . max , j = Math . min , h = Math . floor , p = /\$([$&`']|\d\d?|<[^>]*>)/g , d = /\$([$&`']|\d\d?)/g ; r ( 55 ) ( "replace" , 2 , function ( i , o , x , S ) { function _ ( o , u , c , f , a , t ) { var s = c + o . length , l = f . length , n = d ; return void 0 !== a && ( a = e ( a ) , n = p ) , x . call ( t , n , function ( t , n ) { var r ; switch ( n . charAt ( 0 ) ) { case "$" : return "$" ; case "&" : return o ; case "`" : return u . slice ( 0 , c ) ; case "'" : return u . slice ( s ) ; case "<" : r = a [ n . slice ( 1 , - 1 ) ] ; break ; default : var e = + n ; if ( 0 == e ) return t ; if ( l < e ) { var i = h ( e / 10 ) ; return 0 === i ? t : i <= l ? void 0 === f [ i - 1 ] ? n . charAt ( 1 ) : f [ i - 1 ] + n . charAt ( 1 ) : t } r = f [ e - 1 ] } return void 0 === r ? "" : r } ) } return [ function ( t , n ) { var r = i ( this ) , e = void 0 == t ? void 0 : t [ o ] ; return void 0 !== e ? e . call ( t , r , n ) : x . call ( String ( r ) , t , n ) } , function ( t , n ) { var r = S ( x , t , this , n ) ; if ( r . done ) return r . value ; var e = E ( t ) , i = String ( this ) , o = "function" == typeof n ; o || ( n = String ( n ) ) ; var u , c = e . global ; c && ( u = e . unicode , e . lastIndex = 0 ) ; for ( var f = [ ] ; ; ) { var a = M ( e , i ) ; if ( null === a ) break ; if ( f . push ( a ) , ! c ) break ; "" === String ( a [ 0 ] ) && ( e . lastIndex = F ( i , O ( e . lastIndex ) , u ) ) } for ( var s , l = "" , h = 0 , p = 0 ; p < f . length ; p ++ ) { a = f [ p ] ; for ( var d = String ( a [ 0 ] ) , v = A ( j ( P ( a . index ) , i . length ) , 0 ) , y = [ ] , g = 1 ; g < a . length ; g ++ ) y . push ( void 0 === ( s = a [ g ] ) ? s : String ( s ) ) ; var m , b = a . groups , w = o ? ( m = [ d ] . concat ( y , v , i ) , void 0 !== b && m . push ( b ) , String ( n . apply ( void 0 , m ) ) ) : _ ( d , i , v , y , b , n ) ; h <= v && ( l += i . slice ( h , v ) + w , h = v + d . length ) } return l + i . slice ( h ) } ] } ) } , function ( t , n , r ) { "use strict" ; var f = r ( 3 ) , a = r ( 94 ) , s = r ( 54 ) ; r ( 55 ) ( "search" , 1 , function ( e , i , u , c ) { return [ function ( t ) { var n = e ( this ) , r = void 0 == t ? void 0 : t [ i ] ; return void 0 !== r ? r . call ( t , n ) : new RegExp ( t ) [ i ] ( String ( n ) ) } , function ( t ) { var n = c ( u , t , this ) ; if ( n . done ) return n . value ; var r = f ( t ) , e = String ( this ) , i = r . lastIndex ; a ( i , 0 ) || ( r . lastIndex = 0 ) ; var o = s ( r , e ) ; return a ( r . lastIndex , i ) || ( r . lastIndex = i ) , null === o ? - 1 : o . index } ] } ) } , function ( t , n , r ) { "use strict" ; var l = r ( 74 ) , b = r ( 3 ) , w = r ( 47 ) , x = r ( 82 ) , S = r ( 6 ) , _ = r ( 54 ) , h = r ( 81 ) , e = r ( 2 ) , E = Math . min , p = [ ] . push , u = "split" , d = "length" , v = "lastIndex" , O = 4294967295 , P = ! e ( function ( ) { RegExp ( O , "y" ) } ) ; r ( 55 ) ( "split" , 2 , function ( i , o , y , g ) { var m = "c" == "abbc" [ u ] ( /(b)*/ ) [ 1 ] || 4 != "test" [ u ] ( /(?:)/ , - 1 ) [ d ] || 2 != "ab" [ u ] ( /(?:ab)*/ ) [ d ] || 4 != "." [ u ] ( /(.?)(.?)/ ) [ d ] || 1 < "." [ u ] ( /()()/ ) [ d ] || "" [ u ] ( /.?/ ) [ d ] ? function ( t , n ) { var r = String ( this ) ; if ( void 0 === t && 0 === n ) return [ ] ; if ( ! l ( t ) ) return y . call ( r , t , n ) ; for ( var e , i , o , u = [ ] , c = ( t . ignoreCase ? "i" : "" ) + ( t . multiline ? "m" : "" ) + ( t . unicode ? "u" : "" ) + ( t . sticky ? "y" : "" ) , f = 0 , a = void 0 === n ? O : n >>> 0 , s = new RegExp ( t . source , c + "g" ) ; ( e = h . call ( s , r ) ) && ! ( f < ( i = s [ v ] ) && ( u . push ( r . slice ( f , e . index ) ) , 1 < e [ d ] && e . index < r [ d ] && p . apply ( u , e . slice ( 1 ) ) , o = e [ 0 ] [ d ] , f = i , u [ d ] >= a ) ) ; ) s [ v ] === e . index && s [ v ] ++ ; return f === r [ d ] ? ! o && s . test ( "" ) || u . push ( "" ) : u . push ( r . slice ( f ) ) , u [ d ] > a ? u . slice ( 0 , a ) : u } : "0" [ u ] ( void 0 , 0 ) [ d ] ? function ( t , n ) { return void 0 === t && 0 === n ? [ ] : y . call ( this , t , n ) } : y ; return [ function ( t , n ) { var r = i ( this ) , e = void 0 == t ? void 0 : t [ o ] ; return void 0 !== e ? e . call ( t , r , n ) : m . call ( String ( r ) , t , n ) } , function ( t , n ) { var r = g ( m , t , this , n , m !== y ) ; if ( r . done ) return r . value ; var e = b ( t ) , i = String ( this ) , o = w ( e , RegExp ) , u = e . unicode , c = ( e . ignoreCase ? "i" : "" ) + ( e . multiline ? "m" : "" ) + ( e . unicode ? "u" : "" ) + ( P ? "y" : "g" ) , f = new o ( P ? e : "^(?:" + e . source + ")" , c ) , a = void 0 === n ? O : n >>> 0 ; if ( 0 == a ) return [ ] ; if ( 0 === i . length ) r
if ( ( e === u || ! e ) && clearTimeout ) return e = clearTimeout , clearTimeout ( t ) ; try { return e ( t ) } catch ( n ) { try { return e . call ( null , t ) } catch ( n ) { return e . call ( this , t ) } } } ( t ) } } function d ( t , n ) { this . fun = t , this . array = n } function v ( ) { } var r , e , i = t . exports = { } ; ! function ( ) { try { r = "function" == typeof setTimeout ? setTimeout : o } catch ( t ) { r = o } try { e = "function" == typeof clearTimeout ? clearTimeout : u } catch ( t ) { e = u } } ( ) ; var f , a = [ ] , s = ! 1 , l = - 1 ; i . nextTick = function ( t ) { var n = new Array ( arguments . length - 1 ) ; if ( 1 < arguments . length ) for ( var r = 1 ; r < arguments . length ; r ++ ) n [ r - 1 ] = arguments [ r ] ; a . push ( new d ( t , n ) ) , 1 !== a . length || s || c ( p ) } , d . prototype . run = function ( ) { this . fun . apply ( null , this . array ) } , i . title = "browser" , i . browser = ! 0 , i . env = { } , i . argv = [ ] , i . version = "" , i . versions = { } , i . on = v , i . addListener = v , i . once = v , i . off = v , i . removeListener = v , i . removeAllListeners = v , i . emit = v , i . prependListener = v , i . prependOnceListener = v , i . listeners = function ( t ) { return [ ] } , i . binding = function ( t ) { throw new Error ( "process.binding is not supported" ) } , i . cwd = function ( ) { return "/" } , i . chdir = function ( t ) { throw new Error ( "process.chdir is not supported" ) } , i . umask = function ( ) { return 0 } } , function ( t , n ) { function r ( t ) { return ( r = "function" == typeof Symbol && "symbol" == typeof Symbol . iterator ? function ( t ) { return typeof t } : function ( t ) { return t && "function" == typeof Symbol && t . constructor === Symbol && t !== Symbol . prototype ? "symbol" : typeof t } ) ( t ) } var e = function ( ) { return this } ( ) ; try { e = e || new Function ( "return this" ) ( ) } catch ( i ) { "object" === ( "undefined" == typeof window ? "undefined" : r ( window ) ) && ( e = window ) } t . exports = e } ] ) ; var _global ; _global = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : this , null == _global . BI && ( _global . BI = { prepares : [ ] } ) , null == _global . BI . prepares && ( _global . BI . prepares = [ ] ) , Array . prototype . indexOf || ( Array . prototype . indexOf = function ( searchElement , fromIndex ) { var k ; if ( null == this ) throw new TypeError ( '"this" is null or not defined' ) ; var o = Object ( this ) , len = o . length >>> 0 ; if ( 0 === len ) return - 1 ; var n = 0 | fromIndex ; if ( n >= len ) return - 1 ; for ( k = Math . max ( n >= 0 ? n : len - Math . abs ( n ) , 0 ) ; k < len ; ) { if ( k in o && o [ k ] === searchElement ) return k ; k ++ } return - 1 } ) , Array . prototype . lastIndexOf || ( Array . prototype . lastIndexOf = function ( searchElement ) { "use strict" ; if ( void 0 === this || null === this ) throw new TypeError ; var n , k , t = Object ( this ) , len = t . length >>> 0 ; if ( 0 === len ) return - 1 ; for ( n = len - 1 , arguments . length > 1 && ( n = Number ( arguments [ 1 ] ) , n != n ? n = 0 : 0 != n && n != 1 / 0 && n != - ( 1 / 0 ) && ( n = ( n > 0 || - 1 ) * Math . floor ( Math . abs ( n ) ) ) ) , k = n >= 0 ? Math . min ( n , len - 1 ) : len - Math . abs ( n ) ; k >= 0 ; k -- ) if ( k in t && t [ k ] === searchElement ) return k ; return - 1 } ) , _global . console = _global . console || function ( ) { var c = { } ; return c . log = c . warn = c . debug = c . info = c . error = c . time = c . dir = c . profile = c . clear = c . exception = c . trace = c . assert = function ( ) { } , c } ( ) , _global . localStorage || ( _global . localStorage = { items : { } , setItem : function ( k , v ) { BI . Cache . addCookie ( k , v ) } , getItem : function ( k ) { return BI . Cache . getCookie ( k ) } , removeItem : function ( k ) { BI . Cache . deleteCookie ( k ) } , key : function ( ) { } , clear : function ( ) { this . items = { } } } ) , Object . keys || ( Object . keys = function ( o ) { if ( o !== Object ( o ) ) throw new TypeError ( "Object.keys called on a non-object" ) ; var falsy , skipArray = { _ _ob _ _ : falsy , $accessors : falsy , $vbthis : falsy , $vbsetter : falsy } , k = [ ] , p ; for ( p in o ) p in skipArray || Object . prototype . hasOwnProperty . call ( o , p ) && k . push ( p ) ; return k } ) , Array . isArray || ( Array . isArray = function ( arg ) { return "[object Array]" === Object . prototype . toString . call ( arg ) } ) , Date . now || ( Date . now = function ( ) { return ( new Date ) . valueOf ( ) } ) , "undefined" != typeof Set && Set . toString ( ) . match ( /native code/ ) || ( Set = function ( ) { this . set = { } } , Set . prototype . has = function ( key ) { return void 0 !== this . set [ key ] } , Set . prototype . add = function ( key ) { this . set [ key ] = 1 } , Set . prototype . clear = function ( ) { this . set = { } } ) , ! function ( window ) { var ua = window . navigator . userAgent . toLowerCase ( ) , reg = /msie/ ; if ( reg . test ( ua ) ) { var _sort = Array . prototype . sort ; Array . prototype . sort = function ( fn ) { if ( fn && "function" == typeof fn ) { if ( this . length < 2 ) return this ; for ( var i = 0 , j = i + 1 , l = this . length , tmp , r = ! 1 , t = 0 ; i < l ; i ++ ) for ( j = i + 1 ; j < l ; j ++ ) t = fn . call ( this , this [ i ] , this [ j ] ) , r = ( "number" == typeof t ? t : t ? 1 : 0 ) > 0 , r === ! 0 && ( tmp = this [ i ] , this [ i ] = this [ j ] , this [ j ] = tmp ) ; return this } return _sort . call ( this ) } } } ( window ) ; va
} function baseWrapperValue ( value , actions ) { var result = value ; return result instanceof LazyWrapper && ( result = result . value ( ) ) , arrayReduce ( actions , function ( result , action ) { return action . func . apply ( action . thisArg , arrayPush ( [ result ] , action . args ) ) } , result ) } function baseZipObject ( props , values , assignFunc ) { for ( var index = - 1 , length = props . length , valsLength = values . length , result = { } ; ++ index < length ; ) { var value = index < valsLength ? values [ index ] : undefined ; assignFunc ( result , props [ index ] , value ) } return result } function castArrayLikeObject ( value ) { return isArrayLikeObject ( value ) ? value : [ ] } function castPath ( value , object ) { return isArray ( value ) ? value : isKey ( value , object ) ? [ value ] : stringToPath ( toString ( value ) ) } function castSlice ( array , start , end ) { var length = array . length ; return end = end === undefined ? length : end , ! start && end >= length ? array : baseSlice ( array , start , end ) } function cloneBuffer ( buffer , isDeep ) { if ( isDeep ) return buffer . slice ( ) ; var length = buffer . length , result = allocUnsafe ? allocUnsafe ( length ) : new buffer . constructor ( length ) ; return buffer . copy ( result ) , result } function cloneArrayBuffer ( arrayBuffer ) { var result = new arrayBuffer . constructor ( arrayBuffer . byteLength ) ; return new Uint8Array ( result ) . set ( new Uint8Array ( arrayBuffer ) ) , result } function cloneDataView ( dataView , isDeep ) { var buffer = isDeep ? cloneArrayBuffer ( dataView . buffer ) : dataView . buffer ; return new dataView . constructor ( buffer , dataView . byteOffset , dataView . byteLength ) } function cloneRegExp ( regexp ) { var result = new regexp . constructor ( regexp . source , reFlags . exec ( regexp ) ) ; return result . lastIndex = regexp . lastIndex , result } function cloneSymbol ( symbol ) { return symbolValueOf ? Object ( symbolValueOf . call ( symbol ) ) : { } } function cloneTypedArray ( typedArray , isDeep ) { var buffer = isDeep ? cloneArrayBuffer ( typedArray . buffer ) : typedArray . buffer ; return new typedArray . constructor ( buffer , typedArray . byteOffset , typedArray . length ) } function compareAscending ( value , other ) { if ( value !== other ) { var valIsDefined = value !== undefined , valIsNull = null === value , valIsReflexive = value === value , valIsSymbol = isSymbol ( value ) , othIsDefined = other !== undefined , othIsNull = null === other , othIsReflexive = other === other , othIsSymbol = isSymbol ( other ) ; if ( ! othIsNull && ! othIsSymbol && ! valIsSymbol && value > other || valIsSymbol && othIsDefined && othIsReflexive && ! othIsNull && ! othIsSymbol || valIsNull && othIsDefined && othIsReflexive || ! valIsDefined && othIsReflexive || ! valIsReflexive ) return 1 ; if ( ! valIsNull && ! valIsSymbol && ! othIsSymbol && value < other || othIsSymbol && valIsDefined && valIsReflexive && ! valIsNull && ! valIsSymbol || othIsNull && valIsDefined && valIsReflexive || ! othIsDefined && valIsReflexive || ! othIsReflexive ) return - 1 } return 0 } function compareMultiple ( object , other , orders ) { for ( var index = - 1 , objCriteria = object . criteria , othCriteria = other . criteria , length = objCriteria . length , ordersLength = orders . length ; ++ index < length ; ) { var result = compareAscending ( objCriteria [ index ] , othCriteria [ index ] ) ; if ( result ) { if ( index >= ordersLength ) return result ; var order = orders [ index ] ; return result * ( "desc" == order ? - 1 : 1 ) } } return object . index - other . index } function composeArgs ( args , partials , holders , isCurried ) { for ( var argsIndex = - 1 , argsLength = args . length , holdersLength = holders . length , leftIndex = - 1 , leftLength = partials . length , rangeLength = nativeMax ( argsLength - holdersLength , 0 ) , result = Array ( leftLength + rangeLength ) , isUncurried = ! isCurried ; ++ leftIndex < leftLength ; ) result [ leftIndex ] = partials [ leftIndex ] ; for ( ; ++ argsIndex < holdersLength ; ) ( isUncurried || argsIndex < argsLength ) && ( result [ holders [ argsIndex ] ] = args [ argsIndex ] ) ; for ( ; rangeLength -- ; ) result [ leftIndex ++ ] = args [ argsIndex ++ ] ; return result } function composeArgsRight ( args , partials , holders , isCurried ) { for ( var argsIndex = - 1 , argsLength = args . length , holdersIndex = - 1 , holdersLength = holders . length , rightIndex = - 1 , rightLength = partials . length , rangeLength = nativeMax ( argsLength - holdersLength , 0 ) , result = Array ( rangeLength + rightLength ) , isUncurried = ! isCurried ; ++ argsIndex < rangeLength ; ) result [ argsIndex ] = args [ argsIndex ] ; for ( var offset = argsIndex ; ++ rightIndex < rightLength ; ) result [ offset + rightIndex ] = partials [ rightIndex ] ; for ( ; ++ holdersIndex < holdersLength ; ) ( isUncurried || argsIndex < argsLength ) && ( result [ offset + holders [ holdersIndex ] ] = args [ argsIndex ++ ] ) ; return result } function copyAr
if ( lastArgs = arguments , lastThis = this , lastCallTime = time , isInvoking ) { if ( timerId === undefined ) return leadingEdge ( lastCallTime ) ; if ( maxing ) return timerId = setTimeout ( timerExpired , wait ) , invokeFunc ( lastCallTime ) } return timerId === undefined && ( timerId = setTimeout ( timerExpired , wait ) ) , result } var lastArgs , lastThis , maxWait , result , timerId , lastCallTime , lastInvokeTime = 0 , leading = ! 1 , maxing = ! 1 , trailing = ! 0 ; if ( "function" != typeof func ) throw new TypeError ( FUNC _ERROR _TEXT ) ; return wait = toNumber ( wait ) || 0 , isObject ( options ) && ( leading = ! ! options . leading , maxing = "maxWait" in options , maxWait = maxing ? nativeMax ( toNumber ( options . maxWait ) || 0 , wait ) : maxWait , trailing = "trailing" in options ? ! ! options . trailing : trailing ) , debounced . cancel = cancel , debounced . flush = flush , debounced } function memoize ( func , resolver ) { if ( "function" != typeof func || null != resolver && "function" != typeof resolver ) throw new TypeError ( FUNC _ERROR _TEXT ) ; var memoized = function ( ) { var args = arguments , key = resolver ? resolver . apply ( this , args ) : args [ 0 ] , cache = memoized . cache ; if ( cache . has ( key ) ) return cache . get ( key ) ; var result = func . apply ( this , args ) ; return memoized . cache = cache . set ( key , result ) || cache , result } ; return memoized . cache = new ( memoize . Cache || MapCache ) , memoized } function negate ( predicate ) { if ( "function" != typeof predicate ) throw new TypeError ( FUNC _ERROR _TEXT ) ; return function ( ) { var args = arguments ; switch ( args . length ) { case 0 : return ! predicate . call ( this ) ; case 1 : return ! predicate . call ( this , args [ 0 ] ) ; case 2 : return ! predicate . call ( this , args [ 0 ] , args [ 1 ] ) ; case 3 : return ! predicate . call ( this , args [ 0 ] , args [ 1 ] , args [ 2 ] ) } return ! predicate . apply ( this , args ) } } function once ( func ) { return before ( 2 , func ) } function rest ( func , start ) { if ( "function" != typeof func ) throw new TypeError ( FUNC _ERROR _TEXT ) ; return start = start === undefined ? start : toInteger ( start ) , baseRest ( func , start ) } function throttle ( func , wait , options ) { var leading = ! 0 , trailing = ! 0 ; if ( "function" != typeof func ) throw new TypeError ( FUNC _ERROR _TEXT ) ; return isObject ( options ) && ( leading = "leading" in options ? ! ! options . leading : leading , trailing = "trailing" in options ? ! ! options . trailing : trailing ) , debounce ( func , wait , { leading : leading , maxWait : wait , trailing : trailing } ) } function clone ( value ) { return baseClone ( value , CLONE _SYMBOLS _FLAG ) } function cloneDeep ( value ) { return baseClone ( value , CLONE _DEEP _FLAG | CLONE _SYMBOLS _FLAG ) } function eq ( value , other ) { return value === other || value !== value && other !== other } function isArrayLike ( value ) { return null != value && isLength ( value . length ) && ! isFunction ( value ) } function isArrayLikeObject ( value ) { return isObjectLike ( value ) && isArrayLike ( value ) } function isBoolean ( value ) { return value === ! 0 || value === ! 1 || isObjectLike ( value ) && baseGetTag ( value ) == boolTag } function isEmpty ( value ) { if ( null == value ) return ! 0 ; if ( isArrayLike ( value ) && ( isArray ( value ) || "string" == typeof value || "function" == typeof value . splice || isBuffer ( value ) || isTypedArray ( value ) || isArguments ( value ) ) ) return ! value . length ; var tag = getTag ( value ) ; if ( tag == mapTag || tag == setTag ) return ! value . size ; if ( isPrototype ( value ) ) return ! baseKeys ( value ) . length ; for ( var key in value ) if ( hasOwnProperty . call ( value , key ) ) return ! 1 ; return ! 0 } function isEqual ( value , other ) { return baseIsEqual ( value , other ) } function isFinite ( value ) { return "number" == typeof value && nativeIsFinite ( value ) } function isFunction ( value ) { if ( ! isObject ( value ) ) return ! 1 ; var tag = baseGetTag ( value ) ; return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag } function isLength ( value ) { return "number" == typeof value && value > - 1 && value % 1 == 0 && value <= MAX _SAFE _INTEGER } function isObject ( value ) { var type = typeof value ; return null != value && ( "object" == type || "function" == type ) } function isObjectLike ( value ) { return null != value && "object" == typeof value } function isNaN ( value ) { return isNumber ( value ) && value != + value } function isNull ( value ) { return null === value } function isNumber ( value ) { return "number" == typeof value || isObjectLike ( value ) && baseGetTag ( value ) == numberTag } function isPlainObject ( value ) { if ( ! isObjectLike ( value ) || baseGetTag ( value ) != objectTag ) return ! 1 ; var proto = getPrototype ( value ) ; if ( null === proto ) return ! 0 ; var Ctor = hasOwnProperty . call ( proto , "constructor" ) && proto . constructor ; return "function" == typeof Ctor && Ctor instanceof Ctor && funcToString . call ( Ctor ) == objectCtorStrin
var args = arguments ; if ( retUnwrapped && ! this . _ _chain _ _ ) { var value = this . value ( ) ; return func . apply ( isArray ( value ) ? value : [ ] , args ) } return this [ chainName ] ( function ( value ) { return func . apply ( isArray ( value ) ? value : [ ] , args ) } ) } } ) , baseForOwn ( LazyWrapper . prototype , function ( func , methodName ) { var lodashFunc = lodash [ methodName ] ; if ( lodashFunc ) { var key = lodashFunc . name + "" , names = realNames [ key ] || ( realNames [ key ] = [ ] ) ; names . push ( { name : methodName , func : lodashFunc } ) } } ) , realNames [ createHybrid ( undefined , WRAP _BIND _KEY _FLAG ) . name ] = [ { name : "wrapper" , func : undefined } ] , LazyWrapper . prototype . clone = lazyClone , LazyWrapper . prototype . reverse = lazyReverse , LazyWrapper . prototype . value = lazyValue , lodash . prototype . first = lodash . prototype . head , symIterator && ( lodash . prototype [ symIterator ] = wrapperToIterator ) , "function" == typeof define && "object" == typeof define . amd && define . amd ? ( root . _ = lodash , define ( function ( ) { return lodash } ) ) : freeModule ? ( ( freeModule . exports = lodash ) . _ = lodash , freeExports . _ = lodash ) : root . _ = lodash } . call ( this ) ; var _global ; _global = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : this , _global . BI || ( _global . BI = { } ) , ! function ( undefined ) { var traverse = function ( func , context ) { return function ( value , key , obj ) { return func . call ( context , key , value , obj ) } } , _apply = function ( name ) { return function ( ) { return _ [ name ] . apply ( _ , arguments ) } } , _applyFunc = function ( name ) { return function ( ) { var args = Array . prototype . slice . call ( arguments , 0 ) ; return args [ 1 ] = _ . isFunction ( args [ 1 ] ) ? traverse ( args [ 1 ] , args [ 2 ] ) : args [ 1 ] , _ [ name ] . apply ( _ , args ) } } ; _ . extend ( BI , { assert : function ( v , is ) { if ( this . isFunction ( is ) ) { if ( is ( v ) ) return ! 0 ; throw new Error ( v + " error" ) } if ( this . isArray ( is ) || ( is = [ is ] ) , ! this . deepContains ( is , v ) ) throw new Error ( v + " error" ) ; return ! 0 } , warn : function ( message ) { console . warn ( message ) } , UUID : function ( ) { for ( var f = [ "0" , "1" , "2" , "3" , "4" , "5" , "6" , "7" , "8" , "9" , "a" , "b" , "c" , "d" , "e" , "f" ] , str = "" , i = 0 ; i < 16 ; i ++ ) { var r = parseInt ( f . length * Math . random ( ) , 10 ) ; str += f [ r ] } return str } , isWidget : function ( widget ) { return widget instanceof BI . Widget || BI . View && widget instanceof BI . View } , createWidgets : function ( items , options , context ) { if ( ! BI . isArray ( items ) ) throw new Error ( "cannot create Widgets" ) ; return BI . isWidget ( options ) ? ( context = options , options = { } ) : options || ( options = { } ) , BI . map ( BI . flatten ( items ) , function ( i , item ) { return BI . createWidget ( item , BI . deepClone ( options ) ) } ) } , createItems : function ( data , innerAttr , outerAttr ) { return innerAttr = BI . isArray ( innerAttr ) ? innerAttr : BI . makeArray ( BI . flatten ( data ) . length , innerAttr || { } ) , outerAttr = BI . isArray ( outerAttr ) ? outerAttr : BI . makeArray ( BI . flatten ( data ) . length , outerAttr || { } ) , BI . map ( data , function ( i , item ) { return BI . isArray ( item ) ? BI . createItems ( item , innerAttr , outerAttr ) : item instanceof BI . Widget ? BI . extend ( { } , innerAttr . shift ( ) , outerAttr . shift ( ) , { type : null , el : item } ) : innerAttr [ 0 ] instanceof BI . Widget ? ( outerAttr . shift ( ) , BI . extend ( { } , item , { el : innerAttr . shift ( ) } ) ) : item . el instanceof BI . Widget || BI . View && item . el instanceof BI . View ? ( innerAttr . shift ( ) , BI . extend ( { } , outerAttr . shift ( ) , { type : null } , item ) ) : item . el ? BI . extend ( { } , outerAttr . shift ( ) , item , { el : BI . extend ( { } , innerAttr . shift ( ) , item . el ) } ) : BI . extend ( { } , outerAttr . shift ( ) , { el : BI . extend ( { } , innerAttr . shift ( ) , item ) } ) } ) } , packageItems : function ( items , layouts ) { for ( var i = layouts . length - 1 ; i >= 0 ; i -- ) items = BI . map ( items , function ( k , it ) { return BI . extend ( { } , layouts [ i ] , { items : [ BI . extend ( { } , layouts [ i ] . el , { el : it } ) ] } ) } ) ; return items } , formatEL : function ( obj ) { return obj && ! obj . type && obj . el ? obj : { el : obj } } , stripEL : function ( obj ) { return obj . type && obj || obj . el || obj } , trans2Element : function ( widgets ) { return BI . map ( widgets , function ( i , wi ) { return wi . element } ) } } ) , _ . each ( [ "where" , "findWhere" , "invoke" , "pluck" , "shuffle" , "sample" , "toArray" , "size" ] , function ( name ) { BI [ name ] = _apply ( name ) } ) , _ . each ( [ "get" , "set" , "each" , "map" , "reduce" , "reduceRight" , "find" , "filter" , "reject" , "every" , "all" , "some" , "any" , "max" , "min" , "sortBy" , "groupBy" , "indexBy" , "countBy" , "partition" , "clamp" ] , function ( name ) { "any" === name ? BI [ name ] = _applyFunc ( "some" ) : BI [ name ] = _applyFunc ( name ) } ) , _ . extend ( BI , { count : function ( from , to , predicate ) { var t ; if ( predicate ) for ( t = from ; t < to ; t ++ ) predicate ( t ) ; return to - from } , inverse : function ( from , to ,
var CryptoJS = CryptoJS || function ( Math , undefined ) { var C = { } , C _lib = C . lib = { } , Base = C _lib . Base = function ( ) { function F ( ) { } return { extend : function ( overrides ) { F . prototype = this ; var subtype = new F ; return overrides && subtype . mixIn ( overrides ) , subtype . hasOwnProperty ( "init" ) || ( subtype . init = function ( ) { subtype . $super . init . apply ( this , arguments ) } ) , subtype . init . prototype = subtype , subtype . $super = this , subtype } , create : function ( ) { var instance = this . extend ( ) ; return instance . init . apply ( instance , arguments ) , instance } , init : function ( ) { } , mixIn : function ( properties ) { for ( var propertyName in properties ) properties . hasOwnProperty ( propertyName ) && ( this [ propertyName ] = properties [ propertyName ] ) ; properties . hasOwnProperty ( "toString" ) && ( this . toString = properties . toString ) } , clone : function ( ) { return this . init . prototype . extend ( this ) } } } ( ) , WordArray = C _lib . WordArray = Base . extend ( { init : function ( words , sigBytes ) { words = this . words = words || [ ] , sigBytes != undefined ? this . sigBytes = sigBytes : this . sigBytes = 4 * words . length } , toString : function ( encoder ) { return ( encoder || Hex ) . stringify ( this ) } , concat : function ( wordArray ) { var thisWords = this . words , thatWords = wordArray . words , thisSigBytes = this . sigBytes , thatSigBytes = wordArray . sigBytes ; if ( this . clamp ( ) , thisSigBytes % 4 ) for ( var i = 0 ; i < thatSigBytes ; i ++ ) { var thatByte = thatWords [ i >>> 2 ] >>> 24 - i % 4 * 8 & 255 ; thisWords [ thisSigBytes + i >>> 2 ] |= thatByte << 24 - ( thisSigBytes + i ) % 4 * 8 } else if ( thatWords . length > 65535 ) for ( var i = 0 ; i < thatSigBytes ; i += 4 ) thisWords [ thisSigBytes + i >>> 2 ] = thatWords [ i >>> 2 ] ; else thisWords . push . apply ( thisWords , thatWords ) ; return this . sigBytes += thatSigBytes , this } , clamp : function ( ) { var words = this . words , sigBytes = this . sigBytes ; words [ sigBytes >>> 2 ] &= 4294967295 << 32 - sigBytes % 4 * 8 , words . length = Math . ceil ( sigBytes / 4 ) } , clone : function ( ) { var clone = Base . clone . call ( this ) ; return clone . words = this . words . slice ( 0 ) , clone } , random : function ( nBytes ) { for ( var words = [ ] , i = 0 ; i < nBytes ; i += 4 ) words . push ( 4294967296 * Math . random ( ) | 0 ) ; return new WordArray . init ( words , nBytes ) } } ) , C _enc = C . enc = { } , Hex = C _enc . Hex = { stringify : function ( wordArray ) { for ( var words = wordArray . words , sigBytes = wordArray . sigBytes , hexChars = [ ] , i = 0 ; i < sigBytes ; i ++ ) { var bite = words [ i >>> 2 ] >>> 24 - i % 4 * 8 & 255 ; hexChars . push ( ( bite >>> 4 ) . toString ( 16 ) ) , hexChars . push ( ( 15 & bite ) . toString ( 16 ) ) } return hexChars . join ( "" ) } , parse : function ( hexStr ) { for ( var hexStrLength = hexStr . length , words = [ ] , i = 0 ; i < hexStrLength ; i += 2 ) words [ i >>> 3 ] |= parseInt ( hexStr . substr ( i , 2 ) , 16 ) << 24 - i % 8 * 4 ; return new WordArray . init ( words , hexStrLength / 2 ) } } , Latin1 = C _enc . Latin1 = { stringify : function ( wordArray ) { for ( var words = wordArray . words , sigBytes = wordArray . sigBytes , latin1Chars = [ ] , i = 0 ; i < sigBytes ; i ++ ) { var bite = words [ i >>> 2 ] >>> 24 - i % 4 * 8 & 255 ; latin1Chars . push ( String . fromCharCode ( bite ) ) } return latin1Chars . join ( "" ) } , parse : function ( latin1Str ) { for ( var latin1StrLength = latin1Str . length , words = [ ] , i = 0 ; i < latin1StrLength ; i ++ ) words [ i >>> 2 ] |= ( 255 & latin1Str . charCodeAt ( i ) ) << 24 - i % 4 * 8 ; return new WordArray . init ( words , latin1StrLength ) } } , Utf8 = C _enc . Utf8 = { stringify : function ( wordArray ) { try { return decodeURIComponent ( escape ( Latin1 . stringify ( wordArray ) ) ) } catch ( e ) { throw new Error ( "Malformed UTF-8 data" ) } } , parse : function ( utf8Str ) { return Latin1 . parse ( unescape ( encodeURIComponent ( utf8Str ) ) ) } } , BufferedBlockAlgorithm = C _lib . BufferedBlockAlgorithm = Base . extend ( { reset : function ( ) { this . _data = new WordArray . init , this . _nDataBytes = 0 } , _append : function ( data ) { "string" == typeof data && ( data = Utf8 . parse ( data ) ) , this . _data . concat ( data ) , this . _nDataBytes += data . sigBytes } , _process : function ( doFlush ) { var data = this . _data , dataWords = data . words , dataSigBytes = data . sigBytes , blockSize = this . blockSize , blockSizeBytes = 4 * blockSize , nBlocksReady = dataSigBytes / blockSizeBytes ; nBlocksReady = doFlush ? Math . ceil ( nBlocksReady ) : Math . max ( ( 0 | nBlocksReady ) - this . _minBufferSize , 0 ) ; var nWordsReady = nBlocksReady * blockSize , nBytesReady = Math . min ( 4 * nWordsReady , dataSigBytes ) ; if ( nWordsReady ) { for ( var offset = 0 ; offset < nWordsReady ; offset += blockSize ) this . _doProcessBlock ( dataWords , offset ) ; var processedWords = dataWords . splice ( 0 , nWordsReady ) ; data . sigBytes -= nBytesReady } return new WordArray . init ( processedWords , nBytesReady ) } , clone : function ( ) { var clone = Base . clone . call ( this ) ; return clone . _data = this . _data . clone ( ) , clone } , _minBufferSize :
var offsetPercentage = this . _getOffsetPercentage ( containerSize , offset , totalSize ) ; return Math . round ( offsetPercentage * ( safeTotalSize - containerSize ) ) } , _safeOffsetToOffset : function ( containerSize , offset ) { var totalSize = this . _cellSizeAndPositionManager . getTotalSize ( ) , safeTotalSize = this . getTotalSize ( ) ; if ( totalSize === safeTotalSize ) return offset ; var offsetPercentage = this . _getOffsetPercentage ( containerSize , offset , safeTotalSize ) ; return Math . round ( offsetPercentage * ( totalSize - containerSize ) ) } } , ! function ( ) { var _ChineseFirstPY = " YDYQSXMWZSSXJBYMGCCZQPSSQBYCDSCDQLDYLYBSSJGYZZJJFKCCLZDHWDWZJLJPFYYNWJJTMYHZWZHFLZPPQHGSCYYYNJQYXXGJHHSDSJNKKTMOMLCRXYPSNQSECCQZGGLLYJLMYZZSECYKYYHQWJSSGGYXYZYJWWKDJHYCHMYXJTLXJYQBYXZLDWRDJRWYSRLDZJPCBZJJBRCFTLECZSTZFXXZHTRQHYBDLYCZSSYMMRFMYQZPWWJJYFCRWFDFZQPYDDWYXKYJAWJFFXYPSFTZYHHYZYSWCJYXSCLCXXWZZXNBGNNXBXLZSZSBSGPYSYZDHMDZBQBZCWDZZYYTZHBTSYYBZGNTNXQYWQSKBPHHLXGYBFMJEBJHHGQTJCYSXSTKZHLYCKGLYSMZXYALMELDCCXGZYRJXSDLTYZCQKCNNJWHJTZZCQLJSTSTBNXBTYXCEQXGKWJYFLZQLYHYXSPSFXLMPBYSXXXYDJCZYLLLSJXFHJXPJBTFFYABYXBHZZBJYZLWLCZGGBTSSMDTJZXPTHYQTGLJSCQFZKJZJQNLZWLSLHDZBWJNCJZYZSQQYCQYRZCJJWYBRTWPYFTWEXCSKDZCTBZHYZZYYJXZCFFZZMJYXXSDZZOTTBZLQWFCKSZSXFYRLNYJMBDTHJXSQQCCSBXYYTSYFBXDZTGBCNSLCYZZPSAZYZZSCJCSHZQYDXLBPJLLMQXTYDZXSQJTZPXLCGLQTZWJBHCTSYJSFXYEJJTLBGXSXJMYJQQPFZASYJNTYDJXKJCDJSZCBARTDCLYJQMWNQNCLLLKBYBZZSYHQQLTWLCCXTXLLZNTYLNEWYZYXCZXXGRKRMTCNDNJTSYYSSDQDGHSDBJGHRWRQLYBGLXHLGTGXBQJDZPYJSJYJCTMRNYMGRZJCZGJMZMGXMPRYXKJNYMSGMZJYMKMFXMLDTGFBHCJHKYLPFMDXLQJJSMTQGZSJLQDLDGJYCALCMZCSDJLLNXDJFFFFJCZFMZFFPFKHKGDPSXKTACJDHHZDDCRRCFQYJKQCCWJDXHWJLYLLZGCFCQDSMLZPBJJPLSBCJGGDCKKDEZSQCCKJGCGKDJTJDLZYCXKLQSCGJCLTFPCQCZGWPJDQYZJJBYJHSJDZWGFSJGZKQCCZLLPSPKJGQJHZZLJPLGJGJJTHJJYJZCZMLZLYQBGJWMLJKXZDZNJQSYZMLJLLJKYWXMKJLHSKJGBMCLYYMKXJQLBMLLKMDXXKWYXYSLMLPSJQQJQXYXFJTJDXMXXLLCXQBSYJBGWYMBGGBCYXPJYGPEPFGDJGBHBNSQJYZJKJKHXQFGQZKFHYGKHDKLLSDJQXPQYKYBNQSXQNSZSWHBSXWHXWBZZXDMNSJBSBKBBZKLYLXGWXDRWYQZMYWSJQLCJXXJXKJEQXSCYETLZHLYYYSDZPAQYZCMTLSHTZCFYZYXYLJSDCJQAGYSLCQLYYYSHMRQQKLDXZSCSSSYDYCJYSFSJBFRSSZQSBXXPXJYSDRCKGJLGDKZJZBDKTCSYQPYHSTCLDJDHMXMCGXYZHJDDTMHLTXZXYLYMOHYJCLTYFBQQXPFBDFHHTKSQHZYYWCNXXCRWHOWGYJLEGWDQCWGFJYCSNTMYTOLBYGWQWESJPWNMLRYDZSZTXYQPZGCWXHNGPYXSHMYQJXZTDPPBFYHZHTJYFDZWKGKZBLDNTSXHQEEGZZYLZMMZYJZGXZXKHKSTXNXXWYLYAPSTHXDWHZYMPXAGKYDXBHNHXKDPJNMYHYLPMGOCSLNZHKXXLPZZLBMLSFBHHGYGYYGGBHSCYAQTYWLXTZQCEZYDQDQMMHTKLLSZHLSJZWFYHQSWSCWLQAZYNYTLSXTHAZNKZZSZZLAXXZWWCTGQQTDDYZTCCHYQZFLXPSLZYGPZSZNGLNDQTBDLXGTCTAJDKYWNSYZLJHHZZCWNYYZYWMHYCHHYXHJKZWSXHZYXLYSKQYSPSLYZWMYPPKBYGLKZHTYXAXQSYSHXASMCHKDSCRSWJPWXSGZJLWWSCHSJHSQNHCSEGNDAQTBAALZZMSSTDQJCJKTSCJAXPLGGXHHGXXZCXPDMMHLDGTYBYSJMXHMRCPXXJZCKZXSHMLQXXTTHXWZFKHCCZDYTCJYXQHLXDHYPJQXYLSYYDZOZJNYXQEZYSQYAYXWYPDGXDDXSPPYZNDLTWRHXYDXZZJHTCXMCZLHPYYYYMHZLLHNXMYLLLMDCPPXHMXDKYCYRDLTXJCHHZZXZLCCLYLNZSHZJZZLNNRLWHYQSNJHXYNTTTKYJPYCHHYEGKCTTWLGQRLGGTGTYGYHPYHYLQYQGCWYQKPYYYTTTTLHYHLLTYTTSPLKYZXGZWGPYDSSZZDQXSKCQNMJJZZBXYQMJRTFFBTKHZKBXLJJKDXJTLBWFZPPTKQTZTGPDGNTPJYFALQMKGXBDCLZFHZCLLLLADPMXDJHLCCLGYHDZFGYDDGCYYFGYDXKSSEBDHYKDKDKHNAXXYBPBYYHXZQGAFFQYJXDMLJCSQZLLPCHBSXGJYNDYBYQSPZWJLZKSDDTACTBXZDYZYPJZQSJNKKTKNJDJGYYPGTLFYQKASDNTCYHBLWDZHBBYDWJRYGKZYHEYYFJMSDTYFZJJHGCXPLXHLDWXXJKYTCYKSSSMTWCTTQZLPBSZDZWZXGZAGYKTYWXLHLSPBCLLOQMMZSSLCMBJCSZZKYDCZJGQQDSMCYTZQQLWZQZXSSFPTTFQMDDZDSHDTDWFHTDYZJYQJQKYPBDJYYXTLJHDRQXXXHAYDHRJLKLYTWHLLRLLRCXYLBWSRSZZSYMKZZHHKYHXKSMDSYDYCJPBZBSQLFCXXXNXKXWYWSDZYQOGGQMMYHCDZTTFJYYBGSTTTYBYKJDHKYXBELHTYPJQNFXFDYKZHQKZBYJTZBXHFDXKDASWTAWAJLDYJSFHBLDNNTNQJTJNCHXFJSRFWHZFMDRYJYJWZPDJKZYJYMPCYZNYNXFBYTFYFWYGDBNZZZDNYTXZEMMQBSQEHXFZMBMFLZZSRXYMJGSXWZJSPRYDJSJGXHJJGLJJYNZZJXHGXKYMLPYYYCXYTWQZSWHWLYRJLPXSLSXMFSWWKLCTNXNYNPSJSZHDZEPTXMYYWXYYSYWLXJQZQXZDCLEEELMCPJPCLWBXSQHFWWTFFJTNQJHJQDXHWLBYZNFJLALKYYJLDXHHYCSTYYWNRJYXYWTRMDRQHWQCMFJDYZMHMYYXJWMYZQZXTLMRSPWWCHAQBXYGZYPXYYRRCLMPYMGKSJSZYSRMYJSNXTPLNBAPPYPYLXYYZKYNLDZYJZCZNNLMZHHARQMPGWQTZMXXMLLHGDZXYHXKYXYCJMFFYYHJFSBSSQLXXNDYCANNMTCJCYPRRNYTYQNYYMBMSXNDLYLYSLJRLXYSXQMLLYZLZJJJKYZZCSFBZXXMSTBJGNXYZHLXNMCWSCYZYFZLXBRNNNYLBNRTGZQYSATSWRYHYJZMZDHZGZDWYBSSCSKXSYHYTXXGCQGXZZSHYXJSCRHMKKBXCZJYJYMKQHZJFNBHMQHYSNJNZYBKNQMCLGQHWLZNZSWXKHLJHYYBQLBFCDS
this . _items [ index ] = parentElt , index = parentIndex } } , _sinkDown : function ( index ) { for ( var elt = this . _items [ index ] ; ; ) { var leftChildIndex = 2 * ( index + 1 ) - 1 , rightChildIndex = 2 * ( index + 1 ) , swapIndex = - 1 ; if ( leftChildIndex < this . _size ) { var leftChild = this . _items [ leftChildIndex ] ; this . _comparator ( leftChild , elt ) && ( swapIndex = leftChildIndex ) } if ( rightChildIndex < this . _size ) { var rightChild = this . _items [ rightChildIndex ] ; this . _comparator ( rightChild , elt ) && ( swapIndex === - 1 || this . _comparator ( rightChild , this . _items [ swapIndex ] ) ) && ( swapIndex = rightChildIndex ) } if ( swapIndex === - 1 ) return ; this . _items [ index ] = this . _items [ swapIndex ] , this . _items [ swapIndex ] = elt , index = swapIndex } } } } ( ) , ! function ( ) { BI . LinkHashMap = function ( ) { this . array = [ ] , this . map = { } } , BI . LinkHashMap . prototype = { constructor : BI . LinkHashMap , has : function ( key ) { return key in this . map } , add : function ( key , value ) { "undefined" != typeof key && ( key in this . map ? this . map [ key ] = value : ( this . array . push ( key ) , this . map [ key ] = value ) ) } , remove : function ( key ) { if ( key in this . map ) { delete this . map [ key ] ; for ( var i = 0 ; i < this . array . length ; i ++ ) if ( this . array [ i ] == key ) { this . array . splice ( i , 1 ) ; break } } } , size : function ( ) { return this . array . length } , each : function ( fn , scope ) { var scope = scope || window , fn = fn || null ; if ( null != fn && "function" == typeof fn ) for ( var i = 0 ; i < this . array . length ; i ++ ) { var key = this . array [ i ] , value = this . map [ key ] , re = fn . call ( scope , key , value , i , this . array , this . map ) ; if ( 0 == re ) break } } , get : function ( key ) { return this . map [ key ] } , toArray : function ( ) { var array = [ ] ; return this . each ( function ( key , value ) { array . push ( value ) } ) , array } } } ( ) , ! function ( ) { BI . LRU = function ( limit ) { this . size = 0 , this . limit = limit , this . head = this . tail = void 0 , this . _keymap = { } } ; var p = BI . LRU . prototype ; p . put = function ( key , value ) { var removed ; this . size === this . limit && ( removed = this . shift ( ) ) ; var entry = this . get ( key , ! 0 ) ; return entry || ( entry = { key : key } , this . _keymap [ key ] = entry , this . tail ? ( this . tail . newer = entry , entry . older = this . tail ) : this . head = entry , this . tail = entry , this . size ++ ) , entry . value = value , removed } , p . shift = function ( ) { var entry = this . head ; return entry && ( this . head = this . head . newer , this . head . older = void 0 , entry . newer = entry . older = void 0 , this . _keymap [ entry . key ] = void 0 , this . size -- ) , entry } , p . get = function ( key , returnEntry ) { var entry = this . _keymap [ key ] ; if ( void 0 !== entry ) return entry === this . tail ? returnEntry ? entry : entry . value : ( entry . newer && ( entry === this . head && ( this . head = entry . newer ) , entry . newer . older = entry . older ) , entry . older && ( entry . older . newer = entry . newer ) , entry . newer = void 0 , entry . older = this . tail , this . tail && ( this . tail . newer = entry ) , this . tail = entry , returnEntry ? entry : entry . value ) } , p . has = function ( key ) { return null != this . _keymap [ key ] } } ( ) , function ( ) { var parent = function ( node ) { return Math . floor ( node / 2 ) } , Int32Array = _global . Int32Array || function ( size ) { for ( var xs = [ ] , i = size - 1 ; i >= 0 ; -- i ) xs [ i ] = 0 ; return xs } , ceilLog2 = function ( x ) { for ( var y = 1 ; y < x ; ) y *= 2 ; return y } ; BI . PrefixIntervalTree = function ( xs ) { this . _size = xs . length , this . _half = ceilLog2 ( this . _size ) , this . _heap = new Int32Array ( 2 * this . _half ) ; var i ; for ( i = 0 ; i < this . _size ; ++ i ) this . _heap [ this . _half + i ] = xs [ i ] ; for ( i = this . _half - 1 ; i > 0 ; -- i ) this . _heap [ i ] = this . _heap [ 2 * i ] + this . _heap [ 2 * i + 1 ] } , BI . PrefixIntervalTree . prototype = { constructor : BI . PrefixIntervalTree , set : function ( index , value ) { var node = this . _half + index ; for ( this . _heap [ node ] = value , node = parent ( node ) ; 0 !== node ; node = parent ( node ) ) this . _heap [ node ] = this . _heap [ 2 * node ] + this . _heap [ 2 * node + 1 ] } , get : function ( index ) { var node = this . _half + index ; return this . _heap [ node ] } , getSize : function ( ) { return this . _size } , sumUntil : function ( end ) { if ( 0 === end ) return 0 ; for ( var node = this . _half + end - 1 , sum = this . _heap [ node ] ; 1 !== node ; node = parent ( node ) ) node % 2 === 1 && ( sum += this . _heap [ node - 1 ] ) ; return sum } , sumTo : function ( inclusiveEnd ) { return this . sumUntil ( inclusiveEnd + 1 ) } , sum : function ( begin , end ) { return this . sumUntil ( end ) - this . sumUntil ( begin ) } , greatestLowerBound : function ( t ) { if ( t < 0 ) return - 1 ; var node = 1 ; if ( this . _heap [ node ] <= t ) return this . _size ; for ( ; node < this . _half ; ) { var leftSum = this . _heap [ 2 * node ] ; t < leftSum ? node = 2 * node : ( node = 2 * node + 1 , t -= leftSum ) } return node - this . _half } , greatestStrictLowerBound : function ( t ) { if ( t <= 0 ) return - 1 ; var node = 1 ; if ( this . _heap [ node ] < t ) return this . _size ; for ( ; node < this . _half ; ) { var leftSum = this . _heap [ 2 * node ]
return num *= Math . pow ( 10 , precision ) , num = Math . round ( num ) , isValueCarry && ( num /= 10 , magnitude += "-" === magnitudeNeg ? - 1 : 1 ) , num /= Math . pow ( 10 , precision ) , num = num . toFixed ( precision ) , magnitude = formatExponential ( format , magnitude , magnitudeNeg ) , neg + num + "E" + magnitude } function formatExponential ( format , num , magnitudeNeg ) { if ( num += "" , ! /e/gi . test ( format ) ) return num ; for ( format = format . split ( /e/gi ) [ 1 ] ; num . length < format . length ; ) num = "0" + num ; for ( var isAllZero = ! 0 , i = 0 , len = num . length ; i < len ; i ++ ) isAllZero && ( isAllZero = "0" === num . charAt ( i ) ) ; return magnitudeNeg = isAllZero ? "" : magnitudeNeg , magnitudeNeg + num } function getPrecision ( format ) { if ( ! /e/gi . test ( format ) ) return 0 ; var arr = format . split ( /e/gi ) [ 0 ] . split ( "." ) ; return arr . length > 1 ? arr [ 1 ] . length : 0 } function getInteger ( magnitude , format ) { if ( ! /e/gi . test ( format ) ) return 0 ; var formatLeft = format . split ( /e/gi ) [ 0 ] . split ( "." ) [ 0 ] , i , f , len = formatLeft . length , valueLeftLen = 0 ; for ( i = 0 ; i < len ; i ++ ) f = formatLeft . charAt ( i ) , ( 0 == f || "#" == f && len - i <= magnitude + 1 ) && valueLeftLen ++ ; return valueLeftLen } function isValueCarried ( num ) { var roundNum = Math . round ( num ) ; return num = ( num + "" ) . split ( "." ) [ 0 ] , roundNum = ( roundNum + "" ) . split ( "." ) [ 0 ] , num . length !== roundNum . length } return text = + text , eFormat ( text , fmt ) } function _dealNumberPrecision ( text , fright ) { if ( /[eE]/ . test ( text ) ) { var precision = 0 , i = 0 , ch ; /[%‰]$/ . test ( fright ) && ( precision = /[%]$/ . test ( fright ) ? 2 : 3 ) ; for ( var len = fright . length ; i < len ; i ++ ) "0" != ( ch = fright . charAt ( i ) ) && "#" != ch || precision ++ ; return Number ( text ) . toFixed ( precision ) } return text } function _numberFormat ( text , format ) { var text = text + "" ; if ( ! /[0-9]/ . test ( text ) || ! format ) return text ; var numMod = format . indexOf ( ";" ) ; if ( numMod > - 1 ) return text >= 0 ? _numberFormat ( text + "" , format . substring ( 0 , numMod ) ) : _numberFormat ( - text + "" , format . substr ( numMod + 1 ) ) ; if ( + text < 0 && "-" !== format . charAt ( 0 ) ) return _numberFormat ( - text + "" , "-" + format ) ; var fp = format . split ( "." ) , fleft = fp [ 0 ] || "" , fright = fp [ 1 ] || "" ; text = _dealNumberPrecision ( text , fright ) ; var tp = text . split ( "." ) , tleft = tp [ 0 ] || "" , tright = tp [ 1 ] || "" ; if ( /[%‰]$/ . test ( format ) ) { var paddingZero = /[%]$/ . test ( format ) ? "00" : "000" ; tright += paddingZero , tleft += tright . substr ( 0 , paddingZero . length ) , tleft = tleft . replace ( /^0+/gi , "" ) , tright = tright . substr ( paddingZero . length ) . replace ( /0+$/gi , "" ) } var right = _dealWithRight ( tright , fright ) ; right . leftPlus && ( tleft = parseInt ( tleft ) + 1 + "" , tleft = isNaN ( tleft ) ? "1" : tleft ) , right = right . num ; var left = _dealWithLeft ( tleft , fleft ) ; return /[0-9]/ . test ( left ) || ( left += "0" ) , /[0-9]/ . test ( right ) ? left + "." + right : left + right } function _dealWithRight ( tright , fright ) { for ( var right = "" , j = 0 , i = 0 , len = fright . length ; i < len ; i ++ ) { var ch = fright . charAt ( i ) , c = tright . charAt ( j ) ; switch ( ch ) { case "0" : isEmpty ( c ) && ( c = "0" ) , right += c , j ++ ; break ; case "#" : right += c , j ++ ; break ; default : right += ch } } var rll = tright . substr ( j ) , result = { } ; if ( ! isEmpty ( rll ) && rll . charAt ( 0 ) > 4 ) { result . leftPlus = ! 0 ; var numReg = right . match ( /^[0-9]+/ ) ; if ( numReg ) { var num = numReg [ 0 ] , orilen = num . length , newnum = parseInt ( num ) + 1 + "" ; newnum . length > orilen ? newnum = newnum . substr ( 1 ) : ( newnum = BI . leftPad ( newnum , orilen , "0" ) , result . leftPlus = ! 1 ) , right = right . replace ( /^[0-9]+/ , newnum ) } } return result . num = right , result } function _dealWithLeft ( tleft , fleft ) { for ( var left = "" , j = tleft . length - 1 , combo = - 1 , last = - 1 , i = fleft . length - 1 ; i >= 0 ; i -- ) { var ch = fleft . charAt ( i ) , c = tleft . charAt ( j ) ; switch ( ch ) { case "0" : isEmpty ( c ) && ( c = "0" ) , last = - 1 , left = c + left , j -- ; break ; case "#" : last = i , left = c + left , j -- ; break ; case "," : if ( ! isEmpty ( c ) ) { var com = fleft . match ( /,[#0]+/ ) ; com && ( combo = com [ 0 ] . length - 1 ) , left = "," + left } break ; default : left = ch + left } } if ( last > - 1 ) { var tll = tleft . substr ( 0 , j + 1 ) ; left = left . substr ( 0 , last ) + tll + left . substr ( last ) } if ( combo > 0 ) { var res = left . match ( /[0-9]+,/ ) ; if ( res ) { res = res [ 0 ] ; for ( var newstr = "" , n = res . length - 1 - combo ; n >= 0 ; n -= combo ) newstr = res . substr ( n , combo ) + "," + newstr ; var lres = res . substr ( 0 , n + combo ) ; isEmpty ( lres ) || ( newstr = lres + "," + newstr ) } left = left . replace ( /[0-9]+,/ , newstr ) } return left } var _global ; _global = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : this , _global . BI || ( _global . BI = { } ) , BI . cjkEncode = function ( text ) { if ( "string" != typeof text ) return text ; for ( var newText = "" , i = 0 ; i < text . length ; i ++ ) { var code = text . charCodeAt ( i ) ; newText += code >= 128 || 91 === cod
return BI . getDate ( date . getFullYear ( ) , date . getMonth ( ) , BI . getMonthDays ( date ) ) } , getDayOfYear : function ( date ) { var now = BI . getDate ( date . getFullYear ( ) , date . getMonth ( ) , date . getDate ( ) , 0 , 0 , 0 ) , then = BI . getDate ( date . getFullYear ( ) , 0 , 0 , 0 , 0 , 0 ) , time = now - then ; return Math . floor ( time / BI . Date . DAY ) } , getWeekNumber : function ( date ) { var d = BI . getDate ( date . getFullYear ( ) , date . getMonth ( ) , date . getDate ( ) , 0 , 0 , 0 ) , week = d . getDay ( ) , startOfWeek = BI . StartOfWeek % 7 , middleDay = ( startOfWeek + 3 ) % 7 ; middleDay = middleDay || 7 ; var offsetWeekStartCount = week < startOfWeek ? 7 + week - startOfWeek : week - startOfWeek , offsetWeekMiddleCount = middleDay < startOfWeek ? 7 + middleDay - startOfWeek : middleDay - startOfWeek ; d . setDate ( d . getDate ( ) - offsetWeekStartCount + offsetWeekMiddleCount ) ; var ms = d . valueOf ( ) ; return d . setMonth ( 0 ) , d . setDate ( 1 ) , Math . floor ( ( ms - d . valueOf ( ) ) / 6048e5 ) + 1 } , getQuarter : function ( date ) { return Math . floor ( date . getMonth ( ) / 3 ) + 1 } , getOffsetDate : function ( date , offset ) { return BI . getDate ( BI . getTime ( date . getFullYear ( ) , date . getMonth ( ) , date . getDate ( ) , date . getHours ( ) , date . getMinutes ( ) , date . getSeconds ( ) ) + 864e5 * offset ) } , getOffsetQuarter : function ( date , n ) { var dt = BI . getDate ( BI . getTime ( date . getFullYear ( ) , date . getMonth ( ) , date . getDate ( ) , date . getHours ( ) , date . getMinutes ( ) , date . getSeconds ( ) ) ) , day = dt . getDate ( ) , monthDay = BI . getMonthDays ( BI . getDate ( dt . getFullYear ( ) , dt . getMonth ( ) + 3 * BI . parseInt ( n ) , 1 ) ) ; return day > monthDay && ( day = monthDay ) , dt . setDate ( day ) , dt . setMonth ( dt . getMonth ( ) + 3 * parseInt ( n ) ) , dt } , getQuarterStartMonth : function ( date ) { var quarterStartMonth = 0 , nowMonth = date . getMonth ( ) ; return nowMonth < 3 && ( quarterStartMonth = 0 ) , 2 < nowMonth && nowMonth < 6 && ( quarterStartMonth = 3 ) , 5 < nowMonth && nowMonth < 9 && ( quarterStartMonth = 6 ) , nowMonth > 8 && ( quarterStartMonth = 9 ) , quarterStartMonth } , getQuarterStartDate : function ( date ) { return BI . getDate ( date . getFullYear ( ) , BI . getQuarterStartMonth ( date ) , 1 ) } , getQuarterEndDate : function ( date ) { var quarterEndMonth = BI . getQuarterStartMonth ( date ) + 2 ; return BI . getDate ( date . getFullYear ( ) , quarterEndMonth , BI . getMonthDays ( date , quarterEndMonth ) ) } , getOffsetMonth : function ( date , n ) { var dt = BI . getDate ( BI . getTime ( date . getFullYear ( ) , date . getMonth ( ) , date . getDate ( ) , date . getHours ( ) , date . getMinutes ( ) , date . getSeconds ( ) ) ) , day = dt . getDate ( ) , monthDay = BI . getMonthDays ( BI . getDate ( dt . getFullYear ( ) , dt . getMonth ( ) + parseInt ( n ) , 1 ) ) ; return day > monthDay && ( day = monthDay ) , dt . setDate ( day ) , dt . setMonth ( dt . getMonth ( ) + parseInt ( n ) ) , dt } , getWeekStartDate : function ( date ) { var w = date . getDay ( ) , startOfWeek = BI . StartOfWeek % 7 ; return BI . getOffsetDate ( date , BI . Date . _OFFSET [ w < startOfWeek ? 7 + w - startOfWeek : w - startOfWeek ] ) } , getWeekEndDate : function ( date ) { var w = date . getDay ( ) , startOfWeek = BI . StartOfWeek % 7 ; return BI . getOffsetDate ( date , BI . Date . _OFFSET [ w < startOfWeek ? 7 + w - startOfWeek : w - startOfWeek ] + 6 ) } , print : function ( date , str ) { for ( var m = date . getMonth ( ) , d = date . getDate ( ) , y = date . getFullYear ( ) , yWith4number = y + "" ; yWith4number . length < 4 ; ) yWith4number = "0" + yWith4number ; var wn = BI . getWeekNumber ( date ) , qr = BI . getQuarter ( date ) , w = date . getDay ( ) , s = { } , hr = date . getHours ( ) , pm = hr >= 12 , ir = pm ? hr - 12 : hr , dy = BI . getDayOfYear ( date ) ; 0 == ir && ( ir = 12 ) ; var min = date . getMinutes ( ) , sec = date . getSeconds ( ) ; s [ "%a" ] = BI . Date . _SDN [ w ] , s [ "%A" ] = BI . Date . _DN [ w ] , s [ "%b" ] = BI . Date . _SMN [ m ] , s [ "%B" ] = BI . Date . _MN [ m ] , s [ "%C" ] = 1 + Math . floor ( y / 100 ) , s [ "%d" ] = d < 10 ? "0" + d : d , s [ "%e" ] = d , s [ "%H" ] = hr < 10 ? "0" + hr : hr , s [ "%I" ] = ir < 10 ? "0" + ir : ir , s [ "%j" ] = dy < 100 ? dy < 10 ? "00" + dy : "0" + dy : dy , s [ "%k" ] = hr + "" , s [ "%l" ] = ir + "" , s [ "%X" ] = m < 9 ? "0" + ( 1 + m ) : 1 + m , s [ "%x" ] = m + 1 , s [ "%M" ] = min < 10 ? "0" + min : min , s [ "%n" ] = "\n" , s [ "%p" ] = pm ? "PM" : "AM" , s [ "%P" ] = pm ? "pm" : "am" , s [ "%s" ] = Math . floor ( date . getTime ( ) / 1e3 ) , s [ "%S" ] = sec < 10 ? "0" + sec : sec , s [ "%t" ] = "\t" , s [ "%U" ] = s [ "%W" ] = s [ "%V" ] = wn < 10 ? "0" + wn : wn , s [ "%u" ] = w + 1 , s [ "%w" ] = w , s [ "%y" ] = yWith4number . substr ( 2 , 2 ) , s [ "%Y" ] = yWith4number , s [ "%%" ] = "%" , s [ "%Q" ] = qr ; var re = /%./g ; if ( BI . isKhtml = BI . isKhtml || function ( ) { return ! ! _global . navigator && /Konqueror|Safari|KHTML/i . test ( navigator . userAgent ) } , ! ( str . indexOf ( "%Y" ) === - 1 && str . indexOf ( "%y" ) === - 1 || str . indexOf ( "%W" ) === - 1 && str . indexOf ( "%U" ) === - 1 && str . indexOf ( "%V" ) === - 1 ) ) switch ( wn ) { case 1 : 11 === m && ( s [ "%y" ] = parseInt ( s [ "%y" ] ) + 1 , s [ "%Y" ] = parseInt ( s [ "%Y" ] ) + 1 ) ; break ; case 53 : 0 === m && ( s [ "%y" ] = parseInt ( s [ "%y" ] ) - 1 , s [ "%Y" ] = parseInt ( s [ "%Y" ] ) - 1 ) } if ( ! BI . isKhtml ( ) ) return st
return ! ! color && "rgb" === color . substr ( 0 , 3 ) } , isHexColor : function ( color ) { return ! ! color && ( "#" === color [ 0 ] && 7 === color . length ) } , isDarkColor : function ( hex ) { if ( ! hex || ! this . isHexColor ( hex ) ) return ! 1 ; var rgb = this . rgb2json ( this . hex2rgb ( hex ) ) , grayLevel = Math . round ( . 299 * rgb . r + . 587 * rgb . g + . 114 * rgb . b ) ; return grayLevel < 192 } , getContrastColor : function ( color ) { return color && this . isColor ( color ) ? this . isDarkColor ( color ) ? "#ffffff" : "#1a1a1a" : "" } , rgb2hex : function ( rgbColour ) { if ( ! rgbColour || "rgb" != rgbColour . substr ( 0 , 3 ) ) return "" ; var rgbValues = rgbColour . match ( /\d+(\.\d+)?/g ) , red = BI . parseInt ( rgbValues [ 0 ] ) , green = BI . parseInt ( rgbValues [ 1 ] ) , blue = BI . parseInt ( rgbValues [ 2 ] ) , hexColour = "#" + this . int2hex ( red ) + this . int2hex ( green ) + this . int2hex ( blue ) ; return hexColour } , rgb2json : function ( rgbColour ) { if ( ! rgbColour ) return { } ; if ( ! this . isRGBColor ( rgbColour ) ) return { } ; var rgbValues = rgbColour . match ( /\d+(\.\d+)?/g ) ; return { r : BI . parseInt ( rgbValues [ 0 ] ) , g : BI . parseInt ( rgbValues [ 1 ] ) , b : BI . parseInt ( rgbValues [ 2 ] ) } } , rgba2json : function ( rgbColour ) { if ( ! rgbColour ) return { } ; var rgbValues = rgbColour . match ( /\d+(\.\d+)?/g ) ; return { r : BI . parseInt ( rgbValues [ 0 ] ) , g : BI . parseInt ( rgbValues [ 1 ] ) , b : BI . parseInt ( rgbValues [ 2 ] ) , a : BI . parseFloat ( rgbValues [ 3 ] ) } } , json2rgb : function ( rgb ) { return BI . isKey ( rgb . r ) && BI . isKey ( rgb . g ) && BI . isKey ( rgb . b ) ? "rgb(" + rgb . r + "," + rgb . g + "," + rgb . b + ")" : "" } , json2rgba : function ( rgba ) { return BI . isKey ( rgba . r ) && BI . isKey ( rgba . g ) && BI . isKey ( rgba . b ) ? "rgba(" + rgba . r + "," + rgba . g + "," + rgba . b + "," + rgba . a + ")" : "" } , int2hex : function ( strNum ) { var hexdig = [ "0" , "1" , "2" , "3" , "4" , "5" , "6" , "7" , "8" , "9" , "a" , "b" , "c" , "d" , "e" , "f" ] ; return hexdig [ strNum >>> 4 ] + "" + hexdig [ 15 & strNum ] } , hex2rgb : function ( color ) { if ( ! color ) return "" ; if ( ! this . isHexColor ( color ) ) return color ; var tempValue = "rgb(" , colorArray ; return 7 === color . length ? colorArray = [ BI . parseInt ( "0x" + color . substring ( 1 , 3 ) ) , BI . parseInt ( "0x" + color . substring ( 3 , 5 ) ) , BI . parseInt ( "0x" + color . substring ( 5 , 7 ) ) ] : 4 === color . length && ( colorArray = [ BI . parseInt ( "0x" + color . substring ( 1 , 2 ) ) , BI . parseInt ( "0x" + color . substring ( 2 , 3 ) ) , BI . parseInt ( "0x" + color . substring ( 3 , 4 ) ) ] ) , tempValue += colorArray [ 0 ] + "," , tempValue += colorArray [ 1 ] + "," , tempValue += colorArray [ 2 ] + ")" } , rgba2rgb : function ( rgbColor , bgColor ) { if ( BI . isNull ( bgColor ) && ( bgColor = 1 ) , "rgba" != rgbColor . substr ( 0 , 4 ) ) return "" ; var rgbValues = rgbColor . match ( /\d+(\.\d+)?/g ) ; if ( rgbValues . length < 4 ) return "" ; var R = BI . parseFloat ( rgbValues [ 0 ] ) , G = BI . parseFloat ( rgbValues [ 1 ] ) , B = BI . parseFloat ( rgbValues [ 2 ] ) , A = BI . parseFloat ( rgbValues [ 3 ] ) ; return "rgb(" + Math . floor ( 255 * ( bgColor * ( 1 - A ) ) + R * A ) + "," + Math . floor ( 255 * ( bgColor * ( 1 - A ) ) + G * A ) + "," + Math . floor ( 255 * ( bgColor * ( 1 - A ) ) + B * A ) + ")" } } ) , BI . extend ( BI . DOM , { getLeftPosition : function ( combo , popup , extraWidth ) { return { left : combo . element . offset ( ) . left - popup . element . outerWidth ( ) - ( extraWidth || 0 ) } } , getInnerLeftPosition : function ( combo , popup , extraWidth ) { return { left : combo . element . offset ( ) . left + ( extraWidth || 0 ) } } , getRightPosition : function ( combo , popup , extraWidth ) { var el = combo . element ; return { left : el . offset ( ) . left + el . outerWidth ( ) + ( extraWidth || 0 ) } } , getInnerRightPosition : function ( combo , popup , extraWidth ) { var el = combo . element , viewBounds = popup . element . bounds ( ) ; return { left : el . offset ( ) . left + el . outerWidth ( ) - viewBounds . width - ( extraWidth || 0 ) } } , getTopPosition : function ( combo , popup , extraHeight ) { return { top : combo . element . offset ( ) . top - popup . element . outerHeight ( ) - ( extraHeight || 0 ) } } , getBottomPosition : function ( combo , popup , extraHeight ) { var el = combo . element ; return { top : el . offset ( ) . top + el . outerHeight ( ) + ( extraHeight || 0 ) } } , isLeftSpaceEnough : function ( combo , popup , extraWidth ) { return BI . DOM . getLeftPosition ( combo , popup , extraWidth ) . left >= 0 } , isInnerLeftSpaceEnough : function ( combo , popup , extraWidth ) { var viewBounds = popup . element . bounds ( ) , windowBounds = BI . Widget . _renderEngine . createElement ( "body" ) . bounds ( ) ; return BI . DOM . getInnerLeftPosition ( combo , popup , extraWidth ) . left + viewBounds . width <= windowBounds . width } , isRightSpaceEnough : function ( combo , popup , extraWidth ) { var viewBounds = popup . element . bounds ( ) , windowBounds = BI . Widget . _renderEngine . createElement ( "body" ) . bounds ( ) ; return BI . DOM . getRightPosition ( combo , popup , extraWidth ) . left + viewBounds . width <= windowBounds . width } , isInnerRightSpaceEnough : function ( combo , popup , extraWidth ) { r
jQuery . isFunction ( animation . opts . start ) && animation . opts . start . call ( elem , animation ) , jQuery . fx . timer ( jQuery . extend ( tick , { elem : elem , anim : animation , queue : animation . opts . queue } ) ) , animation . progress ( animation . opts . progress ) . done ( animation . opts . done , animation . opts . complete ) . fail ( animation . opts . fail ) . always ( animation . opts . always ) } function propFilter ( props , specialEasing ) { var value , name , index , easing , hooks ; for ( index in props ) if ( name = jQuery . camelCase ( index ) , easing = specialEasing [ name ] , value = props [ index ] , jQuery . isArray ( value ) && ( easing = value [ 1 ] , value = props [ index ] = value [ 0 ] ) , index !== name && ( props [ name ] = value , delete props [ index ] ) , hooks = jQuery . cssHooks [ name ] , hooks && "expand" in hooks ) { value = hooks . expand ( value ) , delete props [ name ] ; for ( index in value ) index in props || ( props [ index ] = value [ index ] , specialEasing [ index ] = easing ) } else specialEasing [ name ] = easing } function defaultPrefilter ( elem , props , opts ) { var prop , index , length , value , dataShow , toggle , tween , hooks , oldfire , anim = this , style = elem . style , orig = { } , handled = [ ] , hidden = elem . nodeType && isHidden ( elem ) ; opts . queue || ( hooks = jQuery . _queueHooks ( elem , "fx" ) , null == hooks . unqueued && ( hooks . unqueued = 0 , oldfire = hooks . empty . fire , hooks . empty . fire = function ( ) { hooks . unqueued || oldfire ( ) } ) , hooks . unqueued ++ , anim . always ( function ( ) { anim . always ( function ( ) { hooks . unqueued -- , jQuery . queue ( elem , "fx" ) . length || hooks . empty . fire ( ) } ) } ) ) , 1 === elem . nodeType && ( "height" in props || "width" in props ) && ( opts . overflow = [ style . overflow , style . overflowX , style . overflowY ] , "inline" === jQuery . css ( elem , "display" ) && "none" === jQuery . css ( elem , "float" ) && ( jQuery . support . inlineBlockNeedsLayout && "inline" !== css _defaultDisplay ( elem . nodeName ) ? style . zoom = 1 : style . display = "inline-block" ) ) , opts . overflow && ( style . overflow = "hidden" , jQuery . support . shrinkWrapBlocks || anim . always ( function ( ) { style . overflow = opts . overflow [ 0 ] , style . overflowX = opts . overflow [ 1 ] , style . overflowY = opts . overflow [ 2 ] } ) ) ; for ( index in props ) if ( value = props [ index ] , rfxtypes . exec ( value ) ) { if ( delete props [ index ] , toggle = toggle || "toggle" === value , value === ( hidden ? "hide" : "show" ) ) continue ; handled . push ( index ) } if ( length = handled . length ) { dataShow = jQuery . _data ( elem , "fxshow" ) || jQuery . _data ( elem , "fxshow" , { } ) , "hidden" in dataShow && ( hidden = dataShow . hidden ) , toggle && ( dataShow . hidden = ! hidden ) , hidden ? jQuery ( elem ) . show ( ) : anim . done ( function ( ) { jQuery ( elem ) . hide ( ) } ) , anim . done ( function ( ) { var prop ; jQuery . _removeData ( elem , "fxshow" ) ; for ( prop in orig ) jQuery . style ( elem , prop , orig [ prop ] ) } ) ; for ( index = 0 ; index < length ; index ++ ) prop = handled [ index ] , tween = anim . createTween ( prop , hidden ? dataShow [ prop ] : 0 ) , orig [ prop ] = dataShow [ prop ] || jQuery . style ( elem , prop ) , prop in dataShow || ( dataShow [ prop ] = tween . start , hidden && ( tween . end = tween . start , tween . start = "width" === prop || "height" === prop ? 1 : 0 ) ) } } function Tween ( elem , options , prop , end , easing ) { return new Tween . prototype . init ( elem , options , prop , end , easing ) } function genFx ( type , includeWidth ) { var which , attrs = { height : type } , i = 0 ; for ( includeWidth = includeWidth ? 1 : 0 ; i < 4 ; i += 2 - includeWidth ) which = cssExpand [ i ] , attrs [ "margin" + which ] = attrs [ "padding" + which ] = type ; return includeWidth && ( attrs . opacity = attrs . width = type ) , attrs } function getWindow ( elem ) { return jQuery . isWindow ( elem ) ? elem : 9 === elem . nodeType && ( elem . defaultView || elem . parentWindow ) } var readyList , rootjQuery , core _strundefined = typeof undefined , document = window . document , location = window . location , _jQuery = window . jQuery , _$ = window . $ , class2type = { } , core _deletedIds = [ ] , core _version = "1.12.4" , core _concat = core _deletedIds . concat , core _push = core _deletedIds . push , core _slice = core _deletedIds . slice , core _indexOf = core _deletedIds . indexOf , core _toString = class2type . toString , core _hasOwn = class2type . hasOwnProperty , core _trim = core _version . trim , jQuery = function ( selector , context ) { return new jQuery . fn . init ( selector , context , rootjQuery ) } , core _pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ . source , core _rnotwhite = /\S+/g , rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g , rquickExpr = /^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/ , rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/ , rvalidchars = /^[\],:{}\s]*$/ , rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g , rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g , rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g , rmsPrefix = / ^ -
if ( elem && 3 !== nType && 8 !== nType && 2 !== nType ) return notxml = 1 !== nType || ! jQuery . isXMLDoc ( elem ) , notxml && ( name = jQuery . propFix [ name ] || name , hooks = jQuery . propHooks [ name ] ) , value !== undefined ? hooks && "set" in hooks && ( ret = hooks . set ( elem , value , name ) ) !== undefined ? ret : elem [ name ] = value : hooks && "get" in hooks && null !== ( ret = hooks . get ( elem , name ) ) ? ret : elem [ name ] } , propHooks : { tabIndex : { get : function ( elem ) { var attributeNode = elem . getAttributeNode ( "tabindex" ) ; return attributeNode && attributeNode . specified ? parseInt ( attributeNode . value , 10 ) : rfocusable . test ( elem . nodeName ) || rclickable . test ( elem . nodeName ) && elem . href ? 0 : undefined } } } } ) , boolHook = { get : function ( elem , name ) { var prop = jQuery . prop ( elem , name ) , attr = "boolean" == typeof prop && elem . getAttribute ( name ) , detail = "boolean" == typeof prop ? getSetInput && getSetAttribute ? null != attr : ruseDefault . test ( name ) ? elem [ jQuery . camelCase ( "default-" + name ) ] : ! ! attr : elem . getAttributeNode ( name ) ; return detail && detail . value !== ! 1 ? name . toLowerCase ( ) : undefined } , set : function ( elem , value , name ) { return value === ! 1 ? jQuery . removeAttr ( elem , name ) : getSetInput && getSetAttribute || ! ruseDefault . test ( name ) ? elem . setAttribute ( ! getSetAttribute && jQuery . propFix [ name ] || name , name ) : elem [ jQuery . camelCase ( "default-" + name ) ] = elem [ name ] = ! 0 , name } } , getSetInput && getSetAttribute || ( jQuery . attrHooks . value = { get : function ( elem , name ) { var ret = elem . getAttributeNode ( name ) ; return jQuery . nodeName ( elem , "input" ) ? elem . defaultValue : ret && ret . specified ? ret . value : undefined } , set : function ( elem , value , name ) { return jQuery . nodeName ( elem , "input" ) ? void ( elem . defaultValue = value ) : nodeHook && nodeHook . set ( elem , value , name ) } } ) , getSetAttribute || ( nodeHook = jQuery . valHooks . button = { get : function ( elem , name ) { var ret = elem . getAttributeNode ( name ) ; return ret && ( "id" === name || "name" === name || "coords" === name ? "" !== ret . value : ret . specified ) ? ret . value : undefined } , set : function ( elem , value , name ) { var ret = elem . getAttributeNode ( name ) ; return ret || elem . setAttributeNode ( ret = elem . ownerDocument . createAttribute ( name ) ) , ret . value = value += "" , "value" === name || value === elem . getAttribute ( name ) ? value : undefined } } , jQuery . attrHooks . contenteditable = { get : nodeHook . get , set : function ( elem , value , name ) { nodeHook . set ( elem , "" !== value && value , name ) } } , jQuery . each ( [ "width" , "height" ] , function ( i , name ) { jQuery . attrHooks [ name ] = jQuery . extend ( jQuery . attrHooks [ name ] , { set : function ( elem , value ) { if ( "" === value ) return elem . setAttribute ( name , "auto" ) , value } } ) } ) ) , jQuery . support . hrefNormalized || ( jQuery . each ( [ "href" , "src" , "width" , "height" ] , function ( i , name ) { jQuery . attrHooks [ name ] = jQuery . extend ( jQuery . attrHooks [ name ] , { get : function ( elem ) { var ret = elem . getAttribute ( name , 2 ) ; return null == ret ? undefined : ret } } ) } ) , jQuery . each ( [ "href" , "src" ] , function ( i , name ) { jQuery . propHooks [ name ] = { get : function ( elem ) { return elem . getAttribute ( name , 4 ) } } } ) ) , jQuery . support . style || ( jQuery . attrHooks . style = { get : function ( elem ) { return elem . style . cssText || undefined } , set : function ( elem , value ) { return elem . style . cssText = value + "" } } ) , jQuery . support . optSelected || ( jQuery . propHooks . selected = jQuery . extend ( jQuery . propHooks . selected , { get : function ( elem ) { var parent = elem . parentNode ; return parent && ( parent . selectedIndex , parent . parentNode && parent . parentNode . selectedIndex ) , null } } ) ) , jQuery . support . enctype || ( jQuery . propFix . enctype = "encoding" ) , jQuery . support . checkOn || jQuery . each ( [ "radio" , "checkbox" ] , function ( ) { jQuery . valHooks [ this ] = { get : function ( elem ) { return null === elem . getAttribute ( "value" ) ? "on" : elem . value } } } ) , jQuery . each ( [ "radio" , "checkbox" ] , function ( ) { jQuery . valHooks [ this ] = jQuery . extend ( jQuery . valHooks [ this ] , { set : function ( elem , value ) { if ( jQuery . isArray ( value ) ) return elem . checked = jQuery . inArray ( jQuery ( elem ) . val ( ) , value ) >= 0 } } ) } ) ; var rformElems = /^(?:input|select|textarea)$/i , rkeyEvent = /^key/ , rmouseEvent = /^(?:mouse|contextmenu)|click/ , rfocusMorph = /^(?:focusinfocus|focusoutblur)$/ , rtypenamespace = /^([^.]*)(?:\.(.+)|)$/ ; jQuery . event = { global : { } , add : function ( elem , types , handler , data , selector ) { var tmp , events , t , handleObjIn , special , eventHandle , handleObj , handlers , type , namespaces , origType , elemData = jQuery . _data ( elem ) ; if ( elemData ) { for ( handler . handler && ( handleObjIn = handler , handler = handleObjIn . handler , selector = handleObjIn . selector ) , handler . guid || ( handler . guid = jQuery . g
return div . appendChild ( doc . createComment ( "" ) ) , ! div . getElementsByTagName ( "*" ) . length } ) , support . attributes = assert ( function ( div ) { div . innerHTML = "<select></select>" ; var type = typeof div . lastChild . getAttribute ( "multiple" ) ; return "boolean" !== type && "string" !== type } ) , support . getByClassName = assert ( function ( div ) { return div . innerHTML = "<div class='hidden e'></div><div class='hidden'></div>" , ! ( ! div . getElementsByClassName || ! div . getElementsByClassName ( "e" ) . length ) && ( div . lastChild . className = "e" , 2 === div . getElementsByClassName ( "e" ) . length ) } ) , support . getByName = assert ( function ( div ) { div . id = expando + 0 , div . innerHTML = "<a name='" + expando + "'></a><div name='" + expando + "'></div>" , docElem . insertBefore ( div , docElem . firstChild ) ; var pass = doc . getElementsByName && doc . getElementsByName ( expando ) . length === 2 + doc . getElementsByName ( expando + 0 ) . length ; return support . getIdNotName = ! doc . getElementById ( expando ) , docElem . removeChild ( div ) , pass } ) , Expr . attrHandle = assert ( function ( div ) { return div . innerHTML = "<a href='#'></a>" , div . firstChild && typeof div . firstChild . getAttribute !== strundefined && "#" === div . firstChild . getAttribute ( "href" ) } ) ? { } : { href : function ( elem ) { return elem . getAttribute ( "href" , 2 ) } , type : function ( elem ) { return elem . getAttribute ( "type" ) } } , support . getIdNotName ? ( Expr . find . ID = function ( id , context ) { if ( typeof context . getElementById !== strundefined && ! documentIsXML ) { var m = context . getElementById ( id ) ; return m && m . parentNode ? [ m ] : [ ] } } , Expr . filter . ID = function ( id ) { var attrId = id . replace ( runescape , funescape ) ; return function ( elem ) { return elem . getAttribute ( "id" ) === attrId } } ) : ( Expr . find . ID = function ( id , context ) { if ( typeof context . getElementById !== strundefined && ! documentIsXML ) { var m = context . getElementById ( id ) ; return m ? m . id === id || typeof m . getAttributeNode !== strundefined && m . getAttributeNode ( "id" ) . value === id ? [ m ] : undefined : [ ] } } , Expr . filter . ID = function ( id ) { var attrId = id . replace ( runescape , funescape ) ; return function ( elem ) { var node = typeof elem . getAttributeNode !== strundefined && elem . getAttributeNode ( "id" ) ; return node && node . value === attrId } } ) , Expr . find . TAG = support . tagNameNoComments ? function ( tag , context ) { if ( typeof context . getElementsByTagName !== strundefined ) return context . getElementsByTagName ( tag ) } : function ( tag , context ) { var elem , tmp = [ ] , i = 0 , results = context . getElementsByTagName ( tag ) ; if ( "*" === tag ) { for ( ; elem = results [ i ++ ] ; ) 1 === elem . nodeType && tmp . push ( elem ) ; return tmp } return results } , Expr . find . NAME = support . getByName && function ( tag , context ) { if ( typeof context . getElementsByName !== strundefined ) return context . getElementsByName ( name ) } , Expr . find . CLASS = support . getByClassName && function ( className , context ) { if ( typeof context . getElementsByClassName !== strundefined && ! documentIsXML ) return context . getElementsByClassName ( className ) } , rbuggyMatches = [ ] , rbuggyQSA = [ ":focus" ] , ( support . qsa = isNative ( doc . querySelectorAll ) ) && ( assert ( function ( div ) { div . innerHTML = "<select><option selected=''></option></select>" , div . querySelectorAll ( "[selected]" ) . length || rbuggyQSA . push ( "\\[" + whitespace + "*(?:checked|disabled|ismap|multiple|readonly|selected|value)" ) , div . querySelectorAll ( ":checked" ) . length || rbuggyQSA . push ( ":checked" ) } ) , assert ( function ( div ) { div . innerHTML = "<input type='hidden' i=''/>" , div . querySelectorAll ( "[i^='']" ) . length && rbuggyQSA . push ( "[*^$]=" + whitespace + "*(?:\"\"|'')" ) , div . querySelectorAll ( ":enabled" ) . length || rbuggyQSA . push ( ":enabled" , ":disabled" ) , div . querySelectorAll ( "*,:x" ) , rbuggyQSA . push ( ",.*:" ) } ) ) , ( support . matchesSelector = isNative ( matches = docElem . matchesSelector || docElem . mozMatchesSelector || docElem . webkitMatchesSelector || docElem . oMatchesSelector || docElem . msMatchesSelector ) ) && assert ( function ( div ) { support . disconnectedMatch = matches . call ( div , "div" ) , matches . call ( div , "[s!='']:x" ) , rbuggyMatches . push ( "!=" , pseudos ) } ) , rbuggyQSA = new RegExp ( rbuggyQSA . join ( "|" ) ) , rbuggyMatches = new RegExp ( rbuggyMatches . join ( "|" ) ) , contains = isNative ( docElem . contains ) || docElem . compareDocumentPosition ? function ( a , b ) { var adown = 9 === a . nodeType ? a . documentElement : a , bup = b && b . parentNode ; return a === bup || ! ( ! bup || 1 !== bup . nodeType || ! ( adown . contains ? adown . contains ( bup ) : a . compareDocumentPosition && 16 & a . compareDocumentPosition ( bup ) ) ) } : function ( a , b ) { if ( b ) for ( ; b = b . parentNode ; ) if ( b === a ) return ! 0 ;
return window . getComputedStyle ( elem , null ) } , curCSS = function ( elem , name , _computed ) { var width , minWidth , maxWidth , computed = _computed || getStyles ( elem ) , ret = computed ? computed . getPropertyValue ( name ) || computed [ name ] : undefined , style = elem . style ; return computed && ( "" !== ret || jQuery . contains ( elem . ownerDocument , elem ) || ( ret = jQuery . style ( elem , name ) ) , rnumnonpx . test ( ret ) && rmargin . test ( name ) && ( width = style . width , minWidth = style . minWidth , maxWidth = style . maxWidth , style . minWidth = style . maxWidth = style . width = ret , ret = computed . width , style . width = width , style . minWidth = minWidth , style . maxWidth = maxWidth ) ) , ret } ) : document . documentElement . currentStyle && ( getStyles = function ( elem ) { return elem . currentStyle } , curCSS = function ( elem , name , _computed ) { var left , rs , rsLeft , computed = _computed || getStyles ( elem ) , ret = computed ? computed [ name ] : undefined , style = elem . style ; return null == ret && style && style [ name ] && ( ret = style [ name ] ) , rnumnonpx . test ( ret ) && ! rposition . test ( name ) && ( left = style . left , rs = elem . runtimeStyle , rsLeft = rs && rs . left , rsLeft && ( rs . left = elem . currentStyle . left ) , style . left = "fontSize" === name ? "1em" : ret , ret = style . pixelLeft + "px" , style . left = left , rsLeft && ( rs . left = rsLeft ) ) , "" === ret ? "auto" : ret } ) , jQuery . each ( [ "height" , "width" ] , function ( i , name ) { jQuery . cssHooks [ name ] = { get : function ( elem , computed , extra ) { if ( computed ) return 0 === elem . offsetWidth && rdisplayswap . test ( jQuery . css ( elem , "display" ) ) ? jQuery . swap ( elem , cssShow , function ( ) { return getWidthOrHeight ( elem , name , extra ) } ) : getWidthOrHeight ( elem , name , extra ) } , set : function ( elem , value , extra ) { var styles = extra && getStyles ( elem ) ; return setPositiveNumber ( elem , value , extra ? augmentWidthOrHeight ( elem , name , extra , jQuery . support . boxSizing && "border-box" === jQuery . css ( elem , "boxSizing" , ! 1 , styles ) , styles ) : 0 ) } } } ) , jQuery . support . opacity || ( jQuery . cssHooks . opacity = { get : function ( elem , computed ) { return ropacity . test ( ( computed && elem . currentStyle ? elem . currentStyle . filter : elem . style . filter ) || "" ) ? . 01 * parseFloat ( RegExp . $1 ) + "" : computed ? "1" : "" } , set : function ( elem , value ) { var style = elem . style , currentStyle = elem . currentStyle , opacity = jQuery . isNumeric ( value ) ? "alpha(opacity=" + 100 * value + ")" : "" , filter = currentStyle && currentStyle . filter || style . filter || "" ; style . zoom = 1 , ( value >= 1 || "" === value ) && "" === jQuery . trim ( filter . replace ( ralpha , "" ) ) && style . removeAttribute && ( style . removeAttribute ( "filter" ) , "" === value || currentStyle && ! currentStyle . filter ) || ( style . filter = ralpha . test ( filter ) ? filter . replace ( ralpha , opacity ) : filter + " " + opacity ) } } ) , jQuery ( function ( ) { jQuery . support . reliableMarginRight || ( jQuery . cssHooks . marginRight = { get : function ( elem , computed ) { if ( computed ) return jQuery . swap ( elem , { display : "inline-block" } , curCSS , [ elem , "marginRight" ] ) } } ) , ! jQuery . support . pixelPosition && jQuery . fn . position && jQuery . each ( [ "top" , "left" ] , function ( i , prop ) { jQuery . cssHooks [ prop ] = { get : function ( elem , computed ) { if ( computed ) return computed = curCSS ( elem , prop ) , rnumnonpx . test ( computed ) ? jQuery ( elem ) . position ( ) [ prop ] + "px" : computed } } } ) } ) , jQuery . expr && jQuery . expr . filters && ( jQuery . expr . filters . hidden = function ( elem ) { return elem . offsetWidth <= 0 && elem . offsetHeight <= 0 || ! jQuery . support . reliableHiddenOffsets && "none" === ( elem . style && elem . style . display || jQuery . css ( elem , "display" ) ) } , jQuery . expr . filters . visible = function ( elem ) { return ! jQuery . expr . filters . hidden ( elem ) } ) , jQuery . each ( { margin : "" , padding : "" , border : "Width" } , function ( prefix , suffix ) { jQuery . cssHooks [ prefix + suffix ] = { expand : function ( value ) { for ( var i = 0 , expanded = { } , parts = "string" == typeof value ? value . split ( " " ) : [ value ] ; i < 4 ; i ++ ) expanded [ prefix + cssExpand [ i ] + suffix ] = parts [ i ] || parts [ i - 2 ] || parts [ 0 ] ; return expanded } } , rmargin . test ( prefix ) || ( jQuery . cssHooks [ prefix + suffix ] . set = setPositiveNumber ) } ) ; var r20 = /%20/g , rbracket = /\[\]$/ , rCRLF = /\r?\n/g , rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i , rsubmittable = /^(?:input|select|textarea|keygen)/i ; jQuery . fn . extend ( { serialize : function ( ) { return jQuery . param ( this . serializeArray ( ) ) } , serializeArray : function ( ) { return this . map ( function ( ) { var elements = jQuery . prop ( this , "elements" ) ; return elements ? jQuery . makeArray ( elements ) : this } ) . filter ( function ( ) { var type = this . type ; return this . name && ! jQuery ( this ) . is ( ":disabled" ) && rsubmittable . test ( this . nodeName ) && ! rsubmitterTypes . test ( type ) && ( th
if ( zindex && this . zIndexMask [ zindex ] ) return BI . remove ( this . indexMask , this . zIndexMask [ zindex ] ) , void this . zIndexMask [ zindex ] . destroy ( ) ; this . indexMask = this . indexMask || [ ] ; var indexMask = this . indexMask . pop ( ) ; indexMask && indexMask . destroy ( ) } } ) ) , _ . extend ( BI , { $import : function ( ) { function loadReady ( src , must ) { var $scripts = BI . $ ( "head script, body script" ) ; BI . $ . each ( $scripts , function ( i , item ) { item . src . indexOf ( src ) != - 1 && ( _LOADED [ src ] = ! 0 ) } ) ; var $links = BI . $ ( "head link" ) ; BI . $ . each ( $links , function ( i , item ) { item . href . indexOf ( src ) != - 1 && must && ( _LOADED [ src ] = ! 1 , BI . $ ( item ) . remove ( ) ) } ) } var _LOADED = { } ; return function ( src , ext , must ) { if ( loadReady ( src , must ) , _LOADED [ src ] !== ! 0 ) if ( "css" === ext ) { var link = document . createElement ( "link" ) ; link . rel = "stylesheet" , link . type = "text/css" , link . href = src ; var head = document . getElementsByTagName ( "head" ) [ 0 ] ; head . appendChild ( link ) , _LOADED [ src ] = ! 0 } else BI . $ . ajax ( { url : src , dataType : "script" , async : ! 1 , cache : ! 0 , complete : function ( res , status ) { "success" == status && ( _LOADED [ src ] = ! 0 ) } } ) } } ( ) } ) , Number . prototype . toFixed && "0.000" === 8e-5 . toFixed ( 3 ) && "0" !== . 9. toFixed ( 0 ) && "1.25" === 1.255 . toFixed ( 2 ) && "1000000000000000128" === ( 0xde0b6b3a7640080 ) . toFixed ( 0 ) || ! function ( ) { function multiply ( n , c ) { for ( var i = - 1 ; ++ i < size ; ) c += n * data [ i ] , data [ i ] = c % base , c = Math . floor ( c / base ) } function divide ( n ) { for ( var i = size , c = 0 ; -- i >= 0 ; ) c += data [ i ] , data [ i ] = Math . floor ( c / n ) , c = c % n * base } function toString ( ) { for ( var i = size , s = "" ; -- i >= 0 ; ) if ( "" !== s || 0 === i || 0 !== data [ i ] ) { var t = String ( data [ i ] ) ; "" === s ? s = t : s += "0000000" . slice ( 0 , 7 - t . length ) + t } return s } function pow ( x , n , acc ) { return 0 === n ? acc : n % 2 === 1 ? pow ( x , n - 1 , acc * x ) : pow ( x * x , n / 2 , acc ) } function log ( x ) { for ( var n = 0 ; x >= 4096 ; ) n += 12 , x /= 4096 ; for ( ; x >= 2 ; ) n += 1 , x /= 2 ; return n } var base , size , data , i ; base = 1e7 , size = 6 , data = [ 0 , 0 , 0 , 0 , 0 , 0 ] , Number . prototype . toFixed = function ( fractionDigits ) { var f , x , s , m , e , z , j , k ; if ( f = Number ( fractionDigits ) , f = f !== f ? 0 : Math . floor ( f ) , f < 0 || f > 20 ) throw new RangeError ( "Number.toFixed called with invalid number of decimals" ) ; if ( x = Number ( this ) , x !== x ) return "NaN" ; if ( x <= - 1e21 || x > 1e21 ) return String ( x ) ; if ( s = "" , x < 0 && ( s = "-" , x = - x ) , m = "0" , x > 1e-21 ) if ( e = log ( x * pow ( 2 , 69 , 1 ) ) - 69 , z = e < 0 ? x * pow ( 2 , - e , 1 ) : x / pow ( 2 , e , 1 ) , z *= 4503599627370496 , e = 52 - e , e > 0 ) { for ( multiply ( 0 , z ) , j = f ; j >= 7 ; ) multiply ( 1e7 , 0 ) , j -= 7 ; for ( multiply ( pow ( 10 , j , 1 ) , 0 ) , j = e - 1 ; j >= 23 ; ) divide ( 1 << 23 ) , j -= 23 ; divide ( 1 << j ) , multiply ( 1 , 1 ) , divide ( 2 ) , m = toString ( ) } else multiply ( 0 , z ) , multiply ( 1 << - e , 0 ) , m = toString ( ) + "0.00000000000000000000" . slice ( 2 , 2 + f ) ; return f > 0 ? ( k = m . length , m = k <= f ? s + "0.0000000000000000000" . slice ( 0 , f - k + 2 ) + m : s + m . slice ( 0 , k - f ) + "." + m . slice ( k - f ) ) : m = s + m , m } } ( ) , _ . extend ( BI , { MAX : 0x1000000000000000 , MIN : - 0x1000000000000000 , EVENT _RESPONSE _TIME : 200 , zIndex _layer : 1e5 , zIndex _popover : 1e6 , zIndex _popup : 1e7 , zIndex _masker : 1e8 , zIndex _tip : 1e9 , emptyStr : "" , emptyFn : function ( ) { } , empty : null , Key : { 48 : "0" , 49 : "1" , 50 : "2" , 51 : "3" , 52 : "4" , 53 : "5" , 54 : "6" , 55 : "7" , 56 : "8" , 57 : "9" , 65 : "a" , 66 : "b" , 67 : "c" , 68 : "d" , 69 : "e" , 70 : "f" , 71 : "g" , 72 : "h" , 73 : "i" , 74 : "j" , 75 : "k" , 76 : "l" , 77 : "m" , 78 : "n" , 79 : "o" , 80 : "p" , 81 : "q" , 82 : "r" , 83 : "s" , 84 : "t" , 85 : "u" , 86 : "v" , 87 : "w" , 88 : "x" , 89 : "y" , 90 : "z" , 96 : "0" , 97 : "1" , 98 : "2" , 99 : "3" , 100 : "4" , 101 : "5" , 102 : "6" , 103 : "7" , 104 : "8" , 105 : "9" , 106 : "*" , 107 : "+" , 109 : "-" , 110 : "." , 111 : "/" } , KeyCode : { BACKSPACE : 8 , COMMA : 188 , DELETE : 46 , DOWN : 40 , END : 35 , ENTER : 13 , ESCAPE : 27 , HOME : 36 , LEFT : 37 , NUMPAD _ADD : 107 , NUMPAD _DECIMAL : 110 , NUMPAD _DIVIDE : 111 , NUMPAD _ENTER : 108 , NUMPAD _MULTIPLY : 106 , NUMPAD _SUBTRACT : 109 , PAGE _DOWN : 34 , PAGE _UP : 33 , PERIOD : 190 , RIGHT : 39 , SPACE : 32 , TAB : 9 , UP : 38 } , Status : { SUCCESS : 1 , WRONG : 2 , START : 3 , END : 4 , WAITING : 5 , READY : 6 , RUNNING : 7 , OUTOFBOUNDS : 8 , NULL : - 1 } , Direction : { Top : "top" , Bottom : "bottom" , Left : "left" , Right : "right" , Custom : "custom" } , Axis : { Vertical : "vertical" , Horizontal : "horizontal" } , Selection : { Default : - 2 , None : - 1 , Single : 0 , Multi : 1 , All : 2 } , HorizontalAlign : { Left : "left" , Right : "right" , Center : "center" , Stretch : "stretch" } , VerticalAlign : { Middle : "middle" , Top : "top" , Bottom : "bottom" , Stretch : "stretch" } , StartOfWeek : 1 } ) , BI . version = "2.0" , BI . AbsoluteCenterLayout = BI . inherit ( BI . Layout , { props : function ( ) { return BI . extend ( BI . AbsoluteCenterLayout . superclass . props . apply ( this , arguments ) , { baseCls : "bi-absolute-center-layout" , hgap : 0 , lgap : 0 , rgap : 0 , vgap : 0 , tgap : 0 , bgap : 0 } ) } , render : function ( ) { BI . AbsoluteCenterLayout . superclass . r
this . populate ( this . options . items ) } , _addElement : function ( i , item ) { var o = this . options , w = BI . AbsoluteLayout . superclass . _addElement . apply ( this , arguments ) , left = 0 , right = 0 , top = 0 , bottom = 0 ; return BI . isNotNull ( item . left ) && ( w . element . css ( { left : item . left } ) , left += item . left ) , BI . isNotNull ( item . right ) && ( w . element . css ( { right : item . right } ) , right += item . right ) , BI . isNotNull ( item . top ) && ( w . element . css ( { top : item . top } ) , top += item . top ) , BI . isNotNull ( item . bottom ) && ( w . element . css ( { bottom : item . bottom } ) , bottom += item . bottom ) , BI . isNotNull ( o . hgap ) && ( left += o . hgap , w . element . css ( { left : left } ) , right += o . hgap , w . element . css ( { right : right } ) ) , BI . isNotNull ( o . vgap ) && ( top += o . vgap , w . element . css ( { top : top } ) , bottom += o . vgap , w . element . css ( { bottom : bottom } ) ) , BI . isNotNull ( o . lgap ) && ( left += o . lgap , w . element . css ( { left : left } ) ) , BI . isNotNull ( o . rgap ) && ( right += o . rgap , w . element . css ( { right : right } ) ) , BI . isNotNull ( o . tgap ) && ( top += o . tgap , w . element . css ( { top : top } ) ) , BI . isNotNull ( o . bgap ) && ( bottom += o . bgap , w . element . css ( { bottom : bottom } ) ) , BI . isNotNull ( item . width ) && w . element . css ( { width : item . width } ) , BI . isNotNull ( item . height ) && w . element . css ( { height : item . height } ) , w . element . css ( { position : "absolute" } ) , w } , resize : function ( ) { this . stroke ( this . options . items ) } , stroke : function ( items ) { this . options . items = items || [ ] ; var self = this ; BI . each ( items , function ( i , item ) { if ( item ) { if ( ! BI . isWidget ( item ) && ! item . el ) throw new Error ( "el must be exist" ) ; self . _addElement ( i , item ) } } ) } , populate : function ( items ) { BI . AbsoluteLayout . superclass . populate . apply ( this , arguments ) , this . _mount ( ) } } ) , BI . shortcut ( "bi.absolute" , BI . AbsoluteLayout ) , BI . AdaptiveLayout = BI . inherit ( BI . Layout , { props : function ( ) { return BI . extend ( BI . AdaptiveLayout . superclass . props . apply ( this , arguments ) , { baseCls : "bi-adaptive-layout" , hgap : null , vgap : null , lgap : null , rgap : null , tgap : null , bgap : null } ) } , render : function ( ) { BI . AdaptiveLayout . superclass . render . apply ( this , arguments ) , this . populate ( this . options . items ) } , _addElement : function ( i , item ) { var o = this . options , w = BI . AdaptiveLayout . superclass . _addElement . apply ( this , arguments ) ; w . element . css ( { position : "relative" } ) ; var left = 0 , right = 0 , top = 0 , bottom = 0 ; return BI . isNotNull ( item . left ) && w . element . css ( { left : item . left } ) , BI . isNotNull ( item . right ) && w . element . css ( { right : item . right } ) , BI . isNotNull ( item . top ) && w . element . css ( { top : item . top } ) , BI . isNotNull ( item . bottom ) && w . element . css ( { bottom : item . bottom } ) , BI . isNotNull ( o . hgap ) && ( left += o . hgap , w . element . css ( { "margin-left" : left } ) , right += o . hgap , w . element . css ( { "margin-right" : right } ) ) , BI . isNotNull ( o . vgap ) && ( top += o . vgap , w . element . css ( { "margin-top" : top } ) , bottom += o . vgap , w . element . css ( { "margin-bottom" : bottom } ) ) , BI . isNotNull ( o . lgap ) && ( left += o . lgap , w . element . css ( { "margin-left" : left } ) ) , BI . isNotNull ( o . rgap ) && ( right += o . rgap , w . element . css ( { "margin-right" : right } ) ) , BI . isNotNull ( o . tgap ) && ( top += o . tgap , w . element . css ( { "margin-top" : top } ) ) , BI . isNotNull ( o . bgap ) && ( bottom += o . bgap , w . element . css ( { "margin-bottom" : bottom } ) ) , BI . isNotNull ( item . width ) && w . element . css ( { width : item . width } ) , BI . isNotNull ( item . height ) && w . element . css ( { height : item . height } ) , w } , resize : function ( ) { this . stroke ( this . options . items ) } , populate : function ( items ) { BI . AbsoluteLayout . superclass . populate . apply ( this , arguments ) , this . _mount ( ) } } ) , BI . shortcut ( "bi.adaptive" , BI . AdaptiveLayout ) , BI . BorderLayout = BI . inherit ( BI . Layout , { props : function ( ) { return BI . extend ( BI . BorderLayout . superclass . props . apply ( this , arguments ) , { baseCls : "bi-border-layout" , items : { } } ) } , render : function ( ) { BI . BorderLayout . superclass . render . apply ( this , arguments ) , this . populate ( this . options . items ) } , resize : function ( ) { this . stroke ( this . options . items ) } , addItem : function ( item ) { throw new Error ( "cannot be added" ) } , stroke : function ( regions ) { var item , top = 0 , bottom = 0 , left = 0 , right = 0 ; if ( "north" in regions && ( item = regions . north , null != item ) ) { if ( item . el ) { if ( ! this . hasWidget ( this . getName ( ) + "north" ) ) { var w = BI . createWidget ( item ) ; this . addWidget ( this . getName ( ) + "north" , w ) } this . getWidgetByName ( this . getName ( ) + "north" ) . element . height ( item . height ) . css ( { position : "absolute" , top : item . top || 0 , left : item . left || 0 , right : item . right || 0 , bottom : "initial" } ) } top = ( item . height || 0 ) + ( item . top || 0 ) + ( item . bottom || 0 ) } if ( "south" in regions && ( item = regions . south , null != item ) ) { if ( item . el ) { if ( ! this
} for ( var o = this . options , tr = BI . createWidget ( { type : "bi.default" , tagName : "tr" } ) , i = 0 ; i < arr . length ; i ++ ) { var w = BI . createWidget ( arr [ i ] ) ; w . element . css ( { position : "relative" , top : "0" , left : "0" , margin : "0px auto" } ) , arr [ i ] . lgap && w . element . css ( { "margin-left" : arr [ i ] . lgap + "px" } ) , arr [ i ] . rgap && w . element . css ( { "margin-right" : arr [ i ] . rgap + "px" } ) , arr [ i ] . tgap && w . element . css ( { "margin-top" : arr [ i ] . tgap + "px" } ) , arr [ i ] . bgap && w . element . css ( { "margin-bottom" : arr [ i ] . bgap + "px" } ) , first ( w , this . rows ++ , i ) ; var td = BI . createWidget ( { type : "bi.default" , attributes : { width : o . columnSize [ i ] <= 1 ? 100 * o . columnSize [ i ] + "%" : o . columnSize [ i ] } , tagName : "td" , items : [ w ] } ) ; td . element . css ( { position : "relative" , "vertical-align" : "middle" , margin : "0" , padding : "0" , border : "none" } ) , tr . addItem ( td ) } return this . addWidget ( this . getName ( ) + idx , tr ) , tr } , appendFragment : function ( frag ) { this . $table . append ( frag ) , this . element . append ( this . $table ) } , resize : function ( ) { } , addItem : function ( arr ) { if ( ! BI . isArray ( arr ) ) throw new Error ( "item must be array" ) ; return BI . TdLayout . superclass . addItem . apply ( this , arguments ) } , update : function ( ) { } , populate : function ( items ) { BI . TdLayout . superclass . populate . apply ( this , arguments ) , this . _mount ( ) } } ) , BI . shortcut ( "bi.td" , BI . TdLayout ) , BI . VerticalLayout = BI . inherit ( BI . Layout , { props : function ( ) { return BI . extend ( BI . VerticalLayout . superclass . props . apply ( this , arguments ) , { baseCls : "bi-vertical-layout" , hgap : 0 , vgap : 0 , lgap : 0 , rgap : 0 , tgap : 0 , bgap : 0 , scrolly : ! 0 } ) } , render : function ( ) { BI . VerticalLayout . superclass . render . apply ( this , arguments ) , this . populate ( this . options . items ) } , _addElement : function ( i , item ) { var o = this . options , w = BI . VerticalLayout . superclass . _addElement . apply ( this , arguments ) ; return w . element . css ( { position : "relative" } ) , o . vgap + o . tgap + ( item . tgap || 0 ) + ( item . vgap || 0 ) !== 0 && w . element . css ( { "margin-top" : ( 0 === i ? o . vgap : 0 ) + o . tgap + ( item . tgap || 0 ) + ( item . vgap || 0 ) + "px" } ) , o . hgap + o . lgap + ( item . lgap || 0 ) + ( item . hgap || 0 ) !== 0 && w . element . css ( { "margin-left" : o . hgap + o . lgap + ( item . lgap || 0 ) + ( item . hgap || 0 ) + "px" } ) , o . hgap + o . rgap + ( item . rgap || 0 ) + ( item . hgap || 0 ) !== 0 && w . element . css ( { "margin-right" : o . hgap + o . rgap + ( item . rgap || 0 ) + ( item . hgap || 0 ) + "px" } ) , o . vgap + o . bgap + ( item . bgap || 0 ) + ( item . vgap || 0 ) !== 0 && w . element . css ( { "margin-bottom" : o . vgap + o . bgap + ( item . bgap || 0 ) + ( item . vgap || 0 ) + "px" } ) , w } , resize : function ( ) { this . stroke ( this . options . items ) } , populate : function ( items ) { BI . VerticalLayout . superclass . populate . apply ( this , arguments ) , this . _mount ( ) } } ) , BI . shortcut ( "bi.vertical" , BI . VerticalLayout ) , BI . WindowLayout = BI . inherit ( BI . Layout , { props : function ( ) { return BI . extend ( BI . WindowLayout . superclass . props . apply ( this , arguments ) , { baseCls : "bi-window-layout" , columns : 3 , rows : 2 , hgap : 0 , vgap : 0 , lgap : 0 , rgap : 0 , tgap : 0 , bgap : 0 , columnSize : [ 100 , "fill" , 200 ] , rowSize : [ 100 , "fill" ] , items : [ [ { el : { type : "bi.button" , text : "button1" } } , { el : { type : "bi.button" , text : "button2" } } , { el : { type : "bi.button" , text : "button3" } } ] ] } ) } , render : function ( ) { BI . WindowLayout . superclass . render . apply ( this , arguments ) , this . populate ( this . options . items ) } , resize : function ( ) { this . stroke ( this . options . items ) } , addItem : function ( item ) { throw new Error ( "cannot be added" ) } , stroke : function ( items ) { function firstElement ( item , row , col ) { 0 === row && item . addClass ( "first-row" ) , 0 === col && item . addClass ( "first-col" ) , item . addClass ( BI . isOdd ( row + 1 ) ? "odd-row" : "even-row" ) , item . addClass ( BI . isOdd ( col + 1 ) ? "odd-col" : "even-col" ) , item . addClass ( "center-element" ) } function firstObject ( item , row , col ) { var cls = "" ; 0 === row && ( cls += " first-row" ) , 0 === col && ( cls += " first-col" ) , cls += BI . isOdd ( row + 1 ) ? " odd-row" : " even-row" , cls += BI . isOdd ( col + 1 ) ? " odd-col" : " even-col" , item . cls = ( item . cls || "" ) + cls + " center-element" } function first ( item , row , col ) { item instanceof BI . Widget ? firstElement ( item . element , row , col ) : item . el instanceof BI . Widget ? firstElement ( item . el . element , row , col ) : item . el ? firstObject ( item . el , row , col ) : firstObject ( item , row , col ) } var o = this . options ; BI . isNumber ( o . rowSize ) && ( o . rowSize = BI . makeArray ( o . items . length , 1 / o . items . length ) ) , BI . isNumber ( o . columnSize ) && ( o . columnSize = BI . makeArray ( o . items [ 0 ] . length , 1 / o . items [ 0 ] . length ) ) ; for ( var i = 0 ; i < o . rows ; i ++ ) for ( var j = 0 ; j < o . columns ; j ++ ) { if ( ! o . items [ i ] [ j ] ) throw new Error ( "item be required" ) ; if ( ! this . hasWidget ( this . getName ( ) + i + "_" + j ) ) { var w = BI . createWid
( model instanceof Observer || model instanceof Model ) && ( model = model . model ) , model && model . _ _ob _ _ ? this . $$model = model : this . options = model || { } , this . _parent = Model . target ; var state = _ . isFunction ( this . state ) ? this . state ( ) : this . state , computed = this . computed , context = this . context , childContext = this . childContext , watch$$1 = this . watch , actions = this . actions , keys = _ . keys ( this . $$model ) . concat ( _ . keys ( state ) ) . concat ( _ . keys ( computed ) ) . concat ( context || [ ] ) , mixins = this . mixins ; if ( defineProps ( this , keys ) , childContext && defineContext ( this , childContext ) , this . $$model && ( this . model . _ _ob _ _ = this . $$model . _ _ob _ _ ) , initMixins ( this , mixins ) , this . init ( ) , initState ( this , state ) , initComputed ( this , computed ) , initWatch ( this , watch$$1 ) , initMethods ( this , actions ) , this . created && this . created ( ) , this . $$model ) return this . model } , Model . prototype . _init = function _init ( ) { } , Model . prototype . init = function init ( ) { this . _init ( ) } , Model . prototype . destroy = function destroy ( ) { for ( var _key3 in this . _computedWatchers ) this . _computedWatchers [ _key3 ] . teardown ( ) ; _ . each ( this . _watchers , function ( unwatches ) { unwatches = _ . isArray ( unwatches ) ? unwatches : [ unwatches ] , _ . each ( unwatches , function ( unwatch ) { unwatch ( ) } ) } ) , this . _watchers && ( this . _watchers = [ ] ) , this . destroyed && this . destroyed ( ) , this . $$model = null , this . $$computed = null , this . $$state = null } , Model } ( ) , version = "2.0" ; exports . define = define , exports . version = version , exports . $$skipArray = $$skipArray , exports . mixin = mixin , exports . Model = Model , exports . observerState = observerState , exports . Observer = Observer , exports . observe = observe , exports . notify = notify , exports . defineReactive = defineReactive , exports . set = set , exports . del = del , exports . Watcher = Watcher , exports . pushTarget = pushTarget , exports . popTarget = popTarget , exports . watch = watch , exports . toJSON = toJSON , exports . _ _esModule = ! 0 } ) , function ( factory ) { "function" == typeof define && define . amd ? define ( [ "../core/jquery" ] , factory ) : "object" == typeof exports ? module . exports = factory : factory ( BI . jQuery ) } ( function ( $ ) { function handler ( event ) { var orgEvent = event || _global . event , args = slice . call ( arguments , 1 ) , delta = 0 , deltaX = 0 , deltaY = 0 , absDelta = 0 , offsetX = 0 , offsetY = 0 ; if ( event = $ . event . fix ( orgEvent ) , event . type = "mousewheel" , "detail" in orgEvent && ( deltaY = orgEvent . detail * - 1 ) , "wheelDelta" in orgEvent && ( deltaY = orgEvent . wheelDelta ) , "wheelDeltaY" in orgEvent && ( deltaY = orgEvent . wheelDeltaY ) , "wheelDeltaX" in orgEvent && ( deltaX = orgEvent . wheelDeltaX * - 1 ) , "axis" in orgEvent && orgEvent . axis === orgEvent . HORIZONTAL _AXIS && ( deltaX = deltaY * - 1 , deltaY = 0 ) , delta = 0 === deltaY ? deltaX : deltaY , "deltaY" in orgEvent && ( deltaY = orgEvent . deltaY * - 1 , delta = deltaY ) , "deltaX" in orgEvent && ( deltaX = orgEvent . deltaX , 0 === deltaY && ( delta = deltaX * - 1 ) ) , 0 !== deltaY || 0 !== deltaX ) { if ( 1 === orgEvent . deltaMode ) { var lineHeight = 40 ; delta *= lineHeight , deltaY *= lineHeight , deltaX *= lineHeight } else if ( 2 === orgEvent . deltaMode ) { var pageHeight = 800 ; delta *= pageHeight , deltaY *= pageHeight , deltaX *= pageHeight } if ( absDelta = Math . max ( Math . abs ( deltaY ) , Math . abs ( deltaX ) ) , ( ! lowestDelta || absDelta < lowestDelta ) && ( lowestDelta = absDelta , shouldAdjustOldDeltas ( orgEvent , absDelta ) && ( lowestDelta /= 40 ) ) , shouldAdjustOldDeltas ( orgEvent , absDelta ) && ( delta /= 40 , deltaX /= 40 , deltaY /= 40 ) , delta = Math [ delta >= 1 ? "floor" : "ceil" ] ( delta / lowestDelta ) , deltaX = Math [ deltaX >= 1 ? "floor" : "ceil" ] ( deltaX / lowestDelta ) , deltaY = Math [ deltaY >= 1 ? "floor" : "ceil" ] ( deltaY / lowestDelta ) , special . settings . normalizeOffset && this . getBoundingClientRect ) { var boundingRect = this . getBoundingClientRect ( ) ; offsetX = event . clientX - boundingRect . left , offsetY = event . clientY - boundingRect . top } return event . deltaX = deltaX , event . deltaY = deltaY , event . deltaFactor = lowestDelta , event . offsetX = offsetX , event . offsetY = offsetY , event . deltaMode = 0 , args . unshift ( event , delta , deltaX , deltaY ) , nullLowestDeltaTimeout && clearTimeout ( nullLowestDeltaTimeout ) , nullLowestDeltaTimeout = setTimeout ( nullLowestDelta , 200 ) , ( $ . event . dispatch || $ . event . handle ) . apply ( this , args ) } } function nullLowestDelta ( ) { lowestDelta = null } function shouldAdjustOldDeltas ( orgEvent , absDelta ) { return special . settings . adjustOldDeltas && "mousewheel" === orgEvent . type && absDelta % 120 === 0 } var toFix = [ "wheel" , "mousewheel" , "DOMMouseScroll" , "MozMousePixelScroll" ] , toBind = "onwheel" in document || document . documentMode >= 9 ? [ "wheel" ] : [ "mousewheel"
treeNode . children . length > totalCount ? ( treeNode . count = treeNode . children . length , BI . delay ( function ( ) { ajaxGetNodes ( treeNode ) } , perTime ) ) : ( zTree . updateNode ( treeNode ) , zTree . selectNode ( treeNode . children [ 0 ] ) ) } } function onAsyncError ( event , treeId , treeNode , XMLHttpRequest , textStatus , errorThrown ) { var zTree = self . nodes ; BI . Msg . toast ( "Error!" , "warning" ) } function ajaxGetNodes ( treeNode , reloadType ) { var zTree = self . nodes ; "refresh" == reloadType && zTree . updateNode ( treeNode ) , zTree . reAsyncChildNodes ( treeNode , reloadType , ! 0 ) } function beforeCheck ( treeId , treeNode ) { function track ( children ) { BI . each ( children , function ( i , ch ) { ch . halfCheck === ! 0 && ( ch . halfCheck = ! 1 , track ( ch . children ) ) } ) } if ( treeNode . halfCheck = ! 1 , treeNode . checked === ! 0 ) { track ( treeNode . children ) ; var treeObj = self . nodes , nodes = treeObj . getSelectedNodes ( ) ; BI . $ . each ( nodes , function ( index , node ) { node . halfCheck = ! 1 } ) } var status = treeNode . getCheckStatus ( ) ; status . half === ! 0 && status . checked === ! 0 && ( treeNode . checked = ! 1 ) } function onCheck ( event , treeId , treeNode ) { self . _selectTreeNode ( treeId , treeNode ) } function onExpand ( event , treeId , treeNode ) { treeNode . halfCheck = ! 1 } function onCollapse ( event , treeId , treeNode ) { } var paras = this . options . paras , self = this , setting = { async : { enable : ! 0 , url : getUrl , autoParam : [ "id" , "name" ] , otherParam : BI . cjkEncodeDO ( paras ) } , check : { enable : ! 0 } , data : { key : { title : "title" , name : "text" } , simpleData : { enable : ! 0 } } , view : { showIcon : ! 1 , expandSpeed : "" , nameIsHTML : ! 0 , dblClickExpand : ! 1 } , callback : { beforeExpand : beforeExpand , onAsyncSuccess : onAsyncSuccess , onAsyncError : onAsyncError , beforeCheck : beforeCheck , onCheck : onCheck , onExpand : onExpand , onCollapse : onCollapse , onClick : onClick } } , className = "dark" , perTime = 100 ; return setting } , _getParentValues : function ( treeNode ) { if ( ! treeNode . getParentNode ( ) ) return [ ] ; var parentNode = treeNode . getParentNode ( ) , result = this . _getParentValues ( parentNode ) ; return result = result . concat ( [ this . _getNodeValue ( parentNode ) ] ) } , _getNodeValue : function ( node ) { return null == node . value ? BI . replaceAll ( node . text . replace ( /<[^>]+>/g , "" ) , " " , " " ) : node . value } , _getHalfSelectedValues : function ( map , node ) { var self = this , checkState = node . getCheckStatus ( ) ; if ( checkState . checked !== ! 1 || checkState . half !== ! 1 ) { if ( BI . isNotEmptyArray ( node . children ) && checkState . half === ! 0 ) { var children = node . children ; return void BI . each ( children , function ( i , ch ) { self . _getHalfSelectedValues ( map , ch ) } ) } var parent = node . parentValues || self . _getParentValues ( node ) , path = parent . concat ( this . _getNodeValue ( node ) ) ; if ( BI . isNotEmptyArray ( node . children ) || checkState . half === ! 1 ) return void this . _buildTree ( map , path ) ; var storeValues = BI . deepClone ( this . options . paras . selectedValues ) , treeNode = this . _getTree ( storeValues , path ) ; this . _addTreeNode ( map , parent , this . _getNodeValue ( node ) , treeNode ) } } , _getTree : function ( map , values ) { var cur = map ; return BI . any ( values , function ( i , value ) { return null == cur [ value ] || void ( cur = cur [ value ] ) } ) , cur } , _addTreeNode : function ( map , values , key , value ) { var cur = map ; BI . each ( values , function ( i , value ) { null == cur [ value ] && ( cur [ value ] = { } ) , cur = cur [ value ] } ) , cur [ key ] = value } , _buildTree : function ( map , values ) { var cur = map ; BI . each ( values , function ( i , value ) { null == cur [ value ] && ( cur [ value ] = { } ) , cur = cur [ value ] } ) } , _getSelectedValues : function ( ) { function track ( nodes ) { BI . each ( nodes , function ( i , node ) { var checkState = node . getCheckStatus ( ) ; if ( checkState . checked === ! 0 || checkState . half === ! 0 ) if ( checkState . half === ! 0 ) self . _getHalfSelectedValues ( hashMap , node ) ; else { var parentValues = node . parentValues || self . _getParentValues ( node ) , values = parentValues . concat ( [ self . _getNodeValue ( node ) ] ) ; self . _buildTree ( hashMap , values ) } } ) } var self = this , hashMap = { } , rootNoots = this . nodes . getNodes ( ) ; return track ( rootNoots ) , hashMap } , _dealWidthNodes : function ( nodes ) { var self = this , o = this . options , ns = BI . Tree . arrayFormat ( nodes ) ; return BI . each ( ns , function ( i , n ) { n . title = n . title || n . text || n . value , n . isParent = n . isParent || n . parent , BI . isKey ( o . paras . keyword ) ? n . text = BI . $ ( "<div>" ) . _ _textKeywordMarked _ _ ( n . text , o . paras . keyword , n . py ) . html ( ) : n . text = BI . htmlEncode ( n . text + "" ) } ) , nodes } , _loadMore : function ( ) { var self = this , o = this . options ; this . tip . setLoading ( ) ; var op = BI . extend ( { } , o . paras , { times : ++ this . times } ) ; o . itemsCreator ( op , function ( res ) { if ( self . _stop !== ! 0 ) { var hasNext = ! ! res . hasNext
self . fireEvent ( BI . Controller . EVENT _CHANGE , BI . Events . EXPAND , "" , self . combo ) , self . fireEvent ( BI . Combo . EVENT _EXPAND ) ) } ) , self . element . on ( "mouseleave." + self . getName ( ) , function ( e ) { self . popupView && ( self . popupView . element . on ( "mouseenter." + self . getName ( ) , function ( e ) { enterPopup = ! 0 , self . popupView . element . on ( "mouseleave." + self . getName ( ) , function ( e ) { hide ( ) } ) , self . popupView . element . off ( "mouseenter." + self . getName ( ) ) } ) , BI . defer ( function ( ) { enterPopup || hide ( ) } , 50 ) ) } ) ; break ; case "click" : var debounce = BI . debounce ( function ( e ) { self . combo . element . _ _isMouseInBounds _ _ ( e ) && self . isEnabled ( ) && self . isValid ( ) && self . combo . isEnabled ( ) && self . combo . isValid ( ) && ( o . toggle ? self . _toggle ( ) : self . _popupView ( ) , self . isViewVisible ( ) ? ( self . fireEvent ( BI . Controller . EVENT _CHANGE , BI . Events . EXPAND , "" , self . combo ) , self . fireEvent ( BI . Combo . EVENT _EXPAND ) ) : ( self . fireEvent ( BI . Controller . EVENT _CHANGE , BI . Events . COLLAPSE , "" , self . combo ) , self . fireEvent ( BI . Combo . EVENT _COLLAPSE ) ) ) } , BI . EVENT _RESPONSE _TIME , { leading : ! 0 , trailing : ! 1 } ) ; self . element . off ( ev + "." + self . getName ( ) ) . on ( ev + "." + self . getName ( ) , function ( e ) { debounce ( e ) , st ( e ) } ) ; break ; case "click-hover" : var debounce = BI . debounce ( function ( e ) { self . combo . element . _ _isMouseInBounds _ _ ( e ) && self . isEnabled ( ) && self . isValid ( ) && self . combo . isEnabled ( ) && self . combo . isValid ( ) && ( self . _popupView ( ) , self . isViewVisible ( ) && ( self . fireEvent ( BI . Controller . EVENT _CHANGE , BI . Events . EXPAND , "" , self . combo ) , self . fireEvent ( BI . Combo . EVENT _EXPAND ) ) ) } , BI . EVENT _RESPONSE _TIME , { leading : ! 0 , trailing : ! 1 } ) ; self . element . off ( "click." + self . getName ( ) ) . on ( "click." + self . getName ( ) , function ( e ) { debounce ( e ) , st ( e ) } ) , self . element . on ( "mouseleave." + self . getName ( ) , function ( e ) { self . popupView && ( self . popupView . element . on ( "mouseenter." + self . getName ( ) , function ( e ) { enterPopup = ! 0 , self . popupView . element . on ( "mouseleave." + self . getName ( ) , function ( e ) { hide ( ) } ) , self . popupView . element . off ( "mouseenter." + self . getName ( ) ) } ) , BI . defer ( function ( ) { enterPopup || hide ( ) } , 50 ) ) } ) } } ) } , _initCombo : function ( ) { this . combo = BI . createWidget ( this . options . el , { value : this . options . value } ) } , _assertPopupView : function ( ) { var self = this , o = this . options ; null == this . popupView && ( this . popupView = BI . createWidget ( this . options . popup , { type : "bi.popup_view" , value : o . value } , this ) , this . popupView . on ( BI . Controller . EVENT _CHANGE , function ( type , value , obj ) { type === BI . Events . CLICK && ( self . combo . setValue ( self . getValue ( ) ) , self . fireEvent ( BI . Combo . EVENT _CHANGE , value , obj ) ) , self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) , this . popupView . setVisible ( ! 1 ) , BI . nextTick ( function ( ) { self . fireEvent ( BI . Combo . EVENT _AFTER _INIT ) } ) ) } , _assertPopupViewRender : function ( ) { this . _assertPopupView ( ) , this . _rendered || ( BI . createWidget ( { type : "bi.vertical" , scrolly : ! 1 , element : this . options . container || this , items : [ { el : this . popupView } ] } ) , this . _rendered = ! 0 ) } , _hideIf : function ( e ) { if ( this . element . find ( e . target ) . length > 0 || this . popupView && this . popupView . element . find ( e . target ) . length > 0 || "CodeMirror-cursor" === e . target . className || BI . Widget . _renderEngine . createElement ( e . target ) . closest ( ".CodeMirror-hints" ) . length > 0 ) { var directions = this . options . direction . split ( "," ) ; return void ( ( BI . contains ( directions , "innerLeft" ) || BI . contains ( directions , "innerRight" ) ) && ( this . adjustWidth ( ) , this . adjustHeight ( ) ) ) } var isHide = this . options . hideChecker . apply ( this , [ e ] ) ; isHide !== ! 1 && this . _hideView ( ) } , _hideView : function ( ) { this . fireEvent ( BI . Combo . EVENT _BEFORE _HIDEVIEW ) , this . options . destroyWhenHide === ! 0 ? ( this . popupView && this . popupView . destroy ( ) , this . popupView = null , this . _rendered = ! 1 ) : this . popupView && this . popupView . invisible ( ) , this . element . removeClass ( this . options . comboClass ) , BI . Widget . _renderEngine . createElement ( document ) . unbind ( "mousedown." + this . getName ( ) ) . unbind ( "mousewheel." + this . getName ( ) ) , this . fireEvent ( BI . Combo . EVENT _AFTER _HIDEVIEW ) } , _popupView : function ( e ) { this . _assertPopupViewRender ( ) , this . fireEvent ( BI . Combo . EVENT _BEFORE _POPUPVIEW ) , this . popupView . visible ( ) , this . adjustWidth ( e ) , this . adjustHeight ( e ) , this . element . addClass ( this . options . comboClass ) , BI . Widget . _renderEngine . createElement ( document ) . unbind ( "mousedown." + this . getName ( ) ) . unbind ( "mousewheel." + this . getName ( ) ) , BI . Widget . _renderEngine . createElement ( document ) . bind ( "mousedown." + this . getName ( ) , B
} , hasMatched : function ( ) { return this . _assertPopupView ( ) , this . popupView . hasMatched ( ) } , adjustHeight : function ( ) { BI . Maskers . has ( this . getName ( ) ) && BI . Maskers . get ( this . getName ( ) ) . isVisible ( ) && BI . Maskers . show ( this . getName ( ) ) } , adjustView : function ( ) { this . isViewVisible ( ) && BI . Maskers . show ( this . getName ( ) ) } , setValue : function ( v ) { BI . isNull ( this . popupView ) ? this . options . popup . value = v : this . popupView . setValue ( v ) } , getKeyword : function ( ) { return this . _getLastSearchKeyword ( ) } , getKeywords : function ( ) { return this . editor . getKeywords ( ) } , getValue : function ( ) { var o = this . options ; return o . isAutoSync && o . adapter && o . adapter . getValue ? o . adapter . getValue ( ) : this . isSearching ( ) ? this . popupView . getValue ( ) : o . adapter && o . adapter . getValue ? o . adapter . getValue ( ) : BI . isNull ( this . popupView ) ? o . popup . value : this . popupView . getValue ( ) } , populate : function ( result , searchResult , keyword ) { var o = this . options ; this . _assertPopupView ( ) , this . popupView . populate . apply ( this . popupView , arguments ) , o . isAutoSync && o . adapter && o . adapter . getValue && this . popupView . setValue ( o . adapter . getValue ( ) ) } , empty : function ( ) { this . popupView && this . popupView . empty ( ) } , destroyed : function ( ) { BI . Maskers . remove ( this . getName ( ) ) } } ) , BI . Searcher . EVENT _CHANGE = "EVENT_CHANGE" , BI . Searcher . EVENT _START = "EVENT_START" , BI . Searcher . EVENT _STOP = "EVENT_STOP" , BI . Searcher . EVENT _PAUSE = "EVENT_PAUSE" , BI . Searcher . EVENT _SEARCHING = "EVENT_SEARCHING" , BI . Searcher . EVENT _AFTER _INIT = "EVENT_AFTER_INIT" , BI . shortcut ( "bi.searcher" , BI . Searcher ) , BI . Switcher = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . Switcher . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-switcher" , direction : BI . Direction . Top , trigger : "click" , toggle : ! 0 , el : { } , popup : { } , adapter : null , masker : { } , switcherClass : "bi-switcher-popup" , hoverClass : "bi-switcher-hover" } ) } , _init : function ( ) { BI . Switcher . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . _initSwitcher ( ) , this . _initPullDownAction ( ) , this . switcher . on ( BI . Controller . EVENT _CHANGE , function ( type , value , obj ) { self . isEnabled ( ) && self . isValid ( ) && ( type === BI . Events . EXPAND && self . _popupView ( ) , type === BI . Events . COLLAPSE && self . _hideView ( ) , type === BI . Events . EXPAND && ( self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) , self . fireEvent ( BI . Switcher . EVENT _EXPAND ) ) , type === BI . Events . COLLAPSE && ( self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) , self . isViewVisible ( ) && self . fireEvent ( BI . Switcher . EVENT _COLLAPSE ) ) , type === BI . Events . CLICK && self . fireEvent ( BI . Switcher . EVENT _TRIGGER _CHANGE , value , obj ) ) } ) , this . element . hover ( function ( ) { self . isEnabled ( ) && self . switcher . isEnabled ( ) && self . element . addClass ( o . hoverClass ) } , function ( ) { self . isEnabled ( ) && self . switcher . isEnabled ( ) && self . element . removeClass ( o . hoverClass ) } ) , BI . createWidget ( { type : "bi.vertical" , scrolly : ! 1 , element : this , items : [ { el : this . switcher } ] } ) , o . isDefaultInit && this . _assertPopupView ( ) } , _toggle : function ( ) { this . _assertPopupView ( ) , this . isExpanded ( ) ? this . _hideView ( ) : this . isEnabled ( ) && this . _popupView ( ) } , _initPullDownAction : function ( ) { var self = this , o = this . options , evs = this . options . trigger . split ( "," ) ; BI . each ( evs , function ( i , e ) { switch ( e ) { case "hover" : self . element [ e ] ( function ( e ) { self . isEnabled ( ) && self . switcher . isEnabled ( ) && ( self . _popupView ( ) , self . fireEvent ( BI . Controller . EVENT _CHANGE , BI . Events . EXPAND , "" , self . switcher ) , self . fireEvent ( BI . Switcher . EVENT _EXPAND ) ) } , function ( ) { self . isEnabled ( ) && self . switcher . isEnabled ( ) && o . toggle && ( self . _hideView ( ) , self . fireEvent ( BI . Controller . EVENT _CHANGE , BI . Events . COLLAPSE , "" , self . switcher ) , self . fireEvent ( BI . Switcher . EVENT _COLLAPSE ) ) } ) ; break ; default : e && self . element . off ( e + "." + self . getName ( ) ) . on ( e + "." + self . getName ( ) , BI . debounce ( function ( e ) { self . switcher . element . _ _isMouseInBounds _ _ ( e ) && self . isEnabled ( ) && self . switcher . isEnabled ( ) && ( o . toggle ? self . _toggle ( ) : self . _popupView ( ) , self . isExpanded ( ) ? ( self . fireEvent ( BI . Controller . EVENT _CHANGE , BI . Events . EXPAND , "" , self . switcher ) , self . fireEvent ( BI . Switcher . EVENT _EXPAND ) ) : ( self . fireEvent ( BI . Controller . EVENT _CHANGE , BI . Events . COLLAPSE , "" , self . switcher ) , self . fireEvent ( BI . Switcher . EVENT _COLLAPSE ) ) ) } , BI . EVENT _RESPONSE _TIME , { leading : ! 0 , trailing : ! 1 } ) ) } } ) } , _initSwitcher : function ( ) { this . switcher = BI . createWidget ( this . options . el , { value : this . opt
BI . SearcherView . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . matcher = BI . createWidget ( o . matcher , { type : "bi.button_group" , chooseType : o . chooseType , behaviors : { redmark : function ( ) { return ! 0 } } , layouts : [ { type : "bi.vertical" } ] , value : o . value } ) , this . matcher . on ( BI . Controller . EVENT _CHANGE , function ( type , val , ob ) { self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) , type === BI . Events . CLICK && self . fireEvent ( BI . SearcherView . EVENT _CHANGE , val , ob ) } ) , this . spliter = BI . createWidget ( { type : "bi.vertical" , height : 1 , hgap : 10 , items : [ { type : "bi.layout" , height : 1 , cls : "searcher-view-spliter bi-background" } ] } ) , this . searcher = BI . createWidget ( o . searcher , { type : "bi.button_group" , chooseType : o . chooseType , behaviors : { redmark : function ( ) { return ! 0 } } , layouts : [ { type : "bi.vertical" } ] , value : o . value } ) , this . searcher . on ( BI . Controller . EVENT _CHANGE , function ( type , val , ob ) { self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) , type === BI . Events . CLICK && self . fireEvent ( BI . SearcherView . EVENT _CHANGE , val , ob ) } ) , BI . createWidget ( { type : "bi.vertical" , element : this , items : [ this . matcher , this . spliter , this . searcher ] } ) } , startSearch : function ( ) { } , stopSearch : function ( ) { } , setValue : function ( v ) { this . matcher . setValue ( v ) , this . searcher . setValue ( v ) } , getValue : function ( ) { return this . matcher . getValue ( ) . concat ( this . searcher . getValue ( ) ) } , populate : function ( searchResult , matchResult , keyword ) { searchResult || ( searchResult = [ ] ) , matchResult || ( matchResult = [ ] ) , this . setTipVisible ( searchResult . length + matchResult . length === 0 ) , this . spliter . setVisible ( BI . isNotEmptyArray ( matchResult ) && BI . isNotEmptyArray ( searchResult ) ) , this . matcher . populate ( matchResult , keyword ) , this . searcher . populate ( searchResult , keyword ) } , empty : function ( ) { this . searcher . empty ( ) , this . matcher . empty ( ) } , hasMatched : function ( ) { return this . matcher . getAllButtons ( ) . length > 0 } } ) , BI . SearcherView . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.searcher_view" , BI . SearcherView ) , BI . ListView = BI . inherit ( BI . Widget , { props : function ( ) { return { baseCls : "bi-list-view" , overscanHeight : 100 , blockSize : 10 , scrollTop : 0 , el : { } , items : [ ] } } , init : function ( ) { var self = this ; this . renderedIndex = - 1 , this . cache = { } } , render : function ( ) { var self = this , o = this . options ; return { type : "bi.vertical" , items : [ BI . extend ( { type : "bi.vertical" , scrolly : ! 1 , ref : function ( ) { self . container = this } } , o . el ) ] , element : this } } , mounted : function ( ) { var self = this , o = this . options ; this . _populate ( ) , this . element . scroll ( function ( e ) { o . scrollTop = self . element . scrollTop ( ) , self . _calculateBlocksToRender ( ) } ) ; var lastWidth = this . element . width ( ) , lastHeight = this . element . height ( ) ; BI . ResizeDetector . addResizeListener ( this , function ( ) { var width = self . element . width ( ) , height = self . element . height ( ) ; width === lastWidth && height === lastHeight || ( lastWidth = width , lastHeight = height , self . _calculateBlocksToRender ( ) ) } ) } , _renderMoreIf : function ( ) { for ( var self = this , o = this . options , height = this . element . height ( ) , minContentHeight = o . scrollTop + height + o . overscanHeight , index = this . cache [ this . renderedIndex ] && this . cache [ this . renderedIndex ] . index + o . blockSize || 0 , cnt = this . renderedIndex + 1 , lastHeight , getElementHeight = function ( ) { return self . container . element . height ( ) } ; ( lastHeight = getElementHeight ( ) ) < minContentHeight && index < o . items . length ; ) { var items = o . items . slice ( index , index + o . blockSize ) ; this . container . addItems ( items , this ) ; var addedHeight = getElementHeight ( ) - lastHeight ; this . cache [ cnt ] = { index : index , scrollTop : lastHeight , height : addedHeight } , this . renderedIndex = cnt , cnt ++ , index += o . blockSize } } , _calculateBlocksToRender : function ( ) { var o = this . options ; this . _renderMoreIf ( ) } , _populate : function ( items ) { var o = this . options ; items && this . options . items !== items && ( this . options . items = items ) , this . _calculateBlocksToRender ( ) , this . element . scrollTop ( o . scrollTop ) } , restore : function ( ) { this . renderedIndex = - 1 , this . container . empty ( ) , this . cache = { } } , populate : function ( items ) { items && this . options . items !== items && this . restore ( ) , this . _populate ( items ) } , destroyed : function ( ) { this . restore ( ) } } ) , BI . shortcut ( "bi.list_view" , BI . ListView ) , BI . VirtualList = BI . inherit ( BI . Widget , { props : function ( ) { return { baseCls : "bi-virtual-list" , overscanHeight : 100 , blockSize : 10 , scrollTop : 0 , items : [ ] } } , init : function ( ) { var self = this ; this . renderedIndex = - 1 , this . cache = { } } , render : fu
} , setValue : function ( ) { this . isReadOnly ( ) || this . text . setValue . apply ( this . text , arguments ) } , getValue : function ( ) { return this . text . getValue ( ) } , setText : function ( ) { this . text . setText . apply ( this . text , arguments ) } , getText : function ( ) { return this . text . getText ( ) } , doRedMark : function ( ) { this . text . doRedMark . apply ( this . text , arguments ) } , unRedMark : function ( ) { this . text . unRedMark . apply ( this . text , arguments ) } , doHighLight : function ( ) { this . text . doHighLight . apply ( this . text , arguments ) } , unHighLight : function ( ) { this . text . unHighLight . apply ( this . text , arguments ) } } ) , BI . TextIconItem . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.text_icon_item" , BI . TextIconItem ) , BI . TextItem = BI . inherit ( BI . BasicButton , { _defaultConfig : function ( ) { var conf = BI . TextItem . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { baseCls : ( conf . baseCls || "" ) + " bi-text-item" , textAlign : "left" , whiteSpace : "nowrap" , textHgap : 0 , textVgap : 0 , textLgap : 0 , textRgap : 0 } ) } , _init : function ( ) { BI . TextItem . superclass . _init . apply ( this , arguments ) ; var o = this . options ; this . text = BI . createWidget ( { type : "bi.label" , element : this , textAlign : o . textAlign , whiteSpace : o . whiteSpace , textHeight : "nowrap" == o . whiteSpace ? o . height : o . textHeight , height : o . height , hgap : o . textHgap , vgap : o . textVgap , lgap : o . textLgap , rgap : o . textRgap , text : o . text , value : o . value , keyword : o . keyword , py : o . py } ) } , doClick : function ( ) { BI . TextItem . superclass . doClick . apply ( this , arguments ) , this . isValid ( ) && this . fireEvent ( BI . TextItem . EVENT _CHANGE , this . getValue ( ) , this ) } , doRedMark : function ( ) { this . text . doRedMark . apply ( this . text , arguments ) } , unRedMark : function ( ) { this . text . unRedMark . apply ( this . text , arguments ) } , doHighLight : function ( ) { this . text . doHighLight . apply ( this . text , arguments ) } , unHighLight : function ( ) { this . text . unHighLight . apply ( this . text , arguments ) } , setValue : function ( ) { this . isReadOnly ( ) || this . text . setValue . apply ( this . text , arguments ) } , getValue : function ( ) { return this . text . getValue ( ) } , setText : function ( ) { this . text . setText . apply ( this . text , arguments ) } , getText : function ( ) { return this . text . getText ( ) } } ) , BI . TextItem . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.text_item" , BI . TextItem ) , BI . IconTextIconNode = BI . inherit ( BI . NodeButton , { _defaultConfig : function ( ) { var conf = BI . IconTextIconNode . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { baseCls : ( conf . baseCls || "" ) + " bi-icon-text-icon-node" , logic : { dynamic : ! 1 } , iconCls1 : "close-ha-font" , iconCls2 : "close-ha-font" , iconHeight : null , iconWidth : null , textHgap : 0 , textVgap : 0 , textLgap : 0 , textRgap : 0 } ) } , _init : function ( ) { BI . IconTextIconNode . superclass . _init . apply ( this , arguments ) ; var o = this . options , c = this . _const ; this . text = BI . createWidget ( { type : "bi.label" , textAlign : "left" , hgap : o . textHgap , vgap : o . textVgap , lgap : o . textLgap , rgap : o . textRgap , text : o . text , value : o . value , keyword : o . keyword , height : o . height } ) ; var icon1 = BI . createWidget ( { type : "bi.icon_label" , cls : o . iconCls1 , width : o . height , height : o . height , iconWidth : o . iconWidth , iconHeight : o . iconHeight } ) , blank = BI . createWidget ( { type : "bi.layout" , width : o . height , height : o . height } ) ; BI . createWidget ( { type : "bi.absolute" , element : this , items : [ { el : { type : "bi.icon_label" , cls : o . iconCls2 , width : o . height , iconWidth : o . iconWidth , iconHeight : o . iconHeight } , top : 0 , bottom : 0 , right : 0 } ] } ) , BI . createWidget ( BI . extend ( { element : this } , BI . LogicFactory . createLogic ( "horizontal" , BI . extend ( o . logic , { items : BI . LogicFactory . createLogicItemsByDirection ( "left" , icon1 , this . text , blank ) } ) ) ) ) } , doClick : function ( ) { BI . IconTextIconNode . superclass . doClick . apply ( this , arguments ) , this . isValid ( ) && this . fireEvent ( BI . IconTextIconNode . EVENT _CHANGE , this . getValue ( ) , this ) } , doRedMark : function ( ) { this . text . doRedMark . apply ( this . text , arguments ) } , unRedMark : function ( ) { this . text . unRedMark . apply ( this . text , arguments ) } , setValue : function ( ) { this . isReadOnly ( ) || this . text . setValue . apply ( this . text , arguments ) } , getValue : function ( ) { return this . text . getValue ( ) } , setText : function ( ) { this . text . setText . apply ( this . text , arguments ) } , getText : function ( ) { return this . text . getText ( ) } } ) , BI . IconTextIconNode . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.icon_text_icon_node" , BI . IconTextIconNode ) , BI . IconTextNode = BI . inherit ( BI . NodeButton , { _defaultConfig : function ( ) { var conf = BI . IconTextNode . superclass . _defaultConfig . apply
var length = handler . files . length , i = 0 , onload = handler . onload , onloadstart = handler . onloadstart ; for ( handler . current = 0 , handler . total = 0 , handler . sent = 0 ; handler . current < length ; ) handler . total += handler . files [ handler . current ] . fileSize || handler . files [ handler . current ] . size , handler . current ++ ; return handler . current = 0 , length && handler . files [ 0 ] . fileSize !== - 1 ? ( handler . file = handler . files [ handler . current ] , sendFile ( handler , maxSize , width , height ) . onload = function ( rpe , xhr ) { handler . onloadstart = null , handler . sent += handler . files [ handler . current ] . fileSize || handler . files [ handler . current ] . size , ++ handler . current < length ? ( handler . file = handler . files [ handler . current ] , sendFile ( handler , maxSize , width , height ) . onload = arguments . callee ) : onload && ( handler . onloadstart = onloadstart , handler . onload = onload , handler . onload ( rpe , xhr ) ) } ) : length && ( handler . total = 100 * length , handler . file = handler . files [ handler . current ] , sendFile ( handler , maxSize , width , height ) . onload = function ( rpe , xhr ) { var callee = arguments . callee ; handler . onloadstart = null , handler . sent += 100 , ++ handler . current < length ? ( /\b(chrome|safari)\b/i . test ( navigator . userAgent ) && ( handler . iframe . parentNode . removeChild ( handler . iframe ) , handler . iframe = null ) , setTimeout ( function ( ) { handler . file = handler . files [ handler . current ] , sendFile ( handler , maxSize , width , height ) . onload = callee } , 15 ) ) : onload && setTimeout ( function ( ) { handler . iframe . parentNode . removeChild ( handler . iframe ) , handler . iframe = null , handler . onloadstart = onloadstart , handler . onload = onload , handler . onload ( rpe , xhr ) } , 15 ) } ) , handler } ; BI . File = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { var conf = BI . File . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { baseCls : ( conf . baseCls || "" ) + " bi-file display-block" , tagName : "input" , attributes : { type : "file" } , name : "" , url : "" , multiple : ! 0 , accept : "" , maxSize : - 1 } ) } , _init : function ( ) { var self = this , o = this . options ; BI . File . superclass . _init . apply ( this , arguments ) , o . multiple === ! 0 && this . element . attr ( "multiple" , "multiple" ) , this . element . attr ( "name" , o . name || this . getName ( ) ) , this . element . attr ( "title" , o . title || "" ) } , created : function ( ) { var self = this , o = this . options , _wrap = this . wrap = this . _wrap ( this . element [ 0 ] , o . maxSize ) ; _wrap . onloadstart = function ( rpe , xhr ) { self . fireEvent ( BI . File . EVENT _UPLOADSTART , arguments ) } , _wrap . onprogress = function ( rpe , xhr ) { this . file . fileSize !== - 1 && rpe . simulation , self . fireEvent ( BI . File . EVENT _PROGRESS , { file : this . file , total : rpe . total , loaded : rpe . loaded , simulation : rpe . simulation } ) } , _wrap . onerror = function ( ) { self . fireEvent ( BI . File . EVENT _ERROR ) } , _wrap . onload = function ( rpe , xhr ) { var self _ = this ; setTimeout ( function ( ) { if ( self _ . clean ( ) , self _ . hide ( ) , 200 > xhr . status || xhr . status > 399 ) return BI . Msg . toast ( BI . i18nText ( "BI-Upload_File_Error" ) , { level : "error" } ) , void self . fireEvent ( BI . File . EVENT _ERROR ) ; var error = BI . some ( _wrap . attach _array , function ( index , attach ) { if ( attach . errorCode ) return BI . Msg . toast ( attach . errorMsg , { level : "error" } ) , self . fireEvent ( BI . File . EVENT _ERROR , attach ) , ! 0 } ) ; ! error && self . fireEvent ( BI . File . EVENT _UPLOADED ) } , 1e3 ) } , _wrap . url = o . url , _wrap . fileType = o . accept , _wrap . attach _array = [ ] , _wrap . attach _names = [ ] , _wrap . attachNum = 0 } , _events : function ( wrap ) { var self = this ; return event . add ( wrap . dom . input , "change" , function ( ) { event . del ( wrap . dom . input , "change" , arguments . callee ) ; for ( var input = wrap . dom . input . cloneNode ( ! 0 ) , i = 0 , files = F ( wrap . dom . input ) ; i < files . length ; i ++ ) { var item = files . item ( i ) , tempFile = item . value || item . name , value = item . fileName || ( item . fileName = tempFile . split ( "\\" ) . pop ( ) ) , ext = - 1 !== value . indexOf ( "." ) ? value . split ( "." ) . pop ( ) . toLowerCase ( ) : "unknown" , size = item . fileSize || item . size ; wrap . fileType && - 1 === wrap . fileType . indexOf ( "*." + ext ) ? ( BI . Msg . toast ( BI . i18nText ( "BI-Upload_File_Type_Error" ) , { level : "error" } ) , self . fireEvent ( BI . File . EVENT _ERROR , { errorType : 0 , file : item } ) ) : wrap . maxSize !== - 1 && size && wrap . maxSize < size ? ( BI . Msg . toast ( BI . i18nText ( "BI-Upload_File_Size_Error" ) , { level : "error" } ) , self . fireEvent ( BI . File . EVENT _ERROR , { errorType : 1 , file : item } ) ) : wrap . files . unshift ( item ) } wrap . files . length > 0 && self . fireEvent ( BI . File . EVENT _CHANGE , { files : wrap . files } ) , input . value = "" , wrap . dom . input . parentNode . replaceChild ( input , wrap . dom . input ) , wrap . dom . input = input , event . add ( wrap . dom . input , "change" , arguments . call
} , _eventProxy = function ( event ) { var target = event . target , setting = data . getSetting ( event . data . treeId ) , tId = "" , node = null , nodeEventType = "" , treeEventType = "" , nodeEventCallback = null , treeEventCallback = null , tmp = null ; if ( tools . eqs ( event . type , "mousedown" ) ? treeEventType = "mousedown" : tools . eqs ( event . type , "mouseup" ) ? treeEventType = "mouseup" : tools . eqs ( event . type , "contextmenu" ) ? treeEventType = "contextmenu" : tools . eqs ( event . type , "click" ) ? tools . eqs ( target . tagName , "span" ) && null !== target . getAttribute ( "treeNode" + consts . id . SWITCH ) ? ( tId = tools . getNodeMainDom ( target ) . id , nodeEventType = "switchNode" ) : ( tmp = tools . getMDom ( setting , target , [ { tagName : "a" , attrName : "treeNode" + consts . id . A } ] ) , tmp && ( tId = tools . getNodeMainDom ( tmp ) . id , nodeEventType = "clickNode" ) ) : tools . eqs ( event . type , "dblclick" ) && ( treeEventType = "dblclick" , tmp = tools . getMDom ( setting , target , [ { tagName : "a" , attrName : "treeNode" + consts . id . A } ] ) , tmp && ( tId = tools . getNodeMainDom ( tmp ) . id , nodeEventType = "switchNode" ) ) , treeEventType . length > 0 && 0 == tId . length && ( tmp = tools . getMDom ( setting , target , [ { tagName : "a" , attrName : "treeNode" + consts . id . A } ] ) , tmp && ( tId = tools . getNodeMainDom ( tmp ) . id ) ) , tId . length > 0 ) switch ( node = data . getNodeCache ( setting , tId ) , nodeEventType ) { case "switchNode" : node . isParent && ( tools . eqs ( event . type , "click" ) || tools . eqs ( event . type , "dblclick" ) && tools . apply ( setting . view . dblClickExpand , [ setting . treeId , node ] , setting . view . dblClickExpand ) ) ? nodeEventCallback = handler . onSwitchNode : nodeEventType = "" ; break ; case "clickNode" : nodeEventCallback = handler . onClickNode } switch ( treeEventType ) { case "mousedown" : treeEventCallback = handler . onZTreeMousedown ; break ; case "mouseup" : treeEventCallback = handler . onZTreeMouseup ; break ; case "dblclick" : treeEventCallback = handler . onZTreeDblclick ; break ; case "contextmenu" : treeEventCallback = handler . onZTreeContextmenu } var proxyResult = { stop : ! 1 , node : node , nodeEventType : nodeEventType , nodeEventCallback : nodeEventCallback , treeEventType : treeEventType , treeEventCallback : treeEventCallback } ; return proxyResult } , _initNode = function ( setting , level , n , parentNode , isFirstNode , isLastNode , openFlag ) { if ( n ) { var r = data . getRoot ( setting ) , childKey = setting . data . key . children ; n . level = level , n . tId = setting . treeId + "_" + ++ r . zId , n . parentTId = parentNode ? parentNode . tId : null , n . open = "string" == typeof n . open ? tools . eqs ( n . open , "true" ) : ! ! n . open , n [ childKey ] && n [ childKey ] . length > 0 ? ( n . isParent = ! 0 , n . zAsync = ! 0 ) : ( n . isParent = "string" == typeof n . isParent ? tools . eqs ( n . isParent , "true" ) : ! ! n . isParent , n . open = ! ( ! n . isParent || setting . async . enable ) && n . open , n . zAsync = ! n . isParent ) , n . isFirstNode = isFirstNode , n . isLastNode = isLastNode , n . getParentNode = function ( ) { return data . getNodeCache ( setting , n . parentTId ) } , n . getPreNode = function ( ) { return data . getPreNode ( setting , n ) } , n . getNextNode = function ( ) { return data . getNextNode ( setting , n ) } , n . isAjaxing = ! 1 , data . fixPIdKeyValue ( setting , n ) } } , _init = { bind : [ _bindEvent ] , unbind : [ _unbindEvent ] , caches : [ _initCache ] , nodes : [ _initNode ] , proxys : [ _eventProxy ] , roots : [ _initRoot ] , beforeA : [ ] , afterA : [ ] , innerBeforeA : [ ] , innerAfterA : [ ] , zTreeTools : [ ] } , data = { addNodeCache : function ( setting , node ) { data . getCache ( setting ) . nodes [ data . getNodeCacheId ( node . tId ) ] = node } , getNodeCacheId : function ( tId ) { return tId . substring ( tId . lastIndexOf ( "_" ) + 1 ) } , addAfterA : function ( afterA ) { _init . afterA . push ( afterA ) } , addBeforeA : function ( beforeA ) { _init . beforeA . push ( beforeA ) } , addInnerAfterA : function ( innerAfterA ) { _init . innerAfterA . push ( innerAfterA ) } , addInnerBeforeA : function ( innerBeforeA ) { _init . innerBeforeA . push ( innerBeforeA ) } , addInitBind : function ( bindEvent ) { _init . bind . push ( bindEvent ) } , addInitUnBind : function ( unbindEvent ) { _init . unbind . push ( unbindEvent ) } , addInitCache : function ( initCache ) { _init . caches . push ( initCache ) } , addInitNode : function ( initNode ) { _init . nodes . push ( initNode ) } , addInitProxy : function ( initProxy , isFirst ) { isFirst ? _init . proxys . splice ( 0 , 0 , initProxy ) : _init . proxys . push ( initProxy ) } , addInitRoot : function ( initRoot ) { _init . roots . push ( initRoot ) } , addNodesData : function ( setting , parentNode , nodes ) { var childKey = setting . data . key . children ; parentNode [ childKey ] || ( parentNode [ childKey ] = [ ] ) , parentNode [ childKey ] . length > 0 && ( parentNode [ childKey ] [ parentNode [ childKey ] . length - 1 ] . isLastNode = ! 1 , view . setNodeLineIcos ( setting , parentNode [ childKey ] [ parentNo
var aObj = $$ ( treeNode , consts . id . A , setting ) , fontCss = view . makeNodeFontCss ( setting , treeNode ) ; fontCss && aObj . css ( fontCss ) } , setNodeLineIcos : function ( setting , node ) { if ( node ) { var switchObj = $$ ( node , consts . id . SWITCH , setting ) , ulObj = $$ ( node , consts . id . UL , setting ) , icoObj = $$ ( node , consts . id . ICON , setting ) , ulLine = view . makeUlLineClass ( setting , node ) ; 0 == ulLine . length ? ulObj . removeClass ( consts . line . LINE ) : ulObj . addClass ( ulLine ) , switchObj . attr ( "class" , view . makeNodeLineClass ( setting , node ) ) , node . isParent ? switchObj . removeAttr ( "disabled" ) : switchObj . attr ( "disabled" , "disabled" ) , icoObj . removeAttr ( "style" ) , icoObj . attr ( "style" , view . makeNodeIcoStyle ( setting , node ) ) , icoObj . attr ( "class" , view . makeNodeIcoClass ( setting , node ) ) } } , setNodeName : function ( setting , node ) { var title = data . getNodeTitle ( setting , node ) , nObj = $$ ( node , consts . id . SPAN , setting ) ; if ( nObj . empty ( ) , setting . view . nameIsHTML ? nObj . html ( data . getNodeName ( setting , node ) ) : nObj . text ( data . getNodeName ( setting , node ) ) , tools . apply ( setting . view . showTitle , [ setting . treeId , node ] , setting . view . showTitle ) ) { var aObj = $$ ( node , consts . id . A , setting ) ; aObj . attr ( "title" , title ? title : "" ) } } , setNodeTarget : function ( setting , node ) { var aObj = $$ ( node , consts . id . A , setting ) ; aObj . attr ( "target" , view . makeNodeTarget ( node ) ) } , setNodeUrl : function ( setting , node ) { var aObj = $$ ( node , consts . id . A , setting ) , url = view . makeNodeUrl ( setting , node ) ; null == url || 0 == url . length ? aObj . removeAttr ( "href" ) : aObj . attr ( "href" , url ) } , switchNode : function ( setting , node ) { if ( node . open || ! tools . canAsync ( setting , node ) ) view . expandCollapseNode ( setting , node , ! node . open ) ; else if ( setting . async . enable ) { if ( ! view . asyncNode ( setting , node ) ) return void view . expandCollapseNode ( setting , node , ! node . open ) } else node && view . expandCollapseNode ( setting , node , ! node . open ) } } ; $ . fn . zTree = { consts : _consts , _z : { tools : tools , view : view , event : event , data : data } , getZTreeObj : function ( treeId ) { var o = data . getZTreeTools ( treeId ) ; return o ? o : null } , destroy : function ( treeId ) { if ( treeId && treeId . length > 0 ) view . destroy ( data . getSetting ( treeId ) ) ; else for ( var s in settings ) view . destroy ( settings [ s ] ) } , init : function ( obj , zSetting , zNodes ) { var setting = tools . clone ( _setting ) ; $ . extend ( ! 0 , setting , zSetting ) , setting . treeId = obj . attr ( "id" ) , setting . treeObj = obj , setting . treeObj . empty ( ) , settings [ setting . treeId ] = setting , "undefined" == typeof document . body . style . maxHeight && ( setting . view . expandSpeed = "" ) , data . initRoot ( setting ) ; var root = data . getRoot ( setting ) , childKey = setting . data . key . children ; zNodes = zNodes ? tools . clone ( tools . isArray ( zNodes ) ? zNodes : [ zNodes ] ) : [ ] , setting . data . simpleData . enable ? root [ childKey ] = data . transformTozTreeFormat ( setting , zNodes ) : root [ childKey ] = zNodes , data . initCache ( setting ) , event . unbindTree ( setting ) , event . bindTree ( setting ) , event . unbindEvent ( setting ) , event . bindEvent ( setting ) ; var zTreeTools = { setting : setting , addNodes : function ( parentNode , newNodes , isSilent ) { function addCallback ( ) { view . addNodes ( setting , parentNode , xNewNodes , 1 == isSilent ) } if ( ! newNodes ) return null ; if ( parentNode || ( parentNode = null ) , parentNode && ! parentNode . isParent && setting . data . keep . leaf ) return null ; var xNewNodes = tools . clone ( tools . isArray ( newNodes ) ? newNodes : [ newNodes ] ) ; return tools . canAsync ( setting , parentNode ) ? view . asyncNode ( setting , parentNode , isSilent , addCallback ) : addCallback ( ) , xNewNodes } , cancelSelectedNode : function ( node ) { view . cancelPreSelectedNode ( setting , node ) } , destroy : function ( ) { view . destroy ( setting ) } , expandAll : function ( expandFlag ) { return expandFlag = ! ! expandFlag , view . expandCollapseSonNode ( setting , null , expandFlag , ! 0 ) , expandFlag } , expandNode : function ( node , expandFlag , sonSign , focus , callbackFlag ) { if ( ! node || ! node . isParent ) return null ; if ( expandFlag !== ! 0 && expandFlag !== ! 1 && ( expandFlag = ! node . open ) , callbackFlag = ! ! callbackFlag , callbackFlag && expandFlag && 0 == tools . apply ( setting . callback . beforeExpand , [ setting . treeId , node ] , ! 0 ) ) return null ; if ( callbackFlag && ! expandFlag && 0 == tools . apply ( setting . callback . beforeCollapse , [ setting . treeId , node ] , ! 0 ) ) return null ; if ( expandFlag && node . parentTId && view . expandCollapseParentNode ( setting , node . getParentNode ( ) , expandFlag , ! 1 ) , expandFlag === node . open && ! sonSign ) return null ; if ( data . getRoot ( setting ) . expandTriggerFlag = callbackFlag , ! tools . canAsync ( setting , node ) && sonSign ) view . expandCollapseSonNod
return BI . extend ( BI . SingleSelectIconTextItem . superclass . _defaultConfig . apply ( this , arguments ) , { extraCls : "bi-single-select-icon-text-item bi-list-item-active" , iconCls : "" , height : 24 } ) } , _init : function ( ) { BI . SingleSelectIconTextItem . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . text = BI . createWidget ( { type : "bi.icon_text_item" , element : this , cls : o . iconCls , once : o . once , iconWrapperWidth : o . iconWrapperWidth , selected : o . selected , height : o . height , iconHeight : o . iconHeight , iconWidth : o . iconWidth , text : o . text , keyword : o . keyword , value : o . value , py : o . py } ) , this . text . on ( BI . Controller . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) } , isSelected : function ( ) { return this . text . isSelected ( ) } , setSelected : function ( b ) { this . text . setSelected ( b ) } , doRedMark : function ( ) { this . text . doRedMark . apply ( this . text , arguments ) } , unRedMark : function ( ) { this . text . unRedMark . apply ( this . text , arguments ) } , doClick : function ( ) { BI . SingleSelectIconTextItem . superclass . doClick . apply ( this , arguments ) } } ) , BI . shortcut ( "bi.single_select_icon_text_item" , BI . SingleSelectIconTextItem ) , BI . SingleSelectItem = BI . inherit ( BI . BasicButton , { _defaultConfig : function ( ) { return BI . extend ( BI . SingleSelectItem . superclass . _defaultConfig . apply ( this , arguments ) , { extraCls : "bi-single-select-item bi-list-item-active" , hgap : 10 , height : 24 , textAlign : "left" } ) } , _init : function ( ) { BI . SingleSelectItem . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . text = BI . createWidget ( { type : "bi.label" , element : this , textAlign : o . textAlign , whiteSpace : "nowrap" , textHeight : o . height , height : o . height , hgap : o . hgap , text : o . text , keyword : o . keyword , value : o . value , title : o . title || o . text , warningTitle : o . warningTitle , py : o . py } ) } , doRedMark : function ( ) { this . text . doRedMark . apply ( this . text , arguments ) } , unRedMark : function ( ) { this . text . unRedMark . apply ( this . text , arguments ) } , doClick : function ( ) { BI . SingleSelectItem . superclass . doClick . apply ( this , arguments ) , this . isValid ( ) && this . fireEvent ( BI . SingleSelectItem . EVENT _CHANGE , this . isSelected ( ) , this ) } , setSelected : function ( v ) { BI . SingleSelectItem . superclass . setSelected . apply ( this , arguments ) } } ) , BI . SingleSelectItem . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.single_select_item" , BI . SingleSelectItem ) , BI . SingleSelectRadioItem = BI . inherit ( BI . BasicButton , { _defaultConfig : function ( ) { return BI . extend ( BI . SingleSelectRadioItem . superclass . _defaultConfig . apply ( this , arguments ) , { extraCls : "bi-single-select-radio-item" , logic : { dynamic : ! 1 } , hgap : 10 , height : 24 } ) } , _init : function ( ) { BI . SingleSelectRadioItem . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . radio = BI . createWidget ( { type : "bi.radio" , once : o . once } ) , this . text = BI . createWidget ( { type : "bi.label" , cls : "list-item-text" , textAlign : "left" , whiteSpace : "nowrap" , textHeight : o . height , height : o . height , hgap : o . hgap , text : o . text , keyword : o . keyword , value : o . value , py : o . py } ) , BI . createWidget ( BI . extend ( { element : this } , BI . LogicFactory . createLogic ( "horizontal" , BI . extend ( o . logic , { items : BI . LogicFactory . createLogicItemsByDirection ( "left" , { type : "bi.center_adapt" , items : [ this . radio ] , width : 16 } , this . text ) } ) ) ) ) } , doRedMark : function ( ) { this . text . doRedMark . apply ( this . text , arguments ) } , unRedMark : function ( ) { this . text . unRedMark . apply ( this . text , arguments ) } , doClick : function ( ) { BI . SingleSelectRadioItem . superclass . doClick . apply ( this , arguments ) , this . radio . setSelected ( this . isSelected ( ) ) , this . isValid ( ) && this . fireEvent ( BI . SingleSelectRadioItem . EVENT _CHANGE , this . isSelected ( ) , this ) } , setSelected : function ( v ) { BI . SingleSelectRadioItem . superclass . setSelected . apply ( this , arguments ) , this . radio . setSelected ( v ) } } ) , BI . SingleSelectRadioItem . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.single_select_radio_item" , BI . SingleSelectRadioItem ) , BI . ArrowNode = BI . inherit ( BI . NodeButton , { _defaultConfig : function ( ) { var conf = BI . ArrowNode . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { baseCls : ( conf . baseCls || "" ) + " bi-arrow-group-node bi-list-item" , logic : { dynamic : ! 1 } , id : "" , pId : "" , open : ! 1 , height : 24 , iconWrapperWidth : 16 } ) } , _init : function ( ) { var self = this , o = this . options ; BI . ArrowNode . superclass . _init . apply ( this , arguments ) , this . checkbox = BI . createWidget ( { type : "bi.arrow_group_node_checkbox" } ) , thi
return this . years . getValue ( ) [ 0 ] } } ) , BI . extend ( BI . YearCalendar , { INTERVAL : 12 , getStartYear : function ( year ) { var cur = BI . getDate ( ) . getFullYear ( ) ; return year - ( ( year - cur + 3 ) % BI . YearCalendar . INTERVAL + 12 ) % BI . YearCalendar . INTERVAL } , getEndYear : function ( year ) { return BI . YearCalendar . getStartYear ( year ) + BI . YearCalendar . INTERVAL - 1 } , getPageByYear : function ( year ) { var cur = BI . getDate ( ) . getFullYear ( ) ; return year = BI . YearCalendar . getStartYear ( year ) , ( year - cur + 3 ) / BI . YearCalendar . INTERVAL } } ) , BI . shortcut ( "bi.year_calendar" , BI . YearCalendar ) , BI . ArrowTreeGroupNodeCheckbox = BI . inherit ( BI . IconButton , { _defaultConfig : function ( ) { return BI . extend ( BI . ArrowTreeGroupNodeCheckbox . superclass . _defaultConfig . apply ( this , arguments ) , { extraCls : "bi-arrow-group-node-checkbox" } ) } , setSelected : function ( v ) { BI . ArrowTreeGroupNodeCheckbox . superclass . setSelected . apply ( this , arguments ) , v ? this . element . removeClass ( "expander-right-font" ) . addClass ( "expander-down-font" ) : this . element . removeClass ( "expander-down-font" ) . addClass ( "expander-right-font" ) } } ) , BI . shortcut ( "bi.arrow_group_node_checkbox" , BI . ArrowTreeGroupNodeCheckbox ) , BI . CheckingMarkNode = BI . inherit ( BI . IconButton , { _defaultConfig : function ( ) { return BI . extend ( BI . CheckingMarkNode . superclass . _defaultConfig . apply ( this , arguments ) , { extraCls : "check-mark-font" } ) } , _init : function ( ) { BI . CheckingMarkNode . superclass . _init . apply ( this , arguments ) , this . setSelected ( this . options . selected ) } , setSelected : function ( v ) { BI . CheckingMarkNode . superclass . setSelected . apply ( this , arguments ) , v === ! 0 ? this . element . addClass ( "check-mark-font" ) : this . element . removeClass ( "check-mark-font" ) } } ) , BI . shortcut ( "bi.checking_mark_node" , BI . CheckingMarkNode ) , BI . FirstTreeNodeCheckbox = BI . inherit ( BI . IconButton , { _defaultConfig : function ( ) { return BI . extend ( BI . FirstTreeNodeCheckbox . superclass . _defaultConfig . apply ( this , arguments ) , { extraCls : "tree-collapse-icon-type2" , iconWidth : 24 , iconHeight : 24 } ) } , setSelected : function ( v ) { BI . FirstTreeNodeCheckbox . superclass . setSelected . apply ( this , arguments ) , v === ! 0 ? this . element . addClass ( "tree-expand-icon-type2" ) : this . element . removeClass ( "tree-expand-icon-type2" ) } } ) , BI . shortcut ( "bi.first_tree_node_checkbox" , BI . FirstTreeNodeCheckbox ) , BI . LastTreeNodeCheckbox = BI . inherit ( BI . IconButton , { _defaultConfig : function ( ) { return BI . extend ( BI . LastTreeNodeCheckbox . superclass . _defaultConfig . apply ( this , arguments ) , { extraCls : "tree-collapse-icon-type4" , iconWidth : 24 , iconHeight : 24 } ) } , setSelected : function ( v ) { BI . LastTreeNodeCheckbox . superclass . setSelected . apply ( this , arguments ) , v === ! 0 ? this . element . addClass ( "tree-expand-icon-type4" ) : this . element . removeClass ( "tree-expand-icon-type4" ) } } ) , BI . shortcut ( "bi.last_tree_node_checkbox" , BI . LastTreeNodeCheckbox ) , BI . MidTreeNodeCheckbox = BI . inherit ( BI . IconButton , { _defaultConfig : function ( ) { return BI . extend ( BI . MidTreeNodeCheckbox . superclass . _defaultConfig . apply ( this , arguments ) , { extraCls : "tree-collapse-icon-type3" , iconWidth : 24 , iconHeight : 24 } ) } , setSelected : function ( v ) { BI . MidTreeNodeCheckbox . superclass . setSelected . apply ( this , arguments ) , v === ! 0 ? this . element . addClass ( "tree-expand-icon-type3" ) : this . element . removeClass ( "tree-expand-icon-type3" ) } } ) , BI . shortcut ( "bi.mid_tree_node_checkbox" , BI . MidTreeNodeCheckbox ) , BI . TreeNodeCheckbox = BI . inherit ( BI . IconButton , { _defaultConfig : function ( ) { return BI . extend ( BI . TreeNodeCheckbox . superclass . _defaultConfig . apply ( this , arguments ) , { extraCls : "tree-collapse-icon-type1" , iconWidth : 24 , iconHeight : 24 } ) } , setSelected : function ( v ) { BI . TreeNodeCheckbox . superclass . setSelected . apply ( this , arguments ) , v ? this . element . addClass ( "tree-expand-icon-type1" ) : this . element . removeClass ( "tree-expand-icon-type1" ) } } ) , BI . shortcut ( "bi.tree_node_checkbox" , BI . TreeNodeCheckbox ) , BI . CustomColorChooser = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . CustomColorChooser . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-custom-color-chooser" , width : 227 , height : 245 } ) } , _init : function ( ) { BI . CustomColorChooser . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . editor = BI . createWidget ( o . editor , { type : "bi.simple_color_picker_editor" } ) , this . editor . on ( BI . ColorPickerEditor . EVENT _CHANGE , function ( ) { self . setValue ( this . getValue ( ) ) } ) , this . farbta
self . fireEvent ( BI . BubbleCombo . EVENT _AFTER _INIT , arguments ) } ) , this . combo . on ( BI . Combo . EVENT _BEFORE _POPUPVIEW , function ( ) { self . fireEvent ( BI . BubbleCombo . EVENT _BEFORE _POPUPVIEW , arguments ) } ) , this . combo . on ( BI . Combo . EVENT _AFTER _POPUPVIEW , function ( ) { self . _showTriangle ( ) , self . fireEvent ( BI . BubbleCombo . EVENT _AFTER _POPUPVIEW , arguments ) } ) , this . combo . on ( BI . Combo . EVENT _BEFORE _HIDEVIEW , function ( ) { self . _hideTriangle ( ) , self . fireEvent ( BI . BubbleCombo . EVENT _BEFORE _HIDEVIEW , arguments ) } ) , this . combo . on ( BI . Combo . EVENT _AFTER _HIDEVIEW , function ( ) { self . fireEvent ( BI . BubbleCombo . EVENT _AFTER _HIDEVIEW , arguments ) } ) } , _getAdjustLength : function ( ) { return this . _const . TRIANGLE _LENGTH + this . options . adjustLength } , _createTriangle : function ( direction ) { var pos = { } , op = { } , adjustLength = this . options . adjustLength , offset = this . element . offset ( ) , left = offset . left , right = offset . left + this . element . outerWidth ( ) , top = offset . top , bottom = offset . top + this . element . outerHeight ( ) ; switch ( direction ) { case "left" : pos = { top : top , height : this . element . outerHeight ( ) , left : left - adjustLength - this . _const . TRIANGLE _LENGTH } , op = { width : this . _const . TRIANGLE _LENGTH } ; break ; case "right" : pos = { top : top , height : this . element . outerHeight ( ) , left : right + adjustLength } , op = { width : this . _const . TRIANGLE _LENGTH } ; break ; case "top" : pos = { left : left , width : this . element . outerWidth ( ) , top : top - adjustLength - this . _const . TRIANGLE _LENGTH } , op = { height : this . _const . TRIANGLE _LENGTH } ; break ; case "bottom" : pos = { left : left , width : this . element . outerWidth ( ) , top : bottom + adjustLength } , op = { height : this . _const . TRIANGLE _LENGTH } } this . triangle && this . triangle . destroy ( ) , this . triangle = BI . createWidget ( op , { type : "bi.center_adapt" , cls : "button-combo-triangle-wrapper" , items : [ { type : "bi.layout" , cls : "bubble-combo-triangle-" + direction } ] } ) , pos . el = this . triangle , BI . createWidget ( { type : "bi.absolute" , element : this , items : [ pos ] } ) } , _createLeftTriangle : function ( ) { this . _createTriangle ( "left" ) } , _createRightTriangle : function ( ) { this . _createTriangle ( "right" ) } , _createTopTriangle : function ( ) { this . _createTriangle ( "top" ) } , _createBottomTriangle : function ( ) { this . _createTriangle ( "bottom" ) } , _showTriangle : function ( ) { var pos = this . combo . getPopupPosition ( ) ; switch ( pos . dir ) { case "left,top" : case "left,bottom" : this . _createLeftTriangle ( ) ; break ; case "right,top" : case "right,bottom" : this . _createRightTriangle ( ) ; break ; case "top,left" : case "top,right" : this . _createTopTriangle ( ) ; break ; case "bottom,left" : case "bottom,right" : this . _createBottomTriangle ( ) } } , _hideTriangle : function ( ) { this . triangle && this . triangle . destroy ( ) , this . triangle = null } , hideView : function ( ) { this . _hideTriangle ( ) , this . combo && this . combo . hideView ( ) } , showView : function ( ) { this . combo && this . combo . showView ( ) } , isViewVisible : function ( ) { return this . combo . isViewVisible ( ) } } ) , BI . BubbleCombo . EVENT _TRIGGER _CHANGE = "EVENT_TRIGGER_CHANGE" , BI . BubbleCombo . EVENT _CHANGE = "EVENT_CHANGE" , BI . BubbleCombo . EVENT _EXPAND = "EVENT_EXPAND" , BI . BubbleCombo . EVENT _COLLAPSE = "EVENT_COLLAPSE" , BI . BubbleCombo . EVENT _AFTER _INIT = "EVENT_AFTER_INIT" , BI . BubbleCombo . EVENT _BEFORE _POPUPVIEW = "EVENT_BEFORE_POPUPVIEW" , BI . BubbleCombo . EVENT _AFTER _POPUPVIEW = "EVENT_AFTER_POPUPVIEW" , BI . BubbleCombo . EVENT _BEFORE _HIDEVIEW = "EVENT_BEFORE_HIDEVIEW" , BI . BubbleCombo . EVENT _AFTER _HIDEVIEW = "EVENT_AFTER_HIDEVIEW" , BI . shortcut ( "bi.bubble_combo" , BI . BubbleCombo ) , BI . BubblePopupView = BI . inherit ( BI . PopupView , { _defaultConfig : function ( ) { var config = BI . BubblePopupView . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( config , { baseCls : config . baseCls + " bi-bubble-popup-view" , minWidth : 220 , maxWidth : 300 , minHeight : 90 } ) } , _init : function ( ) { BI . BubblePopupView . superclass . _init . apply ( this , arguments ) } } ) , BI . shortcut ( "bi.bubble_popup_view" , BI . BubblePopupView ) , BI . BubblePopupBarView = BI . inherit ( BI . BubblePopupView , { _defaultConfig : function ( ) { return BI . extend ( BI . BubblePopupBarView . superclass . _defaultConfig . apply ( this , arguments ) , { extraCls : "bi-bubble-bar-popup-view" , buttons : [ { value : ! 1 , text : BI . i18nText ( "BI-Basic_Cancel" ) , ghost : ! 0 } , { text : BI . i18nText ( BI . i18nText ( "BI-Basic_Sure" ) ) , value : ! 0 } ] } ) } , _init : function ( ) { BI . BubblePopupBarView . superclass . _init . apply ( this , arguments ) } , _createToolBar : function ( ) { var o = this . options , self = this , items = [ ] ; return BI . each ( o . buttons , function ( i , butt
self . fireEvent ( BI . ClearEditor . EVENT _ENTER ) } ) , this . editor . on ( BI . Editor . EVENT _RESTRICT , function ( ) { self . fireEvent ( BI . ClearEditor . EVENT _RESTRICT ) } ) , this . editor . on ( BI . Editor . EVENT _EMPTY , function ( ) { self . _checkClear ( ) , self . fireEvent ( BI . ClearEditor . EVENT _EMPTY ) } ) , this . editor . on ( BI . Editor . EVENT _REMOVE , function ( ) { self . fireEvent ( BI . ClearEditor . EVENT _REMOVE ) } ) , this . editor . on ( BI . Editor . EVENT _CONFIRM , function ( ) { self . fireEvent ( BI . ClearEditor . EVENT _CONFIRM ) } ) , this . editor . on ( BI . Editor . EVENT _CHANGE _CONFIRM , function ( ) { self . fireEvent ( BI . ClearEditor . EVENT _CHANGE _CONFIRM ) } ) , this . editor . on ( BI . Editor . EVENT _START , function ( ) { self . fireEvent ( BI . ClearEditor . EVENT _START ) } ) , this . editor . on ( BI . Editor . EVENT _PAUSE , function ( ) { self . fireEvent ( BI . ClearEditor . EVENT _PAUSE ) } ) , this . editor . on ( BI . Editor . EVENT _STOP , function ( ) { self . fireEvent ( BI . ClearEditor . EVENT _STOP ) } ) , BI . isKey ( o . value ) ? this . clear . visible ( ) : this . clear . invisible ( ) } , _checkClear : function ( ) { this . getValue ( ) ? this . clear . visible ( ) : this . clear . invisible ( ) } , setWaterMark : function ( v ) { this . options . watermark = v , this . editor . setWaterMark ( v ) } , focus : function ( ) { this . editor . focus ( ) } , blur : function ( ) { this . editor . blur ( ) } , getValue : function ( ) { if ( this . isValid ( ) ) { var res = this . editor . getValue ( ) . match ( /[\S]+/g ) ; return BI . isNull ( res ) ? "" : res [ res . length - 1 ] } } , setValue : function ( v ) { this . editor . setValue ( v ) , BI . isKey ( v ) && this . clear . visible ( ) } , isValid : function ( ) { return this . editor . isValid ( ) } } ) , BI . ClearEditor . EVENT _CHANGE = "EVENT_CHANGE" , BI . ClearEditor . EVENT _FOCUS = "EVENT_FOCUS" , BI . ClearEditor . EVENT _BLUR = "EVENT_BLUR" , BI . ClearEditor . EVENT _CLICK = "EVENT_CLICK" , BI . ClearEditor . EVENT _KEY _DOWN = "EVENT_KEY_DOWN" , BI . ClearEditor . EVENT _SPACE = "EVENT_SPACE" , BI . ClearEditor . EVENT _BACKSPACE = "EVENT_BACKSPACE" , BI . ClearEditor . EVENT _CLEAR = "EVENT_CLEAR" , BI . ClearEditor . EVENT _START = "EVENT_START" , BI . ClearEditor . EVENT _PAUSE = "EVENT_PAUSE" , BI . ClearEditor . EVENT _STOP = "EVENT_STOP" , BI . ClearEditor . EVENT _CONFIRM = "EVENT_CONFIRM" , BI . ClearEditor . EVENT _CHANGE _CONFIRM = "EVENT_CHANGE_CONFIRM" , BI . ClearEditor . EVENT _VALID = "EVENT_VALID" , BI . ClearEditor . EVENT _ERROR = "EVENT_ERROR" , BI . ClearEditor . EVENT _ENTER = "EVENT_ENTER" , BI . ClearEditor . EVENT _RESTRICT = "EVENT_RESTRICT" , BI . ClearEditor . EVENT _REMOVE = "EVENT_REMOVE" , BI . ClearEditor . EVENT _EMPTY = "EVENT_EMPTY" , BI . shortcut ( "bi.clear_editor" , BI . ClearEditor ) , BI . ShelterEditor = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { var conf = BI . ShelterEditor . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { baseCls : ( conf . baseCls || "" ) + " bi-shelter-editor" , hgap : 4 , vgap : 2 , lgap : 0 , rgap : 0 , tgap : 0 , bgap : 0 , validationChecker : BI . emptyFn , quitChecker : BI . emptyFn , allowBlank : ! 0 , watermark : "" , errorText : "" , height : 24 , textAlign : "left" } ) } , _init : function ( ) { BI . ShelterEditor . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . editor = BI . createWidget ( { type : "bi.editor" , height : o . height , hgap : o . hgap , vgap : o . vgap , lgap : o . lgap , rgap : o . rgap , tgap : o . tgap , bgap : o . bgap , value : o . value , validationChecker : o . validationChecker , quitChecker : o . quitChecker , allowBlank : o . allowBlank , watermark : o . watermark , errorText : o . errorText } ) , this . text = BI . createWidget ( { type : "bi.text_button" , cls : "shelter-editor-text" , title : o . title , warningTitle : o . warningTitle , tipType : o . tipType , textAlign : o . textAlign , height : o . height , hgap : o . hgap } ) , BI . createWidget ( { type : "bi.absolute" , element : this , items : [ { el : this . text , left : 0 , right : 0 , top : 0 , bottom : 0 } ] } ) , this . text . on ( BI . Controller . EVENT _CHANGE , function ( ) { arguments [ 2 ] = self , self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) , this . text . on ( BI . TextButton . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . ShelterEditor . EVENT _CLICK _LABEL ) } ) , this . editor . on ( BI . Controller . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _FOCUS , function ( ) { self . fireEvent ( BI . ShelterEditor . EVENT _FOCUS , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _BLUR , function ( ) { self . fireEvent ( BI . ShelterEditor . EVENT _BLUR , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _CLICK , function ( ) { self . fireEvent ( BI . ShelterEditor . EVENT _CLICK , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . ShelterEditor . EVENT _CHANGE , arguments ) } ) , this . editor . on ( BI . Editor .
} , getAllButtons : function ( ) { return this . button _group . getAllButtons ( ) } , getAllLeaves : function ( ) { return this . button _group . getAllLeaves ( ) } , getSelectedButtons : function ( ) { return this . button _group . getSelectedButtons ( ) } , getNotSelectedButtons : function ( ) { return this . button _group . getNotSelectedButtons ( ) } , getIndexByValue : function ( value ) { return this . button _group . getIndexByValue ( value ) } , getNodeById : function ( id ) { return this . button _group . getNodeById ( id ) } , getNodeByValue : function ( value ) { return this . button _group . getNodeByValue ( value ) } } ) , BI . ListPane . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.list_pane" , BI . ListPane ) , BI . Panel = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . Panel . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-panel bi-border" , title : "" , titleButtons : [ ] , el : { } , logic : { dynamic : ! 1 } } ) } , _init : function ( ) { BI . Panel . superclass . _init . apply ( this , arguments ) ; var o = this . options ; BI . createWidget ( BI . extend ( { element : this } , BI . LogicFactory . createLogic ( "vertical" , BI . extend ( o . logic , { items : BI . LogicFactory . createLogicItemsByDirection ( "top" , this . _createTitle ( ) , this . options . el ) } ) ) ) ) } , _createTitle : function ( ) { var self = this , o = this . options ; return this . text = BI . createWidget ( { type : "bi.label" , cls : "panel-title-text" , text : o . title , height : 30 } ) , this . button _group = BI . createWidget ( { type : "bi.button_group" , items : o . titleButtons , layouts : [ { type : "bi.center_adapt" , lgap : 10 } ] } ) , this . button _group . on ( BI . Controller . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) , this . button _group . on ( BI . ButtonGroup . EVENT _CHANGE , function ( value , obj ) { self . fireEvent ( BI . Panel . EVENT _CHANGE , value , obj ) } ) , { el : { type : "bi.left_right_vertical_adapt" , cls : "panel-title bi-header-background bi-border-bottom" , height : 29 , items : { left : [ this . text ] , right : [ this . button _group ] } , lhgap : 10 , rhgap : 10 } , height : 29 } } , setTitle : function ( title ) { this . text . setValue ( title ) } } ) , BI . Panel . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.panel" , BI . Panel ) , BI . LinearSegmentButton = BI . inherit ( BI . BasicButton , { props : { extraCls : "bi-line-segment-button bi-list-item-effect" , once : ! 0 , readonly : ! 0 , hgap : 10 , height : 25 } , render : function ( ) { var self = this , o = this . options ; return [ { type : "bi.label" , text : o . text , height : o . height , value : o . value , hgap : o . hgap , ref : function ( ) { self . text = this } } , { type : "bi.absolute" , items : [ { el : { type : "bi.layout" , cls : "line-segment-button-line" , height : 2 , ref : function ( ) { self . line = this } } , left : 0 , right : 0 , bottom : 0 } ] } ] } , setSelected : function ( v ) { BI . LinearSegmentButton . superclass . setSelected . apply ( this , arguments ) , v ? this . line . element . addClass ( "bi-high-light-background" ) : this . line . element . removeClass ( "bi-high-light-background" ) } , setText : function ( text ) { this . text . setText ( text ) } } ) , BI . shortcut ( "bi.linear_segment_button" , BI . LinearSegmentButton ) , BI . LinearSegment = BI . inherit ( BI . Widget , { props : { baseCls : "bi-linear-segment bi-split-bottom" , items : [ ] , height : 29 } , render : function ( ) { var self = this , o = this . options ; return { type : "bi.button_group" , items : BI . createItems ( o . items , { type : "bi.linear_segment_button" , height : o . height - 1 } ) , layout : [ { type : "bi.center" } ] , listeners : [ { eventName : "__EVENT_CHANGE__" , action : function ( ) { self . fireEvent ( "__EVENT_CHANGE__" , arguments ) } } , { eventName : "EVENT_CHANGE" , action : function ( ) { self . fireEvent ( "EVENT_CHANGE" ) } } ] , ref : function ( ) { self . buttonGroup = this } } } , setValue : function ( v ) { this . buttonGroup . setValue ( v ) } , setEnabledValue : function ( v ) { this . buttonGroup . setEnabledValue ( v ) } , getValue : function ( ) { return this . buttonGroup . getValue ( ) } } ) , BI . shortcut ( "bi.linear_segment" , BI . LinearSegment ) , BI . SelectList = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . SelectList . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-select-list" , direction : BI . Direction . Top , logic : { dynamic : ! 0 } , items : [ ] , itemsCreator : BI . emptyFn , hasNext : BI . emptyFn , onLoaded : BI . emptyFn , toolbar : { type : "bi.multi_select_bar" , iconWrapperWidth : 36 } , el : { type : "bi.list_pane" } } ) } , _init : function ( ) { BI . SelectList . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . toolbar = BI . createWidget ( o . toolbar ) , this . allSelected = ! 1 , this . toolbar . on ( BI . Controller . EVENT _CHANGE , function ( type , value , obj ) { self . allSelected = this . isSelected ( ) , type === BI . Events . CLI
isHalfCheckedBySelectedValue : function ( selectedValues ) { return selectedValues . length > 0 } , halfSelected : ! 1 , iconWrapperWidth : 26 } ) } , _init : function ( ) { BI . MultiSelectBar . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options , isSelect = o . selected === ! 0 , isHalfSelect = ! o . selected && o . halfSelected ; this . checkbox = BI . createWidget ( { type : "bi.checkbox" , stopPropagation : ! 0 , handler : function ( ) { self . setSelected ( self . isSelected ( ) ) } , selected : isSelect , invisible : isHalfSelect } ) , this . half = BI . createWidget ( { type : "bi.half_icon_button" , stopPropagation : ! 0 , handler : function ( ) { self . setSelected ( ! 0 ) } , invisible : isSelect || ! isHalfSelect } ) , this . checkbox . on ( BI . Controller . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . Controller . EVENT _CHANGE , BI . Events . CLICK , self . isSelected ( ) , self ) } ) , this . checkbox . on ( BI . Checkbox . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . MultiSelectBar . EVENT _CHANGE , self . isSelected ( ) , self ) } ) , this . half . on ( BI . Controller . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . Controller . EVENT _CHANGE , BI . Events . CLICK , self . isSelected ( ) , self ) } ) , this . half . on ( BI . HalfIconButton . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . MultiSelectBar . EVENT _CHANGE , self . isSelected ( ) , self ) } ) , this . text = BI . createWidget ( { type : "bi.label" , textAlign : "left" , whiteSpace : "nowrap" , textHeight : o . height , height : o . height , hgap : o . hgap , text : o . text , keyword : o . keyword , value : o . value , py : o . py } ) , BI . createWidget ( { type : "bi.htape" , element : this , items : [ { width : o . iconWrapperWidth , el : { type : "bi.center_adapt" , items : [ this . checkbox , this . half ] } } , { el : this . text } ] } ) } , _setSelected : function ( v ) { this . checkbox . setSelected ( ! ! v ) } , beforeClick : function ( ) { var isHalf = this . isHalfSelected ( ) , isSelected = this . isSelected ( ) ; isHalf === ! 0 ? this . setSelected ( ! 0 ) : this . setSelected ( ! isSelected ) } , setSelected : function ( v ) { this . checkbox . setSelected ( v ) , this . setHalfSelected ( ! 1 ) } , setHalfSelected : function ( b ) { this . halfSelected = ! ! b , b === ! 0 ? ( this . checkbox . setSelected ( ! 1 ) , this . half . visible ( ) , this . checkbox . invisible ( ) ) : ( this . half . invisible ( ) , this . checkbox . visible ( ) ) } , isHalfSelected : function ( ) { return ! this . isSelected ( ) && ! ! this . halfSelected } , isSelected : function ( ) { return this . checkbox . isSelected ( ) } , setValue : function ( selectedValues ) { BI . MultiSelectBar . superclass . setValue . apply ( this , arguments ) ; var isAllChecked = this . options . isAllCheckedBySelectedValue . apply ( this , arguments ) ; this . _setSelected ( isAllChecked ) , ! isAllChecked && this . setHalfSelected ( this . options . isHalfCheckedBySelectedValue . apply ( this , arguments ) ) } , doClick : function ( ) { BI . MultiSelectBar . superclass . doClick . apply ( this , arguments ) , this . isValid ( ) && this . fireEvent ( BI . MultiSelectBar . EVENT _CHANGE , this . isSelected ( ) , this ) } } ) , BI . MultiSelectBar . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.multi_select_bar" , BI . MultiSelectBar ) , BI . LevelTree = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . LevelTree . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-level-tree" , el : { chooseType : 0 } , expander : { } , items : [ ] , value : "" } ) } , _init : function ( ) { BI . LevelTree . superclass . _init . apply ( this , arguments ) , this . initTree ( this . options . items ) } , _formatItems : function ( nodes , layer , pNode ) { var self = this ; return BI . each ( nodes , function ( i , node ) { var extend = { layer : layer } ; BI . isKey ( node . id ) || ( node . id = BI . UUID ( ) ) , extend . pNode = pNode , node . isParent === ! 0 || node . parent === ! 0 || BI . isNotEmptyArray ( node . children ) ? ( extend . type = "bi.mid_plus_group_node" , i === nodes . length - 1 && ( extend . type = "bi.last_plus_group_node" , extend . isLastNode = ! 0 ) , 0 !== i || pNode || ( extend . type = "bi.first_plus_group_node" ) , 0 === i && i === nodes . length - 1 && ( extend . type = "bi.plus_group_node" ) , BI . defaults ( node , extend ) , self . _formatItems ( node . children , layer + 1 , node ) ) : ( extend . type = "bi.mid_tree_leaf_item" , 0 !== i || pNode || ( extend . type = "bi.first_tree_leaf_item" ) , i === nodes . length - 1 && ( extend . type = "bi.last_tree_leaf_item" ) , BI . defaults ( node , extend ) ) } ) , nodes } , _assertId : function ( sNodes ) { BI . each ( sNodes , function ( i , node ) { BI . isKey ( node . id ) || ( node . id = BI . UUID ( ) ) } ) } , initTree : function ( nodes ) { var self = this , o = this . options ; this . empty ( ) , this . _assertId ( nodes ) , this . tree = BI . createWidget ( { type : "bi.custom_tree" , element : this , expander : BI . extend ( { el : { } , popup : { type : "bi.custom_tree" } } , o . expander ) , items : this . _formatItems ( BI . Tree . transformToTreeFormat ( nodes ) , 0
cls : "pre-page-h-font" , width : 24 , height : 24 , value : - 1 } ) , this . preBtn = BI . createWidget ( { type : "bi.icon_button" , cls : "next-page-h-font" , width : 24 , height : 24 , value : 1 } ) , this . navigation = BI . createWidget ( { type : "bi.navigation" , element : this , single : ! 0 , logic : { dynamic : ! 0 } , tab : { cls : "year-popup-navigation bi-high-light bi-split-top" , height : 24 , items : [ this . backBtn , this . preBtn ] } , cardCreator : BI . bind ( this . _createYearCalendar , this ) , afterCardShow : function ( ) { this . setValue ( self . selectedYear ) ; var calendar = this . getSelectedCard ( ) ; calendar && self . backBtn . setEnable ( ! calendar . isFrontYear ( ) ) , calendar && self . preBtn . setEnable ( ! calendar . isFinalYear ( ) ) } } ) , this . navigation . on ( BI . Navigation . EVENT _CHANGE , function ( ) { self . selectedYear = this . getValue ( ) , self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) , self . fireEvent ( BI . YearPopup . EVENT _CHANGE , self . selectedYear ) } ) , BI . isKey ( o . value ) && this . setValue ( o . value ) } , _checkMin : function ( ) { var calendar = this . navigation . getSelectedCard ( ) ; BI . isNotNull ( calendar ) && ( calendar . setMinDate ( this . options . min ) , this . backBtn . setEnable ( ! calendar . isFrontYear ( ) ) , this . preBtn . setEnable ( ! calendar . isFinalYear ( ) ) ) } , _checkMax : function ( ) { var calendar = this . navigation . getSelectedCard ( ) ; BI . isNotNull ( calendar ) && ( calendar . setMaxDate ( this . options . max ) , this . backBtn . setEnable ( ! calendar . isFrontYear ( ) ) , this . preBtn . setEnable ( ! calendar . isFinalYear ( ) ) ) } , setMinDate : function ( minDate ) { BI . isNotEmptyString ( this . options . min ) && ( this . options . min = minDate , this . _checkMin ( ) ) } , setMaxDate : function ( maxDate ) { BI . isNotEmptyString ( this . options . max ) && ( this . options . max = maxDate , this . _checkMax ( ) ) } , getValue : function ( ) { return this . selectedYear } , setValue : function ( v ) { var o = this . options ; v = BI . parseInt ( v ) ; var startDate = BI . parseDateTime ( o . min , "%Y-%X-%d" ) , endDate = BI . parseDateTime ( o . max , "%Y-%X-%d" ) ; BI . checkDateVoid ( v , 1 , 1 , BI . print ( BI . getDate ( startDate . getFullYear ( ) , 0 , 1 ) , "%Y-%X-%d" ) , BI . print ( BI . getDate ( endDate . getFullYear ( ) , 0 , 1 ) , "%Y-%X-%d" ) ) [ 0 ] ? ( v = BI . getDate ( ) . getFullYear ( ) , this . selectedYear = "" , this . navigation . setSelect ( BI . YearCalendar . getPageByYear ( v ) ) , this . navigation . setValue ( "" ) ) : ( this . selectedYear = v , this . navigation . setSelect ( BI . YearCalendar . getPageByYear ( v ) ) , this . navigation . setValue ( v ) ) } } ) , BI . YearPopup . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.year_popup" , BI . YearPopup ) , BI . DateTriangleTrigger = BI . inherit ( BI . Trigger , { _const : { height : 24 , iconWidth : 12 , iconHeight : 12 } , _defaultConfig : function ( ) { return BI . extend ( BI . DateTriangleTrigger . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-date-triangle-trigger pull-down-ha-font cursor-pointer" , height : 24 } ) } , _init : function ( ) { BI . DateTriangleTrigger . superclass . _init . apply ( this , arguments ) ; var o = this . options , c = this . _const ; this . text = BI . createWidget ( { type : "bi.label" , cls : "list-item-text" , textAlign : "right" , text : o . text , value : o . value , height : c . height } ) , BI . createWidget ( { type : "bi.vertical_adapt" , element : this , items : [ { el : this . text , rgap : 5 } , { type : "bi.icon_label" , width : 16 } ] } ) } , setValue : function ( v ) { this . text . setValue ( v ) } , getValue : function ( ) { return this . text . getValue ( ) } , setText : function ( v ) { this . text . setText ( v ) } , getText : function ( ) { return this . item . getText ( ) } , getKey : function ( ) { } } ) , BI . shortcut ( "bi.date_triangle_trigger" , BI . DateTriangleTrigger ) , BI . StaticDatePaneCard = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { var conf = BI . StaticDatePaneCard . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { baseCls : "bi-date-pane" , min : "1900-01-01" , max : "2099-12-31" , selectedTime : null } ) } , _init : function ( ) { BI . StaticDatePaneCard . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . today = BI . getDate ( ) , this . _year = this . today . getFullYear ( ) , this . _month = this . today . getMonth ( ) + 1 , this . selectedTime = o . selectedTime || { year : this . _year , month : this . _month } , this . datePicker = BI . createWidget ( { type : "bi.date_picker" , behaviors : o . behaviors , min : o . min , max : o . max } ) , this . datePicker . on ( BI . DatePicker . EVENT _CHANGE , function ( ) { var value = self . datePicker . getValue ( ) , monthDay = BI . getMonthDays ( BI . getDate ( value . year , value . month - 1 , 1 ) ) , day = self . selectedTime . day || 0 ; day > monthDay && ( day = monthDay ) , self . selectedTime = { year : value . year , month : value . month } , 0 !== day && ( self . selectedTime . day = day ) , self . calendar . setSelect (
result . push ( valueItem ) } ) , result } } ) , BI . DownListPopup . EVENT _CHANGE = "EVENT_CHANGE" , BI . DownListPopup . EVENT _SON _VALUE _CHANGE = "EVENT_SON_VALUE_CHANGE" , BI . shortcut ( "bi.down_list_popup" , BI . DownListPopup ) , ! function ( ) { BI . DynamicDateHelper = { } , BI . extend ( BI . DynamicDateHelper , { getCalculation : function ( obj ) { var date = BI . getDate ( ) ; return this . getCalculationByDate ( date , obj ) } , getCalculationByDate : function ( date , obj ) { if ( BI . isNotNull ( obj . year ) && ( date = BI . getDate ( date . getFullYear ( ) + BI . parseInt ( obj . year ) , date . getMonth ( ) , date . getDate ( ) ) ) , BI . isNotNull ( obj . quarter ) && ( date = BI . getOffsetQuarter ( date , BI . parseInt ( obj . quarter ) ) ) , BI . isNotNull ( obj . month ) && ( date = BI . getOffsetMonth ( date , BI . parseInt ( obj . month ) ) ) , BI . isNotNull ( obj . week ) && ( date = BI . getOffsetDate ( date , 7 * BI . parseInt ( obj . week ) ) ) , BI . isNotNull ( obj . day ) && ( date = BI . getOffsetDate ( date , BI . parseInt ( obj . day ) ) ) , BI . isNotNull ( obj . workDay ) ) if ( BI . isNotNull ( BI . holidays ) ) for ( var count = Math . abs ( obj . workDay ) , i = 0 ; i < count ; i ++ ) date = BI . getOffsetDate ( date , obj . workDay < 0 ? - 1 : 1 ) , BI . isNotNull ( BI . holidays [ BI . print ( date , "%Y-%X-%d" ) ] ) && i -- ; else date = BI . getOffsetDate ( date , BI . parseInt ( obj . workDay ) ) ; return BI . isNotNull ( obj . position ) && obj . position !== BI . DynamicDateCard . OFFSET . CURRENT && ( date = this . getBeginDate ( date , obj ) ) , BI . getDate ( date . getFullYear ( ) , date . getMonth ( ) , date . getDate ( ) ) } , getBeginDate : function ( date , obj ) { return BI . isNotNull ( obj . day ) ? obj . position === BI . DynamicDateCard . OFFSET . BEGIN ? BI . getDate ( date . getFullYear ( ) , date . getMonth ( ) , 1 ) : BI . getDate ( date . getFullYear ( ) , date . getMonth ( ) , BI . getLastDateOfMonth ( date ) . getDate ( ) ) : BI . isNotNull ( obj . week ) ? obj . position === BI . DynamicDateCard . OFFSET . BEGIN ? BI . getWeekStartDate ( date ) : BI . getWeekEndDate ( date ) : BI . isNotNull ( obj . month ) ? obj . position === BI . DynamicDateCard . OFFSET . BEGIN ? BI . getDate ( date . getFullYear ( ) , date . getMonth ( ) , 1 ) : BI . getDate ( date . getFullYear ( ) , date . getMonth ( ) , BI . getLastDateOfMonth ( date ) . getDate ( ) ) : BI . isNotNull ( obj . quarter ) ? obj . position === BI . DynamicDateCard . OFFSET . BEGIN ? BI . getQuarterStartDate ( date ) : BI . getQuarterEndDate ( date ) : BI . isNotNull ( obj . year ) ? obj . position === BI . DynamicDateCard . OFFSET . BEGIN ? BI . getDate ( date . getFullYear ( ) , 0 , 1 ) : BI . getDate ( date . getFullYear ( ) , 11 , 31 ) : date } } ) } ( ) , BI . DynamicDateCard = BI . inherit ( BI . Widget , { props : { baseCls : "bi-dynamic-date-card" } , render : function ( ) { var self = this ; return this . position = BI . DynamicDateCard . OFFSET . CURRENT , { type : "bi.vertical" , items : [ { el : { type : "bi.label" , text : BI . i18nText ( "BI-Multi_Date_Relative_Current_Time" ) , textAlign : "left" , height : 12 , lgap : 10 } , tgap : 10 , bgap : 5 } , { type : "bi.button_group" , ref : function ( ) { self . checkgroup = this } , chooseType : BI . ButtonGroup . CHOOSE _TYPE _MULTI , lgap : 4 , value : [ BI . DynamicDateCard . TYPE . YEAR ] , items : BI . createItems ( [ { text : BI . i18nText ( "BI-Basic_Year" ) , value : BI . DynamicDateCard . TYPE . YEAR } , { text : BI . i18nText ( "BI-Basic_Single_Quarter" ) , value : BI . DynamicDateCard . TYPE . QUARTER } , { text : BI . i18nText ( "BI-Basic_Month" ) , value : BI . DynamicDateCard . TYPE . MONTH } , { text : BI . i18nText ( "BI-Basic_Week" ) , value : BI . DynamicDateCard . TYPE . WEEK } , { text : BI . i18nText ( "BI-Basic_Day" ) , value : BI . DynamicDateCard . TYPE . DAY } ] , { type : "bi.multi_select_item" , logic : { dynamic : ! 0 } } ) , layouts : [ { type : "bi.left" , rgap : 4 } ] , listeners : [ { eventName : BI . ButtonGroup . EVENT _CHANGE , action : function ( ) { var value = self . checkgroup . getValue ( ) ; 0 !== value . length && self . workDayBox . setSelected ( ! 1 ) ; var plainValue = { } ; BI . each ( self . resultPane . getAllButtons ( ) , function ( idx , button ) { var value = button . getValue ( ) ; BI . isNotNull ( value . dateType ) && ( plainValue [ value . dateType ] = { value : value . value , offset : value . offset } ) } ) , self . resultPane . populate ( self . _getParamJson ( BI . map ( self . checkgroup . getValue ( ) , function ( idx , v ) { var obj = { dateType : v } ; return BI . has ( plainValue , v ) && ( obj . value = plainValue [ v ] . value , obj . offset = plainValue [ v ] . offset ) , obj } ) ) ) , self . position = BI . DynamicDateCard . OFFSET . CURRENT , self . fireEvent ( "EVENT_CHANGE" ) } } ] } , { type : "bi.vertical_adapt" , lgap : 2 , items : [ { el : { type : "bi.multi_select_item" , ref : function ( ) { self . workDayBox = this } , logic : { dynamic : ! 0 } , text : BI . i18nText ( "BI-Basic_Work_Day" ) , value : BI . DynamicDateCard . TYPE . WORK _DAY , listeners : [ { eventName : BI . MultiSelectItem . EVENT _CHANGE , action : function ( ) { this . isSelected ( ) && self . checkgroup . setValue ( ) , self . resultPane . populate ( th
eventName : BI . DynamicDateTimeTrigger . EVENT _TRIGGER _CLICK , action : function ( ) { self . combo . toggle ( ) } } , { eventName : BI . DynamicDateTimeTrigger . EVENT _FOCUS , action : function ( ) { self . storeTriggerValue = self . trigger . getKey ( ) , self . combo . isViewVisible ( ) || self . combo . showView ( ) , self . fireEvent ( BI . DynamicDateTimeCombo . EVENT _FOCUS ) } } , { eventName : BI . DynamicDateTimeTrigger . EVENT _BLUR , action : function ( ) { self . fireEvent ( BI . DynamicDateTimeCombo . EVENT _BLUR ) } } , { eventName : BI . DynamicDateTimeTrigger . EVENT _ERROR , action : function ( ) { self . storeValue = { type : BI . DynamicDateTimeCombo . Static , value : { year : date . getFullYear ( ) , month : date . getMonth ( ) + 1 } } , self . fireEvent ( BI . DynamicDateTimeCombo . EVENT _ERROR ) } } , { eventName : BI . DynamicDateTimeTrigger . EVENT _VALID , action : function ( ) { self . fireEvent ( BI . DynamicDateTimeCombo . EVENT _VALID ) } } , { eventName : BI . DynamicDateTimeTrigger . EVENT _CHANGE , action : function ( ) { self . fireEvent ( BI . DynamicDateTimeCombo . EVENT _CHANGE ) } } , { eventName : BI . DynamicDateTimeTrigger . EVENT _CONFIRM , action : function ( ) { if ( ! self . combo . isViewVisible ( ) ) { var dateStore = self . storeTriggerValue , dateObj = self . trigger . getKey ( ) ; BI . isNotEmptyString ( dateObj ) && ! BI . isEqual ( dateObj , dateStore ) ? ( self . storeValue = self . trigger . getValue ( ) , self . setValue ( self . trigger . getValue ( ) ) ) : BI . isEmptyString ( dateObj ) && ( self . storeValue = null , self . trigger . setValue ( ) ) , self . _checkDynamicValue ( self . storeValue ) , self . fireEvent ( BI . DynamicDateTimeCombo . EVENT _CONFIRM ) } } } ] } , adjustLength : this . constants . comboAdjustHeight , popup : { el : { type : "bi.dynamic_date_time_popup" , behaviors : opts . behaviors , min : opts . minDate , max : opts . maxDate , ref : function ( ) { self . popup = this } , listeners : [ { eventName : BI . DynamicDateTimePopup . BUTTON _CLEAR _EVENT _CHANGE , action : function ( ) { self . setValue ( ) , self . combo . hideView ( ) , self . fireEvent ( BI . DynamicDateTimeCombo . EVENT _CONFIRM ) } } , { eventName : BI . DynamicDateTimePopup . BUTTON _lABEL _EVENT _CHANGE , action : function ( ) { var date = BI . getDate ( ) ; self . setValue ( { type : BI . DynamicDateTimeCombo . Static , value : { year : date . getFullYear ( ) , month : date . getMonth ( ) + 1 , day : date . getDate ( ) , hour : 0 , minute : 0 , second : 0 } } ) , self . combo . hideView ( ) , self . fireEvent ( BI . DynamicDateTimeCombo . EVENT _CONFIRM ) } } , { eventName : BI . DynamicDateTimePopup . BUTTON _OK _EVENT _CHANGE , action : function ( ) { var value = self . popup . getValue ( ) ; self . _checkValue ( value ) && self . setValue ( value ) , self . combo . hideView ( ) , self . fireEvent ( BI . DynamicDateTimeCombo . EVENT _CONFIRM ) } } , { eventName : BI . DynamicDateTimePopup . EVENT _CHANGE , action : function ( ) { self . setValue ( self . popup . getValue ( ) ) , self . combo . hideView ( ) , self . fireEvent ( BI . DynamicDateTimeCombo . EVENT _CONFIRM ) } } ] } , stopPropagation : ! 1 } , listeners : [ { eventName : BI . Combo . EVENT _BEFORE _POPUPVIEW , action : function ( ) { self . popup . setValue ( self . storeValue ) , self . popup . setMinDate ( opts . minDate ) , self . popup . setMaxDate ( opts . maxDate ) , self . fireEvent ( BI . DynamicDateTimeCombo . EVENT _BEFORE _POPUPVIEW ) } } ] , hideChecker : function ( e ) { return 0 === self . triggerBtn . element . find ( e . target ) . length } } , top : 0 , left : 0 , right : 0 , bottom : 0 } , { el : { type : "bi.icon_button" , cls : "bi-trigger-icon-button date-font" , width : opts . height , height : opts . height , listeners : [ { eventName : BI . IconButton . EVENT _CHANGE , action : function ( ) { self . combo . isViewVisible ( ) || self . combo . showView ( ) } } ] , ref : function ( ) { self . triggerBtn = this } } , top : 0 , right : 0 } ] } ] , ref : function ( _ref ) { self . comboWrapper = _ref } } } , mounted : function ( ) { this . _checkDynamicValue ( this . storeValue ) } , _checkDynamicValue : function ( v ) { var o = this . options , type = null ; switch ( BI . isNotNull ( v ) && ( type = v . type ) , type ) { case BI . DynamicDateTimeCombo . Dynamic : this . changeIcon . setVisible ( ! 0 ) , this . comboWrapper . attr ( "items" ) [ 0 ] . width = o . height , this . comboWrapper . resize ( ) ; break ; default : this . comboWrapper . attr ( "items" ) [ 0 ] . width = 0 , this . comboWrapper . resize ( ) , this . changeIcon . setVisible ( ! 1 ) } } , _checkValue : function ( v ) { switch ( v . type ) { case BI . DynamicDateCombo . Dynamic : return BI . isNotEmptyObject ( v . value ) ; case BI . DynamicDateCombo . Static : default : return ! 0 } } , setMinDate : function ( minDate ) { var o = this . options ; o . minDate = minDate , this . trigger . setMinDate ( minDate ) , this . popup && this . popup . setMinDate ( minDate ) } , setMaxDate : function ( maxDate ) { var o = this . options ; o . maxDate = maxDate , this . trigger . setMaxDate ( maxDate ) , this . popup && this . popup . setMaxDate ( maxDate ) } , setValue : functi
BI . TextEditor . EVENT _START = "EVENT_START" , BI . TextEditor . EVENT _PAUSE = "EVENT_PAUSE" , BI . TextEditor . EVENT _STOP = "EVENT_STOP" , BI . TextEditor . EVENT _CONFIRM = "EVENT_CONFIRM" , BI . TextEditor . EVENT _CHANGE _CONFIRM = "EVENT_CHANGE_CONFIRM" , BI . TextEditor . EVENT _VALID = "EVENT_VALID" , BI . TextEditor . EVENT _ERROR = "EVENT_ERROR" , BI . TextEditor . EVENT _ENTER = "EVENT_ENTER" , BI . TextEditor . EVENT _RESTRICT = "EVENT_RESTRICT" , BI . TextEditor . EVENT _REMOVE = "EVENT_REMOVE" , BI . TextEditor . EVENT _EMPTY = "EVENT_EMPTY" , BI . shortcut ( "bi.text_editor" , BI . TextEditor ) , BI . SmallTextEditor = BI . inherit ( BI . TextEditor , { _defaultConfig : function ( ) { var conf = BI . SmallTextEditor . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { baseCls : ( conf . baseCls || "" ) + " bi-small-text-editor" , height : 20 } ) } , _init : function ( ) { BI . SmallTextEditor . superclass . _init . apply ( this , arguments ) } } ) , BI . shortcut ( "bi.small_text_editor" , BI . SmallTextEditor ) , BI . IntervalSlider = BI . inherit ( BI . Single , { _constant : { EDITOR _WIDTH : 58 , EDITOR _R _GAP : 60 , EDITOR _HEIGHT : 30 , SLIDER _WIDTH _HALF : 15 , SLIDER _WIDTH : 30 , SLIDER _HEIGHT : 30 , TRACK _HEIGHT : 24 } , props : { baseCls : "bi-interval-slider bi-slider-track" , digit : ! 1 , unit : "" } , render : function ( ) { var self = this , c = this . _constant ; return this . enable = ! 1 , this . valueOne = "" , this . valueTwo = "" , this . calculation = new BI . AccurateCalculationModel , this . grayTrack = BI . createWidget ( { type : "bi.layout" , cls : "gray-track" , height : 6 } ) , this . blueTrack = BI . createWidget ( { type : "bi.layout" , cls : "blue-track bi-high-light-background" , height : 6 } ) , this . track = this . _createTrackWrapper ( ) , this . labelOne = BI . createWidget ( { type : "bi.sign_text_editor" , cls : "slider-editor-button" , text : this . options . unit , allowBlank : ! 1 , width : c . EDITOR _WIDTH , validationChecker : function ( v ) { return self . _checkValidation ( v ) } } ) , this . labelOne . element . hover ( function ( ) { self . labelOne . element . removeClass ( "bi-border" ) . addClass ( "bi-border" ) } , function ( ) { self . labelOne . element . removeClass ( "bi-border" ) } ) , this . labelOne . on ( BI . Editor . EVENT _CONFIRM , function ( ) { var oldValueOne = self . valueOne , v = BI . parseFloat ( this . getValue ( ) ) ; self . valueOne = v ; var percent = self . _getPercentByValue ( v ) , significantPercent = BI . parseFloat ( percent . toFixed ( 1 ) ) ; self . _setSliderOnePosition ( significantPercent ) , self . _setBlueTrack ( ) , self . _checkLabelPosition ( oldValueOne , self . valueTwo , self . valueOne , self . valueTwo ) , self . fireEvent ( BI . IntervalSlider . EVENT _CHANGE ) } ) , this . labelTwo = BI . createWidget ( { type : "bi.sign_text_editor" , cls : "slider-editor-button" , text : this . options . unit , allowBlank : ! 1 , width : c . EDITOR _WIDTH , validationChecker : function ( v ) { return self . _checkValidation ( v ) } } ) , this . labelTwo . element . hover ( function ( ) { self . labelTwo . element . removeClass ( "bi-border" ) . addClass ( "bi-border" ) } , function ( ) { self . labelTwo . element . removeClass ( "bi-border" ) } ) , this . labelTwo . on ( BI . Editor . EVENT _CONFIRM , function ( ) { var oldValueTwo = self . valueTwo , v = BI . parseFloat ( this . getValue ( ) ) ; self . valueTwo = v ; var percent = self . _getPercentByValue ( v ) , significantPercent = BI . parseFloat ( percent . toFixed ( 1 ) ) ; self . _setSliderTwoPosition ( significantPercent ) , self . _setBlueTrack ( ) , self . _checkLabelPosition ( self . valueOne , oldValueTwo , self . valueOne , self . valueTwo ) , self . fireEvent ( BI . IntervalSlider . EVENT _CHANGE ) } ) , this . sliderOne = BI . createWidget ( { type : "bi.single_slider_button" } ) , this . sliderTwo = BI . createWidget ( { type : "bi.single_slider_button" } ) , this . _draggable ( this . sliderOne , ! 0 ) , this . _draggable ( this . sliderTwo , ! 1 ) , this . _setVisible ( ! 1 ) , { type : "bi.absolute" , element : this , items : [ { el : { type : "bi.vertical" , items : [ { type : "bi.absolute" , items : [ { el : this . track , width : "100%" , height : c . TRACK _HEIGHT } ] } ] , hgap : 7 , height : c . TRACK _HEIGHT } , top : 23 , left : 0 , width : "100%" } , this . _createLabelWrapper ( ) , this . _createSliderWrapper ( ) ] } } , _rePosBySizeAfterMove : function ( size , isLeft ) { var o = this . options , percent = 100 * size / this . _getGrayTrackLength ( ) , significantPercent = BI . parseFloat ( percent . toFixed ( 1 ) ) , v = this . _getValueByPercent ( significantPercent ) ; v = this . _assertValue ( v ) , v = o . digit === ! 1 ? v : v . toFixed ( o . digit ) ; var oldValueOne = this . valueOne , oldValueTwo = this . valueTwo ; isLeft ? ( this . _setSliderOnePosition ( significantPercent ) , this . labelOne . setValue ( v ) , this . valueOne = v , this . _checkLabelPosition ( oldValueOne , oldValueTwo , v , this . valueTwo ) ) : ( this . _setSliderTwoPosition ( signific
self . fireEvent ( BI . MultiLayerSelectTreeInsertSearchPane . EVENT _ADD _ITEM , o . keywordGetter ( ) ) } } , this . tree ] } } , setKeyword : function ( keyword ) { var showTip = BI . isEmptyArray ( this . tree . getAllLeaves ( ) ) ; this . addNotMatchTip . setVisible ( showTip ) , showTip && this . addNotMatchTip . setText ( BI . i18nText ( "BI-Basic_Click_To_Add_Text" , keyword ) ) } , getValue : function ( ) { return this . tree . getValue ( ) } , setValue : function ( v ) { v = BI . isArray ( v ) ? v : [ v ] , this . tree . setValue ( v ) } , populate : function ( items ) { this . tree . populate ( items ) } } ) , BI . MultiLayerSelectTreeInsertSearchPane . EVENT _ADD _ITEM = "EVENT_ADD_ITEM" , BI . MultiLayerSelectTreeInsertSearchPane . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.multilayer_select_tree_insert_search_pane" , BI . MultiLayerSelectTreeInsertSearchPane ) , BI . MultiLayerSelectLevelTree = BI . inherit ( BI . Pane , { _defaultConfig : function ( ) { return BI . extend ( BI . MultiLayerSelectLevelTree . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-multilayer-select-level-tree" , isDefaultInit : ! 1 , items : [ ] , itemsCreator : BI . emptyFn , keywordGetter : BI . emptyFn , value : "" , scrollable : ! 0 } ) } , _init : function ( ) { var o = this . options ; BI . MultiLayerSelectLevelTree . superclass . _init . apply ( this , arguments ) , this . storeValue = o . value , this . initTree ( this . options . items ) , this . check ( ) } , _formatItems : function ( nodes , layer , pNode ) { var self = this , o = this . options , keyword = o . keywordGetter ( ) ; return BI . each ( nodes , function ( i , node ) { var extend = { } ; node . layer = layer , BI . isKey ( node . id ) || ( node . id = BI . UUID ( ) ) , node . keyword = node . keyword || keyword , extend . pNode = pNode , node . isParent === ! 0 || node . parent === ! 0 || BI . isNotEmptyArray ( node . children ) ? ( extend . type = "bi.multilayer_select_tree_mid_plus_group_node" , i === nodes . length - 1 && ( extend . type = "bi.multilayer_select_tree_last_plus_group_node" , extend . isLastNode = ! 0 ) , 0 !== i || pNode || ( extend . type = "bi.multilayer_select_tree_first_plus_group_node" ) , 0 !== i || i !== nodes . length - 1 || pNode || ( extend . type = "bi.multilayer_select_tree_plus_group_node" ) , BI . defaults ( node , extend ) , self . _formatItems ( node . children , layer + 1 , node ) ) : ( extend . type = "bi.multilayer_single_tree_mid_tree_leaf_item" , 0 !== i || pNode || ( extend . type = "bi.multilayer_single_tree_first_tree_leaf_item" ) , i === nodes . length - 1 && ( extend . type = "bi.multilayer_single_tree_last_tree_leaf_item" ) , BI . defaults ( node , extend ) ) } ) , nodes } , _assertId : function ( sNodes ) { BI . each ( sNodes , function ( i , node ) { node . id = node . id || BI . UUID ( ) } ) } , initTree : function ( nodes ) { var self = this , o = this . options , hasNext = ! 1 ; this . empty ( ) , this . _assertId ( nodes ) , this . tree = BI . createWidget ( { type : "bi.custom_tree" , cls : "tree-view display-table" , expander : { type : "bi.select_tree_expander" , isDefaultInit : o . isDefaultInit , el : { } , popup : { type : "bi.custom_tree" } } , items : this . _formatItems ( BI . Tree . transformToTreeFormat ( nodes ) , 0 ) , itemsCreator : function ( op , callback ) { 1 === op . times && ! op . node && BI . nextTick ( function ( ) { self . loading ( ) } ) , o . itemsCreator ( op , function ( ob ) { hasNext = ob . hasNext , 1 === op . times && ! op . node && self . _populate ( ob . items ) , callback ( self . _formatItems ( BI . Tree . transformToTreeFormat ( ob . items ) , op . node ? op . node . layer + 1 : 0 , op . node ) ) , self . setValue ( self . storeValue ) , 1 === op . times && ! op . node && BI . nextTick ( function ( ) { self . loaded ( ) } ) } ) } , value : o . value , el : { type : "bi.loader" , isDefaultInit : o . itemsCreator !== BI . emptyFn , el : { type : "bi.button_tree" , chooseType : o . chooseType , behaviors : o . behaviors , layouts : [ { type : "bi.vertical" } ] } , hasNext : function ( ) { return hasNext } } } ) , this . tree . on ( BI . Controller . EVENT _CHANGE , function ( type , value ) { self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) , type === BI . Events . CLICK && ( self . setValue ( value ) , self . fireEvent ( BI . MultiLayerSelectLevelTree . EVENT _CHANGE , arguments ) ) } ) , BI . createWidget ( { type : "bi.adaptive" , element : this , scrollable : o . scrollable , items : [ this . tree ] } ) } , _populate : function ( ) { BI . MultiLayerSelectLevelTree . superclass . populate . apply ( this , arguments ) } , populate : function ( nodes ) { this . _populate ( nodes ) , BI . isNull ( nodes ) ? this . tree . populate ( ) : this . tree . populate ( this . _formatItems ( BI . Tree . transformToTreeFormat ( nodes ) , 0 ) ) } , setValue : function ( v ) { this . options . chooseType === BI . Selection . None || ( this . storeValue = v , this . tree . setValue ( v ) ) } , getValue : function ( ) { return BI . isArray ( this . storeValue ) ? this . storeValue : BI . isNull ( this . storeValue ) ? [ ] : [ this . storeValue ] } , getAllLeaves : function (
if ( find . find . length > 0 || find . match . length > 0 ) return items . push ( node ) , ! 0 } ) , this . _fillTreeStructure4Search ( items , "id" ) } , _createJson : function ( node , open ) { return { id : node . id , pId : node . pId , text : node . text , value : node . value , isParent : BI . isNotEmptyArray ( node . children ) , open : open } } , _getChildren : function ( node ) { var self = this ; node . children = node . children || [ ] ; var nodes = [ ] ; return BI . each ( node . children , function ( idx , child ) { var children = self . _getChildren ( child ) ; nodes = nodes . concat ( children ) } ) , node . children . concat ( nodes ) } , _fillTreeStructure4Search : function ( leaves ) { var self = this , result = [ ] , queue = [ ] ; for ( BI . each ( leaves , function ( idx , node ) { queue . push ( { pId : node . pId } ) , result . push ( node ) , result = result . concat ( self . _getChildren ( node ) ) } ) ; BI . isNotEmptyArray ( queue ) ; ) { var node = queue . pop ( ) , pNode = this . tree . search ( this . tree . getRoot ( ) , node . pId , "id" ) ; null != pNode && ( pNode . open = ! 0 , queue . push ( { pId : pNode . pId } ) , result . push ( pNode ) ) } return BI . uniqBy ( BI . map ( result , function ( idx , node ) { return self . _createJson ( node , node . open ) } ) , "id" ) } , _digest : function ( v ) { var o = this . options ; if ( o . itemsCreator === BI . emptyFn ) { var result = BI . find ( o . items , function ( i , item ) { return item . value === v } ) ; return BI . isNotNull ( result ) ? result . text : o . text } return o . valueFormatter ( v ) } , _getShowText : function ( ) { return this . editor . getText ( ) } , stopEditing : function ( ) { this . searcher . stopSearch ( ) } , getSearcher : function ( ) { return this . searcher } , populate : function ( items ) { this . options . items = items , this . _initData ( ) } , setValue : function ( v ) { this . editor . setState ( this . _digest ( v [ 0 ] ) ) } , getValue : function ( ) { return this . searcher . getValue ( ) } } ) , BI . MultiLayerSingleTreeTrigger . EVENT _FOCUS = "EVENT_FOCUS" , BI . MultiLayerSingleTreeTrigger . EVENT _BLUR = "EVENT_BLUR" , BI . MultiLayerSingleTreeTrigger . EVENT _SEARCHING = "EVENT_SEARCHING" , BI . MultiLayerSingleTreeTrigger . EVENT _STOP = "EVENT_STOP" , BI . MultiLayerSingleTreeTrigger . EVENT _START = "EVENT_START" , BI . MultiLayerSingleTreeTrigger . EVENT _CHANGE = "EVENT_CHANGE" , BI . MultiLayerSingleTreeTrigger . EVENT _ADD _ITEM = "EVENT_ADD_ITEM" , BI . shortcut ( "bi.multilayer_single_tree_trigger" , BI . MultiLayerSingleTreeTrigger ) , BI . MultiLayerSingleTreeFirstPlusGroupNode = BI . inherit ( BI . NodeButton , { _defaultConfig : function ( ) { var conf = BI . MultiLayerSingleTreeFirstPlusGroupNode . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { extraCls : "bi-multilayer-single-tree-first-plus-group-node bi-list-item" , layer : 0 , id : "" , pId : "" , open : ! 1 , height : 24 } ) } , _init : function ( ) { BI . MultiLayerSingleTreeFirstPlusGroupNode . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . node = this . _createNode ( ) ; for ( var needBlankLayers = [ ] , pNode = o . pNode ; pNode ; ) pNode . isLastNode && needBlankLayers . push ( pNode . layer ) , pNode = pNode . pNode ; var items = [ ] ; BI . count ( 0 , o . layer , function ( index ) { items . push ( { type : "bi.layout" , cls : BI . contains ( needBlankLayers , index ) ? "" : "base-line-conn-background" , width : 12 , height : o . height } ) } ) , items . push ( this . node ) , BI . createWidget ( { type : "bi.td" , element : this , columnSize : BI . makeArray ( o . layer , 12 ) , items : [ items ] } ) } , doRedMark : function ( ) { this . node . doRedMark . apply ( this . node , arguments ) } , unRedMark : function ( ) { this . node . unRedMark . apply ( this . node , arguments ) } , doClick : function ( ) { BI . MultiLayerSingleTreeFirstPlusGroupNode . superclass . doClick . apply ( this , arguments ) , this . node . setSelected ( this . isSelected ( ) ) } , setOpened : function ( v ) { BI . MultiLayerSingleTreeFirstPlusGroupNode . superclass . setOpened . apply ( this , arguments ) , BI . isNotNull ( this . node ) && this . node . setOpened ( v ) } , _createNode : function ( ) { var self = this , o = this . options ; return BI . createWidget ( { type : "bi.first_plus_group_node" , cls : "bi-list-item-none" , logic : { dynamic : ! 0 } , id : o . id , pId : o . pId , open : o . open , isLastNode : o . isLastNode , height : o . height , hgap : o . hgap , text : o . text , value : o . value , py : o . py , keyword : o . keyword , listeners : [ { eventName : BI . Controller . EVENT _CHANGE , action : function ( type ) { type !== BI . Events . CLICK && self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } } ] } ) } } ) , BI . shortcut ( "bi.multilayer_single_tree_first_plus_group_node" , BI . MultiLayerSingleTreeFirstPlusGroupNode ) , BI . MultiLayerSingleTreeLastPlusGroupNode = BI . inherit ( BI . NodeButton , { _defaultConfig : function ( ) { var conf = BI . MultiLayerSingleTreeLastPlusGroupNode . superclass . _defaultConfig . apply ( this , arg
self . combo . isViewVisible ( ) || self . combo . showView ( ) } ) , this . numberCounter . on ( BI . MultiSelectCheckSelectedSwitcher . EVENT _BEFORE _POPUPVIEW , function ( ) { this . updateSelectedValue ( self . storeValue ) } ) , this . numberCounter . on ( BI . Events . VIEW , function ( b ) { BI . nextTick ( function ( ) { self . trigger . refreshPlaceHolderWidth ( b === ! 0 ? self . numberCounter . element . outerWidth ( ) + 8 : 0 ) } ) } ) , this . trigger . element . click ( function ( e ) { self . trigger . element . find ( e . target ) . length > 0 && self . numberCounter . hideView ( ) } ) , BI . createWidget ( { type : "bi.absolute" , element : this , items : [ { el : this . combo , left : 0 , right : 0 , top : 0 , bottom : 0 } , { el : triggerBtn , right : 0 , top : 0 , bottom : 0 } , { el : { type : "bi.vertical_adapt" , items : [ this . numberCounter ] } , right : o . height , top : 0 , height : o . height } ] } ) } , _itemsCreator4Trigger : function ( op , callback ) { var self = this , o = this . options ; o . itemsCreator ( op , function ( res ) { 1 === op . times && BI . isNotNull ( op . keywords ) && self . trigger . setValue ( BI . deepClone ( self . storeValue ) ) , callback . apply ( self , arguments ) } ) } , _stopEditing : function ( ) { this . trigger . stopEditing ( ) , this . numberCounter . hideView ( ) } , _defaultState : function ( ) { this . _stopEditing ( ) , this . combo . hideView ( ) } , _assertValue : function ( val ) { val || ( val = { } ) , val . type || ( val . type = BI . Selection . Multi ) , val . value || ( val . value = [ ] ) } , _makeMap : function ( values ) { return BI . makeObject ( values || [ ] ) } , _joinKeywords : function ( keywords , callback ) { function digest ( items ) { var selectedMap = self . _makeMap ( items ) ; BI . each ( keywords , function ( i , val ) { BI . isNotNull ( selectedMap [ val ] ) && ( self . storeValue . type === BI . Selection . Multi ? BI . pushDistinct ( self . storeValue . value , val ) : BI . remove ( self . storeValue . value , val ) ) } ) , self . _adjust ( callback ) } var self = this , o = this . options ; this . _assertValue ( this . storeValue ) , this . requesting = ! 0 , o . itemsCreator ( { type : BI . MultiSelectNoBarCombo . REQ _GET _ALL _DATA , keywords : keywords } , function ( ob ) { var values = BI . map ( ob . items , "value" ) ; digest ( values ) } ) } , _joinAll : function ( res , callback ) { var self = this , o = this . options ; this . _assertValue ( res ) , this . requesting = ! 0 , o . itemsCreator ( { type : BI . MultiSelectNoBarCombo . REQ _GET _ALL _DATA , keywords : [ this . trigger . getKey ( ) ] } , function ( ob ) { var items = BI . map ( ob . items , "value" ) ; if ( self . storeValue . type === res . type ) { var change = ! 1 , map = self . _makeMap ( self . storeValue . value ) ; return BI . each ( items , function ( i , v ) { BI . isNotNull ( map [ v ] ) && ( change = ! 0 , self . storeValue . assist && self . storeValue . assist . push ( map [ v ] ) , delete map [ v ] ) } ) , change && ( self . storeValue . value = BI . values ( map ) ) , void self . _adjust ( callback ) } var selectedMap = self . _makeMap ( self . storeValue . value ) , notSelectedMap = self . _makeMap ( res . value ) , newItems = [ ] ; BI . each ( items , function ( i , item ) { BI . isNotNull ( selectedMap [ items [ i ] ] ) && ( self . storeValue . assist && self . storeValue . assist . push ( selectedMap [ items [ i ] ] ) , delete selectedMap [ items [ i ] ] ) , BI . isNull ( notSelectedMap [ items [ i ] ] ) && ( BI . remove ( self . storeValue . assist , item ) , newItems . push ( item ) ) } ) , self . storeValue . value = newItems . concat ( BI . values ( selectedMap ) ) , self . _adjust ( callback ) } ) } , _adjust : function ( callback ) { function adjust ( ) { self . wants2Quit === ! 0 && ( self . fireEvent ( BI . MultiSelectNoBarCombo . EVENT _CONFIRM ) , self . wants2Quit = ! 1 ) , self . requesting = ! 1 } var self = this , o = this . options ; adjust ( ) , callback ( ) } , _join : function ( res , callback ) { var self = this , o = this . options ; if ( this . _assertValue ( res ) , this . _assertValue ( this . storeValue ) , this . storeValue . type === res . type ) { var map = this . _makeMap ( this . storeValue . value ) ; BI . each ( res . value , function ( i , v ) { map [ v ] || ( self . storeValue . value . push ( v ) , BI . remove ( self . storeValue . assist , v ) , map [ v ] = v ) } ) ; var change = ! 1 ; return BI . each ( res . assist , function ( i , v ) { BI . isNotNull ( map [ v ] ) && ( change = ! 0 , self . storeValue . assist && self . storeValue . assist . push ( map [ v ] ) , delete map [ v ] ) } ) , change && ( this . storeValue . value = BI . values ( map ) ) , void self . _adjust ( callback ) } this . _joinAll ( res , callback ) } , _setStartValue : function ( value ) { this . _startValue = value , this . popup . setStartValue ( value ) } , setValue : function ( v ) { this . storeValue = { type : BI . Selection . Multi , value : v || [ ] } , this . combo . setValue ( this . storeValue ) , this . numberCounter . setValue ( this . storeValue ) } , getValue : function ( ) { return BI . deepClone ( this . storeValue . value ) } , populate : function ( ) { this . combo . populate . apply ( this . combo , arguments ) , this . numberCounter . populateSwitcher . apply ( this . numberCounter , arguments ) } } ) , BI . extend ( B
logic : { dynamic : ! 0 , scrolly : ! 0 } , el : { chooseType : BI . ButtonGroup . CHOOSE _TYPE _MULTI , behaviors : { redmark : function ( ) { return ! 0 } } , layouts : [ { type : "bi.vertical" } ] } } , itemsCreator : function ( op , callback ) { var startValue = self . _startValue ; self . storeValue && ( op = BI . extend ( op || { } , { selectedValues : BI . isKey ( startValue ) && self . storeValue . type === BI . Selection . Multi ? self . storeValue . value . concat ( startValue ) : self . storeValue . value } ) ) , opts . itemsCreator ( op , function ( ob ) { hasNext = ob . hasNext ; var firstItems = [ ] ; if ( 1 === op . times && self . storeValue ) { var json = BI . map ( self . storeValue . value , function ( i , v ) { var txt = opts . valueFormatter ( v ) || v ; return { text : txt , value : v , title : txt , selected : self . storeValue . type === BI . Selection . Multi } } ) ; if ( BI . isKey ( self . _startValue ) && ! BI . contains ( self . storeValue . value , self . _startValue ) ) { var txt = opts . valueFormatter ( startValue ) || startValue ; json . unshift ( { text : txt , value : startValue , title : txt , selected : ! 0 } ) } firstItems = self . _createItems ( json ) } callback ( firstItems . concat ( self . _createItems ( ob . items ) ) , ob . keyword || "" ) , 1 === op . times && self . storeValue && ( BI . isKey ( startValue ) && ( self . storeValue . type === BI . Selection . All ? BI . remove ( self . storeValue . value , startValue ) : BI . pushDistinct ( self . storeValue . value , startValue ) ) , self . setValue ( self . storeValue ) ) , 1 === op . times && self . _scrollToTop ( ) } ) } , hasNext : function ( ) { return hasNext } , value : this . storeValue } , opts . el ) ) , BI . createWidget ( { type : "bi.vertical" , element : this , items : [ this . button _group ] , vgap : 5 } ) , this . button _group . on ( BI . Controller . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) , this . button _group . on ( BI . SelectList . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . MultiSelectNoBarLoader . EVENT _CHANGE , arguments ) } ) } , _createItems : function ( items ) { return BI . createItems ( items , { type : "bi.multi_select_item" , cls : "bi-list-item-active" , logic : this . options . logic , height : 24 , iconWrapperWidth : 36 } ) } , _scrollToTop : function ( ) { var self = this ; BI . delay ( function ( ) { self . button _group . element . scrollTop ( 0 ) } , 30 ) } , _assertValue : function ( val ) { val || ( val = { } ) , val . type || ( val . type = BI . Selection . Multi ) , val . value || ( val . value = [ ] ) } , setStartValue : function ( v ) { this . _startValue = v } , setValue : function ( v ) { this . storeValue = v || { } , this . _assertValue ( this . storeValue ) , this . button _group . setValue ( this . storeValue . value ) } , getValue : function ( ) { return { type : BI . Selection . Multi , value : this . button _group . getValue ( ) } } , getAllButtons : function ( ) { return this . button _group . getAllButtons ( ) } , empty : function ( ) { this . button _group . empty ( ) } , populate : function ( items ) { arguments [ 0 ] = this . _createItems ( items ) , this . button _group . populate . apply ( this . button _group , arguments ) } , resetHeight : function ( h ) { this . button _group . element . css ( { "max-height" : h + "px" } ) } , resetWidth : function ( ) { } } ) , BI . MultiSelectNoBarLoader . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.multi_select_no_bar_loader" , BI . MultiSelectNoBarLoader ) , BI . MultiSelectPopupView = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . MultiSelectPopupView . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-multi-select-popup-view" , maxWidth : "auto" , minWidth : 135 , maxHeight : 400 , valueFormatter : BI . emptyFn , itemsCreator : BI . emptyFn , onLoaded : BI . emptyFn } ) } , _init : function ( ) { BI . MultiSelectPopupView . superclass . _init . apply ( this , arguments ) ; var self = this , opts = this . options ; this . loader = BI . createWidget ( { type : "bi.multi_select_loader" , itemsCreator : opts . itemsCreator , valueFormatter : opts . valueFormatter , onLoaded : opts . onLoaded , value : opts . value } ) , this . popupView = BI . createWidget ( { type : "bi.multi_popup_view" , stopPropagation : ! 1 , maxWidth : opts . maxWidth , minWidth : opts . minWidth , maxHeight : opts . maxHeight , element : this , buttons : [ BI . i18nText ( "BI-Basic_Clears" ) , BI . i18nText ( "BI-Basic_Sure" ) ] , el : this . loader , value : opts . value } ) , this . popupView . on ( BI . MultiPopupView . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . MultiSelectPopupView . EVENT _CHANGE ) } ) , this . popupView . on ( BI . MultiPopupView . EVENT _CLICK _TOOLBAR _BUTTON , function ( index ) { switch ( index ) { case 0 : self . fireEvent ( BI . MultiSelectPopupView . EVENT _CLICK _CLEAR ) ; break ; case 1 : self . fireEvent ( BI . MultiSelectPopupView . EVENT _CLICK _CONFIRM ) } } ) } , isAllSelected : function ( ) { return this . loader . isAllSelected ( ) } , setStartValue : function ( v ) { this . loader . setStartValue ( v ) } , setValue : functio
BI . isNotEmptyString ( keyword ) && ( op . keywords = [ keyword ] , this . setKeyword ( op . keywords [ 0 ] ) , o . itemsCreator ( op , callback ) ) } , listeners : [ { eventName : BI . MultiSelectSearchInsertPane . EVENT _ADD _ITEM , action : function ( ) { var keyword = self . trigger . getKeyword ( ) ; self . trigger . hasMatched ( ) || ( self . storeValue . type === BI . Selection . Multi && BI . pushDistinct ( self . storeValue . value , keyword ) , self . _showAdapter ( ) , self . adapter . setValue ( self . storeValue ) , self . adapter . populate ( ) , self . storeValue . type === BI . Selection . Multi && self . fireEvent ( BI . MultiSelectInsertList . EVENT _CHANGE ) ) } } ] } ) , this . searcherPane . setVisible ( ! 1 ) , this . trigger = BI . createWidget ( { type : "bi.searcher" , allowSearchBlank : ! 1 , isAutoSearch : ! 1 , isAutoSync : ! 1 , onSearch : function ( op , callback ) { callback ( ) } , adapter : this . adapter , popup : this . searcherPane , height : 200 , masker : ! 1 , listeners : [ { eventName : BI . Searcher . EVENT _START , action : function ( ) { self . _showSearcherPane ( ) , self . _setStartValue ( "" ) , this . setValue ( BI . deepClone ( self . storeValue ) ) } } , { eventName : BI . Searcher . EVENT _STOP , action : function ( ) { self . _showAdapter ( ) , self . _setStartValue ( "" ) , self . adapter . setValue ( self . storeValue ) , self . adapter . populate ( ) } } , { eventName : BI . Searcher . EVENT _PAUSE , action : function ( ) { var keyword = this . getKeyword ( ) ; this . hasMatched ( ) && self . _join ( { type : BI . Selection . Multi , value : [ keyword ] } , function ( ) { self . storeValue . type === BI . Selection . Multi && BI . pushDistinct ( self . storeValue . value , keyword ) , self . _showAdapter ( ) , self . adapter . setValue ( self . storeValue ) , self . _setStartValue ( keyword ) , assertShowValue ( ) , self . adapter . populate ( ) , self . _setStartValue ( "" ) , self . fireEvent ( BI . MultiSelectInsertList . EVENT _CHANGE ) } ) , self . _showAdapter ( ) } } , { eventName : BI . Searcher . EVENT _SEARCHING , action : function ( ) { var keywords = this . getKeywords ( ) , last = BI . last ( keywords ) ; keywords = BI . initial ( keywords || [ ] ) , keywords . length > 0 && self . _joinKeywords ( keywords , function ( ) { BI . isEndWithBlank ( last ) ? ( self . adapter . setValue ( self . storeValue ) , assertShowValue ( ) , self . adapter . populate ( ) , self . _setStartValue ( "" ) ) : ( self . adapter . setValue ( self . storeValue ) , assertShowValue ( ) ) , self . fireEvent ( BI . MultiSelectInsertList . EVENT _CHANGE ) } ) } } , { eventName : BI . Searcher . EVENT _CHANGE , action : function ( value , obj ) { obj instanceof BI . MultiSelectBar ? self . _joinAll ( this . getValue ( ) , function ( ) { assertShowValue ( ) , self . fireEvent ( BI . MultiSelectInsertList . EVENT _CHANGE ) } ) : self . _join ( this . getValue ( ) , function ( ) { assertShowValue ( ) , self . fireEvent ( BI . MultiSelectInsertList . EVENT _CHANGE ) } ) } } ] , value : o . value } ) , BI . createWidget ( { type : "bi.vtape" , element : this , items : [ { el : this . trigger , height : 24 } , { el : this . adapter , height : "fill" } ] } ) , BI . createWidget ( { type : "bi.absolute" , element : this , items : [ { el : this . searcherPane , top : 30 , bottom : 0 , left : 0 , right : 0 } ] } ) } , _showAdapter : function ( ) { this . adapter . setVisible ( ! 0 ) , this . searcherPane . setVisible ( ! 1 ) } , _showSearcherPane : function ( ) { this . searcherPane . setVisible ( ! 0 ) , this . adapter . setVisible ( ! 1 ) } , _defaultState : function ( ) { this . trigger . stopEditing ( ) } , _assertValue : function ( val ) { val || ( val = { } ) , val . type || ( val . type = BI . Selection . Multi ) , val . value || ( val . value = [ ] ) } , _makeMap : function ( values ) { return BI . makeObject ( values || [ ] ) } , _joinKeywords : function ( keywords , callback ) { function digest ( items ) { var selectedMap = self . _makeMap ( items ) ; BI . each ( keywords , function ( i , val ) { BI . isNotNull ( selectedMap [ val ] ) && ( self . storeValue . type === BI . Selection . Multi ? BI . pushDistinct ( self . storeValue . value , val ) : BI . remove ( self . storeValue . value , val ) ) } ) , callback ( ) } var self = this , o = this . options ; this . _assertValue ( this . storeValue ) , o . itemsCreator ( { type : BI . MultiSelectInsertList . REQ _GET _ALL _DATA , keywords : keywords } , function ( ob ) { var values = BI . map ( ob . items , "value" ) ; digest ( values ) } ) } , _joinAll : function ( res , callback ) { var self = this , o = this . options ; this . _assertValue ( res ) , o . itemsCreator ( { type : BI . MultiSelectInsertList . REQ _GET _ALL _DATA , keywords : [ self . trigger . getKeyword ( ) ] } , function ( ob ) { var items = BI . map ( ob . items , "value" ) ; if ( self . storeValue . type === res . type ) { var change = ! 1 , map = self . _makeMap ( self . storeValue . value ) ; return BI . each ( items , function ( i , v ) { BI . isNotNull ( map [ v ] ) && ( change = ! 0 , delete map [ v ] ) } ) , change && ( self . storeValue . value = BI . values ( map ) ) , void callback ( ) } var selectedMap = self . _makeMap ( self . storeValue . value ) , notSelectedMap = self . _makeMap ( res . value
BI . shortcut ( "bi.multi_tree_combo" , BI . MultiTreeCombo ) , BI . MultiTreeInsertCombo = BI . inherit ( BI . Single , { constants : { offset : { top : 0 , left : 0 , right : 0 , bottom : 25 } } , _defaultConfig : function ( ) { return BI . extend ( BI . MultiTreeInsertCombo . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-multi-tree-insert-combo" , itemsCreator : BI . emptyFn , valueFormatter : BI . emptyFn , height : 24 , allowEdit : ! 0 } ) } , _init : function ( ) { function showCounter ( ) { isSearching ( ) ? self . storeValue = { value : self . trigger . getValue ( ) } : isPopupView ( ) && ( self . storeValue = { value : self . combo . getValue ( ) } ) , self . trigger . setValue ( self . storeValue ) , self . numberCounter . setValue ( self . storeValue ) } BI . MultiTreeInsertCombo . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options , isInit = ! 1 , want2showCounter = ! 1 ; this . storeValue = { value : o . value || { } } , this . trigger = BI . createWidget ( { type : "bi.multi_select_trigger" , allowEdit : o . allowEdit , height : o . height , valueFormatter : o . valueFormatter , masker : { offset : this . constants . offset } , searcher : { type : "bi.multi_tree_searcher" , text : o . text , watermark : o . watermark , itemsCreator : o . itemsCreator , popup : { type : "bi.multi_tree_search_insert_pane" , listeners : [ { eventName : BI . MultiTreeSearchInsertPane . EVENT _ADD _ITEM , action : function ( ) { self . storeValue . value [ self . trigger . getSearcher ( ) . getKeyword ( ) ] = { } , self . _assertShowValue ( ) , self . combo . setValue ( self . storeValue ) , self . numberCounter . setValue ( self . storeValue ) , self . _stopEditing ( ) } } ] } } , value : { value : o . value || { } } } ) , this . combo = BI . createWidget ( { type : "bi.combo" , toggle : ! o . allowEdit , container : o . container , el : this . trigger , adjustLength : 1 , popup : { type : "bi.multi_tree_popup_view" , ref : function ( ) { self . popup = this , self . trigger . setAdapter ( this ) , self . numberCounter . setAdapter ( this ) } , listeners : [ { eventName : BI . MultiTreePopup . EVENT _AFTERINIT , action : function ( ) { self . numberCounter . adjustView ( ) , isInit = ! 0 , want2showCounter === ! 0 && showCounter ( ) } } , { eventName : BI . MultiTreePopup . EVENT _CHANGE , action : function ( ) { change = ! 0 ; var val = { type : BI . Selection . Multi , value : this . hasChecked ( ) ? this . getValue ( ) : { } } ; self . trigger . getSearcher ( ) . setState ( val ) , self . numberCounter . setButtonChecked ( val ) , self . fireEvent ( BI . MultiTreeInsertCombo . EVENT _CLICK _ITEM , self . combo . getValue ( ) ) } } , { eventName : BI . MultiTreePopup . EVENT _CLICK _CONFIRM , action : function ( ) { self . combo . hideView ( ) } } , { eventName : BI . MultiTreePopup . EVENT _CLICK _CLEAR , action : function ( ) { clear = ! 0 , self . setValue ( ) , self . _defaultState ( ) } } ] , itemsCreator : o . itemsCreator , onLoaded : function ( ) { BI . nextTick ( function ( ) { self . numberCounter . adjustView ( ) , self . trigger . getSearcher ( ) . adjustView ( ) } ) } } , value : { value : o . value || { } } , hideChecker : function ( e ) { return 0 === triggerBtn . element . find ( e . target ) . length && 0 === self . numberCounter . element . find ( e . target ) . length } } ) ; var change = ! 1 , clear = ! 1 , isSearching = function ( ) { return self . trigger . getSearcher ( ) . isSearching ( ) } , isPopupView = function ( ) { return self . combo . isViewVisible ( ) } ; this . trigger . on ( BI . MultiSelectTrigger . EVENT _FOCUS , function ( ) { self . fireEvent ( BI . MultiTreeInsertCombo . EVENT _FOCUS ) } ) , this . trigger . on ( BI . MultiSelectTrigger . EVENT _BLUR , function ( ) { self . fireEvent ( BI . MultiTreeInsertCombo . EVENT _BLUR ) } ) , this . trigger . on ( BI . MultiSelectTrigger . EVENT _START , function ( ) { self . storeValue = { value : self . combo . getValue ( ) } , this . setValue ( self . storeValue ) , self . numberCounter . setValue ( self . storeValue ) } ) , this . trigger . on ( BI . MultiSelectTrigger . EVENT _STOP , function ( ) { self . storeValue = { value : this . getValue ( ) } , self . combo . setValue ( self . storeValue ) , self . numberCounter . setValue ( self . storeValue ) , BI . nextTick ( function ( ) { isPopupView ( ) && self . combo . populate ( ) } ) , self . fireEvent ( BI . MultiTreeInsertCombo . EVENT _STOP ) } ) , this . trigger . on ( BI . MultiSelectTrigger . EVENT _SEARCHING , function ( ) { self . fireEvent ( BI . MultiTreeInsertCombo . EVENT _SEARCHING ) } ) , this . trigger . on ( BI . MultiSelectTrigger . EVENT _TRIGGER _CLICK , function ( ) { self . combo . toggle ( ) } ) , this . trigger . on ( BI . MultiSelectTrigger . EVENT _CHANGE , function ( ) { var checked = this . getSearcher ( ) . hasChecked ( ) , val = { type : BI . Selection . Multi , value : checked ? { 1 : 1 } : { } } ; this . getSearcher ( ) . setState ( checked ? BI . Selection . Multi : BI . Selection . None ) , self . numberCounter . setButtonChecked ( val ) , self . fireEvent ( BI . MultiTreeInsertCombo . EVENT _CLICK _ITEM , self . combo . getValue ( ) ) } ) , this . combo . on ( BI . Co
height : o . height - 2 , watermark : o . watermark , allowBlank : o . allowBlank , value : o . max , title : function ( ) { return self . bigEditor && self . bigEditor . getValue ( ) } , quitChecker : function ( ) { return ! 1 } , validationChecker : function ( v ) { return ! ! BI . isNumeric ( v ) || ( self . bigEditorBubbleType = c . typeError , ! 1 ) } , cls : "number-interval-big-editor bi-border" } ) , this . bigTip = BI . createWidget ( { type : "bi.label" , text : o . numTip , height : o . height - 2 , invisible : ! 0 } ) , BI . createWidget ( { type : "bi.absolute" , element : this . bigEditor . element , items : [ { el : this . bigTip , top : 0 , right : 5 } ] } ) , this . smallCombo = BI . createWidget ( { type : "bi.icon_combo" , cls : "number-interval-small-combo bi-border-top bi-border-bottom bi-border-right" , height : o . height - 2 , items : [ { text : "(" + BI . i18nText ( "BI-Less_Than" ) + ")" , iconCls : "less-font" , value : 0 } , { text : "(" + BI . i18nText ( "BI-Less_And_Equal" ) + ")" , value : 1 , iconCls : "less-equal-font" } ] } ) , o . closeMin === ! 0 ? this . smallCombo . setValue ( 1 ) : this . smallCombo . setValue ( 0 ) , this . bigCombo = BI . createWidget ( { type : "bi.icon_combo" , cls : "number-interval-big-combo bi-border-top bi-border-bottom bi-border-left" , height : o . height - 2 , items : [ { text : "(" + BI . i18nText ( "BI-Less_Than" ) + ")" , iconCls : "less-font" , value : 0 } , { text : "(" + BI . i18nText ( "BI-Less_And_Equal" ) + ")" , value : 1 , iconCls : "less-equal-font" } ] } ) , o . closeMax === ! 0 ? this . bigCombo . setValue ( 1 ) : this . bigCombo . setValue ( 0 ) , this . label = BI . createWidget ( { type : "bi.label" , text : BI . i18nText ( "BI-Basic_Value" ) , textHeight : o . height - 2 * c . border , width : c . width - 2 * c . border , height : o . height - 2 * c . border , level : "warning" , tipType : "warning" } ) , this . left = BI . createWidget ( { type : "bi.htape" , items : [ { el : self . smallEditor } , { el : self . smallCombo , width : c . width - c . border } ] } ) , this . right = BI . createWidget ( { type : "bi.htape" , items : [ { el : self . bigCombo , width : c . width - c . border } , { el : self . bigEditor , lgap : 1 } ] } ) , BI . createWidget ( { element : self , type : "bi.center" , hgap : 15 , height : o . height , items : [ { type : "bi.absolute" , items : [ { el : self . left , left : - 15 , right : 0 , top : 0 , bottom : 0 } ] } , { type : "bi.absolute" , items : [ { el : self . right , left : 0 , right : - 15 , top : 0 , bottom : 0 } ] } ] } ) , BI . createWidget ( { element : self , type : "bi.horizontal_auto" , items : [ self . label ] } ) , self . _setValidEvent ( self . bigEditor , c . bigEditor ) , self . _setValidEvent ( self . smallEditor , c . smallEditor ) , self . _setErrorEvent ( self . bigEditor , c . bigEditor ) , self . _setErrorEvent ( self . smallEditor , c . smallEditor ) , self . _setBlurEvent ( self . bigEditor ) , self . _setBlurEvent ( self . smallEditor ) , self . _setFocusEvent ( self . bigEditor ) , self . _setFocusEvent ( self . smallEditor ) , self . _setComboValueChangedEvent ( self . bigCombo ) , self . _setComboValueChangedEvent ( self . smallCombo ) , self . _setEditorValueChangedEvent ( self . bigEditor ) , self . _setEditorValueChangedEvent ( self . smallEditor ) , self . _checkValidation ( ) } , _checkValidation : function ( ) { var self = this , c = this . constants , o = this . options ; if ( self . _setTitle ( "" ) , BI . Bubbles . hide ( c . typeError ) , BI . Bubbles . hide ( c . numberError ) , BI . Bubbles . hide ( c . signalError ) , ! self . smallEditor . isValid ( ) || ! self . bigEditor . isValid ( ) ) return self . element . removeClass ( "number-error" ) , o . validation = "invalid" , c . typeError ; if ( BI . isEmptyString ( self . smallEditor . getValue ( ) ) || BI . isEmptyString ( self . bigEditor . getValue ( ) ) ) return self . element . removeClass ( "number-error" ) , o . validation = "valid" , "" ; var smallValue = parseFloat ( self . smallEditor . getValue ( ) ) , bigValue = parseFloat ( self . bigEditor . getValue ( ) ) , bigComboValue = self . bigCombo . getValue ( ) , smallComboValue = self . smallCombo . getValue ( ) ; return bigComboValue [ 0 ] === c . less _equal && smallComboValue [ 0 ] === c . less _equal ? smallValue > bigValue ? ( self . element . addClass ( "number-error" ) , o . validation = "invalid" , c . numberError ) : ( self . element . removeClass ( "number-error" ) , o . validation = "valid" , "" ) : smallValue > bigValue ? ( self . element . addClass ( "number-error" ) , o . validation = "invalid" , c . numberError ) : smallValue === bigValue ? ( self . element . addClass ( "number-error" ) , o . validation = "invalid" , c . signalError ) : ( self . element . removeClass ( "number-error" ) , o . validation = "valid" , "" ) } , _setTitle : function ( v ) { this . label . setTitle ( v ) } , _setFocusEvent : function ( w ) { var self = this , c = this . constants ; w . on ( BI . NumberIntervalSingleEidtor . EVENT _FOCUS , function ( ) { switch ( self . _setTitle ( "" ) , self . _checkValidation ( ) ) { case c . typeError : BI . Bubbles . show ( c . typeError , BI . i18nText ( "BI-Numerical_Interval_Input_Data" ) , self , { of
} ) , BI . isNotNull ( o . value ) && this . setState ( o . value ) } , adjustView : function ( ) { this . searcher . adjustView ( ) } , isSearching : function ( ) { return this . searcher . isSearching ( ) } , stopSearch : function ( ) { this . searcher . stopSearch ( ) } , getKeyword : function ( ) { return this . editor . getValue ( ) } , hasMatched : function ( ) { return this . searcher . hasMatched ( ) } , hasChecked : function ( ) { return this . searcher . getView ( ) && this . searcher . getView ( ) . hasChecked ( ) } , setAdapter : function ( adapter ) { this . searcher . setAdapter ( adapter ) } , setState : function ( obj ) { var o = this . options , ob = { } ; if ( ob . type = obj . type , ob . value = o . allValueGetter ( ) || [ ] , ob . assist = obj . assist , ob . type === BI . Selection . All ) if ( 0 === ob . value . length ) this . editor . setState ( BI . Selection . All ) ; else if ( BI . size ( ob . assist ) <= 20 ) { var state = "" ; BI . each ( ob . assist , function ( i , v ) { state += 0 === i ? "" + ( o . valueFormatter ( v + "" ) || v ) : "," + ( o . valueFormatter ( v + "" ) || v ) } ) , this . editor . setState ( state ) } else this . editor . setState ( BI . Selection . Multi ) ; else if ( 0 === ob . value . length ) this . editor . setState ( BI . Selection . None ) ; else if ( BI . size ( ob . value ) <= 20 ) { var state = "" ; BI . each ( ob . value , function ( i , v ) { state += 0 === i ? "" + ( o . valueFormatter ( v + "" ) || v ) : "," + ( o . valueFormatter ( v + "" ) || v ) } ) , this . editor . setState ( state ) } else this . editor . setState ( BI . Selection . Multi ) } , setTipType : function ( v ) { this . editor . setTipType ( v ) } , setValue : function ( ob ) { this . setState ( ob ) , this . searcher . setValue ( ob ) } , getKey : function ( ) { return this . editor . getValue ( ) } , getValue : function ( ) { return this . searcher . getValue ( ) } , populate : function ( items ) { this . searcher . populate . apply ( this . searcher , arguments ) } } ) , BI . SearchMultiSelectSearcher . EVENT _BEFORE _POPUPVIEW = "EVENT_BEFORE_POPUPVIEW" , BI . SearchMultiSelectSearcher . EVENT _CHANGE = "EVENT_CHANGE" , BI . SearchMultiSelectSearcher . EVENT _START = "EVENT_START" , BI . SearchMultiSelectSearcher . EVENT _STOP = "EVENT_STOP" , BI . SearchMultiSelectSearcher . EVENT _PAUSE = "EVENT_PAUSE" , BI . SearchMultiSelectSearcher . EVENT _SEARCHING = "EVENT_SEARCHING" , BI . shortcut ( "bi.search_multi_select_searcher" , BI . SearchMultiSelectSearcher ) , BI . SelectTreeFirstPlusGroupNode = BI . inherit ( BI . NodeButton , { _defaultConfig : function ( ) { var conf = BI . SelectTreeFirstPlusGroupNode . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { baseCls : ( conf . baseCls || "" ) + " bi-select-tree-first-plus-group-node bi-list-item-active" , logic : { dynamic : ! 1 } , id : "" , pId : "" , readonly : ! 0 , open : ! 1 , height : 24 } ) } , _init : function ( ) { BI . SelectTreeFirstPlusGroupNode . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . checkbox = BI . createWidget ( { type : "bi.first_tree_node_checkbox" , stopPropagation : ! 0 } ) , this . text = BI . createWidget ( { type : "bi.label" , textAlign : "left" , whiteSpace : "nowrap" , textHeight : o . height , height : o . height , hgap : o . hgap , text : o . text , value : o . value , keyword : o . keyword , py : o . py } ) , this . checkbox . on ( BI . Controller . EVENT _CHANGE , function ( type ) { type === BI . Events . CLICK && ( this . isSelected ( ) ? self . triggerExpand ( ) : self . triggerCollapse ( ) ) } ) ; var type = BI . LogicFactory . createLogicTypeByDirection ( BI . Direction . Left ) , items = BI . LogicFactory . createLogicItemsByDirection ( BI . Direction . Left , { width : 24 , el : this . checkbox } , this . text ) ; BI . createWidget ( BI . extend ( { element : this } , BI . LogicFactory . createLogic ( type , BI . extend ( o . logic , { items : items } ) ) ) ) } , isOnce : function ( ) { return ! 0 } , doRedMark : function ( ) { this . text . doRedMark . apply ( this . text , arguments ) } , unRedMark : function ( ) { this . text . unRedMark . apply ( this . text , arguments ) } , doClick : function ( ) { BI . NodeButton . superclass . doClick . apply ( this , arguments ) } , setOpened : function ( v ) { BI . SelectTreeFirstPlusGroupNode . superclass . setOpened . apply ( this , arguments ) , BI . isNotNull ( this . checkbox ) && this . checkbox . setSelected ( v ) } } ) , BI . shortcut ( "bi.select_tree_first_plus_group_node" , BI . SelectTreeFirstPlusGroupNode ) , BI . SelectTreeLastPlusGroupNode = BI . inherit ( BI . NodeButton , { _defaultConfig : function ( ) { var conf = BI . SelectTreeLastPlusGroupNode . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { baseCls : ( conf . baseCls || "" ) + " bi-select-tree-last-plus-group-node bi-list-item-active" , logic : { dynamic : ! 1 } , id : "" , pId : "" , readonly : ! 0 , open : ! 1 , height : 24 } ) } , _init : function ( ) { BI . SelectTreeLastPlusGroupNode . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . checkbox = BI . createWidget ( {
logic : { dynamic : ! 1 } , height : 24 } ) } , _init : function ( ) { BI . SingleSelectComboItem . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . radio = BI . createWidget ( { type : "bi.radio" } ) , this . text = BI . createWidget ( { type : "bi.label" , cls : "list-item-text" , textAlign : "left" , whiteSpace : "nowrap" , textHeight : o . height , height : o . height , hgap : o . hgap , text : o . text , keyword : o . keyword , value : o . value , py : o . py } ) , BI . createWidget ( BI . extend ( { element : this } , BI . LogicFactory . createLogic ( "horizontal" , BI . extend ( o . logic , { items : BI . LogicFactory . createLogicItemsByDirection ( "left" , { type : "bi.center_adapt" , items : [ this . radio ] , width : 26 } , this . text ) } ) ) ) ) } , doRedMark : function ( ) { this . text . doRedMark . apply ( this . text , arguments ) } , unRedMark : function ( ) { this . text . unRedMark . apply ( this . text , arguments ) } , doClick : function ( ) { BI . SingleSelectComboItem . superclass . doClick . apply ( this , arguments ) , this . radio . setSelected ( this . isSelected ( ) ) , this . isValid ( ) && this . fireEvent ( BI . SingleSelectComboItem . EVENT _CHANGE , this . isSelected ( ) , this ) } , setSelected : function ( v ) { BI . SingleSelectComboItem . superclass . setSelected . apply ( this , arguments ) , this . radio . setSelected ( v ) } } ) , BI . SingleSelectComboItem . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.single_select_combo_item" , BI . SingleSelectComboItem ) , BI . SingleSelectList = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . SingleSelectList . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-select-list" , direction : BI . Direction . Top , logic : { dynamic : ! 0 } , items : [ ] , itemsCreator : BI . emptyFn , hasNext : BI . emptyFn , onLoaded : BI . emptyFn , el : { type : "bi.list_pane" } , allowNoSelect : ! 1 } ) } , _init : function ( ) { BI . SingleSelectList . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . list = BI . createWidget ( o . el , { type : "bi.list_pane" , items : o . items , itemsCreator : function ( op , callback ) { 1 === op . times && self . toolbar && self . toolbar . setVisible ( ! 1 ) , o . itemsCreator ( op , function ( items ) { callback . apply ( self , arguments ) , 1 === op . times && ( self . toolbar && self . toolbar . setVisible ( items && items . length > 0 ) , self . toolbar && self . toolbar . setEnable ( items && items . length > 0 ) ) } ) } , onLoaded : o . onLoaded , hasNext : o . hasNext , value : o . value } ) , this . list . on ( BI . Controller . EVENT _CHANGE , function ( type , value , obj ) { type === BI . Events . CLICK && self . fireEvent ( BI . SingleSelectList . EVENT _CHANGE , value , obj ) , self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) , BI . createWidget ( BI . extend ( { element : this } , BI . LogicFactory . createLogic ( BI . LogicFactory . createLogicTypeByDirection ( o . direction ) , BI . extend ( { scrolly : ! 0 } , o . logic , { items : o . allowNoSelect ? BI . LogicFactory . createLogicItemsByDirection ( o . direction , { type : "bi.single_select_item" , cls : "bi-list-item-active" , height : 24 , forceNotSelected : ! 0 , text : BI . i18nText ( "BI-Basic_No_Select" ) , ref : function ( _ref ) { self . toolbar = _ref } , listeners : [ { eventName : BI . Controller . EVENT _CHANGE , action : function ( type ) { type === BI . Events . CLICK && ( self . list . setValue ( ) , self . fireEvent ( BI . SingleSelectList . EVENT _CHANGE ) ) , self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } } ] } , this . list ) : BI . LogicFactory . createLogicItemsByDirection ( o . direction , this . list ) } ) ) ) ) } , hasPrev : function ( ) { return this . list . hasPrev ( ) } , hasNext : function ( ) { return this . list . hasNext ( ) } , prependItems : function ( items ) { this . list . prependItems . apply ( this . list , arguments ) } , addItems : function ( items ) { this . list . addItems . apply ( this . list , arguments ) } , setValue : function ( v ) { this . list . setValue ( [ v ] ) } , getValue : function ( ) { return this . list . getValue ( ) [ 0 ] } , empty : function ( ) { this . list . empty ( ) } , populate : function ( items ) { this . list . populate . apply ( this . list , arguments ) } , resetHeight : function ( h ) { this . list . resetHeight ? this . list . resetHeight ( h ) : this . list . element . css ( { "max-height" : h + "px" } ) } , setNotSelectedValue : function ( ) { this . list . setNotSelectedValue . apply ( this . list , arguments ) } , getNotSelectedValue : function ( ) { return this . list . getNotSelectedValue ( ) } , getAllButtons : function ( ) { return this . list . getAllButtons ( ) } , getAllLeaves : function ( ) { return this . list . getAllLeaves ( ) } , getSelectedButtons : function ( ) { return this . list . getSelectedButtons ( ) } , getNotSelectedButtons : function ( ) { return this . list . getNotSelectedButtons ( ) } , getIndexByValue : function ( value ) { return this . list . getIndexByValue ( value ) } , getNodeById : function ( id ) { return this . li
this . track = this . _createTrackWrapper ( ) , this . slider = BI . createWidget ( { type : "bi.single_slider_button" } ) , this . _draggable ( this . slider ) ; var sliderVertical = BI . createWidget ( { type : "bi.vertical" , items : [ { type : "bi.absolute" , items : [ this . slider ] } ] , hgap : c . SLIDER _WIDTH _HALF , height : c . SLIDER _HEIGHT } ) ; sliderVertical . element . click ( function ( e ) { if ( self . enable && self . isEnabled ( ) && sliderVertical . element [ 0 ] === e . originalEvent . target ) { var offset = e . clientX - self . element . offset ( ) . left - c . SLIDER _WIDTH _HALF , trackLength = self . track . element [ 0 ] . scrollWidth - c . TRACK _GAP , percent = 0 ; offset < 0 && ( percent = 0 ) , offset > 0 && offset < trackLength && ( percent = 100 * offset / self . _getGrayTrackLength ( ) ) , offset >= trackLength && ( percent = 100 ) ; var significantPercent = BI . parseFloat ( percent . toFixed ( 1 ) ) ; self . _setAllPosition ( significantPercent ) ; var v = self . _getValueByPercent ( significantPercent ) ; v = o . digit === ! 1 ? v : v . toFixed ( o . digit ) , self . label . setText ( v + o . unit ) , self . value = v , self . fireEvent ( BI . SingleSliderLabel . EVENT _CHANGE ) } } ) , this . label = BI . createWidget ( { type : "bi.label" , height : c . HEIGHT , width : c . EDITOR _WIDTH - 2 } ) , this . _setVisible ( ! 1 ) , BI . createWidget ( { type : "bi.absolute" , element : this , items : [ { el : { type : "bi.vertical" , items : [ { type : "bi.absolute" , items : [ { el : this . track , width : "100%" , height : c . TRACK _HEIGHT } ] } ] , hgap : c . TRACK _GAP _HALF , height : c . TRACK _HEIGHT } , top : 13 , left : 0 , width : "100%" } , { el : sliderVertical , top : 10 , left : 0 , width : "100%" } , { el : { type : "bi.vertical" , items : [ { type : "bi.horizontal_auto" , items : [ this . label ] } ] , height : c . EDITOR _HEIGHT } , top : 0 , left : 0 , width : "100%" } ] } ) } , _draggable : function ( widget ) { function optimizeSize ( s ) { return BI . clamp ( s , 0 , self . _getGrayTrackLength ( ) ) } var self = this , o = this . options , startDrag = ! 1 , size = 0 , offset = 0 , defaultSize = 0 , mouseMoveTracker = new BI . MouseMoveTracker ( function ( deltaX ) { if ( mouseMoveTracker . isDragging ( ) ) { startDrag = ! 0 , offset += deltaX , size = optimizeSize ( defaultSize + offset ) , widget . element . addClass ( "dragging" ) ; var percent = 100 * size / self . _getGrayTrackLength ( ) , significantPercent = BI . parseFloat ( percent . toFixed ( 1 ) ) ; self . _setBlueTrack ( significantPercent ) , self . _setLabelPosition ( significantPercent ) , self . _setSliderPosition ( significantPercent ) ; var v = self . _getValueByPercent ( significantPercent ) ; v = o . digit === ! 1 ? v : v . toFixed ( o . digit ) , self . label . setValue ( v + o . unit ) , self . value = v , self . fireEvent ( BI . SingleSliderLabel . EVENT _CHANGE ) } } , function ( ) { if ( startDrag === ! 0 ) { size = optimizeSize ( size ) ; var percent = 100 * size / self . _getGrayTrackLength ( ) , significantPercent = BI . parseFloat ( percent . toFixed ( 1 ) ) ; self . _setSliderPosition ( significantPercent ) , size = 0 , offset = 0 , defaultSize = size , startDrag = ! 1 } widget . element . removeClass ( "dragging" ) , mouseMoveTracker . releaseMouseMoves ( ) , self . fireEvent ( BI . SingleSliderLabel . EVENT _CHANGE ) } , window ) ; widget . element . on ( "mousedown" , function ( event ) { widget . isEnabled ( ) && ( defaultSize = this . offsetLeft , optimizeSize ( defaultSize ) , mouseMoveTracker . captureMouseMoves ( event ) ) } ) } , _createTrackWrapper : function ( ) { return BI . createWidget ( { type : "bi.absolute" , items : [ { el : { type : "bi.vertical" , items : [ { type : "bi.absolute" , items : [ { el : this . grayTrack , top : 0 , left : 0 , width : "100%" } , { el : this . blueTrack , top : 0 , left : 0 , width : "0%" } ] } ] , hgap : 8 , height : 8 } , top : 8 , left : 0 , width : "100%" } ] } ) } , _checkValidation : function ( v ) { return BI . isNumeric ( v ) && ! ( BI . isNull ( v ) || v < this . min || v > this . max ) } , _setBlueTrack : function ( percent ) { this . blueTrack . element . css ( { width : percent + "%" } ) } , _setLabelPosition : function ( percent ) { } , _setSliderPosition : function ( percent ) { this . slider . element . css ( { left : percent + "%" } ) } , _setAllPosition : function ( percent ) { this . _setSliderPosition ( percent ) , this . _setLabelPosition ( percent ) , this . _setBlueTrack ( percent ) } , _setVisible : function ( visible ) { this . slider . setVisible ( visible ) , this . label . setVisible ( visible ) } , _getGrayTrackLength : function ( ) { return this . grayTrack . element [ 0 ] . scrollWidth } , _getValueByPercent : function ( percent ) { var thousandth = BI . parseInt ( 10 * percent ) ; return ( this . max - this . min ) * thousandth / 1e3 + this . min } , _getPercentByValue : function ( v ) { return 100 * ( v - this . min ) / ( this . max - this . min ) } , _setEnable : function ( b ) { BI . SingleSliderLabel . superclass . _setEnable . apply ( this , [ b ] ) , b ? this . blueTrack . element . removeClass ( "disabled-blue-track" ) . addClass ( "blue-track" ) : this . blueTrack . element . removeClass ( " blue - tr
BI . Bubbles . hide ( "error" ) ; var smallDate = self . left . getKey ( ) , bigDate = self . right . getKey ( ) ; self . left . isValid ( ) && self . right . isValid ( ) && self . _check ( smallDate , bigDate ) && self . _compare ( smallDate , bigDate ) ? ( self . _setTitle ( BI . i18nText ( "BI-Time_Interval_Error_Text" ) ) , self . element . addClass ( self . constants . timeErrorCls ) , BI . Bubbles . show ( "error" , BI . i18nText ( "BI-Time_Interval_Error_Text" ) , self , { offsetStyle : "center" } ) , self . fireEvent ( BI . TimeInterval . EVENT _ERROR ) ) : ( self . _clearTitle ( ) , self . element . removeClass ( self . constants . timeErrorCls ) ) } ) , combo . on ( BI . DynamicDateTimeCombo . EVENT _CONFIRM , function ( ) { BI . Bubbles . hide ( "error" ) ; var smallDate = self . left . getKey ( ) , bigDate = self . right . getKey ( ) ; self . left . isValid ( ) && self . right . isValid ( ) && self . _check ( smallDate , bigDate ) && self . _compare ( smallDate , bigDate ) ? ( self . _setTitle ( BI . i18nText ( "BI-Time_Interval_Error_Text" ) ) , self . element . addClass ( self . constants . timeErrorCls ) , self . fireEvent ( BI . TimeInterval . EVENT _ERROR ) ) : ( self . _clearTitle ( ) , self . element . removeClass ( self . constants . timeErrorCls ) , self . fireEvent ( BI . TimeInterval . EVENT _CHANGE ) ) } ) , combo } , _dateCheck : function ( date ) { return BI . print ( BI . parseDateTime ( date , "%Y-%x-%d %H:%M:%S" ) , "%Y-%x-%d %H:%M:%S" ) === date || BI . print ( BI . parseDateTime ( date , "%Y-%X-%d %H:%M:%S" ) , "%Y-%X-%d %H:%M:%S" ) === date || BI . print ( BI . parseDateTime ( date , "%Y-%x-%e %H:%M:%S" ) , "%Y-%x-%e %H:%M:%S" ) === date || BI . print ( BI . parseDateTime ( date , "%Y-%X-%e %H:%M:%S" ) , "%Y-%X-%e %H:%M:%S" ) === date } , _checkVoid : function ( obj ) { var o = this . options ; return ! BI . checkDateVoid ( obj . year , obj . month , obj . day , o . minDate , o . maxDate ) [ 0 ] } , _check : function ( smallDate , bigDate ) { var smallObj = smallDate . match ( /\d+/g ) , bigObj = bigDate . match ( /\d+/g ) ; return this . _dateCheck ( smallDate ) && BI . checkDateLegal ( smallDate ) && this . _checkVoid ( { year : smallObj [ 0 ] , month : smallObj [ 1 ] , day : smallObj [ 2 ] } ) && this . _dateCheck ( bigDate ) && BI . checkDateLegal ( bigDate ) && this . _checkVoid ( { year : bigObj [ 0 ] , month : bigObj [ 1 ] , day : bigObj [ 2 ] } ) } , _compare : function ( smallDate , bigDate ) { return smallDate = BI . print ( BI . parseDateTime ( smallDate , "%Y-%X-%d %H:%M:%S" ) , "%Y-%X-%d %H:%M:%S" ) , bigDate = BI . print ( BI . parseDateTime ( bigDate , "%Y-%X-%d %H:%M:%S" ) , "%Y-%X-%d %H:%M:%S" ) , BI . isNotNull ( smallDate ) && BI . isNotNull ( bigDate ) && smallDate > bigDate } , _setTitle : function ( v ) { this . left . setTitle ( v ) , this . right . setTitle ( v ) , this . label . setTitle ( v ) } , _clearTitle : function ( ) { this . left . setTitle ( "" ) , this . right . setTitle ( "" ) , this . label . setTitle ( "" ) } , setValue : function ( date ) { date = date || { } , this . left . setValue ( date . start ) , this . right . setValue ( date . end ) } , getValue : function ( ) { return { start : this . left . getValue ( ) , end : this . right . getValue ( ) } } } ) , BI . TimeInterval . EVENT _VALID = "EVENT_VALID" , BI . TimeInterval . EVENT _ERROR = "EVENT_ERROR" , BI . TimeInterval . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.time_interval" , BI . TimeInterval ) , ! function ( ) { BI . TimePeriods = BI . inherit ( BI . Single , { constants : { height : 24 , width : 24 , lgap : 15 , offset : 0 } , props : { extraCls : "bi-time-interval" , value : { } } , render : function ( ) { var self = this , o = this . options ; return { type : "bi.absolute" , height : this . constants . height , items : [ { el : { type : "bi.horizontal_auto" , items : [ { type : "bi.label" , height : this . constants . height , width : this . constants . width , text : "-" , ref : function ( _ref ) { self . label = _ref } } ] } , top : 0 , left : 0 , right : 0 , bottom : 0 } , { el : { type : "bi.center" , height : this . constants . height , items : [ { type : "bi.absolute" , items : [ { el : BI . extend ( { ref : function ( _ref ) { self . left = _ref } } , this . _createCombo ( o . value . start ) ) , left : this . constants . offset , right : this . constants . width / 2 , top : 0 , bottom : 0 } ] } , { type : "bi.absolute" , items : [ { el : BI . extend ( { ref : function ( _ref ) { self . right = _ref } } , this . _createCombo ( o . value . end ) ) , left : this . constants . width / 2 , right : this . constants . offset , top : 0 , bottom : 0 } ] } ] } , top : 0 , left : 0 , right : 0 , bottom : 0 } ] } } , _createCombo : function ( v ) { var self = this ; return { type : "bi.time_combo" , value : v , listeners : [ { eventName : BI . TimeCombo . EVENT _BEFORE _POPUPVIEW , action : function ( ) { self . left . hidePopupView ( ) , self . right . hidePopupView ( ) } } , { eventName : BI . TimeCombo . EVENT _CHANGE , action : function ( ) { self . fireEvent ( BI . TimePeriods . EVENT _CHANGE ) } } , { eventName : BI . TimeCombo . EVENT _CONFIRM , action : function ( ) { self . fireEvent ( BI . TimePeriods . EVENT _CONFIRM ) } } ] } } , setValue : function ( date ) { date = date || { } , this . left . setVal
min : "1900-01-01" , max : "2099-12-31" , height : 22 } , beforeInit : function ( callback ) { var o = this . options ; o . title = BI . bind ( this . _titleCreator , this ) , callback ( ) } , _init : function ( ) { BI . DynamicYearMonthTrigger . superclass . _init . apply ( this , arguments ) ; var o = this . options ; this . yearEditor = this . _createEditor ( ! 0 ) , this . monthEditor = this . _createEditor ( ! 1 ) , BI . createWidget ( { element : this , type : "bi.htape" , items : [ { type : "bi.center" , items : [ { type : "bi.htape" , items : [ this . yearEditor , { el : { type : "bi.text_button" , text : BI . i18nText ( "BI-Multi_Date_Year" ) , width : o . height } , width : o . height } ] } , { type : "bi.htape" , items : [ this . monthEditor , { el : { type : "bi.text_button" , text : BI . i18nText ( "BI-Multi_Date_Month" ) , width : o . height } , width : o . height } ] } ] } , { el : { type : "bi.trigger_icon_button" , width : o . height } , width : o . height } ] } ) , this . setValue ( o . value ) } , _createEditor : function ( isYear ) { var self = this , o = this . options , c = this . _const , minDate = BI . parseDateTime ( o . min , "%Y-%X-%d" ) , editor = BI . createWidget ( { type : "bi.sign_editor" , height : o . height , validationChecker : function ( v ) { return isYear ? "" === v || BI . isPositiveInteger ( v ) && ! BI . checkDateVoid ( v , v === minDate . getFullYear ( ) ? minDate . getMonth ( ) + 1 : 1 , 1 , o . min , o . max ) [ 0 ] : "" === v || BI . isPositiveInteger ( v ) && v >= 1 && v <= 12 && ! BI . checkDateVoid ( BI . getDate ( ) . getFullYear ( ) , v , 1 , o . min , o . max ) [ 0 ] } , quitChecker : function ( ) { return ! 1 } , watermark : BI . i18nText ( "BI-Basic_Unrestricted" ) , errorText : function ( v ) { return BI . i18nText ( "BI-Year_Trigger_Invalid_Text" ) } , hgap : c . hgap , vgap : c . vgap , allowBlank : ! 0 } ) ; return editor . on ( BI . SignEditor . EVENT _KEY _DOWN , function ( ) { self . fireEvent ( BI . DynamicYearMonthTrigger . EVENT _KEY _DOWN ) } ) , editor . on ( BI . SignEditor . EVENT _FOCUS , function ( ) { self . fireEvent ( BI . DynamicYearMonthTrigger . EVENT _FOCUS ) } ) , editor . on ( BI . SignEditor . EVENT _STOP , function ( ) { self . fireEvent ( BI . DynamicYearMonthTrigger . EVENT _STOP ) } ) , editor . on ( BI . SignEditor . EVENT _CONFIRM , function ( ) { self . _doEditorConfirm ( editor ) , self . fireEvent ( BI . DynamicYearMonthTrigger . EVENT _CONFIRM ) } ) , editor . on ( BI . SignEditor . EVENT _SPACE , function ( ) { editor . isValid ( ) && editor . blur ( ) } ) , editor . on ( BI . SignEditor . EVENT _START , function ( ) { self . fireEvent ( BI . DynamicYearMonthTrigger . EVENT _START ) } ) , editor . on ( BI . SignEditor . EVENT _ERROR , function ( ) { self . fireEvent ( BI . DynamicYearMonthTrigger . EVENT _ERROR ) } ) , editor . on ( BI . SignEditor . EVENT _VALID , function ( ) { var year = self . yearEditor . getValue ( ) , month = self . monthEditor . getValue ( ) ; BI . isNotEmptyString ( year ) && BI . isNotEmptyString ( month ) && BI . isPositiveInteger ( year ) && month >= 1 && month <= 12 && ! BI . checkDateVoid ( year , month , 1 , o . min , o . max ) [ 0 ] && self . fireEvent ( BI . DynamicYearMonthTrigger . EVENT _VALID ) } ) , editor . on ( BI . SignEditor . EVENT _CHANGE , function ( ) { isYear && self . _autoSwitch ( editor ) } ) , editor } , _titleCreator : function ( ) { var storeValue = this . storeValue || { } , type = storeValue . type || BI . DynamicDateCombo . Static , value = storeValue . value ; if ( ! this . monthEditor . isValid ( ) || ! this . yearEditor . isValid ( ) ) return "" ; switch ( type ) { case BI . DynamicDateCombo . Dynamic : var text = this . _getText ( value ) , date = BI . getDate ( ) ; date = BI . DynamicDateHelper . getCalculation ( value ) ; var dateStr = BI . print ( date , "%Y-%x" ) ; return BI . isEmptyString ( text ) ? dateStr : text + ":" + dateStr ; case BI . DynamicDateCombo . Static : default : return value = value || { } , this . _getStaticTitle ( value ) } } , _doEditorConfirm : function ( editor ) { var value = editor . getValue ( ) ; BI . isNotNull ( value ) && editor . setValue ( value ) ; var monthValue = this . monthEditor . getValue ( ) ; this . storeValue = { type : BI . DynamicDateCombo . Static , value : { year : this . yearEditor . getValue ( ) , month : BI . isEmptyString ( this . monthEditor . getValue ( ) ) ? "" : monthValue } } } , _yearCheck : function ( v ) { var date = BI . print ( BI . parseDateTime ( v , "%Y-%X-%d" ) , "%Y-%X-%d" ) ; return BI . print ( BI . parseDateTime ( v , "%Y" ) , "%Y" ) === v && date >= this . options . min && date <= this . options . max } , _autoSwitch : function ( editor ) { var v = editor . getValue ( ) ; BI . isNotEmptyString ( v ) && BI . checkDateLegal ( v ) && 4 === v . length && this . _yearCheck ( v ) && ( this . _doEditorConfirm ( editor ) , this . fireEvent ( BI . DynamicYearMonthTrigger . EVENT _CONFIRM ) , this . monthEditor . focus ( ) ) } , _getText : function ( obj ) { var value = "" ; return BI . isNotNull ( obj . year ) && 0 !== BI . parseInt ( obj . year ) && ( value += Math . abs ( obj . year ) + BI . i18nText ( "BI-Basic_Year" ) + ( obj . year < 0 ? BI . i18nText ( "BI-Basic_Front" ) : BI . i18nText ( "BI-Basic_Behind" ) ) ) , BI . isNo
case BI . TreeView . REQ _TYPE _INIT _DATA : self . _reqInitTreeNode ( options , callback ) ; break ; case BI . TreeView . REQ _TYPE _ADJUST _DATA : self . _reqAdjustTreeNode ( options , callback ) ; break ; case BI . TreeView . REQ _TYPE _SELECT _DATA : self . _reqSelectedTreeNode ( options , callback ) ; break ; case BI . TreeView . REQ _TYPE _GET _SELECTED _DATA : self . _reqDisplayTreeNode ( options , callback ) ; break ; default : self . _reqTreeNode ( options , callback ) } } var self = this , o = this . options ; this . items ? call ( ) : o . itemsCreator ( { } , function ( items ) { self . _initData ( items ) , call ( ) } ) } , _reqDisplayTreeNode : function ( op , callback ) { function doCheck ( parentValues , node , selected ) { return null == selected || BI . isEmpty ( selected ) ? void BI . each ( node . getChildren ( ) , function ( i , child ) { var newParents = BI . clone ( parentValues ) ; newParents . push ( child . value ) ; var llen = self . _getChildCount ( newParents ) ; createOneJson ( child , node . id , llen ) , doCheck ( newParents , child , { } ) } ) : void BI . each ( selected , function ( k ) { var node = self . _getTreeNode ( parentValues , k ) ; if ( BI . isNull ( node ) ) createOneJson ( { id : BI . UUID ( ) , text : k , value : k } , BI . UUID ( ) , 0 ) ; else { var newParents = BI . clone ( parentValues ) ; newParents . push ( node . value ) , createOneJson ( node , node . parent && node . parent . id , getCount ( selected [ k ] , newParents ) ) , doCheck ( newParents , node , selected [ k ] ) } } ) } function getCount ( jo , parentValues ) { return null == jo ? 0 : BI . isEmpty ( jo ) ? self . _getChildCount ( parentValues ) : BI . size ( jo ) } function createOneJson ( node , pId , llen ) { result . push ( { id : node . id , pId : pId , text : node . text + ( llen > 0 ? "(" + BI . i18nText ( "BI-Basic_Altogether" ) + llen + BI . i18nText ( "BI-Basic_Count" ) + ")" : "" ) , value : node . value , open : ! 0 } ) } var self = this , result = [ ] , selectedValues = op . selectedValues ; return null == selectedValues || BI . isEmpty ( selectedValues ) ? void callback ( { } ) : ( doCheck ( [ ] , this . tree . getRoot ( ) , selectedValues ) , void callback ( { items : result } ) ) } , _reqSelectedTreeNode : function ( op , callback ) { function dealWithSelectedValues ( selectedValues ) { var p = parentValues . concat ( notSelectedValue ) ; if ( canFindKey ( selectedValues , p ) ) if ( isSearchValueInParent ( p ) ) self . _deleteNode ( selectedValues , p ) ; else { var searched = [ ] , find = search ( parentValues , notSelectedValue , [ ] , searched ) ; find && BI . isNotEmptyArray ( searched ) && BI . each ( searched , function ( i , arr ) { var node = self . _getNode ( selectedValues , arr ) ; node ? self . _deleteNode ( selectedValues , arr ) : expandSelectedValue ( selectedValues , arr , BI . last ( arr ) ) } ) } if ( isChild ( selectedValues , p ) ) { var result = [ ] , find = ! 1 ; isSearchValueInParent ( p ) ? find = ! 0 : ( find = search ( parentValues , notSelectedValue , result ) , p = parentValues ) , find === ! 0 && ( expandSelectedValue ( selectedValues , p , notSelectedValue ) , result . length > 0 && BI . each ( result , function ( i , strs ) { self . _buildTree ( selectedValues , strs ) } ) ) } } function expandSelectedValue ( selectedValues , parents , notSelectedValue ) { var next = selectedValues , childrenCount = [ ] , path = [ ] ; BI . some ( parents , function ( i , v ) { var t = next [ v ] ; if ( null == t ) { if ( 0 === i ) return ! 0 ; if ( ! BI . isEmpty ( next ) ) return ! 0 ; var split = parents . slice ( 0 , i ) , expanded = self . _getChildren ( split ) ; if ( path . push ( split ) , childrenCount . push ( expanded . length ) , i === parents . length - 1 && 1 === expanded . length && expanded [ 0 ] . value === notSelectedValue ) for ( var j = childrenCount . length - 1 ; j >= 0 && 1 === childrenCount [ j ] ; j -- ) self . _deleteNode ( selectedValues , path [ j ] ) ; else BI . each ( expanded , function ( m , child ) { return i === parents . length - 1 && child . value === notSelectedValue || void ( next [ child . value ] = { } ) } ) ; next = next [ v ] } else next = t } ) } function search ( parents , current , result , searched ) { var newParents = BI . clone ( parents ) ; if ( newParents . push ( current ) , self . _isMatch ( parents , current , keyword ) ) return searched && searched . push ( newParents ) , ! 0 ; var children = self . _getChildren ( newParents ) , notSearch = [ ] , can = ! 1 ; return BI . each ( children , function ( i , child ) { search ( newParents , child . value , result , searched ) ? can = ! 0 : notSearch . push ( child . value ) } ) , can === ! 0 && BI . each ( notSearch , function ( i , v ) { var next = BI . clone ( newParents ) ; next . push ( v ) , result . push ( next ) } ) , can } function isSearchValueInParent ( parentValues ) { for ( var i = 0 , len = parentValues . length ; i < len ; i ++ ) if ( self . _isMatch ( parentValues . slice ( 0 , i ) , parentValues [ i ] , keyword ) ) return ! 0 ; return ! 1 } function canFindKey ( selectedValues , parents ) { for ( var t = selectedValues , i = 0 ; i < parents . length ; i ++ ) { var v = parents [ i ] ; if ( t = t [ v ] , null == t ) return ! 1 } return ! 0 } function isChild ( selectedValues , parent
action : function ( ) { self . fireEvent ( BI . ValueChooserCombo . EVENT _CONFIRM ) } } ] } ) } , setValue : function ( v ) { this . combo . setValue ( v ) } , getValue : function ( ) { var val = this . combo . getValue ( ) || { } ; return { type : val . type , value : val . value } } , populate : function ( items ) { this . items = items , this . combo . populate . apply ( this , arguments ) } } ) , BI . ValueChooserCombo . EVENT _BLUR = "EVENT_BLUR" , BI . ValueChooserCombo . EVENT _FOCUS = "EVENT_FOCUS" , BI . ValueChooserCombo . EVENT _STOP = "EVENT_STOP" , BI . ValueChooserCombo . EVENT _SEARCHING = "EVENT_SEARCHING" , BI . ValueChooserCombo . EVENT _CLICK _ITEM = "EVENT_CLICK_ITEM" , BI . ValueChooserCombo . EVENT _CONFIRM = "EVENT_CONFIRM" , BI . shortcut ( "bi.value_chooser_combo" , BI . ValueChooserCombo ) , BI . ValueChooserPane = BI . inherit ( BI . AbstractValueChooser , { _defaultConfig : function ( ) { return BI . extend ( BI . ValueChooserPane . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-value-chooser-pane" , items : null , itemsCreator : BI . emptyFn , cache : ! 0 } ) } , _init : function ( ) { BI . ValueChooserPane . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . list = BI . createWidget ( { type : "bi.multi_select_list" , element : this , value : o . value , itemsCreator : BI . bind ( this . _itemsCreator , this ) , valueFormatter : BI . bind ( this . _valueFormatter , this ) } ) , this . list . on ( BI . MultiSelectList . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . ValueChooserPane . EVENT _CHANGE ) } ) , BI . isNotNull ( o . items ) && ( this . items = o . items , this . list . populate ( ) ) } , setValue : function ( v ) { this . list . setValue ( v ) } , getValue : function ( ) { var val = this . list . getValue ( ) || { } ; return { type : val . type , value : val . value } } , populate : function ( items ) { items && ( this . items = items ) , this . list . populate . apply ( this . list , arguments ) } } ) , BI . ValueChooserPane . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.value_chooser_pane" , BI . ValueChooserPane ) , function ( ) { var Events = { on : function ( name , callback , context ) { if ( ! eventsApi ( this , "on" , name , [ callback , context ] ) || ! callback ) return this ; this . _events || ( this . _events = { } ) ; var events = this . _events [ name ] || ( this . _events [ name ] = [ ] ) ; return events . push ( { callback : callback , context : context , ctx : context || this } ) , this } , once : function ( name , callback , context ) { if ( ! eventsApi ( this , "once" , name , [ callback , context ] ) || ! callback ) return this ; var self = this , once = _ . once ( function ( ) { self . off ( name , once ) , callback . apply ( this , arguments ) } ) ; return once . _callback = callback , this . on ( name , once , context ) } , off : function ( name , callback , context ) { if ( ! this . _events || ! eventsApi ( this , "off" , name , [ callback , context ] ) ) return this ; if ( ! name && ! callback && ! context ) return this . _events = void 0 , this ; for ( var names = name ? [ name ] : _ . keys ( this . _events ) , i = 0 , length = names . length ; i < length ; i ++ ) { name = names [ i ] ; var events = this . _events [ name ] ; if ( events ) if ( callback || context ) { for ( var remaining = [ ] , j = 0 , k = events . length ; j < k ; j ++ ) { var event = events [ j ] ; ( callback && callback !== event . callback && callback !== event . callback . _callback || context && context !== event . context ) && remaining . push ( event ) } remaining . length ? this . _events [ name ] = remaining : delete this . _events [ name ] } else delete this . _events [ name ] } return this } , un : function ( ) { this . off . apply ( this , arguments ) } , trigger : function ( name ) { if ( ! this . _events ) return this ; var args = slice . call ( arguments , 1 ) ; if ( ! eventsApi ( this , "trigger" , name , args ) ) return this ; var events = this . _events [ name ] , allEvents = this . _events . all ; return events && triggerEvents ( events , args ) , allEvents && triggerEvents ( allEvents , arguments ) , this } , fireEvent : function ( ) { this . trigger . apply ( this , arguments ) } , listenTo : function ( obj , name , callback ) { var listeningTo = this . _listeningTo || ( this . _listeningTo = { } ) , id = obj . _listenId || ( obj . _listenId = _ . uniqueId ( "l" ) ) ; return listeningTo [ id ] = obj , callback || "object" != typeof name || ( callback = this ) , obj . on ( name , callback , this ) , this } , listenToOnce : function ( obj , name , callback ) { if ( "object" == typeof name ) { for ( var event in name ) this . listenToOnce ( obj , event , name [ event ] ) ; return this } if ( eventSplitter . test ( name ) ) { for ( var names = name . split ( eventSplitter ) , i = 0 , length = names . length ; i < length ; i ++ ) this . listenToOnce ( obj , names [ i ] , callback ) ; return this } if ( ! callback ) return this ; var once = _ . once ( function ( ) { this . stopListening ( obj , name , once ) , callback . apply ( this , arguments ) } ) ; return once . _callback = callback , this . listenTo ( obj , name , once ) } , stopListening : function ( obj , name , callback ) { var listeni
! function ( n ) { var r = { } ; function o ( e ) { if ( r [ e ] ) return r [ e ] . exports ; var t = r [ e ] = { i : e , l : ! 1 , exports : { } } ; return n [ e ] . call ( t . exports , t , t . exports , o ) , t . l = ! 0 , t . exports } o . m = n , o . c = r , o . d = function ( e , t , n ) { o . o ( e , t ) || Object . defineProperty ( e , t , { enumerable : ! 0 , get : n } ) } , o . r = function ( e ) { "undefined" != typeof Symbol && Symbol . toStringTag && Object . defineProperty ( e , Symbol . toStringTag , { value : "Module" } ) , Object . defineProperty ( e , "__esModule" , { value : ! 0 } ) } , o . t = function ( t , e ) { if ( 1 & e && ( t = o ( t ) ) , 8 & e ) return t ; if ( 4 & e && "object" == typeof t && t && t . _ _esModule ) return t ; var n = Object . create ( null ) ; if ( o . r ( n ) , Object . defineProperty ( n , "default" , { enumerable : ! 0 , value : t } ) , 2 & e && "string" != typeof t ) for ( var r in t ) o . d ( n , r , function ( e ) { return t [ e ] } . bind ( null , r ) ) ; return n } , o . n = function ( e ) { var t = e && e . _ _esModule ? function ( ) { return e [ "default" ] } : function ( ) { return e } ; return o . d ( t , "a" , t ) , t } , o . o = function ( e , t ) { return Object . prototype . hasOwnProperty . call ( e , t ) } , o . p = "" , o ( o . s = 313 ) } ( { 313 : function ( e , t , n ) { e . exports = n ( 314 ) } , 314 : function ( e , t , n ) { "use strict" ; n . r ( t ) ; var r = { } ; function u ( e ) { if ( void 0 === e ) throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" ) ; return e } function i ( e , t , n ) { return t in e ? Object . defineProperty ( e , t , { value : n , enumerable : ! 0 , configurable : ! 0 , writable : ! 0 } ) : e [ t ] = n , e } function c ( e , t ) { e . prototype = Object . create ( t . prototype ) , function i ( e , t ) { for ( var n = Object . getOwnPropertyNames ( t ) , r = 0 ; r < n . length ; r ++ ) { var o = n [ r ] , u = Object . getOwnPropertyDescriptor ( t , o ) ; u && u . configurable && e [ o ] === undefined && Object . defineProperty ( e , o , u ) } return e } ( e . prototype . constructor = e , t ) } function o ( ) { return function ( e ) { BI . shortcut ( e . xtype , e ) } } function f ( ) { return function ( e ) { BI . model ( e . xtype , e ) } } function d ( n ) { var r = 1 < arguments . length && arguments [ 1 ] !== undefined ? arguments [ 1 ] : { } ; return function ( e ) { function t ( ) { return e . apply ( this , arguments ) || this } return c ( t , e ) , t . prototype . _store = function ( ) { var e = r . props ? r . props . apply ( this ) : undefined ; return BI . Models . getModel ( n . xtype , e ) } , t } } n . r ( r ) , n . d ( r , "shortcut" , function ( ) { return o } ) , n . d ( r , "model" , function ( ) { return f } ) , n . d ( r , "store" , function ( ) { return d } ) , n . d ( r , "Model" , function ( ) { return l } ) ; var l = function ( o ) { function e ( ) { for ( var e , t = arguments . length , n = new Array ( t ) , r = 0 ; r < t ; r ++ ) n [ r ] = arguments [ r ] ; return i ( u ( e = o . call . apply ( o , [ this ] . concat ( n ) ) || this ) , "model" , void 0 ) , i ( u ( e ) , "store" , void 0 ) , i ( u ( e ) , "context" , void 0 ) , i ( u ( e ) , "actions" , void 0 ) , i ( u ( e ) , "childContext" , void 0 ) , i ( u ( e ) , "TYPE" , void 0 ) , i ( u ( e ) , "computed" , void 0 ) , e } return c ( e , o ) , e . prototype . state = function ( ) { return { } } , e } ( Fix . Model ) , p = { Decorators : r } ; BI . extend ( BI , p ) } } ) ;