/*! fineui 2020-02-19 17:22:16 */
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 d = r ( 1 ) , y = r ( 7 ) , g = r ( 14 ) , m = r ( 11 ) , b = r ( 17 ) , w = "prototype" , S = function S ( t , n , r ) { var e , i , o , u , c = t & S . F , f = t & S . G , a = t & S . S , s = t & S . P , l = t & S . B , h = f ? d : a ? d [ n ] || ( d [ n ] = { } ) : ( d [ n ] || { } ) [ w ] , p = f ? y : y [ n ] || ( y [ n ] = { } ) , v = 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 , d ) : s && "function" == typeof o ? b ( Function . call , o ) : o , h && m ( h , e , o , t & S . U ) , p [ e ] != o && g ( p , e , u ) , s && v [ e ] != o && ( v [ e ] = o ) } ; d . core = y , S . F = 1 , S . G = 2 , S . S = 4 , S . P = 8 , S . B = 16 , S . W = 32 , S . U = 64 , S . R = 128 , t . exports = S } , 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 ) { 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 ) } t . exports = function ( t ) { return "object" === r ( 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 , f = function f ( 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 ( f ) , 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 ,
return typeof t } : function ( t ) { return t && "function" == typeof Symbol && t . constructor === Symbol && t !== Symbol . prototype ? "symbol" : typeof t } ) ( t ) } var i = r ( 15 ) , o = r ( 34 ) . f , u = { } . toString , c = "object" == ( "undefined" == typeof window ? "undefined" : e ( window ) ) && window && Object . getOwnPropertyNames ? Object . getOwnPropertyNames ( window ) : [ ] , f = function f ( t ) { try { return o ( t ) } catch ( n ) { return c . slice ( ) } } ; t . exports . f = function ( t ) { return c && "[object Window]" == u . call ( t ) ? f ( t ) : o ( i ( t ) ) } } , function ( t , n , r ) { "use strict" ; var h = r ( 8 ) , p = r ( 31 ) , v = r ( 50 ) , d = r ( 45 ) , y = r ( 10 ) , g = r ( 44 ) , i = Object . assign ; t . exports = ! i || r ( 2 ) ( function ( ) { var t = { } , n = { } , r = Symbol ( ) , e = "abcdefghijklmnopqrst" ; return t [ r ] = 7 , e . split ( "" ) . forEach ( function ( t ) { n [ t ] = t } ) , 7 != i ( { } , t ) [ r ] || Object . keys ( i ( { } , n ) ) . join ( "" ) != e } ) ? function ( t , n ) { for ( var r = y ( t ) , e = arguments . length , i = 1 , o = v . f , u = d . f ; i < e ; ) for ( var c , f = g ( arguments [ i ++ ] ) , a = o ? p ( f ) . concat ( o ( f ) ) : p ( f ) , s = a . length , l = 0 ; l < s ; ) c = a [ l ++ ] , h && ! u . call ( f , c ) || ( r [ c ] = f [ c ] ) ; return r } : i } , function ( t , n ) { t . exports = Object . is || function ( t , n ) { return t === n ? 0 !== t || 1 / t == 1 / n : t != t && n != n } } , function ( t , n , r ) { "use strict" ; var o = r ( 18 ) , u = r ( 4 ) , c = r ( 96 ) , f = [ ] . slice , a = { } , s = function s ( t , n , r ) { if ( ! ( n in a ) ) { for ( var e = [ ] , i = 0 ; i < n ; i ++ ) e [ i ] = "a[" + i + "]" ; a [ n ] = Function ( "F,a" , "return new F(" + e . join ( "," ) + ")" ) } return a [ n ] ( t , r ) } ; t . exports = Function . bind || function ( n ) { var r = o ( this ) , e = f . call ( arguments , 1 ) , i = function i ( ) { var t = e . concat ( f . call ( arguments ) ) ; return this instanceof i ? s ( r , t . length , t ) : c ( r , t , n ) } ; return u ( r . prototype ) && ( i . prototype = r . prototype ) , i } } , function ( t , n ) { 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 ) , v = e ( 42 ) , d = e ( 56 ) , y = e ( 47 ) , g = e ( 83 ) . set , m = e ( 236 ) ( ) , b = e ( 111 ) , w = e ( 237 ) , S = e ( 57 ) , x = e ( 112 ) , _ = "Promise" , E = f . TypeError , O = f . process , P = O && O . versions , F = P && P . v8 || "" , M = f [ _ ] , j = "process" == s ( O ) , A = function A ( ) { } , I = i = b . f
reduceRight : function ( t ) { return i ( this , t , arguments . length , arguments [ 1 ] , ! 0 ) } } ) } , function ( t , n , r ) { "use strict" ; var e = r ( 0 ) , i = r ( 49 ) ( ! 1 ) , o = [ ] . indexOf , u = ! ! o && 1 / [ 1 ] . indexOf ( 1 , - 0 ) < 0 ; e ( e . P + e . F * ( u || ! r ( 16 ) ( o ) ) , "Array" , { indexOf : function ( t ) { return u ? o . apply ( this , arguments ) || 0 : i ( this , t , arguments [ 1 ] ) } } ) } , function ( t , n , r ) { "use strict" ; var e = r ( 0 ) , i = r ( 15 ) , o = r ( 19 ) , u = r ( 6 ) , c = [ ] . lastIndexOf , f = ! ! c && 1 / [ 1 ] . lastIndexOf ( 1 , - 0 ) < 0 ; e ( e . P + e . F * ( f || ! r ( 16 ) ( c ) ) , "Array" , { lastIndexOf : function ( t ) { if ( f ) return c . apply ( this , arguments ) || 0 ; var n = i ( this ) , r = u ( n . length ) , e = r - 1 ; for ( 1 < arguments . length && ( e = Math . min ( e , o ( arguments [ 1 ] ) ) ) , e < 0 && ( e = r + e ) ; 0 <= e ; e -- ) if ( e in n && n [ e ] === t ) return e || 0 ; return - 1 } } ) } , function ( t , n , r ) { var e = r ( 0 ) ; e ( e . P , "Array" , { copyWithin : r ( 106 ) } ) , r ( 36 ) ( "copyWithin" ) } , function ( t , n , r ) { var e = r ( 0 ) ; e ( e . P , "Array" , { fill : r ( 79 ) } ) , r ( 36 ) ( "fill" ) } , function ( t , n , r ) { "use strict" ; var e = r ( 0 ) , i = r ( 22 ) ( 5 ) , o = "find" , u = ! 0 ; o in [ ] && Array ( 1 ) [ o ] ( function ( ) { u = ! 1 } ) , e ( e . P + e . F * u , "Array" , { find : function ( t ) { return i ( this , t , 1 < arguments . length ? arguments [ 1 ] : void 0 ) } } ) , r ( 36 ) ( o ) } , function ( t , n , r ) { "use strict" ; var e = r ( 0 ) , i = r ( 22 ) ( 6 ) , o = "findIndex" , u = ! 0 ; o in [ ] && Array ( 1 ) [ o ] ( function ( ) { u = ! 1 } ) , e ( e . P + e . F * u , "Array" , { findIndex : function ( t ) { return i ( this , t , 1 < arguments . length ? arguments [ 1 ] : void 0 ) } } ) , r ( 36 ) ( o ) } , function ( t , n , r ) { r ( 41 ) ( "Array" ) } , function ( t , n , r ) { var e = r ( 1 ) , o = r ( 67 ) , i = r ( 9 ) . f , u = r ( 34 ) . f , c = r ( 74 ) , f = r ( 53 ) , a = e . RegExp , s = a , l = a . prototype , h = /a/g , p = /a/g , v = new a ( h ) !== h ; if ( r ( 8 ) && ( ! v || r ( 2 ) ( function ( ) { return p [ r ( 5 ) ( "match" ) ] = ! 1 , a ( h ) != h || a ( p ) == p || "/a/i" != a ( h , "i" ) } ) ) ) { a = function ( t , n ) { var r = this instanceof a , e = c ( t ) , i = void 0 === n ; return ! r && e && t . constructor === a && i ? t : o ( v ? new s ( e && ! i ? t . source : t , n ) : s ( ( e = t instanceof a ) ? t . source : t , e && i ? f . call ( t ) : n ) , r ? this : l , a ) } ; for ( var d = ( function d ( n ) { n in a || i ( a , n , { configurable : ! 0 , get : function ( ) { return s [ n ] } , set : function ( t ) { s [ n ] = t } } ) } ) , y = u ( s ) , g = 0 ; y . length > g ; ) d ( 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 f ( 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 ) , v = 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 v ( r , e ) ; for ( var i , o = r . unicode , u = [ ] , c = r . lastIndex = 0 ; null !== ( i = v ( 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 _ = r ( 3 ) , e = r ( 10 ) , E = r ( 6 ) , O = r ( 19 ) , P = r ( 82 ) , F = r ( 54 ) , M = Math . max , j = Math . min , h = Math . floor , p = /\$([$&`']|\d\d?|<[^>]*>)/g , v = /\$([$&`']|\d\d?)/g , A = function A ( t ) { return void 0 === t ? t : String ( t ) } ; r ( 55 ) ( "replace" , 2 , function ( i , o , w , S ) { function x ( o , u , c , f , a , t ) { var s = c + o . length , l = f . length , n = v ; return void 0 !== a && ( a = e ( a ) , n = p ) , w . 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 ) : w . call ( String ( r ) , t , n ) } , function ( t , n ) { var r = S ( w , t , this , n ) ; if ( r . done ) return r . value ; var e = _ ( t ) , i = String ( this ) , o = "function" == typeof n ; o || ( n = String ( n ) ) ; var u = e . global ; if ( u ) { var c = e . unicode ; e . lastIndex = 0 } for ( var f = [ ] ; ; ) { var a = F ( e , i ) ; if ( null === a ) break ; if ( f . push ( a ) , ! u ) break ; "" === String ( a [ 0 ] ) && ( e . lastIndex = P ( i , E ( e . lastIndex ) , c ) ) } for ( var s = "" , l = 0 , h = 0 ; h < f . length ; h ++ ) { a = f [ h ] ; for ( var p = String ( a [ 0 ] ) , v = M ( j ( O ( a . index ) , i . length ) , 0 ) , d = [ ] , y = 1 ; y < a . length ; y ++ ) d . push ( A ( a [ y ] ) ) ; var g = a . groups ; if ( o ) { var m = [ p ] . concat ( d , v , i ) ; void 0 !== g && m . push ( g ) ; var b = String ( n . apply ( void 0 , m ) ) } else b = x ( p , i , v , d , g , n ) ; l <= v && ( s += i .
return r . _settledAt ( S , n , t ) } , function ( t ) { return r . _settledAt ( x , n , t ) } ) } , R ) , k = ( C . prototype [ "catch" ] = function ( t ) { return this . then ( null , t ) } , C . prototype [ "finally" ] = function ( n ) { var r = this . constructor ; return s ( n ) ? this . then ( function ( t ) { return r . resolve ( n ( ) ) . then ( function ( ) { return t } ) } , function ( t ) { return r . resolve ( n ( ) ) . then ( function ( ) { throw t } ) } ) : this . then ( n , n ) } , C ) ; return k . prototype . then = y , k . all = function V ( t ) { return new L ( this , t ) . promise } , k . race = function B ( i ) { var o = this ; return new o ( e ( i ) ? function ( t , n ) { for ( var r = i . length , e = 0 ; e < r ; e ++ ) o . resolve ( i [ e ] ) . then ( t , n ) } : function ( t , n ) { return n ( new TypeError ( "You must pass an array to race." ) ) } ) } , k . resolve = g , k . reject = function z ( t ) { var n = new this ( b ) ; return M ( n , t ) , n } , k . _setScheduler = function Y ( t ) { o = t } , k . _setAsap = function q ( t ) { u = t } , k . _asap = u , k . polyfill = function K ( ) { var t = void 0 ; if ( void 0 !== J ) t = J ; else if ( "undefined" != typeof self ) t = self ; else try { t = Function ( "return this" ) ( ) } catch ( e ) { throw new Error ( "polyfill failed because global object is unavailable in this environment" ) } var n = t . Promise ; if ( n ) { var r = null ; try { r = Object . prototype . toString . call ( n . resolve ( ) ) } catch ( e ) { } if ( "[object Promise]" === r && ! n . cast ) return } t . Promise = k } , k . Promise = k } , "object" === X ( i ) && void 0 !== e ? e . exports = r ( ) : void 0 === ( n = "function" == typeof ( t = r ) ? t . call ( i , o , i , e ) : t ) || ( e . exports = n ) } ) . call ( this , o ( 311 ) , o ( 312 ) ) } , function ( t , n ) { function o ( ) { throw new Error ( "setTimeout has not been defined" ) } function u ( ) { throw new Error ( "clearTimeout has not been defined" ) } function c ( t ) { if ( r === setTimeout ) return setTimeout ( t , 0 ) ; if ( ( r === o || ! r ) && setTimeout ) return r = setTimeout , setTimeout ( t , 0 ) ; try { return r ( t , 0 ) } catch ( n ) { try { return r . call ( null , t , 0 ) } catch ( n ) { return r . call ( this , t , 0 ) } } } function h ( ) { s && f && ( s = ! 1 , f . length ? a = f . concat ( a ) : l = - 1 , a . length && p ( ) ) } function p ( ) { if ( ! s ) { var t = c ( h ) ; s = ! 0 ; for ( var n = a . length ; n ; ) { for ( f = a , a = [ ] ; ++ l < n ; ) f && f [ l ] . run ( ) ; l = - 1 , n = a . length } f = null , s = ! 1 , function r ( t ) { if ( e === clearTimeout ) return clearTimeout ( t ) ; 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 v ( t , n ) { this . fun = t , this . array = n } function d ( ) { } 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 v ( t , n ) ) , 1 !== a . length || s || c ( p ) } , v . 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 = d , i . addListener = d , i . once = d , i . off = d , i . removeListener = d , i . removeAllListeners = d , i . emit = d , i . prependListener = d , i . prependOnceListener = d , 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 ; 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
if ( index != lastIndex ) { var objValue = nested [ key ] ; newValue = customizer ? customizer ( objValue , key , nested ) : undefined , newValue === undefined && ( newValue = isObject ( objValue ) ? objValue : isIndex ( path [ index + 1 ] ) ? [ ] : { } ) } assignValue ( nested , key , newValue ) , nested = nested [ key ] } return object } function baseSlice ( array , start , end ) { var index = - 1 , length = array . length ; start < 0 && ( start = - start > length ? 0 : length + start ) , end = end > length ? length : end , end < 0 && ( end += length ) , length = start > end ? 0 : end - start >>> 0 , start >>>= 0 ; for ( var result = Array ( length ) ; ++ index < length ; ) result [ index ] = array [ index + start ] ; return result } function baseSome ( collection , predicate ) { var result ; return baseEach ( collection , function ( value , index , collection ) { return result = predicate ( value , index , collection ) , ! result } ) , ! ! result } function baseToString ( value ) { if ( "string" == typeof value ) return value ; if ( isArray ( value ) ) return arrayMap ( value , baseToString ) + "" ; if ( isSymbol ( value ) ) return symbolToString ? symbolToString . call ( value ) : "" ; var result = value + "" ; return "0" == result && 1 / value == - INFINITY ? "-0" : result } function baseUniq ( array , iteratee , comparator ) { var index = - 1 , includes = arrayIncludes , length = array . length , isCommon = ! 0 , result = [ ] , seen = result ; if ( comparator ) isCommon = ! 1 , includes = arrayIncludesWith ; else if ( length >= LARGE _ARRAY _SIZE ) { var set = iteratee ? null : createSet ( array ) ; if ( set ) return setToArray ( set ) ; isCommon = ! 1 , includes = cacheHas , seen = new SetCache } else seen = iteratee ? [ ] : result ; outer : for ( ; ++ index < length ; ) { var value = array [ index ] , computed = iteratee ? iteratee ( value ) : value ; if ( value = comparator || 0 !== value ? value : 0 , isCommon && computed === computed ) { for ( var seenIndex = seen . length ; seenIndex -- ; ) if ( seen [ seenIndex ] === computed ) continue outer ; iteratee && seen . push ( computed ) , result . push ( value ) } else includes ( seen , computed , comparator ) || ( seen !== result && seen . push ( computed ) , result . push ( value ) ) } return result } function baseUnset ( object , path ) { return path = castPath ( path , object ) , object = parent ( object , path ) , null == object || delete object [ toKey ( last ( path ) ) ] } 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
if ( null == collection ) return 0 ; if ( isArrayLike ( collection ) ) return isString ( collection ) ? stringSize ( collection ) : collection . length ; var tag = getTag ( collection ) ; return tag == mapTag || tag == setTag ? collection . size : baseKeys ( collection ) . length } function some ( collection , predicate , guard ) { var func = isArray ( collection ) ? arraySome : baseSome ; return guard && isIterateeCall ( collection , predicate , guard ) && ( predicate = undefined ) , func ( collection , baseIteratee ( predicate , 3 ) ) } function before ( n , func ) { var result ; if ( "function" != typeof func ) throw new TypeError ( FUNC _ERROR _TEXT ) ; return n = toInteger ( n ) , function ( ) { return -- n > 0 && ( result = func . apply ( this , arguments ) ) , n <= 1 && ( func = undefined ) , result } } function debounce ( func , wait , options ) { function invokeFunc ( time ) { var args = lastArgs , thisArg = lastThis ; return lastArgs = lastThis = undefined , lastInvokeTime = time , result = func . apply ( thisArg , args ) } function leadingEdge ( time ) { return lastInvokeTime = time , timerId = setTimeout ( timerExpired , wait ) , leading ? invokeFunc ( time ) : result } function remainingWait ( time ) { var timeSinceLastCall = time - lastCallTime , timeSinceLastInvoke = time - lastInvokeTime , timeWaiting = wait - timeSinceLastCall ; return maxing ? nativeMin ( timeWaiting , maxWait - timeSinceLastInvoke ) : timeWaiting } function shouldInvoke ( time ) { var timeSinceLastCall = time - lastCallTime , timeSinceLastInvoke = time - lastInvokeTime ; return lastCallTime === undefined || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait } function timerExpired ( ) { var time = now ( ) ; return shouldInvoke ( time ) ? trailingEdge ( time ) : void ( timerId = setTimeout ( timerExpired , remainingWait ( time ) ) ) } function trailingEdge ( time ) { return timerId = undefined , trailing && lastArgs ? invokeFunc ( time ) : ( lastArgs = lastThis = undefined , result ) } function cancel ( ) { timerId !== undefined && clearTimeout ( timerId ) , lastInvokeTime = 0 , lastArgs = lastCallTime = lastThis = timerId = undefined } function flush ( ) { return timerId === undefined ? result : trailingEdge ( now ( ) ) } function debounced ( ) { var time = now ( ) , isInvoking = shouldInvoke ( time ) ; 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 _SYMBO
start = toInteger ( start ) ; var result = this ; return result . _ _filtered _ _ && ( start > 0 || end < 0 ) ? new LazyWrapper ( result ) : ( start < 0 ? result = result . takeRight ( - start ) : start && ( result = result . drop ( start ) ) , end !== undefined && ( end = toInteger ( end ) , result = end < 0 ? result . dropRight ( - end ) : result . take ( end - start ) ) , result ) } , LazyWrapper . prototype . takeRightWhile = function ( predicate ) { return this . reverse ( ) . takeWhile ( predicate ) . reverse ( ) } , LazyWrapper . prototype . toArray = function ( ) { return this . take ( MAX _ARRAY _LENGTH ) } , baseForOwn ( LazyWrapper . prototype , function ( func , methodName ) { var checkIteratee = /^(?:filter|find|map|reject)|While$/ . test ( methodName ) , isTaker = /^(?:head|last)$/ . test ( methodName ) , lodashFunc = lodash [ isTaker ? "take" + ( "last" == methodName ? "Right" : "" ) : methodName ] , retUnwrapped = isTaker || /^find/ . test ( methodName ) ; lodashFunc && ( lodash . prototype [ methodName ] = function ( ) { var value = this . _ _wrapped _ _ , args = isTaker ? [ 1 ] : arguments , isLazy = value instanceof LazyWrapper , iteratee = args [ 0 ] , useLazy = isLazy || isArray ( value ) , interceptor = function ( value ) { var result = lodashFunc . apply ( lodash , arrayPush ( [ value ] , args ) ) ; return isTaker && chainAll ? result [ 0 ] : result } ; useLazy && checkIteratee && "function" == typeof iteratee && 1 != iteratee . length && ( isLazy = useLazy = ! 1 ) ; var chainAll = this . _ _chain _ _ , isHybrid = ! ! this . _ _actions _ _ . length , isUnwrapped = retUnwrapped && ! chainAll , onlyLazy = isLazy && ! isHybrid ; if ( ! retUnwrapped && useLazy ) { value = onlyLazy ? value : new LazyWrapper ( this ) ; var result = func . apply ( value , args ) ; return result . _ _actions _ _ . push ( { func : thru , args : [ interceptor ] , thisArg : undefined } ) , new LodashWrapper ( result , chainAll ) } return isUnwrapped && onlyLazy ? func . apply ( this , args ) : ( result = this . thru ( interceptor ) , isUnwrapped ? isTaker ? result . value ( ) [ 0 ] : result . value ( ) : result ) } ) } ) , arrayEach ( [ "pop" , "push" , "shift" , "sort" , "splice" , "unshift" ] , function ( methodName ) { var func = arrayProto [ methodName ] , chainName = /^(?:push|sort|unshift)$/ . test ( methodName ) ? "tap" : "thru" , retUnwrapped = /^(?:pop|shift)$/ . test ( methodName ) ; lodash . prototype [ methodName ] = function ( ) { 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" ) } , 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" ) ; retur
w . beforeMount && w . beforeMount ( ) , w . mounted && w . mounted ( ) , BI . each ( w . _children , function ( i , child ) { triggerLifeHook ( child ) } ) } ; return triggerLifeHook ( widget ) , res } return container && BI . Widget . _renderEngine . createElement ( container ) . append ( widget . element ) , widget . _mount ( ! 0 , ! 1 , ! 1 , predicate ) } } ( ) , function ( ) { var kv = { } ; BI . shortcut = BI . component = function ( xtype , cls ) { null != kv [ xtype ] && _global . console && console . error ( "shortcut:[" + xtype + "] has been registed" ) , kv [ xtype ] = cls } ; var createWidget = function ( config ) { var cls = kv [ config . type ] , widget = new cls ; return widget . _initProps ( config ) , widget . _init ( ) , widget . _initRef ( ) , widget } ; BI . createWidget = function ( item , options , context ) { BI . init ( ) ; var el , w ; if ( item || ( item = { } ) , BI . isWidget ( options ) ? ( context = options , options = { } ) : options || ( options = { } ) , BI . isEmpty ( item ) && BI . isEmpty ( options ) ) return BI . createWidget ( { type : "bi.layout" } ) ; if ( BI . isWidget ( item ) ) return item ; if ( item . type || options . type ) return el = BI . extend ( { } , options , item ) , w = BI . Plugin . getWidget ( el . type , el ) , w . listeners = ( w . listeners || [ ] ) . concat ( [ { eventName : BI . Events . MOUNT , action : function ( ) { BI . Plugin . getObject ( el . type , this ) } } ] ) , w . type === el . type ? createWidget ( w ) : BI . createWidget ( BI . extend ( { } , item , { type : w . type } , options ) ) ; if ( item . el && ( item . el . type || options . type ) ) return el = BI . extend ( { } , options , item . el ) , w = BI . Plugin . getWidget ( el . type , el ) , w . listeners = ( w . listeners || [ ] ) . concat ( [ { eventName : BI . Events . MOUNT , action : function ( ) { BI . Plugin . getObject ( el . type , this ) } } ] ) , w . type === el . type ? createWidget ( w ) : BI . createWidget ( BI . extend ( { } , item , { type : w . type } , options ) ) ; if ( BI . isWidget ( item . el ) ) return item . el ; throw new Error ( "无法根据item创建组件" ) } , BI . createElement = function ( ) { var widget = BI . createWidget . apply ( this , arguments ) ; return widget . element } } ( ) , ! function ( ) { BI . CRYPT _TYPE = BI . CRYPT _TYPE || { } , BI . CRYPT _TYPE . AES = "aes" ; 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 . s
} , getOffsetAdjustment : function ( containerSize , offset ) { var totalSize = this . _cellSizeAndPositionManager . getTotalSize ( ) , safeTotalSize = this . getTotalSize ( ) , offsetPercentage = this . _getOffsetPercentage ( containerSize , offset , safeTotalSize ) ; return Math . round ( offsetPercentage * ( safeTotalSize - totalSize ) ) } , getSizeAndPositionOfCell : function ( index ) { return this . _cellSizeAndPositionManager . getSizeAndPositionOfCell ( index ) } , getSizeAndPositionOfLastMeasuredCell : function ( ) { return this . _cellSizeAndPositionManager . getSizeAndPositionOfLastMeasuredCell ( ) } , getTotalSize : function ( ) { return Math . min ( this . _maxScrollSize , this . _cellSizeAndPositionManager . getTotalSize ( ) ) } , getUpdatedOffsetForIndex : function ( align , containerSize , currentOffset , targetIndex ) { currentOffset = this . _safeOffsetToOffset ( containerSize , currentOffset ) ; var offset = this . _cellSizeAndPositionManager . getUpdatedOffsetForIndex ( align , containerSize , currentOffset , targetIndex ) ; return this . _offsetToSafeOffset ( containerSize , offset ) } , getVisibleCellRange : function ( containerSize , offset ) { return offset = this . _safeOffsetToOffset ( containerSize , offset ) , this . _cellSizeAndPositionManager . getVisibleCellRange ( containerSize , offset ) } , resetCell : function ( index ) { this . _cellSizeAndPositionManager . resetCell ( index ) } , _getOffsetPercentage : function ( containerSize , offset , totalSize ) { return totalSize <= containerSize ? 0 : offset / ( totalSize - containerSize ) } , _offsetToSafeOffset : function ( containerSize , offset ) { var totalSize = this . _cellSizeAndPositionManager . getTotalSize ( ) , safeTotalSize = this . getTotalSize ( ) ; if ( totalSize === safeTotalSize ) return offset ; 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 = " YDYQSXMWZSSXJBYMGCCZQPSSQBYCDSCDQLDYLYBSSJGYZZJJFKCCLZDHWDWZJLJPFYYNWJJTMYHZWZHFLZPPQHGSCYYYNJQYXXGJHHSDSJNKKTMOMLCRXYPSNQSECCQZGGLLYJLMYZZSECYKYYHQWJSSGGYXYZYJWWKDJHYCHMYXJTLXJYQBYXZLDWRDJRWYSRLDZJPCBZJJBRCFTLECZSTZFXXZHTRQHYBDLYCZSSYMMRFMYQZPWWJJYFCRWFDFZQPYDDWYXKYJAWJFFXYPSFTZYHHYZYSWCJYXSCLCXXWZZXNBGNNXBXLZSZSBSGPYSYZDHMDZBQBZCWDZZYYTZHBTSYYBZGNTNXQYWQSKBPHHLXGYBFMJEBJHHGQTJCYSXSTKZHLYCKGLYSMZXYALMELDCCXGZYRJXSDLTYZCQKCNNJWHJTZZCQLJSTSTBNXBTYXCEQXGKWJYFLZQLYHYXSPSFXLMPBYSXXXYDJCZYLLLSJXFHJXPJBTFFYABYXBHZZBJYZLWLCZGGBTSSMDTJZXPTHYQTGLJSCQFZKJZJQNLZWLSLHDZBWJNCJZYZSQQYCQYRZCJJWYBRTWPYFTWEXCSKDZCTBZHYZZYYJXZCFFZZMJYXXSDZZOTTBZLQWFCKSZSXFYRLNYJMBDTHJXSQQCCSBXYYTSYFBXDZTGBCNSLCYZZPSAZYZZSCJCSHZQYDXLBPJLLMQXTYDZXSQJTZPXLCGLQTZWJBHCTSYJSFXYEJJTLBGXSXJMYJQQPFZASYJNTYDJXKJCDJSZCBARTDCLYJQMWNQNCLLLKBYBZZSYHQQLTWLCCXTXLLZNTYLNEWYZYXCZXXGRKRMTCNDNJTSYYSSDQDGHSDBJGHRWRQLYBGLXHLGTGXBQJDZPYJSJYJCTMRNYMGRZJCZGJMZMGXMPRYXKJNYMSGMZJYMKMFXMLDTGFBHCJHKYLPFMDXLQJJSMTQGZSJLQDLDGJYCALCMZCSDJLLNXDJFFFFJCZFMZFFPFKHKGDPSXKTACJDHHZDDCRRCFQYJKQCCWJDXHWJLYLLZGCFCQDSMLZPBJJPLSBCJGGDCKKDEZSQCCKJGCGKDJTJDLZYCXKLQSCGJCLTFPCQCZGWPJDQYZJJBYJHSJDZWGFSJGZKQCCZLLPSPKJGQJHZZLJPLGJGJJTHJJYJZCZMLZLYQBGJWMLJKXZDZNJQSYZMLJLLJKYWXMKJLHSKJGBMCLYYMKXJQLBMLLKMDXXKWYXYSLMLPSJQQJQXYXFJTJDXMXXLLCXQBSYJBGWYMBGGBCYXPJYGPEPFGDJGBHBNSQJYZJKJKHXQFGQZKFHYGKHDKLLSDJQXPQYKYBNQSXQNSZSWHBSXWHXWBZZXDMNSJBSBKBBZKLYLXGWXDRWYQZMYWSJQLCJXXJXKJEQXSCYETLZHLYYYSDZPAQYZCMTLSHTZCFYZYXYLJSDCJQAGYSLCQLYYYSHMRQQKLDXZSCSSSYDYCJYSFSJBFRSSZQSBXXPXJYSDRCKGJLGDKZJZBDKTCSYQPYHSTCLDJDHMXMCGXYZHJDDTMHLTXZXYLYMOHYJCLTYFBQQXPFBDFHHTKSQHZYYWCNXXCRWHOWGYJLEGWDQCWGFJYCSNTMYTOLBYGWQWESJPWNMLRYDZSZTXYQPZGCWXHNGPYXSHMYQJXZTDPPBFYHZHTJYFDZWKGKZBLDNTSXHQEEGZZYLZMMZYJZGXZXKHKSTXNXXWYLYAPSTHXDWHZYMPXAGKYDXBHNHXKDPJNMYHYLPMGOCSLNZHKXXLPZZLBMLSFBHHGYGYYGGBHSCYAQTYWLXTZQCEZYDQDQMMHTKLLSZHLSJZWFYHQSWSCWLQAZYNYTLSXTHAZNKZZSZZLAXXZWWCTGQQTDDYZTCCHYQZFLXPSLZYGPZSZNGLNDQTBDLXGTCTAJDKYWNSYZLJHHZZCWNYYZYWMHYCHHYXHJKZWSXHZYXLYSKQYSPSLYZWMYPPKBYGLKZHTYXAXQSYSHXASMCHKDSCRSWJPWXSGZJLWWSCHSJHSQNHCS
if ( handleScrollX || handleScrollY ) { this . _deltaX += handleScrollX ? normalizedEvent . pixelX : 0 , this . _deltaY += handleScrollY ? normalizedEvent . pixelY : 0 , event . preventDefault ? event . preventDefault ( ) : event . returnValue = ! 1 ; var changed ; 0 === this . _deltaX && 0 === this . _deltaY || ( this . _stopPropagation ( ) && ( event . stopPropagation ? event . stopPropagation ( ) : event . cancelBubble = ! 0 ) , changed = ! 0 ) , changed === ! 0 && null === this . _animationFrameID && ( this . _animationFrameID = requestAnimationFrame ( this . _didWheel ) ) } } , _didWheel : function ( ) { this . _animationFrameID = null , this . _onWheelCallback ( this . _deltaX , this . _deltaY ) , this . _deltaX = 0 , this . _deltaY = 0 } } } ( ) , function ( ) { function defaultComparator ( a , b ) { return a < b } BI . Heap = function ( items , comparator ) { this . _items = items || [ ] , this . _size = this . _items . length , this . _comparator = comparator || defaultComparator , this . _heapify ( ) } , BI . Heap . prototype = { constructor : BI . Heap , empty : function ( ) { return 0 === this . _size } , pop : function ( ) { if ( 0 !== this . _size ) { var elt = this . _items [ 0 ] , lastElt = this . _items . pop ( ) ; return this . _size -- , this . _size > 0 && ( this . _items [ 0 ] = lastElt , this . _sinkDown ( 0 ) ) , elt } } , push : function ( item ) { this . _items [ this . _size ++ ] = item , this . _bubbleUp ( this . _size - 1 ) } , size : function ( ) { return this . _size } , peek : function ( ) { if ( 0 !== this . _size ) return this . _items [ 0 ] } , _heapify : function ( ) { for ( var index = Math . floor ( ( this . _size + 1 ) / 2 ) ; index >= 0 ; index -- ) this . _sinkDown ( index ) } , _bubbleUp : function ( index ) { for ( var elt = this . _items [ index ] ; index > 0 ; ) { var parentIndex = Math . floor ( ( index + 1 ) / 2 ) - 1 , parentElt = this . _items [ parentIndex ] ; if ( this . _comparator ( parentElt , elt ) ) return ; this . _items [ parentIndex ] = elt , 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 . _keym
_defaultConfig : function ( ) { return BI . extend ( BI . Action . superclass . _defaultConfig . apply ( this , arguments ) , { src : null , tar : null } ) } , _init : function ( ) { BI . Action . superclass . _init . apply ( this , arguments ) } , actionPerformed : function ( src , tar , callback ) { } , actionBack : function ( tar , src , callback ) { } } ) , BI . ActionFactory = { createAction : function ( key , options ) { var action ; switch ( key ) { case "show" : action = BI . ShowAction } return new action ( options ) } } , BI . ShowAction = BI . inherit ( BI . Action , { _defaultConfig : function ( ) { return BI . extend ( BI . ShowAction . superclass . _defaultConfig . apply ( this , arguments ) , { } ) } , _init : function ( ) { BI . ShowAction . superclass . _init . apply ( this , arguments ) } , actionPerformed : function ( src , tar , callback ) { tar = tar || this . options . tar , tar . setVisible ( ! 0 ) , callback && callback ( ) } , actionBack : function ( tar , src , callback ) { tar = tar || this . options . tar , tar . setVisible ( ! 1 ) , callback && callback ( ) } } ) , function ( ) { function isEmpty ( value ) { var result = "" === value || null === value || void 0 === value ; return result } function isInvalidDate ( date ) { return "Invalid Date" == date || "NaN" == date } function _eFormat ( text , fmt ) { function eFormat ( num , format ) { var neg = num < 0 ? ( num *= - 1 , "-" ) : "" , magnitudeNeg = "" , funcName = num > 0 && num < 1 ? "floor" : "ceil" , magnitude = Math [ funcName ] ( Math . log ( num ) / Math . log ( 10 ) ) ; if ( ! isFinite ( magnitude ) ) return format . replace ( /#/gi , "" ) . replace ( /\.e/gi , "E" ) ; num /= Math . pow ( 10 , magnitude ) , num > 0 && num < 1 && ( num *= 10 , magnitude -= 1 ) ; var integerLen = getInteger ( magnitude , format ) ; integerLen > 1 && ( magnitude -= integerLen - 1 , num *= Math . pow ( 10 , integerLen - 1 ) ) , magnitude < 0 && ( magnitudeNeg = "-" , magnitude *= - 1 ) ; var precision = getPrecision ( format ) , isValueCarry = isValueCarried ( num ) ; 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
BI . Date . _SDN = [ BI . i18nText ( "BI-Basic_Simple_Sunday" ) , BI . i18nText ( "BI-Basic_Simple_Monday" ) , BI . i18nText ( "BI-Basic_Simple_Tuesday" ) , BI . i18nText ( "BI-Basic_Simple_Wednesday" ) , BI . i18nText ( "BI-Basic_Simple_Thursday" ) , BI . i18nText ( "BI-Basic_Simple_Friday" ) , BI . i18nText ( "BI-Basic_Simple_Saturday" ) , BI . i18nText ( "BI-Basic_Simple_Sunday" ) ] , BI . Date . _FD = 1 , BI . Date . _MN = [ BI . i18nText ( "BI-Basic_January" ) , BI . i18nText ( "BI-Basic_February" ) , BI . i18nText ( "BI-Basic_March" ) , BI . i18nText ( "BI-Basic_April" ) , BI . i18nText ( "BI-Basic_May" ) , BI . i18nText ( "BI-Basic_June" ) , BI . i18nText ( "BI-Basic_July" ) , BI . i18nText ( "BI-Basic_August" ) , BI . i18nText ( "BI-Basic_September" ) , BI . i18nText ( "BI-Basic_October" ) , BI . i18nText ( "BI-Basic_November" ) , BI . i18nText ( "BI-Basic_December" ) ] , BI . Date . _SMN = [ 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 ] , BI . Date . _QN = [ "" , BI . i18nText ( "BI-Quarter_1" ) , BI . i18nText ( "BI-Quarter_2" ) , BI . i18nText ( "BI-Quarter_3" ) , BI . i18nText ( "BI-Quarter_4" ) ] , BI . Date . _MD = [ 31 , 28 , 31 , 30 , 31 , 30 , 31 , 31 , 30 , 31 , 30 , 31 ] , BI . Date . _OFFSET = [ 0 , - 1 , - 2 , - 3 , - 4 , - 5 , - 6 ] } ) , BI . Date = BI . Date || { } , BI . Date . SECOND = 1e3 , BI . Date . MINUTE = 60 * BI . Date . SECOND , BI . Date . HOUR = 60 * BI . Date . MINUTE , BI . Date . DAY = 24 * BI . Date . HOUR , BI . Date . WEEK = 7 * BI . Date . DAY , _ . extend ( BI , { getTimezone : function ( date ) { return date . toString ( ) . replace ( /^.* (?:\((.*)\)|([A-Z]{1,4})(?:[\-+][0-9]{4})?(?: -?\d+)?)$/ , "$1$2" ) . replace ( /[^A-Z]/g , "" ) } , getMonthDays : function ( date , month ) { var year = date . getFullYear ( ) ; return "undefined" == typeof month && ( month = date . getMonth ( ) ) , 0 != year % 4 || 0 == year % 100 && 0 != year % 400 || 1 != month ? BI . Date . _MD [ month ] : 29 } , getLastDateOfMonth : function ( date ) { 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 ( ) , sta
null == fontSize && ( fontSize = 12 ) , fontSize += "px" , span . css ( "font-size" , fontSize ) . text ( text ) ; var height = span . height ( ) ; return span . remove ( ) , height } , getScrollWidth : function ( ) { if ( BI . isNull ( this . _scrollWidth ) || 0 === this . _scrollWidth ) { var ul = BI . Widget . _renderEngine . createElement ( "<div>" ) . width ( 50 ) . height ( 50 ) . css ( { position : "absolute" , top : "-9999px" , overflow : "scroll" } ) . appendTo ( "body" ) ; this . _scrollWidth = ul [ 0 ] . offsetWidth - ul [ 0 ] . clientWidth , ul . destroy ( ) } return this . _scrollWidth } , getImage : function ( param , fillStyle , backgroundColor ) { var canvas = document . createElement ( "canvas" ) , ratio = 2 ; BI . Widget . _renderEngine . createElement ( "body" ) . append ( canvas ) ; var ctx = canvas . getContext ( "2d" ) ; ctx . font = "12px Georgia" ; var w = ctx . measureText ( param ) . width + 4 ; canvas . width = w * ratio , canvas . height = 16 * ratio , ctx . font = 12 * ratio + "px Georgia" , ctx . fillStyle = fillStyle || "#3685f2" , ctx . textBaseline = "middle" , ctx . fillText ( param , 2 * ratio , 9 * ratio ) , BI . Widget . _renderEngine . createElement ( canvas ) . destroy ( ) ; var backColor = backgroundColor || "rgba(54, 133, 242, 0.1)" ; return { width : w , height : 16 , src : canvas . toDataURL ( "image/png" ) , style : "background-color: " + backColor + ";vertical-align: middle; margin: 0 1px; width:" + w + "px;height: 16px; max-width:" + w + "px;max-height: 16px; min-width:" + w + "px;min-height: 16px" , param : param } } } ) , BI . extend ( BI . DOM , { isColor : function ( color ) { return color && ( this . isRGBColor ( color ) || this . isHexColor ( color ) ) } , isRGBColor : function ( color ) { 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 ) } } , get
delete tick . elem } ) , tick = function ( ) { if ( stopped ) return ! 1 ; for ( var currentTime = fxNow || createFxNow ( ) , remaining = Math . max ( 0 , animation . startTime + animation . duration - currentTime ) , temp = remaining / animation . duration || 0 , percent = 1 - temp , index = 0 , length = animation . tweens . length ; index < length ; index ++ ) animation . tweens [ index ] . run ( percent ) ; return deferred . notifyWith ( elem , [ animation , percent , remaining ] ) , percent < 1 && length ? remaining : ( deferred . resolveWith ( elem , [ animation ] ) , ! 1 ) } , animation = deferred . promise ( { elem : elem , props : jQuery . extend ( { } , properties ) , opts : jQuery . extend ( ! 0 , { specialEasing : { } } , options ) , originalProperties : properties , originalOptions : options , startTime : fxNow || createFxNow ( ) , duration : options . duration , tweens : [ ] , createTween : function ( prop , end ) { var tween = jQuery . Tween ( elem , animation . opts , prop , end , animation . opts . specialEasing [ prop ] || animation . opts . easing ) ; return animation . tweens . push ( tween ) , tween } , stop : function ( gotoEnd ) { var index = 0 , length = gotoEnd ? animation . tweens . length : 0 ; if ( stopped ) return this ; for ( stopped = ! 0 ; index < length ; index ++ ) animation . tweens [ index ] . run ( 1 ) ; return gotoEnd ? deferred . resolveWith ( elem , [ animation , gotoEnd ] ) : deferred . rejectWith ( elem , [ animation , gotoEnd ] ) , this } } ) , props = animation . props ; for ( propFilter ( props , animation . opts . specialEasing ) ; index < length ; index ++ ) if ( result = animationPrefilters [ index ] . call ( animation , elem , props , animation . opts ) ) return result ; return createTweens ( animation , props ) , 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 , opti
hooks = jQuery . attrHooks [ name ] || ( rboolean . test ( name ) ? boolHook : nodeHook ) ) , value === undefined ? hooks && notxml && "get" in hooks && null !== ( ret = hooks . get ( elem , name ) ) ? ret : ( typeof elem . getAttribute !== core _strundefined && ( ret = elem . getAttribute ( name ) ) , null == ret ? undefined : ret ) : null !== value ? hooks && notxml && "set" in hooks && ( ret = hooks . set ( elem , value , name ) ) !== undefined ? ret : ( elem . setAttribute ( name , value + "" ) , value ) : void jQuery . removeAttr ( elem , name ) ) } , removeAttr : function ( elem , value ) { var name , propName , i = 0 , attrNames = value && value . match ( core _rnotwhite ) ; if ( attrNames && 1 === elem . nodeType ) for ( ; name = attrNames [ i ++ ] ; ) propName = jQuery . propFix [ name ] || name , rboolean . test ( name ) ? ! getSetAttribute && ruseDefault . test ( name ) ? elem [ jQuery . camelCase ( "default-" + name ) ] = elem [ propName ] = ! 1 : elem [ propName ] = ! 1 : jQuery . attr ( elem , name , "" ) , elem . removeAttribute ( getSetAttribute ? name : propName ) } , attrHooks : { type : { set : function ( elem , value ) { if ( ! jQuery . support . radioValue && "radio" === value && jQuery . nodeName ( elem , "input" ) ) { var val = elem . value ; return elem . setAttribute ( "type" , value ) , val && ( elem . value = val ) , value } } } } , propFix : { tabindex : "tabIndex" , readonly : "readOnly" , "for" : "htmlFor" , "class" : "className" , maxlength : "maxLength" , cellspacing : "cellSpacing" , cellpadding : "cellPadding" , rowspan : "rowSpan" , colspan : "colSpan" , usemap : "useMap" , frameborder : "frameBorder" , contenteditable : "contentEditable" } , prop : function ( elem , name , value ) { var ret , hooks , notxml , nType = elem . nodeType ; 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 ) } } } ) ) ,
needsContext : new RegExp ( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)" , "i" ) } , rsibling = /[\x20\t\r\n\f]*[+~]/ , rnative = /^[^{]+\{\s*\[native code/ , rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/ , rinputs = /^(?:input|select|textarea|button)$/i , rheader = /^h\d$/i , rescape = /'|\\/g , rattributeQuotes = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g , runescape = /\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g , funescape = function ( _ , escaped ) { var high = "0x" + escaped - 65536 ; return high !== high ? escaped : high < 0 ? String . fromCharCode ( high + 65536 ) : String . fromCharCode ( high >> 10 | 55296 , 1023 & high | 56320 ) } ; try { slice . call ( preferredDoc . documentElement . childNodes , 0 ) [ 0 ] . nodeType } catch ( e ) { slice = function ( i ) { for ( var elem , results = [ ] ; elem = this [ i ++ ] ; ) results . push ( elem ) ; return results } } isXML = Sizzle . isXML = function ( elem ) { var documentElement = elem && ( elem . ownerDocument || elem ) . documentElement ; return ! ! documentElement && "HTML" !== documentElement . nodeName } , setDocument = Sizzle . setDocument = function ( node ) { var doc = node ? node . ownerDocument || node : preferredDoc ; return doc !== document && 9 === doc . nodeType && doc . documentElement ? ( document = doc , docElem = doc . documentElement , documentIsXML = isXML ( doc ) , support . tagNameNoComments = assert ( function ( div ) { 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 . querySel
if ( type = typeof value , "string" === type && ( ret = rrelNum . exec ( value ) ) && ( value = ( ret [ 1 ] + 1 ) * ret [ 2 ] + parseFloat ( jQuery . css ( elem , name ) ) , type = "number" ) , ! ( null == value || "number" === type && isNaN ( value ) || ( "number" !== type || jQuery . cssNumber [ origName ] || ( value += "px" ) , jQuery . support . clearCloneStyle || "" !== value || 0 !== name . indexOf ( "background" ) || ( style [ name ] = "inherit" ) , hooks && "set" in hooks && ( value = hooks . set ( elem , value , extra ) ) === undefined ) ) ) try { style [ name ] = value } catch ( e ) { } } } , css : function ( elem , name , extra , styles ) { var num , val , hooks , origName = jQuery . camelCase ( name ) ; return name = jQuery . cssProps [ origName ] || ( jQuery . cssProps [ origName ] = vendorPropName ( elem . style , origName ) ) , hooks = jQuery . cssHooks [ name ] || jQuery . cssHooks [ origName ] , hooks && "get" in hooks && ( val = hooks . get ( elem , ! 0 , extra ) ) , val === undefined && ( val = curCSS ( elem , name , styles ) ) , "normal" === val && name in cssNormalTransform && ( val = cssNormalTransform [ name ] ) , "" === extra || extra ? ( num = parseFloat ( val ) , extra === ! 0 || jQuery . isNumeric ( num ) ? num || 0 : val ) : val } , swap : function ( elem , options , callback , args ) { var ret , name , old = { } ; for ( name in options ) old [ name ] = elem . style [ name ] , elem . style [ name ] = options [ name ] ; ret = callback . apply ( elem , args || [ ] ) ; for ( name in options ) elem . style [ name ] = old [ name ] ; return ret } } ) , window . getComputedStyle ? ( getStyles = function ( elem ) { 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" : co
if ( computedStyle = document . defaultView . getComputedStyle ( node , null ) ) return computedStyle . getPropertyValue ( BI . hyphenate ( name ) ) ; if ( "display" === name ) return "none" } return node . currentStyle ? "float" === name ? node . currentStyle . cssFloat || node . currentStyle . styleFloat : node . currentStyle [ BI . camelize ( name ) ] : node . style && node . style [ BI . camelize ( name ) ] } , _ _isMouseInBounds _ _ : function ( e ) { var offset2Body = this . get ( 0 ) . getBoundingClientRect ? this . get ( 0 ) . getBoundingClientRect ( ) : this . offset ( ) , width = offset2Body . width || this . outerWidth ( ) , height = offset2Body . height || this . outerHeight ( ) ; return ! ( e . pageX < Math . floor ( offset2Body . left ) || e . pageX > offset2Body . left + width || e . pageY < Math . floor ( offset2Body . top ) || e . pageY > offset2Body . top + height ) } , _ _hasZIndexMask _ _ : function ( zindex ) { return zindex && null != this . zIndexMask [ zindex ] } , _ _buildZIndexMask _ _ : function ( zindex , domArray ) { this . zIndexMask = this . zIndexMask || { } , this . indexMask = this . indexMask || [ ] ; var mask = BI . createWidget ( { type : "bi.center_adapt" , cls : "bi-z-index-mask" , items : domArray } ) ; return mask . element . css ( { "z-index" : zindex } ) , BI . createWidget ( { type : "bi.absolute" , element : this , items : [ { el : mask , left : 0 , right : 0 , top : 0 , bottom : 0 } ] } ) , this . indexMask . push ( mask ) , zindex && ( this . zIndexMask [ zindex ] = mask ) , mask . element } , _ _releaseZIndexMask _ _ : function ( zindex ) { 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
"fill" === o . rowSize [ i ] && w . element . css ( "flex" , "1" ) , 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 } , appendFragment : function ( frag ) { this . $wrapper . append ( frag ) , this . element . append ( this . $wrapper ) } , _getWrapper : function ( ) { return this . $wrapper } , resize : function ( ) { } , populate : function ( items ) { BI . FlexWrapperVerticalLayout . superclass . populate . apply ( this , arguments ) , this . _mount ( ) } } ) , BI . shortcut ( "bi.flex_scrollable_vertical" , BI . FlexWrapperVerticalLayout ) , BI . AbsoluteLayout = BI . inherit ( BI . Layout , { props : function ( ) { return BI . extend ( BI . AbsoluteLayout . superclass . props . apply ( this , arguments ) , { baseCls : "bi-absolute-layout" , hgap : null , vgap : null , lgap : null , rgap : null , tgap : null , bgap : null } ) } , render : function ( ) { BI . AbsoluteLayout . superclass . render . apply ( this , arguments ) , 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 . e
BI . TdLayout = BI . inherit ( BI . Layout , { props : function ( ) { return BI . extend ( BI . TdLayout . superclass . props . apply ( this , arguments ) , { baseCls : "bi-td-layout" , columnSize : [ 200 , 200 , 200 ] , hgap : 0 , vgap : 0 , items : [ [ { el : { text : "label1" } } , { el : { text : "label2" } } , { el : { text : "label3" } } ] ] } ) } , render : function ( ) { BI . TdLayout . superclass . render . apply ( this , arguments ) , this . $table = BI . Widget . _renderEngine . createElement ( "<table>" ) . attr ( { cellspacing : 0 , cellpadding : 0 } ) . css ( { position : "relative" , width : "100%" , height : "100%" , "border-spacing" : "0px" , border : "none" , "border-collapse" : "separate" } ) , this . rows = 0 , this . populate ( this . options . items ) } , _addElement : function ( idx , arr ) { 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 ) } 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 : " bu
var dep = this . deps [ i ] ; this . newDepIds . has ( dep . id ) || dep . removeSub ( this ) } var tmp = this . depIds ; this . depIds = this . newDepIds , this . newDepIds = tmp , this . newDepIds . clear ( ) , tmp = this . deps , this . deps = this . newDeps , this . newDeps = tmp , this . newDeps . length = 0 } , Watcher . prototype . update = function update ( options ) { this . lazy ? this . dirty = ! 0 : this . sync ? this . run ( options ) : queueWatcher ( this , options ) } , Watcher . prototype . run = function run ( options ) { if ( this . active ) { var value = this . get ( ) ; if ( value !== this . value || options && options . refresh || this . deep ) { var oldValue = this . value ; if ( this . value = value , this . user ) try { this . cb . call ( this . vm , value , oldValue , options ) } catch ( e ) { console . error ( e ) } else try { this . cb . call ( this . vm , value , oldValue , options ) } catch ( e ) { console . error ( e ) } } } } , Watcher . prototype . evaluate = function evaluate ( ) { this . value = this . get ( ) , this . dirty = ! 1 } , Watcher . prototype . depend = function depend ( ) { for ( var i = this . deps . length ; i -- ; ) this . deps [ i ] . depend ( ) } , Watcher . prototype . teardown = function teardown ( ) { if ( this . active ) { remove ( this . vm . _watchers , this ) ; for ( var i = this . deps . length ; i -- ; ) this . deps [ i ] . removeSub ( this ) ; this . active = ! 1 } } , Watcher } ( ) , seenObjects = new Set , falsy$1 , operators = { "||" : falsy$1 , "&&" : falsy$1 , "(" : falsy$1 , ")" : falsy$1 } , mixinInjection = { } , computedWatcherOptions = { lazy : ! 0 } , Model = function ( ) { function Model ( ) { _classCallCheck ( this , Model ) } return Model . prototype . _constructor = function _constructor ( model ) { ( 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 pageHeigh
this . tree = BI . createWidget ( { type : "bi.layout" , element : "<ul id='" + this . id + "' class='ztree'></ul>" } ) , BI . createWidget ( { type : "bi.default" , element : this . element , items : [ this . tree ] } ) } , _selectTreeNode : function ( treeId , treeNode ) { this . fireEvent ( BI . Controller . EVENT _CHANGE , BI . Events . CLICK , treeNode , this ) , this . fireEvent ( BI . TreeView . EVENT _CHANGE , treeNode , this ) } , _configSetting : function ( ) { function onClick ( event , treeId , treeNode ) { var checked = treeNode . checked , status = treeNode . getCheckStatus ( ) ; status . half === ! 0 && status . checked === ! 0 && ( checked = ! 1 ) , self . nodes . checkNode ( treeNode , ! checked , ! 0 , ! 0 ) } function getUrl ( treeId , treeNode ) { var parentNode = self . _getParentValues ( treeNode ) ; treeNode . times = treeNode . times || 1 ; var param = "id=" + treeNode . id + "×=" + treeNode . times ++ + "&parentValues= " + _global . encodeURIComponent ( BI . jsonEncode ( parentNode ) ) + "&checkState=" + _global . encodeURIComponent ( BI . jsonEncode ( treeNode . getCheckStatus ( ) ) ) ; return "&" + param } function beforeExpand ( treeId , treeNode ) { return treeNode . isAjaxing ? ( BI . Msg . toast ( "Please Wait。" , "warning" ) , ! 1 ) : ( treeNode . children || ( treeNode . times = 1 , ajaxGetNodes ( treeNode , "refresh" ) ) , ! 0 ) } function onAsyncSuccess ( event , treeId , treeNode , msg ) { if ( treeNode . halfCheck = ! 1 , msg && 0 !== msg . length && ! /^<html>[\s,\S]*<\/html>$/gi . test ( msg ) && ! self . _stop ) { var zTree = self . nodes , totalCount = treeNode . count || 0 ; 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 } , _a
o . stopEvent && e . stopEvent ( ) , o . stopPropagation && e . stopPropagation ( ) } , enterPopup = ! 1 ; BI . each ( evs , function ( i , ev ) { switch ( ev ) { case "hover" : self . element . on ( "mouseenter." + self . getName ( ) , function ( e ) { self . isEnabled ( ) && self . isValid ( ) && self . combo . isEnabled ( ) && self . combo . isValid ( ) && ( self . _popupView ( ) , 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
} finally { this . editor . setValue ( "" ) } } , isSearching : function ( ) { return this . _isSearching } , isViewVisible : function ( ) { return this . editor . isEnabled ( ) && BI . Maskers . isVisible ( this . getName ( ) ) } , getView : function ( ) { return this . popupView } , 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 .
redmark : function ( ) { return ! 0 } } , items : [ ] , layouts : [ { type : "bi.vertical" } ] } } ) } , _init : function ( ) { 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 , scrollTo
} , 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
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 . Single , { _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 . callee ) } ) , wrap } , _wrap : function ( ) { var self = this , o = this . options , input = this . element [ 0 ] ; return o . m
} , _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
} , 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 } ) } , _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" } ) , 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 , py : o . py } ) , this . checkbox . on ( BI . Controller . EVENT _CHANGE , function ( type ) { type === BI . Events . CLICK && self . setSelected ( self . isSelected ( ) ) , self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) ; var type = BI . LogicFactory . createLogicTypeByDirection ( BI . Direction . Left ) , items = BI . LogicFactory . createLogicItemsByDirection ( BI . Direction . Left , { width : 16 , el : this . checkbox } , this . text ) ; BI . createWidget ( BI . extend ( { element : this } , BI . LogicFactory . createLogic ( type , BI . extend ( o . logic , { items : items } ) ) ) ) } , doRedMark : function ( ) { this . text . doRedMark . apply ( this . text , arguments ) } , unRedMark : function ( ) { this . text . unRedMark . apply ( this . text , arguments ) } , doClick : function ( ) { BI . ArrowNode . superclass . doClick . apply ( this , arguments ) , this . checkbox . setSelected ( this . isOpened ( ) ) } , setText : function ( text ) { BI . ArrowNode . superclass . setText . apply ( this , arguments ) , this . text . setText ( text ) } , setOpened : function ( v ) { BI . ArrowNode . superclass . setOpened . apply ( this , arguments ) , this . checkbox . setSelected ( v ) } } ) , BI . shortcut ( "bi.arrow_group_node" , BI . ArrowNode ) , BI . FirstPlusGroupNode = BI . inherit ( BI . NodeButton , { _defaultConfig : function ( ) { var conf = BI . FirstPlusGroupNode . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { baseCls : ( conf . baseCls || "" ) + " bi-first-plus-group-node bi-list-item" , logic : { dynamic : ! 1 } , id : "" , pId : "" , open : ! 1 , height : 24 } ) } , _init : function ( ) { BI . FirstPlusGroupNode . 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 , py : o . py , keyword : o . keyword } ) , 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 } ) ) ) ) } , doRedMark : function ( ) { this . text . doRedMark . apply ( this . text , arguments ) } , unRedMark : function ( ) { this . text . unRedMark . apply ( this . text , arguments ) } , doClick : function ( ) { BI . FirstPlusGroupNode . superclass . doClick . apply ( this , arguments ) , this . checkbox . setSelected ( this . isSelected ( ) ) } , setOpened : function ( v ) { BI . FirstPlusGroupNode . superclass . setOpened . apply ( this , arguments ) , BI . isNotNull ( this . checkbox ) && this . checkbox . setSelected ( v ) } } ) , BI . shortcut ( "bi.first_plus_group_node" , BI . FirstPlusGroupNode ) , BI . IconArrowNode = BI . inherit ( BI . NodeButton , { _defaultConfig : function ( ) { var conf = BI . IconArrowNode . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { baseCls : ( conf . baseCls || "" ) + " bi-icon-arrow-node bi-list-item" , logic : { dynamic : ! 1 } , id : "" , pId : "" , open : ! 1 , height : 24 , iconHeight : 12 , iconWidth : 12 , iconCls : "" } ) } , _
} } ) , 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 . farbtastic = BI . createWidget ( { type : "bi.farbtastic" } ) , this . farbtastic . on ( BI . Farbtastic . EVENT _CHANGE , function ( ) { self . setValue ( this . getValue ( ) ) } ) , BI . createWidget ( { type : "bi.vtape" , element : this , items : [ { type : "bi.absolute" , items : [ { el : this . editor , left : 0 , top : 0 , right : 0 } ] , height : 30 } , { type : "bi.absolute" , items : [ { el : this . farbtastic , left : 15 , right : 15 , top : 7 } ] , height : 215 } ] } ) } , setValue : function ( color ) { this . editor . setValue ( color ) , this . farbtastic . setValue ( color ) } , getValue : function ( ) { return this . editor . getValue ( ) } } ) , BI . CustomColorChooser . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.custom_color_chooser" , BI . CustomColorChooser ) , BI . ColorChooser = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . ColorChooser . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-color-chooser" , value : "" , height : 24 } ) } , _init : function ( ) { BI . ColorChooser . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . combo = BI . createWidget ( { type : "bi.combo" , element : this , container : o . container , adjustLength : 1 , isNeedAdjustWidth : ! 1 , isNeedAdjustHeight : ! 1 , el : BI . extend ( { type : o . width <= 24 ? "bi.color_chooser_trigger" : "bi.long_color_chooser_trigger" , ref : function ( _ref ) { self . trigger = _ref } , width : o . width - 2 , height : o . height - 2 } , o . el ) , popup : { el : BI . extend ( { type : "bi.color_chooser_popup" , ref : function ( _ref ) { self . colorPicker = _ref } , listeners : [ { eventName : BI . ColorChooserPopup . EVENT _VALUE _CHANGE , action : function ( ) { fn ( ) , self . _isRGBColor ( self . colorPicker . getValue ( ) ) || self . combo . hideView ( ) } } , { eventName : BI . ColorChooserPopup . EVENT _CHANGE , action : function ( ) { fn ( ) , self . combo . hideView ( ) } } ] } , o . popup )
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 , buttonOpt ) { BI . isWidget ( buttonOpt ) ? items . push ( buttonOpt ) : items . push ( BI . extend ( { type : "bi.button" , height : 24 , handler : function ( v ) { self . fireEvent ( BI . BubblePopupBarView . EVENT _CLICK _TOOLBAR _BUTTON , v ) } } , buttonOpt ) ) } ) , BI . createWidget ( { type : "bi.center" , height : 44 , rgap : 15 , items : [ { type : "bi.right_vertical_adapt" , lgap : 10 , items : items } ] } ) } , _createView : function ( ) { var o = this . options , button = BI . createWidget ( { type : "bi.button_group" , items : [ o . el ] , layouts : [ { type : "bi.vertical" , cls : "bar-popup-container" , hgap : 15 , tgap : 10 } ] } ) ; return button . element . css ( "min-height" , o . minHeight - 44 ) , button } } ) , BI . BubblePopupBarView . EVENT _CLICK _TOOLBAR _BUTTON = "EVENT_CLICK_TOOLBAR_BUTTON" , BI . shortcut ( "bi.bubble_bar_popup_view" , BI . BubblePopupBarView ) , BI . TextBubblePopupBarView = BI . inherit ( BI . Widget , { props : function ( ) { return { baseCls : "bi-text-bubble-bar-popup-view" , text : "" , buttons : [ { level : "ignore" , value : ! 1 , stopPropagation : ! 0 , text : BI . i18nText ( "BI-Basic_Cancel" ) } , { value : ! 0 , stopPropagation : ! 0 , text : BI . i18nText ( "BI-Basic_Sure" ) } ] } } , render : function ( ) { var self = this , o = this . options , buttons = BI . map ( o . buttons , function ( index , buttonOpt ) { return BI . isWidget ( buttonOpt ) ? buttonOpt : BI . extend ( { type : "bi.button" , height : 24 , handler : function ( v ) { self . fireEvent ( BI . TextBubblePopupBarView . EVENT _CHANGE , v ) } } , buttonOpt ) } ) ; return { type : "bi.bubble_bar_popup_view" , minWidth : o . minWidth , maxWidth : o . maxWidth , minHeight : o . minHeight , ref : function ( ) { self . popup = this } , el : { type : "bi.label" , text : o . text , whiteSpace : "normal" , textAlign : "left" , ref : function ( ) { self . text = this } } , buttons : buttons } } , populate : function ( v ) { this . text . setText ( v || this . options . text ) } } ) , BI . TextBu
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 . EVENT _KEY _DOWN , function ( v ) { self . fireEvent ( BI . ShelterEditor . EVENT _KEY _DOWN , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _VALID , function ( ) { self . fireEvent ( BI . ShelterEditor . EVENT _VALID , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _CONFIRM , function ( ) { self . _showHint ( ) , self . _checkText ( ) , self . fireEvent ( BI . ShelterEditor . EVENT _CONFIRM , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _CHANGE _CONFIRM , function ( ) { self . _showHint ( ) , self . _checkText ( ) , self . fireEvent ( BI . ShelterEditor . EVENT _CHANGE _CONFIRM , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _START , function ( ) { self . fireEvent ( BI . ShelterEditor . EVENT _START , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _PAUSE , function ( ) { self . fireEvent ( BI . ShelterEditor . EVENT _PAUSE , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _STOP , function ( ) { self . fireEvent ( BI . ShelterEditor . EVENT _STOP , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _SPACE , function ( ) { self . fireEvent ( BI . ShelterEditor . EVENT _SPACE , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _ERROR , function ( ) { self . _checkText ( ) , self . fireEvent ( BI . ShelterEditor . EVENT _ERROR , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _ENTER , function ( ) { self . fireEvent ( BI . ShelterEditor . EVENT _ENTER , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _RESTRICT , function ( ) { self . fireEvent ( BI . ShelterEditor . EVENT _RESTRICT , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _EMPTY , function ( ) { self . fireEvent ( BI . ShelterEditor . EVENT _EMPTY , arguments ) } ) , BI . createWidget ( { type : "bi.vertical" , scrolly : ! 1 , element : this , items : [ this . editor ] } ) , this . _showHint ( ) , self . _checkText ( ) } , _checkText : function ( ) { var o = this . options ; "" === this . editor . getValue ( ) ? ( this . text . setValue
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 . CLICK && ( self . setAllSelected ( self . allSelected ) , self . fireEvent ( BI . SelectList . EVENT _CHANGE , value , obj ) ) , self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) , this . list = BI . createWidget ( o . el , { type : "bi.list_pane" , items : o . items , itemsCreator : function ( op , callback ) { 1 === op . times && self . toolbar . setVisible ( ! 1 ) , o . itemsCreator ( op , function ( items ) { callback . apply ( self , arguments ) , 1 === op . times && ( self . toolbar . setVisible ( items && items . length > 0 ) , self . toolbar . setEnable ( self . isEnabled ( ) && items && items . length > 0 ) ) , self . _checkAllSelected ( ) } ) } , onLoaded : o . onLoaded , hasNext : o . hasNext } ) , this . list . on ( BI . Controller . EVENT _CHANGE , function ( type , value , obj ) { type === BI . Events . CLICK && ( self . _checkAllSelected ( ) , self . fireEvent ( BI . SelectList . 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 : BI . LogicFactory . createLogicItemsByDirection ( o . direction , this . toolbar , this . list ) } ) ) ) ) , o . items . length <= 0 && ( this . toolbar . setVisible ( ! 1 ) , this . toolbar . setEnable ( ! 1 ) ) , BI . isNotNull ( o . value ) && this . setValue ( o . value ) } , _checkAllSelected : function ( ) { var selectLength = this . list . getValue ( ) . length , notSelectLength = this . getAllLeaves ( ) . length - selectLength , hasNext = this . list . hasNext ( ) , isAlreadyAllSelected = this . toolbar . isSelected ( ) , isHalf = selectLength > 0 && ( notSelectLength > 0 || ! isAlreadyAllSelected && hasNext ) ; isHalf = isHalf || notSelectLength > 0 && hasNext && isAlreadyAllSelected , this . toolbar . setHalfSelected ( isHalf ) , ! isHalf && this . toolbar . setSelected ( selectLength > 0 && notSelectLength <= 0 && ( ! hasNext || isAlreadyAllSelected ) ) } , setAllSelected : function ( v ) { BI . each ( this . getAllButtons ( ) , function ( i , b
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 ) , value : o . value , el : BI . extend ( { type : "bi.button_tree" , chooseType : 0 , layouts : [ { type : "bi.vertical" } ] } , o . el ) } ) , this . tree . on ( BI . Controller . EVENT _CHANGE , function ( type , value , ob ) { self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) , type === BI . Events . CLICK && self . fireEvent ( BI . LevelTree . EVENT _CHANGE , value , ob ) } ) } , stroke : function ( nodes ) { this . tree . stroke . apply ( this . tree , arguments ) } , populate : function ( items , keyword ) { items = this . _formatItems ( BI . Tree . transformToTreeFormat ( items ) , 0 ) , this . tree . populate ( items , keyword ) } , setValue : function ( v ) { this . tree . setValue ( v ) } , getValue : function ( ) { return this . tree . getValue ( ) } , getAllLeaves : function ( ) { return this . tree . getAllLeaves ( ) } , getNodeById : function ( id ) { return this . tree . getNodeById ( id ) } , getNodeByValue : function ( id ) { return this . tree . getNodeByValue ( id ) } } ) , BI . LevelTree . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.level_tree" , BI . LevelTree ) , BI . DisplayTree = BI . inherit ( BI . TreeView , { _defaultConfig : function ( ) { return BI . extend ( BI . DisplayTree . superclass . _defaultConfig . apply ( this , arguments ) , { extraCls : "bi-display-tree" } ) } , _init : function ( ) { BI . DisplayTree . superclass . _init . apply ( this , arguments ) } , _configSetting : function ( ) { function beforeCollapse ( treeId , treeNode ) { return ! 1 } var setting = { view : { selectedMulti : ! 1 , dblClickExpand : ! 1 , showIcon : ! 1 , nameIsHTML : ! 0 , showTitle : ! 1 } , data : { key : { title : "title" , name : "text" } , simpleData : { enable : ! 0 } } , callback : { beforeCollapse : beforeCollapse } } ; return setting } , _dealWidthNodes : function ( nodes ) { nodes = BI . DisplayTree . superclass . _dealWidthNodes . apply ( this , arguments ) ; var self = this , o = this . options ; return BI . each ( nodes , function ( i , node ) { node . isParent = node . isParent || node . parent , null == node . text && node . count > 0 && ( node . text = node . value + "(" + BI . i18nText ( "BI-Basic_Altogether" ) + node . count
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 ( BI . Calendar . getPageByDateJSON ( self . selectedTime ) ) , self . calendar . setValue ( self . selectedTime ) , 0 !== day && self . fireEvent ( BI . DateCalendarPopup . EVENT _CHANGE ) } ) , this . calendar = BI . createWidget ( { direction : "custom" , type : "bi.navigation" , tab : this . datePicker , cardCreator : BI . bind ( this . _createNav , this ) } ) , this . calendar . on ( BI . Navigation . EVENT _CHANGE , function ( ) { self . selectedTime = self . calendar . getValue ( ) , self . calendar . empty ( ) , self . setValue ( self . selectedTime ) , self . fireEvent ( BI . DateCalendarPopup . EVENT _CHANGE ) } ) , this . setValue ( o . selectedTime ) , BI . createWidget ( { type : "bi.vtape" , element : this , items : [ { el : this . datePicker , height : 40 } , this . calendar ] , hgap : 10 } ) , BI . createWidget ( { type : "bi.absolute" , element : this , items : [ { el : { type : "bi.layout" , cls : "bi-split-top" } , height : 1 , top : 40 , left : 0 , right : 0 } ] } ) } , _createNav : function ( v ) { var date = BI . Calendar . getDateJSONByPage ( v ) , calendar = BI . createWidget ( { type : "bi.calendar" , logic : { dynamic : ! 1 } , min : this . options . min , max : this . options . max , year : date . year , month : date . month , day : this . selectedTime . day } ) ; return calendar } , _getNewCurrentDate : function ( ) { var today = BI . getDate ( ) ; return { year : today . getFullYear ( ) , month : today . getMonth ( ) + 1 } } , _setCalenderValue : function ( date ) { this . calendar . setSelect ( BI . Calendar . getPageByDateJSON ( date ) ) , this . calendar . setValue ( date ) , this . selectedTime = date } , _setDatePicker : function ( timeOb ) { BI . isNull ( timeOb ) || BI . isNull ( timeOb . year ) || BI . isNull ( timeOb . month ) ? this . datePicker . setValue ( this . _getNewCurrentDate ( ) ) : this . datePicker . setValue ( timeOb ) } , _setCalendar : function ( timeOb ) { BI . isNull ( timeOb ) || BI . isNull ( timeOb . day ) ? ( this . calendar . empty ( ) , this . _setCalenderValue ( this . _getNewCurrentDate ( ) ) ) : this . _setCalenderValue ( timeOb ) } , setValue : function ( timeOb ) { this . _setDatePicker ( timeOb ) , this . _setCalendar ( timeOb ) } , getValue : function ( ) { return t
} } ) } ( ) , 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 ( this . isSelected ( ) ? self . _getParamJson ( [ { dateType : BI . DynamicDateCard . TYPE . WORK _DAY } ] ) : [ ] ) , self . position = BI . DynamicDateCard . OFFSET . CURRENT , self . fireEvent ( "EVENT_CHANGE" ) } } ] } } ] , ref : function ( ) { self . workDay = this } } , { type : "bi.button_group" , items : this . _getParamJson ( [ { dateType : BI . DynamicDateCard . TYPE . YEAR } ] ) , ref : function ( ) { self . resultPane = this } , layouts : [ { type : "bi.vertical" , bgap : 10 , hgap : 10 } ] } ] } } , _getParamJson : function ( values , positionValue ) { var self = this , items = BI . map ( values , function ( idx , value ) { return { el : { type : "bi.dynamic_date_param_item" , dateType : value . dateType , value : value . value , offset : value . offset , listeners : [ { eventName : "EVENT_CHANGE" , action : function ( ) { self . fireEvent ( "EVENT_CHANGE" ) } } ] } , tgap : 0 === idx ? 5 : 0 } } ) ; if ( 1 === values . length && values [ 0 ] . dateType === BI . DynamicDateCard . TYPE . DAY ) { var comboItems = this . _getText ( BI . DynamicDateCard . TYPE . MONTH ) ; comboItems [ 0 ] . text = BI . i18nText ( "BI-Basic_Empty" ) , items . push ( { type : "bi.text_value_combo" , height : 24 , items : comboItems , container : null , value : positionValue || BI . DynamicDateCard . OFFSET . CURRENT , listeners : [ { eventName : "EVENT_CHANGE" , action : function ( ) { self . position = this . getValue ( ) [ 0 ] , self . fireEvent ( "EVENT_CHANGE" ) } } ] } ) } else 0 !== values . length && BI . last ( values ) . dateType !== BI . DynamicDateCard . TYPE . DAY && BI . last ( values ) . dateType !== BI . DynamicDateCard . TYPE . WORK _DAY && items . push ( { type : "bi.text_value_combo" , height : 24 , container : null , items : this . _getText ( BI . last ( values ) . dateType ) , value : positionValue || BI . DynamicDateCard . OFFSET . CURRENT , listeners : [ { eventName : "EVENT_CHANGE" , action : function ( ) { self . position = this . getValue ( ) [ 0 ] , self . fireEvent ( "EVENT_CHANGE" ) } } ] } ) ; return items } , _getText : function ( lastValue ) { switch ( lastValue ) { case BI . DynamicDateCard . TYPE . YEAR : return [ { text : BI . i18nText ( "BI-Basic_Current_Day" ) , value : BI . DynamicDateCard . OFFSET . CURRENT } , { text : BI . i18nText ( "BI-Basic_Year_Begin" ) , value : BI . DynamicDateCard . OFFSET . BEGIN } , { text : BI . i18nText ( "BI-Basic_Year_End" ) , value : BI . DynamicDateCard . OFFSET . END } ] ; case BI . DynamicDateCard . TYPE . QUARTER : return [ { text : BI . i18nText ( "BI-Basic_Current_Day" ) , value : BI . DynamicDateCard . OFFSET . CURRENT } , { text : BI . i18nText ( "BI-Basic_Quarter_Begin" ) , value : BI . DynamicDateCard . OFFSET . BEGIN } , { te
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 : function ( v ) { this . storeValue = v , this . trigger . setValue ( v ) , this . _checkDynamicValue ( v ) } , getValue : function ( ) { return this . storeValue } , getKey : function ( ) { return this . trigger . getKey ( ) } , hidePopupView : function ( ) { this . combo . hideView ( ) } , isValid : function ( ) { return this . trigger . isValid ( ) } } ) , BI . DynamicDateTimeCombo . EVENT _KEY _DOWN = "EVENT_KEY_DOWN" , BI . DynamicDateTimeCombo . EVENT _CONFIRM = "EVENT_CONFIRM" , BI . DynamicDateTimeCombo . EVENT _FOCUS = "EVENT_FOCUS" , BI . DynamicDateTimeCombo . EVENT _BLUR = "EVENT_BLUR" , BI . DynamicDateTimeCombo . EVENT _CHANGE = "EVENT_CHANGE" , BI . DynamicDateTimeCombo . EVENT _VALID = "EVENT_VALID" , BI . DynamicDateTimeCombo . EVENT _ERROR = "EVENT_ERROR" , BI . DynamicDateTimeCombo . EVENT _BEFORE _POPUPVIEW = "EVENT_BEFORE_POPUPVIEW" , BI . shortcut ( "bi.dynamic_date_time_combo" , BI . DynamicDateTimeCombo ) , BI . extend ( BI . DynamicDateTimeCombo , { Static : 1 , Dynamic : 2 } ) , BI . DynamicDateTimePopup = BI . inherit ( BI . Widget , { constants : { tabHeight : 30 , buttonHeight : 24 } , props : { baseCls : "bi-dynamic-date-time-popup" , width : 248 , height : 385 } , _init : function ( ) { BI . DynamicDateTimePopup . superclass . _init . apply ( this , arguments ) ; var self = this , opts = this . options , c = this . constants ; this . storeValue = { type : BI . DynamicDateCombo . Static } , BI . createWidget ( { element : this , type : "bi.vtape" , items : [ { el : this . _getTabJson ( ) } , { el : { type : "bi.grid" , items : [ [ { type : "bi.text_button" , cls : "bi-high-light bi-split-top" , textHeight : c . buttonHeight - 1 , shadow : ! 0 , text : BI . i18nText ( "BI-Basic_Clear" ) , listeners : [ { eventName : BI . TextButton . EVENT _CHANGE , action : function ( ) { self . fireEvent ( BI . DynamicDateTimePopup . BUTTON _CLEAR _EVENT _CHANGE ) } } ] } , { type : "bi.text_button" , cls : "bi-split-left bi-split-right bi-high-light bi-split-top" , textHeight : c . buttonHeight - 1 , shadow : ! 0 , text : BI . i18nText ( "BI-Multi_Date_Today" ) , ref : function ( ) { self . textButton = this } , listeners : [ { eventName : BI . TextButton . EVENT _CHANGE , action : function ( ) { self . fireEvent ( BI . DynamicDateTimePopup . BUTTON _lABEL _EVENT _CHANGE ) } } ] } , { type : "bi.text_button" , cls : "bi-high-light bi-split-top" , textHeight : c . buttonHeight - 1 , shadow : ! 0 , text : BI . i18nText ( "BI-Basic_OK" ) , listeners : [ { eventName : BI . TextButton . EVENT _CHANGE , action : function ( ) { self . fireEvent ( BI . DynamicDateTimePopup . BUTTON _OK _EVENT _CHANGE ) } } ] } ] ] } , height : 24 } ] } ) , this . s
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 ( significantPercent ) , this . labelTwo . setValue ( v ) , this . valueTwo = v , this . _checkLabelPosition ( oldValueOne , oldValueTwo , this . valueOne , v ) ) , this . _setBlueTrack ( ) } , _rePosBySizeAfterStop : function ( size , isLeft ) { var percent = 100 * size / this . _getGrayTrackLength ( ) , significantPercent = BI . parseFloat ( percent . toFixed ( 1 ) ) ; isLeft ? this . _setSliderOnePosition ( significantPercent ) : this . _setSliderTwoPosition ( significantPercent ) } , _draggable : function ( widget , isLeft ) { 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 ) { mouseMoveTracker . isDragging ( ) && ( startDrag = ! 0 , offset += deltaX , size = optimizeSize ( defaultSize + offset ) , widget . element . addClass ( "dragging" ) , self . _rePosBySizeAfterMove ( size , isLeft ) ) } , function ( ) { startDrag === ! 0 && ( size = optimizeSize ( size ) , self . _rePosBySizeAfterStop ( size , isLeft ) , size = 0 , offset = 0 , defaultSize = size , startDrag = ! 1 ) , widget . element . removeClass ( "dragging" ) , mouseMoveTracker . releaseMouseMoves ( ) , self . fireEvent ( BI . IntervalSlider . EVENT _CHANGE ) } , window ) ; widget . element . on ( "mousedown" , function ( event ) { widget . isEnabled ( ) && ( defaultSize = this . offsetLeft , optimizeSize ( defaultSize ) , mouseMoveTracker . captureMouseMoves ( event ) ) } ) } , _createLabelWrapper : function ( ) { var c = this . _constant ; return { el : { type : "bi.vertical" , items : [ { type : "bi.absolute" , items : [ { el : this . labelOne , top : 0 , left : "0%" } ] } , { type : "bi.absolute" , items : [ { el : this . labelTwo , top : 0 , left : "100%" } ] } ] , rgap : c . EDITOR _R _GAP , height : c . SLIDER _HEIGHT } , top : 0 , left : 0 , width : "100%" } } , _createSliderWrapper : function ( ) { var c = this . _constant ; return { el : { type : "bi.vertical" , items : [ { type : "bi.absolute" , items : [ { el : this . sliderOne , top : 0 , left : "0%" } ] } , { type : "bi.absolute" , items : [ { el : this . sliderTwo , top : 0 , left : "100%" } ] } ] , hgap : c . SLIDER _WIDTH _HALF , height : c . SLIDER _HEIGHT } , top : 20 , left : 0 , width : "100%" } } , _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 : functi
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 ( ) { return this . tree . getAllLeaves ( ) } , getNodeById : function ( id ) { return this . tree . getNodeById ( id ) } , getNodeByValue : function ( id ) { return this . tree . getNodeByValue ( id ) } } ) , BI . MultiLayerSelectLevelTree . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.multilayer_select_level_tree" , BI . MultiLayerSelectLevelTree ) , BI . MultiLayerSelectTreePopup = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . MultiLayerSelectTreePopup . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-multilayer-select-tree-popup" , tipText : BI . i18nText ( "BI-No_Selected_Item" ) , isDefaultInit : ! 1 , itemsCreator : BI . emptyFn , items : [ ] , value : "" , onLoaded : BI . emptyFn } ) } , _init : function ( ) { BI . MultiLayerSelectTreePopup . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . tree = BI . createWidget ( { type : "bi.multilayer_select_level_tree" , isDefaultInit : o . isDefaultInit , items : o . items , itemsCreator : o . itemsCreator , keywordGetter : o . keywordGetter , value : o . value , scrollable : null , onLoaded : function ( ) { self . tree . check ( ) , o . onLoaded ( ) } } ) , BI . createWidget ( { type : "bi.vertical" , scrolly : ! 1 , scrollable : ! 0 , element : this , vgap : 5 , items : [ this . tree ] } ) , this . tree . on ( BI . Controller . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) , this . tree . on ( BI . MultiLayerSelectLevelTree . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . MultiLayerSelectTreePopup . EVENT _CHANGE ) } ) } , 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 . MultiLayerSelectTreePopup . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.multilayer_select_tree_popup" , BI . MultiLayerSelectTreePopup ) , BI . MultiLayerSelectTreeTrigger = BI . inherit ( BI . Trigger , { props : function ( ) { return { extraCls : "bi-multi-layer-select-tree-trigger bi-border bi-focus-shadow bi-border-radius" , height : 24 , valueFormatter : function ( v ) { return v } , itemsCreator : BI . emptyFn , watermark : BI . i18nText ( "BI-Basic_Search" ) , allowSearchValue : ! 1 } } , render : function ( ) { var self = this , o = this . options ; o . itemsCreator === BI . emptyFn && this . _initData ( ) ; var content = { type : "bi.htape" , items : [ { el : { type : "bi.searcher" , ref : function ( ) { self . searcher = this } , masker : BI . isNotNull ( o . container ) ? { offset : { } , container : o . container } : { offset : { } } , isAutoSearch : ! 1 , el : { type : "bi.state_editor" , ref : function ( ) { self . editor = this } , defaultText : o . text , text : this . _digest ( o . value ) , value : o . value , height : o . height , tipText : "" , watermark : o . watermark , listeners : [ { eventName : BI . StateEditor . EVENT _FOCUS , action : function ( ) { self . fireEvent ( BI . MultiLayerSelectTreeTrigger . EVENT _FOCUS ) } } , { eventName : BI . StateEditor . EV
} , 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 , arguments ) ; return BI . extend ( conf , { extraCls : "bi-multilayer-single-tree-last-plus-group-node bi-list-item" , layer : 0 , id : "" , pId : "" , open : ! 1 , height : 24 } ) } , _init : function ( ) { BI . MultiLayerSingleTreeLastPlusGroupNode . 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 . MultiLayerSingleTreeLastPlusGroupNode . superclass . doClick . apply ( this , arguments ) , this . node . setSelected ( this . isSelected ( ) ) } , setOpened : function ( v ) { BI . MultiLayerSingleTreeLastPlusGroupNode . 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.last_plus_group_node" , cls : "bi-list-item-none" , logic : { dynamic : ! 0 } , id : o . id , pId : o . pId , open : o . open , 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_last_plus_group_node" , BI . MultiLayerSingleTreeLastPlusGroupNode ) , BI . MultiLayerSingleTreeMidPlusGroupNode = BI . inherit ( BI . NodeButton , { _defaultConfig : function ( ) { var conf = BI . MultiLayerSingleTreeMidPlusGroupNode . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { extraCls : "bi-multilayer-single-tree-mid-plus-group-node bi-list-item" , layer : 0 , id : "" , pId : "" , open : ! 1 , height : 24 } ) } , _init : function ( ) { BI . MultiLayerSingleTreeMidPlusGroupNode . 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 . MultiLayerSingleTreeMidPlusGroupNode . superclass . doClick . apply ( this , arguments ) , this . node . setSelected ( this . isSelected ( ) ) } , setOpened : function ( v ) { BI . MultiLayerSingleTreeMidPlusGroupNode . superclass . setOpened . apply ( this , arguments ) , BI . isNotNull ( this . node ) && this . node . setOpened ( v ) } , _crea
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 . populate . apply ( this . numberCounter , arguments ) } } ) , BI . extend ( BI . MultiSelectNoBarCombo , { REQ _GET _DATA _LENGTH : 1 , REQ _GET _ALL _DATA : - 1 } ) , BI . MultiSelectNoBarCombo . EVENT _BLUR = "EVENT_BLUR" , BI . MultiSelectNoBarCombo . EVENT _FOCUS = "EVENT_FOCUS" , BI . MultiSelectNoBarCombo . EVENT _STOP = "EVENT_STOP" , BI . MultiSelectNoBarCombo . EVENT _SEARCHING = "EVENT_SEARCHING" , BI . MultiSelectNoBarCombo . EVENT _CLICK _ITEM = "EVENT_CLICK_ITEM" , BI . MultiSelectNoBarCombo . EVENT _CONFIRM = "EVENT_CONFIRM" , BI . shortcut ( "bi.multi_select_no_bar_combo" , BI . MultiSelectNoBarCombo ) , BI . MultiSelectInsertCombo = BI . inherit ( BI . Single , { _defaultConfig : function ( ) { return BI . extend ( BI . MultiSelectInsertCombo . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-multi-select-insert-combo" , itemsCreator : BI . emptyFn , valueFormatter : BI . emptyFn , height : 24 , attributes : { tabIndex : 0 } , allowEdit : ! 0 } ) } , _init : function ( ) { BI . MultiSelectInsertCombo . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options , assertShowValue = function ( ) { BI . isKey ( self . _startValue ) && ( self . storeValue . type === BI . Selection . All ? BI . remove ( self . storeValue . value , self . _startValue ) : BI . pushDistinct ( self . storeValue . value , self . _startValue ) ) , self . trigger . getSearcher ( ) . setState ( self . storeValue ) , self . numberCounter . setButtonChecked ( self . storeValue ) } ; this . storeValue = o . value || { } , this . requesting = ! 1 , this . trigger = BI . createWidget ( { type : "bi.multi_select_insert_trigger" , allowEdit : o . allowEdit , height : o . height , text : o . text , watermark : o . watermark , masker : { offset : { left : 0 , top : 0 , right : 0 , bottom : 25 } } , valueFormatter : o . valueFormatter , itemsCreator : BI . bind ( this . _itemsCreator4Trigger , this ) , value : o . value } ) , this . trigger . on ( BI . MultiSelectInsertTrigger . EVENT _FOCUS , function ( ) { self . fireEvent ( BI . MultiSelectInsertCombo . EVENT _FOCUS ) } ) , this . trigger . on ( BI . MultiSelectInsertTrigger . EVENT _BLUR , function ( ) { self . fireEvent ( BI . MultiSelectInsertCombo . EVENT _BLUR ) } ) , this . trigger . on ( BI . MultiSelectInsertTrigger . EVENT _START , function ( ) { self . _setStartValue ( "" ) , this . getSearcher ( ) . setValue ( self . storeValue ) } ) , this . trigger . on ( BI . MultiSelectInsertTrigger . EVENT _STOP , function ( ) { self . _setStartValue ( "" ) , self . fireEvent ( BI . MultiSelectInsertCombo . EVENT _STOP ) } ) , this . trigger . on ( BI . MultiSelectInsertTrigger . EVENT _PAUSE , function ( ) { this . getSearcher ( ) . hasMatched ( ) && self . _addItem ( assertShowValue ) } ) , this . trigger . on ( BI . MultiSelectInsertTrigger . EVENT _ADD _ITEM , function ( ) { this . getSearcher ( ) . hasMatched ( ) || ( self . _addItem ( assertShowValue ) , self . _stopEditing ( ) ) } ) , this . trigger . on ( BI . MultiSelectInsertTrigger . EVENT _SEARCHING , function ( keywords ) { var last = BI . last ( keywords ) ; keywords = BI . initial ( keywords || [ ] ) , keywords . length > 0 && self . _joinKeywords ( keywords , function ( ) { BI . isEndWithBlank ( last ) ? ( self . combo . setValue ( self . storeValue ) , assertShowValue ( ) , self . combo . populate ( ) , self . _setStartValue ( "" ) ) : ( self . combo . setValue ( self . storeValue ) , assertShowValue ( ) ) } ) , self . fireEvent ( BI . MultiSelectInsertCombo . EVENT _SEARCHING ) } ) , this . trigger . on ( BI . MultiSelectInsertTrigger . EVENT _CHANGE , function ( value , obj ) { obj instanceof BI . MultiSelectBar ? self . _joinAll ( this . getValue ( ) , function ( ) { assertShowValue ( ) } ) : self . _join ( this . getValue ( ) , function ( ) { assertShowValue ( ) } ) , self . fireEvent ( BI . MultiSelectInsertCombo . EVENT _CLICK _ITEM ) } ) , this . trigger . on ( BI . MultiSelectInsertTrigger . EVENT _BEFORE _COUNTER _POPUPVIEW , function ( ) { self . numberCounter . updateSelectedValue ( self . storeValue ) } ) , this . trigger . on ( BI . MultiSelectI
} , setStartValue : function ( v ) { this . loader . setStartValue ( v ) } , setValue : function ( v ) { this . popupView . setValue ( v ) } , getValue : function ( ) { return this . popupView . getValue ( ) } , populate : function ( items ) { this . popupView . populate . apply ( this . popupView , arguments ) } , resetHeight : function ( h ) { this . popupView . resetHeight ( h ) } , resetWidth : function ( w ) { this . popupView . resetWidth ( w ) } } ) , BI . MultiSelectPopupView . EVENT _CHANGE = "EVENT_CHANGE" , BI . MultiSelectPopupView . EVENT _CLICK _CONFIRM = "EVENT_CLICK_CONFIRM" , BI . MultiSelectPopupView . EVENT _CLICK _CLEAR = "EVENT_CLICK_CLEAR" , BI . shortcut ( "bi.multi_select_popup_view" , BI . MultiSelectPopupView ) , BI . MultiSelectNoBarPopupView = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . MultiSelectNoBarPopupView . 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 . MultiSelectNoBarPopupView . superclass . _init . apply ( this , arguments ) ; var self = this , opts = this . options ; this . loader = BI . createWidget ( { type : "bi.multi_select_no_bar_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 . MultiSelectNoBarPopupView . EVENT _CHANGE ) } ) , this . popupView . on ( BI . MultiPopupView . EVENT _CLICK _TOOLBAR _BUTTON , function ( index ) { switch ( index ) { case 0 : self . fireEvent ( BI . MultiSelectNoBarPopupView . EVENT _CLICK _CLEAR ) ; break ; case 1 : self . fireEvent ( BI . MultiSelectNoBarPopupView . EVENT _CLICK _CONFIRM ) } } ) } , setStartValue : function ( v ) { this . loader . setStartValue ( v ) } , setValue : function ( v ) { this . popupView . setValue ( v ) } , getValue : function ( ) { return this . popupView . getValue ( ) } , populate : function ( items ) { this . popupView . populate . apply ( this . popupView , arguments ) } , resetHeight : function ( h ) { this . popupView . resetHeight ( h ) } , resetWidth : function ( w ) { this . popupView . resetWidth ( w ) } } ) , BI . MultiSelectNoBarPopupView . EVENT _CHANGE = "EVENT_CHANGE" , BI . MultiSelectNoBarPopupView . EVENT _CLICK _CONFIRM = "EVENT_CLICK_CONFIRM" , BI . MultiSelectNoBarPopupView . EVENT _CLICK _CLEAR = "EVENT_CLICK_CLEAR" , BI . shortcut ( "bi.multi_select_no_bar_popup_view" , BI . MultiSelectNoBarPopupView ) , BI . MultiSelectTrigger = BI . inherit ( BI . Trigger , { constants : { height : 14 , rgap : 4 , lgap : 4 } , _defaultConfig : function ( ) { return BI . extend ( BI . MultiSelectTrigger . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-multi-select-trigger bi-border bi-border-radius" , itemsCreator : BI . emptyFn , valueFormatter : BI . emptyFn , searcher : { } , switcher : { } , adapter : null , masker : { } , allowEdit : ! 0 } ) } , _init : function ( ) { BI . MultiSelectTrigger . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; o . height && this . setHeight ( o . height - 2 ) , this . searcher = BI . createWidget ( o . searcher , { type : "bi.multi_select_searcher" , height : o . height , text : o . text , itemsCreator : o . itemsCreator , valueFormatter : o . valueFormatter , watermark : o . watermark , popup : { } , adapter : o . adapter , masker : o . masker , value : o . value } ) , this . searcher . on ( BI . MultiSelectSearcher . EVENT _START , function ( ) { self . fireEvent ( BI . MultiSelectTrigger . EVENT _START ) } ) , this . searcher . on ( BI . MultiSelectSearcher . EVENT _PAUSE , function ( ) { self . fireEvent ( BI . MultiSelectTrigger . EVENT _PAUSE ) } ) , this . searcher . on ( BI . MultiSelectSearcher . EVENT _SEARCHING , function ( ) { self . fireEvent ( BI . MultiSelectTrigger . EVENT _SEARCHING , arguments ) } ) , this . searcher . on ( BI . MultiSelectSearcher . EVENT _STOP , function ( ) { self . fireEvent ( BI . MultiSelectTrigger . EVENT _STOP ) } ) , this . searcher . on ( BI . MultiSelectSearcher . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . MultiSelectTrigger . EVENT _CHANGE , arguments ) } ) , this . searcher . on ( BI . MultiSelectSearcher . EVENT _BLUR , function ( ) { self . fireEvent ( BI . MultiSelectTrigger . EVENT _BLUR ) } ) , this . searcher . on ( BI . MultiSelectSearcher . EVENT _FOCUS , function ( ) { self . fireEvent ( BI . MultiSelectTrigger . EVENT _FOCUS ) } ) , this . wrapNumberCounter = BI . createWidget
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 ) , map [ v ] = v ) } ) ; var change = ! 1 ; return BI . each ( res . assist , function ( i , v ) { BI . isNotNull ( map [ v ] ) && ( change = ! 0 , delete map [ v ] ) } ) , change && ( this . storeValue . value = BI . values ( map ) ) , void callback ( ) } this . _joinAll ( res , callback ) } , _setStartValue : function ( value ) { this . _startValue = value , this . adapter . setStartValue ( value ) } , isAllSelected : function ( ) { return this . adapter . isAllSelected ( ) } , resize : function ( ) { } , setValue : function ( v ) { this . storeValue = v || { } , this . _assertValue ( this . storeValue ) , this . adapter . setValue ( this . storeValue ) , this . trigger . setValue ( this . storeValue ) } , getValue : function ( ) { return BI . deepClone ( this . storeValue ) } , populate : function ( ) { this . adapter . populate . apply ( this . adapter , arguments ) , this . trigger . populate . apply ( this . trigger , arguments ) } } ) , BI . extend ( BI . MultiSelectInsertList , { REQ _GET _DATA _LENGTH : 1 , REQ _GET _ALL _DATA : - 1 } ) , BI . MultiSelectInsertList . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.multi_select_insert_list" , BI . MultiSelectInsertList ) , BI . MultiSelectInsertNoBarList = BI . inherit ( BI . Single , { _defaultConfig : function ( ) { return BI . extend ( BI . MultiSelectInsertNoBarList . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-multi-select-insert-list" , itemsCreator : BI . emptyFn , valueFormatter : BI . emptyFn } ) } , _init : function ( ) { BI . MultiSelectInsertNoBarList . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . storeValue = { type : BI . Selection . Multi , value : o . value || [ ] } ; var assertShowValue = function ( ) { BI . isKey ( self . _startValue ) && ( self . storeValue . type === BI . Selection . All ? BI . remove ( self . storeValue . value , self . _startValue ) : BI . pushDistinct ( self . storeValue . value , self . _startValue ) ) } ; this . adapter = BI . createWidget ( { type : "bi.multi_select_no_bar_loader" , cls : "popup-multi-select-list bi-border-left bi-border-right bi-border-bottom" , itemsCreator : o . itemsCreator , valueFormatter : o . valueFormatter , logic : { dynamic : ! 1 } , el : { } , value : { type : BI . Selection . Multi , value : o . value || [ ] } } ) , this . adapter . on ( BI . MultiSelectLoader . EVENT _CHANGE , function ( ) { self . storeValue = this . getValue ( ) , assertShowValue ( ) , self . fireEvent ( BI . MultiSelectInsertNoBarList . EVENT _CHANGE ) } ) , this . searcherPane = BI . createWidget ( { type : "bi.multi_select_search_insert_pane" , cls : "bi-border-left bi-border-right bi-border-bottom" , valueFormatter : o . valueFormatter , keywordGetter : function ( ) { return self . trigger . getKeyword ( ) } , itemsCreator : function ( op , callback ) { op . keywords = [ self . trigger . getKeyword ( ) ] , 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 . MultiSelectInsertNoBarList . EVENT _CHANGE ) ) } } ] } ) , this . searcherPane . setVisible ( ! 1 ) , this . trigger = BI . createWidget ( { type : "bi.searcher" , 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 . MultiSelectInsertNoBarList . EVENT _CHANGE ) } ) } } , { eventName : BI . Searcher . EVENT _SEARCHING , action : function ( ) { var keywords = this . getKeywords ( ) , last = BI . last ( keywords ) ; keyw
} ) ; triggerBtn . on ( BI . TriggerIconButton . EVENT _CHANGE , function ( ) { self . numberCounter . hideView ( ) , self . combo . isViewVisible ( ) ? self . combo . hideView ( ) : self . combo . showView ( ) } ) , this . numberCounter = BI . createWidget ( { type : "bi.multi_select_check_selected_switcher" , el : { type : "bi.multi_tree_check_selected_button" } , popup : { type : "bi.multi_tree_check_pane" } , itemsCreator : o . itemsCreator , masker : { offset : this . constants . offset } , valueFormatter : o . valueFormatter , value : o . value } ) , this . numberCounter . on ( BI . MultiSelectCheckSelectedSwitcher . EVENT _TRIGGER _CHANGE , function ( ) { self . combo . isViewVisible ( ) || self . combo . showView ( ) } ) , this . numberCounter . on ( BI . MultiSelectCheckSelectedSwitcher . EVENT _BEFORE _POPUPVIEW , function ( ) { want2showCounter === ! 1 && ( want2showCounter = ! 0 ) , isInit === ! 0 && ( want2showCounter = null , showCounter ( ) ) } ) , 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 } ] } ) } , _assertShowValue : function ( ) { this . trigger . getSearcher ( ) . setState ( this . storeValue ) , this . numberCounter . setButtonChecked ( this . storeValue ) } , _stopEditing : function ( ) { this . trigger . stopEditing ( ) , this . numberCounter . hideView ( ) } , _defaultState : function ( ) { this . _stopEditing ( ) , this . combo . hideView ( ) } , setValue : function ( v ) { this . storeValue . value = v || { } , this . combo . setValue ( { value : v || { } } ) , this . numberCounter . setValue ( { value : v || { } } ) } , getValue : function ( ) { return BI . deepClone ( this . storeValue . value ) } , populate : function ( ) { this . combo . populate . apply ( this . combo , arguments ) } } ) , BI . MultiTreeInsertCombo . EVENT _FOCUS = "EVENT_FOCUS" , BI . MultiTreeInsertCombo . EVENT _BLUR = "EVENT_BLUR" , BI . MultiTreeInsertCombo . EVENT _STOP = "EVENT_STOP" , BI . MultiTreeInsertCombo . EVENT _CLICK _ITEM = "EVENT_CLICK_ITEM" , BI . MultiTreeInsertCombo . EVENT _SEARCHING = "EVENT_SEARCHING" , BI . MultiTreeInsertCombo . EVENT _CONFIRM = "EVENT_CONFIRM" , BI . shortcut ( "bi.multi_tree_insert_combo" , BI . MultiTreeInsertCombo ) , BI . MultiTreeListCombo = BI . inherit ( BI . Single , { constants : { offset : { top : 0 , left : 0 , right : 0 , bottom : 25 } } , _defaultConfig : function ( ) { return BI . extend ( BI . MultiTreeListCombo . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-multi-tree-list-combo" , itemsCreator : BI . emptyFn , valueFormatter : BI . emptyFn , height : 24 , allowEdit : ! 0 , allowInsertValue : ! 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 . MultiTreeListCombo . 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 , text : o . text , watermark : o . watermark , height : o . height , valueFormatter : o . valueFormatter , masker : { offset : this . constants . offset } , searcher : { type : "bi.multi_list_tree_searcher" , itemsCreator : o . itemsCreator , popup : { type : o . allowInsertValue ? "bi.multi_tree_search_insert_pane" : "bi.multi_tree_search_pane" , el : { type : "bi.list_part_tree" } , listeners : [ { eventName : BI . MultiTreeSearchInsertPane . EVENT _ADD _ITEM , action : function ( ) { self . storeValue . value . unshift ( [ self . trigger . getSearcher ( ) . getKeyword ( ) ] ) , self . _assertShowValue ( ) , self . combo . setValue ( self . storeValue ) , self . numberCounter . setValue ( self . storeValue ) , self . _stopEditing ( ) } } ] } } , switcher : { el : { type : "bi.multi_tree_check_selected_button" } , popup : { type : "bi.multi_tree_check_pane" , el : { type : "bi.list_display_tree" } , itemsCreator : o . itemsCreator } } , 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 .
var c = this . constants , self = this ; w . on ( BI . NumberIntervalSingleEidtor . EVENT _ERROR , function ( ) { self . _checkValidation ( ) , BI . Bubbles . show ( c . typeError , BI . i18nText ( "BI-Numerical_Interval_Input_Data" ) , self , { offsetStyle : "left" , adjustYOffset : c . adjustYOffset } ) , self . fireEvent ( BI . NumberInterval . EVENT _ERROR ) } ) } , _setValidEvent : function ( w ) { var self = this , c = this . constants ; w . on ( BI . NumberIntervalSingleEidtor . EVENT _VALID , function ( ) { switch ( self . _checkValidation ( ) ) { case c . numberError : BI . Bubbles . show ( c . numberError , BI . i18nText ( "BI-Numerical_Interval_Number_Value" ) , self , { offsetStyle : "left" , adjustYOffset : c . adjustYOffset } ) , self . fireEvent ( BI . NumberInterval . EVENT _ERROR ) ; break ; case c . signalError : BI . Bubbles . show ( c . signalError , BI . i18nText ( "BI-Numerical_Interval_Signal_Value" ) , self , { offsetStyle : "left" , adjustYOffset : c . adjustYOffset } ) , self . fireEvent ( BI . NumberInterval . EVENT _ERROR ) ; break ; default : self . fireEvent ( BI . NumberInterval . EVENT _VALID ) } } ) } , _setEditorValueChangedEvent : function ( w ) { var self = this , c = this . constants ; w . on ( BI . NumberIntervalSingleEidtor . EVENT _CHANGE , function ( ) { switch ( self . _checkValidation ( ) ) { case c . typeError : BI . Bubbles . show ( c . typeError , BI . i18nText ( "BI-Numerical_Interval_Input_Data" ) , self , { offsetStyle : "left" , adjustYOffset : c . adjustYOffset } ) ; break ; case c . numberError : BI . Bubbles . show ( c . numberError , BI . i18nText ( "BI-Numerical_Interval_Number_Value" ) , self , { offsetStyle : "left" , adjustYOffset : c . adjustYOffset } ) ; break ; case c . signalError : BI . Bubbles . show ( c . signalError , BI . i18nText ( "BI-Numerical_Interval_Signal_Value" ) , self , { offsetStyle : "left" , adjustYOffset : c . adjustYOffset } ) } self . fireEvent ( BI . NumberInterval . EVENT _CHANGE ) } ) , w . on ( BI . NumberIntervalSingleEidtor . EVENT _CONFIRM , function ( ) { self . fireEvent ( BI . NumberInterval . EVENT _CONFIRM ) } ) } , _setComboValueChangedEvent : function ( w ) { var self = this , c = this . constants ; w . on ( BI . IconCombo . EVENT _CHANGE , function ( ) { switch ( self . _checkValidation ( ) ) { case c . typeError : self . _setTitle ( BI . i18nText ( "BI-Numerical_Interval_Input_Data" ) ) , self . fireEvent ( BI . NumberInterval . EVENT _ERROR ) ; break ; case c . numberError : self . _setTitle ( BI . i18nText ( "BI-Numerical_Interval_Number_Value" ) ) , self . fireEvent ( BI . NumberInterval . EVENT _ERROR ) ; break ; case c . signalError : self . _setTitle ( BI . i18nText ( "BI-Numerical_Interval_Signal_Value" ) ) , self . fireEvent ( BI . NumberInterval . EVENT _ERROR ) ; break ; default : self . fireEvent ( BI . NumberInterval . EVENT _CHANGE ) , self . fireEvent ( BI . NumberInterval . EVENT _CONFIRM ) , self . fireEvent ( BI . NumberInterval . EVENT _VALID ) } } ) } , isStateValid : function ( ) { return "valid" === this . options . validation } , setMinEnable : function ( b ) { this . smallEditor . setEnable ( b ) } , setCloseMinEnable : function ( b ) { this . smallCombo . setEnable ( b ) } , setMaxEnable : function ( b ) { this . bigEditor . setEnable ( b ) } , setCloseMaxEnable : function ( b ) { this . bigCombo . setEnable ( b ) } , showNumTip : function ( ) { this . smallTip . setVisible ( ! 0 ) , this . bigTip . setVisible ( ! 0 ) } , hideNumTip : function ( ) { this . smallTip . setVisible ( ! 1 ) , this . bigTip . setVisible ( ! 1 ) } , setNumTip : function ( numTip ) { this . smallTip . setText ( numTip ) , this . bigTip . setText ( numTip ) } , getNumTip : function ( ) { return this . smallTip . getText ( ) } , setValue : function ( data ) { data = data || { } ; var self = this , combo _value ; ( BI . isNumeric ( data . min ) || BI . isEmptyString ( data . min ) ) && self . smallEditor . setValue ( data . min ) , BI . isNotNull ( data . min ) || self . smallEditor . setValue ( "" ) , ( BI . isNumeric ( data . max ) || BI . isEmptyString ( data . max ) ) && self . bigEditor . setValue ( data . max ) , BI . isNotNull ( data . max ) || self . bigEditor . setValue ( "" ) , BI . isNull ( data . closeMin ) || ( combo _value = data . closeMin === ! 0 ? 1 : 0 , self . smallCombo . setValue ( combo _value ) ) , BI . isNull ( data . closeMax ) || ( combo _value = data . closeMax === ! 0 ? 1 : 0 , self . bigCombo . setValue ( combo _value ) ) , this . _checkValidation ( ) } , getValue : function ( ) { var self = this , value = { } , minComboValue = self . smallCombo . getValue ( ) , maxComboValue = self . bigCombo . getValue ( ) ; return value . min = self . smallEditor . getValue ( ) , value . max = self . bigEditor . getValue ( ) , 0 === minComboValue [ 0 ] ? value . closeMin = ! 1 : value . closeMin = ! 0 , 0 === maxComboValue [ 0 ] ? value . closeMax = ! 1 : value . closeMax = ! 0 , value } , destroyed : function ( ) { var c = this . constants ; BI . Bubbles . remove ( c . typeError ) , BI . Bubbles . remove ( c . numberError ) , BI . Bubbles . remove ( c . signalError ) } } ) , BI . NumberInterval . EVENT _CHANGE = "EVENT_CHANGE" , BI
} , setOpened : function ( v ) { BI . SelectTreeLastPlusGroupNode . superclass . setOpened . apply ( this , arguments ) , BI . isNotNull ( this . checkbox ) && this . checkbox . setSelected ( v ) } } ) , BI . shortcut ( "bi.select_tree_last_plus_group_node" , BI . SelectTreeLastPlusGroupNode ) , BI . SelectTreeMidPlusGroupNode = BI . inherit ( BI . NodeButton , { _defaultConfig : function ( ) { var conf = BI . SelectTreeMidPlusGroupNode . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { baseCls : ( conf . baseCls || "" ) + " bi-select-tree-mid-plus-group-node bi-list-item-active" , logic : { dynamic : ! 1 } , id : "" , pId : "" , readonly : ! 0 , open : ! 1 , height : 24 } ) } , _init : function ( ) { BI . SelectTreeMidPlusGroupNode . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . checkbox = BI . createWidget ( { type : "bi.mid_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 . SelectTreeMidPlusGroupNode . superclass . setOpened . apply ( this , arguments ) , BI . isNotNull ( this . checkbox ) && this . checkbox . setSelected ( v ) } } ) , BI . shortcut ( "bi.select_tree_mid_plus_group_node" , BI . SelectTreeMidPlusGroupNode ) , BI . SelectTreePlusGroupNode = BI . inherit ( BI . NodeButton , { _defaultConfig : function ( ) { var conf = BI . SelectTreePlusGroupNode . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { baseCls : ( conf . baseCls || "" ) + " bi-select-tree-plus-group-node bi-list-item-active" , logic : { dynamic : ! 1 } , id : "" , pId : "" , readonly : ! 0 , open : ! 1 , height : 24 } ) } , _init : function ( ) { BI . SelectTreePlusGroupNode . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . checkbox = BI . createWidget ( { type : "bi.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 . SelectTreePlusGroupNode . superclass . setOpened . apply ( this , arguments ) , BI . isNotNull ( this . checkbox ) && this . checkbox . setSelected ( v ) } } ) , BI . shortcut ( "bi.select_tree_plus_group_node" , BI . SelectTreePlusGroupNode ) , BI . SelectTreeCombo = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . SelectTreeCombo . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-select-tree-combo" , height : 24 , text : "" , items : [ ] , value : "" , attributes : { tabIndex : 0 } } ) } , _init : function ( ) { BI . SelectTreeCombo . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . trigger = BI . createWidget ( { type : "bi.single_tree_trigger" , text : o . text , height : o . height , items : o . items , value : o . value } ) , this . popup = BI . createWidget ( { type : "bi.select_level_tree" , items : o . items , value : o . value } ) , this . combo = BI . createWidget ( { type : "bi.combo" , conta
return ! 0 } } , layouts : [ { type : "bi.vertical" } ] } } } , opts . el ) , itemsCreator : function ( op , callback ) { var startValue = self . _startValue ; BI . isNotNull ( self . storeValue ) && ( op = BI . extend ( op || { } , { selectedValues : [ self . storeValue ] } ) ) , opts . itemsCreator ( op , function ( ob ) { hasNext = ob . hasNext ; var firstItems = [ ] ; if ( 1 === op . times && BI . isNotNull ( self . storeValue ) ) { var json = BI . map ( [ self . storeValue ] , function ( i , v ) { var txt = opts . valueFormatter ( v ) || v ; return { text : txt , value : v , 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 = startValue ) , self . setValue ( self . storeValue ) ) , 1 === op . times && self . _scrollToTop ( ) } ) } , hasNext : function ( ) { return hasNext } , value : this . storeValue } ) , 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 . SingleSelectList . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . SingleSelectLoader . EVENT _CHANGE , arguments ) } ) } , _createItems : function ( items ) { return BI . createItems ( items , { type : this . options . allowNoSelect ? "bi.single_select_item" : "bi.single_select_combo_item" , logic : this . options . logic , cls : "bi-list-item-active" , height : 24 , selected : ! 1 } ) } , _scrollToTop : function ( ) { var self = this ; BI . delay ( function ( ) { self . button _group . element . scrollTop ( 0 ) } , 30 ) } , _assertValue : function ( val ) { } , setStartValue : function ( v ) { this . _startValue = v } , setValue : function ( v ) { this . storeValue = v , this . _assertValue ( this . storeValue ) , this . button _group . setValue ( this . storeValue ) } , getValue : function ( ) { return this . button _group . getValue ( ) } , getAllButtons : function ( ) { return this . button _group . getAllButtons ( ) } , empty : function ( ) { this . button _group . empty ( ) } , populate : function ( items ) { this . button _group . populate . apply ( this . button _group , arguments ) } , resetHeight : function ( h ) { this . button _group . resetHeight ( h ) } , resetWidth : function ( w ) { this . button _group . resetWidth ( w ) } } ) , BI . SingleSelectLoader . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.single_select_loader" , BI . SingleSelectLoader ) , BI . SingleSelectPopupView = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . SingleSelectPopupView . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-single-select-popup-view" , allowNoSelect : ! 1 , maxWidth : "auto" , minWidth : 135 , maxHeight : 400 , valueFormatter : BI . emptyFn , itemsCreator : BI . emptyFn , onLoaded : BI . emptyFn } ) } , _init : function ( ) { BI . SingleSelectPopupView . superclass . _init . apply ( this , arguments ) ; var self = this , opts = this . options ; this . loader = BI . createWidget ( { type : "bi.single_select_loader" , allowNoSelect : opts . allowNoSelect , itemsCreator : opts . itemsCreator , valueFormatter : opts . valueFormatter , onLoaded : opts . onLoaded , value : opts . value } ) , this . popupView = BI . createWidget ( { type : "bi.popup_view" , stopPropagation : ! 1 , maxWidth : opts . maxWidth , minWidth : opts . minWidth , maxHeight : opts . maxHeight , element : this , el : this . loader , value : opts . value } ) , this . popupView . on ( BI . MultiPopupView . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . SingleSelectPopupView . EVENT _CHANGE ) } ) } , setStartValue : function ( v ) { this . loader . setStartValue ( v ) } , setValue : function ( v ) { this . popupView . setValue ( v ) } , getValue : function ( ) { return this . popupView . getValue ( ) } , populate : function ( items ) { this . popupView . populate . apply ( this . popupView , arguments ) } , resetHeight : function ( h ) { this . popupView . resetHeight ( h ) } , resetWidth : function ( w ) { this . popupView . resetWidth ( w ) } } ) , BI . SingleSelectPopupView . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.single_select_popup_view" , BI . SingleSelectPopupView ) , BI . SingleSelectTrigger = BI . inherit ( BI . Trigger , { constants : { height : 14 , rgap : 4 , lgap : 4 } , _defaultConfig : function ( ) { return BI . extend ( BI . SingleSelectTrigger . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-single-select-trigger bi-border bi-border-radius" , allowNoSelect : ! 1 , itemsCreator : BI . emptyFn , valueFormatter : BI . emptyFn , searcher : { } , switcher : { } , adapter : null , masker : { } , allowEdit : ! 0 } ) } , _init : function ( ) { BI . SingleSelectTrigger . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; o . height && this . setHeight ( o . height - 2 ) , this . searcher = BI . createWidge
_constant : { HEIGHT : 28 , SLIDER _WIDTH _HALF : 15 , SLIDER _WIDTH : 30 , SLIDER _HEIGHT : 30 , TRACK _HEIGHT : 24 , TRACK _GAP _HALF : 7 , TRACK _GAP : 14 } , props : { baseCls : "bi-single-slider-normal bi-slider-track" , minMax : { min : 0 , max : 100 } } , render : function ( ) { var self = this , c = this . _constant , track = this . _createTrack ( ) ; 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 } ) ; return 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 ) ; self . value = v , self . fireEvent ( BI . SingleSlider . EVENT _CHANGE ) } } ) , { type : "bi.absolute" , element : this , items : [ { el : { type : "bi.vertical" , items : [ { type : "bi.absolute" , items : [ { el : track , width : "100%" , height : c . TRACK _HEIGHT } ] } ] , hgap : c . TRACK _GAP _HALF , height : c . TRACK _HEIGHT } , top : 3 , left : 0 , width : "100%" } , { el : sliderVertical , 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 . _setSliderPosition ( significantPercent ) ; var v = self . _getValueByPercent ( significantPercent ) ; v = o . digit === ! 1 ? v : v . toFixed ( o . digit ) , self . value = v , self . fireEvent ( BI . SingleSliderNormal . EVENT _DRAG , v ) } } , 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 . SingleSlider . EVENT _CHANGE ) } , window ) ; widget . element . on ( "mousedown" , function ( event ) { widget . isEnabled ( ) && ( defaultSize = this . offsetLeft , optimizeSize ( defaultSize ) , mouseMoveTracker . captureMouseMoves ( event ) ) } ) } , _createTrack : function ( ) { var self = this , c = this . _constant ; return 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 . options . color && this . blueTrack . element . css ( { "background-color" : this . options . color } ) , { 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%" } ] , ref : function ( ref ) { self . track = ref } } } , _checkValidation : function ( v ) { return ! ( BI . isNull ( v ) || v < this . min || v > this . max ) } , _setBlueTrack : function ( percent ) { this . blueTrack . element . css ( { width : percent + "%" } ) } , _setSliderPosition : function ( percent ) { this . slider . element . css ( { left : percent + "%" } ) } , _setAllPosition : function ( percent ) { this . _setSliderPosition ( percent ) , this . _setBlueTrack ( percent ) } , _setVisible : function ( visible ) { this . slider . 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 . SingleSliderNormal . superclass . _setEnable . apply ( this , [ b ] ) , b ? this . blueTrack . element . removeClass ( "disabled-blue-track" ) . addClass ( "blue-track" ) : this . blueTrac
baseCls : "bi-year-card" , behaviors : { } , min : "1900-01-01" , max : "2099-12-31" } ) } , _createYearCalendar : function ( v ) { var o = this . options , y = this . _year , calendar = BI . createWidget ( { type : "bi.year_calendar" , behaviors : o . behaviors , min : o . min , max : o . max , logic : { dynamic : ! 0 } , year : y + 12 * v } ) ; return calendar . setValue ( this . _year ) , calendar } , _init : function ( ) { BI . StaticYearCard . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . selectedYear = this . _year = BI . getDate ( ) . getFullYear ( ) , this . backBtn = BI . createWidget ( { type : "bi.icon_button" , cls : "pre-page-h-font" , width : 25 , height : 25 , value : - 1 , listeners : [ { eventName : BI . IconButton . EVENT _CHANGE , action : function ( ) { self . navigation . setSelect ( self . navigation . getSelect ( ) - 1 ) , self . _checkLeftValid ( ) , self . _checkRightValid ( ) } } ] } ) , this . preBtn = BI . createWidget ( { type : "bi.icon_button" , cls : "next-page-h-font" , width : 25 , height : 25 , value : 1 , listeners : [ { eventName : BI . IconButton . EVENT _CHANGE , action : function ( ) { self . navigation . setSelect ( self . navigation . getSelect ( ) + 1 ) , self . _checkLeftValid ( ) , self . _checkRightValid ( ) } } ] } ) , this . navigation = BI . createWidget ( { type : "bi.navigation" , direction : "top" , element : this , single : ! 0 , logic : { dynamic : ! 0 } , tab : { type : "bi.htape" , cls : "bi-split-top bi-split-bottom" , height : 30 , items : [ { el : { type : "bi.center_adapt" , items : [ self . backBtn ] } , width : 25 } , { type : "bi.layout" } , { el : { type : "bi.center_adapt" , items : [ self . preBtn ] } , width : 25 } ] } , cardCreator : BI . bind ( this . _createYearCalendar , this ) , afterCardShow : function ( ) { this . setValue ( self . selectedYear ) ; var calendar = this . getSelectedCard ( ) ; self . backBtn . setEnable ( ! calendar . isFrontYear ( ) ) , 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 . StaticYearCard . EVENT _CHANGE , self . selectedYear ) } ) , BI . isKey ( o . value ) && this . setValue ( o . value ) } , _checkLeftValid : function ( ) { var o = this . options , valid = ! 0 ; return this . backBtn . setEnable ( valid ) , valid } , _checkRightValid : function ( ) { var o = this . options , valid = ! 0 ; return this . preBtn . setEnable ( valid ) , valid } , getValue : function ( ) { return { year : this . selectedYear } } , setValue : function ( obj ) { var o = this . options ; obj = obj || { } ; var v = obj . year ; BI . checkDateVoid ( v , 1 , 1 , o . min , o . max ) [ 0 ] ? ( v = BI . getDate ( ) . getFullYear ( ) , this . selectedYear = "" , this . navigation . setSelect ( BI . YearCalendar . getPageByYear ( v ) ) , this . navigation . setValue ( "" ) ) : ( this . selectedYear = BI . parseInt ( v ) , this . navigation . setSelect ( BI . YearCalendar . getPageByYear ( v ) ) , this . navigation . setValue ( this . selectedYear ) ) , this . _checkLeftValid ( ) , this . _checkRightValid ( ) } } ) , BI . StaticYearCard . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.static_year_card" , BI . StaticYearCard ) , BI . DynamicYearCombo = BI . inherit ( BI . Widget , { props : { baseCls : "bi-year-combo bi-border bi-focus-shadow" , behaviors : { } , min : "1900-01-01" , max : "2099-12-31" , height : 22 } , _init : function ( ) { BI . DynamicYearCombo . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . storeValue = o . value , this . trigger = BI . createWidget ( { type : "bi.dynamic_year_trigger" , min : o . min , max : o . max , height : o . height , value : o . value || "" } ) , this . trigger . on ( BI . DynamicYearTrigger . EVENT _KEY _DOWN , function ( ) { self . combo . isViewVisible ( ) && self . combo . hideView ( ) } ) , this . trigger . on ( BI . DynamicYearTrigger . EVENT _FOCUS , function ( ) { self . storeTriggerValue = this . getKey ( ) } ) , this . trigger . on ( BI . DynamicYearTrigger . EVENT _START , function ( ) { self . combo . isViewVisible ( ) && self . combo . hideView ( ) } ) , this . trigger . on ( BI . DynamicYearTrigger . EVENT _STOP , function ( ) { self . combo . showView ( ) } ) , this . trigger . on ( BI . DynamicYearTrigger . EVENT _ERROR , function ( ) { self . combo . isViewVisible ( ) && self . combo . hideView ( ) } ) , this . trigger . on ( BI . DynamicYearTrigger . EVENT _CONFIRM , function ( ) { self . combo . isViewVisible ( ) || ( this . getKey ( ) && this . getKey ( ) !== self . storeTriggerValue ? ( self . storeValue = self . trigger . getValue ( ) , self . setValue ( self . storeValue ) ) : this . getKey ( ) || ( self . storeValue = null , self . setValue ( ) ) , self . _checkDynamicValue ( self . storeValue ) , self . fireEvent ( BI . DynamicYearCombo . EVENT _CONFIRM ) ) } ) , this . combo = BI . createWidget ( { type : "bi.combo" , container : o . container , isNeedAdjustHeight : ! 1 , isNeedAdjustWidth : ! 1 , el : this . trigger , popup : { minWidth : 85 , stopPropagation : ! 1 , el : {
} , isValid : function ( ) { return this . yearEditor . isValid ( ) && this . monthEditor . isValid ( ) } } ) , BI . DynamicYearMonthTrigger . EVENT _VALID = "EVENT_VALID" , BI . DynamicYearMonthTrigger . EVENT _FOCUS = "EVENT_FOCUS" , BI . DynamicYearMonthTrigger . EVENT _ERROR = "EVENT_ERROR" , BI . DynamicYearMonthTrigger . EVENT _START = "EVENT_START" , BI . DynamicYearMonthTrigger . EVENT _CONFIRM = "EVENT_CONFIRM" , BI . DynamicYearMonthTrigger . EVENT _STOP = "EVENT_STOP" , BI . DynamicYearMonthTrigger . EVENT _KEY _DOWN = "EVENT_KEY_DOWN" , BI . shortcut ( "bi.dynamic_year_month_trigger" , BI . DynamicYearMonthTrigger ) , BI . YearMonthInterval = BI . inherit ( BI . Single , { constants : { height : 24 , width : 25 , lgap : 15 , offset : - 15 , timeErrorCls : "time-error" } , props : { extraCls : "bi-year-month-interval" , minDate : "1900-01-01" , maxDate : "2099-12-31" } , _init : function ( ) { var self = this , o = this . options ; BI . YearMonthInterval . superclass . _init . apply ( this , arguments ) , o . value = o . value || { } , this . left = this . _createCombo ( o . value . start ) , this . right = this . _createCombo ( o . value . end ) , this . label = BI . createWidget ( { type : "bi.label" , height : this . constants . height , width : this . constants . width , text : "-" } ) , BI . createWidget ( { element : self , type : "bi.center" , hgap : 15 , height : this . constants . height , items : [ { type : "bi.absolute" , items : [ { el : self . left , left : this . constants . offset , right : 0 , top : 0 , bottom : 0 } ] } , { type : "bi.absolute" , items : [ { el : self . right , left : 0 , right : this . constants . offset , top : 0 , bottom : 0 } ] } ] } ) , BI . createWidget ( { type : "bi.horizontal_auto" , element : this , items : [ self . label ] } ) } , _createCombo : function ( v ) { var self = this , o = this . options , combo = BI . createWidget ( { type : "bi.dynamic_year_month_combo" , behaviors : o . behaviors , value : v , listeners : [ { eventName : BI . DynamicYearMonthCombo . EVENT _BEFORE _POPUPVIEW , action : function ( ) { self . fireEvent ( BI . YearMonthInterval . EVENT _BEFORE _POPUPVIEW ) } } ] } ) ; return combo . on ( BI . DynamicYearMonthCombo . EVENT _ERROR , function ( ) { self . _clearTitle ( ) , BI . Bubbles . hide ( "error" ) , self . element . removeClass ( self . constants . timeErrorCls ) , self . fireEvent ( BI . YearMonthInterval . EVENT _ERROR ) } ) , combo . on ( BI . DynamicYearMonthCombo . EVENT _VALID , function ( ) { self . _checkValid ( ) } ) , combo . on ( BI . DynamicYearMonthCombo . EVENT _FOCUS , function ( ) { self . _checkValid ( ) } ) , combo . on ( BI . DynamicYearMonthCombo . EVENT _BEFORE _POPUPVIEW , function ( ) { self . left . hideView ( ) , self . right . hideView ( ) } ) , combo . on ( BI . DynamicYearMonthCombo . 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 . YearMonthInterval . EVENT _ERROR ) ) : ( self . _clearTitle ( ) , self . element . removeClass ( self . constants . timeErrorCls ) , self . fireEvent ( BI . YearMonthInterval . EVENT _CHANGE ) ) } ) , combo } , _dateCheck : function ( date ) { return BI . print ( BI . parseDateTime ( date , "%Y-%x" ) , "%Y-%x" ) === date || BI . print ( BI . parseDateTime ( date , "%Y-%X" ) , "%Y-%X" ) === date } , _checkVoid : function ( obj ) { var o = this . options ; return ! BI . checkDateVoid ( obj . year , obj . month , 1 , o . minDate , o . maxDate ) [ 0 ] } , _check : function ( smallDate , bigDate ) { var smallObj = smallDate . match ( /\d+/g ) , bigObj = bigDate . match ( /\d+/g ) , smallDate4Check = "" ; BI . isNotNull ( smallObj ) && ( smallDate4Check = ( smallObj [ 0 ] || "" ) + "-" + ( smallObj [ 1 ] || 1 ) ) ; var bigDate4Check = "" ; return BI . isNotNull ( bigObj ) && ( bigDate4Check = ( bigObj [ 0 ] || "" ) + "-" + ( bigObj [ 1 ] || 1 ) ) , this . _dateCheck ( smallDate4Check ) && BI . checkDateLegal ( smallDate ) && this . _checkVoid ( { year : smallObj [ 0 ] , month : smallObj [ 1 ] , day : 1 } ) && this . _dateCheck ( bigDate4Check ) && BI . checkDateLegal ( bigDate ) && this . _checkVoid ( { year : bigObj [ 0 ] , month : bigObj [ 1 ] , day : 1 } ) } , _compare : function ( smallDate , bigDate ) { return smallDate = BI . print ( BI . parseDateTime ( smallDate , "%Y-%X" ) , "%Y-%X" ) , bigDate = BI . print ( BI . parseDateTime ( bigDate , "%Y-%X" ) , "%Y-%X" ) , BI . isNotNull ( smallDate ) && BI . isNotNull ( bigDate ) && smallDate > bigDate } , _setTitle : function ( v ) { this . setTitle ( v ) } , _clearTitle : function ( ) { this . setTitle ( "" ) } , _checkValid : function ( ) { var self = this ; 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 , bigD
_reqInitTreeNode : function ( op , callback ) { function search ( ) { var children = self . _getChildren ( [ ] ) , start = children . length ; if ( "" !== lastSearchValue ) { for ( var j = 0 , len = start ; j < len ; j ++ ) if ( children [ j ] . value === lastSearchValue ) { start = j + 1 ; break } } else start = 0 ; for ( var output = [ ] , i = start , len = children . length ; i < len ; i ++ ) { if ( output . length < self . _const . perPage ) var find = nodeSearch ( 1 , [ ] , children [ i ] . value , ! 1 , result ) ; else if ( output . length === self . _const . perPage ) var find = nodeSearch ( 1 , [ ] , children [ i ] . value , ! 1 , [ ] ) ; if ( find [ 0 ] === ! 0 && output . push ( children [ i ] . value ) , output . length > self . _const . perPage ) break } if ( 1 === op . times ) { var nodes = self . _getAddedValueNode ( [ ] , selectedValues ) ; result = BI . concat ( BI . filter ( nodes , function ( idx , node ) { var find = BI . Func . getSearchResult ( [ node . text || node . value ] , keyword ) ; return find . find . length > 0 || find . match . length > 0 } ) , result ) } return output } function nodeSearch ( deep , parentValues , current , isAllSelect , result ) { if ( self . _isMatch ( parentValues , current , keyword ) ) { var checked = isAllSelect || isSelected ( parentValues , current ) ; return createOneJson ( parentValues , current , ! 1 , checked , ! isAllSelect && isHalf ( parentValues , current ) , ! 0 , result ) , [ ! 0 , checked ] } var newParents = BI . clone ( parentValues ) ; newParents . push ( current ) ; var children = self . _getChildren ( newParents ) , can = ! 1 , checked = ! 1 , isCurAllSelected = isAllSelect || isAllSelected ( parentValues , current ) ; return BI . each ( children , function ( i , child ) { var state = nodeSearch ( deep + 1 , newParents , child . value , isCurAllSelected , result ) ; state [ 1 ] === ! 0 && ( checked = ! 0 ) , state [ 0 ] === ! 0 && ( can = ! 0 ) } ) , can === ! 0 && ( checked = isCurAllSelected || isSelected ( parentValues , current ) && checked , createOneJson ( parentValues , current , ! 0 , checked , ! 1 , ! 1 , result ) ) , [ can , checked ] } function createOneJson ( parentValues , value , isOpen , checked , half , flag , result ) { var node = self . _getTreeNode ( parentValues , value ) ; result . push ( { id : node . id , pId : node . pId , text : node . text , value : node . value , title : node . title , isParent : node . getChildrenLength ( ) > 0 , open : isOpen , checked : checked , halfCheck : half , flag : flag } ) } function isHalf ( parentValues , value ) { var find = findSelectedObj ( parentValues ) ; return null == find ? null : BI . any ( find , function ( v , ob ) { if ( v === value && null != ob && ! BI . isEmpty ( ob ) ) return ! 0 } ) } function isAllSelected ( parentValues , value ) { var find = findSelectedObj ( parentValues ) ; return null == find ? null : BI . any ( find , function ( v , ob ) { if ( v === value && null != ob && BI . isEmpty ( ob ) ) return ! 0 } ) } function isSelected ( parentValues , value ) { var find = findSelectedObj ( parentValues ) ; return null != find && BI . any ( find , function ( v ) { if ( v === value ) return ! 0 } ) } function findSelectedObj ( parentValues ) { var find = selectedValues ; return null == find ? null : ( BI . every ( parentValues , function ( i , v ) { return find = find [ v ] , null != find } ) , find ) } var self = this , result = [ ] , keyword = op . keyword || "" , selectedValues = op . selectedValues , lastSearchValue = op . lastSearchValue || "" , output = search ( ) ; BI . nextTick ( function ( ) { callback ( { hasNext : output . length > self . _const . perPage , items : result , lastSearchValue : BI . last ( output ) } ) } ) } , _reqTreeNode : function ( op , callback ) { function judgeState ( parentValues , selected _value , checkState ) { var checked = checkState . checked , half = checkState . half ; return ! ( parentValues . length > 0 && ! checked ) && ( 0 === parentValues . length || checked && half && ! BI . isEmpty ( selected _value ) ) } function dealWithSelectedValue ( parentValues , selectedValues ) { var valueMap = { } ; return BI . each ( parentValues , function ( i , v ) { selectedValues = selectedValues [ v ] || { } } ) , BI . each ( selectedValues , function ( value , obj ) { if ( BI . isNull ( obj ) ) return void ( valueMap [ value ] = [ 0 , 0 ] ) ; if ( BI . isEmpty ( obj ) ) return void ( valueMap [ value ] = [ 2 , 0 ] ) ; var nextNames = { } ; BI . each ( obj , function ( t , o ) { ( BI . isNull ( o ) || BI . isEmpty ( o ) ) && ( nextNames [ t ] = ! 0 ) } ) , valueMap [ value ] = [ 1 , BI . size ( nextNames ) ] } ) , valueMap } function getCheckState ( current , parentValues , valueMap , checkState ) { var checked = checkState . checked , half = checkState . half , tempCheck = ! 1 , halfCheck = ! 1 ; if ( BI . has ( valueMap , current ) ) if ( 1 === valueMap [ current ] [ 0 ] ) { var values = BI . clone ( parentValues ) ; values . push ( current ) ; var childCount = self . _getChildCount ( values ) ; childCount > 0 && childCount !== valueMap [ current ] [ 1 ] && ( halfCheck = ! 0 ) } else 2 === valueMap [ current ] [ 0 ] && ( tempCheck = ! 0 ) ; var check ; return check = checked || halfCheck || tempCheck ? ( tempCheck || checked ) && ! half || BI . has ( valueMap , current ) : BI . has (
callback && callback . apply ( this , args ) } , navigate : function ( fragment , options ) { return BI . history . navigate ( fragment , options ) , this } , _bindRoutes : function ( ) { if ( this . routes ) { this . routes = _ . result ( this , "routes" ) ; for ( var route , routes = _ . keys ( this . routes ) ; null != ( route = routes . pop ( ) ) ; ) this . route ( route , this . routes [ route ] ) } } , _routeToRegExp : function ( route ) { return route = route . replace ( escapeRegExp , "\\$&" ) . replace ( optionalParam , "(?:$1)?" ) . replace ( namedParam , function ( match , optional ) { return optional ? match : "([^/?]+)" } ) . replace ( splatParam , "([^?]*?)" ) , new RegExp ( "^" + route + "(?:\\?([\\s\\S]*))?$" ) } , _extractParameters : function ( route , fragment ) { var params = route . exec ( fragment ) . slice ( 1 ) ; return _ . map ( params , function ( param , i ) { return i === params . length - 1 ? param || null : param ? decodeURIComponent ( param ) : null } ) } } ) ; var History = function ( ) { this . handlers = [ ] , this . checkUrl = _ . bind ( this . checkUrl , this ) , "undefined" != typeof window && ( this . location = _global . location , this . history = _global . history ) } , routeStripper = /^[#\/]|\s+$/g , rootStripper = /^\/+|\/+$/g , pathStripper = /#.*$/ ; History . started = ! 1 , _ . extend ( History . prototype , Events , { interval : 50 , atRoot : function ( ) { var path = this . location . pathname . replace ( /[^\/]$/ , "$&/" ) ; return path === this . root && ! this . getSearch ( ) } , getSearch : function ( ) { var match = this . location . href . replace ( /#.*/ , "" ) . match ( /\?.+/ ) ; return match ? match [ 0 ] : "" } , getHash : function ( window ) { var match = ( window || this ) . location . href . match ( /#(.*)$/ ) ; return match ? match [ 1 ] : "" } , getPath : function ( ) { var path = decodeURI ( this . location . pathname + this . getSearch ( ) ) , root = this . root . slice ( 0 , - 1 ) ; return path . indexOf ( root ) || ( path = path . slice ( root . length ) ) , "/" === path . charAt ( 0 ) ? path . slice ( 1 ) : path } , getFragment : function ( fragment ) { return null == fragment && ( fragment = this . _hasPushState || ! this . _wantsHashChange ? this . getPath ( ) : this . getHash ( ) ) , fragment . replace ( routeStripper , "" ) } , start : function ( options ) { if ( History . started ) throw new Error ( "BI.history has already been started" ) ; if ( History . started = ! 0 , this . options = _ . extend ( { root : "/" } , this . options , options ) , this . root = this . options . root , this . _wantsHashChange = this . options . hashChange !== ! 1 , this . _hasHashChange = "onhashchange" in window , this . _wantsPushState = ! ! this . options . pushState , this . _hasPushState = ! ! ( this . options . pushState && this . history && this . history . pushState ) , this . fragment = this . getFragment ( ) , this . root = ( "/" + this . root + "/" ) . replace ( rootStripper , "/" ) , this . _wantsHashChange && this . _wantsPushState ) { if ( ! this . _hasPushState && ! this . atRoot ( ) ) { var root = this . root . slice ( 0 , - 1 ) || "/" ; return this . location . replace ( root + "#" + this . getPath ( ) ) , ! 0 } this . _hasPushState && this . atRoot ( ) && this . navigate ( this . getHash ( ) , { replace : ! 0 } ) } if ( ! this . _hasHashChange && this . _wantsHashChange && ( ! this . _wantsPushState || ! this . _hasPushState ) ) { var iframe = document . createElement ( "iframe" ) ; iframe . src = "javascript:0" , iframe . style . display = "none" , iframe . tabIndex = - 1 ; var body = document . body ; this . iframe = body . insertBefore ( iframe , body . firstChild ) . contentWindow , this . iframe . document . open ( ) . close ( ) , this . iframe . location . hash = "#" + this . fragment } var addEventListener = _global . addEventListener || function ( eventName , listener ) { return attachEvent ( "on" + eventName , listener ) } ; if ( this . _hasPushState ? addEventListener ( "popstate" , this . checkUrl , ! 1 ) : this . _wantsHashChange && this . _hasHashChange && ! this . iframe ? addEventListener ( "hashchange" , this . checkUrl , ! 1 ) : this . _wantsHashChange && ( this . _checkUrlInterval = setInterval ( this . checkUrl , this . interval ) ) , ! this . options . silent ) return this . loadUrl ( ) } , stop : function ( ) { var removeEventListener = _global . removeEventListener || function ( eventName , listener ) { return detachEvent ( "on" + eventName , listener ) } ; this . _hasPushState ? removeEventListener ( "popstate" , this . checkUrl , ! 1 ) : this . _wantsHashChange && this . _hasHashChange && ! this . iframe && removeEventListener ( "hashchange" , this . checkUrl , ! 1 ) , this . iframe && ( document . body . removeChild ( this . iframe . frameElement ) , this . iframe = null ) , this . _checkUrlInterval && clearInterval ( this . _checkUrlInterval ) , History . started = ! 1 } , route : function ( route , callback ) { this . handlers . unshift ( { route : route , callback : callback } ) } , checkUrl : function ( e ) { var current = this . getFragment ( ) ; return current === this . fragment && this . iframe && ( current = this . getHash ( this . iframe ) ) , curr
! 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 ) { 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 } ( e ) } } 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 ) } } ) ;