/*! fineui 2019-10-28 10:45:09 */
function _classCallCheck ( instance , Constructor ) { if ( ! ( instance instanceof Constructor ) ) throw new TypeError ( "Cannot call a class as a function" ) } ! function ( e ) { function o ( t ) { if ( r [ t ] ) return r [ t ] . exports ; var n = r [ t ] = { i : t , l : ! 1 , exports : { } } ; return e [ t ] . call ( n . exports , n , n . exports , o ) , n . l = ! 0 , n . exports } var r = { } ; o . m = e , o . c = r , o . d = function ( t , n , e ) { o . o ( t , n ) || Object . defineProperty ( t , n , { enumerable : ! 0 , get : e } ) } , o . r = function ( t ) { "undefined" != typeof Symbol && Symbol . toStringTag && Object . defineProperty ( t , Symbol . toStringTag , { value : "Module" } ) , Object . defineProperty ( t , "__esModule" , { value : ! 0 } ) } , o . t = function ( n , t ) { if ( 1 & t && ( n = o ( n ) ) , 8 & t ) return n ; if ( 4 & t && "object" == typeof n && n && n . _ _esModule ) return n ; var e = Object . create ( null ) ; if ( o . r ( e ) , Object . defineProperty ( e , "default" , { enumerable : ! 0 , value : n } ) , 2 & t && "string" != typeof n ) for ( var r in n ) o . d ( e , r , function ( t ) { return n [ t ] } . bind ( null , r ) ) ; return e } , o . n = function ( t ) { var n = t && t . _ _esModule ? function ( ) { return t [ "default" ] } : function ( ) { return t } ; return o . d ( n , "a" , n ) , n } , o . o = function ( t , n ) { return Object . prototype . hasOwnProperty . call ( t , n ) } , o . p = "" , o ( o . s = 70 ) } ( [ function ( e , t , n ) { ( function ( t ) { function n ( t ) { return t && t . Math == Math && t } e . exports = n ( "object" == typeof globalThis && globalThis ) || n ( "object" == typeof window && window ) || n ( "object" == typeof self && self ) || n ( "object" == typeof t && t ) || Function ( "return this" ) ( ) } ) . call ( this , n ( 74 ) ) } , function ( t , n , e ) { var r = e ( 0 ) , o = e ( 20 ) , i = e ( 41 ) , u = e ( 53 ) , c = r . Symbol , f = o ( "wks" ) ; t . exports = function ( t ) { return f [ t ] || ( f [ t ] = u && c [ t ] || ( u ? c : i ) ( "Symbol." + t ) ) } } , function ( t , n , e ) { var s = e ( 0 ) , l = e ( 24 ) . f , p = e ( 6 ) , v = e ( 11 ) , d = e ( 40 ) , h = e ( 77 ) , y = e ( 51 ) ; t . exports = function ( t , n ) { var e , r , o , i , u , c = t . target , f = t . global , a = t . stat ; if ( e = f ? s : a ? s [ c ] || d ( c , { } ) : ( s [ c ] || { } ) . prototype ) for ( r in n ) { if ( i = n [ r ] , o = t . noTargetGet ? ( u = l ( e , r ) ) && u . value : e [ r ] , ! y ( f ? r : c + ( a ? "." : "#" ) + r , t . forced ) && void 0 !== o ) { if ( typeof i == typeof o ) continue ; h ( i , o ) } ( t . sham || o && o . sham ) && p ( i , "sham" , ! 0 ) , v ( e , r , i , t ) } } } , function ( t , n , e ) { var r = e ( 7 ) ; t . exports = function ( t ) { if ( ! r ( t ) ) throw TypeError ( String ( t ) + " is not an object" ) ; return t } } , function ( t , n ) { t . exports = function ( t ) { try { return ! ! t ( ) } catch ( n ) { return ! 0 } } } , function ( t , n , e ) { var r = e ( 4 ) ; t . exports = ! r ( function ( ) { return 7 != Object . defineProperty ( { } , "a" , { get : function ( ) { return 7 } } ) . a } ) } , function ( t , n , e ) { var r = e ( 5 ) , o = e ( 9 ) , i = e ( 19 ) ; t . exports = r ? function ( t , n , e ) { return o . f ( t , n , i ( 1 , e ) ) } : function ( t , n , e ) { return t [ n ] = e , t } } , function ( t , n ) { t . exports = function ( t ) { return "object" == typeof t ? null !== t : "function" == typeof t } } , function ( t , n ) { var e = { } . hasOwnProperty ; t . exports = function ( t , n ) { return e . call ( t , n ) } } , function ( t , n , e ) { var r = e ( 5 ) , o = e ( 47 ) , i = e ( 3 ) , u = e ( 38 ) , c = Object . defineProperty ; n . f = r ? c : function ( t , n , e ) { if ( i ( t ) , n = u ( n , ! 0 ) , i ( e ) , o ) try { return c ( t , n , e ) } catch ( r ) { } if ( "get" in e || "set" in e ) throw TypeError ( "Accessors not supported" ) ; return "value" in e && ( t [ n ] = e . value ) , t } } , function ( t , n , e ) { t . exports = e ( 0 ) } , function ( t , n , e ) { var c = e ( 0 ) , r = e ( 20 ) , f = e ( 6 ) , a = e ( 8 ) , s = e ( 40 ) , o = e ( 48 ) , i = e ( 16 ) , u = i . get , l = i . enforce , p = String ( o ) . split ( "toString" ) ; r ( "inspectSource" , function ( t ) { return o . call ( t ) } ) , ( t . exports = function ( t , n , e , r ) { var o = ! ! r && ! ! r . unsafe , i = ! ! r && ! ! r . enumerable , u = ! ! r && ! ! r . noTargetGet ; "function" == typeof e && ( "string" != typeof n || a ( e , "name" ) || f ( e , "name" , n ) , l ( e ) . source = p . join ( "string" == typeof n ? n : "" ) ) , t !== c ? ( o ? ! u && t [ n ] && ( i = ! 0 ) : delete t [ n ] , i ? t [ n ] = e : f ( t , n , e ) ) : i ? t [ n ] = e : s ( n , e ) } ) ( Function . prototype , "toString" , function ( ) { return "function" == typeof this && u ( this ) . source || o . call ( this ) } ) } , function ( t , n ) { var e = { } . toString ; t . exports = function ( t ) { return e . call ( t ) . slice ( 8 , - 1 ) } } , function ( t , n ) { t . exports = function ( t ) { if ( "function" != typeof t ) throw TypeError ( String ( t ) + " is not a function" ) ; return t } } , function ( t , n , e ) { var r = e ( 37 ) , o = e ( 25 ) ; t . exports = function ( t ) { return r ( o ( t ) ) } } , function ( t , n ) { t . exports = ! 1 } , function ( t , n , e ) { var r , o , i , u = e ( 76 ) , c = e ( 0 ) , f = e ( 7 ) , a = e ( 6 ) , s = e ( 8 ) , l = e ( 26 ) , p = e ( 27 ) , v = c . WeakMap ; if ( u ) { var d = new v , h = d . get , y = d . has , g = d . set ; r = function ( t , n ) { return g . call ( d , t , n ) , n } , o = function ( t ) { return h . call ( d , t ) || { } } , i = function ( t ) { return y . call ( d , t ) } } else { var x = l ( "state" ) ; p [ x ] = ! 0 , r = function ( t , n ) { return a ( t , x , n ) , n } , o = function ( t ) { return s ( t , x ) ? t [ x ] : { } } , i = function ( t ) { return s ( t , x ) } } t . exports = { set : r , get : o , has : i , enforce : function ( t ) { return i ( t ) ? o ( t ) : r ( t , { } ) } , getterFor : func
S || ( r = function ( ) { var t , n ; for ( m && ( t = g . domain ) && t . exit ( ) ; o ; ) { n = o . fn , o = o . next ; try { n ( ) } catch ( e ) { throw o ? u ( ) : i = void 0 , e } } i = void 0 , t && t . enter ( ) } , u = m ? function ( ) { g . nextTick ( r ) } : y && ! /(iphone|ipod|ipad).*applewebkit/i . test ( h ) ? ( c = ! 0 , f = document . createTextNode ( "" ) , new y ( r ) . observe ( f , { characterData : ! 0 } ) , function ( ) { f . data = c = ! c } ) : x && x . resolve ? ( a = x . resolve ( void 0 ) , s = a . then , function ( ) { s . call ( a , r ) } ) : function ( ) { d . call ( l , r ) } ) , t . exports = S || function ( t ) { var n = { fn : t , next : void 0 } ; i && ( i . next = n ) , o || ( o = n , u ( ) ) , i = n } } , function ( t , n , e ) { var r = e ( 0 ) ; t . exports = function ( t , n ) { var e = r . console ; e && e . error && ( 1 === arguments . length ? e . error ( t ) : e . error ( t , n ) ) } } , function ( t , n , e ) { "use strict" ; var r = e ( 2 ) , o = e ( 15 ) , i = e ( 64 ) , u = e ( 17 ) , c = e ( 65 ) , f = e ( 67 ) , a = e ( 11 ) ; r ( { target : "Promise" , proto : ! 0 , real : ! 0 } , { "finally" : function ( n ) { var e = c ( this , u ( "Promise" ) ) , t = "function" == typeof n ; return this . then ( t ? function ( t ) { return f ( e , n ( ) ) . then ( function ( ) { return t } ) } : n , t ? function ( t ) { return f ( e , n ( ) ) . then ( function ( ) { throw t } ) } : n ) } } ) , o || "function" != typeof i || i . prototype [ "finally" ] || a ( i . prototype , "finally" , u ( "Promise" ) . prototype [ "finally" ] ) } , function ( t , n , e ) { "use strict" ; var r = e ( 2 ) , o = e ( 5 ) , i = e ( 32 ) , u = e ( 63 ) , c = e ( 21 ) , f = e ( 9 ) , a = e ( 19 ) , s = e ( 34 ) , l = e ( 6 ) , p = e ( 3 ) , v = e ( 16 ) , d = v . set , h = v . getterFor ( "AggregateError" ) , y = function ( t , n ) { var e = this ; if ( ! ( e instanceof y ) ) return new y ( t , n ) ; u && ( e = u ( new Error ( n ) , i ( e ) ) ) ; var r = [ ] ; return s ( t , r . push , r ) , o ? d ( e , { errors : r , type : "AggregateError" } ) : e . errors = r , void 0 !== n && l ( e , "message" , String ( n ) ) , e } ; y . prototype = c ( Error . prototype , { constructor : a ( 5 , y ) , message : a ( 5 , "" ) , name : a ( 5 , "AggregateError" ) , toString : a ( 5 , function ( ) { var t = p ( this ) . name ; t = void 0 === t ? "AggregateError" : String ( t ) ; var n = this . message ; return t + ": " + ( n = void 0 === n ? "" : String ( n ) ) } ) } ) , o && f . f ( y . prototype , "errors" , { get : function ( ) { return h ( this ) . errors } , configurable : ! 0 } ) , r ( { global : ! 0 } , { AggregateError : y } ) } , function ( t , n , e ) { e ( 68 ) } , function ( t , n , e ) { "use strict" ; var r = e ( 2 ) , o = e ( 23 ) , i = e ( 35 ) ; r ( { target : "Promise" , stat : ! 0 } , { "try" : function ( t ) { var n = o . f ( this ) , e = i ( t ) ; return ( e . error ? n . reject : n . resolve ) ( e . value ) , n . promise } } ) } , function ( t , n , e ) { "use strict" ; var r = e ( 2 ) , l = e ( 13 ) , p = e ( 17 ) , o = e ( 23 ) , i = e ( 35 ) , v = e ( 34 ) , d = "No one promise resolved" ; r ( { target : "Promise" , stat : ! 0 } , { any : function ( t ) { var f = this , n = o . f ( f ) , a = n . resolve , s = n . reject , e = i ( function ( ) { var r = l ( f . resolve ) , o = [ ] , i = 0 , u = 1 , c = ! 1 ; v ( t , function ( t ) { var n = i ++ , e = ! 1 ; o . push ( void 0 ) , u ++ , r . call ( f , t ) . then ( function ( t ) { e || c || ( c = ! 0 , a ( t ) ) } , function ( t ) { e || c || ( e = ! 0 , o [ n ] = t , -- u || s ( new ( p ( "AggregateError" ) ) ( o , d ) ) ) } ) } ) , -- u || s ( new ( p ( "AggregateError" ) ) ( o , d ) ) } ) ; return e . error && s ( e . value ) , n . promise } } ) } , function ( t , n , e ) { t . exports = e ( 135 ) } , function ( t , n , e ) { e ( 136 ) ; var r = e ( 33 ) ; t . exports = r ( "String" , "replace" ) } , function ( t , n , e ) { "use strict" ; var r = e ( 137 ) , w = e ( 3 ) , p = e ( 18 ) , P = e ( 28 ) , E = e ( 29 ) , i = e ( 25 ) , A = e ( 139 ) , T = e ( 140 ) , L = Math . max , M = Math . min , v = Math . floor , d = /\$([$&'`]|\d\d?|<[^>]*>)/g , h = /\$([$&'`]|\d\d?)/g ; r ( "replace" , 2 , function ( o , S , O ) { function j ( i , u , c , f , a , t ) { var s = c + i . length , l = f . length , n = h ; return void 0 !== a && ( a = p ( a ) , n = d ) , S . call ( t , n , function ( t , n ) { var e ; switch ( n . charAt ( 0 ) ) { case "$" : return "$" ; case "&" : return i ; case "`" : return u . slice ( 0 , c ) ; case "'" : return u . slice ( s ) ; case "<" : e = a [ n . slice ( 1 , - 1 ) ] ; break ; default : var r = + n ; if ( 0 == r ) return t ; if ( l < r ) { var o = v ( r / 10 ) ; return 0 === o ? t : o <= l ? void 0 === f [ o - 1 ] ? n . charAt ( 1 ) : f [ o - 1 ] + n . charAt ( 1 ) : t } e = f [ r - 1 ] } return void 0 === e ? "" : e } ) } return [ function ( t , n ) { var e = i ( this ) , r = void 0 == t ? void 0 : t [ o ] ; return void 0 !== r ? r . call ( t , e , n ) : S . call ( String ( e ) , t , n ) } , function ( t , n ) { var e = O ( S , t , this , n ) ; if ( e . done ) return e . value ; var r = w ( t ) , o = String ( this ) , i = "function" == typeof n ; i || ( n = String ( n ) ) ; var u = r . global ; if ( u ) { var c = r . unicode ; r . lastIndex = 0 } for ( var f = [ ] ; ; ) { var a = T ( r , o ) ; if ( null === a ) break ; if ( f . push ( a ) , ! u ) break ; "" === String ( a [ 0 ] ) && ( r . lastIndex = A ( o , P ( r . lastIndex ) , c ) ) } for ( var s , l = "" , p = 0 , v = 0 ; v < f . length ; v ++ ) { a = f [ v ] ; for ( var d = String ( a [ 0 ] ) , h = L ( M ( E ( a . index ) , o . length ) , 0 ) , y = [ ] , g = 1 ; g < a . length ; g ++ ) y . push ( void 0 === ( s = a [ g ] ) ? s : String ( s ) ) ; var x = a . groups ; if ( i ) { var m = [ d ] . concat ( y , h , o ) ; void 0 !== x && m . push ( x ) ; var b = String ( n . apply ( void 0 , m ) ) } else b = j ( d , o , h , y , x , n ) ; p <= h && ( l += o . slice ( p , h ) + b , p = h + d . length ) } return l + o . slice ( p ) } ] } ) } , function ( t , n , e ) { "use strict" ; var l = e ( 6 ) , p = e ( 11 ) , v = e ( 4 ) , d = e ( 1 ) , h = e ( 69 ) , y = d ( "species" ) , g =
var isArr = isArray ( srcValue ) , isBuff = ! isArr && isBuffer ( srcValue ) , isTyped = ! isArr && ! isBuff && isTypedArray ( srcValue ) ; newValue = srcValue , isArr || isBuff || isTyped ? isArray ( objValue ) ? newValue = objValue : isArrayLikeObject ( objValue ) ? newValue = copyArray ( objValue ) : isBuff ? ( isCommon = ! 1 , newValue = cloneBuffer ( srcValue , ! 0 ) ) : isTyped ? ( isCommon = ! 1 , newValue = cloneTypedArray ( srcValue , ! 0 ) ) : newValue = [ ] : isPlainObject ( srcValue ) || isArguments ( srcValue ) ? ( newValue = objValue , isArguments ( objValue ) ? newValue = toPlainObject ( objValue ) : ( ! isObject ( objValue ) || srcIndex && isFunction ( objValue ) ) && ( newValue = initCloneObject ( srcValue ) ) ) : isCommon = ! 1 } isCommon && ( stack . set ( srcValue , newValue ) , mergeFunc ( newValue , srcValue , srcIndex , customizer , stack ) , stack [ "delete" ] ( srcValue ) ) , assignMergeValue ( object , key , newValue ) } function baseOrderBy ( collection , iteratees , orders ) { var index = - 1 ; iteratees = arrayMap ( iteratees . length ? iteratees : [ identity ] , baseUnary ( baseIteratee ) ) ; var result = baseMap ( collection , function ( value , key , collection ) { var criteria = arrayMap ( iteratees , function ( iteratee ) { return iteratee ( value ) } ) ; return { criteria : criteria , index : ++ index , value : value } } ) ; return baseSortBy ( result , function ( object , other ) { return compareMultiple ( object , other , orders ) } ) } function basePick ( object , paths ) { return basePickBy ( object , paths , function ( value , path ) { return hasIn ( object , path ) } ) } function basePickBy ( object , paths , predicate ) { for ( var index = - 1 , length = paths . length , result = { } ; ++ index < length ; ) { var path = paths [ index ] , value = baseGet ( object , path ) ; predicate ( value , path ) && baseSet ( result , castPath ( path , object ) , value ) } return result } function basePropertyDeep ( path ) { return function ( object ) { return baseGet ( object , path ) } } function baseRandom ( lower , upper ) { return lower + nativeFloor ( nativeRandom ( ) * ( upper - lower + 1 ) ) } function baseRange ( start , end , step , fromRight ) { for ( var index = - 1 , length = nativeMax ( nativeCeil ( ( end - start ) / ( step || 1 ) ) , 0 ) , result = Array ( length ) ; length -- ; ) result [ fromRight ? length : ++ index ] = start , start += step ; return result } function baseRest ( func , start ) { return setToString ( overRest ( func , start , identity ) , func + "" ) } function baseSet ( object , path , value , customizer ) { if ( ! isObject ( object ) ) return object ; path = castPath ( path , object ) ; for ( var index = - 1 , length = path . length , lastIndex = length - 1 , nested = object ; null != nested && ++ index < length ; ) { var key = toKey ( path [ index ] ) , newValue = value ; 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 = castP
var result = lodash ( value ) ; return result . _ _chain _ _ = ! 0 , result } function tap ( value , interceptor ) { return interceptor ( value ) , value } function thru ( value , interceptor ) { return interceptor ( value ) } function wrapperChain ( ) { return chain ( this ) } function wrapperCommit ( ) { return new LodashWrapper ( this . value ( ) , this . _ _chain _ _ ) } function wrapperNext ( ) { this . _ _values _ _ === undefined && ( this . _ _values _ _ = toArray ( this . value ( ) ) ) ; var done = this . _ _index _ _ >= this . _ _values _ _ . length , value = done ? undefined : this . _ _values _ _ [ this . _ _index _ _ ++ ] ; return { done : done , value : value } } function wrapperToIterator ( ) { return this } function wrapperPlant ( value ) { for ( var result , parent = this ; parent instanceof baseLodash ; ) { var clone = wrapperClone ( parent ) ; clone . _ _index _ _ = 0 , clone . _ _values _ _ = undefined , result ? previous . _ _wrapped _ _ = clone : result = clone ; var previous = clone ; parent = parent . _ _wrapped _ _ } return previous . _ _wrapped _ _ = value , result } function wrapperReverse ( ) { var value = this . _ _wrapped _ _ ; if ( value instanceof LazyWrapper ) { var wrapped = value ; return this . _ _actions _ _ . length && ( wrapped = new LazyWrapper ( this ) ) , wrapped = wrapped . reverse ( ) , wrapped . _ _actions _ _ . push ( { func : thru , args : [ reverse ] , thisArg : undefined } ) , new LodashWrapper ( wrapped , this . _ _chain _ _ ) } return this . thru ( reverse ) } function wrapperValue ( ) { return baseWrapperValue ( this . _ _wrapped _ _ , this . _ _actions _ _ ) } function every ( collection , predicate , guard ) { var func = isArray ( collection ) ? arrayEvery : baseEvery ; return guard && isIterateeCall ( collection , predicate , guard ) && ( predicate = undefined ) , func ( collection , baseIteratee ( predicate , 3 ) ) } function filter ( collection , predicate ) { var func = isArray ( collection ) ? arrayFilter : baseFilter ; return func ( collection , baseIteratee ( predicate , 3 ) ) } function forEach ( collection , iteratee ) { var func = isArray ( collection ) ? arrayEach : baseEach ; return func ( collection , baseIteratee ( iteratee , 3 ) ) } function map ( collection , iteratee ) { var func = isArray ( collection ) ? arrayMap : baseMap ; return func ( collection , baseIteratee ( iteratee , 3 ) ) } function reduce ( collection , iteratee , accumulator ) { var func = isArray ( collection ) ? arrayReduce : baseReduce , initAccum = arguments . length < 3 ; return func ( collection , baseIteratee ( iteratee , 4 ) , accumulator , initAccum , baseEach ) } function reject ( collection , predicate ) { var func = isArray ( collection ) ? arrayFilter : baseFilter ; return func ( collection , negate ( baseIteratee ( predicate , 3 ) ) ) } function size ( collection ) { 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 } functi
lodash . reduce = reduce , lodash . result = result , lodash . size = size , lodash . some = some , lodash . trim = trim , lodash . uniqueId = uniqueId , lodash . each = forEach , lodash . first = head , mixin ( lodash , function ( ) { var source = { } ; return baseForOwn ( lodash , function ( func , methodName ) { hasOwnProperty . call ( lodash . prototype , methodName ) || ( source [ methodName ] = func ) } ) , source } ( ) , { chain : ! 1 } ) , lodash . VERSION = VERSION , arrayEach ( [ "drop" , "take" ] , function ( methodName , index ) { LazyWrapper . prototype [ methodName ] = function ( n ) { n = n === undefined ? 1 : nativeMax ( toInteger ( n ) , 0 ) ; var result = this . _ _filtered _ _ && ! index ? new LazyWrapper ( this ) : this . clone ( ) ; return result . _ _filtered _ _ ? result . _ _takeCount _ _ = nativeMin ( n , result . _ _takeCount _ _ ) : result . _ _views _ _ . push ( { size : nativeMin ( n , MAX _ARRAY _LENGTH ) , type : methodName + ( result . _ _dir _ _ < 0 ? "Right" : "" ) } ) , result } , LazyWrapper . prototype [ methodName + "Right" ] = function ( n ) { return this . reverse ( ) [ methodName ] ( n ) . reverse ( ) } } ) , arrayEach ( [ "filter" , "map" , "takeWhile" ] , function ( methodName , index ) { var type = index + 1 , isFilter = type == LAZY _FILTER _FLAG || type == LAZY _WHILE _FLAG ; LazyWrapper . prototype [ methodName ] = function ( iteratee ) { var result = this . clone ( ) ; return result . _ _iteratees _ _ . push ( { iteratee : getIteratee ( iteratee , 3 ) , type : type } ) , result . _ _filtered _ _ = result . _ _filtered _ _ || isFilter , result } } ) , arrayEach ( [ "head" , "last" ] , function ( methodName , index ) { var takeName = "take" + ( index ? "Right" : "" ) ; LazyWrapper . prototype [ methodName ] = function ( ) { return this [ takeName ] ( 1 ) . value ( ) [ 0 ] } } ) , arrayEach ( [ "initial" , "tail" ] , function ( methodName , index ) { var dropName = "drop" + ( index ? "" : "Right" ) ; LazyWrapper . prototype [ methodName ] = function ( ) { return this . _ _filtered _ _ ? new LazyWrapper ( this ) : this [ dropName ] ( 1 ) } } ) , LazyWrapper . prototype . compact = function ( ) { return this . filter ( identity ) } , LazyWrapper . prototype . find = function ( predicate ) { return this . filter ( predicate ) . head ( ) } , LazyWrapper . prototype . findLast = function ( predicate ) { return this . reverse ( ) . find ( predicate ) } , LazyWrapper . prototype . invokeMap = baseRest ( function ( path , args ) { return "function" == typeof path ? new LazyWrapper ( this ) : this . map ( function ( value ) { return baseInvoke ( value , path , args ) } ) } ) , LazyWrapper . prototype . reject = function ( predicate ) { return this . filter ( negate ( getIteratee ( predicate ) ) ) } , LazyWrapper . prototype . slice = function ( start , end ) { 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 ( meth
isEnabled : function ( ) { return ! this . options . disabled } , isVisible : function ( ) { return ! this . options . invisible } , disable : function ( ) { this . setEnable ( ! 1 ) } , enable : function ( ) { this . setEnable ( ! 0 ) } , valid : function ( ) { this . setValid ( ! 0 ) } , invalid : function ( ) { this . setValid ( ! 1 ) } , invisible : function ( ) { this . setVisible ( ! 1 ) } , visible : function ( ) { this . setVisible ( ! 0 ) } , _ _d : function ( ) { this . beforeDestroy && this . beforeDestroy ( ) , BI . each ( this . _children , function ( i , widget ) { widget && widget . _unMount && widget . _unMount ( ) } ) , this . _children = { } , this . _parent = null , this . _isMounted = ! 1 , this . destroyed && this . destroyed ( ) } , _unMount : function ( ) { this . _ _d ( ) , this . fireEvent ( BI . Events . UNMOUNT ) , this . purgeListeners ( ) } , isolate : function ( ) { this . _parent && this . _parent . removeWidget ( this ) , BI . DOM . hang ( [ this ] ) } , empty : function ( ) { BI . each ( this . _children , function ( i , widget ) { widget && widget . _unMount && widget . _unMount ( ) } ) , this . _children = { } , this . element . empty ( ) } , _destroy : function ( ) { this . _ _d ( ) , this . element . destroy ( ) , this . purgeListeners ( ) } , destroy : function ( ) { this . _ _d ( ) , this . element . destroy ( ) , this . fireEvent ( BI . Events . DESTROY ) , this . _purgeRef ( ) , this . purgeListeners ( ) } } ) , BI . Widget . registerRenderEngine = function ( engine ) { BI . Widget . _renderEngine = engine } , BI . Widget . registerRenderEngine ( { createElement : function ( widget ) { if ( BI . isWidget ( widget ) ) { var o = widget . options ; return o . element ? BI . $ ( o . element ) : BI . $ ( document . createElement ( o . tagName ) ) } return BI . $ ( widget ) } , createFragment : function ( ) { return document . createDocumentFragment ( ) } } ) , BI . mount = function ( widget , container , predicate , hydrate ) { if ( hydrate === ! 0 ) { widget . element . data ( "__widgets" , [ widget ] ) ; var res = widget . _mount ( ! 0 , ! 1 , ! 1 , function ( w ) { BI . each ( w . _children , function ( i , child ) { var ws = child . element . data ( "__widgets" ) ; ws || ( ws = [ ] ) , ws . push ( child ) , child . element . data ( "__widgets" , ws ) } ) , predicate && predicate . apply ( this , arguments ) } ) , c = BI . Widget . _renderEngine . createElement ; BI . DOM . patchProps ( widget . element , c ( c ( container ) . children ( ) [ 0 ] ) ) ; var triggerLifeHook = function ( w ) { 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 ) { for ( ; BI . prepares && BI . prepares . length > 0 ; ) BI . prepares . shift ( ) ( ) ; 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 = subtyp
offset = datum . offset + datum . size ; for ( var stop = start ; offset < maxOffset && stop < this . _cellCount - 1 ; ) stop ++ , offset += this . getSizeAndPositionOfCell ( stop ) . size ; return { start : start , stop : stop } } , resetCell : function ( index ) { this . _lastMeasuredIndex = Math . min ( this . _lastMeasuredIndex , index - 1 ) } , _binarySearch : function ( high , low , offset ) { for ( var middle , currentOffset ; low <= high ; ) { if ( middle = low + Math . floor ( ( high - low ) / 2 ) , currentOffset = this . getSizeAndPositionOfCell ( middle ) . offset , currentOffset === offset ) return middle ; currentOffset < offset ? low = middle + 1 : currentOffset > offset && ( high = middle - 1 ) } if ( low > 0 ) return low - 1 } , _exponentialSearch : function ( index , offset ) { for ( var interval = 1 ; index < this . _cellCount && this . getSizeAndPositionOfCell ( index ) . offset < offset ; ) index += interval , interval *= 2 ; return this . _binarySearch ( Math . min ( index , this . _cellCount - 1 ) , Math . floor ( index / 2 ) , offset ) } , _findNearestCell : function ( offset ) { if ( ! isNaN ( offset ) ) { offset = Math . max ( 0 , offset ) ; var lastMeasuredCellSizeAndPosition = this . getSizeAndPositionOfLastMeasuredCell ( ) , lastMeasuredIndex = Math . max ( 0 , this . _lastMeasuredIndex ) ; return lastMeasuredCellSizeAndPosition . offset >= offset ? this . _binarySearch ( lastMeasuredIndex , 0 , offset ) : this . _exponentialSearch ( lastMeasuredIndex , offset ) } } } , BI . ScalingCellSizeAndPositionManager = function ( cellCount , cellSizeGetter , estimatedCellSize , maxScrollSize ) { this . _cellSizeAndPositionManager = new BI . CellSizeAndPositionManager ( cellCount , cellSizeGetter , estimatedCellSize ) , this . _maxScrollSize = maxScrollSize || 1e7 } , BI . ScalingCellSizeAndPositionManager . prototype = { constructor : BI . ScalingCellSizeAndPositionManager , configure : function ( ) { this . _cellSizeAndPositionManager . configure . apply ( this . _cellSizeAndPositionManager , arguments ) } , getCellCount : function ( ) { return this . _cellSizeAndPositionManager . getCellCount ( ) } , getEstimatedCellSize : function ( ) { return this . _cellSizeAndPositionManager . getEstimatedCellSize ( ) } , getLastMeasuredIndex : function ( ) { return this . _cellSizeAndPositionManager . getLastMeasuredIndex ( ) } , 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 = " YDYQSXMWZSSXJBYMGCCZQPSSQBYCDSCDQLDYLYBSSJGYZZJJFKCCLZDHWDWZJLJPFYYNWJJTMYHZWZHFLZPPQHGSCYY
this . _onMoveEnd ( ) } } } ( ) , ! function ( ) { function normalizeWheel ( event ) { var sX = 0 , sY = 0 , pX = 0 , pY = 0 ; return "detail" in event && ( sY = event . detail ) , "wheelDelta" in event && ( sY = - event . wheelDelta / 120 ) , "wheelDeltaY" in event && ( sY = - event . wheelDeltaY / 120 ) , "wheelDeltaX" in event && ( sX = - event . wheelDeltaX / 120 ) , "axis" in event && event . axis === event . HORIZONTAL _AXIS && ( sX = sY , sY = 0 ) , pX = sX * PIXEL _STEP , pY = sY * PIXEL _STEP , "deltaY" in event && ( pY = event . deltaY ) , "deltaX" in event && ( pX = event . deltaX ) , ( pX || pY ) && event . deltaMode && ( 1 === event . deltaMode ? ( pX *= LINE _HEIGHT , pY *= LINE _HEIGHT ) : ( pX *= PAGE _HEIGHT , pY *= PAGE _HEIGHT ) ) , pX && ! sX && ( sX = pX < 1 ? - 1 : 1 ) , pY && ! sY && ( sY = pY < 1 ? - 1 : 1 ) , { spinX : sX , spinY : sY , pixelX : pX , pixelY : pY } } var PIXEL _STEP = 10 , LINE _HEIGHT = 40 , PAGE _HEIGHT = 800 , requestAnimationFrame = _global . requestAnimationFrame || _global . webkitRequestAnimationFrame || _global . mozRequestAnimationFrame || _global . oRequestAnimationFrame || _global . msRequestAnimationFrame || _global . setTimeout ; BI . WheelHandler = function ( onWheel , handleScrollX , handleScrollY , stopPropagation ) { this . _animationFrameID = null , this . _deltaX = 0 , this . _deltaY = 0 , this . _didWheel = BI . bind ( this . _didWheel , this ) , "function" != typeof handleScrollX && ( handleScrollX = handleScrollX ? function ( ) { return ! 0 } : function ( ) { return ! 1 } ) , "function" != typeof handleScrollY && ( handleScrollY = handleScrollY ? function ( ) { return ! 0 } : function ( ) { return ! 1 } ) , "function" != typeof stopPropagation && ( stopPropagation = stopPropagation ? function ( ) { return ! 0 } : function ( ) { return ! 1 } ) , this . _handleScrollX = handleScrollX , this . _handleScrollY = handleScrollY , this . _stopPropagation = stopPropagation , this . _onWheelCallback = onWheel , this . onWheel = BI . bind ( this . onWheel , this ) } , BI . WheelHandler . prototype = { constructor : BI . WheelHandler , onWheel : function ( event ) { var normalizedEvent = normalizeWheel ( event ) , deltaX = this . _deltaX + normalizedEvent . pixelX , deltaY = this . _deltaY + normalizedEvent . pixelY , handleScrollX = this . _handleScrollX ( deltaX , deltaY ) , handleScrollY = this . _handleScrollY ( deltaY , deltaX ) ; 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 (
} , empty : function ( ) { BI . Layout . superclass . empty . apply ( this , arguments ) , this . options . items = [ ] } , destroy : function ( ) { BI . Layout . superclass . destroy . apply ( this , arguments ) , this . options . items = [ ] } , populate : function ( items ) { var self = this , o = this . options ; return items = items || [ ] , this . _isMounted ? void this . update ( { items : items } ) : ( this . options . items = items , void this . stroke ( items ) ) } , resize : function ( ) { } } ) , BI . shortcut ( "bi.layout" , BI . Layout ) , BI . Plugin = BI . Plugin || { } , ! function ( ) { var _WidgetsPlugin = { } , _ObjectPlugin = { } , _ConfigPlugin = { } , _GlobalWidgetConfigFn , _GlobalObjectConfigFn ; BI . extend ( BI . Plugin , { getWidget : function ( type , options ) { if ( _GlobalWidgetConfigFn && _GlobalWidgetConfigFn ( type , options ) , _ConfigPlugin [ type ] ) for ( var i = _ConfigPlugin [ type ] . length - 1 ; i >= 0 ; i -- ) _ConfigPlugin [ type ] [ i ] ( options ) ; if ( _WidgetsPlugin [ type ] ) for ( var res , i = _WidgetsPlugin [ type ] . length - 1 ; i >= 0 ; i -- ) if ( res = _WidgetsPlugin [ type ] [ i ] ( options ) ) return res ; return options } , config : function ( widgetConfigFn , objectConfigFn ) { _GlobalWidgetConfigFn = widgetConfigFn , _GlobalObjectConfigFn = objectConfigFn } , configWidget : function ( type , fn ) { _ConfigPlugin [ type ] || ( _ConfigPlugin [ type ] = [ ] ) , _ConfigPlugin [ type ] . push ( fn ) } , registerWidget : function ( type , fn ) { _WidgetsPlugin [ type ] || ( _WidgetsPlugin [ type ] = [ ] ) , _WidgetsPlugin [ type ] . length > 0 && console . log ( "组件已经注册过了!" ) , _WidgetsPlugin [ type ] . push ( fn ) } , relieveWidget : function ( type ) { delete _WidgetsPlugin [ type ] } , getObject : function ( type , object ) { if ( _GlobalObjectConfigFn && _GlobalObjectConfigFn ( type , object ) , _ObjectPlugin [ type ] ) for ( var res , i = 0 , len = _ObjectPlugin [ type ] . length ; i < len ; i ++ ) res = _ObjectPlugin [ type ] [ i ] ( object ) ; return res || object } , registerObject : function ( type , fn ) { _ObjectPlugin [ type ] || ( _ObjectPlugin [ type ] = [ ] ) , _ObjectPlugin [ type ] . length > 0 && console . log ( "对象已经注册过了!" ) , _ObjectPlugin [ type ] . push ( fn ) } , relieveObject : function ( type ) { delete _ObjectPlugin [ type ] } } ) } ( ) , BI . Action = BI . inherit ( BI . OB , { _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
EDITING : "_EDITING" , EMPTY : "_EMPTY" , VIEW : "_VIEW" , RESIZE : "_RESIZE" , BEFOREEDIT : "_BEFOREEDIT" , AFTEREDIT : "_AFTEREDIT" , STARTEDIT : "_STARTEDIT" , STOPEDIT : "_STOPEDIT" , CHANGE : "_CHANGE" , EXPAND : "_EXPAND" , COLLAPSE : "_COLLAPSE" , CALLBACK : "_CALLBACK" , CLICK : "_CLICK" , STATECHANGE : "_STATECHANGE" , BEFORESTATECHANGE : "_BEFORESTATECHANGE" , INIT : "_INIT" , AFTERINIT : "_AFTERINIT" , SCROLL : "_SCROLL" , STARTLOAD : "_STARTLOAD" , AFTERLOAD : "_AFTERLOAD" , BS : "beforesubmit" , AS : "aftersubmit" , SC : "submitcomplete" , SF : "submitfailure" , SS : "submitsuccess" , BVW : "beforeverifywrite" , AVW : "afterverifywrite" , AV : "afterverify" , BW : "beforewrite" , AW : "afterwrite" , WS : "writesuccess" , WF : "writefailure" , BA : "beforeappend" , AA : "afterappend" , BD : "beforedelete" , AD : "beforedelete" , UC : "unloadcheck" , BTOPDF : "beforetopdf" , ATOPDF : "aftertopdf" , BTOEXCEL : "beforetoexcel" , ATOEXCEL : "aftertoexcel" , BTOWORD : "beforetoword" , ATOWORD : "aftertoword" , BTOIMAGE : "beforetoimage" , ATOIMAGE : "aftertoimage" , BTOHTML : "beforetohtml" , ATOHTML : "aftertohtml" , BIMEXCEL : "beforeimportexcel" , AIMEXCEL : "afterimportexcel" , BPDFPRINT : "beforepdfprint" , APDFPRINT : "afterpdfprint" , BFLASHPRINT : "beforeflashprint" , AFLASHPRINT : "afterflashprint" , BAPPLETPRINT : "beforeappletprint" , AAPPLETPRINT : "afterappletprint" , BSEVERPRINT : "beforeserverprint" , ASERVERPRINT : "afterserverprint" , BEMAIL : "beforeemail" , AEMAIL : "afteremail" } } ) , _ . extend ( BI , { pushArray : function ( sArray , array ) { for ( var i = 0 ; i < array . length ; i ++ ) sArray . push ( array [ i ] ) } , pushDistinct : function ( sArray , obj ) { BI . contains ( sArray , obj ) || sArray . push ( obj ) } , pushDistinctArray : function ( sArray , array ) { for ( var i = 0 , len = array . length ; i < len ; i ++ ) BI . pushDistinct ( sArray , array [ i ] ) } } ) , BI . prepares . push ( function ( ) { BI . Date = BI . Date || { } , BI . Date . _DN = [ BI . i18nText ( "BI-Basic_Sunday" ) , BI . i18nText ( "BI-Basic_Monday" ) , BI . i18nText ( "BI-Basic_Tuesday" ) , BI . i18nText ( "BI-Basic_Wednesday" ) , BI . i18nText ( "BI-Basic_Thursday" ) , BI . i18nText ( "BI-Basic_Friday" ) , BI . i18nText ( "BI-Basic_Saturday" ) , BI . i18nText ( "BI-Basic_Sunday" ) ] , 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 . setDa
BI . each ( event , function ( i , handler ) { toElement . on ( eventKey + ( handler . namespace ? "." + handler . namespace : "" ) , handler ) } ) } ) ; var fromChildren = fromElement . children ( ) , toChildren = toElement . children ( ) ; if ( fromChildren . length !== toChildren . length ) throw new Error ( "不匹配" ) ; BI . each ( fromChildren , function ( i , child ) { BI . DOM . patchProps ( BI . jQuery ( child ) , BI . jQuery ( toChildren [ i ] ) ) } ) , BI . each ( fromElement . data ( "__widgets" ) , function ( i , widget ) { widget . element = toElement } ) } , hang : function ( doms ) { if ( ! BI . isEmpty ( doms ) ) { var frag = BI . Widget . _renderEngine . createFragment ( ) ; return BI . each ( doms , function ( i , dom ) { dom instanceof BI . Widget && ( dom = dom . element ) , dom instanceof BI . $ && dom [ 0 ] && frag . appendChild ( dom [ 0 ] ) } ) , frag } } , isExist : function ( obj ) { return BI . Widget . _renderEngine . createElement ( "body" ) . find ( obj . element ) . length > 0 } , preloadImages : function ( srcArray , onload ) { function complete ( ) { count ++ , count >= srcArray . length && onload ( ) } var count = 0 , images = [ ] ; BI . each ( srcArray , function ( i , src ) { images [ i ] = new Image , images [ i ] . src = src , images [ i ] . onload = function ( ) { complete ( ) } , images [ i ] . onerror = function ( ) { complete ( ) } } ) } , getTextSizeWidth : function ( text , fontSize ) { var span = BI . Widget . _renderEngine . createElement ( "<span></span>" ) . addClass ( "text-width-span" ) . appendTo ( "body" ) ; null == fontSize && ( fontSize = 12 ) , fontSize += "px" , span . css ( "font-size" , fontSize ) . text ( text ) ; var width = span . width ( ) ; return span . remove ( ) , width } , getTextSizeHeight : function ( text , fontSize ) { var span = BI . Widget . _renderEngine . createElement ( "<span></span>" ) . addClass ( "text-width-span" ) . appendTo ( "body" ) ; 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 ( r
if ( s . dataFilter && ( response = s . dataFilter ( response , s . dataType ) ) , dataTypes [ 1 ] ) for ( conv in s . converters ) converters [ conv . toLowerCase ( ) ] = s . converters [ conv ] ; for ( ; current = dataTypes [ ++ i ] ; ) if ( "*" !== current ) { if ( "*" !== prev && prev !== current ) { if ( conv = converters [ prev + " " + current ] || converters [ "* " + current ] , ! conv ) for ( conv2 in converters ) if ( tmp = conv2 . split ( " " ) , tmp [ 1 ] === current && ( conv = converters [ prev + " " + tmp [ 0 ] ] || converters [ "* " + tmp [ 0 ] ] ) ) { conv === ! 0 ? conv = converters [ conv2 ] : converters [ conv2 ] !== ! 0 && ( current = tmp [ 0 ] , dataTypes . splice ( i -- , 0 , current ) ) ; break } if ( conv !== ! 0 ) if ( conv && s [ "throws" ] ) response = conv ( response ) ; else try { response = conv ( response ) } catch ( e ) { return { state : "parsererror" , error : conv ? e : "No conversion from " + prev + " to " + current } } } prev = current } return { state : "success" , data : response } } function createStandardXHR ( ) { try { return new window . XMLHttpRequest } catch ( e ) { } } function createActiveXHR ( ) { try { return new window . ActiveXObject ( "Microsoft.XMLHTTP" ) } catch ( e ) { } } function createFxNow ( ) { return setTimeout ( function ( ) { fxNow = undefined } ) , fxNow = jQuery . now ( ) } function createTweens ( animation , props ) { jQuery . each ( props , function ( prop , value ) { for ( var collection = ( tweeners [ prop ] || [ ] ) . concat ( tweeners [ "*" ] ) , index = 0 , length = collection . length ; index < length ; index ++ ) if ( collection [ index ] . call ( animation , prop , value ) ) return } ) } function Animation ( elem , properties , options ) { var result , stopped , index = 0 , length = animationPrefilters . length , deferred = jQuery . Deferred ( ) . always ( function ( ) { 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 . unqu
} ) ; if ( elem ) return hooks = jQuery . valHooks [ elem . type ] || jQuery . valHooks [ elem . nodeName . toLowerCase ( ) ] , hooks && "get" in hooks && ( ret = hooks . get ( elem , "value" ) ) !== undefined ? ret : ( ret = elem . value , "string" == typeof ret ? ret . replace ( rreturn , "" ) : null == ret ? "" : ret ) } } } ) , jQuery . extend ( { valHooks : { option : { get : function ( elem ) { var val = elem . attributes . value ; return ! val || val . specified ? elem . value : elem . text } } , select : { get : function ( elem ) { for ( var value , option , options = elem . options , index = elem . selectedIndex , one = "select-one" === elem . type || index < 0 , values = one ? null : [ ] , max = one ? index + 1 : options . length , i = index < 0 ? max : one ? index : 0 ; i < max ; i ++ ) if ( option = options [ i ] , ( option . selected || i === index ) && ( jQuery . support . optDisabled ? ! option . disabled : null === option . getAttribute ( "disabled" ) ) && ( ! option . parentNode . disabled || ! jQuery . nodeName ( option . parentNode , "optgroup" ) ) ) { if ( value = jQuery ( option ) . val ( ) , one ) return value ; values . push ( value ) } return values } , set : function ( elem , value ) { var values = jQuery . makeArray ( value ) ; return jQuery ( elem ) . find ( "option" ) . each ( function ( ) { this . selected = jQuery . inArray ( jQuery ( this ) . val ( ) , values ) >= 0 } ) , values . length || ( elem . selectedIndex = - 1 ) , values } } } , attr : function ( elem , name , value ) { var hooks , notxml , ret , nType = elem . nodeType ; if ( elem && 3 !== nType && 8 !== nType && 2 !== nType ) return typeof elem . getAttribute === core _strundefined ? jQuery . prop ( elem , name , value ) : ( notxml = 1 !== nType || ! jQuery . isXMLDoc ( elem ) , notxml && ( name = name . toLowerCase ( ) , 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
for ( var i = 0 , len = this . length ; i < len ; i ++ ) if ( this [ i ] === elem ) return i ; return - 1 } , whitespace = "[\\x20\\t\\r\\n\\f]" , characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+" , identifier = characterEncoding . replace ( "w" , "w#" ) , operators = "([*^$|!~]?=)" , attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace + "*(?:" + operators + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]" , pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes . replace ( 3 , 8 ) + ")*)|.*)\\)|)" , rtrim = new RegExp ( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$" , "g" ) , rcomma = new RegExp ( "^" + whitespace + "*," + whitespace + "*" ) , rcombinators = new RegExp ( "^" + whitespace + "*([\\x20\\t\\r\\n\\f>+~])" + whitespace + "*" ) , rpseudo = new RegExp ( pseudos ) , ridentifier = new RegExp ( "^" + identifier + "$" ) , matchExpr = { ID : new RegExp ( "^#(" + characterEncoding + ")" ) , CLASS : new RegExp ( "^\\.(" + characterEncoding + ")" ) , NAME : new RegExp ( "^\\[name=['\"]?(" + characterEncoding + ")['\"]?\\]" ) , TAG : new RegExp ( "^(" + characterEncoding . replace ( "w" , "w*" ) + ")" ) , ATTR : new RegExp ( "^" + attributes ) , PSEUDO : new RegExp ( "^" + pseudos ) , CHILD : new RegExp ( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + "*(\\d+)|))" + whitespace + "*\\)|)" , "i" ) , 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
return jQuery . access ( this , function ( elem , name , value ) { var len , styles , map = { } , i = 0 ; if ( jQuery . isArray ( name ) ) { for ( styles = getStyles ( elem ) , len = name . length ; i < len ; i ++ ) map [ name [ i ] ] = jQuery . css ( elem , name [ i ] , ! 1 , styles ) ; return map } return value !== undefined ? jQuery . style ( elem , name , value ) : jQuery . css ( elem , name ) } , name , value , arguments . length > 1 ) } , show : function ( ) { return showHide ( this , ! 0 ) } , hide : function ( ) { return showHide ( this ) } , toggle : function ( state ) { var bool = "boolean" == typeof state ; return this . each ( function ( ) { ( bool ? state : isHidden ( this ) ) ? jQuery ( this ) . show ( ) : jQuery ( this ) . hide ( ) } ) } } ) , jQuery . extend ( { cssHooks : { opacity : { get : function ( elem , computed ) { if ( computed ) { var ret = curCSS ( elem , "opacity" ) ; return "" === ret ? "1" : ret } } } } , cssNumber : { columnCount : ! 0 , fillOpacity : ! 0 , fontWeight : ! 0 , lineHeight : ! 0 , opacity : ! 0 , orphans : ! 0 , widows : ! 0 , zIndex : ! 0 , zoom : ! 0 } , cssProps : { "float" : jQuery . support . cssFloat ? "cssFloat" : "styleFloat" } , style : function ( elem , name , value , extra ) { if ( elem && 3 !== elem . nodeType && 8 !== elem . nodeType && elem . style ) { var ret , type , hooks , origName = jQuery . camelCase ( name ) , style = elem . style ; if ( name = jQuery . cssProps [ origName ] || ( jQuery . cssProps [ origName ] = vendorPropName ( style , origName ) ) , hooks = jQuery . cssHooks [ name ] || jQuery . cssHooks [ origName ] , value === undefined ) return hooks && "get" in hooks && ( ret = hooks . get ( elem , ! 1 , extra ) ) !== undefined ? ret : style [ name ] ; 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 ,
textLeft = textLeft . substr ( tidx + keyword . length ) , null != py && ( py = py . substr ( tidx + keyword . length ) ) ; else { if ( ! ( null != pidx && pidx >= 0 && Math . floor ( pidx / text . length ) === Math . floor ( ( pidx + keyword . length - 1 ) / text . length ) ) ) { this . append ( BI . htmlEncode ( textLeft ) ) ; break } this . append ( BI . htmlEncode ( textLeft . substr ( 0 , pidx ) ) ) , this . append ( BI . $ ( "<span>" ) . addClass ( "bi-keyword-red-mark" ) . html ( BI . htmlEncode ( textLeft . substr ( pidx , keyword . length ) ) ) ) , null != py && ( py = py . substr ( pidx + keyword . length ) ) , textLeft = textLeft . substr ( pidx + keyword . length ) } } return this } , getDomHeight : function ( parent ) { var clone = BI . $ ( this ) . clone ( ) ; clone . appendTo ( BI . $ ( parent || "body" ) ) ; var height = clone . height ( ) ; return clone . remove ( ) , height } , hasVerticalScroll : function ( ) { return this . height ( ) > 0 && this [ 0 ] . clientWidth < this [ 0 ] . offsetWidth } , hasHorizonScroll : function ( ) { return this . width ( ) > 0 && this [ 0 ] . clientHeight < this [ 0 ] . offsetHeight } , getStyle : function ( name ) { var node = this [ 0 ] , computedStyle = void 0 ; if ( _global . getComputedStyle && ( computedStyle = _global . getComputedStyle ( node , null ) ) ) return computedStyle . getPropertyValue ( BI . hyphenate ( name ) ) ; if ( document . defaultView && document . defaultView . getComputedStyle ) { 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 ] , Nu
return this . wrapper . update ( opt ) } , populate : function ( items ) { this . wrapper . populate ( items ) } } ) , BI . shortcut ( "bi.flex_scrollable_vertical_adapt" , BI . FlexWrapperVerticalCenter ) , BI . shortcut ( "bi.flex_scrollable_vertical_center_adapt" , BI . FlexWrapperVerticalCenter ) , BI . FlexWrapperVerticalLayout = BI . inherit ( BI . Layout , { props : function ( ) { return BI . extend ( BI . FlexWrapperVerticalLayout . superclass . props . apply ( this , arguments ) , { baseCls : "bi-flex-scrollable-vertical-layout clearfix" , horizontalAlign : BI . HorizontalAlign . Left , verticalAlign : BI . VerticalAlign . Top , rowSize : [ ] , scrollable : null , scrolly : ! 0 , hgap : 0 , vgap : 0 , lgap : 0 , rgap : 0 , tgap : 0 , bgap : 0 } ) } , render : function ( ) { BI . FlexWrapperVerticalLayout . superclass . render . apply ( this , arguments ) ; var o = this . options ; this . $wrapper = BI . Widget . _renderEngine . createElement ( "<div>" ) . addClass ( "flex-scrollable-vertical-layout-wrapper h-" + o . horizontalAlign ) . addClass ( "v-" + o . verticalAlign ) , this . populate ( this . options . items ) } , _addElement : function ( i , item ) { var o = this . options , w = BI . FlexWrapperVerticalLayout . superclass . _addElement . apply ( this , arguments ) ; return w . element . css ( { position : "relative" , "flex-shrink" : "0" } ) , o . rowSize [ i ] > 0 && w . element . height ( o . rowSize [ i ] ) , "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 : nul
} ) } ) ; var top = { } , bottom = { } ; top [ 0 ] = 0 , bottom [ items . length - 1 ] = 0 , BI . any ( items , function ( i , item ) { var w = self . getWidgetByName ( self . getName ( ) + i + "" ) ; if ( BI . isNull ( top [ i ] ) && ( top [ i ] = top [ i - 1 ] + items [ i - 1 ] . height + ( items [ i - 1 ] . tgap || 0 ) + 2 * ( items [ i - 1 ] . vgap || 0 ) + o . vgap + o . tgap + o . bgap ) , item . height < 1 && item . height >= 0 ? w . element . css ( { top : 100 * top [ i ] + "%" , height : 100 * item . height + "%" } ) : w . element . css ( { top : top [ i ] + ( item . vgap || 0 ) + ( item . tgap || 0 ) + o . vgap + o . tgap + "px" , height : BI . isNumber ( item . height ) ? item . height : "" } ) , ! BI . isNumber ( item . height ) ) return ! 0 } ) , BI . backAny ( items , function ( i , item ) { var w = self . getWidgetByName ( self . getName ( ) + i + "" ) ; if ( BI . isNull ( bottom [ i ] ) && ( bottom [ i ] = bottom [ i + 1 ] + items [ i + 1 ] . height + ( items [ i + 1 ] . bgap || 0 ) + 2 * ( items [ i + 1 ] . vgap || 0 ) + o . vgap + o . tgap + o . bgap ) , item . height < 1 && item . height >= 0 ? w . element . css ( { bottom : 100 * bottom [ i ] + "%" , height : 100 * item . height + "%" } ) : w . element . css ( { bottom : bottom [ i ] + ( item . vgap || 0 ) + ( item . bgap || 0 ) + o . vgap + o . bgap + "px" , height : BI . isNumber ( item . height ) ? item . height : "" } ) , ! BI . isNumber ( item . height ) ) return ! 0 } ) } , update : function ( ) { } , populate : function ( items ) { BI . VTapeLayout . superclass . populate . apply ( this , arguments ) , this . _mount ( ) } } ) , BI . shortcut ( "bi.vtape" , BI . VTapeLayout ) , 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
deltaY = Math [ deltaY >= 1 ? "floor" : "ceil" ] ( deltaY / lowestDelta ) , special . settings . normalizeOffset && this . getBoundingClientRect ) { var boundingRect = this . getBoundingClientRect ( ) ; offsetX = event . clientX - boundingRect . left , offsetY = event . clientY - boundingRect . top } return event . deltaX = deltaX , event . deltaY = deltaY , event . deltaFactor = lowestDelta , event . offsetX = offsetX , event . offsetY = offsetY , event . deltaMode = 0 , args . unshift ( event , delta , deltaX , deltaY ) , nullLowestDeltaTimeout && clearTimeout ( nullLowestDeltaTimeout ) , nullLowestDeltaTimeout = setTimeout ( nullLowestDelta , 200 ) , ( $ . event . dispatch || $ . event . handle ) . apply ( this , args ) } } function nullLowestDelta ( ) { lowestDelta = null } function shouldAdjustOldDeltas ( orgEvent , absDelta ) { return special . settings . adjustOldDeltas && "mousewheel" === orgEvent . type && absDelta % 120 === 0 } var toFix = [ "wheel" , "mousewheel" , "DOMMouseScroll" , "MozMousePixelScroll" ] , toBind = "onwheel" in document || document . documentMode >= 9 ? [ "wheel" ] : [ "mousewheel" , "DomMouseScroll" , "MozMousePixelScroll" ] , slice = Array . prototype . slice , nullLowestDeltaTimeout , lowestDelta ; if ( $ . event . fixHooks ) for ( var i = toFix . length ; i ; ) $ . event . fixHooks [ toFix [ -- i ] ] = $ . event . mouseHooks ; var special = $ . event . special . mousewheel = { version : "3.1.12" , setup : function ( ) { if ( this . addEventListener ) for ( var i = toBind . length ; i ; ) this . addEventListener ( toBind [ -- i ] , handler , ! 1 ) ; else this . onmousewheel = handler } , teardown : function ( ) { if ( this . removeEventListener ) for ( var i = toBind . length ; i ; ) this . removeEventListener ( toBind [ -- i ] , handler , ! 1 ) ; else this . onmousewheel = null } , settings : { adjustOldDeltas : ! 0 , normalizeOffset : ! 0 } } ; $ . fn . extend ( { mousewheel : function ( fn ) { return fn ? this . bind ( "mousewheel" , fn ) : this . trigger ( "mousewheel" ) } , unmousewheel : function ( fn ) { return this . unbind ( "mousewheel" , fn ) } } ) } ) , BI . Pane = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . Pane . superclass . _defaultConfig . apply ( this , arguments ) , { _baseCls : "bi-pane" , tipText : BI . i18nText ( "BI-No_Selected_Item" ) , overlap : ! 0 , onLoaded : BI . emptyFn } ) } , _assertTip : function ( ) { var o = this . options ; this . _tipText || ( this . _tipText = BI . createWidget ( { type : "bi.label" , cls : "bi-tips" , text : o . tipText , height : 25 } ) , BI . createWidget ( { type : "bi.absolute_center_adapt" , element : this , items : [ this . _tipText ] } ) ) } , loading : function ( ) { var self = this , o = this . options , isIE = BI . isIE ( ) , loadingAnimation = BI . createWidget ( { type : "bi.horizontal" , cls : "bi-loading-widget" + ( isIE ? " wave-loading hack" : "" ) , height : 30 , width : 30 , hgap : 5 , vgap : 2.5 , items : isIE ? [ ] : [ { type : "bi.layout" , cls : "animate-rect rect1" , height : 25 , width : 3 } , { type : "bi.layout" , cls : "animate-rect rect2" , height : 25 , width : 3 } , { type : "bi.layout" , cls : "animate-rect rect3" , height : 25 , width : 3 } ] } ) ; this . setTipVisible ( ! 1 ) , o . overlap === ! 0 ? ( BI . Layers . has ( this . getName ( ) ) || BI . createWidget ( { type : "bi.absolute_center_adapt" , cls : "loading-container" , items : [ { el : loadingAnimation } ] , element : BI . Layers . make ( this . getName ( ) , this ) } ) , BI . Layers . show ( self . getName ( ) ) ) : BI . isNull ( this . _loading ) && ( this . _loading = loadingAnimation , this . _loading . element . css ( "zIndex" , 1 ) , BI . createWidget ( { type : "bi.absolute_center_adapt" , element : this , cls : "loading-container" , items : [ { el : this . _loading , left : 0 , right : 0 , top : 0 } ] } ) ) , this . element . addClass ( "loading-status" ) } , loaded : function ( ) { var self = this , o = this . options ; BI . Layers . remove ( self . getName ( ) ) , this . _loading && this . _loading . destroy ( ) , this . _loading && ( this . _loading = null ) , o . onLoaded ( ) , self . fireEvent ( BI . Pane . EVENT _LOADED ) , this . element . removeClass ( "loading-status" ) } , check : function ( ) { this . setTipVisible ( BI . isEmpty ( this . options . items ) ) } , setTipVisible : function ( b ) { b === ! 0 ? ( this . _assertTip ( ) , this . _tipText . setVisible ( ! 0 ) ) : this . _tipText && this . _tipText . setVisible ( ! 1 ) } , populate : function ( items ) { this . options . items = items || [ ] , this . check ( ) } , empty : function ( ) { } } ) , BI . Pane . EVENT _LOADED = "EVENT_LOADED" , BI . Single = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { var conf = BI . Single . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { _baseCls : ( conf . _baseCls || "" ) + " bi-single" , readonly : ! 1 , title : null , warningTitle : null , tipType : null , value : null , belowMouse : ! 1 } ) } , _showToolTip : function ( e , opt ) { opt || ( opt = { } ) ; var self = this , o = this . options , type = this . getTipType ( ) || ( this . isEnabled ( ) ? "success" : "warning" ) , title = "success" === type ? t
self . _buildTree ( hashMap , values ) } } ) } var self = this , hashMap = { } , rootNoots = this . nodes . getNodes ( ) ; return track ( rootNoots ) , hashMap } , _dealWidthNodes : function ( nodes ) { var self = this , o = this . options , ns = BI . Tree . arrayFormat ( nodes ) ; return BI . each ( ns , function ( i , n ) { n . title = n . title || n . text || n . value , n . isParent = n . isParent || n . parent , BI . isKey ( o . paras . keyword ) ? n . text = BI . $ ( "<div>" ) . _ _textKeywordMarked _ _ ( n . text , o . paras . keyword , n . py ) . html ( ) : n . text = BI . htmlEncode ( n . text + "" ) } ) , nodes } , _loadMore : function ( ) { var self = this , o = this . options ; this . tip . setLoading ( ) ; var op = BI . extend ( { } , o . paras , { times : ++ this . times } ) ; o . itemsCreator ( op , function ( res ) { if ( self . _stop !== ! 0 ) { var hasNext = ! ! res . hasNext , nodes = res . items || [ ] ; hasNext ? self . tip . setLoaded ( ) : self . tip . setEnd ( ) , nodes . length > 0 && self . nodes . addNodes ( null , self . _dealWidthNodes ( nodes ) ) } } ) } , _initTree : function ( setting ) { var self = this , o = this . options ; self . fireEvent ( BI . Events . INIT ) , this . times = 1 ; var tree = this . tree ; tree . empty ( ) , this . loading ( ) , this . tip . setVisible ( ! 1 ) ; var callback = function ( nodes ) { self . _stop !== ! 0 && ( self . nodes = BI . $ . fn . zTree . init ( tree . element , setting , nodes ) ) } , op = BI . extend ( { } , o . paras , { times : 1 } ) ; o . itemsCreator ( op , function ( res ) { if ( self . _stop !== ! 0 ) { var hasNext = ! ! res . hasNext , nodes = res . items || [ ] ; nodes . length > 0 && callback ( self . _dealWidthNodes ( nodes ) ) , self . setTipVisible ( nodes . length <= 0 ) , self . loaded ( ) , hasNext ? self . tip . setLoaded ( ) : self . tip . invisible ( ) , 1 === op . times && self . fireEvent ( BI . Events . AFTERINIT ) } } ) } , initTree : function ( nodes , setting ) { var setting = setting || { async : { enable : ! 1 } , check : { enable : ! 1 } , data : { key : { title : "title" , name : "text" } , simpleData : { enable : ! 0 } } , view : { showIcon : ! 1 , expandSpeed : "" , nameIsHTML : ! 0 } , callback : { } } ; this . nodes = BI . $ . fn . zTree . init ( this . tree . element , setting , nodes ) } , start : function ( ) { this . _stop = ! 1 } , stop : function ( ) { this . _stop = ! 0 } , stroke : function ( config ) { delete this . options . keyword , BI . extend ( this . options . paras , config ) ; var setting = this . _configSetting ( ) ; this . _createTree ( ) , this . start ( ) , this . _initTree ( setting ) } , populate : function ( ) { this . stroke . apply ( this , arguments ) } , hasChecked : function ( ) { var treeObj = this . nodes ; return treeObj . getCheckedNodes ( ! 0 ) . length > 0 } , checkAll : function ( checked ) { function setNode ( children ) { BI . each ( children , function ( i , child ) { child . halfCheck = ! 1 , setNode ( child . children ) } ) } this . nodes && ( BI . each ( this . nodes . getNodes ( ) , function ( i , node ) { node . halfCheck = ! 1 , setNode ( node . children ) } ) , this . nodes . checkAllNodes ( checked ) ) } , expandAll : function ( flag ) { this . nodes && this . nodes . expandAll ( flag ) } , setValue : function ( value , param ) { this . checkAll ( ! 1 ) , this . updateValue ( value , param ) , this . refresh ( ) } , setSelectedValue : function ( value ) { this . options . paras . selectedValues = BI . deepClone ( value || { } ) } , updateValue : function ( values , param ) { if ( this . nodes ) { param || ( param = "value" ) ; var treeObj = this . nodes ; BI . each ( values , function ( v , op ) { var nodes = treeObj . getNodesByParam ( param , v , null ) ; BI . each ( nodes , function ( j , node ) { BI . extend ( node , { checked : ! 0 } , op ) , treeObj . updateNode ( node ) } ) } ) } } , refresh : function ( ) { this . nodes && this . nodes . refresh ( ) } , getValue : function ( ) { return this . nodes ? this . _getSelectedValues ( ) : null } , destroyed : function ( ) { this . stop ( ) , this . nodes && this . nodes . destroy ( ) } } ) , BI . extend ( BI . TreeView , { REQ _TYPE _INIT _DATA : 1 , REQ _TYPE _ADJUST _DATA : 2 , REQ _TYPE _SELECT _DATA : 3 , REQ _TYPE _GET _SELECTED _DATA : 4 } ) , BI . TreeView . EVENT _CHANGE = "EVENT_CHANGE" , BI . TreeView . EVENT _INIT = BI . Events . INIT , BI . TreeView . EVENT _AFTERINIT = BI . Events . AFTERINIT , BI . shortcut ( "bi.tree_view" , BI . TreeView ) , BI . AsyncTree = BI . inherit ( BI . TreeView , { _defaultConfig : function ( ) { return BI . extend ( BI . AsyncTree . superclass . _defaultConfig . apply ( this , arguments ) , { } ) } , _init : function ( ) { BI . AsyncTree . superclass . _init . apply ( this , arguments ) } , _configSetting : function ( ) { function onClick ( event , treeId , treeNode ) { var zTree = BI . $ . fn . zTree . getZTreeObj ( treeId ) , checked = treeNode . checked , status = treeNode . getCheckStatus ( ) ; status . half === ! 0 && status . checked === ! 0 && ( checked = ! 1 ) , zTree . checkNode ( treeNode , ! checked , ! 0 , ! 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 = BI . $ . fn . zTree . getZTree
} } , adjustHeight : function ( e ) { var o = this . options , p = { } ; if ( this . popupView ) { var isVisible = this . popupView . isVisible ( ) ; this . popupView . visible ( ) ; var combo = BI . isNotNull ( e ) ? { element : { offset : function ( ) { return { left : e . pageX , top : e . pageY } } , bounds : function ( ) { return { x : e . offsetX , y : e . offsetY , width : 0 , height : 24 } } , outerWidth : function ( ) { return 0 } , outerHeight : function ( ) { return 24 } } } : this . combo ; switch ( o . direction ) { case "bottom" : case "bottom,right" : p = BI . DOM . getComboPosition ( combo , this . popupView , o . adjustXOffset , o . adjustYOffset || o . adjustLength , o . isNeedAdjustHeight , [ "bottom" , "top" , "right" , "left" ] , o . offsetStyle ) ; break ; case "top" : case "top,right" : p = BI . DOM . getComboPosition ( combo , this . popupView , o . adjustXOffset , o . adjustYOffset || o . adjustLength , o . isNeedAdjustHeight , [ "top" , "bottom" , "right" , "left" ] , o . offsetStyle ) ; break ; case "left" : case "left,bottom" : p = BI . DOM . getComboPosition ( combo , this . popupView , o . adjustXOffset || o . adjustLength , o . adjustYOffset , o . isNeedAdjustHeight , [ "left" , "right" , "bottom" , "top" ] , o . offsetStyle ) ; break ; case "right" : case "right,bottom" : p = BI . DOM . getComboPosition ( combo , this . popupView , o . adjustXOffset || o . adjustLength , o . adjustYOffset , o . isNeedAdjustHeight , [ "right" , "left" , "bottom" , "top" ] , o . offsetStyle ) ; break ; case "top,left" : p = BI . DOM . getComboPosition ( combo , this . popupView , o . adjustXOffset , o . adjustYOffset || o . adjustLength , o . isNeedAdjustHeight , [ "top" , "bottom" , "left" , "right" ] , o . offsetStyle ) ; break ; case "bottom,left" : p = BI . DOM . getComboPosition ( combo , this . popupView , o . adjustXOffset , o . adjustYOffset || o . adjustLength , o . isNeedAdjustHeight , [ "bottom" , "top" , "left" , "right" ] , o . offsetStyle ) ; break ; case "left,top" : p = BI . DOM . getComboPosition ( combo , this . popupView , o . adjustXOffset || o . adjustLength , o . adjustYOffset , o . isNeedAdjustHeight , [ "left" , "right" , "top" , "bottom" ] , o . offsetStyle ) ; break ; case "right,top" : p = BI . DOM . getComboPosition ( combo , this . popupView , o . adjustXOffset || o . adjustLength , o . adjustYOffset , o . isNeedAdjustHeight , [ "right" , "left" , "top" , "bottom" ] , o . offsetStyle ) ; break ; case "right,innerRight" : p = BI . DOM . getComboPosition ( combo , this . popupView , o . adjustXOffset || o . adjustLength , o . adjustYOffset , o . isNeedAdjustHeight , [ "right" , "left" , "innerRight" , "innerLeft" , "bottom" , "top" ] , o . offsetStyle ) ; break ; case "right,innerLeft" : p = BI . DOM . getComboPosition ( combo , this . popupView , o . adjustXOffset || o . adjustLength , o . adjustYOffset , o . isNeedAdjustHeight , [ "right" , "left" , "innerLeft" , "innerRight" , "bottom" , "top" ] , o . offsetStyle ) ; break ; case "innerRight" : p = BI . DOM . getComboPosition ( combo , this . popupView , o . adjustXOffset || o . adjustLength , o . adjustYOffset , o . isNeedAdjustHeight , [ "innerRight" , "innerLeft" , "right" , "left" , "bottom" , "top" ] , o . offsetStyle ) ; break ; case "innerLeft" : p = BI . DOM . getComboPosition ( combo , this . popupView , o . adjustXOffset || o . adjustLength , o . adjustYOffset , o . isNeedAdjustHeight , [ "innerLeft" , "innerRight" , "left" , "right" , "bottom" , "top" ] , o . offsetStyle ) ; break ; case "top,custom" : case "custom,top" : p = BI . DOM . getTopAdaptPosition ( combo , this . popupView , o . adjustYOffset || o . adjustLength , o . isNeedAdjustHeight ) ; break ; case "custom,bottom" : case "bottom,custom" : p = BI . DOM . getBottomAdaptPosition ( combo , this . popupView , o . adjustYOffset || o . adjustLength , o . isNeedAdjustHeight ) ; break ; case "left,custom" : case "custom,left" : p = BI . DOM . getLeftAdaptPosition ( combo , this . popupView , o . adjustXOffset || o . adjustLength ) , delete p . top , delete p . adaptHeight ; break ; case "custom,right" : case "right,custom" : p = BI . DOM . getRightAdaptPosition ( combo , this . popupView , o . adjustXOffset || o . adjustLength ) , delete p . top , delete p . adaptHeight } "adaptHeight" in p && this . resetListHeight ( p . adaptHeight ) , "left" in p && this . popupView . element . css ( { left : p . left } ) , "top" in p && this . popupView . element . css ( { top : p . top } ) , this . position = p , this . popupView . setVisible ( isVisible ) } } , resetListHeight : function ( h ) { this . _assertPopupView ( ) , this . popupView . resetHeight && this . popupView . resetHeight ( h ) } , resetListWidth : function ( w ) { this . _assertPopupView ( ) , this . popupView . resetWidth && this . popupView . resetWidth ( w ) } , populate : function ( items ) { this . _assertPopupView ( ) , this . popupView . populate . apply ( this . popupView , arguments ) , this . combo . populate . apply ( this . combo , arguments ) } , _setEnable : function ( arg ) { BI . Combo . superclass . _setEnable . apply ( this , arguments ) , arg === ! 0 ? this . element . removeClass (
BI . nextTick ( function ( ) { self . fireEvent ( BI . Switcher . EVENT _AFTER _INIT ) } ) ) } , _hideView : function ( ) { this . fireEvent ( BI . Switcher . EVENT _BEFORE _HIDEVIEW ) ; var self = this , o = this . options ; o . adapter ? BI . Maskers . hide ( self . getName ( ) ) : self . popupView && self . popupView . setVisible ( ! 1 ) , BI . nextTick ( function ( ) { o . adapter ? BI . Maskers . hide ( self . getName ( ) ) : self . popupView && self . popupView . setVisible ( ! 1 ) , self . element . removeClass ( o . switcherClass ) , self . fireEvent ( BI . Switcher . EVENT _AFTER _HIDEVIEW ) } ) } , _popupView : function ( ) { var self = this , o = this . options ; this . _assertPopupView ( ) , this . fireEvent ( BI . Switcher . EVENT _BEFORE _POPUPVIEW ) , o . adapter ? BI . Maskers . show ( this . getName ( ) ) : self . popupView . setVisible ( ! 0 ) , BI . nextTick ( function ( name ) { o . adapter ? BI . Maskers . show ( name ) : self . popupView . setVisible ( ! 0 ) , self . element . addClass ( o . switcherClass ) , self . fireEvent ( BI . Switcher . EVENT _AFTER _POPUPVIEW ) } , this . getName ( ) ) } , populate : function ( items ) { this . _assertPopupView ( ) , this . popupView . populate . apply ( this . popupView , arguments ) , this . switcher . populate . apply ( this . switcher , arguments ) } , _setEnable : function ( arg ) { BI . Switcher . superclass . _setEnable . apply ( this , arguments ) , ! arg && this . isViewVisible ( ) && this . _hideView ( ) } , setValue : function ( v ) { this . switcher . setValue ( v ) , BI . isNull ( this . popupView ) ? this . options . popup . value = v : this . popupView . setValue ( v ) } , getValue : function ( ) { return BI . isNull ( this . popupView ) ? this . options . popup . value : this . popupView . getValue ( ) } , setAdapter : function ( adapter ) { this . options . adapter = adapter , BI . Maskers . remove ( this . getName ( ) ) } , isViewVisible : function ( ) { return this . isEnabled ( ) && this . switcher . isEnabled ( ) && ( this . options . adapter ? BI . Maskers . isVisible ( this . getName ( ) ) : this . popupView && this . popupView . isVisible ( ) ) } , isExpanded : function ( ) { return this . isViewVisible ( ) } , showView : function ( ) { this . isEnabled ( ) && this . switcher . isEnabled ( ) && this . _popupView ( ) } , hideView : function ( ) { this . _hideView ( ) } , getView : function ( ) { return this . popupView } , adjustView : function ( ) { this . isViewVisible ( ) && BI . Maskers . show ( this . getName ( ) ) } , getAllLeaves : function ( ) { return this . popupView && this . popupView . getAllLeaves ( ) } , getNodeById : function ( id ) { return this . switcher . attr ( "id" ) === id ? this . switcher : this . popupView && this . popupView . getNodeById ( id ) } , getNodeByValue : function ( value ) { return this . switcher . getValue ( ) === value ? this . switcher : this . popupView && this . popupView . getNodeByValue ( value ) } , empty : function ( ) { this . popupView && this . popupView . empty ( ) } , destroy : function ( ) { BI . Switcher . superclass . destroy . apply ( this , arguments ) } } ) , BI . Switcher . EVENT _EXPAND = "EVENT_EXPAND" , BI . Switcher . EVENT _COLLAPSE = "EVENT_COLLAPSE" , BI . Switcher . EVENT _TRIGGER _CHANGE = "EVENT_TRIGGER_CHANGE" , BI . Switcher . EVENT _CHANGE = "EVENT_CHANGE" , BI . Switcher . EVENT _AFTER _INIT = "EVENT_AFTER_INIT" , BI . Switcher . EVENT _BEFORE _POPUPVIEW = "EVENT_BEFORE_POPUPVIEW" , BI . Switcher . EVENT _AFTER _POPUPVIEW = "EVENT_AFTER_POPUPVIEW" , BI . Switcher . EVENT _BEFORE _HIDEVIEW = "EVENT_BEFORE_HIDEVIEW" , BI . Switcher . EVENT _AFTER _HIDEVIEW = "EVENT_AFTER_HIDEVIEW" , BI . shortcut ( "bi.switcher" , BI . Switcher ) , BI . Tab = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . Tab . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-tab" , direction : "top" , single : ! 1 , logic : { dynamic : ! 1 } , showIndex : ! 1 , tab : ! 1 , cardCreator : function ( v ) { return BI . createWidget ( ) } } ) } , render : function ( ) { var self = this , o = this . options ; BI . isObject ( o . tab ) && ( this . tab = BI . createWidget ( this . options . tab , { type : "bi.button_group" } ) , this . tab . on ( BI . Controller . EVENT _CHANGE , function ( type , value , obj ) { self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) ) , this . cardMap = { } , this . layout = BI . createWidget ( { type : "bi.card" } ) , BI . createWidget ( BI . extend ( { element : this } , BI . LogicFactory . createLogic ( BI . LogicFactory . createLogicTypeByDirection ( o . direction ) , BI . extend ( { } , o . logic , { items : BI . LogicFactory . createLogicItemsByDirection ( o . direction , this . tab , this . layout ) } ) ) ) ) ; var listener = new BI . ShowListener ( { eventObj : this . tab , cardLayout : this . layout , cardCreator : function ( v ) { var card = o . cardCreator . apply ( self , arguments ) ; return self . cardMap [ v ] = card , card } , afterCardShow : function ( v ) { self . _deleteOtherCards ( v ) , self . curr = v } } ) ; listener . on ( BI . ShowListener . EVENT _CHANGE , function ( value ) { self . fireEvent ( BI . Tab . EVENT _CHANGE , value , self ) } ) } , _deleteOt
} ; ( 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 . tree . set ( cnt , addedHeight ) , this . renderedIndex = cnt , cnt ++ , index += o . blockSize } } , _calculateBlocksToRender : function ( ) { var o = this . options ; this . _renderMoreIf ( ) ; for ( var height = this . element . height ( ) , minContentHeightFrom = o . scrollTop - o . overscanHeight , minContentHeightTo = o . scrollTop + height + o . overscanHeight , start = this . tree . greatestLowerBound ( minContentHeightFrom ) , end = this . tree . leastUpperBound ( minContentHeightTo ) , needDestroyed = [ ] , i = 0 ; i < start ; i ++ ) { var index = this . cache [ i ] . index ; if ( ! this . cache [ i ] . destroyed ) { for ( var j = index ; j < index + o . blockSize && j < o . items . length ; j ++ ) needDestroyed . push ( this . container . _children [ j ] ) , this . container . _children [ j ] = null ; this . cache [ i ] . destroyed = ! 0 } } for ( var i = end + 1 ; i <= this . renderedIndex ; i ++ ) { var index = this . cache [ i ] . index ; if ( ! this . cache [ i ] . destroyed ) { for ( var j = index ; j < index + o . blockSize && j < o . items . length ; j ++ ) needDestroyed . push ( this . container . _children [ j ] ) , this . container . _children [ j ] = null ; this . cache [ i ] . destroyed = ! 0 } } for ( var firstFragment = BI . Widget . _renderEngine . createFragment ( ) , lastFragment = BI . Widget . _renderEngine . createFragment ( ) , currentFragment = firstFragment , i = start < 0 ? 0 : start ; i <= end && i <= this . renderedIndex ; i ++ ) { var index = this . cache [ i ] . index ; if ( this . cache [ i ] . destroyed || ( currentFragment = lastFragment ) , this . cache [ i ] . destroyed === ! 0 ) { for ( var j = index ; j < index + o . blockSize && j < o . items . length ; j ++ ) { var w = this . container . _addElement ( j , BI . extend ( { root : ! 0 } , BI . stripEL ( o . items [ j ] ) ) , this ) ; currentFragment . appendChild ( w . element [ 0 ] ) } this . cache [ i ] . destroyed = ! 1 } } this . container . element . prepend ( firstFragment ) , this . container . element . append ( lastFragment ) , this . topBlank . setHeight ( this . cache [ start < 0 ? 0 : start ] . scrollTop ) ; var lastCache = this . cache [ Math . min ( end , this . renderedIndex ) ] ; this . bottomBlank . setHeight ( this . tree . sumTo ( this . renderedIndex ) - lastCache . scrollTop - lastCache . height ) , BI . each ( needDestroyed , function ( i , child ) { child && child . _destroy ( ) } ) } , _populate : function ( items ) { var o = this . options ; items && this . options . items !== items && ( this . options . items = items ) , this . tree = BI . PrefixIntervalTree . empty ( Math . ceil ( o . items . length / o . blockSize ) ) , this . _calculateBlocksToRender ( ) , this . element . scrollTop ( o . scrollTop ) } , _clearChildren : function ( ) { BI . each ( this . container . _children , function ( i , cell ) { cell && cell . _destroy ( ) } ) , this . container . _children = { } , this . container . attr ( "items" , [ ] ) } , restore : function ( ) { this . renderedIndex = - 1 , this . _clearChildren ( ) , this . cache = { } , this . options . scrollTop = 0 , this . topBlank . setHeight ( 0 ) , this . bottomBlank . setHeight ( 0 ) } , populate : function ( items ) { items && this . options . items !== items && this . restore ( ) , this . _populate ( ) } , destroyed : function ( ) { this . restore ( ) } } ) , BI . shortcut ( "bi.virtual_list" , BI . VirtualList ) , BI . Pager = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . Pager . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-pager" , behaviors : { } , layouts : [ { type : "bi.horizontal" , hgap : 10 , vgap : 0 } ] , dynamicShow : ! 0 , dynamicShowFirstLast : ! 1 , dynamicShowPrevNext : ! 1 , pages : ! 1 , curr : function ( ) { return 1 } , groups : 0 , jump : BI . emptyFn , first : ! 1 , last : ! 1 , prev : "上一页" , next : "下一页" , firstPage : 1 , lastPage : function ( ) { return 1 } , hasPrev : BI . emptyFn , hasNext : BI . emptyFn } ) } , _init : function ( ) { BI . Pager . superclass . _init . apply ( this , arguments ) ; var self = this ; this . currPage = BI . result ( this . options , "curr" ) , this . _populate ( ) } , _populate : function ( ) { var self = this , o = this . options , view = [ ] , dict = { } ; this . empty ( ) ; var pages = BI . result ( o , "pages" ) , curr = BI . result ( this , "currPage" ) , groups = BI . result ( o , "groups" ) , first = BI . result ( o , "first" ) , last = BI . result ( o , "last" ) , prev = BI . result ( o , "prev" ) , next = BI . result ( o , "next" ) ; pages === ! 1 ? ( groups = 0 , first = ! 1 , last = ! 1 ) : groups > pages && ( groups = pages ) , dict . index = Math . ceil ( ( curr + ( groups > 1 && groups !== pages ? 1 : 0 ) ) / ( 0 === groups ? 1 : groups ) ) , ( ! o . dynamicShow && ! o . dynamicShowPrevNext || curr > 1 ) && prev !== ! 1 && ( BI . isKey ( prev ) ? view . push ( { text : prev , value : "prev" , disabled : pages === ! 1 ? o . hasPrev ( curr ) === ! 1 : ! ( curr > 1 && prev !== ! 1 ) } ) : view . push ( B
return this . text . getValue ( ) } , setText : function ( ) { this . text . setText . apply ( this . text , arguments ) } , getText : function ( ) { return this . text . getText ( ) } , doClick : function ( ) { BI . IconTextNode . superclass . doClick . apply ( this , arguments ) , this . isValid ( ) && this . fireEvent ( BI . IconTextNode . EVENT _CHANGE , this . getValue ( ) , this ) } , doRedMark : function ( ) { this . text . doRedMark . apply ( this . text , arguments ) } , unRedMark : function ( ) { this . text . unRedMark . apply ( this . text , arguments ) } } ) , BI . IconTextNode . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.icon_text_node" , BI . IconTextNode ) , BI . TextIconNode = BI . inherit ( BI . NodeButton , { _defaultConfig : function ( ) { var conf = BI . TextIconNode . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { baseCls : ( conf . baseCls || "" ) + " bi-text-icon-node" , logic : { dynamic : ! 1 } , cls : "close-ha-font" , iconHeight : null , iconWidth : null , textHgap : 0 , textVgap : 0 , textLgap : 0 , textRgap : 0 } ) } , _init : function ( ) { BI . TextIconNode . superclass . _init . apply ( this , arguments ) ; var o = this . options , c = this . _const ; this . text = BI . createWidget ( { type : "bi.label" , cls : "list-item-text" , 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 } ) , this . icon = BI . createWidget ( { type : "bi.icon_label" , width : o . height , height : o . height , iconWidth : o . iconWidth , iconHeight : o . iconHeight } ) , BI . createWidget ( BI . extend ( { element : this } , BI . LogicFactory . createLogic ( "horizontal" , BI . extend ( o . logic , { items : BI . LogicFactory . createLogicItemsByDirection ( "left" , this . text , this . icon ) } ) ) ) ) } , doClick : function ( ) { BI . TextIconNode . superclass . doClick . apply ( this , arguments ) , this . isValid ( ) && this . fireEvent ( BI . TextIconNode . EVENT _CHANGE , this . getValue ( ) , this ) } , 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 ) } } ) , BI . TextIconNode . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.text_icon_node" , BI . TextIconNode ) , BI . TextNode = BI . inherit ( BI . NodeButton , { _defaultConfig : function ( ) { var conf = BI . TextNode . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { baseCls : ( conf . baseCls || "" ) + " bi-text-node" , textAlign : "left" , whiteSpace : "nowrap" , textHgap : 0 , textVgap : 0 , textLgap : 0 , textRgap : 0 } ) } , _init : function ( ) { BI . TextNode . 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 . TextNode . superclass . doClick . apply ( this , arguments ) , this . isValid ( ) && this . fireEvent ( BI . TextNode . 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 . TextNode . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.text_node" , BI . TextNode ) , BI . Editor = BI . inherit ( BI . Single , { _defaultConfig : function ( ) { var conf = BI . Editor . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { baseCls : "bi-editor bi-focus-shadow" , hgap : 4 , vgap : 2 , lgap : 0 , rgap : 0 , tgap : 0 , bgap : 0 , tipType : "warning" , inputType : "text" , validationChecker : BI . emptyFn , quitChecker : BI . emptyFn , allowBlank : ! 1 , watermark : "" , errorText : "" } ) } , _init : function ( ) { BI . Editor . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . editor = this . addWidget ( BI . createWidget ( { type : "bi.input" , element : "<input type='" + o . inputType + "'/>" , root : ! 0 , value : o . value , watermark : o . watermark , validationChecker : o . validationChecker , quitChecker : o . quitChecker , allowBlank : o . allowBlank } ) ) , t
} , _setEnable : function ( enable ) { BI . File . superclass . _setEnable . apply ( this , arguments ) , enable === ! 0 ? this . element . attr ( "disabled" , "disabled" ) : this . element . removeAttr ( "disabled" ) } } ) , BI . File . EVENT _CHANGE = "EVENT_CHANGE" , BI . File . EVENT _UPLOADSTART = "EVENT_UPLOADSTART" , BI . File . EVENT _ERROR = "EVENT_ERROR" , BI . File . EVENT _PROGRESS = "EVENT_PROGRESS" , BI . File . EVENT _UPLOADED = "EVENT_UPLOADED" , BI . shortcut ( "bi.file" , BI . File ) } ( _global . document || { } ) , BI . Input = BI . inherit ( BI . Single , { _defaultConfig : function ( ) { var conf = BI . Input . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { baseCls : ( conf . baseCls || "" ) + " bi-input display-block overflow-dot" , tagName : "input" , validationChecker : BI . emptyFn , quitChecker : BI . emptyFn , allowBlank : ! 1 } ) } , _init : function ( ) { BI . Input . superclass . _init . apply ( this , arguments ) ; var self = this , ctrlKey = ! 1 , keyCode = null , inputEventValid = ! 1 , _keydown = BI . debounce ( function ( keyCode ) { self . onKeyDown ( keyCode , ctrlKey ) , self . _keydown _ = ! 1 } , 300 ) , _clk = BI . debounce ( BI . bind ( this . _click , this ) , BI . EVENT _RESPONSE _TIME , { leading : ! 0 , trailing : ! 1 } ) ; this . _focusDebounce = BI . debounce ( BI . bind ( this . _focus , this ) , BI . EVENT _RESPONSE _TIME , { leading : ! 0 , trailing : ! 1 } ) , this . _blurDebounce = BI . debounce ( BI . bind ( this . _blur , this ) , BI . EVENT _RESPONSE _TIME , { leading : ! 0 , trailing : ! 1 } ) , this . element . keydown ( function ( e ) { inputEventValid = ! 1 , ctrlKey = e . ctrlKey || e . metaKey , keyCode = e . keyCode , self . fireEvent ( BI . Input . EVENT _QUICK _DOWN , arguments ) } ) . keyup ( function ( e ) { keyCode = null , inputEventValid && e . keyCode === BI . KeyCode . ENTER || ( self . _keydown _ = ! 0 , _keydown ( e . keyCode ) ) } ) . on ( "input propertychange" , function ( e ) { var originalEvent = e . originalEvent ; ( BI . isNull ( originalEvent . propertyName ) || "value" === originalEvent . propertyName ) && ( inputEventValid = ! 0 , self . _keydown _ = ! 0 , _keydown ( keyCode ) , keyCode = null ) } ) . click ( function ( e ) { e . stopPropagation ( ) , _clk ( ) } ) . mousedown ( function ( e ) { self . element . val ( self . element . val ( ) ) } ) . focus ( function ( e ) { self . _focusDebounce ( ) } ) . focusout ( function ( e ) { self . _blurDebounce ( ) } ) , ( BI . isKey ( this . options . value ) || BI . isEmptyString ( this . options . value ) ) && this . setValue ( this . options . value ) } , _focus : function ( ) { this . element . addClass ( "bi-input-focus" ) , this . _checkValidationOnValueChange ( ) , this . _isEditing = ! 0 , "" == this . getValue ( ) && ( this . fireEvent ( BI . Controller . EVENT _CHANGE , BI . Events . EMPTY , this . getValue ( ) , this ) , this . fireEvent ( BI . Input . EVENT _EMPTY ) ) , this . fireEvent ( BI . Input . EVENT _FOCUS ) } , _blur : function ( ) { function blur ( ) { if ( self . isValid ( ) || self . options . quitChecker . apply ( self , [ BI . trim ( self . getValue ( ) ) ] ) === ! 1 || ( self . element . val ( self . _lastValidValue ? self . _lastValidValue : "" ) , self . _checkValidationOnValueChange ( ) , self . _defaultState ( ) ) , self . element . removeClass ( "bi-input-focus" ) , self . _isEditing = ! 1 , self . _start = ! 1 , self . isValid ( ) ) { var lastValidValue = self . _lastValidValue ; self . _lastValidValue = self . getValue ( ) , self . fireEvent ( BI . Controller . EVENT _CHANGE , BI . Events . CONFIRM , self . getValue ( ) , self ) , self . fireEvent ( BI . Input . EVENT _CONFIRM ) , self . _lastValidValue !== lastValidValue && self . fireEvent ( BI . Input . EVENT _CHANGE _CONFIRM ) } self . fireEvent ( BI . Input . EVENT _BLUR ) } var self = this ; self . _keydown _ === ! 0 ? BI . delay ( blur , 300 ) : blur ( ) } , _click : function ( ) { this . _isEditing !== ! 0 && ( this . selectAll ( ) , this . fireEvent ( BI . Input . EVENT _CLICK ) ) } , onClick : function ( ) { this . _click ( ) } , onKeyDown : function ( keyCode , ctrlKey ) { this . isValid ( ) && BI . trim ( this . _lastChangedValue ) === BI . trim ( this . getValue ( ) ) || this . _checkValidationOnValueChange ( ) , this . isValid ( ) && "" !== BI . trim ( this . getValue ( ) ) && ( ( BI . trim ( this . getValue ( ) ) === this . _lastValue || this . _start && null != this . _lastValue && "" !== this . _lastValue ) && ( this . _pause !== ! 0 || /(\s|\u00A0)$/ . test ( this . getValue ( ) ) ) || ( this . _start = ! 0 , this . _pause = ! 1 , this . fireEvent ( BI . Controller . EVENT _CHANGE , BI . Events . STARTEDIT , this . getValue ( ) , this ) , this . fireEvent ( BI . Input . EVENT _START ) ) ) , keyCode == BI . KeyCode . ENTER && ( this . isValid ( ) || this . options . quitChecker . apply ( this , [ BI . trim ( this . getValue ( ) ) ] ) !== ! 1 ? ( this . blur ( ) , this . fireEvent ( BI . Input . EVENT _ENTER ) ) : this . fireEvent ( BI . Input . EVENT _RESTRICT ) ) , keyCode == BI . KeyCode . SPACE && this . fireEvent ( BI . Input . EVENT _SPACE ) , keyCode == BI . KeyCode . BACKSPACE && "" == this . _lastValue && this . fireEvent ( BI . Input . EVENT _REMOVE ) , keyCode != BI . KeyCode . BACKSPACE && keyCode != BI . Ke
for ( var i = 0 , j = _init . beforeA . length ; i < j ; i ++ ) _init . beforeA [ i ] . apply ( this , arguments ) } , getInnerAfterA : function ( setting , node , array ) { for ( var i = 0 , j = _init . innerAfterA . length ; i < j ; i ++ ) _init . innerAfterA [ i ] . apply ( this , arguments ) } , getInnerBeforeA : function ( setting , node , array ) { for ( var i = 0 , j = _init . innerBeforeA . length ; i < j ; i ++ ) _init . innerBeforeA [ i ] . apply ( this , arguments ) } , getCache : function ( setting ) { return caches [ setting . treeId ] } , getNextNode : function ( setting , node ) { if ( ! node ) return null ; for ( var childKey = setting . data . key . children , p = node . parentTId ? node . getParentNode ( ) : data . getRoot ( setting ) , i = 0 , l = p [ childKey ] . length - 1 ; i <= l ; i ++ ) if ( p [ childKey ] [ i ] === node ) return i == l ? null : p [ childKey ] [ i + 1 ] ; return null } , getNodeByParam : function ( setting , nodes , key , value ) { if ( ! nodes || ! key ) return null ; for ( var childKey = setting . data . key . children , i = 0 , l = nodes . length ; i < l ; i ++ ) { if ( nodes [ i ] [ key ] == value ) return nodes [ i ] ; var tmp = data . getNodeByParam ( setting , nodes [ i ] [ childKey ] , key , value ) ; if ( tmp ) return tmp } return null } , getNodeCache : function ( setting , tId ) { if ( ! tId ) return null ; var n = caches [ setting . treeId ] . nodes [ data . getNodeCacheId ( tId ) ] ; return n ? n : null } , getNodeName : function ( setting , node ) { var nameKey = setting . data . key . name ; return "" + node [ nameKey ] } , getNodeTitle : function ( setting , node ) { var t = "" === setting . data . key . title ? setting . data . key . name : setting . data . key . title ; return "" + node [ t ] } , getNodes : function ( setting ) { return data . getRoot ( setting ) [ setting . data . key . children ] } , getNodesByParam : function ( setting , nodes , key , value ) { if ( ! nodes || ! key ) return [ ] ; for ( var childKey = setting . data . key . children , result = [ ] , i = 0 , l = nodes . length ; i < l ; i ++ ) nodes [ i ] [ key ] == value && result . push ( nodes [ i ] ) , result = result . concat ( data . getNodesByParam ( setting , nodes [ i ] [ childKey ] , key , value ) ) ; return result } , getNodesByParamFuzzy : function ( setting , nodes , key , value ) { if ( ! nodes || ! key ) return [ ] ; var childKey = setting . data . key . children , result = [ ] ; value = value . toLowerCase ( ) ; for ( var i = 0 , l = nodes . length ; i < l ; i ++ ) "string" == typeof nodes [ i ] [ key ] && nodes [ i ] [ key ] . toLowerCase ( ) . indexOf ( value ) > - 1 && result . push ( nodes [ i ] ) , result = result . concat ( data . getNodesByParamFuzzy ( setting , nodes [ i ] [ childKey ] , key , value ) ) ; return result } , getNodesByFilter : function ( setting , nodes , filter , isSingle , invokeParam ) { if ( ! nodes ) return isSingle ? null : [ ] ; for ( var childKey = setting . data . key . children , result = isSingle ? null : [ ] , i = 0 , l = nodes . length ; i < l ; i ++ ) { if ( tools . apply ( filter , [ nodes [ i ] , invokeParam ] , ! 1 ) ) { if ( isSingle ) return nodes [ i ] ; result . push ( nodes [ i ] ) } var tmpResult = data . getNodesByFilter ( setting , nodes [ i ] [ childKey ] , filter , isSingle , invokeParam ) ; if ( isSingle && tmpResult ) return tmpResult ; result = isSingle ? tmpResult : result . concat ( tmpResult ) } return result } , getPreNode : function ( setting , node ) { if ( ! node ) return null ; for ( var childKey = setting . data . key . children , p = node . parentTId ? node . getParentNode ( ) : data . getRoot ( setting ) , i = 0 , l = p [ childKey ] . length ; i < l ; i ++ ) if ( p [ childKey ] [ i ] === node ) return 0 == i ? null : p [ childKey ] [ i - 1 ] ; return null } , getRoot : function ( setting ) { return setting ? roots [ setting . treeId ] : null } , getRoots : function ( ) { return roots } , getSetting : function ( treeId ) { return settings [ treeId ] } , getSettings : function ( ) { return settings } , getZTreeTools : function ( treeId ) { var r = this . getRoot ( this . getSetting ( treeId ) ) ; return r ? r . treeTools : null } , initCache : function ( setting ) { for ( var i = 0 , j = _init . caches . length ; i < j ; i ++ ) _init . caches [ i ] . apply ( this , arguments ) } , initNode : function ( setting , level , node , parentNode , preNode , nextNode ) { for ( var i = 0 , j = _init . nodes . length ; i < j ; i ++ ) _init . nodes [ i ] . apply ( this , arguments ) } , initRoot : function ( setting ) { for ( var i = 0 , j = _init . roots . length ; i < j ; i ++ ) _init . roots [ i ] . apply ( this , arguments ) } , isSelectedNode : function ( setting , node ) { for ( var root = data . getRoot ( setting ) , i = 0 , j = root . curSelectedList . length ; i < j ; i ++ ) if ( node === root . curSelectedList [ i ] ) return ! 0 ; return ! 1 } , removeNodeCache : function ( setting , node ) { var childKey = setting . data . key . children ; if ( node [ childKey ] ) for ( var i = 0 , l = node [ childKey ] . length ; i < l ; i ++ ) arguments . callee ( setting , node [ childKey ] [ i ] ) ; data . getCache ( setting ) . nodes [ data . getNodeCacheId ( node . tId ) ] = null } , removeSelectedNode : function ( setting , node ) { for ( var root = data . getRoot ( setting ) , i = 0 , j = root . curSelectedList . length ; i < j ; i ++ ) node !== root . curSelectedList [ i ] && data . getNodeC
} , getNodesByFilter : function ( filter , isSingle , parentNode , invokeParam ) { return isSingle = ! ! isSingle , filter && "function" == typeof filter ? data . getNodesByFilter ( setting , parentNode ? parentNode [ setting . data . key . children ] : data . getNodes ( setting ) , filter , isSingle , invokeParam ) : isSingle ? null : [ ] } , getNodeIndex : function ( node ) { if ( ! node ) return null ; for ( var childKey = setting . data . key . children , parentNode = node . parentTId ? node . getParentNode ( ) : data . getRoot ( setting ) , i = 0 , l = parentNode [ childKey ] . length ; i < l ; i ++ ) if ( parentNode [ childKey ] [ i ] == node ) return i ; return - 1 } , getSelectedNodes : function ( ) { for ( var r = [ ] , list = data . getRoot ( setting ) . curSelectedList , i = 0 , l = list . length ; i < l ; i ++ ) r . push ( list [ i ] ) ; return r } , isSelectedNode : function ( node ) { return data . isSelectedNode ( setting , node ) } , reAsyncChildNodes : function ( parentNode , reloadType , isSilent ) { if ( this . setting . async . enable ) { var isRoot = ! parentNode ; if ( isRoot && ( parentNode = data . getRoot ( setting ) ) , "refresh" == reloadType ) { for ( var childKey = this . setting . data . key . children , i = 0 , l = parentNode [ childKey ] ? parentNode [ childKey ] . length : 0 ; i < l ; i ++ ) data . removeNodeCache ( setting , parentNode [ childKey ] [ i ] ) ; if ( data . removeSelectedNode ( setting ) , parentNode [ childKey ] = [ ] , isRoot ) this . setting . treeObj . empty ( ) ; else { var ulObj = $$ ( parentNode , consts . id . UL , setting ) ; ulObj . empty ( ) } } view . asyncNode ( this . setting , isRoot ? null : parentNode , ! ! isSilent ) } } , refresh : function ( ) { this . setting . treeObj . empty ( ) ; var root = data . getRoot ( setting ) , nodes = root [ setting . data . key . children ] ; data . initRoot ( setting ) , root [ setting . data . key . children ] = nodes , data . initCache ( setting ) , view . createNodes ( setting , 0 , root [ setting . data . key . children ] ) } , removeChildNodes : function ( node ) { if ( ! node ) return null ; var childKey = setting . data . key . children , nodes = node [ childKey ] ; return view . removeChildNodes ( setting , node ) , nodes ? nodes : null } , removeNode : function ( node , callbackFlag ) { node && ( callbackFlag = ! ! callbackFlag , callbackFlag && 0 == tools . apply ( setting . callback . beforeRemove , [ setting . treeId , node ] , ! 0 ) || ( view . removeNode ( setting , node ) , callbackFlag && this . setting . treeObj . trigger ( consts . event . REMOVE , [ setting . treeId , node ] ) ) ) } , selectNode : function ( node , addFlag ) { if ( node && tools . uCanDo ( setting ) ) { if ( addFlag = setting . view . selectedMulti && addFlag , node . parentTId ) view . expandCollapseParentNode ( setting , node . getParentNode ( ) , ! 0 , ! 1 , function ( ) { try { $$ ( node , setting ) . focus ( ) . blur ( ) } catch ( e ) { } } ) ; else try { $$ ( node , setting ) . focus ( ) . blur ( ) } catch ( e ) { } view . selectNode ( setting , node , addFlag ) } } , transformTozTreeNodes : function ( simpleNodes ) { return data . transformTozTreeFormat ( setting , simpleNodes ) } , transformToArray : function ( nodes ) { return data . transformToArrayFormat ( setting , nodes ) } , updateNode : function ( node , checkTypeFlag ) { if ( node ) { var nObj = $$ ( node , setting ) ; nObj . get ( 0 ) && tools . uCanDo ( setting ) && ( view . setNodeName ( setting , node ) , view . setNodeTarget ( setting , node ) , view . setNodeUrl ( setting , node ) , view . setNodeLineIcos ( setting , node ) , view . setNodeFontCss ( setting , node ) ) } } } ; return root . treeTools = zTreeTools , data . setZTreeTools ( setting , zTreeTools ) , root [ childKey ] && root [ childKey ] . length > 0 ? view . createNodes ( setting , 0 , root [ childKey ] ) : setting . async . enable && setting . async . url && "" !== setting . async . url && view . asyncNode ( setting ) , zTreeTools } } ; var zt = $ . fn . zTree , $$ = tools . $ , consts = zt . consts } ( BI . jQuery ) , function ( $ ) { var _consts = { event : { CHECK : "ztree_check" } , id : { CHECK : "_check" } , checkbox : { STYLE : "checkbox" , DEFAULT : "chk" , DISABLED : "disable" , FALSE : "false" , TRUE : "true" , FULL : "full" , PART : "part" , FOCUS : "focus" } , radio : { STYLE : "radio" , TYPE _ALL : "all" , TYPE _LEVEL : "level" } } , _setting = { check : { enable : ! 1 , autoCheckTrigger : ! 1 , chkStyle : _consts . checkbox . STYLE , nocheckInherit : ! 1 , chkDisabledInherit : ! 1 , radioType : _consts . radio . TYPE _LEVEL , chkboxType : { Y : "ps" , N : "ps" } } , data : { key : { checked : "checked" } } , callback : { beforeCheck : null , onCheck : null } } , _initRoot = function ( setting ) { var r = data . getRoot ( setting ) ; r . radioCheckedList = [ ] } , _initCache = function ( treeId ) { } , _bindEvent = function ( setting ) { var o = setting . treeObj , c = consts . event ; o . bind ( c . CHECK , function ( event , srcEvent , treeId , node ) { event . srcEvent = srcEvent , tools . apply ( setting . callback . onCheck , [ event , treeId , node ] ) } ) } , _unbindEvent = function ( setting ) { var o = setting . treeObj , c = consts . event ; o . unbind ( c . CHECK ) } , _eventProxy = function ( e ) { var ta
items : items , rgap : 5 } ) ) ) ) } , doRedMark : function ( ) { this . text . doRedMark . apply ( this . text , arguments ) } , unRedMark : function ( ) { this . text . unRedMark . apply ( this . text , arguments ) } , doClick : function ( ) { BI . IconArrowNode . superclass . doClick . apply ( this , arguments ) , this . checkbox . setSelected ( this . isSelected ( ) ) } , setOpened : function ( v ) { BI . IconArrowNode . superclass . setOpened . apply ( this , arguments ) , BI . isNotNull ( this . checkbox ) && this . checkbox . setSelected ( v ) } } ) , BI . shortcut ( "bi.icon_arrow_node" , BI . IconArrowNode ) , BI . LastPlusGroupNode = BI . inherit ( BI . NodeButton , { _defaultConfig : function ( ) { var conf = BI . LastPlusGroupNode . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { baseCls : ( conf . baseCls || "" ) + " bi-last-plus-group-node bi-list-item" , logic : { dynamic : ! 1 } , id : "" , pId : "" , open : ! 1 , height : 24 } ) } , _init : function ( ) { BI . LastPlusGroupNode . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . checkbox = BI . createWidget ( { type : "bi.last_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 . LastPlusGroupNode . superclass . doClick . apply ( this , arguments ) , this . checkbox . setSelected ( this . isSelected ( ) ) } , setOpened : function ( v ) { BI . LastPlusGroupNode . superclass . setOpened . apply ( this , arguments ) , BI . isNotNull ( this . checkbox ) && this . checkbox . setSelected ( v ) } } ) , BI . shortcut ( "bi.last_plus_group_node" , BI . LastPlusGroupNode ) , BI . MidPlusGroupNode = BI . inherit ( BI . NodeButton , { _defaultConfig : function ( ) { var conf = BI . MidPlusGroupNode . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { baseCls : ( conf . baseCls || "" ) + " bi-mid-plus-group-node bi-list-item" , logic : { dynamic : ! 1 } , id : "" , pId : "" , open : ! 1 , height : 24 } ) } , _init : function ( ) { BI . MidPlusGroupNode . 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 , 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 . MidPlusGroupNode . superclass . doClick . apply ( this , arguments ) , this . checkbox . setSelected ( this . isSelected ( ) ) } , setOpened : function ( v ) { BI . MidPlusGroupNode . superclass . setOpened . apply ( this , arguments ) , BI . isNotNull ( this . checkbox ) && this . checkbox . setSelected ( v ) } } ) , BI . shortcut ( "bi.mid_plus_group_node" , BI . MidPlusGroupNode ) , BI . MultiLayerIconArrowNode = BI . inherit ( BI . NodeButton , { _defaultConfig : function ( ) { var conf = BI . MultiLayerIconArrowNode . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { extraCls : "bi-multilayer-icon-arrow-node bi-list-item" , layer : 0 , id : "" , pId : "" , open : ! 1 , height : 24 , iconHeight : 16 , iconWidth : 16 , iconCls : "" } ) } , _init : function ( ) { BI . MultiLayerIconArrowNode . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . node = BI . createWidget ( { type : " bi .
type : "bi.color_picker" , width : 210 , height : 50 , value : o . value } ) , this . colorPicker . on ( BI . ColorPicker . EVENT _CHANGE , function ( ) { self . setValue ( this . getValue ( ) [ 0 ] ) , self . _dealStoreColors ( ) , self . fireEvent ( BI . ColorChooserPopup . EVENT _CHANGE , arguments ) } ) , this . customColorChooser = BI . createWidget ( { type : "bi.custom_color_chooser" , editor : o . editor } ) ; var panel = BI . createWidget ( { type : "bi.popup_panel" , buttons : [ BI . i18nText ( "BI-Basic_Cancel" ) , BI . i18nText ( "BI-Basic_Save" ) ] , title : BI . i18nText ( "BI-Custom_Color" ) , el : this . customColorChooser , stopPropagation : ! 1 , bgap : - 1 , rgap : 1 , lgap : 1 , minWidth : 227 } ) ; return this . more = BI . createWidget ( { type : "bi.combo" , cls : "bi-border-top" , container : null , direction : "right,top" , isNeedAdjustHeight : ! 1 , el : { type : "bi.text_item" , cls : "color-chooser-popup-more bi-list-item" , textAlign : "center" , height : 24 , textLgap : 10 , text : BI . i18nText ( "BI-Basic_More" ) + "..." } , popup : panel } ) , this . more . on ( BI . Combo . EVENT _AFTER _POPUPVIEW , function ( ) { self . customColorChooser . setValue ( self . getValue ( ) ) } ) , panel . on ( BI . PopupPanel . EVENT _CLICK _TOOLBAR _BUTTON , function ( index ) { switch ( index ) { case 0 : self . more . hideView ( ) ; break ; case 1 : self . setValue ( self . customColorChooser . getValue ( ) ) , self . _dealStoreColors ( ) , self . more . hideView ( ) , self . fireEvent ( BI . ColorChooserPopup . EVENT _CHANGE , arguments ) } } ) , { type : "bi.absolute" , items : [ { el : { type : "bi.vtape" , items : [ this . colorEditor , { el : { type : "bi.absolute" , items : [ { el : this . storeColors , left : 10 , right : 10 , top : 5 } ] } , height : 29 } , { el : { type : "bi.absolute" , items : [ { el : this . colorPicker , left : 10 , right : 10 , top : 5 , bottom : 5 } ] } , height : 60 } , { el : this . more , height : 24 } ] } , left : 0 , right : 0 , top : 0 , bottom : 0 } , { el : { type : "bi.layout" , cls : "disable-mask" , invisible : ! o . disabled , ref : function ( ) { self . mask = this } } , left : 0 , right : 0 , top : 0 , bottom : 0 } ] } } , mounted : function ( ) { var self = this , o = this . options ; BI . isNotNull ( o . value ) && this . setValue ( o . value ) } , _setEnable : function ( enable ) { BI . ColorChooserPopup . superclass . _setEnable . apply ( this , arguments ) , this . mask . setVisible ( ! enable ) } , _dealStoreColors : function ( ) { var color = this . getValue ( ) , colors = this . _getStoreColors ( ) , que = new BI . Queue ( 8 ) ; que . fromArray ( colors ) , que . remove ( color ) , que . unshift ( color ) ; var array = que . toArray ( ) ; BI . Cache . setItem ( "colors" , BI . array2String ( array ) ) , this . setStoreColors ( array ) } , _digestStoreColors : function ( colors ) { var items = BI . map ( colors , function ( i , color ) { return { value : color } } ) ; return BI . count ( colors . length , 8 , function ( i ) { items . push ( { value : "" , disabled : ! 0 } ) } ) , items } , _getStoreColors : function ( ) { var self = this , o = this . options , colorsArray = BI . string2Array ( BI . Cache . getItem ( "colors" ) || "" ) ; return BI . filter ( colorsArray , function ( idx , color ) { return ! o . simple || self . _isRGBColor ( color ) } ) } , _isRGBColor : function ( color ) { return BI . isNotEmptyString ( color ) && "transparent" !== color } , setStoreColors : function ( colors ) { BI . isArray ( colors ) && this . storeColors . populate ( [ this . _digestStoreColors ( colors ) ] ) } , setValue : function ( color ) { this . colorEditor . setValue ( color ) , this . colorPicker . setValue ( color ) , this . storeColors . setValue ( color ) } , getValue : function ( ) { return this . colorEditor . getValue ( ) } } ) , BI . ColorChooserPopup . EVENT _VALUE _CHANGE = "EVENT_VALUE_CHANGE" , BI . ColorChooserPopup . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.color_chooser_popup" , BI . ColorChooserPopup ) , BI . SimpleColorChooserPopup = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . SimpleColorChooserPopup . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-color-chooser-popup" } ) } , _init : function ( ) { BI . SimpleColorChooserPopup . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . popup = BI . createWidget ( { type : "bi.color_chooser_popup" , value : o . value , element : this , simple : ! 0 } ) , this . popup . on ( BI . ColorChooserPopup . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . SimpleColorChooserPopup . EVENT _CHANGE , arguments ) } ) , this . popup . on ( BI . ColorChooserPopup . EVENT _VALUE _CHANGE , function ( ) { self . fireEvent ( BI . SimpleColorChooserPopup . EVENT _VALUE _CHANGE , arguments ) } ) } , setStoreColors : function ( colors ) { this . popup . setStoreColors ( colors ) } , setValue : function ( color ) { this . popup . setValue ( color ) } , getValue : function ( ) { return this . popup . getValue ( ) } } ) , BI . SimpleColorChooserPopup . EVENT _VALUE _CHANGE = "EVENT_VALUE_CHANGE" , BI . SimpleColorChooserPopup . EVENT _CHANGE = " EVENT _CHAN
this . editorIconCheckCombo . setValue ( v ) } , getValue : function ( ) { return this . trigger . getValue ( ) } , populate : function ( items ) { this . options . items = items , this . editorIconCheckCombo . populate ( items ) } } ) , BI . EditorIconCheckCombo . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.editor_icon_check_combo" , BI . EditorIconCheckCombo ) , BI . IconCombo = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . IconCombo . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-icon-combo" , width : 24 , height : 24 , el : { } , popup : { } , minWidth : 100 , maxWidth : "auto" , maxHeight : 300 , direction : "bottom" , adjustLength : 3 , adjustXOffset : 0 , adjustYOffset : 0 , offsetStyle : "left" , chooseType : BI . ButtonGroup . CHOOSE _TYPE _SINGLE } ) } , _init : function ( ) { BI . IconCombo . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . trigger = BI . createWidget ( o . el , { type : "bi.icon_combo_trigger" , iconCls : o . iconCls , title : o . title , items : o . items , width : o . width , height : o . height , iconWidth : o . iconWidth , iconHeight : o . iconHeight , value : o . value } ) , this . popup = BI . createWidget ( o . popup , { type : "bi.icon_combo_popup" , chooseType : o . chooseType , items : o . items , value : o . value } ) , this . popup . on ( BI . IconComboPopup . EVENT _CHANGE , function ( ) { self . setValue ( self . popup . getValue ( ) ) , self . iconCombo . hideView ( ) , self . fireEvent ( BI . IconCombo . EVENT _CHANGE ) } ) , this . popup . on ( BI . Controller . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) , this . iconCombo = BI . createWidget ( { type : "bi.combo" , element : this , direction : o . direction , trigger : o . trigger , container : o . container , adjustLength : o . adjustLength , adjustXOffset : o . adjustXOffset , adjustYOffset : o . adjustYOffset , offsetStyle : o . offsetStyle , el : this . trigger , popup : { el : this . popup , maxWidth : o . maxWidth , maxHeight : o . maxHeight , minWidth : o . minWidth } } ) } , showView : function ( ) { this . iconCombo . showView ( ) } , hideView : function ( ) { this . iconCombo . hideView ( ) } , setValue : function ( v ) { this . trigger . setValue ( v ) , this . popup . setValue ( v ) } , getValue : function ( ) { var value = this . popup . getValue ( ) ; return BI . isNull ( value ) ? [ ] : BI . isArray ( value ) ? value : [ value ] } , populate : function ( items ) { this . options . items = items , this . iconCombo . populate ( items ) } } ) , BI . IconCombo . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.icon_combo" , BI . IconCombo ) , BI . IconComboPopup = BI . inherit ( BI . Pane , { _defaultConfig : function ( ) { return BI . extend ( BI . IconComboPopup . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi.icon-combo-popup" , chooseType : BI . ButtonGroup . CHOOSE _TYPE _SINGLE } ) } , _init : function ( ) { BI . IconComboPopup . superclass . _init . apply ( this , arguments ) ; var o = this . options , self = this ; this . popup = BI . createWidget ( { type : "bi.button_group" , items : BI . createItems ( o . items , { type : "bi.single_select_icon_text_item" , height : 24 } ) , chooseType : o . chooseType , layouts : [ { type : "bi.vertical" } ] , value : o . value } ) , this . popup . on ( BI . Controller . EVENT _CHANGE , function ( type , val , obj ) { self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) , type === BI . Events . CLICK && self . fireEvent ( BI . IconComboPopup . EVENT _CHANGE , val , obj ) } ) , BI . createWidget ( { type : "bi.vertical" , element : this , vgap : 5 , items : [ this . popup ] } ) } , populate : function ( items ) { BI . IconComboPopup . superclass . populate . apply ( this , arguments ) , items = BI . createItems ( items , { type : "bi.single_select_icon_text_item" , height : 24 } ) , this . popup . populate ( items ) } , getValue : function ( ) { return this . popup . getValue ( ) } , setValue : function ( v ) { this . popup . setValue ( v ) } } ) , BI . IconComboPopup . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.icon_combo_popup" , BI . IconComboPopup ) , BI . IconComboTrigger = BI . inherit ( BI . Trigger , { _defaultConfig : function ( ) { return BI . extend ( BI . IconComboTrigger . superclass . _defaultConfig . apply ( this , arguments ) , { extraCls : "bi-icon-combo-trigger" , el : { } , items : [ ] , iconCls : "" , width : 24 , height : 24 , isShowDown : ! 0 , value : "" } ) } , _init : function ( ) { BI . IconComboTrigger . superclass . _init . apply ( this , arguments ) ; var o = this . options , self = this , iconCls = "" ; BI . isKey ( o . value ) && ( iconCls = this . _digest ( o . value , o . items ) ) , this . button = BI . createWidget ( o . el , { type : "bi.icon_change_button" , cls : "icon-combo-trigger-icon" , iconCls : iconCls , disableSelected : ! 0 , width : o . isShowDown ? o . width - 12 : o . width , height : o . height , iconWidth : o . iconWidth , iconHeight : o . iconHeight , selected : BI . isNotEmptyString ( iconCls ) } ) , this . down = BI . createWidget ( { type : "bi.icon_button" ,
BI . ShelterEditor . EVENT _CHANGE _CONFIRM = "EVENT_CHANGE_CONFIRM" , BI . ShelterEditor . EVENT _VALID = "EVENT_VALID" , BI . ShelterEditor . EVENT _ERROR = "EVENT_ERROR" , BI . ShelterEditor . EVENT _ENTER = "EVENT_ENTER" , BI . ShelterEditor . EVENT _RESTRICT = "EVENT_RESTRICT" , BI . ShelterEditor . EVENT _SPACE = "EVENT_SPACE" , BI . ShelterEditor . EVENT _EMPTY = "EVENT_EMPTY" , BI . shortcut ( "bi.shelter_editor" , BI . ShelterEditor ) , BI . SignEditor = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { var conf = BI . SignEditor . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { baseCls : ( conf . baseCls || "" ) + " bi-sign-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 } ) } , _init : function ( ) { BI . SignEditor . 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 : "sign-editor-text" , title : o . title , warningTitle : o . warningTitle , tipType : o . tipType , textAlign : "left" , height : o . height , hgap : o . hgap , handler : function ( ) { self . _showInput ( ) , self . editor . focus ( ) , self . editor . selectAll ( ) } } ) , this . text . on ( BI . TextButton . EVENT _CHANGE , function ( ) { BI . nextTick ( function ( ) { self . fireEvent ( BI . SignEditor . EVENT _CLICK _LABEL ) } ) } ) , BI . createWidget ( { type : "bi.absolute" , element : this , items : [ { el : this . text , left : 0 , right : 0 , top : 0 , bottom : 0 } ] } ) , 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 . SignEditor . EVENT _FOCUS , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _BLUR , function ( ) { self . fireEvent ( BI . SignEditor . EVENT _BLUR , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _CLICK , function ( ) { self . fireEvent ( BI . SignEditor . EVENT _CLICK , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . SignEditor . EVENT _CHANGE , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _KEY _DOWN , function ( v ) { self . fireEvent ( BI . SignEditor . EVENT _KEY _DOWN , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _VALID , function ( ) { self . fireEvent ( BI . SignEditor . EVENT _VALID , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _CONFIRM , function ( ) { self . _showHint ( ) , self . _checkText ( ) , self . fireEvent ( BI . SignEditor . EVENT _CONFIRM , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _CHANGE _CONFIRM , function ( ) { self . _showHint ( ) , self . _checkText ( ) , self . fireEvent ( BI . SignEditor . EVENT _CHANGE _CONFIRM , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _START , function ( ) { self . fireEvent ( BI . SignEditor . EVENT _START , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _PAUSE , function ( ) { self . fireEvent ( BI . SignEditor . EVENT _PAUSE , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _STOP , function ( ) { self . fireEvent ( BI . SignEditor . EVENT _STOP , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _SPACE , function ( ) { self . fireEvent ( BI . SignEditor . EVENT _SPACE , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _ERROR , function ( ) { self . _checkText ( ) , self . fireEvent ( BI . SignEditor . EVENT _ERROR , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _ENTER , function ( ) { self . fireEvent ( BI . SignEditor . EVENT _ENTER , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _RESTRICT , function ( ) { self . fireEvent ( BI . SignEditor . EVENT _RESTRICT , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _EMPTY , function ( ) { self . fireEvent ( BI . SignEditor . 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 ; BI . nextTick ( BI . bind ( function ( ) { "" === this . editor . getValue ( ) ? ( this . text . setValue ( o . watermark || "" ) , this . text . element . addClass ( "bi-water-mark" ) ) : ( this . text . setValue ( this . editor . getValue ( ) ) , this . text . element . removeClass ( "bi-water-mark" ) , BI . isKey ( o . keyword ) && this . text . doRedMark ( o . keyword ) ) } , this ) ) } , _showInput : function ( ) { this . editor . visible ( ) , this . text . invisible ( ) } , _showHint : function ( ) { this . editor . invisible ( ) , this . text . visible ( ) } , setTitle : function ( title ) { this . text . setTitle ( title ) } , s
return this . list . getNodeByValue ( value ) } } ) , BI . SelectList . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.select_list" , BI . SelectList ) , BI . LazyLoader = BI . inherit ( BI . Widget , { _const : { PAGE : 100 } , _defaultConfig : function ( ) { return BI . extend ( BI . LazyLoader . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-lazy-loader" , el : { } } ) } , _init : function ( ) { var self = this , o = this . options ; BI . LazyLoader . superclass . _init . apply ( this , arguments ) ; var all = o . items . length ; this . loader = BI . createWidget ( { type : "bi.loader" , element : this , el : o . el , itemsCreator : function ( options , populate ) { populate ( self . _getNextItems ( options ) ) } , hasNext : function ( option ) { return option . count < all } } ) , this . loader . on ( BI . Loader . EVENT _CHANGE , function ( obj ) { self . fireEvent ( BI . LazyLoader . EVENT _CHANGE , obj ) } ) } , _getNextItems : function ( options ) { var self = this , o = this . options , lastNum = o . items . length - this . _const . PAGE * ( options . times - 1 ) , lastItems = BI . takeRight ( o . items , lastNum ) , nextItems = BI . take ( lastItems , this . _const . PAGE ) ; return nextItems } , populate : function ( items ) { this . loader . populate ( items ) } , addItems : function ( items ) { this . loader . addItems ( items ) } , empty : function ( ) { this . loader . empty ( ) } , setNotSelectedValue : function ( ) { this . loader . setNotSelectedValue . apply ( this . loader , arguments ) } , getNotSelectedValue : function ( ) { return this . loader . getNotSelectedValue ( ) } , setValue : function ( ) { this . loader . setValue . apply ( this . loader , arguments ) } , getValue : function ( ) { return this . loader . getValue . apply ( this . loader , arguments ) } , getAllButtons : function ( ) { return this . loader . getAllButtons ( ) } , getAllLeaves : function ( ) { return this . loader . getAllLeaves ( ) } , getSelectedButtons : function ( ) { return this . loader . getSelectedButtons ( ) } , getNotSelectedButtons : function ( ) { return this . loader . getNotSelectedButtons ( ) } , getIndexByValue : function ( value ) { return this . loader . getIndexByValue ( value ) } , getNodeById : function ( id ) { return this . loader . getNodeById ( id ) } , getNodeByValue : function ( value ) { return this . loader . getNodeByValue ( value ) } } ) , BI . LazyLoader . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.lazy_loader" , BI . LazyLoader ) , BI . ListLoader = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . ListLoader . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-list-loader" , isDefaultInit : ! 0 , el : { type : "bi.button_group" } , items : [ ] , itemsCreator : BI . emptyFn , onLoaded : BI . emptyFn , count : ! 1 , next : { } , hasNext : BI . emptyFn } ) } , _nextLoad : function ( ) { var self = this , o = this . options ; this . next . setLoading ( ) , o . itemsCreator . apply ( this , [ { times : ++ this . times } , function ( ) { self . next . setLoaded ( ) , self . addItems . apply ( self , arguments ) } ] ) } , _init : function ( ) { BI . ListLoader . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; o . itemsCreator === ! 1 && ( o . next = ! 1 ) , this . button _group = BI . createWidget ( o . el , { type : "bi.button_group" , element : this , chooseType : 0 , items : o . items , behaviors : { } , layouts : [ { type : "bi.vertical" } ] } ) , this . button _group . on ( BI . Controller . EVENT _CHANGE , function ( type , value , obj ) { self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) , type === BI . Events . CLICK && self . fireEvent ( BI . ListLoader . EVENT _CHANGE , obj ) } ) , o . next !== ! 1 && ( this . next = BI . createWidget ( BI . extend ( { type : "bi.loading_bar" } , o . next ) ) , this . next . on ( BI . Controller . EVENT _CHANGE , function ( type ) { type === BI . Events . CLICK && self . _nextLoad ( ) } ) ) , BI . createWidget ( { type : "bi.vertical" , element : this , items : [ this . next ] } ) , o . isDefaultInit && BI . isEmpty ( o . items ) && BI . nextTick ( BI . bind ( function ( ) { this . populate ( ) } , this ) ) , BI . isNotEmptyArray ( o . items ) && this . populate ( o . items ) } , hasNext : function ( ) { var o = this . options ; return BI . isNumber ( o . count ) ? this . count < o . count : ! ! o . hasNext . apply ( this , [ { times : this . times , count : this . count } ] ) } , addItems : function ( items ) { this . count += items . length , BI . isObject ( this . next ) && ( this . options . items = this . options . items . concat ( items ) , this . hasNext ( ) ? this . next . setLoaded ( ) : this . next . setEnd ( ) ) , this . button _group . addItems . apply ( this . button _group , arguments ) , this . next . element . appendTo ( this . element ) } , populate : function ( items ) { var self = this , o = this . options ; return 0 === arguments . length && BI . isFunction ( o . itemsCreator ) ? void o . itemsCreator . apply ( this , [ { times : 1 } , function ( ) { if ( 0 === arguments . length ) throw new Error ( "参数不能为空" ) ; self . populate . apply ( self , arguments ) , o . onLoaded ( ) } ] ) : ( this . optio
} ) , self . structure . initTree ( BI . Tree . transformToTreeFormat ( items ) ) } ; BI . isNotNull ( o . items ) ? fn ( o . items ) : o . itemsCreator ( op , fn ) } } ) , this . tree . on ( BI . TreeView . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . SimpleTreeView . EVENT _CHANGE , arguments ) } ) , BI . isNotEmptyArray ( o . items ) && this . populate ( ) , BI . isNotNull ( o . value ) && this . setValue ( o . value ) } , populate : function ( items , keyword ) { items && ( this . options . items = items ) , this . tree . stroke ( { keyword : keyword } ) } , _digest : function ( v ) { v || ( v = [ ] ) ; var self = this , map = { } , selected = [ ] ; return BI . each ( v , function ( i , val ) { var node = self . structure . search ( val , "value" ) ; if ( node ) { var p = node ; for ( p = p . getParent ( ) , p && ( map [ p . value ] || ( map [ p . value ] = 0 ) , map [ p . value ] ++ ) ; p && p . getChildrenLength ( ) <= map [ p . value ] ; ) selected . push ( p . value ) , p = p . getParent ( ) , p && ( map [ p . value ] || ( map [ p . value ] = 0 ) , map [ p . value ] ++ ) } } ) , BI . makeObject ( v . concat ( selected ) ) } , setValue : function ( v ) { this . tree . setValue ( this . _digest ( v ) ) } , _getValue : function ( ) { var self = this , result = [ ] , val = this . tree . getValue ( ) , track = function ( nodes ) { BI . each ( nodes , function ( key , node ) { BI . isEmpty ( node ) ? result . push ( key ) : track ( node ) } ) } ; return track ( val ) , result } , empty : function ( ) { this . tree . empty ( ) } , getValue : function ( ) { var self = this , result = [ ] , val = this . _getValue ( ) ; return BI . each ( val , function ( i , key ) { var target = self . structure . search ( key , "value" ) ; target && self . structure . _traverse ( target , function ( node ) { node . isLeaf ( ) && result . push ( node . value ) } ) } ) , result } } ) , BI . SimpleTreeView . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.simple_tree" , BI . SimpleTreeView ) , BI . EditorTrigger = BI . inherit ( BI . Trigger , { _const : { hgap : 4 } , _defaultConfig : function ( ) { var conf = BI . EditorTrigger . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { baseCls : ( conf . baseCls || "" ) + " bi-editor-trigger bi-border" , height : 24 , validationChecker : BI . emptyFn , quitChecker : BI . emptyFn , allowBlank : ! 1 , watermark : "" , errorText : "" } ) } , _init : function ( ) { this . options . height -= 2 , BI . EditorTrigger . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options , c = this . _const ; this . editor = BI . createWidget ( { type : "bi.sign_editor" , height : o . height , value : o . value , validationChecker : o . validationChecker , quitChecker : o . quitChecker , allowBlank : o . allowBlank , watermark : o . watermark , errorText : o . errorText , title : function ( ) { return self . getValue ( ) } } ) , this . editor . on ( BI . Controller . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) , this . editor . on ( BI . SignEditor . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . EditorTrigger . EVENT _CHANGE , arguments ) } ) , BI . createWidget ( { element : this , type : "bi.htape" , items : [ { el : this . editor } , { el : { type : "bi.trigger_icon_button" , width : o . triggerWidth || o . height } , width : o . triggerWidth || o . height } ] } ) } , getValue : function ( ) { return this . editor . getValue ( ) } , setValue : function ( value ) { this . editor . setValue ( value ) } , setText : function ( text ) { this . editor . setState ( text ) } } ) , BI . EditorTrigger . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.editor_trigger" , BI . EditorTrigger ) , BI . IconTrigger = BI . inherit ( BI . Trigger , { _defaultConfig : function ( ) { return BI . extend ( BI . IconTrigger . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-icon-trigger" , extraCls : "pull-down-font" , el : { } , height : 24 } ) } , _init : function ( ) { var o = this . options ; BI . IconTrigger . superclass . _init . apply ( this , arguments ) , this . iconButton = BI . createWidget ( o . el , { type : "bi.trigger_icon_button" , element : this , width : o . width , height : o . height , extraCls : o . extraCls } ) } } ) , BI . shortcut ( "bi.icon_trigger" , BI . IconTrigger ) , BI . IconTextTrigger = BI . inherit ( BI . Trigger , { _const : { hgap : 4 } , _defaultConfig : function ( ) { var conf = BI . IconTextTrigger . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { baseCls : ( conf . baseCls || "" ) + " bi-text-trigger" , height : 24 , iconHeight : null , iconWidth : null , textCls : "" } ) } , _init : function ( ) { BI . IconTextTrigger . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options , c = this . _const ; this . text = BI . createWidget ( { type : "bi.label" , cls : "select-text-label" + ( BI . isKey ( o . textCls ) ? " " + o . textCls : "" ) , textAlign : "left" , height : o . height , text : o . text } ) , this . trigerButton = BI . createWidget ( { type : "bi.trigger_icon_button" , width : o . triggerWidth || o . height } ) , BI . createWidget ( { element : this , type : "bi.htape" , ref : function ( _ref ) { self . wrapper = _ref } , items : [ { el : { type : "
type : "bi.htape" , element : this , items : [ { type : "bi.absolute" , items : [ { el : this . combo , top : 0 , left : 0 , right : 0 , bottom : 0 } , { el : triggerBtn , top : 0 , right : 0 } ] } ] } ) } , setValue : function ( v ) { this . storeValue = v , this . popup . setValue ( v ) , this . trigger . setValue ( v ) } , getValue : function ( ) { return this . storeValue } , hidePopupView : function ( ) { this . combo . hideView ( ) } } ) , BI . DateTimeCombo . EVENT _CANCEL = "EVENT_CANCEL" , BI . DateTimeCombo . EVENT _CONFIRM = "EVENT_CONFIRM" , BI . DateTimeCombo . EVENT _CHANGE = "EVENT_CHANGE" , BI . DateTimeCombo . EVENT _BEFORE _POPUPVIEW = "EVENT_BEFORE_POPUPVIEW" , BI . shortcut ( "bi.date_time_combo" , BI . DateTimeCombo ) , BI . DateTimePopup = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . DateTimePopup . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-date-time-popup" , width : 268 , height : 374 } ) } , _init : function ( ) { BI . DateTimePopup . superclass . _init . apply ( this , arguments ) ; var self = this , opts = this . options ; this . cancelButton = BI . createWidget ( { type : "bi.text_button" , cls : "multidate-popup-button bi-border-top bi-border-right" , shadow : ! 0 , text : BI . i18nText ( "BI-Basic_Cancel" ) } ) , this . cancelButton . on ( BI . TextButton . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . DateTimePopup . BUTTON _CANCEL _EVENT _CHANGE ) } ) , this . okButton = BI . createWidget ( { type : "bi.text_button" , cls : "multidate-popup-button bi-border-top" , shadow : ! 0 , text : BI . i18nText ( "BI-Basic_OK" ) } ) , this . okButton . on ( BI . TextButton . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . DateTimePopup . BUTTON _OK _EVENT _CHANGE ) } ) , this . dateCombo = BI . createWidget ( { type : "bi.date_calendar_popup" , behaviors : opts . behaviors , min : self . options . min , max : self . options . max } ) , self . dateCombo . on ( BI . DateCalendarPopup . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . DateTimePopup . CALENDAR _EVENT _CHANGE ) } ) , this . dateButton = BI . createWidget ( { type : "bi.grid" , items : [ [ this . cancelButton , this . okButton ] ] } ) , BI . createWidget ( { element : this , type : "bi.vtape" , items : [ { el : this . dateCombo } , { el : { type : "bi.center_adapt" , cls : "bi-split-top" , items : [ { type : "bi.dynamic_date_time_select" , ref : function ( _ref ) { self . timeSelect = _ref } } ] } , height : 50 } , { el : this . dateButton , height : 30 } ] } ) , this . setValue ( opts . value ) } , setValue : function ( v ) { var value = v , date ; BI . isNull ( value ) ? ( date = BI . getDate ( ) , this . dateCombo . setValue ( { year : date . getFullYear ( ) , month : date . getMonth ( ) + 1 , day : date . getDate ( ) } ) , this . timeSelect . setValue ( { hour : date . getHours ( ) , minute : date . getMinutes ( ) , second : date . getSeconds ( ) } ) ) : ( this . dateCombo . setValue ( { year : value . year , month : value . month , day : value . day } ) , this . timeSelect . setValue ( { hour : value . hour , minute : value . minute , second : value . second } ) ) } , getValue : function ( ) { return BI . extend ( { year : this . dateCombo . getValue ( ) . year , month : this . dateCombo . getValue ( ) . month , day : this . dateCombo . getValue ( ) . day } , this . timeSelect . getValue ( ) ) } } ) , BI . DateTimePopup . BUTTON _OK _EVENT _CHANGE = "BUTTON_OK_EVENT_CHANGE" , BI . DateTimePopup . BUTTON _CANCEL _EVENT _CHANGE = "BUTTON_CANCEL_EVENT_CHANGE" , BI . DateTimePopup . CALENDAR _EVENT _CHANGE = "CALENDAR_EVENT_CHANGE" , BI . shortcut ( "bi.date_time_popup" , BI . DateTimePopup ) , BI . DateTimeTrigger = BI . inherit ( BI . Trigger , { _const : { hgap : 4 } , _defaultConfig : function ( ) { return BI . extend ( BI . DateTimeTrigger . superclass . _defaultConfig . apply ( this , arguments ) , { extraCls : "bi-date-time-trigger" , min : "1900-01-01" , max : "2099-12-31" , height : 24 , width : 200 } ) } , _init : function ( ) { BI . DateTimeTrigger . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options , c = this . _const ; this . text = BI . createWidget ( { type : "bi.label" , textAlign : "left" , height : o . height , width : o . width , hgap : c . hgap } ) , BI . createWidget ( { type : "bi.htape" , element : this , items : [ { el : this . text } , { el : BI . createWidget ( ) , width : o . height } ] } ) , this . setValue ( o . value ) } , _printTime : function ( v ) { return v < 10 ? "0" + v : v } , setValue : function ( v ) { var self = this , value = v , dateStr ; if ( BI . isNull ( value ) ) value = BI . getDate ( ) , dateStr = BI . print ( value , "%Y-%X-%d %H:%M:%S" ) ; else { var date = BI . getDate ( value . year , value . month - 1 , value . day , value . hour , value . minute , value . second ) ; dateStr = BI . print ( date , "%Y-%X-%d %H:%M:%S" ) } this . text . setText ( dateStr ) , this . text . setTitle ( dateStr ) } } ) , BI . shortcut ( "bi.date_time_trigger" , BI . DateTimeTrigger ) , BI . StaticDateTimePaneCard = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { var conf = BI . StaticDateTimePaneCard . superclass . _defaultConfig . apply ( thi
} } , { eventName : BI . DynamicDateTrigger . EVENT _STOP , action : function ( ) { self . combo . isViewVisible ( ) || self . combo . showView ( ) } } , { eventName : BI . DynamicDateTrigger . EVENT _FOCUS , action : function ( ) { self . storeTriggerValue = self . trigger . getKey ( ) , self . combo . isViewVisible ( ) || self . combo . showView ( ) , self . fireEvent ( BI . DynamicDateCombo . EVENT _FOCUS ) } } , { eventName : BI . DynamicDateTrigger . EVENT _BLUR , action : function ( ) { self . fireEvent ( BI . DynamicDateCombo . EVENT _BLUR ) } } , { eventName : BI . DynamicDateTrigger . EVENT _ERROR , action : function ( ) { self . storeValue = { type : BI . DynamicDateCombo . Static , value : { year : date . getFullYear ( ) , month : date . getMonth ( ) + 1 } } , self . fireEvent ( BI . DynamicDateCombo . EVENT _ERROR ) } } , { eventName : BI . DynamicDateTrigger . EVENT _VALID , action : function ( ) { self . fireEvent ( BI . DynamicDateCombo . EVENT _VALID ) } } , { eventName : BI . DynamicDateTrigger . EVENT _CHANGE , action : function ( ) { self . fireEvent ( BI . DynamicDateCombo . EVENT _CHANGE ) } } , { eventName : BI . DynamicDateTrigger . EVENT _CONFIRM , action : function ( ) { if ( ! self . combo . isViewVisible ( ) ) { var dateStore = self . storeTriggerValue , dateObj = self . trigger . getKey ( ) ; BI . isNotEmptyString ( dateObj ) && ! BI . isEqual ( dateObj , dateStore ) ? ( self . storeValue = self . trigger . getValue ( ) , self . setValue ( self . trigger . getValue ( ) ) ) : BI . isEmptyString ( dateObj ) && ( self . storeValue = null , self . trigger . setValue ( ) ) , self . _checkDynamicValue ( self . storeValue ) , self . fireEvent ( BI . DynamicDateCombo . EVENT _CONFIRM ) } } } ] } , adjustLength : this . constants . comboAdjustHeight , popup : { el : { type : "bi.dynamic_date_popup" , behaviors : opts . behaviors , min : opts . minDate , max : opts . maxDate , value : opts . value , ref : function ( ) { self . popup = this } , listeners : [ { eventName : BI . DynamicDatePopup . BUTTON _CLEAR _EVENT _CHANGE , action : function ( ) { self . setValue ( ) , self . combo . hideView ( ) , self . fireEvent ( BI . DynamicDateCombo . EVENT _CONFIRM ) } } , { eventName : BI . DynamicDatePopup . BUTTON _lABEL _EVENT _CHANGE , action : function ( ) { var date = BI . getDate ( ) ; self . setValue ( { type : BI . DynamicDateCombo . Static , value : { year : date . getFullYear ( ) , month : date . getMonth ( ) + 1 , day : date . getDate ( ) } } ) , self . combo . hideView ( ) , self . fireEvent ( BI . DynamicDateCombo . EVENT _CONFIRM ) } } , { eventName : BI . DynamicDatePopup . BUTTON _OK _EVENT _CHANGE , action : function ( ) { var value = self . popup . getValue ( ) ; self . _checkValue ( value ) && self . setValue ( value ) , self . combo . hideView ( ) , self . fireEvent ( BI . DynamicDateCombo . EVENT _CONFIRM ) } } , { eventName : BI . DynamicDatePopup . EVENT _CHANGE , action : function ( ) { self . setValue ( self . popup . getValue ( ) ) , self . combo . hideView ( ) , self . fireEvent ( BI . DynamicDateCombo . EVENT _CONFIRM ) } } ] } , stopPropagation : ! 1 } , hideChecker : function ( e ) { return 0 === self . triggerBtn . element . find ( e . target ) . length } , listeners : [ { eventName : BI . Combo . EVENT _BEFORE _POPUPVIEW , action : function ( ) { self . popup . setValue ( self . storeValue ) , self . fireEvent ( BI . DynamicDateCombo . EVENT _BEFORE _POPUPVIEW ) } } ] } , 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 . DynamicDateCombo . 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 } } , _defaultState : function ( ) { } , 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 ( ) } } ) , BI . DynamicDateCombo . EVENT _KEY _DOWN = "EVENT_KEY_DOWN" , BI . DynamicDateCombo . EVENT _CONFIRM = "EVENT_CONFIRM" , BI . DynamicDateCombo . EVENT _FOCUS = "EVENT_FOCUS" , BI . DynamicDateCombo . EVENT _BLUR = "EVENT_BLUR" , BI . Dynam
action : function ( ) { var value = this . getValue ( ) ; self . _checkSecond ( value ) , this . setValue ( self . _formatValueToDoubleDigit ( value ) ) , self . fireEvent ( BI . DynamicDateTimeSelect . EVENT _CONFIRM ) } } ] , width : 60 , height : 24 } ] } ] } } , _checkBorder : function ( v ) { v = v || { } , this . _checkHour ( v . hour ) , this . _checkMinute ( v . minute ) , this . _checkSecond ( v . second ) } , _checkHour : function ( value ) { this . hour . setDownEnable ( BI . parseInt ( value ) > 0 ) , this . hour . setUpEnable ( BI . parseInt ( value ) < 23 ) } , _checkMinute : function ( value ) { this . minute . setDownEnable ( BI . parseInt ( value ) > 0 ) , this . minute . setUpEnable ( BI . parseInt ( value ) < 59 ) } , _checkSecond : function ( value ) { this . second . setDownEnable ( BI . parseInt ( value ) > 0 ) , this . second . setUpEnable ( BI . parseInt ( value ) < 59 ) } , _autoSwitch : function ( v , type ) { var limit = 0 , value = v + "" ; switch ( type ) { case BI . DynamicDateTimeSelect . HOUR : limit = 2 ; break ; case BI . DynamicDateTimeSelect . MINUTE : limit = 5 } if ( 1 === value . length && BI . parseInt ( value ) > limit && ( value = "0" + value ) , 2 === value . length ) switch ( type ) { case BI . DynamicDateTimeSelect . HOUR : this . hour . isEditing ( ) && this . minute . focus ( ) ; break ; case BI . DynamicDateTimeSelect . MINUTE : this . minute . isEditing ( ) && this . second . focus ( ) ; break ; case BI . DynamicDateTimeSelect . SECOND : } return value } , _formatValueToDoubleDigit : function ( v ) { ( BI . isNull ( v ) || BI . isEmptyString ( v ) ) && ( v = 0 ) ; var value = BI . parseInt ( v ) ; return value < 10 && ( value = "0" + value ) , value } , _assertValue : function ( v ) { return v = v || { } , v . hour = this . _formatValueToDoubleDigit ( v . hour ) || "00" , v . minute = this . _formatValueToDoubleDigit ( v . minute ) || "00" , v . second = this . _formatValueToDoubleDigit ( v . second ) || "00" , v } , getValue : function ( ) { return { hour : BI . parseInt ( this . hour . getValue ( ) ) , minute : BI . parseInt ( this . minute . getValue ( ) ) , second : BI . parseInt ( this . second . getValue ( ) ) } } , setValue : function ( v ) { v = this . _assertValue ( v ) , this . hour . setValue ( v . hour ) , this . minute . setValue ( v . minute ) , this . second . setValue ( v . second ) , this . _checkBorder ( v ) } } ) , BI . DynamicDateTimeSelect . EVENT _CONFIRM = "EVENT_CONFIRM" , BI . shortcut ( "bi.dynamic_date_time_select" , BI . DynamicDateTimeSelect ) , BI . extend ( BI . DynamicDateTimeSelect , { HOUR : 1 , MINUTE : 2 , SECOND : 3 } ) , BI . DynamicDateTimeTrigger = BI . inherit ( BI . Trigger , { _const : { hgap : 4 , vgap : 2 , yearLength : 4 , yearMonthLength : 6 , yearFullMonthLength : 7 , compareFormat : "%Y-%X-%d %H:%M:%S" } , props : { extraCls : "bi-date-time-trigger" , min : "1900-01-01" , max : "2099-12-31" , height : 24 , format : "" , allowEdit : ! 0 , watermark : "" } , _init : function ( ) { BI . DynamicDateTimeTrigger . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options , c = this . _const ; this . storeTriggerValue = "" , this . editor = BI . createWidget ( { type : "bi.sign_editor" , height : o . height , validationChecker : function ( v ) { var formatStr = self . _getStandardDateStr ( v ) , date = formatStr . match ( /\d+/g ) ; return ! BI . isKey ( o . format ) && self . _autoAppend ( v , date ) , self . _dateCheck ( formatStr ) && BI . checkDateLegal ( formatStr ) && self . _checkVoid ( { year : 0 | date [ 0 ] , month : 0 | date [ 1 ] , day : 0 | date [ 2 ] } ) } , quitChecker : function ( ) { return ! 1 } , hgap : c . hgap , vgap : c . vgap , allowBlank : ! 0 , watermark : BI . isKey ( o . watermark ) ? o . watermark : BI . i18nText ( "BI-Basic_Unrestricted" ) , errorText : function ( ) { var str = "" ; return BI . isKey ( o . format ) || ( str = self . editor . isEditing ( ) ? BI . i18nText ( "BI-Basic_Date_Time_Error_Text" ) : BI . i18nText ( "BI-Year_Trigger_Invalid_Text" ) ) , str } , title : BI . bind ( this . _getTitle , this ) } ) , this . editor . on ( BI . SignEditor . EVENT _KEY _DOWN , function ( ) { self . fireEvent ( BI . DynamicDateTimeTrigger . EVENT _KEY _DOWN , arguments ) } ) , this . editor . on ( BI . SignEditor . EVENT _FOCUS , function ( ) { self . storeTriggerValue = self . getKey ( ) , self . fireEvent ( BI . DynamicDateTimeTrigger . EVENT _FOCUS ) } ) , this . editor . on ( BI . SignEditor . EVENT _BLUR , function ( ) { self . fireEvent ( BI . DynamicDateTimeTrigger . EVENT _BLUR ) } ) , this . editor . on ( BI . SignEditor . EVENT _STOP , function ( ) { self . fireEvent ( BI . DynamicDateTimeTrigger . EVENT _STOP ) } ) , this . editor . on ( BI . SignEditor . EVENT _VALID , function ( ) { self . fireEvent ( BI . DynamicDateTimeTrigger . EVENT _VALID ) } ) , this . editor . on ( BI . SignEditor . EVENT _ERROR , function ( ) { self . fireEvent ( BI . DynamicDateTimeTrigger . EVENT _ERROR ) } ) , this . editor . on ( BI . SignEditor . EVENT _CONFIRM , function ( ) { var value = self . editor . getValue ( ) ; if ( BI . isNotNull ( value ) && self . editor . setState ( value ) , BI . isNotEmptyString ( value ) && ! BI . isEqual ( self . storeTriggerValue , self . getKey ( ) ) ) { var formatStr = sel
BI . AccurateCalculationModel = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . AccurateCalculationModel . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "" } ) } , _init : function ( ) { BI . AccurateCalculationModel . superclass . _init . apply ( this , arguments ) } , _getMagnitude : function ( n ) { for ( var magnitude = "1" , i = 0 ; i < n ; i ++ ) magnitude += "0" ; return BI . parseInt ( magnitude ) } , _formatDecimal : function ( stringNumber1 , stringNumber2 ) { if ( stringNumber1 . numDecimalLength !== stringNumber2 . numDecimalLength ) { var magnitudeDiff = stringNumber1 . numDecimalLength - stringNumber2 . numDecimalLength ; if ( magnitudeDiff > 0 ) var needAddZero = stringNumber2 ; else { var needAddZero = stringNumber1 ; magnitudeDiff = 0 - magnitudeDiff } for ( var i = 0 ; i < magnitudeDiff ; i ++ ) "0" === needAddZero . numDecimal && 0 === i || ( needAddZero . numDecimal += "0" ) } } , _stringNumberFactory : function ( num ) { var strNum = num . toString ( ) , numStrArray = strNum . split ( "." ) , numInteger = numStrArray [ 0 ] ; if ( 1 === numStrArray . length ) var numDecimal = "0" , numDecimalLength = 0 ; else var numDecimal = numStrArray [ 1 ] , numDecimalLength = numStrArray [ 1 ] . length ; return { numInteger : numInteger , numDecimal : numDecimal , numDecimalLength : numDecimalLength } } , _accurateSubtraction : function ( num1 , num2 ) { function getDecimalMaxLength ( num1 , num2 ) { return num1 . numDecimal . length >= num2 . numDecimal . length ? num1 . numDecimal . length : num2 . numDecimal . length } function addZero ( resultTemp , length ) { for ( var diff = length - resultTemp . length , i = 0 ; i < diff ; i ++ ) resultTemp = "0" + resultTemp ; return resultTemp } var stringNumber1 = this . _stringNumberFactory ( num1 ) , stringNumber2 = this . _stringNumberFactory ( num2 ) , integerResult = BI . parseInt ( stringNumber1 . numInteger ) - BI . parseInt ( stringNumber2 . numInteger ) ; this . _formatDecimal ( stringNumber1 , stringNumber2 ) ; var decimalMaxLength = getDecimalMaxLength ( stringNumber1 , stringNumber2 ) ; if ( BI . parseInt ( stringNumber1 . numDecimal ) >= BI . parseInt ( stringNumber2 . numDecimal ) ) var decimalResultTemp = ( BI . parseInt ( stringNumber1 . numDecimal ) - BI . parseInt ( stringNumber2 . numDecimal ) ) . toString ( ) , decimalResult = addZero ( decimalResultTemp , decimalMaxLength ) ; else { integerResult -- ; var borrow = this . _getMagnitude ( decimalMaxLength ) , decimalResultTemp = ( borrow + BI . parseInt ( stringNumber1 . numDecimal ) - BI . parseInt ( stringNumber2 . numDecimal ) ) . toString ( ) , decimalResult = addZero ( decimalResultTemp , decimalMaxLength ) } var result = integerResult + "." + decimalResult ; return BI . parseFloat ( result ) } , _accurateAddition : function ( num1 , num2 ) { function addZero ( resultTemp , length ) { for ( var diff = length - resultTemp . length , i = 0 ; i < diff ; i ++ ) resultTemp = "0" + resultTemp ; return resultTemp } var stringNumber1 = this . _stringNumberFactory ( num1 ) , stringNumber2 = this . _stringNumberFactory ( num2 ) , integerResult = BI . parseInt ( stringNumber1 . numInteger ) + BI . parseInt ( stringNumber2 . numInteger ) ; this . _formatDecimal ( stringNumber1 , stringNumber2 ) ; var decimalResult = ( BI . parseInt ( stringNumber1 . numDecimal ) + BI . parseInt ( stringNumber2 . numDecimal ) ) . toString ( ) ; "0" !== decimalResult && ( decimalResult . length <= stringNumber1 . numDecimal . length ? decimalResult = addZero ( decimalResult , stringNumber1 . numDecimal . length ) : ( integerResult ++ , decimalResult = decimalResult . slice ( 1 ) ) ) ; var result = integerResult + "." + decimalResult ; return BI . parseFloat ( result ) } , _accurateMultiplication : function ( num1 , num2 ) { var stringNumber1 = this . _stringNumberFactory ( num1 ) , stringNumber2 = this . _stringNumberFactory ( num2 ) , integerResult = BI . parseInt ( stringNumber1 . numInteger ) * BI . parseInt ( stringNumber2 . numInteger ) , dec1Int2 = this . _accurateDivisionTenExponent ( BI . parseInt ( stringNumber1 . numDecimal ) * BI . parseInt ( stringNumber2 . numInteger ) , stringNumber1 . numDecimalLength ) , int1dec2 = this . _accurateDivisionTenExponent ( BI . parseInt ( stringNumber1 . numInteger ) * BI . parseInt ( stringNumber2 . numDecimal ) , stringNumber2 . numDecimalLength ) , dec1dec2 = this . _accurateDivisionTenExponent ( BI . parseInt ( stringNumber1 . numDecimal ) * BI . parseInt ( stringNumber2 . numDecimal ) , stringNumber1 . numDecimalLength + stringNumber2 . numDecimalLength ) ; return this . _accurateAddition ( this . _accurateAddition ( this . _accurateAddition ( integerResult , dec1Int2 ) , int1dec2 ) , dec1dec2 ) } , _accurateDivisionTenExponent : function ( num , n ) { function addZero ( resultTemp , length ) { for ( var diff = length - resultTemp . length , i = 0 ; i < diff ; i ++ ) resultTemp = "0" + resultTem
self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) ; 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 ) } , isSelected : function ( ) { return this . node . isSelected ( ) } , setSelected : function ( b ) { BI . MultiLayerSelectTreeLastPlusGroupNode . superclass . setSelected . apply ( this , arguments ) , this . node . setSelected ( b ) } , doClick : function ( ) { BI . MultiLayerSelectTreeLastPlusGroupNode . superclass . doClick . apply ( this , arguments ) , this . node . setSelected ( this . isSelected ( ) ) } , setOpened : function ( v ) { BI . MultiLayerSelectTreeLastPlusGroupNode . superclass . setOpened . apply ( this , arguments ) , this . node . setOpened ( v ) } } ) , BI . shortcut ( "bi.multilayer_select_tree_last_plus_group_node" , BI . MultiLayerSelectTreeLastPlusGroupNode ) , BI . MultiLayerSelectTreeMidPlusGroupNode = BI . inherit ( BI . NodeButton , { _defaultConfig : function ( ) { var conf = BI . MultiLayerSelectTreeMidPlusGroupNode . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { extraCls : "bi-multilayer-select-tree-mid-plus-group-node bi-list-item-active" , layer : 0 , id : "" , pId : "" , readonly : ! 0 , open : ! 1 , height : 24 } ) } , _init : function ( ) { BI . MultiLayerSelectTreeMidPlusGroupNode . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . node = BI . createWidget ( { type : "bi.select_tree_mid_plus_group_node" , cls : "bi-list-item-none" , stopPropagation : ! 0 , logic : { dynamic : ! 0 } , id : o . id , pId : o . pId , keyword : o . keyword , open : o . open , height : o . height , hgap : o . hgap , text : o . text , value : o . value , py : o . py } ) , this . node . on ( BI . Controller . EVENT _CHANGE , function ( type ) { self . setSelected ( self . isSelected ( ) ) , self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) ; 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 ) } , isSelected : function ( ) { return this . node . isSelected ( ) } , setSelected : function ( b ) { BI . MultiLayerSelectTreeMidPlusGroupNode . superclass . setSelected . apply ( this , arguments ) , this . node . setSelected ( b ) } , doClick : function ( ) { BI . MultiLayerSelectTreeMidPlusGroupNode . superclass . doClick . apply ( this , arguments ) , this . node . setSelected ( this . isSelected ( ) ) } , setOpened : function ( v ) { BI . MultiLayerSelectTreeMidPlusGroupNode . superclass . setOpened . apply ( this , arguments ) , this . node . setOpened ( v ) } } ) , BI . shortcut ( "bi.multilayer_select_tree_mid_plus_group_node" , BI . MultiLayerSelectTreeMidPlusGroupNode ) , BI . MultiLayerSelectTreePlusGroupNode = BI . inherit ( BI . NodeButton , { _defaultConfig : function ( ) { var conf = BI . MultiLayerSelectTreePlusGroupNode . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { extraCls : "bi-multilayer-select-tree-first-plus-group-node bi-list-item-active" , layer : 0 , id : "" , pId : "" , readonly : ! 0 , open : ! 1 , height : 24 } ) } , _init : function ( ) { BI . MultiLayerSelectTreePlusGroupNode . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . node = BI . createWidget ( { type : "bi.select_tree_plus_group_node" , cls : "bi-list-item-none" , stopPropagation : ! 0 , logic : { dynamic : ! 0 } , id : o . id , pId : o . pId , keyword : o . keyword , open : o . open , height : o . height , hgap : o . hgap , text : o . text , value : o . value , py : o . py } ) , this . node . on ( BI . Controller . EVENT _CHANGE , function ( type ) { self . setSelected ( self . isSelected ( ) ) , self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) ; for ( var needBlankLayers = [ ] , pNode = o . pNode ; pNode ; ) pNode . isLastNode && needBlankLayers . push ( pNode . layer ) , pNode = pN
items . push ( { type : "bi.layout" , cls : BI . contains ( needBlankLayers , index ) ? "" : "base-line-conn-background" , width : 12 , height : o . height } ) } ) , items . push ( this . item ) , BI . createWidget ( { type : "bi.td" , element : this , columnSize : BI . makeArray ( o . layer , 12 ) , items : [ items ] } ) } , doHighLight : function ( ) { this . item . doHighLight . apply ( this . item , arguments ) } , unHighLight : function ( ) { this . item . unHighLight . apply ( this . item , arguments ) } , getId : function ( ) { return this . options . id } , getPId : function ( ) { return this . options . pId } , doClick : function ( ) { BI . MultiLayerSingleTreeMidTreeLeafItem . superclass . doClick . apply ( this , arguments ) , this . item . setSelected ( this . isSelected ( ) ) } , setSelected : function ( v ) { BI . MultiLayerSingleTreeMidTreeLeafItem . superclass . setSelected . apply ( this , arguments ) , this . item . setSelected ( v ) } } ) , BI . shortcut ( "bi.multilayer_single_tree_mid_tree_leaf_item" , BI . MultiLayerSingleTreeMidTreeLeafItem ) , BI . MultiSelectCheckPane = BI . inherit ( BI . Widget , { constants : { height : 12 , lgap : 10 , tgap : 10 , bgap : 5 } , _defaultConfig : function ( ) { return BI . extend ( BI . MultiSelectCheckPane . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-multi-select-check-pane bi-background" , items : [ ] , itemsCreator : BI . emptyFn , valueFormatter : BI . emptyFn , onClickContinueSelect : BI . emptyFn } ) } , _init : function ( ) { BI . MultiSelectCheckPane . superclass . _init . apply ( this , arguments ) ; var self = this , opts = this . options ; this . storeValue = opts . value || { } , this . display = BI . createWidget ( { type : "bi.display_selected_list" , items : opts . items , itemsCreator : function ( op , callback ) { return op = BI . extend ( op || { } , { selectedValues : self . storeValue . value } ) , self . storeValue . type === BI . Selection . Multi ? void callback ( { items : BI . map ( self . storeValue . value , function ( i , v ) { var txt = opts . valueFormatter ( v ) || v ; return { text : txt , value : v , title : txt } } ) } ) : void opts . itemsCreator ( op , callback ) } } ) , this . continueSelect = BI . createWidget ( { type : "bi.text_button" , text : BI . i18nText ( "BI-Continue_Select" ) , cls : "multi-select-check-selected bi-high-light" } ) , this . continueSelect . on ( BI . TextButton . EVENT _CHANGE , function ( ) { opts . onClickContinueSelect ( ) } ) , BI . createWidget ( { type : "bi.vtape" , element : this , items : [ { height : this . constants . height , el : { type : "bi.vertical_adapt" , cls : "multi-select-continue-select" , items : [ { el : { type : "bi.label" , text : BI . i18nText ( "BI-Selected_Data" ) } , lgap : this . constants . lgap } , { el : this . continueSelect , lgap : this . constants . lgap } ] } , tgap : this . constants . tgap } , { height : "fill" , el : this . display , tgap : this . constants . bgap } ] } ) } , setValue : function ( v ) { this . storeValue = v || { } } , empty : function ( ) { this . display . empty ( ) } , populate : function ( ) { this . display . populate . apply ( this . display , arguments ) } } ) , BI . shortcut ( "bi.multi_select_check_pane" , BI . MultiSelectCheckPane ) , BI . DisplaySelectedList = BI . inherit ( BI . Pane , { constants : { height : 24 , lgap : 10 } , _defaultConfig : function ( ) { return BI . extend ( BI . DisplaySelectedList . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-display-list" , itemsCreator : BI . emptyFn , items : [ ] } ) } , _init : function ( ) { BI . DisplaySelectedList . superclass . _init . apply ( this , arguments ) ; var self = this , opts = this . options ; this . hasNext = ! 1 , this . button _group = BI . createWidget ( { type : "bi.list_pane" , element : this , el : { type : "bi.loader" , isDefaultInit : ! 1 , logic : { dynamic : ! 0 , scrolly : ! 0 } , items : this . _createItems ( opts . items ) , chooseType : BI . ButtonGroup . CHOOSE _TYPE _MULTI , layouts : [ { type : "bi.vertical" , lgap : 10 } ] } , itemsCreator : function ( options , callback ) { opts . itemsCreator ( options , function ( ob ) { self . hasNext = ! ! ob . hasNext , callback ( self . _createItems ( ob . items ) ) } ) } , hasNext : function ( ) { return self . hasNext } } ) } , _createItems : function ( items ) { return BI . createItems ( items , { type : "bi.icon_text_item" , cls : "cursor-default check-font icon-size-12 display-list-item bi-tips" , once : ! 0 , invalid : ! 0 , selected : ! 0 , height : this . constants . height , logic : { dynamic : ! 0 } } ) } , empty : function ( ) { this . button _group . empty ( ) } , populate : function ( items ) { 0 === arguments . length ? this . button _group . populate ( ) : this . button _group . populate ( this . _createItems ( items ) ) } } ) , BI . shortcut ( "bi.display_selected_list" , BI . DisplaySelectedList ) , BI . MultiSelectCombo = BI . inherit ( BI . Single , { _defaultConfig : function ( ) { return BI . extend ( BI . MultiSelectCombo . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-multi-select-combo" , itemsCreator : BI . emptyFn ,
BI . MultiSelectInsertTrigger = BI . inherit ( BI . Trigger , { constants : { height : 14 , rgap : 4 , lgap : 4 } , _defaultConfig : function ( ) { return BI . extend ( BI . MultiSelectInsertTrigger . 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 . MultiSelectInsertTrigger . 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_insert_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 . MultiSelectInsertSearcher . EVENT _START , function ( ) { self . fireEvent ( BI . MultiSelectInsertTrigger . EVENT _START ) } ) , this . searcher . on ( BI . MultiSelectInsertSearcher . EVENT _ADD _ITEM , function ( ) { self . fireEvent ( BI . MultiSelectInsertTrigger . EVENT _ADD _ITEM ) } ) , this . searcher . on ( BI . MultiSelectInsertSearcher . EVENT _PAUSE , function ( ) { self . fireEvent ( BI . MultiSelectInsertTrigger . EVENT _PAUSE ) } ) , this . searcher . on ( BI . MultiSelectInsertSearcher . EVENT _SEARCHING , function ( ) { self . fireEvent ( BI . MultiSelectInsertTrigger . EVENT _SEARCHING , arguments ) } ) , this . searcher . on ( BI . MultiSelectInsertSearcher . EVENT _STOP , function ( ) { self . fireEvent ( BI . MultiSelectInsertTrigger . EVENT _STOP ) } ) , this . searcher . on ( BI . MultiSelectInsertSearcher . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . MultiSelectInsertTrigger . EVENT _CHANGE , arguments ) } ) , this . searcher . on ( BI . MultiSelectInsertSearcher . EVENT _BLUR , function ( ) { self . fireEvent ( BI . MultiSelectInsertTrigger . EVENT _BLUR ) } ) , this . searcher . on ( BI . MultiSelectInsertSearcher . EVENT _FOCUS , function ( ) { self . fireEvent ( BI . MultiSelectInsertTrigger . EVENT _FOCUS ) } ) , this . wrapNumberCounter = BI . createWidget ( { type : "bi.layout" } ) , this . wrapper = BI . createWidget ( { type : "bi.htape" , element : this , items : [ { el : this . searcher , width : "fill" } , { el : this . wrapNumberCounter , width : 0 } , { el : BI . createWidget ( ) , width : 24 } ] } ) , ! o . allowEdit && BI . createWidget ( { type : "bi.absolute" , element : this , items : [ { el : { type : "bi.layout" } , left : 0 , right : 24 , top : 0 , bottom : 0 } ] } ) } , refreshPlaceHolderWidth : function ( width ) { this . wrapper . attr ( "items" ) [ 1 ] . width = width , this . wrapper . resize ( ) } , getSearcher : function ( ) { return this . searcher } , stopEditing : function ( ) { this . searcher . stopSearch ( ) } , setAdapter : function ( adapter ) { this . searcher . setAdapter ( adapter ) } , setValue : function ( ob ) { this . searcher . setValue ( ob ) } , getKey : function ( ) { return this . searcher . getKey ( ) } , getValue : function ( ) { return this . searcher . getValue ( ) } } ) , BI . MultiSelectInsertTrigger . EVENT _TRIGGER _CLICK = "EVENT_TRIGGER_CLICK" , BI . MultiSelectInsertTrigger . EVENT _COUNTER _CLICK = "EVENT_COUNTER_CLICK" , BI . MultiSelectInsertTrigger . EVENT _CHANGE = "EVENT_CHANGE" , BI . MultiSelectInsertTrigger . EVENT _START = "EVENT_START" , BI . MultiSelectInsertTrigger . EVENT _STOP = "EVENT_STOP" , BI . MultiSelectInsertTrigger . EVENT _PAUSE = "EVENT_PAUSE" , BI . MultiSelectInsertTrigger . EVENT _SEARCHING = "EVENT_SEARCHING" , BI . MultiSelectInsertTrigger . EVENT _BEFORE _COUNTER _POPUPVIEW = "EVENT_BEFORE_COUNTER_POPUPVIEW" , BI . MultiSelectInsertTrigger . EVENT _ADD _ITEM = "EVENT_ADD_ITEM" , BI . MultiSelectInsertTrigger . EVENT _FOCUS = "EVENT_FOCUS" , BI . MultiSelectInsertTrigger . EVENT _BLUR = "EVENT_BLUR" , BI . shortcut ( "bi.multi_select_insert_trigger" , BI . MultiSelectInsertTrigger ) , BI . MultiSelectLoader = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . MultiSelectLoader . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-multi-select-loader" , logic : { dynamic : ! 0 } , el : { height : 400 } , valueFormatter : BI . emptyFn , itemsCreator : BI . emptyFn , onLoaded : BI . emptyFn } ) } , _init : function ( ) { BI . MultiSelectLoader . superclass . _init . apply ( this , arguments ) ; var self = this , opts = this . options , hasNext = ! 1 ; this . storeValue = opts . value || { } , this . _assertValue ( this . storeValue ) , this . button _group = BI . createWidget ( { type : "bi.select_list" , logic : opts . logic , toolbar : { type : "bi.multi_select_bar" , cls : "bi-list-item-active" , iconWrapperWidth : 36 } , el : BI . extend ( { onLoaded : opts . onLoaded , el : { type : "bi.loader" , isDefaultInit : ! 1 , logic : { dynamic : ! 0 , scrolly
baseCls : "bi-multi-select-searcher" , itemsCreator : BI . emptyFn , el : { } , popup : { } , valueFormatter : BI . emptyFn , adapter : null , masker : { } , text : BI . i18nText ( "BI-Basic_Please_Select" ) } ) } , _init : function ( ) { BI . MultiSelectSearcher . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . editor = BI . createWidget ( o . el , { type : "bi.multi_select_editor" , height : o . height , text : o . text , listeners : [ { eventName : BI . MultiSelectEditor . EVENT _FOCUS , action : function ( ) { self . fireEvent ( BI . MultiSelectSearcher . EVENT _FOCUS ) } } , { eventName : BI . MultiSelectEditor . EVENT _BLUR , action : function ( ) { self . fireEvent ( BI . MultiSelectSearcher . EVENT _BLUR ) } } ] } ) , this . searcher = BI . createWidget ( { type : "bi.searcher" , element : this , height : o . height , isAutoSearch : ! 1 , isAutoSync : ! 1 , onSearch : function ( op , callback ) { callback ( ) } , el : this . editor , popup : BI . extend ( { type : "bi.multi_select_search_pane" , valueFormatter : o . valueFormatter , keywordGetter : function ( ) { return self . editor . getValue ( ) } , itemsCreator : function ( op , callback ) { var keyword = self . editor . getValue ( ) ; op . keywords = [ keyword ] , this . setKeyword ( keyword ) , o . itemsCreator ( op , callback ) } , value : o . value } , o . popup ) , adapter : o . adapter , masker : o . masker } ) , this . searcher . on ( BI . Searcher . EVENT _START , function ( ) { self . fireEvent ( BI . MultiSelectSearcher . EVENT _START ) } ) , this . searcher . on ( BI . Searcher . EVENT _PAUSE , function ( ) { this . hasMatched ( ) , self . fireEvent ( BI . MultiSelectSearcher . EVENT _PAUSE ) } ) , this . searcher . on ( BI . Searcher . EVENT _STOP , function ( ) { self . fireEvent ( BI . MultiSelectSearcher . EVENT _STOP ) } ) , this . searcher . on ( BI . Searcher . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . MultiSelectSearcher . EVENT _CHANGE , arguments ) } ) , this . searcher . on ( BI . Searcher . EVENT _SEARCHING , function ( ) { var keywords = this . getKeywords ( ) ; self . fireEvent ( BI . MultiSelectSearcher . EVENT _SEARCHING , keywords ) } ) , BI . isNotNull ( o . value ) && this . setState ( o . value ) } , adjustView : function ( ) { this . searcher . adjustView ( ) } , isSearching : function ( ) { return this . searcher . isSearching ( ) } , stopSearch : function ( ) { this . searcher . stopSearch ( ) } , getKeyword : function ( ) { return this . editor . getValue ( ) } , hasMatched : function ( ) { return this . searcher . hasMatched ( ) } , hasChecked : function ( ) { return this . searcher . getView ( ) && this . searcher . getView ( ) . hasChecked ( ) } , setAdapter : function ( adapter ) { this . searcher . setAdapter ( adapter ) } , setState : function ( ob ) { var o = this . options ; if ( ob || ( ob = { } ) , ob . value || ( ob . value = [ ] ) , ob . type === BI . Selection . All ) if ( 0 === ob . value . length ) this . editor . setState ( BI . Selection . All ) ; else if ( BI . size ( ob . assist ) <= 20 ) { var state = "" ; BI . each ( ob . assist , function ( i , v ) { state += 0 === i ? "" + ( o . valueFormatter ( v + "" ) || v ) : "," + ( o . valueFormatter ( v + "" ) || v ) } ) , this . editor . setState ( state ) } else this . editor . setState ( BI . Selection . Multi ) ; else if ( 0 === ob . value . length ) this . editor . setState ( BI . Selection . None ) ; else if ( BI . size ( ob . value ) <= 20 ) { var state = "" ; BI . each ( ob . value , function ( i , v ) { state += 0 === i ? "" + ( o . valueFormatter ( v + "" ) || v ) : "," + ( o . valueFormatter ( v + "" ) || v ) } ) , this . editor . setState ( state ) } else this . editor . setState ( BI . Selection . Multi ) } , setValue : function ( ob ) { this . setState ( ob ) , this . searcher . setValue ( ob ) } , getKey : function ( ) { return this . editor . getValue ( ) } , getValue : function ( ) { return this . searcher . getValue ( ) } , populate : function ( items ) { this . searcher . populate . apply ( this . searcher , arguments ) } } ) , BI . MultiSelectSearcher . EVENT _BEFORE _POPUPVIEW = "EVENT_BEFORE_POPUPVIEW" , BI . MultiSelectSearcher . EVENT _CHANGE = "EVENT_CHANGE" , BI . MultiSelectSearcher . EVENT _START = "EVENT_START" , BI . MultiSelectSearcher . EVENT _STOP = "EVENT_STOP" , BI . MultiSelectSearcher . EVENT _PAUSE = "EVENT_PAUSE" , BI . MultiSelectSearcher . EVENT _SEARCHING = "EVENT_SEARCHING" , BI . MultiSelectSearcher . EVENT _FOCUS = "EVENT_FOCUS" , BI . MultiSelectSearcher . EVENT _BLUR = "EVENT_BLUR" , BI . shortcut ( "bi.multi_select_searcher" , BI . MultiSelectSearcher ) , BI . MultiSelectCheckSelectedSwitcher = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . MultiSelectCheckSelectedSwitcher . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-multi-select-check-selected-switcher" , itemsCreator : BI . emptyFn , valueFormatter : BI . emptyFn , el : { } , popup : { } , adapter : null , masker : { } } ) } , _init : function ( ) { BI . MultiSelectCheckSelectedSwitcher . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . button = BI . creat
} , setValue : function ( v ) { v || ( v = { } ) , this . display . setSelectedValue ( v . value ) } , getValue : function ( ) { } } ) , BI . MultiTreeCheckPane . EVENT _CONTINUE _CLICK = "EVENT_CONTINUE_CLICK" , BI . shortcut ( "bi.multi_tree_check_pane" , BI . MultiTreeCheckPane ) , BI . MultiTreeCombo = BI . inherit ( BI . Single , { constants : { offset : { top : 0 , left : 0 , right : 0 , bottom : 25 } } , _defaultConfig : function ( ) { return BI . extend ( BI . MultiTreeCombo . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-multi-tree-combo" , itemsCreator : BI . emptyFn , valueFormatter : BI . emptyFn , height : 24 } ) } , _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 . MultiTreeCombo . 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" , height : o . height , valueFormatter : o . valueFormatter , text : o . text , watermark : o . watermark , masker : { offset : this . constants . offset } , searcher : { type : "bi.multi_tree_searcher" , itemsCreator : o . itemsCreator } , value : { value : o . value || { } } } ) , this . combo = BI . createWidget ( { type : "bi.combo" , toggle : ! 1 , container : o . container , el : this . trigger , adjustLength : 1 , popup : { type : "bi.multi_tree_popup_view" , ref : function ( ) { self . popup = this , self . trigger . setAdapter ( this ) , self . numberCounter . setAdapter ( this ) } , listeners : [ { eventName : BI . MultiTreePopup . EVENT _AFTERINIT , action : function ( ) { self . numberCounter . adjustView ( ) , isInit = ! 0 , want2showCounter === ! 0 && showCounter ( ) } } , { eventName : BI . MultiTreePopup . EVENT _CHANGE , action : function ( ) { change = ! 0 ; var val = { type : BI . Selection . Multi , value : this . hasChecked ( ) ? this . getValue ( ) : { } } ; self . trigger . getSearcher ( ) . setState ( val ) , self . numberCounter . setButtonChecked ( val ) , self . fireEvent ( BI . MultiTreeCombo . EVENT _CLICK _ITEM ) } } , { eventName : BI . MultiTreePopup . EVENT _CLICK _CONFIRM , action : function ( ) { self . combo . hideView ( ) } } , { eventName : BI . MultiTreePopup . EVENT _CLICK _CLEAR , action : function ( ) { clear = ! 0 , self . setValue ( ) , self . _defaultState ( ) } } ] , itemsCreator : o . itemsCreator , onLoaded : function ( ) { BI . nextTick ( function ( ) { self . numberCounter . adjustView ( ) , self . trigger . getSearcher ( ) . adjustView ( ) } ) } } , value : { value : o . value || { } } , hideChecker : function ( e ) { return 0 === triggerBtn . element . find ( e . target ) . length && 0 === self . numberCounter . element . find ( e . target ) . length } } ) ; var change = ! 1 , clear = ! 1 , isSearching = function ( ) { return self . trigger . getSearcher ( ) . isSearching ( ) } , isPopupView = function ( ) { return self . combo . isViewVisible ( ) } ; this . trigger . on ( BI . MultiSelectTrigger . EVENT _FOCUS , function ( ) { self . fireEvent ( BI . MultiTreeCombo . EVENT _FOCUS ) } ) , this . trigger . on ( BI . MultiSelectTrigger . EVENT _BLUR , function ( ) { self . fireEvent ( BI . MultiTreeCombo . EVENT _BLUR ) } ) , this . trigger . on ( BI . MultiSelectTrigger . EVENT _START , function ( ) { self . storeValue = { value : self . combo . getValue ( ) } , this . setValue ( self . storeValue ) , self . numberCounter . setValue ( self . storeValue ) } ) , this . trigger . on ( BI . MultiSelectTrigger . EVENT _STOP , function ( ) { self . storeValue = { value : this . getValue ( ) } , self . combo . setValue ( self . storeValue ) , self . numberCounter . setValue ( self . storeValue ) , BI . nextTick ( function ( ) { isPopupView ( ) && self . combo . populate ( ) } ) , self . fireEvent ( BI . MultiTreeCombo . EVENT _STOP ) } ) , this . trigger . on ( BI . MultiSelectTrigger . EVENT _SEARCHING , function ( ) { self . fireEvent ( BI . MultiTreeCombo . EVENT _SEARCHING ) } ) , this . trigger . on ( BI . MultiSelectTrigger . EVENT _TRIGGER _CLICK , function ( ) { self . combo . toggle ( ) } ) , this . trigger . on ( BI . MultiSelectTrigger . EVENT _COUNTER _CLICK , function ( ) { self . combo . isViewVisible ( ) || self . combo . showView ( ) } ) , this . trigger . on ( BI . MultiSelectTrigger . EVENT _CHANGE , function ( ) { var checked = this . getSearcher ( ) . hasChecked ( ) , val = { type : BI . Selection . Multi , value : checked ? { 1 : 1 } : { } } ; this . getSearcher ( ) . setState ( checked ? BI . Selection . Multi : BI . Selection . None ) , self . numberCounter . setButtonChecked ( val ) , self . fireEvent ( BI . MultiTreeCombo . EVENT _CLICK _ITEM ) } ) , this . combo . on ( BI . Combo . EVENT _BEFORE _POPUPVIEW , function ( ) { isSearching ( ) || ( change === ! 0 && ( self . storeValue = { value : self . combo . getValue ( ) } , change = ! 1 ) , self . combo . setValue ( self . storeValue ) , self . numberCounter . set
} ) , this . searcher . on ( BI . Searcher . EVENT _PAUSE , function ( ) { this . hasMatched ( ) , self . fireEvent ( BI . MultiTreeSearcher . EVENT _PAUSE ) } ) , this . searcher . on ( BI . Searcher . EVENT _STOP , function ( ) { self . fireEvent ( BI . MultiTreeSearcher . EVENT _STOP ) } ) , this . searcher . on ( BI . Searcher . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . MultiTreeSearcher . EVENT _CHANGE , arguments ) } ) , this . searcher . on ( BI . Searcher . EVENT _SEARCHING , function ( ) { var keywords = this . getKeywords ( ) ; self . fireEvent ( BI . MultiTreeSearcher . EVENT _SEARCHING , keywords ) } ) , BI . isNotNull ( o . value ) && this . setState ( o . value ) } , adjustView : function ( ) { this . searcher . adjustView ( ) } , setAdapter : function ( adapter ) { this . searcher . setAdapter ( adapter ) } , isSearching : function ( ) { return this . searcher . isSearching ( ) } , stopSearch : function ( ) { this . searcher . stopSearch ( ) } , getKeyword : function ( ) { return this . editor . getValue ( ) } , hasMatched : function ( ) { return this . searcher . hasMatched ( ) } , hasChecked : function ( ) { return this . searcher . getView ( ) && this . searcher . getView ( ) . hasChecked ( ) } , setState : function ( ob ) { function getChildrenNode ( ob ) { var text = "" , index = 0 , size = BI . size ( ob ) ; return BI . each ( ob , function ( name , children ) { index ++ ; var childNodes = getChildrenNode ( children ) ; text += ( o . valueFormatter ( name + "" ) || name ) + ( "" === childNodes ? "" : ":" + childNodes ) + ( index === size ? "" : "," ) , "" === childNodes && count ++ } ) , text } var o = this . options ; ob || ( ob = { } ) , ob . value || ( ob . value = { } ) ; var count = 0 ; if ( BI . isNumber ( ob ) ) this . editor . setState ( ob ) ; else if ( 0 === BI . size ( ob . value ) ) this . editor . setState ( BI . Selection . None ) ; else { var text = "" ; BI . each ( ob . value , function ( name , children ) { var childNodes = getChildrenNode ( children ) ; text += ( o . valueFormatter ( name + "" ) || name ) + ( "" === childNodes ? "" : ":" + childNodes ) + "; " , "" === childNodes && count ++ } ) , count > 20 ? this . editor . setState ( BI . Selection . Multi ) : this . editor . setState ( text ) } } , setValue : function ( ob ) { this . setState ( ob ) , this . searcher . setValue ( ob ) } , getKey : function ( ) { return this . editor . getValue ( ) } , getValue : function ( ) { return this . searcher . getValue ( ) } , populate : function ( items ) { this . searcher . populate . apply ( this . searcher , arguments ) } } ) , BI . MultiTreeSearcher . EVENT _SEARCHING = "EVENT_SEARCHING" , BI . MultiTreeSearcher . EVENT _BEFORE _POPUPVIEW = "EVENT_BEFORE_POPUPVIEW" , BI . MultiTreeSearcher . EVENT _CHANGE = "EVENT_CHANGE" , BI . MultiTreeSearcher . EVENT _START = "EVENT_START" , BI . MultiTreeSearcher . EVENT _STOP = "EVENT_STOP" , BI . MultiTreeSearcher . EVENT _PAUSE = "EVENT_PAUSE" , BI . shortcut ( "bi.multi_tree_searcher" , BI . MultiTreeSearcher ) , BI . NumberEditor = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . NumberEditor . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-number-editor bi-border bi-focus-shadow" , validationChecker : function ( ) { return ! 0 } , valueFormatter : function ( v ) { return v } , value : 0 , allowBlank : ! 1 , errorText : "" , step : 1 } ) } , _init : function ( ) { BI . NumberEditor . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . editor = BI . createWidget ( { type : "bi.sign_editor" , height : o . height - 2 , allowBlank : o . allowBlank , value : o . valueFormatter ( o . value ) , validationChecker : o . validationChecker , errorText : o . errorText } ) , this . editor . on ( BI . TextEditor . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . NumberEditor . EVENT _CHANGE ) } ) , this . editor . on ( BI . TextEditor . EVENT _ERROR , function ( ) { o . value = BI . parseFloat ( this . getLastValidValue ( ) ) } ) , this . editor . on ( BI . TextEditor . EVENT _VALID , function ( ) { o . value = BI . parseFloat ( this . getValue ( ) ) } ) , this . editor . on ( BI . TextEditor . EVENT _CONFIRM , function ( ) { self . fireEvent ( BI . NumberEditor . EVENT _CONFIRM ) } ) , this . topBtn = BI . createWidget ( { type : "bi.icon_button" , forceNotSelected : ! 0 , trigger : "lclick," , cls : "add-up-font top-button bi-border-left bi-list-item-active2 icon-size-12" } ) , this . topBtn . on ( BI . IconButton . EVENT _CHANGE , function ( ) { self . _finetuning ( o . step ) , self . fireEvent ( BI . NumberEditor . EVENT _CHANGE ) , self . fireEvent ( BI . NumberEditor . EVENT _CONFIRM ) } ) , this . bottomBtn = BI . createWidget ( { type : "bi.icon_button" , trigger : "lclick," , forceNotSelected : ! 0 , cls : "minus-down-font bottom-button bi-border-left bi-list-item-active2 icon-size-12" } ) , this . bottomBtn . on ( BI . IconButton . EVENT _CHANGE , function ( ) { self . _finetuning ( - o . step ) , self . fireEvent ( BI . NumberEditor . EVENT _CHANGE ) , self . fireEvent ( BI . NumberEditor . EVENT _CONFIRM ) } ) , BI . createWidget ( { type : "bi.htape" ,
this . button _group = BI . createWidget ( { type : "bi.select_list" , element : this , logic : opts . logic , el : BI . extend ( { onLoaded : opts . onLoaded , el : { type : "bi.loader" , isDefaultInit : ! 1 , logic : { dynamic : ! 0 , scrolly : ! 0 } , el : { chooseType : BI . ButtonGroup . CHOOSE _TYPE _MULTI , behaviors : { redmark : function ( ) { return ! 0 } } , layouts : [ { type : "bi.vertical" } ] } } } , opts . el ) , itemsCreator : function ( op , callback ) { var startValue = self . _startValue ; self . storeValue && ( op = BI . extend ( op || { } , { selectedValues : BI . isKey ( startValue ) && self . storeValue . type === BI . Selection . Multi ? self . storeValue . value . concat ( startValue ) : self . storeValue . value } ) ) , opts . itemsCreator ( op , function ( ob ) { hasNext = ob . hasNext ; var firstItems = [ ] ; if ( 1 === op . times && self . storeValue ) { var json = BI . map ( self . storeValue . value , function ( i , v ) { var txt = opts . valueFormatter ( v ) || v ; return { text : txt , value : v , title : txt , selected : self . storeValue . type === BI . Selection . Multi } } ) ; if ( BI . isKey ( self . _startValue ) && ! BI . contains ( self . storeValue . value , self . _startValue ) ) { var txt = opts . valueFormatter ( startValue ) || startValue ; json . unshift ( { text : txt , value : startValue , title : txt , selected : ! 0 } ) } firstItems = self . _createItems ( json ) } callback ( firstItems . concat ( self . _createItems ( ob . items ) ) , ob . keyword || "" ) , 1 === op . times && self . storeValue && ( BI . isKey ( startValue ) && ( self . storeValue . type === BI . Selection . All ? BI . remove ( self . storeValue . value , startValue ) : BI . pushDistinct ( self . storeValue . value , startValue ) ) , self . setValue ( self . storeValue ) ) , 1 === op . times && self . _scrollToTop ( ) } ) } , hasNext : function ( ) { return hasNext } , value : this . storeValue } ) , this . button _group . on ( BI . Controller . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) , this . button _group . on ( BI . SelectList . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . SearchMultiSelectLoader . EVENT _CHANGE , arguments ) } ) } , _createItems : function ( items ) { return BI . createItems ( items , { type : "bi.multi_select_item" , logic : this . options . logic , cls : "bi-list-item-active" , height : 24 , selected : this . isAllSelected ( ) , iconWrapperWidth : 36 } ) } , _scrollToTop : function ( ) { var self = this ; BI . delay ( function ( ) { self . button _group . element . scrollTop ( 0 ) } , 30 ) } , isAllSelected : function ( ) { return this . button _group . isAllSelected ( ) } , _assertValue : function ( val ) { val || ( val = { } ) , val . type || ( val . type = BI . Selection . Multi ) , val . value || ( val . value = [ ] ) } , setStartValue : function ( v ) { this . _startValue = v } , setValue : function ( v ) { this . storeValue = v || { } , this . _assertValue ( this . storeValue ) , this . button _group . setValue ( this . storeValue ) } , getValue : function ( ) { return this . button _group . getValue ( ) } , getAllButtons : function ( ) { return this . button _group . getAllButtons ( ) } , empty : function ( ) { this . button _group . empty ( ) } , populate : function ( items ) { arguments [ 0 ] = this . _createItems ( items ) , this . button _group . populate . apply ( this . button _group , arguments ) } , resetHeight : function ( h ) { this . button _group . resetHeight ( h ) } , resetWidth : function ( w ) { this . button _group . resetWidth ( w ) } } ) , BI . SearchMultiSelectLoader . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.search_multi_select_loader" , BI . SearchMultiSelectLoader ) , BI . SearchMultiSelectPopupView = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . SearchMultiSelectPopupView . 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 . SearchMultiSelectPopupView . superclass . _init . apply ( this , arguments ) ; var self = this , opts = this . options ; this . loader = BI . createWidget ( { type : "bi.search_multi_select_loader" , itemsCreator : opts . itemsCreator , valueFormatter : opts . valueFormatter , onLoaded : opts . onLoaded , value : opts . value } ) , this . popupView = BI . createWidget ( { type : "bi.multi_popup_view" , stopPropagation : ! 1 , maxWidth : opts . maxWidth , minWidth : opts . minWidth , maxHeight : opts . maxHeight , element : this , buttons : [ BI . i18nText ( "BI-Basic_Clears" ) , BI . i18nText ( "BI-Basic_Sure" ) ] , el : this . loader , value : opts . value } ) , this . popupView . on ( BI . MultiPopupView . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . SearchMultiSelectPopupView . EVENT _CHANGE ) } ) , this . popupView . on ( BI . MultiPopupView . EVENT _CLICK _TOOLBAR _BUTTON , function ( index ) { switch ( index ) { case 0 : self . fireEvent ( BI . SearchMultiSelectPopupView . EVENT _CLICK _CLEAR ) ; break ; case 1 : self . f
BI . SingleSelectCombo . EVENT _FOCUS = "EVENT_FOCUS" , BI . SingleSelectCombo . EVENT _STOP = "EVENT_STOP" , BI . SingleSelectCombo . EVENT _SEARCHING = "EVENT_SEARCHING" , BI . SingleSelectCombo . EVENT _CLICK _ITEM = "EVENT_CLICK_ITEM" , BI . SingleSelectCombo . EVENT _CONFIRM = "EVENT_CONFIRM" , BI . shortcut ( "bi.single_select_combo" , BI . SingleSelectCombo ) , BI . SingleSelectInsertCombo = BI . inherit ( BI . Single , { _defaultConfig : function ( ) { return BI . extend ( BI . SingleSelectInsertCombo . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-single-select-combo" , allowNoSelect : ! 1 , itemsCreator : BI . emptyFn , valueFormatter : BI . emptyFn , height : 24 , attributes : { tabIndex : 0 } , allowEdit : ! 0 } ) } , _init : function ( ) { BI . SingleSelectInsertCombo . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options , assertShowValue = function ( ) { BI . isKey ( self . _startValue ) && ( self . storeValue = self . _startValue ) , self . trigger . getSearcher ( ) . setState ( self . storeValue ) } ; this . storeValue = o . value , this . requesting = ! 1 , this . trigger = BI . createWidget ( { type : "bi.single_select_trigger" , height : o . height , allowNoSelect : o . allowNoSelect , allowEdit : o . allowEdit , valueFormatter : o . valueFormatter , itemsCreator : function ( op , callback ) { o . itemsCreator ( op , function ( res ) { 1 === op . times && BI . isNotNull ( op . keywords ) && self . trigger . setValue ( self . getValue ( ) ) , callback . apply ( self , arguments ) } ) } , text : o . text , value : this . storeValue , searcher : { popup : { type : "bi.single_select_search_insert_pane" , listeners : [ { eventName : BI . SingleSelectSearchInsertPane . EVENT _ADD _ITEM , action : function ( ) { self . trigger . getSearcher ( ) . hasMatched ( ) || ( self . storeValue = self . trigger . getSearcher ( ) . getKeyword ( ) , assertShowValue ( ) , self . _defaultState ( ) ) } } ] } } } ) , this . trigger . on ( BI . SingleSelectTrigger . EVENT _FOCUS , function ( ) { self . fireEvent ( BI . SingleSelectInsertCombo . EVENT _FOCUS ) } ) , this . trigger . on ( BI . SingleSelectTrigger . EVENT _BLUR , function ( ) { self . fireEvent ( BI . SingleSelectInsertCombo . EVENT _BLUR ) } ) , this . trigger . on ( BI . SingleSelectTrigger . EVENT _START , function ( ) { self . _setStartValue ( ) , this . getSearcher ( ) . setValue ( self . storeValue ) } ) , this . trigger . on ( BI . SingleSelectTrigger . EVENT _STOP , function ( ) { self . _setStartValue ( ) , self . fireEvent ( BI . SingleSelectInsertCombo . EVENT _STOP ) } ) , this . trigger . on ( BI . SingleSelectTrigger . EVENT _PAUSE , function ( ) { if ( this . getSearcher ( ) . hasMatched ( ) ) { var keyword = this . getSearcher ( ) . getKeyword ( ) ; self . storeValue = keyword , self . combo . setValue ( self . storeValue ) , self . _setStartValue ( keyword ) , assertShowValue ( ) , self . populate ( ) , self . _setStartValue ( ) } } ) , this . trigger . on ( BI . SingleSelectTrigger . 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 . SingleSelectInsertCombo . EVENT _SEARCHING ) } ) , this . trigger . on ( BI . SingleSelectTrigger . EVENT _CHANGE , function ( value , obj ) { self . storeValue = this . getValue ( ) , assertShowValue ( ) , self . _defaultState ( ) } ) , this . trigger . on ( BI . SingleSelectTrigger . EVENT _COUNTER _CLICK , function ( ) { self . combo . isViewVisible ( ) || self . combo . showView ( ) } ) , this . combo = BI . createWidget ( { type : "bi.combo" , container : o . container , toggle : ! 1 , el : this . trigger , adjustLength : 1 , popup : { type : "bi.single_select_popup_view" , allowNoSelect : o . allowNoSelect , ref : function ( ) { self . popup = this , self . trigger . setAdapter ( this ) } , listeners : [ { eventName : BI . SingleSelectPopupView . EVENT _CHANGE , action : function ( ) { self . storeValue = this . getValue ( ) , self . _adjust ( function ( ) { assertShowValue ( ) , self . _defaultState ( ) } ) , self . fireEvent ( BI . SingleSelectInsertCombo . EVENT _CLICK _ITEM ) } } ] , itemsCreator : o . itemsCreator , valueFormatter : o . valueFormatter , onLoaded : function ( ) { BI . nextTick ( function ( ) { self . combo . adjustWidth ( ) , self . combo . adjustHeight ( ) , self . trigger . getSearcher ( ) . adjustView ( ) } ) } } , hideChecker : function ( e ) { return 0 === triggerBtn . element . find ( e . target ) . length } , value : o . value } ) , this . combo . on ( BI . Combo . EVENT _BEFORE _POPUPVIEW , function ( ) { this . setValue ( self . storeValue ) , BI . nextTick ( function ( ) { self . populate ( ) } ) } ) , this . wants2Quit = ! 1 , this . combo . on ( BI . Combo . EVENT _AFTER _HIDEVIEW , function ( ) { self . trigger . stopE
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 ( ) ) { var offset = e . clientX - self . element . offset ( ) . left - c . SLIDER _WIDTH _HALF , trackLength = self . track . element [ 0 ] . scrollWidth - c . TRACK _GAP , percent = 0 ; offset < 0 && ( percent = 0 ) , offset > 0 && offset < trackLength && ( percent = 100 * offset / self . _getGrayTrackLength ( ) ) , offset >= trackLength && ( percent = 100 ) ; var significantPercent = BI . parseFloat ( percent . toFixed ( 1 ) ) ; self . _setAllPosition ( significantPercent ) ; var v = self . _getValueByPercent ( significantPercent ) ; v = o . digit === ! 1 ? v : v . toFixed ( o . digit ) , self . label . setValue ( v ) , self . value = v , self . fireEvent ( BI . SingleSlider . EVENT _CHANGE ) } } ) , this . label = BI . createWidget ( { type : "bi.sign_text_editor" , cls : "slider-editor-button" , text : o . unit , width : c . EDITOR _WIDTH - 2 , allowBlank : ! 1 , textAlign : "center" , validationChecker : function ( v ) { return self . _checkValidation ( v ) } } ) , this . label . element . hover ( function ( ) { self . label . element . removeClass ( "bi-border" ) . addClass ( "bi-border" ) } , function ( ) { self . label . element . removeClass ( "bi-border" ) } ) , this . label . on ( BI . SignEditor . EVENT _CONFIRM , function ( ) { var v = BI . parseFloat ( this . getValue ( ) ) , percent = self . _getPercentByValue ( v ) , significantPercent = BI . parseFloat ( percent . toFixed ( 1 ) ) ; self . _setAllPosition ( significantPercent ) , this . setValue ( v ) , self . value = v , self . fireEvent ( BI . SingleSlider . EVENT _CHANGE ) } ) , this . _setVisible ( ! 1 ) , { type : "bi.absolute" , items : [ { el : { type : "bi.vertical" , items : [ { type : "bi.absolute" , items : [ { el : this . track , width : "100%" , height : c . TRACK _HEIGHT } ] } ] , hgap : c . TRACK _GAP _HALF , height : c . TRACK _HEIGHT } , top : 23 , left : 0 , width : "100%" } , { el : sliderVertical , top : 20 , left : 0 , width : "100%" } , { el : { type : "bi.vertical" , items : [ { type : "bi.horizontal_auto" , items : [ this . label ] } ] , height : c . EDITOR _HEIGHT } , top : 0 , left : 0 , width : "100%" } ] } } , _draggable : function ( widget ) { function optimizeSize ( s ) { return BI . clamp ( s , 0 , self . _getGrayTrackLength ( ) ) } var self = this , o = this . options , startDrag = ! 1 , size = 0 , offset = 0 , defaultSize = 0 , mouseMoveTracker = new BI . MouseMoveTracker ( function ( deltaX ) { if ( mouseMoveTracker . isDragging ( ) ) { startDrag = ! 0 , offset += deltaX , size = optimizeSize ( defaultSize + offset ) , widget . element . addClass ( "dragging" ) ; var percent = 100 * size / self . _getGrayTrackLength ( ) , significantPercent = BI . parseFloat ( percent . toFixed ( 1 ) ) ; self . _setBlueTrack ( significantPercent ) , self . _setLabelPosition ( significantPercent ) , self . _setSliderPosition ( significantPercent ) ; var v = self . _getValueByPercent ( significantPercent ) ; v = o . digit === ! 1 ? v : v . toFixed ( o . digit ) , self . label . setValue ( v ) , self . value = 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 ) ) } ) } , _createTrackWrapper : function ( ) { return BI . createWidget ( { type : "bi.absolute" , items : [ { el : { type : "bi.vertical" , items : [ { type : "bi.absolute" , items : [ { el : this . grayTrack , top : 0 , left : 0 , width : "100%" } , { el : this . blueTrack , top : 0 , left : 0 , width : "0%" } ] } ] , hgap : 8 , height : 8 } , top : 8 , left : 0 , width : "100%" } ] } ) } , _checkValidation : function ( v ) { var o = this . options , valid = ! 1 ; if ( BI . isNumeric ( v ) && ! ( BI . isNull ( v ) || v < this . min || v > this . max ) ) if ( o . digit === ! 1 ) valid = ! 0 ; else { var dotText = ( v + "" ) . split ( "." ) [ 1 ] || "" ; valid = dotText . length === o . digit } return valid } , _setBlueTrack : function ( percent ) { this . blueTrack . element . css ( { width : percent + "%" } ) } , _setLabelPosition : function ( percent ) { } , _setSliderPosition : function ( percent ) { this . slider . element . css ( { left : percent + "%" } ) } , _setAllPosition : function ( percent ) { this . _setSliderPosition ( percent ) , this . _setLabelPosition ( percent ) , this . _setBlueTrack ( percent ) } , _setVisible : function ( visible ) { this . slider . setVisible ( visible ) , this . label . setVisible ( visible ) } , _getGrayTrackLength : function ( ) { return this . grayTrack . element [ 0 ] . scrollWidth } , _ge
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" , height : this . constants . height , items : [ { type : "bi.absolute" , items : [ { el : self . left , left : this . constants . offset , right : this . constants . width / 2 , top : 0 , bottom : 0 } ] } , { type : "bi.absolute" , items : [ { el : self . right , left : this . constants . width / 2 , 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_date_combo" , behaviors : o . behaviors , value : v } ) ; return combo . on ( BI . DynamicDateCombo . EVENT _ERROR , function ( ) { self . _clearTitle ( ) , BI . Bubbles . hide ( "error" ) , self . element . removeClass ( self . constants . timeErrorCls ) , self . fireEvent ( BI . DateInterval . EVENT _ERROR ) } ) , combo . on ( BI . DynamicDateCombo . EVENT _VALID , function ( ) { BI . Bubbles . hide ( "error" ) ; var smallDate = self . left . getKey ( ) , bigDate = self . right . getKey ( ) ; self . _check ( smallDate , bigDate ) && self . _compare ( smallDate , bigDate ) ? ( self . _setTitle ( BI . i18nText ( "BI-Time_Interval_Error_Text" ) ) , self . element . addClass ( self . constants . timeErrorCls ) , BI . Bubbles . show ( "error" , BI . i18nText ( "BI-Time_Interval_Error_Text" ) , self , { offsetStyle : "center" } ) , self . fireEvent ( BI . DateInterval . EVENT _ERROR ) ) : ( self . _clearTitle ( ) , self . element . removeClass ( self . constants . timeErrorCls ) ) } ) , combo . on ( BI . DynamicDateCombo . EVENT _FOCUS , function ( ) { BI . Bubbles . hide ( "error" ) ; var smallDate = self . left . getKey ( ) , bigDate = self . right . getKey ( ) ; self . _check ( smallDate , bigDate ) && self . _compare ( smallDate , bigDate ) ? ( self . _setTitle ( BI . i18nText ( "BI-Time_Interval_Error_Text" ) ) , self . element . addClass ( self . constants . timeErrorCls ) , BI . Bubbles . show ( "error" , BI . i18nText ( "BI-Time_Interval_Error_Text" ) , self , { offsetStyle : "center" } ) , self . fireEvent ( BI . DateInterval . EVENT _ERROR ) ) : ( self . _clearTitle ( ) , self . element . removeClass ( self . constants . timeErrorCls ) ) } ) , combo . on ( BI . DynamicDateCombo . EVENT _BEFORE _POPUPVIEW , function ( ) { self . left . hidePopupView ( ) , self . right . hidePopupView ( ) } ) , combo . on ( BI . DynamicDateCombo . EVENT _CONFIRM , function ( ) { BI . Bubbles . hide ( "error" ) ; var smallDate = self . left . getKey ( ) , bigDate = self . right . getKey ( ) ; 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 . DateInterval . EVENT _ERROR ) ) : ( self . _clearTitle ( ) , self . element . removeClass ( self . constants . timeErrorCls ) , self . fireEvent ( BI . DateInterval . EVENT _CHANGE ) ) } ) , combo } , _dateCheck : function ( date ) { return BI . print ( BI . parseDateTime ( date , "%Y-%x-%d" ) , "%Y-%x-%d" ) === date || BI . print ( BI . parseDateTime ( date , "%Y-%X-%d" ) , "%Y-%X-%d" ) === date || BI . print ( BI . parseDateTime ( date , "%Y-%x-%e" ) , "%Y-%x-%e" ) === date || BI . print ( BI . parseDateTime ( date , "%Y-%X-%e" ) , "%Y-%X-%e" ) === date } , _checkVoid : function ( obj ) { var o = this . options ; return ! BI . checkDateVoid ( obj . year , obj . month , obj . day , o . minDate , o . maxDate ) [ 0 ] } , _check : function ( smallDate , bigDate ) { var smallObj = smallDate . match ( /\d+/g ) , bigObj = bigDate . match ( /\d+/g ) ; return this . _dateCheck ( smallDate ) && BI . checkDateLegal ( smallDate ) && this . _checkVoid ( { year : smallObj [ 0 ] , month : smallObj [ 1 ] , day : smallObj [ 2 ] } ) && this . _dateCheck ( bigDate ) && BI . checkDateLegal ( bigDate ) && this . _checkVoid ( { year : bigObj [ 0 ] , month : bigObj [ 1 ] , day : bigObj [ 2 ] } ) } , _compare : function ( smallDate , bigDate ) { return smallDate = BI . print ( BI . parseDateTime ( smallDate , "%Y-%X-%d" ) , "%Y-%X-%d" ) , bigDate = BI . print ( BI . parseDateTime ( bigDate , "%Y-%X-%d" ) , "%Y-%X-%d" ) , BI . isNotNull ( smallDate ) && BI . isNotNull ( bigDate ) && smallDate > bigDate } , _setTitle : function ( v ) { this . left . setTitle ( v ) , this . right . setTitle ( v ) , this . label . setTitle ( v ) } , _clearTitle : function ( ) { this . left . setTitle ( "" ) , this . right . setTitle ( "" ) , this . label . setTitle ( "" ) } , setValue : function ( date ) { date = date || { } , this . left . setValue ( date . start ) , this . right . setValue ( date . end ) } , getValue : function ( ) { return { start : this . left . getValue ( ) , end : this . right . getValue ( ) } } } ) , BI . DateInterval . EVENT _VALID = "EVENT_VALID" , BI . DateInterval . EVENT _ERROR = "EVENT_ERROR" , BI . DateInterval . EVENT _CHANGE =
} ) , BI . createWidget ( { type : "bi.htape" , element : this , ref : function ( ) { self . comboWrapper = this } , items : [ { el : { type : "bi.icon_button" , cls : "bi-trigger-icon-button date-change-h-font" , width : 24 , height : 24 , ref : function ( ) { self . changeIcon = this } } , width : 24 } , this . combo ] } ) , this . _checkDynamicValue ( o . value ) } , _checkDynamicValue : function ( v ) { var type = null ; switch ( BI . isNotNull ( v ) && ( type = v . type ) , type ) { case BI . DynamicYearMonthCombo . Dynamic : this . changeIcon . setVisible ( ! 0 ) , this . comboWrapper . attr ( "items" ) [ 0 ] . width = 24 , this . comboWrapper . resize ( ) ; break ; default : this . comboWrapper . attr ( "items" ) [ 0 ] . width = 0 , this . comboWrapper . resize ( ) , this . changeIcon . setVisible ( ! 1 ) } } , hideView : function ( ) { this . combo . hideView ( ) } , setValue : function ( v ) { this . storeValue = v , this . trigger . setValue ( v ) , this . _checkDynamicValue ( v ) } , getValue : function ( ) { return this . storeValue } , getKey : function ( ) { return this . trigger . getKey ( ) } , isValid : function ( ) { return this . trigger . isValid ( ) } } ) , BI . DynamicYearMonthCombo . EVENT _ERROR = "EVENT_ERROR" , BI . DynamicYearMonthCombo . EVENT _VALID = "EVENT_VALID" , BI . DynamicYearMonthCombo . EVENT _FOCUS = "EVENT_FOCUS" , BI . DynamicYearMonthCombo . EVENT _CONFIRM = "EVENT_CONFIRM" , BI . DynamicYearMonthCombo . EVENT _BEFORE _POPUPVIEW = "EVENT_BEFORE_POPUPVIEW" , BI . shortcut ( "bi.dynamic_year_month_combo" , BI . DynamicYearMonthCombo ) , BI . extend ( BI . DynamicYearMonthCombo , { Static : 1 , Dynamic : 2 } ) , BI . DynamicYearMonthPopup = BI . inherit ( BI . Widget , { constants : { tabHeight : 30 , buttonHeight : 24 } , props : { baseCls : "bi-year-month-popup" , behaviors : { } , min : "1900-01-01" , max : "2099-12-31" , width : 180 , height : 240 } , render : function ( ) { var self = this , opts = this . options , c = this . constants ; return this . storeValue = { type : BI . DynamicYearMonthCombo . Static } , { type : "bi.vtape" , items : [ { el : this . _getTabJson ( ) } , { el : { type : "bi.grid" , items : [ [ { type : "bi.text_button" , cls : "bi-split-top bi-high-light" , textHeight : c . buttonHeight - 1 , shadow : ! 0 , text : BI . i18nText ( "BI-Basic_Clear" ) , listeners : [ { eventName : BI . TextButton . EVENT _CHANGE , action : function ( ) { self . fireEvent ( BI . DynamicYearMonthPopup . 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-Basic_Current_Month" ) , ref : function ( ) { self . textButton = this } , listeners : [ { eventName : BI . TextButton . EVENT _CHANGE , action : function ( ) { self . fireEvent ( BI . DynamicYearMonthPopup . BUTTON _lABEL _EVENT _CHANGE ) } } ] } , { type : "bi.text_button" , cls : "bi-split-top bi-high-light" , textHeight : c . buttonHeight - 1 , shadow : ! 0 , text : BI . i18nText ( "BI-Basic_OK" ) , listeners : [ { eventName : BI . TextButton . EVENT _CHANGE , action : function ( ) { self . fireEvent ( BI . DynamicYearMonthPopup . BUTTON _OK _EVENT _CHANGE ) } } ] } ] ] } , height : 24 } ] } } , _setInnerValue : function ( ) { if ( this . dateTab . getSelect ( ) === BI . DynamicDateCombo . Static ) this . textButton . setValue ( BI . i18nText ( "BI-Basic_Current_Month" ) ) , this . textButton . setEnable ( ! 0 ) ; else { var date = BI . DynamicDateHelper . getCalculation ( this . dynamicPane . getValue ( ) ) ; date = BI . print ( date , "%Y-%x" ) , this . textButton . setValue ( date ) , this . textButton . setEnable ( ! 1 ) } } , _getTabJson : function ( ) { var self = this , o = this . options ; return { type : "bi.tab" , ref : function ( ) { self . dateTab = this } , tab : { type : "bi.linear_segment" , cls : "bi-split-bottom" , height : this . constants . tabHeight , items : BI . createItems ( [ { text : BI . i18nText ( "BI-Basic_Year_Month" ) , value : BI . DynamicYearCombo . Static } , { text : BI . i18nText ( "BI-Basic_Dynamic_Title" ) , value : BI . DynamicYearCombo . Dynamic } ] , { textAlign : "center" } ) } , cardCreator : function ( v ) { switch ( v ) { case BI . DynamicYearCombo . Dynamic : return { type : "bi.dynamic_year_month_card" , listeners : [ { eventName : "EVENT_CHANGE" , action : function ( ) { self . _setInnerValue ( self . year , v ) } } ] , ref : function ( ) { self . dynamicPane = this } } ; case BI . DynamicYearCombo . Static : default : return { type : "bi.static_year_month_card" , behaviors : o . behaviors , min : self . options . min , max : self . options . max , listeners : [ { eventName : BI . StaticYearMonthCard . EVENT _CHANGE , action : function ( ) { self . fireEvent ( BI . DynamicYearMonthPopup . EVENT _CHANGE ) } } ] , ref : function ( ) { self . year = this } } } } , listeners : [ { eventName : BI . Tab . EVENT _CHANGE , action : function ( ) { var v = self . dateTab . getSelect ( ) ; switch ( v ) { case BI . DynamicYearCombo . Static : var date = BI . DynamicDateHelper . getCalculation ( self . dynamicPane . getValue ( ) ) ;
width : 200 , height : 30 , items : null , itemsCreator : BI . emptyFn , cache : ! 0 } ) } , _valueFormatter : function ( v ) { var text = v ; return BI . isNotNull ( this . items ) && BI . some ( this . items , function ( i , item ) { if ( item . value === v || item . value + "" === v ) return text = item . text , ! 0 } ) , text } , _itemsCreator : function ( options , callback ) { function call ( items ) { var keywords = ( options . keywords || [ ] ) . slice ( ) ; options . keyword && keywords . push ( options . keyword ) ; var resultItems = items ; if ( BI . isNotEmptyArray ( keywords ) && ( resultItems = [ ] , BI . each ( keywords , function ( i , kw ) { var search = BI . Func . getSearchResult ( items , kw ) ; resultItems = resultItems . concat ( search . match ) . concat ( search . find ) } ) , resultItems = BI . uniq ( resultItems ) ) , options . selectedValues ) { var filter = BI . makeObject ( options . selectedValues , ! 0 ) ; resultItems = BI . filter ( resultItems , function ( i , ob ) { return ! filter [ ob . value ] } ) } return options . type === BI . MultiSelectCombo . REQ _GET _ALL _DATA ? void callback ( { items : resultItems } ) : options . type === BI . MultiSelectCombo . REQ _GET _DATA _LENGTH ? void callback ( { count : resultItems . length } ) : void callback ( { items : resultItems , hasNext : ! 1 } ) } var self = this , o = this . options ; o . cache && this . items ? call ( this . items ) : o . itemsCreator ( { } , function ( items ) { self . items = items , call ( items ) } ) } } ) , BI . AllValueChooserCombo = BI . inherit ( BI . AbstractAllValueChooser , { _defaultConfig : function ( ) { return BI . extend ( BI . AllValueChooserCombo . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-all-value-chooser-combo" , width : 200 , height : 24 , items : null , itemsCreator : BI . emptyFn , cache : ! 0 } ) } , _init : function ( ) { BI . AllValueChooserCombo . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; BI . isNotNull ( o . items ) && ( this . items = o . items ) , this . combo = BI . createWidget ( { type : "bi.multi_select_combo" , text : o . text , element : this , itemsCreator : BI . bind ( this . _itemsCreator , this ) , valueFormatter : BI . bind ( this . _valueFormatter , this ) , width : o . width , height : o . height , value : { type : BI . Selection . Multi , value : o . value || [ ] } } ) , this . combo . on ( BI . MultiSelectCombo . EVENT _CONFIRM , function ( ) { self . fireEvent ( BI . AllValueChooserCombo . EVENT _CONFIRM ) } ) } , setValue : function ( v ) { this . combo . setValue ( { type : BI . Selection . Multi , value : v || [ ] } ) } , getValue : function ( ) { var val = this . combo . getValue ( ) || { } ; return val . type === BI . Selection . All ? val . assist : val . value || [ ] } , populate : function ( items ) { this . items = items , this . combo . populate . apply ( this , arguments ) } } ) , BI . AllValueChooserCombo . EVENT _CONFIRM = "EVENT_CONFIRM" , BI . shortcut ( "bi.all_value_chooser_combo" , BI . AllValueChooserCombo ) , BI . AllValueChooserPane = BI . inherit ( BI . AbstractAllValueChooser , { _defaultConfig : function ( ) { return BI . extend ( BI . AllValueChooserPane . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-all-value-chooser-pane" , width : 200 , height : 30 , items : null , itemsCreator : BI . emptyFn , cache : ! 0 } ) } , _init : function ( ) { BI . AllValueChooserPane . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; BI . isNotNull ( o . items ) && ( this . items = o . items ) , this . list = BI . createWidget ( { type : "bi.multi_select_list" , element : this , itemsCreator : BI . bind ( this . _itemsCreator , this ) , valueFormatter : BI . bind ( this . _valueFormatter , this ) , width : o . width , height : o . height } ) , this . list . on ( BI . MultiSelectList . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . AllValueChooserPane . EVENT _CHANGE ) } ) } , setValue : function ( v ) { this . list . setValue ( { type : BI . Selection . Multi , value : v || [ ] } ) } , getValue : function ( ) { var val = this . list . getValue ( ) || { } ; return val . type === BI . Selection . All ? val . assist : val . value || [ ] } , populate : function ( items ) { this . items = items , this . list . populate . apply ( this . list , arguments ) } } ) , BI . AllValueChooserPane . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.all_value_chooser_pane" , BI . AllValueChooserPane ) , BI . AllValueMultiTextValueCombo = BI . inherit ( BI . Widget , { props : { baseCls : "bi-all-value-multi-text-value-combo" , width : 200 , height : 24 , items : [ ] } , render : function ( ) { var self = this , o = this . options , value = this . _digestValue ( o . value ) ; return { type : "bi.search_multi_text_value_combo" , text : o . text , height : o . height , items : o . items , value : value , numOfPage : 100 , valueFormatter : o . valueFormatter , warningTitle : o . warningTitle , listeners : [ { eventName : BI . SearchMultiTextValueCombo . EVENT _CONFIRM , action : function ( ) { self . fireEvent ( BI . AllValueMultiTextValueCombo . EVENT _CONFIRM ) } } ] , ref : function ( ) { self . combo = this } } }
if ( BI . isNotEmptyArray ( keywords ) && ( resultItems = [ ] , BI . each ( keywords , function ( i , kw ) { var search = BI . Func . getSearchResult ( items , kw ) ; resultItems = resultItems . concat ( search . match ) . concat ( search . find ) } ) , resultItems = BI . uniq ( resultItems ) ) , options . selectedValues ) { var filter = BI . makeObject ( options . selectedValues , ! 0 ) ; resultItems = BI . filter ( resultItems , function ( i , ob ) { return ! filter [ ob . value ] } ) } return options . type === BI . MultiSelectCombo . REQ _GET _ALL _DATA ? void callback ( { items : resultItems } ) : options . type === BI . MultiSelectCombo . REQ _GET _DATA _LENGTH ? void callback ( { count : resultItems . length } ) : void callback ( { items : self . _getItemsByTimes ( resultItems , options . times ) , hasNext : self . _hasNextByTimes ( resultItems , options . times ) } ) } var self = this , o = this . options ; o . cache && this . items ? call ( this . items ) : o . itemsCreator ( { } , function ( items ) { self . items = items , call ( items ) } ) } } ) , BI . ValueChooserInsertCombo = BI . inherit ( BI . AbstractValueChooser , { _defaultConfig : function ( ) { return BI . extend ( BI . ValueChooserInsertCombo . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-value-chooser-insert-combo" , width : 200 , height : 24 , items : null , itemsCreator : BI . emptyFn , cache : ! 0 } ) } , _init : function ( ) { BI . ValueChooserInsertCombo . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; BI . isNotNull ( o . items ) && ( this . items = o . items ) , this . combo = BI . createWidget ( { type : "bi.multi_select_insert_combo" , element : this , text : o . text , value : o . value , itemsCreator : BI . bind ( this . _itemsCreator , this ) , valueFormatter : BI . bind ( this . _valueFormatter , this ) , width : o . width , height : o . height , listeners : [ { eventName : BI . MultiSelectCombo . EVENT _FOCUS , action : function ( ) { self . fireEvent ( BI . ValueChooserInsertCombo . EVENT _FOCUS ) } } , { eventName : BI . MultiSelectCombo . EVENT _BLUR , action : function ( ) { self . fireEvent ( BI . ValueChooserInsertCombo . EVENT _BLUR ) } } , { eventName : BI . MultiSelectCombo . EVENT _STOP , action : function ( ) { self . fireEvent ( BI . ValueChooserInsertCombo . EVENT _STOP ) } } , { eventName : BI . MultiSelectCombo . EVENT _CLICK _ITEM , action : function ( ) { self . fireEvent ( BI . ValueChooserInsertCombo . EVENT _CLICK _ITEM ) } } , { eventName : BI . MultiSelectCombo . EVENT _SEARCHING , action : function ( ) { self . fireEvent ( BI . ValueChooserInsertCombo . EVENT _SEARCHING ) } } , { eventName : BI . MultiSelectCombo . EVENT _CONFIRM , action : function ( ) { self . fireEvent ( BI . ValueChooserInsertCombo . EVENT _CONFIRM ) } } ] } ) } , setValue : function ( v ) { this . combo . setValue ( v ) } , getValue : function ( ) { var val = this . combo . getValue ( ) || { } ; return { type : val . type , value : val . value } } , populate : function ( items ) { this . items = items , this . combo . populate . apply ( this , arguments ) } } ) , BI . ValueChooserInsertCombo . EVENT _BLUR = "EVENT_BLUR" , BI . ValueChooserInsertCombo . EVENT _FOCUS = "EVENT_FOCUS" , BI . ValueChooserInsertCombo . EVENT _STOP = "EVENT_STOP" , BI . ValueChooserInsertCombo . EVENT _SEARCHING = "EVENT_SEARCHING" , BI . ValueChooserInsertCombo . EVENT _CLICK _ITEM = "EVENT_CLICK_ITEM" , BI . ValueChooserInsertCombo . EVENT _CONFIRM = "EVENT_CONFIRM" , BI . shortcut ( "bi.value_chooser_insert_combo" , BI . ValueChooserInsertCombo ) , BI . ValueChooserCombo = BI . inherit ( BI . AbstractValueChooser , { _defaultConfig : function ( ) { return BI . extend ( BI . ValueChooserCombo . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-value-chooser-combo" , width : 200 , height : 24 , items : null , itemsCreator : BI . emptyFn , cache : ! 0 } ) } , _init : function ( ) { BI . ValueChooserCombo . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; BI . isNotNull ( o . items ) && ( this . items = o . items ) , this . combo = BI . createWidget ( { type : "bi.multi_select_combo" , element : this , text : o . text , value : o . value , itemsCreator : BI . bind ( this . _itemsCreator , this ) , valueFormatter : BI . bind ( this . _valueFormatter , this ) , width : o . width , height : o . height , listeners : [ { eventName : BI . MultiSelectCombo . EVENT _FOCUS , action : function ( ) { self . fireEvent ( BI . ValueChooserCombo . EVENT _FOCUS ) } } , { eventName : BI . MultiSelectCombo . EVENT _BLUR , action : function ( ) { self . fireEvent ( BI . ValueChooserCombo . EVENT _BLUR ) } } , { eventName : BI . MultiSelectCombo . EVENT _STOP , action : function ( ) { self . fireEvent ( BI . ValueChooserCombo . EVENT _STOP ) } } , { eventName : BI . MultiSelectCombo . EVENT _CLICK _ITEM , action : function ( ) { self . fireEvent ( BI . ValueChooserCombo . EVENT _CLICK _ITEM ) } } , { eventName : BI . MultiSelectCombo . EVENT _SEARCHING , action : function ( ) { self . fireEvent ( BI . ValueChooserCombo . EVENT _SE
! function ( r ) { var n = { } ; function o ( e ) { if ( n [ e ] ) return n [ e ] . exports ; var t = n [ e ] = { i : e , l : ! 1 , exports : { } } ; return r [ e ] . call ( t . exports , t , t . exports , o ) , t . l = ! 0 , t . exports } o . m = r , o . c = n , o . d = function ( e , t , r ) { o . o ( e , t ) || Object . defineProperty ( e , t , { enumerable : ! 0 , get : r } ) } , 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 r = Object . create ( null ) ; if ( o . r ( r ) , Object . defineProperty ( r , "default" , { enumerable : ! 0 , value : t } ) , 2 & e && "string" != typeof t ) for ( var n in t ) o . d ( r , n , function ( e ) { return t [ e ] } . bind ( null , n ) ) ; return r } , 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 = 141 ) } ( { 141 : function ( e , t , r ) { e . exports = r ( 142 ) } , 142 : function ( e , t , r ) { "use strict" ; var n = function c ( e ) { if ( e && e . _ _esModule ) return e ; var t = i ( ) ; if ( t && t . has ( e ) ) return t . get ( e ) ; var r = { } ; if ( null != e ) { var n = Object . defineProperty && Object . getOwnPropertyDescriptor ; for ( var o in e ) if ( Object . prototype . hasOwnProperty . call ( e , o ) ) { var u = n ? Object . getOwnPropertyDescriptor ( e , o ) : null ; u && ( u . get || u . set ) ? Object . defineProperty ( r , o , u ) : r [ o ] = e [ o ] } } r [ "default" ] = e , t && t . set ( e , r ) ; return r } ( r ( 143 ) ) ; function i ( ) { if ( "function" != typeof WeakMap ) return null ; var e = new WeakMap ; return i = function ( ) { return e } , e } BI = BI . extend ( BI , { Decorators : n } ) } , 143 : function ( e , t , r ) { "use strict" ; 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 , r ) { return t in e ? Object . defineProperty ( e , t , { value : r , enumerable : ! 0 , configurable : ! 0 , writable : ! 0 } ) : e [ t ] = r , e } function c ( e , t ) { e . prototype = Object . create ( t . prototype ) , function i ( e , t ) { for ( var r = Object . getOwnPropertyNames ( t ) , n = 0 ; n < r . length ; n ++ ) { var o = r [ n ] , u = Object . getOwnPropertyDescriptor ( t , o ) ; u && u . configurable && e [ o ] === undefined && Object . defineProperty ( e , o , u ) } return e } ( e . prototype . constructor = e , t ) } Object . defineProperty ( t , "__esModule" , { value : ! 0 } ) , t . shortcut = function o ( ) { return function ( e ) { BI . shortcut ( e . xtype , e ) } } , t . model = function f ( ) { return function ( e ) { BI . model ( e . xtype , e ) } } , t . store = function a ( r ) { var n = 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 = n . props ? n . props . apply ( this ) : undefined ; return BI . Models . getModel ( r . xtype , e ) } , t } ( e ) } } , t . Model = void 0 ; var n = function ( o ) { function e ( ) { for ( var e , t = arguments . length , r = new Array ( t ) , n = 0 ; n < t ; n ++ ) r [ n ] = arguments [ n ] ; return i ( u ( e = o . call . apply ( o , [ this ] . concat ( r ) ) || 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 ) ; t . Model = n } } ) ;