/*! fineui 2020-05-13 18:04:40 */
function _classCallCheck ( instance , Constructor ) { if ( ! ( instance instanceof Constructor ) ) throw new TypeError ( "Cannot call a class as a function" ) } var _global ; _global = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : this , null == _global . BI && ( _global . BI = { prepares : [ ] } ) , null == _global . BI . prepares && ( _global . BI . prepares = [ ] ) , function ( ) { function apply ( func , thisArg , args ) { switch ( args . length ) { case 0 : return func . call ( thisArg ) ; case 1 : return func . call ( thisArg , args [ 0 ] ) ; case 2 : return func . call ( thisArg , args [ 0 ] , args [ 1 ] ) ; case 3 : return func . call ( thisArg , args [ 0 ] , args [ 1 ] , args [ 2 ] ) } return func . apply ( thisArg , args ) } function arrayAggregator ( array , setter , iteratee , accumulator ) { for ( var index = - 1 , length = null == array ? 0 : array . length ; ++ index < length ; ) { var value = array [ index ] ; setter ( accumulator , value , iteratee ( value ) , array ) } return accumulator } function arrayEach ( array , iteratee ) { for ( var index = - 1 , length = null == array ? 0 : array . length ; ++ index < length && iteratee ( array [ index ] , index , array ) !== ! 1 ; ) ; return array } function arrayEvery ( array , predicate ) { for ( var index = - 1 , length = null == array ? 0 : array . length ; ++ index < length ; ) if ( ! predicate ( array [ index ] , index , array ) ) return ! 1 ; return ! 0 } function arrayFilter ( array , predicate ) { for ( var index = - 1 , length = null == array ? 0 : array . length , resIndex = 0 , result = [ ] ; ++ index < length ; ) { var value = array [ index ] ; predicate ( value , index , array ) && ( result [ resIndex ++ ] = value ) } return result } function arrayIncludes ( array , value ) { var length = null == array ? 0 : array . length ; return ! ! length && baseIndexOf ( array , value , 0 ) > - 1 } function arrayIncludesWith ( array , value , comparator ) { for ( var index = - 1 , length = null == array ? 0 : array . length ; ++ index < length ; ) if ( comparator ( value , array [ index ] ) ) return ! 0 ; return ! 1 } function arrayMap ( array , iteratee ) { for ( var index = - 1 , length = null == array ? 0 : array . length , result = Array ( length ) ; ++ index < length ; ) result [ index ] = iteratee ( array [ index ] , index , array ) ; return result } function arrayPush ( array , values ) { for ( var index = - 1 , length = values . length , offset = array . length ; ++ index < length ; ) array [ offset + index ] = values [ index ] ; return array } function arrayReduce ( array , iteratee , accumulator , initAccum ) { var index = - 1 , length = null == array ? 0 : array . length ; for ( initAccum && length && ( accumulator = array [ ++ index ] ) ; ++ index < length ; ) accumulator = iteratee ( accumulator , array [ index ] , index , array ) ; return accumulator } function arraySome ( array , predicate ) { for ( var index = - 1 , length = null == array ? 0 : array . length ; ++ index < length ; ) if ( predicate ( array [ index ] , index , array ) ) return ! 0 ; return ! 1 } function asciiToArray ( string ) { return string . split ( "" ) } function baseFindKey ( collection , predicate , eachFunc ) { var result ; return eachFunc ( collection , function ( value , key , collection ) { if ( predicate ( value , key , collection ) ) return result = key , ! 1 } ) , result } function baseFindIndex ( array , predicate , fromIndex , fromRight ) { for ( var length = array . length , index = fromIndex + ( fromRight ? 1 : - 1 ) ; fromRight ? index -- : ++ index < length ; ) if ( predicate ( array [ index ] , index , array ) ) return index ; return - 1 } function baseIndexOf ( array , value , fromIndex ) { return value === value ? strictIndexOf ( array , value , fromIndex ) : baseFindIndex ( array , baseIsNaN , fromIndex ) } function baseIsNaN ( value ) { return value !== value } function baseProperty ( key ) { return function ( object ) { return null == object ? undefined : object [ key ] } } function basePropertyOf ( object ) { return function ( key ) { return null == object ? undefined : object [ key ] } } function baseReduce ( collection , iteratee , accumulator , initAccum , eachFunc ) { return eachFunc ( collection , function ( value , index , collection ) { accumulator = initAccum ? ( initAccum = ! 1 , value ) : iteratee ( accumulator , value , index , collection ) } ) , accumulator } function baseSortBy ( array , comparer ) { var length = array . length ; for ( array . sort ( comparer ) ; length -- ; ) array [ length ] = array [ length ] . value ; return array } function baseTimes ( n , iteratee ) { for ( var index = - 1 , result = Array ( n ) ; ++ index < n ; ) result [ index ] = iteratee ( index ) ; return result } function baseUnary ( func ) { return function ( value ) { return func ( value ) } } function baseValues ( object , props ) { return arrayMap ( props , function ( key ) { return object [ key ] } ) } function cacheHas ( cache , key ) { return cache . has ( key ) } function charsStartIndex ( strSymbols , chrSymbols ) { for ( var index = - 1 , length = strSymbols . length ; ++ index < length && baseIndexO
for ( ; ++ holdersIndex < holdersLength ; ) ( isUncurried || argsIndex < argsLength ) && ( result [ offset + holders [ holdersIndex ] ] = args [ argsIndex ++ ] ) ; return result } function copyArray ( source , array ) { var index = - 1 , length = source . length ; for ( array || ( array = Array ( length ) ) ; ++ index < length ; ) array [ index ] = source [ index ] ; return array } function copyObject ( source , props , object , customizer ) { var isNew = ! object ; object || ( object = { } ) ; for ( var index = - 1 , length = props . length ; ++ index < length ; ) { var key = props [ index ] , newValue = customizer ? customizer ( object [ key ] , source [ key ] , key , object , source ) : undefined ; newValue === undefined && ( newValue = source [ key ] ) , isNew ? baseAssignValue ( object , key , newValue ) : assignValue ( object , key , newValue ) } return object } function copySymbols ( source , object ) { return copyObject ( source , getSymbols ( source ) , object ) } function copySymbolsIn ( source , object ) { return copyObject ( source , getSymbolsIn ( source ) , object ) } function createAggregator ( setter , initializer ) { return function ( collection , iteratee ) { var func = isArray ( collection ) ? arrayAggregator : baseAggregator , accumulator = initializer ? initializer ( ) : { } ; return func ( collection , setter , baseIteratee ( iteratee , 2 ) , accumulator ) } } function createAssigner ( assigner ) { return baseRest ( function ( object , sources ) { var index = - 1 , length = sources . length , customizer = length > 1 ? sources [ length - 1 ] : undefined , guard = length > 2 ? sources [ 2 ] : undefined ; for ( customizer = assigner . length > 3 && "function" == typeof customizer ? ( length -- , customizer ) : undefined , guard && isIterateeCall ( sources [ 0 ] , sources [ 1 ] , guard ) && ( customizer = length < 3 ? undefined : customizer , length = 1 ) , object = Object ( object ) ; ++ index < length ; ) { var source = sources [ index ] ; source && assigner ( object , source , index , customizer ) } return object } ) } function createBaseEach ( eachFunc , fromRight ) { return function ( collection , iteratee ) { if ( null == collection ) return collection ; if ( ! isArrayLike ( collection ) ) return eachFunc ( collection , iteratee ) ; for ( var length = collection . length , index = fromRight ? length : - 1 , iterable = Object ( collection ) ; ( fromRight ? index -- : ++ index < length ) && iteratee ( iterable [ index ] , index , iterable ) !== ! 1 ; ) ; return collection } } function createBaseFor ( fromRight ) { return function ( object , iteratee , keysFunc ) { for ( var index = - 1 , iterable = Object ( object ) , props = keysFunc ( object ) , length = props . length ; length -- ; ) { var key = props [ fromRight ? length : ++ index ] ; if ( iteratee ( iterable [ key ] , key , iterable ) === ! 1 ) break } return object } } function createBind ( func , bitmask , thisArg ) { function wrapper ( ) { var fn = this && this !== root && this instanceof wrapper ? Ctor : func ; return fn . apply ( isBind ? thisArg : this , arguments ) } var isBind = bitmask & WRAP _BIND _FLAG , Ctor = createCtor ( func ) ; return wrapper } function createCtor ( Ctor ) { return function ( ) { var args = arguments ; switch ( args . length ) { case 0 : return new Ctor ; case 1 : return new Ctor ( args [ 0 ] ) ; case 2 : return new Ctor ( args [ 0 ] , args [ 1 ] ) ; case 3 : return new Ctor ( args [ 0 ] , args [ 1 ] , args [ 2 ] ) ; case 4 : return new Ctor ( args [ 0 ] , args [ 1 ] , args [ 2 ] , args [ 3 ] ) ; case 5 : return new Ctor ( args [ 0 ] , args [ 1 ] , args [ 2 ] , args [ 3 ] , args [ 4 ] ) ; case 6 : return new Ctor ( args [ 0 ] , args [ 1 ] , args [ 2 ] , args [ 3 ] , args [ 4 ] , args [ 5 ] ) ; case 7 : return new Ctor ( args [ 0 ] , args [ 1 ] , args [ 2 ] , args [ 3 ] , args [ 4 ] , args [ 5 ] , args [ 6 ] ) } var thisBinding = baseCreate ( Ctor . prototype ) , result = Ctor . apply ( thisBinding , args ) ; return isObject ( result ) ? result : thisBinding } } function createCurry ( func , bitmask , arity ) { function wrapper ( ) { for ( var length = arguments . length , args = Array ( length ) , index = length , placeholder = getHolder ( wrapper ) ; index -- ; ) args [ index ] = arguments [ index ] ; var holders = length < 3 && args [ 0 ] !== placeholder && args [ length - 1 ] !== placeholder ? [ ] : replaceHolders ( args , placeholder ) ; if ( length -= holders . length , length < arity ) return createRecurry ( func , bitmask , createHybrid , wrapper . placeholder , undefined , args , holders , undefined , undefined , arity - length ) ; var fn = this && this !== root && this instanceof wrapper ? Ctor : func ; return apply ( fn , this , args ) } var Ctor = createCtor ( func ) ; return wrapper } function createFind ( findIndexFunc ) { return function ( collection , predicate , fromIndex ) { var iterable = Object ( collection ) ; if ( ! isArrayLike ( collection ) ) { var iteratee = baseIteratee ( predicate , 3 ) ; collection = keys ( collection ) , predicate = function ( key ) { return iteratee ( iterable [ key ] , key , iterable ) } } var index = findIndexFunc ( collection , predicate , fromIndex ) ; return index > -
if ( null === proto ) return ! 0 ; var Ctor = hasOwnProperty . call ( proto , "constructor" ) && proto . constructor ; return "function" == typeof Ctor && Ctor instanceof Ctor && funcToString . call ( Ctor ) == objectCtorString } function isString ( value ) { return "string" == typeof value || ! isArray ( value ) && isObjectLike ( value ) && baseGetTag ( value ) == stringTag } function isSymbol ( value ) { return "symbol" == typeof value || isObjectLike ( value ) && baseGetTag ( value ) == symbolTag } function isUndefined ( value ) { return value === undefined } function toArray ( value ) { if ( ! value ) return [ ] ; if ( isArrayLike ( value ) ) return isString ( value ) ? stringToArray ( value ) : copyArray ( value ) ; if ( symIterator && value [ symIterator ] ) return iteratorToArray ( value [ symIterator ] ( ) ) ; var tag = getTag ( value ) , func = tag == mapTag ? mapToArray : tag == setTag ? setToArray : values ; return func ( value ) } function toFinite ( value ) { if ( ! value ) return 0 === value ? value : 0 ; if ( value = toNumber ( value ) , value === INFINITY || value === - INFINITY ) { var sign = value < 0 ? - 1 : 1 ; return sign * MAX _INTEGER } return value === value ? value : 0 } function toInteger ( value ) { var result = toFinite ( value ) , remainder = result % 1 ; return result === result ? remainder ? result - remainder : result : 0 } function toNumber ( value ) { if ( "number" == typeof value ) return value ; if ( isSymbol ( value ) ) return NAN ; if ( isObject ( value ) ) { var other = "function" == typeof value . valueOf ? value . valueOf ( ) : value ; value = isObject ( other ) ? other + "" : other } if ( "string" != typeof value ) return 0 === value ? value : + value ; value = value . replace ( reTrim , "" ) ; var isBinary = reIsBinary . test ( value ) ; return isBinary || reIsOctal . test ( value ) ? freeParseInt ( value . slice ( 2 ) , isBinary ? 2 : 8 ) : reIsBadHex . test ( value ) ? NAN : + value } function toPlainObject ( value ) { return copyObject ( value , keysIn ( value ) ) } function toString ( value ) { return null == value ? "" : baseToString ( value ) } function create ( prototype , properties ) { var result = baseCreate ( prototype ) ; return null == properties ? result : baseAssign ( result , properties ) } function findKey ( object , predicate ) { return baseFindKey ( object , baseIteratee ( predicate , 3 ) , baseForOwn ) } function findLastKey ( object , predicate ) { return baseFindKey ( object , baseIteratee ( predicate , 3 ) , baseForOwnRight ) } function get ( object , path , defaultValue ) { var result = null == object ? undefined : baseGet ( object , path ) ; return result === undefined ? defaultValue : result } function has ( object , path ) { return null != object && hasPath ( object , path , baseHas ) } function hasIn ( object , path ) { return null != object && hasPath ( object , path , baseHasIn ) } function keys ( object ) { return isArrayLike ( object ) ? arrayLikeKeys ( object ) : baseKeys ( object ) } function keysIn ( object ) { return isArrayLike ( object ) ? arrayLikeKeys ( object , ! 0 ) : baseKeysIn ( object ) } function omitBy ( object , predicate ) { return pickBy ( object , negate ( baseIteratee ( predicate ) ) ) } function pickBy ( object , predicate ) { if ( null == object ) return { } ; var props = arrayMap ( getAllKeysIn ( object ) , function ( prop ) { return [ prop ] } ) ; return predicate = baseIteratee ( predicate ) , basePickBy ( object , props , function ( value , path ) { return predicate ( value , path [ 0 ] ) } ) } function result ( object , path , defaultValue ) { path = castPath ( path , object ) ; var index = - 1 , length = path . length ; for ( length || ( length = 1 , object = undefined ) ; ++ index < length ; ) { var value = null == object ? undefined : object [ toKey ( path [ index ] ) ] ; value === undefined && ( index = length , value = defaultValue ) , object = isFunction ( value ) ? value . call ( object ) : value } return object } function set ( object , path , value ) { return null == object ? object : baseSet ( object , path , value ) } function values ( object ) { return null == object ? [ ] : baseValues ( object , keys ( object ) ) } function clamp ( number , lower , upper ) { return upper === undefined && ( upper = lower , lower = undefined ) , upper !== undefined && ( upper = toNumber ( upper ) , upper = upper === upper ? upper : 0 ) , lower !== undefined && ( lower = toNumber ( lower ) , lower = lower === lower ? lower : 0 ) , baseClamp ( toNumber ( number ) , lower , upper ) } function random ( lower , upper , floating ) { if ( floating && "boolean" != typeof floating && isIterateeCall ( lower , upper , floating ) && ( upper = floating = undefined ) , floating === undefined && ( "boolean" == typeof upper ? ( floating = upper , upper = undefined ) : "boolean" == typeof lower && ( floating = lower , lower = undefined ) ) , lower === undefined && upper === undefined ? ( lower = 0 , upper = 1 ) : ( lower = toFinite ( lower ) , upper === undefined ? ( upper = lower , lower = 0 ) : upper = toFinite ( upper ) ) , lower > upper ) { var temp = lower ; lower = upper , upper = temp }
} ) , _ . extend ( BI , { count : function ( from , to , predicate ) { var t ; if ( predicate ) for ( t = from ; t < to ; t ++ ) predicate ( t ) ; return to - from } , inverse : function ( from , to , predicate ) { return BI . count ( to , from , predicate ) } , firstKey : function ( obj ) { var res = undefined ; return BI . any ( obj , function ( key , value ) { return res = key , ! 0 } ) , res } , lastKey : function ( obj ) { var res = undefined ; return BI . each ( obj , function ( key , value ) { return res = key , ! 0 } ) , res } , firstObject : function ( obj ) { var res = undefined ; return BI . any ( obj , function ( key , value ) { return res = value , ! 0 } ) , res } , lastObject : function ( obj ) { var res = undefined ; return BI . each ( obj , function ( key , value ) { return res = value , ! 0 } ) , res } , concat : function ( obj1 , obj2 ) { return BI . isKey ( obj1 ) ? BI . map ( [ ] . slice . apply ( arguments ) , function ( idx , v ) { return v } ) . join ( "" ) : BI . isArray ( obj1 ) ? _ . concat . apply ( [ ] , arguments ) : BI . isObject ( obj1 ) ? _ . extend . apply ( { } , arguments ) : void 0 } , backEach : function ( obj , predicate , context ) { predicate = BI . iteratee ( predicate , context ) ; for ( var index = obj . length - 1 ; index >= 0 ; index -- ) predicate ( index , obj [ index ] , obj ) ; return ! 1 } , backAny : function ( obj , predicate , context ) { predicate = BI . iteratee ( predicate , context ) ; for ( var index = obj . length - 1 ; index >= 0 ; index -- ) if ( predicate ( index , obj [ index ] , obj ) ) return ! 0 ; return ! 1 } , backEvery : function ( obj , predicate , context ) { predicate = BI . iteratee ( predicate , context ) ; for ( var index = obj . length - 1 ; index >= 0 ; index -- ) if ( ! predicate ( index , obj [ index ] , obj ) ) return ! 1 ; return ! 0 } , backFindKey : function ( obj , predicate , context ) { predicate = BI . iteratee ( predicate , context ) ; for ( var keys = _ . keys ( obj ) , key , i = keys . length - 1 ; i >= 0 ; i -- ) if ( key = keys [ i ] , predicate ( obj [ key ] , key , obj ) ) return key } , backFind : function ( obj , predicate , context ) { var key ; if ( key = BI . isArray ( obj ) ? BI . findLastIndex ( obj , predicate , context ) : BI . backFindKey ( obj , predicate , context ) , void 0 !== key && key !== - 1 ) return obj [ key ] } , remove : function ( obj , target , context ) { var isFunction = BI . isFunction ( target ) ; target = isFunction || BI . isArray ( target ) ? target : [ target ] ; var i ; if ( BI . isArray ( obj ) ) for ( i = 0 ; i < obj . length ; i ++ ) ( isFunction && target . apply ( context , [ i , obj [ i ] ] ) === ! 0 || ! isFunction && BI . contains ( target , obj [ i ] ) ) && obj . splice ( i -- , 1 ) ; else BI . each ( obj , function ( i , v ) { ( isFunction && target . apply ( context , [ i , obj [ i ] ] ) === ! 0 || ! isFunction && BI . contains ( target , obj [ i ] ) ) && delete obj [ i ] } ) } , removeAt : function ( obj , index ) { index = BI . isArray ( index ) ? index : [ index ] ; var isArray = BI . isArray ( obj ) , i ; for ( i = 0 ; i < index . length ; i ++ ) isArray ? obj [ index [ i ] ] = "$deleteIndex" : delete obj [ index [ i ] ] ; isArray && BI . remove ( obj , "$deleteIndex" ) } , string2Array : function ( str ) { return str . split ( "&-&" ) } , array2String : function ( array ) { return array . join ( "&-&" ) } , abc2Int : function ( str ) { for ( var idx = 0 , start = "A" , str = str . toUpperCase ( ) , i = 0 , len = str . length ; i < len ; ++ i ) if ( idx = str . charAt ( i ) . charCodeAt ( 0 ) - start . charCodeAt ( 0 ) + 26 * idx + 1 , idx > ( 2147483646 - str . charAt ( i ) . charCodeAt ( 0 ) + start . charCodeAt ( 0 ) ) / 26 ) return 0 ; return idx } , int2Abc : function ( num ) { var DIGITS = [ "A" , "B" , "C" , "D" , "E" , "F" , "G" , "H" , "I" , "J" , "K" , "L" , "M" , "N" , "O" , "P" , "Q" , "R" , "S" , "T" , "U" , "V" , "W" , "X" , "Y" , "Z" ] , idx = num , str = "" ; if ( 0 === num ) return "" ; for ( ; 0 !== idx ; ) { var t = idx % 26 ; 0 === t && ( t = 26 ) , str = DIGITS [ t - 1 ] + str , idx = ( idx - t ) / 26 } return str } } ) , _ . each ( [ "first" , "initial" , "last" , "rest" , "compact" , "flatten" , "without" , "union" , "intersection" , "difference" , "zip" , "unzip" , "object" , "indexOf" , "lastIndexOf" , "sortedIndex" , "range" , "take" , "takeRight" , "uniqBy" ] , function ( name ) { BI [ name ] = _apply ( name ) } ) , _ . each ( [ "findIndex" , "findLastIndex" ] , function ( name ) { BI [ name ] = _applyFunc ( name ) } ) , _ . extend ( BI , { makeArray : function ( length , value ) { for ( var res = [ ] , i = 0 ; i < length ; i ++ ) BI . isNull ( value ) ? res . push ( i ) : res . push ( BI . deepClone ( value ) ) ; return res } , makeObject : function ( array , value ) { for ( var map = { } , i = 0 ; i < array . length ; i ++ ) BI . isNull ( value ) ? map [ array [ i ] ] = array [ i ] : map [ array [ i ] ] = BI . deepClone ( value ) ; return map } , makeArrayByArray : function ( array , value ) { var res = [ ] ; if ( ! array ) return res ; for ( var i = 0 , len = array . length ; i < len ; i ++ ) BI . isArray ( array [ i ] ) ? res . push ( arguments . callee ( array [ i ] , value ) ) : res . push ( BI . deepClone ( value ) ) ; return res } , uniq : function ( array , isSorted , iteratee , context ) { return null == array ? [ ] : ( _ . isBoolean ( isSorted ) || ( context = iteratee , iteratee = isSorted , isSorted = ! 1 ) , iteratee && ( iteratee = traverse ( iteratee , context ) ) , _ . uniq . call ( _ , array , isSorted , iteratee
} , clone : function ( ) { var clone = Base . clone . call ( this ) ; return clone . _data = this . _data . clone ( ) , clone } , _minBufferSize : 0 } ) , Hasher = C _lib . Hasher = BufferedBlockAlgorithm . extend ( { cfg : Base . extend ( ) , init : function ( cfg ) { this . cfg = this . cfg . extend ( cfg ) , this . reset ( ) } , reset : function ( ) { BufferedBlockAlgorithm . reset . call ( this ) , this . _doReset ( ) } , update : function ( messageUpdate ) { return this . _append ( messageUpdate ) , this . _process ( ) , this } , finalize : function ( messageUpdate ) { messageUpdate && this . _append ( messageUpdate ) ; var hash = this . _doFinalize ( ) ; return hash } , blockSize : 16 , _createHelper : function ( hasher ) { return function ( message , cfg ) { return new hasher . init ( cfg ) . finalize ( message ) } } , _createHmacHelper : function ( hasher ) { return function ( message , key ) { return new C _algo . HMAC . init ( hasher , key ) . finalize ( message ) } } } ) , C _algo = C . algo = { } ; return C } ( Math ) ; ! function ( ) { var C = CryptoJS , C _lib = C . lib , WordArray = C _lib . WordArray , C _enc = C . enc , Base64 = C _enc . Base64 = { stringify : function ( wordArray ) { var words = wordArray . words , sigBytes = wordArray . sigBytes , map = this . _map ; wordArray . clamp ( ) ; for ( var base64Chars = [ ] , i = 0 ; i < sigBytes ; i += 3 ) for ( var byte1 = words [ i >>> 2 ] >>> 24 - i % 4 * 8 & 255 , byte2 = words [ i + 1 >>> 2 ] >>> 24 - ( i + 1 ) % 4 * 8 & 255 , byte3 = words [ i + 2 >>> 2 ] >>> 24 - ( i + 2 ) % 4 * 8 & 255 , triplet = byte1 << 16 | byte2 << 8 | byte3 , j = 0 ; j < 4 && i + . 75 * j < sigBytes ; j ++ ) base64Chars . push ( map . charAt ( triplet >>> 6 * ( 3 - j ) & 63 ) ) ; var paddingChar = map . charAt ( 64 ) ; if ( paddingChar ) for ( ; base64Chars . length % 4 ; ) base64Chars . push ( paddingChar ) ; return base64Chars . join ( "" ) } , parse : function ( base64Str ) { var base64StrLength = base64Str . length , map = this . _map , paddingChar = map . charAt ( 64 ) ; if ( paddingChar ) { var paddingIndex = base64Str . indexOf ( paddingChar ) ; paddingIndex != - 1 && ( base64StrLength = paddingIndex ) } for ( var words = [ ] , nBytes = 0 , i = 0 ; i < base64StrLength ; i ++ ) if ( i % 4 ) { var bits1 = map . indexOf ( base64Str . charAt ( i - 1 ) ) << i % 4 * 2 , bits2 = map . indexOf ( base64Str . charAt ( i ) ) >>> 6 - i % 4 * 2 ; words [ nBytes >>> 2 ] |= ( bits1 | bits2 ) << 24 - nBytes % 4 * 8 , nBytes ++ } return WordArray . create ( words , nBytes ) } , _map : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" } } ( ) , function ( Math ) { function FF ( a , b , c , d , x , s , t ) { var n = a + ( b & c | ~ b & d ) + x + t ; return ( n << s | n >>> 32 - s ) + b } function GG ( a , b , c , d , x , s , t ) { var n = a + ( b & d | c & ~ d ) + x + t ; return ( n << s | n >>> 32 - s ) + b } function HH ( a , b , c , d , x , s , t ) { var n = a + ( b ^ c ^ d ) + x + t ; return ( n << s | n >>> 32 - s ) + b } function II ( a , b , c , d , x , s , t ) { var n = a + ( c ^ ( b | ~ d ) ) + x + t ; return ( n << s | n >>> 32 - s ) + b } var C = CryptoJS , C _lib = C . lib , WordArray = C _lib . WordArray , Hasher = C _lib . Hasher , C _algo = C . algo , T = [ ] ; ! function ( ) { for ( var i = 0 ; i < 64 ; i ++ ) T [ i ] = 4294967296 * Math . abs ( Math . sin ( i + 1 ) ) | 0 } ( ) ; var MD5 = C _algo . MD5 = Hasher . extend ( { _doReset : function ( ) { this . _hash = new WordArray . init ( [ 1732584193 , 4023233417 , 2562383102 , 271733878 ] ) } , _doProcessBlock : function ( M , offset ) { for ( var i = 0 ; i < 16 ; i ++ ) { var offset _i = offset + i , M _offset _i = M [ offset _i ] ; M [ offset _i ] = 16711935 & ( M _offset _i << 8 | M _offset _i >>> 24 ) | 4278255360 & ( M _offset _i << 24 | M _offset _i >>> 8 ) } var H = this . _hash . words , M _offset _0 = M [ offset + 0 ] , M _offset _1 = M [ offset + 1 ] , M _offset _2 = M [ offset + 2 ] , M _offset _3 = M [ offset + 3 ] , M _offset _4 = M [ offset + 4 ] , M _offset _5 = M [ offset + 5 ] , M _offset _6 = M [ offset + 6 ] , M _offset _7 = M [ offset + 7 ] , M _offset _8 = M [ offset + 8 ] , M _offset _9 = M [ offset + 9 ] , M _offset _10 = M [ offset + 10 ] , M _offset _11 = M [ offset + 11 ] , M _offset _12 = M [ offset + 12 ] , M _offset _13 = M [ offset + 13 ] , M _offset _14 = M [ offset + 14 ] , M _offset _15 = M [ offset + 15 ] , a = H [ 0 ] , b = H [ 1 ] , c = H [ 2 ] , d = H [ 3 ] ; a = FF ( a , b , c , d , M _offset _0 , 7 , T [ 0 ] ) , d = FF ( d , a , b , c , M _offset _1 , 12 , T [ 1 ] ) , c = FF ( c , d , a , b , M _offset _2 , 17 , T [ 2 ] ) , b = FF ( b , c , d , a , M _offset _3 , 22 , T [ 3 ] ) , a = FF ( a , b , c , d , M _offset _4 , 7 , T [ 4 ] ) , d = FF ( d , a , b , c , M _offset _5 , 12 , T [ 5 ] ) , c = FF ( c , d , a , b , M _offset _6 , 17 , T [ 6 ] ) , b = FF ( b , c , d , a , M _offset _7 , 22 , T [ 7 ] ) , a = FF ( a , b , c , d , M _offset _8 , 7 , T [ 8 ] ) , d = FF ( d , a , b , c , M _offset _9 , 12 , T [ 9 ] ) , c = FF ( c , d , a , b , M _offset _10 , 17 , T [ 10 ] ) , b = FF ( b , c , d , a , M _offset _11 , 22 , T [ 11 ] ) , a = FF ( a , b , c , d , M _offset _12 , 7 , T [ 12 ] ) , d = FF ( d , a , b , c , M _offset _13 , 12 , T [ 13 ] ) , c = FF ( c , d , a , b , M _offset _14 , 17 , T [ 14 ] ) , b = FF ( b , c , d , a , M _offset _15 , 22 , T [ 15 ] ) , a = GG ( a , b , c , d , M _offset _1 , 5 , T [ 16 ] ) , d = GG ( d , a , b , c , M _offset _6 , 9 , T [ 17 ] ) , c = GG ( c , d , a , b , M _offset _11 , 14 , T [ 18 ] ) , b = GG ( b , c , d , a , M _offset _0 , 20 , T [ 19 ] ) , a = GG ( a , b , c , d , M _offset _5 , 5 , T [ 20 ] ) , d = GG ( d , a , b , c , M _offset _10 , 9 , T [ 21 ] ) , c = GG ( c , d , a , b , M _offset _15 , 14 , T [ 22 ] ) , b = GG ( b , c , d , a , M _offset _4 , 20 , T [ 23 ] ) , a = GG ( a , b , c , d , M _offset _9 , 5 , T [ 24 ] ) , d = GG ( d , a , b , c , M _offset _14 , 9 , T [ 25 ] ) , c
19969 : "DZ" , 19975 : "WM" , 19988 : "QJ" , 20048 : "YL" , 20056 : "SC" , 20060 : "NM" , 20094 : "QG" , 20127 : "QJ" , 20167 : "QC" , 20193 : "YG" , 20250 : "KH" , 20256 : "ZC" , 20282 : "SC" , 20285 : "QJG" , 20291 : "TD" , 20314 : "YD" , 20315 : "BF" , 20340 : "NE" , 20375 : "TD" , 20389 : "YJ" , 20391 : "CZ" , 20415 : "PB" , 20446 : "YS" , 20447 : "SQ" , 20504 : "TC" , 20608 : "KG" , 20854 : "QJ" , 20857 : "ZC" , 20911 : "PF" , 20985 : "AW" , 21032 : "PB" , 21048 : "XQ" , 21049 : "SC" , 21089 : "YS" , 21119 : "JC" , 21242 : "SB" , 21273 : "SC" , 21305 : "YP" , 21306 : "QO" , 21330 : "ZC" , 21333 : "SDC" , 21345 : "QK" , 21378 : "CA" , 21397 : "SC" , 21414 : "XS" , 21442 : "SC" , 21477 : "JG" , 21480 : "TD" , 21484 : "ZS" , 21494 : "YX" , 21505 : "YX" , 21512 : "HG" , 21523 : "XH" , 21537 : "PB" , 21542 : "PF" , 21549 : "KH" , 21571 : "E" , 21574 : "DA" , 21588 : "TD" , 21589 : "O" , 21618 : "ZC" , 21621 : "KHA" , 21632 : "ZJ" , 21654 : "KG" , 21679 : "LKG" , 21683 : "KH" , 21710 : "A" , 21719 : "YH" , 21734 : "WOE" , 21769 : "A" , 21780 : "WN" , 21804 : "XH" , 21834 : "A" , 21899 : "ZD" , 21903 : "RN" , 21908 : "WO" , 21939 : "ZC" , 21956 : "SA" , 21964 : "YA" , 21970 : "TD" , 22003 : "A" , 22031 : "JG" , 22040 : "XS" , 22060 : "ZC" , 22066 : "ZC" , 22079 : "MH" , 22129 : "XJ" , 22179 : "XA" , 22237 : "NJ" , 22244 : "TD" , 22280 : "JQ" , 22300 : "YH" , 22313 : "XW" , 22331 : "YQ" , 22343 : "YJ" , 22351 : "PH" , 22395 : "DC" , 22412 : "TD" , 22484 : "PB" , 22500 : "PB" , 22534 : "ZD" , 22549 : "DH" , 22561 : "PB" , 22612 : "TD" , 22771 : "KQ" , 22831 : "HB" , 22841 : "JG" , 22855 : "QJ" , 22865 : "XQ" , 23013 : "ML" , 23081 : "WM" , 23487 : "SX" , 23558 : "QJ" , 23561 : "YW" , 23586 : "YW" , 23614 : "YW" , 23615 : "SN" , 23631 : "PB" , 23646 : "ZS" , 23663 : "ZT" , 23673 : "YG" , 23762 : "TD" , 23769 : "ZS" , 23780 : "QJ" , 23884 : "QK" , 24055 : "XH" , 24113 : "DC" , 24162 : "ZC" , 24191 : "GA" , 24273 : "QJ" , 24324 : "NL" , 24377 : "TD" , 24378 : "QJ" , 24439 : "PF" , 24554 : "ZS" , 24683 : "TD" , 24694 : "WE" , 24733 : "LK" , 24925 : "TN" , 25094 : "ZG" , 25100 : "XQ" , 25103 : "XH" , 25153 : "PB" , 25170 : "PB" , 25179 : "KG" , 25203 : "PB" , 25240 : "ZS" , 25282 : "FB" , 25303 : "NA" , 25324 : "KG" , 25341 : "ZY" , 25373 : "WZ" , 25375 : "XJ" , 25384 : "A" , 25457 : "A" , 25528 : "SD" , 25530 : "SC" , 25552 : "TD" , 25774 : "ZC" , 25874 : "ZC" , 26044 : "YW" , 26080 : "WM" , 26292 : "PB" , 26333 : "PB" , 26355 : "ZY" , 26366 : "CZ" , 26397 : "ZC" , 26399 : "QJ" , 26415 : "ZS" , 26451 : "SB" , 26526 : "ZC" , 26552 : "JG" , 26561 : "TD" , 26588 : "JG" , 26597 : "CZ" , 26629 : "ZS" , 26638 : "YL" , 26646 : "XQ" , 26653 : "KG" , 26657 : "XJ" , 26727 : "HG" , 26894 : "ZC" , 26937 : "ZS" , 26946 : "ZC" , 26999 : "KJ" , 27099 : "KJ" , 27449 : "YQ" , 27481 : "XS" , 27542 : "ZS" , 27663 : "ZS" , 27748 : "TS" , 27784 : "SC" , 27788 : "ZD" , 27795 : "TD" , 27812 : "O" , 27850 : "PB" , 27852 : "MB" , 27895 : "SL" , 27898 : "PL" , 27973 : "QJ" , 27981 : "KH" , 27986 : "HX" , 27994 : "XJ" , 28044 : "YC" , 28065 : "WG" , 28177 : "SM" , 28267 : "QJ" , 28291 : "KH" , 28337 : "ZQ" , 28463 : "TL" , 28548 : "DC" , 28601 : "TD" , 28689 : "PB" , 28805 : "JG" , 28820 : "QG" , 28846 : "PB" , 28952 : "TD" , 28975 : "ZC" , 29100 : "A" , 29325 : "QJ" , 29575 : "SL" , 29602 : "FB" , 30010 : "TD" , 30044 : "CX" , 30058 : "PF" , 30091 : "YSP" , 30111 : "YN" , 30229 : "XJ" , 30427 : "SC" , 30465 : "SX" , 30631 : "YQ" , 30655 : "QJ" , 30684 : "QJG" , 30707 : "SD" , 30729 : "XH" , 30796 : "LG" , 30917 : "PB" , 31074 : "NM" , 31085 : "JZ" , 31109 : "SC" , 31181 : "ZC" , 31192 : "MLB" , 31293 : "JQ" , 31400 : "YX" , 31584 : "YJ" , 31896 : "ZN" , 31909 : "ZY" , 31995 : "XJ" , 32321 : "PF" , 32327 : "ZY" , 32418 : "HG" , 32420 : "XQ" , 32421 : "HG" , 32438 : "LG" , 32473 : "GJ" , 32488 : "TD" , 32521 : "QJ" , 32527 : "PB" , 32562 : "ZSQ" , 32564 : "JZ" , 32735 : "ZD" , 32793 : "PB" , 33071 : "PF" , 33098 : "XL" , 33100 : "YA" , 33152 : "PB" , 33261 : "CX" , 33324 : "BP" , 33333 : "TD" , 33406 : "YA" , 33426 : "WM" , 33432 : "PB" , 33445 : "JG" , 33486 : "ZN" , 33493 : "TS" , 33507 : "QJ" , 33540 : "QJ" , 33544 : "ZC" , 33564 : "XQ" , 33617 : "YT" , 33632 : "QJ" , 33636 : "XH" , 33637 : "YX" , 33694 : "WG" , 33705 : "PF" , 33728 : "YW" , 33882 : "SR" , 34067 : "WM" , 34074 : "YW" , 34121 : "QJ" , 34255 : "ZC" , 34259 : "XL" , 34425 : "JH" , 34430 : "XH" , 34485 : "KH" , 34503 : "YS" , 34532 : "HG" , 34552 : "XS" , 34558 : "YE" , 34593 : "ZL" , 34660 : "YQ" , 34892 : "XH" , 34928 : "SC" , 34999 : "QJ" , 35048 : "PB" , 35059 : "SC" , 35098 : "ZC" , 35203 : "TQ" , 35265 : "JX" , 35299 : "JX" , 35782 : "SZ" , 35828 : "YS" , 35830 : "E" , 35843 : "TD" , 35895 : "YG" , 35977 : "MH" , 36158 : "JG" , 36228 : "QJ" , 36426 : "XQ" , 36466 : "DC" , 36710 : "CJ" , 36711 : "ZYG" , 36767 : "PB" , 36866 : "SK" , 36951 : "YW" , 37034 : "YX" , 37063 : "XH" , 37218 : "ZC" , 37325 : "ZC" , 38063 : "PB" , 38079 : "TD" , 38085 : "QY" , 38107 : "DC" , 38116 : "TD" , 38123 : "YD" , 38224 : "HG" , 38241 : "XTC" , 38271 : "ZC" , 38415 : "YE" , 38426 : "KH" , 38461 : "YD" , 38463 : "AE" , 38466 : "PB" , 38477 : "XJ" , 38518 : "YT" , 38551 : "WK" , 38585 : "ZC" , 38704 : "XS" , 38739 : "LJ" , 38761 : "GJ" , 38808 : "SQ" , 39048 : "JG" , 39049 : "XJ" , 39052 : "HG" , 39076 : "CZ" , 39271 : "XT" , 39534 : "TD" , 39552 : "TD" , 39584 : "PB" , 39647 : "SB" , 39730 : "LG" , 39748 : "TPB" , 40109 : "ZQ" , 40479 : "ND" , 40516 : "HG" , 40536 : "HG" , 40583 : "QJ" , 40765 : "YQ" , 40784 : "QJ" , 40840 : "YK" , 40863 : "QJG" } , _checkPYCh =
if ( ! ( index < 0 || index > this . options . items . length - 1 ) ) { var child = this . _children [ this . _getChildName ( index ) ] , updated ; if ( updated = child . update ( this . _getOptions ( item ) ) ) return updated ; var del = this . _children [ this . _getChildName ( index ) ] ; delete this . _children [ this . _getChildName ( index ) ] , this . options . items . splice ( index , 1 ) ; var w = this . _addElement ( index , item ) ; this . options . items . splice ( index , 0 , item ) , this . _children [ this . _getChildName ( index ) ] = w , index > 0 ? this . _children [ this . _getChildName ( index - 1 ) ] . element . after ( w . element ) : w . element . prependTo ( this . _getWrapper ( ) ) , del . _destroy ( ) , w . _mount ( ) } } , addItems : function ( items , context ) { var self = this , o = this . options , fragment = BI . Widget . _renderEngine . createFragment ( ) , added = [ ] ; BI . each ( items , function ( i , item ) { var w = self . _addElement ( o . items . length , item , context ) ; self . _children [ self . _getChildName ( o . items . length ) ] = w , o . items . push ( item ) , added . push ( w ) , fragment . appendChild ( w . element [ 0 ] ) } ) , this . _isMounted && ( this . _getWrapper ( ) . append ( fragment ) , BI . each ( added , function ( i , w ) { w . _mount ( ) } ) ) } , prependItems : function ( items , context ) { var self = this ; items = items || [ ] ; for ( var fragment = BI . Widget . _renderEngine . createFragment ( ) , added = [ ] , i = items . length - 1 ; i >= 0 ; i -- ) { this . _addItemAt ( 0 , items [ i ] ) ; var w = this . _addElement ( 0 , items [ i ] , context ) ; self . _children [ self . _getChildName ( 0 ) ] = w , this . options . items . unshift ( items [ i ] ) , added . push ( w ) , fragment . appendChild ( w . element [ 0 ] ) } this . _isMounted && ( this . _getWrapper ( ) . prepend ( fragment ) , BI . each ( added , function ( i , w ) { w . _mount ( ) } ) ) } , getValue : function ( ) { var self = this , value = [ ] , child ; return BI . each ( this . options . items , function ( i ) { if ( child = self . _children [ self . _getChildName ( i ) ] ) { var v = child . getValue ( ) ; v = BI . isArray ( v ) ? v : [ v ] , value = value . concat ( v ) } } ) , value } , setValue : function ( v ) { var self = this , child ; BI . each ( this . options . items , function ( i ) { ( child = self . _children [ self . _getChildName ( i ) ] ) && child . setValue ( v ) } ) } , setText : function ( v ) { var self = this , child ; BI . each ( this . options . items , function ( i ) { ( child = self . _children [ self . _getChildName ( i ) ] ) && child . setText ( v ) } ) } , patchItem : function ( oldVnode , vnode , index ) { var shouldUpdate = this . shouldUpdateItem ( index , vnode ) ; if ( shouldUpdate === ! 0 || null === shouldUpdate && ! this . _compare ( oldVnode , vnode ) ) return this . updateItemAt ( index , vnode ) } , updateChildren : function ( oldCh , newCh ) { function sameVnode ( vnode1 , vnode2 , oldIndex , newIndex ) { return vnode1 = self . _getOptions ( vnode1 ) , vnode2 = self . _getOptions ( vnode2 ) , BI . isKey ( vnode1 . key ) ? vnode1 . key === vnode2 . key : oldIndex >= 0 ? oldIndex === newIndex : void 0 } function addNode ( vnode , index ) { var opt = self . _getOptions ( vnode ) , key = null == opt . key ? self . _getChildName ( index ) : opt . key ; return children [ key ] = self . _addElement ( key , vnode ) } function addVnodes ( before , vnodes , startIdx , endIdx ) { for ( ; startIdx <= endIdx ; ++ startIdx ) { var node = addNode ( vnodes [ startIdx ] , startIdx ) ; insertBefore ( node , before , ! 1 , startIdx ) } } function removeVnodes ( vnodes , startIdx , endIdx ) { for ( ; startIdx <= endIdx ; ++ startIdx ) { var ch = vnodes [ startIdx ] ; if ( BI . isNotNull ( ch ) ) { var node = self . _getOptions ( ch ) , key = null == node . key ? self . _getChildName ( startIdx ) : node . key ; delete self . _children [ self . _getChildName ( key ) ] , children [ key ] . _destroy ( ) } } } function insertBefore ( insert , before , isNext , index ) { insert = self . _getOptions ( insert ) , before = before && self . _getOptions ( before ) ; var insertKey = BI . isKey ( insert . key ) ? insert . key : self . _getChildName ( index ) ; if ( before && children [ before . key ] ) { var beforeKey = BI . isKey ( before . key ) ? before . key : self . _getChildName ( index ) , next ; next = isNext ? children [ beforeKey ] . element . next ( ) : children [ beforeKey ] . element , next . length > 0 ? next . before ( children [ insertKey ] . element ) : self . _getWrapper ( ) . append ( children [ insertKey ] . element ) } else self . _getWrapper ( ) . append ( children [ insertKey ] . element ) } function findOldVnode ( vnodes , vNode , beginIdx , endIdx ) { var i , found ; for ( i = beginIdx ; i <= endIdx ; ++ i ) vnodes [ i ] && sameVnode ( vnodes [ i ] , vNode ) && ( found = vnodes [ i ] ) ; return found } var self = this , oldStartIdx = 0 , newStartIdx = 0 , oldEndIdx = oldCh . length - 1 , oldStartVnode = oldCh [ 0 ] , oldEndVnode = oldCh [ oldEndIdx ] , newEndIdx = newCh . length - 1 , newStartVnode = newCh [ 0 ] , newEndVnode = newCh [ newEndIdx ] , before , updated , children = { } ; for ( BI . each ( oldCh , function ( i , child ) { child = self . _getOptions ( child ) ; var key = null == child . key ? i : child . key ; BI . isKey ( key ) && ( children [ ke
self . layouts [ name ] . destroy ( ) } ) , this . layerManager = { } , this . layouts = { } , this } } ) , BI . MaskersController = BI . inherit ( BI . LayerController , { _defaultConfig : function ( ) { return BI . extend ( BI . MaskersController . superclass . _defaultConfig . apply ( this , arguments ) , { } ) } , _init : function ( ) { BI . MaskersController . superclass . _init . apply ( this , arguments ) , this . zindex = BI . zIndex _masker } } ) , BI . PopoverController = BI . inherit ( BI . Controller , { _defaultConfig : function ( ) { return BI . extend ( BI . PopoverController . superclass . _defaultConfig . apply ( this , arguments ) , { modal : ! 0 , render : "body" } ) } , _init : function ( ) { BI . PopoverController . superclass . _init . apply ( this , arguments ) , this . modal = this . options . modal , this . floatManager = { } , this . floatLayer = { } , this . floatContainer = { } , this . floatOpened = { } , this . zindex = BI . zIndex _popover , this . zindexMap = { } } , _check : function ( name ) { return BI . isNotNull ( this . floatManager [ name ] ) } , create : function ( name , options , context ) { if ( this . _check ( name ) ) return this ; var popover = BI . createWidget ( options || { } , { type : "bi.popover" } , context ) ; return this . add ( name , popover , options , context ) , this } , add : function ( name , popover , options , context ) { var self = this ; return options || ( options = { } ) , this . _check ( name ) ? this : ( this . floatContainer [ name ] = BI . createWidget ( { type : "bi.absolute" , cls : "bi-popup-view" , items : [ { el : this . floatLayer [ name ] = BI . createWidget ( { type : "bi.absolute" , items : [ popover ] } , context ) , left : 0 , right : 0 , top : 0 , bottom : 0 } ] } ) , this . floatManager [ name ] = popover , function ( key ) { popover . on ( BI . Popover . EVENT _CLOSE , function ( ) { self . close ( key ) } ) } ( name ) , BI . createWidget ( { type : "bi.absolute" , element : options . container || this . options . render , items : [ { el : this . floatContainer [ name ] , left : 0 , right : 0 , top : 0 , bottom : 0 } ] } ) , this ) } , open : function ( name ) { if ( ! this . _check ( name ) ) return this ; if ( ! this . floatOpened [ name ] ) { this . floatOpened [ name ] = ! 0 ; var container = this . floatContainer [ name ] ; container . element . css ( "zIndex" , this . zindex ++ ) , this . modal && container . element . _ _hasZIndexMask _ _ ( this . zindexMap [ name ] ) && container . element . _ _releaseZIndexMask _ _ ( this . zindexMap [ name ] ) , this . zindexMap [ name ] = this . zindex , this . modal && container . element . _ _buildZIndexMask _ _ ( this . zindex ++ ) , this . get ( name ) . setZindex ( this . zindex ++ ) , this . floatContainer [ name ] . visible ( ) ; var popover = this . get ( name ) ; popover . show && popover . show ( ) ; var W = BI . Widget . _renderEngine . createElement ( this . options . render ) . width ( ) , H = BI . Widget . _renderEngine . createElement ( this . options . render ) . height ( ) , w = popover . element . width ( ) , h = popover . element . height ( ) , left = ( W - w ) / 2 , top = ( H - h ) / 2 ; left < 0 && ( left = 0 ) , top < 0 && ( top = 0 ) , popover . element . css ( { left : left + "px" , top : top + "px" } ) } return this } , close : function ( name ) { return this . _check ( name ) ? ( this . floatOpened [ name ] && ( delete this . floatOpened [ name ] , this . floatContainer [ name ] . invisible ( ) , this . modal && this . floatContainer [ name ] . element . _ _releaseZIndexMask _ _ ( this . zindexMap [ name ] ) ) , this ) : this } , get : function ( name ) { return this . floatManager [ name ] } , remove : function ( name ) { return this . _check ( name ) ? ( this . floatContainer [ name ] . destroy ( ) , this . modal && this . floatContainer [ name ] . element . _ _releaseZIndexMask _ _ ( this . zindexMap [ name ] ) , delete this . floatManager [ name ] , delete this . floatLayer [ name ] , delete this . zindexMap [ name ] , delete this . floatContainer [ name ] , delete this . floatOpened [ name ] , this ) : this } , removeAll : function ( ) { var self = this ; return BI . each ( this . floatContainer , function ( name , container ) { container . destroy ( ) , self . modal && self . floatContainer [ name ] . element . _ _releaseZIndexMask _ _ ( self . zindexMap [ name ] ) } ) , this . floatManager = { } , this . floatLayer = { } , this . floatContainer = { } , this . floatOpened = { } , this . zindexMap = { } , this } } ) , BI . ResizeController = BI . inherit ( BI . Controller , { _defaultConfig : function ( ) { return BI . extend ( BI . ResizeController . superclass . _defaultConfig . apply ( this , arguments ) , { } ) } , _init : function ( ) { BI . ResizeController . superclass . _init . apply ( this , arguments ) ; var self = this ; this . resizerManger = { } ; var fn = BI . debounce ( function ( ev ) { self . _resize ( ev ) } , 30 ) ; BI . Widget . _renderEngine . createElement ( _global ) . resize ( fn ) } , _resize : function ( ev ) { BI . each ( this . resizerManger , function ( key , resizer ) { return resizer instanceof BI . $ ? void ( resizer . is ( ":visible" ) && resizer . trigger ( "__resize__" ) ) : resizer instanceof BI . Layout ? void resizer . resize ( ) : BI . isFunction ( resizer ) ? void resizer ( ev
type : "bi.table_adapt" } ) : isIE ? ob : supportFlex ? BI . extend ( ob , { type : "bi.flex_horizontal" } ) : BI . extend ( ob , { type : "bi.table_adapt" } ) } ) , BI . Plugin . registerWidget ( "bi.center_adapt" , function ( ob ) { var isIE = BI . isIE ( ) , supportFlex = isSupportFlex ( ) , justOneItem = ob . items && ob . items . length <= 1 ; return ! isIE && supportFlex && justOneItem ? ob . scrollable === ! 0 || ob . scrollx === ! 0 || ob . scrolly === ! 0 ? BI . extend ( ob , { type : "bi.flex_scrollable_center_adapt" } ) : BI . extend ( ob , { type : "bi.flex_center_adapt" } ) : justOneItem ? BI . extend ( ob , { type : "bi.inline_center_adapt" } ) : ob } ) , BI . Plugin . registerWidget ( "bi.vertical_adapt" , function ( ob ) { var isIE = BI . isIE ( ) , supportFlex = isSupportFlex ( ) ; return ! isIE && supportFlex ? ob . scrollable === ! 0 || ob . scrollx === ! 0 || ob . scrolly === ! 0 ? BI . extend ( { } , ob , { type : "bi.flex_scrollable_vertical_center_adapt" } ) : BI . extend ( ob , { type : "bi.flex_vertical_center_adapt" } ) : BI . extend ( ob , { type : "bi.inline_vertical_adapt" } ) } ) , BI . Plugin . registerWidget ( "bi.horizontal_adapt" , function ( ob ) { return ob . items && ob . items . length <= 1 ? BI . extend ( ob , { type : "bi.horizontal_auto" } ) : ob } ) , BI . Plugin . registerWidget ( "bi.float_center_adapt" , function ( ob ) { return ! BI . isIE ( ) && isSupportFlex ( ) ? ob . scrollable === ! 0 || ob . scrollx === ! 0 || ob . scrolly === ! 0 ? BI . extend ( { } , ob , { type : "bi.flex_scrollable_center_adapt" } ) : BI . extend ( ob , { type : "bi.flex_center_adapt" } ) : BI . extend ( ob , { type : "bi.inline_center_adapt" } ) } ) , BI . Plugin . registerWidget ( "bi.flex_horizontal" , function ( ob ) { if ( ob . scrollable === ! 0 || ob . scrolly === ! 0 ) return BI . extend ( { } , ob , { type : "bi.flex_scrollable_horizontal" } ) } ) , BI . Plugin . registerWidget ( "bi.flex_vertical" , function ( ob ) { if ( ob . scrollable === ! 0 || ob . scrollx === ! 0 ) return BI . extend ( { } , ob , { type : "bi.flex_scrollable_vertical" } ) } ) , BI . Plugin . registerWidget ( "bi.flex_horizontal_adapt" , function ( ob ) { if ( ob . scrollable === ! 0 || ob . scrollx === ! 0 ) return BI . extend ( { } , ob , { type : "bi.flex_scrollable_horizontal_adapt" } ) } ) , BI . Plugin . registerWidget ( "bi.flex_vertical_adapt" , function ( ob ) { if ( ob . scrollable === ! 0 || ob . scrolly === ! 0 ) return BI . extend ( { } , ob , { type : "bi.flex_scrollable_vertical_adapt" } ) } ) , BI . Plugin . registerWidget ( "bi.flex_horizontal_center_adapt" , function ( ob ) { if ( ob . scrollable === ! 0 || ob . scrollx === ! 0 ) return BI . extend ( { } , ob , { type : "bi.flex_scrollable_horizontal_adapt" } ) } ) , BI . Plugin . registerWidget ( "bi.flex_vertical_center_adapt" , function ( ob ) { if ( ob . scrollable === ! 0 || ob . scrolly === ! 0 ) return BI . extend ( { } , ob , { type : "bi.flex_scrollable_vertical_adapt" } ) } ) , BI . Plugin . registerWidget ( "bi.flex_center_adapt" , function ( ob ) { if ( ob . scrollable === ! 0 || ob . scrolly === ! 0 || ob . scrollx === ! 0 ) return BI . extend ( { } , ob , { type : "bi.flex_scrollable_center_adapt" } ) } ) , BI . Plugin . registerWidget ( "bi.radio" , function ( ob ) { return BI . isIE ( ) && BI . getIEVersion ( ) < 9 ? BI . extend ( ob , { type : "bi.image_radio" } ) : ob } ) , BI . Plugin . registerWidget ( "bi.checkbox" , function ( ob ) { return BI . isIE ( ) && BI . getIEVersion ( ) < 9 ? BI . extend ( ob , { type : "bi.image_checkbox" } ) : ob } ) , BI . Plugin . registerWidget ( "bi.half_icon_button" , function ( ob ) { return BI . isIE ( ) && BI . getIEVersion ( ) < 9 ? ob : BI . extend ( ob , { type : "bi.half_button" } ) } ) } ) , ! function ( ) { var attachEvent = _global . document && _global . document . attachEvent , stylesCreated = ! 1 ; if ( _global . document && ! attachEvent ) { var requestFrame = function ( ) { var raf = _global . requestAnimationFrame || _global . mozRequestAnimationFrame || _global . webkitRequestAnimationFrame || function ( fn ) { return _global . setTimeout ( fn , 20 ) } ; return function ( fn ) { return raf ( fn ) } } ( ) , cancelFrame = function ( ) { var cancel = _global . cancelAnimationFrame || _global . mozCancelAnimationFrame || _global . webkitCancelAnimationFrame || _global . clearTimeout ; return function ( id ) { return cancel ( id ) } } ( ) , resetTriggers = function ( element ) { var triggers = element . _ _resizeTriggers _ _ , expand = triggers . firstElementChild , contract = triggers . lastElementChild , expandChild = expand . firstElementChild ; contract . scrollLeft = contract . scrollWidth , contract . scrollTop = contract . scrollHeight , expandChild . style . width = expand . offsetWidth + 1 + "px" , expandChild . style . height = expand . offsetHeight + 1 + "px" , expand . scrollLeft = expand . scrollWidth , expand . scrollTop = expand . scrollHeight } , checkTriggers = function ( element ) { return element . offsetWidth !== element . _ _resizeLast _ _ . width || element . offsetHeight !== element . _ _resizeLast _ _ . height } , scrollListener = function ( e ) {
} function cloneCopyEvent ( src , dest ) { if ( 1 === dest . nodeType && jQuery . hasData ( src ) ) { var type , i , l , oldData = jQuery . _data ( src ) , curData = jQuery . _data ( dest , oldData ) , events = oldData . events ; if ( events ) { delete curData . handle , curData . events = { } ; for ( type in events ) for ( i = 0 , l = events [ type ] . length ; i < l ; i ++ ) jQuery . event . add ( dest , type , events [ type ] [ i ] ) } curData . data && ( curData . data = jQuery . extend ( { } , curData . data ) ) } } function fixCloneNodeIssues ( src , dest ) { var nodeName , e , data ; if ( 1 === dest . nodeType ) { if ( nodeName = dest . nodeName . toLowerCase ( ) , ! jQuery . support . noCloneEvent && dest [ jQuery . expando ] ) { data = jQuery . _data ( dest ) ; for ( e in data . events ) jQuery . removeEvent ( dest , e , data . handle ) ; dest . removeAttribute ( jQuery . expando ) } "script" === nodeName && dest . text !== src . text ? ( disableScript ( dest ) . text = src . text , restoreScript ( dest ) ) : "object" === nodeName ? ( dest . parentNode && ( dest . outerHTML = src . outerHTML ) , jQuery . support . html5Clone && src . innerHTML && ! jQuery . trim ( dest . innerHTML ) && ( dest . innerHTML = src . innerHTML ) ) : "input" === nodeName && manipulation _rcheckableType . test ( src . type ) ? ( dest . defaultChecked = dest . checked = src . checked , dest . value !== src . value && ( dest . value = src . value ) ) : "option" === nodeName ? dest . defaultSelected = dest . selected = src . defaultSelected : "input" !== nodeName && "textarea" !== nodeName || ( dest . defaultValue = src . defaultValue ) } } function getAll ( context , tag ) { var elems , elem , i = 0 , found = typeof context . getElementsByTagName !== core _strundefined ? context . getElementsByTagName ( tag || "*" ) : typeof context . querySelectorAll !== core _strundefined ? context . querySelectorAll ( tag || "*" ) : undefined ; if ( ! found ) for ( found = [ ] , elems = context . childNodes || context ; null != ( elem = elems [ i ] ) ; i ++ ) ! tag || jQuery . nodeName ( elem , tag ) ? found . push ( elem ) : jQuery . merge ( found , getAll ( elem , tag ) ) ; return tag === undefined || tag && jQuery . nodeName ( context , tag ) ? jQuery . merge ( [ context ] , found ) : found } function fixDefaultChecked ( elem ) { manipulation _rcheckableType . test ( elem . type ) && ( elem . defaultChecked = elem . checked ) } function vendorPropName ( style , name ) { if ( name in style ) return name ; for ( var capName = name . charAt ( 0 ) . toUpperCase ( ) + name . slice ( 1 ) , origName = name , i = cssPrefixes . length ; i -- ; ) if ( name = cssPrefixes [ i ] + capName , name in style ) return name ; return origName } function isHidden ( elem , el ) { return elem = el || elem , "none" === jQuery . css ( elem , "display" ) || ! jQuery . contains ( elem . ownerDocument , elem ) } function showHide ( elements , show ) { for ( var display , elem , hidden , values = [ ] , index = 0 , length = elements . length ; index < length ; index ++ ) elem = elements [ index ] , elem . style && ( values [ index ] = jQuery . _data ( elem , "olddisplay" ) , display = elem . style . display , show ? ( values [ index ] || "none" !== display || ( elem . style . display = "" ) , "" === elem . style . display && isHidden ( elem ) && ( values [ index ] = jQuery . _data ( elem , "olddisplay" , css _defaultDisplay ( elem . nodeName ) ) ) ) : values [ index ] || ( hidden = isHidden ( elem ) , ( display && "none" !== display || ! hidden ) && jQuery . _data ( elem , "olddisplay" , hidden ? display : jQuery . css ( elem , "display" ) ) ) ) ; for ( index = 0 ; index < length ; index ++ ) elem = elements [ index ] , elem . style && ( show && "none" !== elem . style . display && "" !== elem . style . display || ( elem . style . display = show ? values [ index ] || "" : "none" ) ) ; return elements } function setPositiveNumber ( elem , value , subtract ) { var matches = rnumsplit . exec ( value ) ; return matches ? Math . max ( 0 , matches [ 1 ] - ( subtract || 0 ) ) + ( matches [ 2 ] || "px" ) : value } function augmentWidthOrHeight ( elem , name , extra , isBorderBox , styles ) { for ( var i = extra === ( isBorderBox ? "border" : "content" ) ? 4 : "width" === name ? 1 : 0 , val = 0 ; i < 4 ; i += 2 ) "margin" === extra && ( val += jQuery . css ( elem , extra + cssExpand [ i ] , ! 0 , styles ) ) , isBorderBox ? ( "content" === extra && ( val -= jQuery . css ( elem , "padding" + cssExpand [ i ] , ! 0 , styles ) ) , "margin" !== extra && ( val -= jQuery . css ( elem , "border" + cssExpand [ i ] + "Width" , ! 0 , styles ) ) ) : ( val += jQuery . css ( elem , "padding" + cssExpand [ i ] , ! 0 , styles ) , "padding" !== extra && ( val += jQuery . css ( elem , "border" + cssExpand [ i ] + "Width" , ! 0 , styles ) ) ) ; return val } function getWidthOrHeight ( elem , name , extra ) { var valueIsBorderBox = ! 0 , val = "width" === name ? elem . offsetWidth : elem . offsetHeight , styles = getStyles ( elem ) , isBorderBox = jQuery . support . boxSizing && "border-box" === jQuery . css ( elem , "boxSizing" , ! 1 , styles ) ; if ( val <= 0 || null == val ) { if ( val = curCSS ( elem , name , styles ) , ( val < 0 || null == val ) && ( val = elem . style [ name ] ) , rnumnonpx . test ( val ) ) return val ; valueIsBord
width : "4px" } ) . width , marginDiv = div . appendChild ( document . createElement ( "div" ) ) , marginDiv . style . cssText = div . style . cssText = divReset , marginDiv . style . marginRight = marginDiv . style . width = "0" , div . style . width = "1px" , support . reliableMarginRight = ! parseFloat ( ( window . getComputedStyle ( marginDiv , null ) || { } ) . marginRight ) ) , typeof div . style . zoom !== core _strundefined && ( div . innerHTML = "" , div . style . cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1" , support . inlineBlockNeedsLayout = 3 === div . offsetWidth , div . style . display = "block" , div . innerHTML = "<div></div>" , div . firstChild . style . width = "5px" , support . shrinkWrapBlocks = 3 !== div . offsetWidth , support . inlineBlockNeedsLayout && ( body . style . zoom = 1 ) ) , body . removeChild ( container ) , container = div = tds = marginDiv = null ) } ) , all = select = fragment = opt = a = input = null , support } ( ) ; var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/ , rmultiDash = /([A-Z])/g ; jQuery . extend ( { cache : { } , expando : "jQuery" + ( core _version + Math . random ( ) ) . replace ( /\D/g , "" ) , noData : { embed : ! 0 , object : "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" , applet : ! 0 } , hasData : function ( elem ) { return elem = elem . nodeType ? jQuery . cache [ elem [ jQuery . expando ] ] : elem [ jQuery . expando ] , ! ! elem && ! isEmptyDataObject ( elem ) } , data : function ( elem , name , data ) { return internalData ( elem , name , data ) } , removeData : function ( elem , name ) { return internalRemoveData ( elem , name ) } , _data : function ( elem , name , data ) { return internalData ( elem , name , data , ! 0 ) } , _removeData : function ( elem , name ) { return internalRemoveData ( elem , name , ! 0 ) } , acceptData : function ( elem ) { if ( elem . nodeType && 1 !== elem . nodeType && 9 !== elem . nodeType ) return ! 1 ; var noData = elem . nodeName && jQuery . noData [ elem . nodeName . toLowerCase ( ) ] ; return ! noData || noData !== ! 0 && elem . getAttribute ( "classid" ) === noData } } ) , jQuery . fn . extend ( { data : function ( key , value ) { var attrs , name , elem = this [ 0 ] , i = 0 , data = null ; if ( key === undefined ) { if ( this . length && ( data = jQuery . data ( elem ) , 1 === elem . nodeType && ! jQuery . _data ( elem , "parsedAttrs" ) ) ) { for ( attrs = elem . attributes ; i < attrs . length ; i ++ ) name = attrs [ i ] . name , name . indexOf ( "data-" ) || ( name = jQuery . camelCase ( name . slice ( 5 ) ) , dataAttr ( elem , name , data [ name ] ) ) ; jQuery . _data ( elem , "parsedAttrs" , ! 0 ) } return data } return "object" == typeof key ? this . each ( function ( ) { jQuery . data ( this , key ) } ) : jQuery . access ( this , function ( value ) { return value === undefined ? elem ? dataAttr ( elem , key , jQuery . data ( elem , key ) ) : null : void this . each ( function ( ) { jQuery . data ( this , key , value ) } ) } , null , value , arguments . length > 1 , null , ! 0 ) } , removeData : function ( key ) { return this . each ( function ( ) { jQuery . removeData ( this , key ) } ) } } ) , jQuery . extend ( { queue : function ( elem , type , data ) { var queue ; if ( elem ) return type = ( type || "fx" ) + "queue" , queue = jQuery . _data ( elem , type ) , data && ( ! queue || jQuery . isArray ( data ) ? queue = jQuery . _data ( elem , type , jQuery . makeArray ( data ) ) : queue . push ( data ) ) , queue || [ ] } , dequeue : function ( elem , type ) { type = type || "fx" ; var queue = jQuery . queue ( elem , type ) , startLength = queue . length , fn = queue . shift ( ) , hooks = jQuery . _queueHooks ( elem , type ) , next = function ( ) { jQuery . dequeue ( elem , type ) } ; "inprogress" === fn && ( fn = queue . shift ( ) , startLength -- ) , hooks . cur = fn , fn && ( "fx" === type && queue . unshift ( "inprogress" ) , delete hooks . stop , fn . call ( elem , next , hooks ) ) , ! startLength && hooks && hooks . empty . fire ( ) } , _queueHooks : function ( elem , type ) { var key = type + "queueHooks" ; return jQuery . _data ( elem , key ) || jQuery . _data ( elem , key , { empty : jQuery . Callbacks ( "once memory" ) . add ( function ( ) { jQuery . _removeData ( elem , type + "queue" ) , jQuery . _removeData ( elem , key ) } ) } ) } } ) , jQuery . fn . extend ( { queue : function ( type , data ) { var setter = 2 ; return "string" != typeof type && ( data = type , type = "fx" , setter -- ) , arguments . length < setter ? jQuery . queue ( this [ 0 ] , type ) : data === undefined ? this : this . each ( function ( ) { var queue = jQuery . queue ( this , type , data ) ; jQuery . _queueHooks ( this , type ) , "fx" === type && "inprogress" !== queue [ 0 ] && jQuery . dequeue ( this , type ) } ) } , dequeue : function ( type ) { return this . each ( function ( ) { jQuery . dequeue ( this , type ) } ) } , delay : function ( time , type ) { return time = jQuery . fx ? jQuery . fx . speeds [ time ] || time : time , type = type || "fx" , this . queue ( type , function ( next , hooks ) { var timeout = setTimeout ( next , time ) ; hooks . stop = function ( ) { clearTimeout ( timeout ) } } ) } , clearQueue : function ( type ) { return this . queue ( type || "fx" , [ ] ) } , promise : function ( type , obj ) { var tmp , count = 1 , defer = jQuery . Deferred ( ) , elements =
return ( "input" === name || "button" === name ) && elem . type === type } } function createPositionalPseudo ( fn ) { return markFunction ( function ( argument ) { return argument = + argument , markFunction ( function ( seed , matches ) { for ( var j , matchIndexes = fn ( [ ] , seed . length , argument ) , i = matchIndexes . length ; i -- ; ) seed [ j = matchIndexes [ i ] ] && ( seed [ j ] = ! ( matches [ j ] = seed [ j ] ) ) } ) } ) } function tokenize ( selector , parseOnly ) { var matched , match , tokens , type , soFar , groups , preFilters , cached = tokenCache [ selector + " " ] ; if ( cached ) return parseOnly ? 0 : cached . slice ( 0 ) ; for ( soFar = selector , groups = [ ] , preFilters = Expr . preFilter ; soFar ; ) { matched && ! ( match = rcomma . exec ( soFar ) ) || ( match && ( soFar = soFar . slice ( match [ 0 ] . length ) || soFar ) , groups . push ( tokens = [ ] ) ) , matched = ! 1 , ( match = rcombinators . exec ( soFar ) ) && ( matched = match . shift ( ) , tokens . push ( { value : matched , type : match [ 0 ] . replace ( rtrim , " " ) } ) , soFar = soFar . slice ( matched . length ) ) ; for ( type in Expr . filter ) ! ( match = matchExpr [ type ] . exec ( soFar ) ) || preFilters [ type ] && ! ( match = preFilters [ type ] ( match ) ) || ( matched = match . shift ( ) , tokens . push ( { value : matched , type : type , matches : match } ) , soFar = soFar . slice ( matched . length ) ) ; if ( ! matched ) break } return parseOnly ? soFar . length : soFar ? Sizzle . error ( selector ) : tokenCache ( selector , groups ) . slice ( 0 ) } function toSelector ( tokens ) { for ( var i = 0 , len = tokens . length , selector = "" ; i < len ; i ++ ) selector += tokens [ i ] . value ; return selector } function addCombinator ( matcher , combinator , base ) { var dir = combinator . dir , checkNonElements = base && "parentNode" === dir , doneName = done ++ ; return combinator . first ? function ( elem , context , xml ) { for ( ; elem = elem [ dir ] ; ) if ( 1 === elem . nodeType || checkNonElements ) return matcher ( elem , context , xml ) } : function ( elem , context , xml ) { var data , cache , outerCache , dirkey = dirruns + " " + doneName ; if ( xml ) { for ( ; elem = elem [ dir ] ; ) if ( ( 1 === elem . nodeType || checkNonElements ) && matcher ( elem , context , xml ) ) return ! 0 } else for ( ; elem = elem [ dir ] ; ) if ( 1 === elem . nodeType || checkNonElements ) if ( outerCache = elem [ expando ] || ( elem [ expando ] = { } ) , ( cache = outerCache [ dir ] ) && cache [ 0 ] === dirkey ) { if ( ( data = cache [ 1 ] ) === ! 0 || data === cachedruns ) return data === ! 0 } else if ( cache = outerCache [ dir ] = [ dirkey ] , cache [ 1 ] = matcher ( elem , context , xml ) || cachedruns , cache [ 1 ] === ! 0 ) return ! 0 } } function elementMatcher ( matchers ) { return matchers . length > 1 ? function ( elem , context , xml ) { for ( var i = matchers . length ; i -- ; ) if ( ! matchers [ i ] ( elem , context , xml ) ) return ! 1 ; return ! 0 } : matchers [ 0 ] } function condense ( unmatched , map , filter , context , xml ) { for ( var elem , newUnmatched = [ ] , i = 0 , len = unmatched . length , mapped = null != map ; i < len ; i ++ ) ( elem = unmatched [ i ] ) && ( filter && ! filter ( elem , context , xml ) || ( newUnmatched . push ( elem ) , mapped && map . push ( i ) ) ) ; return newUnmatched } function setMatcher ( preFilter , selector , matcher , postFilter , postFinder , postSelector ) { return postFilter && ! postFilter [ expando ] && ( postFilter = setMatcher ( postFilter ) ) , postFinder && ! postFinder [ expando ] && ( postFinder = setMatcher ( postFinder , postSelector ) ) , markFunction ( function ( seed , results , context , xml ) { var temp , i , elem , preMap = [ ] , postMap = [ ] , preexisting = results . length , elems = seed || multipleContexts ( selector || "*" , context . nodeType ? [ context ] : context , [ ] ) , matcherIn = ! preFilter || ! seed && selector ? elems : condense ( elems , preMap , preFilter , context , xml ) , matcherOut = matcher ? postFinder || ( seed ? preFilter : preexisting || postFilter ) ? [ ] : results : matcherIn ; if ( matcher && matcher ( matcherIn , matcherOut , context , xml ) , postFilter ) for ( temp = condense ( matcherOut , postMap ) , postFilter ( temp , [ ] , context , xml ) , i = temp . length ; i -- ; ) ( elem = temp [ i ] ) && ( matcherOut [ postMap [ i ] ] = ! ( matcherIn [ postMap [ i ] ] = elem ) ) ; if ( seed ) { if ( postFinder || preFilter ) { if ( postFinder ) { for ( temp = [ ] , i = matcherOut . length ; i -- ; ) ( elem = matcherOut [ i ] ) && temp . push ( matcherIn [ i ] = elem ) ; postFinder ( null , matcherOut = [ ] , temp , xml ) } for ( i = matcherOut . length ; i -- ; ) ( elem = matcherOut [ i ] ) && ( temp = postFinder ? indexOf . call ( seed , elem ) : preMap [ i ] ) > - 1 && ( seed [ temp ] = ! ( results [ temp ] = elem ) ) } } else matcherOut = condense ( matcherOut === results ? matcherOut . splice ( preexisting , matcherOut . length ) : matcherOut ) , postFinder ? postFinder ( null , results , matcherOut , xml ) : push . apply ( results , matcherOut ) } ) } function matcherFromTokens ( tokens ) { for ( var checkContext , matcher , j , len = tokens . length , leadingRelative = Expr . relative [ tokens [ 0 ] . type ] , implicitRelative = leadingRelative || Expr . relative [ " " ] , i = leadingRelative ? 1 : 0 ,
} ) } , prepend : function ( ) { return this . domManip ( arguments , ! 0 , function ( elem ) { 1 !== this . nodeType && 11 !== this . nodeType && 9 !== this . nodeType || this . insertBefore ( elem , this . firstChild ) } ) } , before : function ( ) { return this . domManip ( arguments , ! 1 , function ( elem ) { this . parentNode && this . parentNode . insertBefore ( elem , this ) } ) } , after : function ( ) { return this . domManip ( arguments , ! 1 , function ( elem ) { this . parentNode && this . parentNode . insertBefore ( elem , this . nextSibling ) } ) } , remove : function ( selector , keepData ) { for ( var elem , i = 0 ; null != ( elem = this [ i ] ) ; i ++ ) ( ! selector || jQuery . filter ( selector , [ elem ] ) . length > 0 ) && ( keepData || 1 !== elem . nodeType || jQuery . cleanData ( getAll ( elem ) ) , elem . parentNode && ( keepData && jQuery . contains ( elem . ownerDocument , elem ) && setGlobalEval ( getAll ( elem , "script" ) ) , elem . parentNode . removeChild ( elem ) ) ) ; return this } , empty : function ( ) { for ( var elem , i = 0 ; null != ( elem = this [ i ] ) ; i ++ ) { for ( 1 === elem . nodeType && jQuery . cleanData ( getAll ( elem , ! 1 ) ) ; elem . firstChild ; ) elem . removeChild ( elem . firstChild ) ; elem . options && jQuery . nodeName ( elem , "select" ) && ( elem . options . length = 0 ) } return this } , clone : function ( dataAndEvents , deepDataAndEvents ) { return dataAndEvents = null != dataAndEvents && dataAndEvents , deepDataAndEvents = null == deepDataAndEvents ? dataAndEvents : deepDataAndEvents , this . map ( function ( ) { return jQuery . clone ( this , dataAndEvents , deepDataAndEvents ) } ) } , html : function ( value ) { return jQuery . access ( this , function ( value ) { var elem = this [ 0 ] || { } , i = 0 , l = this . length ; if ( value === undefined ) return 1 === elem . nodeType ? elem . innerHTML . replace ( rinlinejQuery , "" ) : undefined ; if ( "string" == typeof value && ! rnoInnerhtml . test ( value ) && ( jQuery . support . htmlSerialize || ! rnoshimcache . test ( value ) ) && ( jQuery . support . leadingWhitespace || ! rleadingWhitespace . test ( value ) ) && ! wrapMap [ ( rtagName . exec ( value ) || [ "" , "" ] ) [ 1 ] . toLowerCase ( ) ] ) { value = value . replace ( rxhtmlTag , "<$1></$2>" ) ; try { for ( ; i < l ; i ++ ) elem = this [ i ] || { } , 1 === elem . nodeType && ( jQuery . cleanData ( getAll ( elem , ! 1 ) ) , elem . innerHTML = value ) ; elem = 0 } catch ( e ) { } } elem && this . empty ( ) . append ( value ) } , null , value , arguments . length ) } , replaceWith : function ( value ) { var isFunc = jQuery . isFunction ( value ) ; return isFunc || "string" == typeof value || ( value = jQuery ( value ) . not ( this ) . detach ( ) ) , this . domManip ( [ value ] , ! 0 , function ( elem ) { var next = this . nextSibling , parent = this . parentNode ; parent && ( jQuery ( this ) . remove ( ) , parent . insertBefore ( elem , next ) ) } ) } , detach : function ( selector ) { return this . remove ( selector , ! 0 ) } , domManip : function ( args , table , callback ) { args = core _concat . apply ( [ ] , args ) ; var first , node , hasScripts , scripts , doc , fragment , i = 0 , l = this . length , set = this , iNoClone = l - 1 , value = args [ 0 ] , isFunction = jQuery . isFunction ( value ) ; if ( isFunction || ! ( l <= 1 || "string" != typeof value || jQuery . support . checkClone ) && rchecked . test ( value ) ) return this . each ( function ( index ) { var self = set . eq ( index ) ; isFunction && ( args [ 0 ] = value . call ( this , index , table ? self . html ( ) : undefined ) ) , self . domManip ( args , table , callback ) } ) ; if ( l && ( fragment = jQuery . buildFragment ( args , this [ 0 ] . ownerDocument , ! 1 , this ) , first = fragment . firstChild , 1 === fragment . childNodes . length && ( fragment = first ) , first ) ) { for ( table = table && jQuery . nodeName ( first , "tr" ) , scripts = jQuery . map ( getAll ( fragment , "script" ) , disableScript ) , hasScripts = scripts . length ; i < l ; i ++ ) node = fragment , i !== iNoClone && ( node = jQuery . clone ( node , ! 0 , ! 0 ) , hasScripts && jQuery . merge ( scripts , getAll ( node , "script" ) ) ) , callback . call ( table && jQuery . nodeName ( this [ i ] , "table" ) ? findOrAppend ( this [ i ] , "tbody" ) : this [ i ] , node , i ) ; if ( hasScripts ) for ( doc = scripts [ scripts . length - 1 ] . ownerDocument , jQuery . map ( scripts , restoreScript ) , i = 0 ; i < hasScripts ; i ++ ) node = scripts [ i ] , rscriptType . test ( node . type || "" ) && ! jQuery . _data ( node , "globalEval" ) && jQuery . contains ( doc , node ) && ( node . src ? jQuery . ajax ( { url : node . src , type : "GET" , dataType : "script" , async : ! 1 , global : ! 1 , "throws" : ! 0 } ) : jQuery . globalEval ( ( node . text || node . textContent || node . innerHTML || "" ) . replace ( rcleanScript , "" ) ) ) ; fragment = first = null } return this } } ) , jQuery . each ( { appendTo : "append" , prependTo : "prepend" , insertBefore : "before" , insertAfter : "after" , replaceAll : "replaceWith" } , function ( name , original ) { jQuery . fn [ name ] = function ( selector ) { for ( var elems , i = 0 , ret = [ ] , insert = jQuery ( selector ) , last = insert . length - 1 ; i <= last ; i ++ ) elems = i === last ? this : this . clone ( ! 0 ) , jQuery ( insert [ i ] ) [ original ] ( elems )
if ( index ) data [ index ] && data [ index ] . stop && stopQueue ( data [ index ] ) ; else for ( index in data ) data [ index ] && data [ index ] . stop && rrun . test ( index ) && stopQueue ( data [ index ] ) ; for ( index = timers . length ; index -- ; ) timers [ index ] . elem !== this || null != type && timers [ index ] . queue !== type || ( timers [ index ] . anim . stop ( gotoEnd ) , dequeue = ! 1 , timers . splice ( index , 1 ) ) ; ! dequeue && gotoEnd || jQuery . dequeue ( this , type ) } ) } , finish : function ( type ) { return type !== ! 1 && ( type = type || "fx" ) , this . each ( function ( ) { var index , data = jQuery . _data ( this ) , queue = data [ type + "queue" ] , hooks = data [ type + "queueHooks" ] , timers = jQuery . timers , length = queue ? queue . length : 0 ; for ( data . finish = ! 0 , jQuery . queue ( this , type , [ ] ) , hooks && hooks . cur && hooks . cur . finish && hooks . cur . finish . call ( this ) , index = timers . length ; index -- ; ) timers [ index ] . elem === this && timers [ index ] . queue === type && ( timers [ index ] . anim . stop ( ! 0 ) , timers . splice ( index , 1 ) ) ; for ( index = 0 ; index < length ; index ++ ) queue [ index ] && queue [ index ] . finish && queue [ index ] . finish . call ( this ) ; delete data . finish } ) } } ) , jQuery . each ( { slideDown : genFx ( "show" ) , slideUp : genFx ( "hide" ) , slideToggle : genFx ( "toggle" ) , fadeIn : { opacity : "show" } , fadeOut : { opacity : "hide" } , fadeToggle : { opacity : "toggle" } } , function ( name , props ) { jQuery . fn [ name ] = function ( speed , easing , callback ) { return this . animate ( props , speed , easing , callback ) } } ) , jQuery . speed = function ( speed , easing , fn ) { var opt = speed && "object" == typeof speed ? jQuery . extend ( { } , speed ) : { complete : fn || ! fn && easing || jQuery . isFunction ( speed ) && speed , duration : speed , easing : fn && easing || easing && ! jQuery . isFunction ( easing ) && easing } ; return opt . duration = jQuery . fx . off ? 0 : "number" == typeof opt . duration ? opt . duration : opt . duration in jQuery . fx . speeds ? jQuery . fx . speeds [ opt . duration ] : jQuery . fx . speeds . _default , null != opt . queue && opt . queue !== ! 0 || ( opt . queue = "fx" ) , opt . old = opt . complete , opt . complete = function ( ) { jQuery . isFunction ( opt . old ) && opt . old . call ( this ) , opt . queue && jQuery . dequeue ( this , opt . queue ) } , opt } , jQuery . easing = { linear : function ( p ) { return p } , swing : function ( p ) { return . 5 - Math . cos ( p * Math . PI ) / 2 } } , jQuery . timers = [ ] , jQuery . fx = Tween . prototype . init , jQuery . fx . tick = function ( ) { var timer , timers = jQuery . timers , i = 0 ; for ( fxNow = jQuery . now ( ) ; i < timers . length ; i ++ ) timer = timers [ i ] , timer ( ) || timers [ i ] !== timer || timers . splice ( i -- , 1 ) ; timers . length || jQuery . fx . stop ( ) , fxNow = undefined } , jQuery . fx . timer = function ( timer ) { timer ( ) && jQuery . timers . push ( timer ) && jQuery . fx . start ( ) } , jQuery . fx . interval = 13 , jQuery . fx . start = function ( ) { timerId || ( timerId = setInterval ( jQuery . fx . tick , jQuery . fx . interval ) ) } , jQuery . fx . stop = function ( ) { clearInterval ( timerId ) , timerId = null } , jQuery . fx . speeds = { slow : 600 , fast : 200 , _default : 400 } , jQuery . fx . step = { } , jQuery . expr && jQuery . expr . filters && ( jQuery . expr . filters . animated = function ( elem ) { return jQuery . grep ( jQuery . timers , function ( fn ) { return elem === fn . elem } ) . length } ) , jQuery . fn . offset = function ( options ) { if ( arguments . length ) return options === undefined ? this : this . each ( function ( i ) { jQuery . offset . setOffset ( this , options , i ) } ) ; var docElem , win , box = { top : 0 , left : 0 } , elem = this [ 0 ] , doc = elem && elem . ownerDocument ; if ( doc ) return docElem = doc . documentElement , jQuery . contains ( docElem , elem ) ? ( typeof elem . getBoundingClientRect !== core _strundefined && ( box = elem . getBoundingClientRect ( ) ) , win = getWindow ( doc ) , { top : box . top + ( win . pageYOffset || docElem . scrollTop ) - ( docElem . clientTop || 0 ) , left : box . left + ( win . pageXOffset || docElem . scrollLeft ) - ( docElem . clientLeft || 0 ) } ) : box } , jQuery . offset = { setOffset : function ( elem , options , i ) { var position = jQuery . css ( elem , "position" ) ; "static" === position && ( elem . style . position = "relative" ) ; var curElem = jQuery ( elem ) , curOffset = curElem . offset ( ) , curCSSTop = jQuery . css ( elem , "top" ) , curCSSLeft = jQuery . css ( elem , "left" ) , calculatePosition = ( "absolute" === position || "fixed" === position ) && jQuery . inArray ( "auto" , [ curCSSTop , curCSSLeft ] ) > - 1 , props = { } , curPosition = { } , curTop , curLeft ; calculatePosition ? ( curPosition = curElem . position ( ) , curTop = curPosition . top , curLeft = curPosition . left ) : ( curTop = parseFloat ( curCSSTop ) || 0 , curLeft = parseFloat ( curCSSLeft ) || 0 ) , jQuery . isFunction ( options ) && ( options = options . call ( elem , i , curOffset ) ) , null != options . top && ( props . top = options . top - curOffset . top + curTop ) , null != options . left && ( props . left = options . left - curOffset . left + curLeft ) , "using" in options ? options . using . call ( elem , pr
this . populate ( this . options . items ) } , _addElement : function ( i , item ) { var o = this . options , w = BI . FlexHorizontalLayout . superclass . _addElement . apply ( this , arguments ) ; return w . element . css ( { position : "relative" , "flex-shrink" : "0" } ) , o . columnSize [ i ] > 0 && w . element . width ( o . columnSize [ i ] ) , "fill" === o . columnSize [ i ] && w . element . css ( "flex" , "1" ) , o . vgap + o . tgap + ( item . tgap || 0 ) + ( item . vgap || 0 ) !== 0 && w . element . css ( { "margin-top" : o . vgap + 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" : ( 0 === i ? o . hgap : 0 ) + o . lgap + ( item . lgap || 0 ) + ( item . hgap || 0 ) + "px" } ) , o . hgap + o . rgap + ( item . rgap || 0 ) + ( item . hgap || 0 ) !== 0 && w . element . css ( { "margin-right" : o . hgap + o . rgap + ( item . rgap || 0 ) + ( item . hgap || 0 ) + "px" } ) , o . vgap + o . bgap + ( item . bgap || 0 ) + ( item . vgap || 0 ) !== 0 && w . element . css ( { "margin-bottom" : o . vgap + o . bgap + ( item . bgap || 0 ) + ( item . vgap || 0 ) + "px" } ) , w } , resize : function ( ) { } , populate : function ( items ) { BI . FlexHorizontalLayout . superclass . populate . apply ( this , arguments ) , this . _mount ( ) } } ) , BI . shortcut ( "bi.flex_horizontal" , BI . FlexHorizontalLayout ) , BI . FlexVerticalCenter = BI . inherit ( BI . Layout , { props : function ( ) { return BI . extend ( BI . FlexVerticalCenter . superclass . props . apply ( this , arguments ) , { baseCls : "bi-flex-vertical-center-adapt-layout" , horizontalAlign : BI . HorizontalAlign . Left , columnSize : [ ] , scrollx : ! 1 , hgap : 0 , vgap : 0 , lgap : 0 , rgap : 0 , tgap : 0 , bgap : 0 } ) } , render : function ( ) { var self = this , o = this . options ; return { type : "bi.flex_horizontal" , ref : function ( _ref ) { self . wrapper = _ref } , verticalAlign : BI . VerticalAlign . Middle , horizontalAlign : o . horizontalAlign , columnSize : o . columnSize , scrollx : o . scrollx , scrolly : o . scrolly , scrollable : o . scrollable , vgap : o . vgap , lgap : o . lgap , rgap : o . rgap , hgap : o . hgap , items : o . items } } , resize : function ( ) { } , update : function ( opt ) { return this . wrapper . update ( opt ) } , populate : function ( items ) { this . wrapper . populate ( items ) } } ) , BI . shortcut ( "bi.flex_vertical_adapt" , BI . FlexVerticalCenter ) , BI . shortcut ( "bi.flex_vertical_center_adapt" , BI . FlexVerticalCenter ) , BI . FlexVerticalLayout = BI . inherit ( BI . Layout , { props : function ( ) { return BI . extend ( BI . FlexVerticalLayout . superclass . props . apply ( this , arguments ) , { baseCls : "bi-flex-vertical-layout" , horizontalAlign : BI . HorizontalAlign . Left , verticalAlign : BI . VerticalAlign . Top , rowSize : [ ] , scrolly : ! 0 , hgap : 0 , vgap : 0 , lgap : 0 , rgap : 0 , tgap : 0 , bgap : 0 } ) } , render : function ( ) { BI . FlexVerticalLayout . superclass . render . apply ( this , arguments ) ; var o = this . options ; this . element . addClass ( "h-" + o . horizontalAlign ) . addClass ( "v-" + o . verticalAlign ) , this . populate ( this . options . items ) } , _addElement : function ( i , item ) { var w = BI . FlexVerticalLayout . superclass . _addElement . apply ( this , arguments ) , o = this . options ; 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 } , resize : function ( ) { } , populate : function ( items ) { BI . FlexVerticalLayout . superclass . populate . apply ( this , arguments ) , this . _mount ( ) } } ) , BI . shortcut ( "bi.flex_vertical" , BI . FlexVerticalLayout ) , BI . FlexWrapperCenterLayout = BI . inherit ( BI . Layout , { props : function ( ) { return BI . extend ( BI . FlexWrapperCenterLayout . superclass . props . apply ( this , arguments ) , { baseCls : "bi-flex-scrollable-center-adapt-layout clearfix" , scrollable : ! 0 } ) } , render : function ( ) { BI . FlexWrapperCenterLayout . superclass . render . apply ( this , arguments ) , this . $wrapper = BI . Widget . _renderEngine . createElement ( "<div>" ) . addClass ( "flex-scrollable-center-adapt-layout-wrapper" ) , this . populate ( this . options . items ) } , _addElement : function ( i , item ) { var o = this . options , w = BI . FlexWrapperCenterLayout . superclass . _addElement . apply ( this , arguments ) ; return w . element . css ( { position : "relative" , "margin-left" : ( 0 === i ? o . hga
BI . InlineLayout = BI . inherit ( BI . Layout , { props : function ( ) { return BI . extend ( BI . InlineLayout . superclass . props . apply ( this , arguments ) , { baseCls : "bi-inline-layout" , hgap : 0 , vgap : 0 , lgap : 0 , rgap : 0 , tgap : 0 , bgap : 0 } ) } , render : function ( ) { BI . InlineLayout . superclass . render . apply ( this , arguments ) , this . populate ( this . options . items ) } , _addElement : function ( i , item ) { var o = this . options , w = BI . InlineLayout . superclass . _addElement . apply ( this , arguments ) ; return w . element . css ( { position : "relative" , display : "inline-block" , "*display" : "inline" , "*zoom" : 1 } ) , o . vgap + o . tgap + ( item . tgap || 0 ) + ( item . vgap || 0 ) !== 0 && w . element . css ( { "margin-top" : o . vgap + 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" : ( 0 === i ? o . hgap : 0 ) + o . lgap + ( item . lgap || 0 ) + ( item . hgap || 0 ) + "px" } ) , o . hgap + o . rgap + ( item . rgap || 0 ) + ( item . hgap || 0 ) !== 0 && w . element . css ( { "margin-right" : o . hgap + o . rgap + ( item . rgap || 0 ) + ( item . hgap || 0 ) + "px" } ) , o . vgap + o . bgap + ( item . bgap || 0 ) + ( item . vgap || 0 ) !== 0 && w . element . css ( { "margin-bottom" : o . vgap + o . bgap + ( item . bgap || 0 ) + ( item . vgap || 0 ) + "px" } ) , w } , resize : function ( ) { this . stroke ( this . options . items ) } , populate : function ( items ) { BI . InlineLayout . superclass . populate . apply ( this , arguments ) , this . _mount ( ) } } ) , BI . shortcut ( "bi.inline" , BI . InlineLayout ) , BI . LatticeLayout = BI . inherit ( BI . Layout , { props : function ( ) { return BI . extend ( BI . LatticeLayout . superclass . props . apply ( this , arguments ) , { baseCls : "bi-lattice-layout clearfix" } ) } , render : function ( ) { BI . LatticeLayout . superclass . render . apply ( this , arguments ) , this . populate ( this . options . items ) } , _addElement : function ( i , item ) { var o = this . options , w = BI . LatticeLayout . superclass . _addElement . apply ( this , arguments ) ; if ( o . columnSize && o . columnSize [ i ] ) var width = o . columnSize [ i ] / BI . sum ( o . columnSize ) * 100 + "%" ; else var width = 1 / this . options . items . length * 100 + "%" ; return w . element . css ( { position : "relative" , "float" : "left" , width : width } ) , w } , addItem : function ( item ) { var w = BI . LatticeLayout . superclass . addItem . apply ( this , arguments ) ; return this . resize ( ) , w } , addItemAt : function ( item ) { var w = BI . LatticeLayout . superclass . addItemAt . apply ( this , arguments ) ; return this . resize ( ) , w } , resize : function ( ) { this . stroke ( this . options . items ) } , populate : function ( items ) { BI . LatticeLayout . superclass . populate . apply ( this , arguments ) , this . _mount ( ) } } ) , BI . shortcut ( "bi.lattice" , BI . LatticeLayout ) , BI . TableLayout = BI . inherit ( BI . Layout , { props : function ( ) { return BI . extend ( BI . TableLayout . superclass . props . apply ( this , arguments ) , { baseCls : "bi-table-layout" , scrolly : ! 0 , columnSize : [ 200 , 200 , "fill" ] , rowSize : 30 , hgap : 0 , vgap : 0 , items : [ [ { el : { text : "label1" } } , { el : { text : "label2" } } , { el : { text : "label3" } } ] ] } ) } , render : function ( ) { BI . TableLayout . superclass . render . apply ( this , arguments ) , 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 ) } var o = this . options , abs = [ ] , left = 0 , right = 0 , i , j ; for ( i = 0 ; i < arr . length && BI . isNumber ( o . columnSize [ i ] ) ; i ++ ) first ( arr [ i ] , this . rows , i ) , abs . push ( BI . extend ( { top : 0 , bottom : 0 , left : o . columnSize [ i ] <= 1 ? 100 * left + "%" : left , width : o . columnSize [ i ] <= 1 ? 100 * o . columnSize [ i ] + "%" : o . columnSize [ i ] } , arr [ i ] ) ) , left += o . columnSize [ i ] + ( o . columnSize [ i ] < 1 ? 0 : o . hgap ) ; for ( j = arr . length - 1 ; j > i ; j -- ) { if ( ! BI . isNumber ( o . columnSize [ j ] ) ) throw new Error ( "item with fill can only be one" ) ; first ( arr [ j ] , this . rows , j ) , abs . push ( BI . extend ( { top : 0 , bottom : 0 , right : o . columnSize [ j ] <= 1 ? 100 * right + "%" : right , width : o . columnSize [ j ] <= 1 ? 100 * o . columnSize [ j ] + "%" : o . columnSize [ j ] } , arr [ j ] ) ) , right += o . columnSize [ j ] + ( o . columnSize [ j ] < 1 ? 0 : o . hgap ) } i >= 0 && i < arr .
listener . cb ( ) } ) , _$1 . each ( asyncListeners , function ( listener ) { listener . cb ( ) } ) } ) } function refreshAllDefineModel ( ) { _$1 . each ( allDefineModelInstances , function ( insta ) { insta && insta . $digest && insta . $digest ( ) } ) } function getAllModelInstances ( ) { return allModelInstances } function refreshAll ( ) { _$1 . each ( getAllModelInstances ( ) , function ( insta ) { insta && insta . $digest && insta . $digest ( ) } ) } function define ( model ) { var OB = inherit ( Model , { state : function state ( ) { return model } } ) , ob = new OB ; return ob . _constructor ( { define : ! 0 } ) , allDefineModelInstances [ ob . getModelID ( ) ] = ob , ob . model } _$1 = "default" in _$1 ? _$1 [ "default" ] : _$1 ; var falsy = void 0 , $$skipArray = { $accessors : falsy , $vbthis : falsy , $vbsetter : falsy , $vm : falsy } , $$skips = [ "$accessors" , "$vbthis" , "$vbsetter" , "$vm" ] , originalMethods = [ ] ; _$1 . each ( [ "slice" , "splice" ] , function ( method ) { originalMethods [ method ] = Array . prototype [ method ] } ) , Array . prototype . splice = function ( ) { this . _ _ref _ _ = makeHashCode ( ) ; for ( var _len = arguments . length , args = Array ( _len ) , _key = 0 ; _key < _len ; _key ++ ) args [ _key ] = arguments [ _key ] ; return originalMethods . splice . apply ( this , args ) } ; var rhashcode = /\d\.\d{4}/ , isIE9Below = isIE ( ) && getIEVersion ( ) < 9 , _toString = Object . prototype . toString , bailRE = /[^\w.$]/ , nextTick = function ( ) { function nextTickHandler ( ) { pending = ! 1 ; var copies = callbacks . slice ( 0 ) ; callbacks . length = 0 ; for ( var i = 0 ; i < copies . length ; i ++ ) copies [ i ] ( ) } var callbacks = [ ] , pending = ! 1 , timerFunc = void 0 ; if ( "undefined" != typeof setImmediate && isNative ( setImmediate ) ) timerFunc = function timerFunc ( ) { setImmediate ( nextTickHandler ) } ; else if ( "undefined" == typeof MessageChannel || ! isNative ( MessageChannel ) && "[object MessageChannelConstructor]" !== MessageChannel . toString ( ) ) if ( "undefined" != typeof Promise && isNative ( Promise ) ) { var p = Promise . resolve ( ) ; timerFunc = function timerFunc ( ) { p . then ( nextTickHandler ) } } else timerFunc = function timerFunc ( ) { setTimeout ( nextTickHandler , 0 ) } ; else { var channel = new MessageChannel , port = channel . port2 ; channel . port1 . onmessage = nextTickHandler , timerFunc = function timerFunc ( ) { port . postMessage ( 1 ) } } return function queueNextTick ( cb , ctx ) { var _resolve = void 0 ; if ( callbacks . push ( function ( ) { if ( cb ) try { cb . call ( ctx ) } catch ( e ) { console . error ( e ) } else _resolve && _resolve ( ctx ) } ) , pending || ( pending = ! 0 , timerFunc ( ) ) , ! cb && "undefined" != typeof Promise ) return new Promise ( function ( resolve , reject ) { _resolve = resolve } ) } } ( ) , SymbolProto = "undefined" != typeof Symbol ? Symbol . prototype : null , ObjProto = Object . prototype , toString = ObjProto . toString , deepEq = function deepEq ( a , b , aStack , bStack ) { a instanceof _$1 && ( a = a . _wrapped ) , b instanceof _$1 && ( b = b . _wrapped ) ; var className = toString . call ( a ) ; if ( className !== toString . call ( b ) ) return ! 1 ; switch ( className ) { case "[object RegExp]" : case "[object String]" : return "" + a == "" + b ; case "[object Number]" : return + a !== + a ? + b !== + b : 0 === + a ? 1 / + a === 1 / b : + a === + b ; case "[object Date]" : case "[object Boolean]" : return + a === + b ; case "[object Symbol]" : return SymbolProto . valueOf . call ( a ) === SymbolProto . valueOf . call ( b ) } var areArrays = "[object Array]" === className ; if ( ! areArrays ) { if ( "object" != typeof a || "object" != typeof b ) return ! 1 ; var aCtor = a . constructor , bCtor = b . constructor ; if ( aCtor !== bCtor && ! ( _$1 . isFunction ( aCtor ) && aCtor instanceof aCtor && _$1 . isFunction ( bCtor ) && bCtor instanceof bCtor ) && "constructor" in a && "constructor" in b ) return ! 1 } aStack = aStack || [ ] , bStack = bStack || [ ] ; for ( var length = aStack . length ; length -- ; ) if ( aStack [ length ] === a ) return bStack [ length ] === b ; if ( aStack . push ( a ) , bStack . push ( b ) , areArrays ) { if ( length = a . length , length !== b . length ) return ! 1 ; for ( ; length -- ; ) if ( ! eq ( a [ length ] , b [ length ] , aStack , bStack ) ) return ! 1 } else { var keys = _$1 . keys ( a ) , key = void 0 ; if ( length = keys . length , _$1 . keys ( b ) . length !== length ) return ! 1 ; for ( ; length -- ; ) { if ( key = keys [ length ] , $$skips . indexOf ( key ) !== - 1 ) return ! 0 ; if ( Object . keys ( b ) . indexOf ( key ) === - 1 || ! eq ( a [ key ] , b [ key ] , aStack , bStack ) ) return ! 1 } } return aStack . pop ( ) , bStack . pop ( ) , ! 0 } , eq = function eq ( a , b , aStack , bStack ) { if ( a === b ) return 0 !== a || 1 / a === 1 / b ; if ( null == a || null == b ) return ! 1 ; if ( a !== a ) return b !== b ; var type = typeof a ; return ( "function" === type || "object" === type || "object" == typeof b ) && ( "function" === type || deepEq ( a , b , aStack , bStack ) ) } , mixinInjection = { } , falsy$1 = void 0 , operators = { "||" : falsy$1 , "&&" : falsy$1 , "(" : falsy$1 , ")" : falsy$1 } , allModelInstances = { } , all
baseCls : "bi-button-tree" } ) } , _init : function ( ) { BI . ButtonTree . superclass . _init . apply ( this , arguments ) } , setNotSelectedValue : function ( v ) { v = BI . isArray ( v ) ? v : [ v ] , BI . each ( this . buttons , function ( i , item ) { return BI . isFunction ( item . setSelected ) ? void ( BI . deepContains ( v , item . getValue ( ) ) ? item . setSelected ( ! 1 ) : item . setSelected ( ! 0 ) ) : void item . setNotSelectedValue ( v ) } ) } , setEnabledValue : function ( v ) { v = BI . isArray ( v ) ? v : [ v ] , BI . each ( this . buttons , function ( i , item ) { return BI . isFunction ( item . setEnabledValue ) ? void item . setEnabledValue ( v ) : void ( BI . deepContains ( v , item . getValue ( ) ) ? item . setEnable ( ! 0 ) : item . setEnable ( ! 1 ) ) } ) } , setValue : function ( v ) { v = BI . isArray ( v ) ? v : [ v ] , BI . each ( this . buttons , function ( i , item ) { return BI . isFunction ( item . setSelected ) ? void ( BI . deepContains ( v , item . getValue ( ) ) ? item . setSelected ( ! 0 ) : item . setSelected ( ! 1 ) ) : void item . setValue ( v ) } ) } , getNotSelectedValue : function ( ) { var v = [ ] ; return BI . each ( this . buttons , function ( i , item ) { return item . isEnabled ( ) && ! BI . isFunction ( item . setSelected ) ? void ( v = BI . concat ( v , item . getNotSelectedValue ( ) ) ) : void ( item . isEnabled ( ) && item . isSelected && ! item . isSelected ( ) && v . push ( item . getValue ( ) ) ) } ) , v } , getValue : function ( ) { var v = [ ] ; return BI . each ( this . buttons , function ( i , item ) { return item . isEnabled ( ) && ! BI . isFunction ( item . setSelected ) ? void ( v = BI . concat ( v , item . getValue ( ) ) ) : void ( item . isEnabled ( ) && item . isSelected && item . isSelected ( ) && v . push ( item . getValue ( ) ) ) } ) , v } , getSelectedButtons : function ( ) { var btns = [ ] ; return BI . each ( this . buttons , function ( i , item ) { return item . isEnabled ( ) && ! BI . isFunction ( item . setSelected ) ? void ( btns = btns . concat ( item . getSelectedButtons ( ) ) ) : void ( item . isSelected && item . isSelected ( ) && btns . push ( item ) ) } ) , btns } , getNotSelectedButtons : function ( ) { var btns = [ ] ; return BI . each ( this . buttons , function ( i , item ) { return item . isEnabled ( ) && ! BI . isFunction ( item . setSelected ) ? void ( btns = btns . concat ( item . getNotSelectedButtons ( ) ) ) : void ( item . isSelected && ! item . isSelected ( ) && btns . push ( item ) ) } ) , btns } , getAllLeaves : function ( ) { var leaves = [ ] ; return BI . each ( this . buttons , function ( i , item ) { return item . isEnabled ( ) && ! BI . isFunction ( item . setSelected ) ? void ( leaves = leaves . concat ( item . getAllLeaves ( ) ) ) : void ( item . isEnabled ( ) && leaves . push ( item ) ) } ) , leaves } , getIndexByValue : function ( value ) { var index = - 1 ; return BI . any ( this . buttons , function ( i , item ) { var vs = item . getValue ( ) ; if ( item . isEnabled ( ) && ( vs === value || BI . contains ( vs , value ) ) ) return index = i , ! 0 } ) , index } , getNodeById : function ( id ) { var node ; return BI . any ( this . buttons , function ( i , item ) { if ( item . isEnabled ( ) ) { if ( item . attr ( "id" ) === id ) return node = item , ! 0 ; if ( BI . isFunction ( item . getNodeById ) && ( node = item . getNodeById ( id ) ) ) return ! 0 } } ) , node } , getNodeByValue : function ( value ) { var node ; return BI . any ( this . buttons , function ( i , item ) { if ( item . isEnabled ( ) ) if ( BI . isFunction ( item . getNodeByValue ) ) { if ( node = item . getNodeByValue ( value ) ) return ! 0 } else if ( item . attr ( "value" ) === value ) return node = item , ! 0 } ) , node } } ) , BI . ButtonTree . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.button_tree" , BI . ButtonTree ) , BI . TreeView = BI . inherit ( BI . Pane , { _defaultConfig : function ( ) { return BI . extend ( BI . TreeView . superclass . _defaultConfig . apply ( this , arguments ) , { _baseCls : "bi-tree" , paras : { selectedValues : { } } , itemsCreator : BI . emptyFn } ) } , _init : function ( ) { BI . TreeView . superclass . _init . apply ( this , arguments ) ; var o = this . options ; this . _stop = ! 1 , this . _createTree ( ) , this . tip = BI . createWidget ( { type : "bi.loading_bar" , invisible : ! 0 , handler : BI . bind ( this . _loadMore , this ) } ) , BI . createWidget ( { type : "bi.vertical" , scrollable : ! 0 , scrolly : ! 1 , element : this , items : [ this . tip ] } ) , BI . isNotNull ( o . value ) && this . setSelectedValue ( o . value ) , BI . isIE9Below && BI . isIE9Below ( ) && this . element . addClass ( "hack" ) } , _createTree : function ( ) { this . id = "bi-tree" + BI . UUID ( ) , this . nodes && this . nodes . destroy ( ) , this . tree && this . tree . destroy ( ) , this . tree = BI . createWidget ( { type : "bi.layout" , element : "<ul id='" + this . id + "' class='ztree'></ul>" } ) , BI . createWidget ( { type : "bi.default" , element : this . element , items : [ this . tree ] } ) } , _selectTreeNode : function ( treeId , treeNode ) { this . fireEvent ( BI . Controller . EVENT _CHANGE , BI . Events . CLICK , treeNode , this ) , this . fireEvent ( BI . TreeView . EVENT _CHANGE , treeNode , this ) } , _configSetting : function ( ) { function onClick ( event , treeId , treeNode ) { var checked = treeNode . checked , status = treeNode
} , _getMaxScrollTop : function ( ) { return Math . max ( 0 , this . _height - this . options . height + ( this . options . overflowY ? BI . DOM . getScrollWidth ( ) : 0 ) ) } , _populate : function ( items ) { var o = this . options ; if ( this . _reRange ( ) , items && items !== this . options . items && ( this . options . items = items , this . _calculateSizeAndPositionData ( ) ) , o . items . length > 0 ) { this . container . setWidth ( this . _width ) , this . container . setHeight ( this . _height ) , this . _calculateChildrenToRender ( ) ; try { this . element . scrollTop ( o . scrollTop ) , this . element . scrollLeft ( o . scrollLeft ) } catch ( e ) { } } } , setScrollLeft : function ( scrollLeft ) { this . options . scrollLeft !== scrollLeft && ( this . _scrollLock = ! 0 , this . options . scrollLeft = BI . clamp ( scrollLeft || 0 , 0 , this . _getMaxScrollLeft ( ) ) , this . _debounceRelease ( ) , this . _calculateChildrenToRender ( ) , this . element . scrollLeft ( this . options . scrollLeft ) ) } , setScrollTop : function ( scrollTop ) { this . options . scrollTop !== scrollTop && ( this . _scrollLock = ! 0 , this . options . scrollTop = BI . clamp ( scrollTop || 0 , 0 , this . _getMaxScrollTop ( ) ) , this . _debounceRelease ( ) , this . _calculateChildrenToRender ( ) , this . element . scrollTop ( this . options . scrollTop ) ) } , setOverflowX : function ( b ) { var self = this ; this . options . overflowX !== ! ! b && ( this . options . overflowX = ! ! b , BI . nextTick ( function ( ) { self . element . css ( { overflowX : b ? "auto" : "hidden" } ) } ) ) } , setOverflowY : function ( b ) { var self = this ; this . options . overflowY !== ! ! b && ( this . options . overflowY = ! ! b , BI . nextTick ( function ( ) { self . element . css ( { overflowY : b ? "auto" : "hidden" } ) } ) ) } , getScrollLeft : function ( ) { return this . options . scrollLeft } , getScrollTop : function ( ) { return this . options . scrollTop } , getMaxScrollLeft : function ( ) { return this . _getMaxScrollLeft ( ) } , getMaxScrollTop : function ( ) { return this . _getMaxScrollTop ( ) } , _reRange : function ( ) { this . renderRange = { } } , _clearChildren : function ( ) { this . container . _children = { } , this . container . attr ( "items" , [ ] ) } , restore : function ( ) { BI . each ( this . renderedCells , function ( i , cell ) { cell . el . _destroy ( ) } ) , this . _clearChildren ( ) , this . renderedCells = [ ] , this . renderedKeys = [ ] , this . renderRange = { } , this . _scrollLock = ! 1 } , populate : function ( items ) { items && items !== this . options . items && this . restore ( ) , this . _populate ( items ) } } ) , BI . CollectionView . EVENT _SCROLL = "EVENT_SCROLL" , BI . shortcut ( "bi.collection_view" , BI . CollectionView ) , BI . Combo = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { var conf = BI . Combo . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { baseCls : ( conf . baseCls || "" ) + " bi-combo" , trigger : "click" , toggle : ! 0 , direction : "bottom" , logic : { dynamic : ! 0 } , container : null , isDefaultInit : ! 1 , destroyWhenHide : ! 1 , isNeedAdjustHeight : ! 0 , isNeedAdjustWidth : ! 0 , stopEvent : ! 1 , stopPropagation : ! 1 , adjustLength : 0 , adjustXOffset : 0 , adjustYOffset : 0 , hideChecker : BI . emptyFn , offsetStyle : "left" , el : { } , popup : { } , comboClass : "bi-combo-popup" , hoverClass : "bi-combo-hover" } ) } , _init : function ( ) { BI . Combo . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . _initCombo ( ) , this . _initPullDownAction ( ) , this . combo . on ( BI . Controller . EVENT _CHANGE , function ( type , value , obj ) { self . isEnabled ( ) && self . isValid ( ) && ( type === BI . Events . EXPAND && self . _popupView ( ) , type === BI . Events . COLLAPSE && self . _hideView ( ) , type === BI . Events . EXPAND && ( self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) , self . fireEvent ( BI . Combo . EVENT _EXPAND ) ) , type === BI . Events . COLLAPSE && ( self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) , self . isViewVisible ( ) && self . fireEvent ( BI . Combo . EVENT _COLLAPSE ) ) , type === BI . Events . CLICK && self . fireEvent ( BI . Combo . EVENT _TRIGGER _CHANGE , obj ) ) } ) , self . element . on ( "mouseenter." + self . getName ( ) , function ( e ) { self . isEnabled ( ) && self . isValid ( ) && self . combo . isEnabled ( ) && self . combo . isValid ( ) && self . element . addClass ( o . hoverClass ) } ) , self . element . on ( "mouseleave." + self . getName ( ) , function ( e ) { self . isEnabled ( ) && self . isValid ( ) && self . combo . isEnabled ( ) && self . combo . isValid ( ) && self . element . removeClass ( o . hoverClass ) } ) , BI . createWidget ( BI . extend ( { element : this } , BI . LogicFactory . createLogic ( "vertical" , BI . extend ( o . logic , { items : [ { el : this . combo } ] } ) ) ) ) , o . isDefaultInit && this . _assertPopupView ( ) , BI . Resizers . add ( this . getName ( ) , BI . bind ( function ( ) { this . isViewVisible ( ) && this . _hideView ( ) } , this ) ) } , _toggle : function ( ) { this . _assertPopupViewRender ( ) , this . popupView . isVisible ( ) ? this . _hideView ( ) : this . isEnabled ( ) && this .
this . cardMap = { } } , destroy : function ( ) { BI . Navigation . superclass . destroy . apply ( this , arguments ) } } ) , BI . Navigation . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.navigation" , BI . Navigation ) , BI . Searcher = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . Searcher . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-searcher" , lgap : 0 , rgap : 0 , tgap : 0 , bgap : 0 , vgap : 0 , hgap : 0 , isDefaultInit : ! 1 , isAutoSearch : ! 0 , isAutoSync : ! 0 , chooseType : BI . ButtonGroup . CHOOSE _TYPE _SINGLE , allowSearchBlank : ! 0 , onSearch : function ( op , callback ) { callback ( [ ] ) } , el : { type : "bi.search_editor" } , popup : { type : "bi.searcher_view" } , adapter : null , masker : { offset : { } } } ) } , _init : function ( ) { BI . Searcher . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . editor = BI . createWidget ( o . el , { type : "bi.search_editor" } ) , BI . createWidget ( { type : "bi.vertical" , element : this , lgap : o . lgap , rgap : o . rgap , tgap : o . tgap , bgap : o . bgap , vgap : o . vgap , hgap : o . hgap , items : [ this . editor ] } ) , o . isDefaultInit && this . _assertPopupView ( ) ; var search = BI . debounce ( BI . bind ( this . _search , this ) , BI . EVENT _RESPONSE _TIME , { leading : ! 0 , trailing : ! 1 } ) ; this . editor . on ( BI . Controller . EVENT _CHANGE , function ( type ) { switch ( type ) { case BI . Events . STARTEDIT : self . _startSearch ( ) ; break ; case BI . Events . EMPTY : self . _stopSearch ( ) ; break ; case BI . Events . CHANGE : search ( ) ; break ; case BI . Events . PAUSE : self . _pauseSearch ( ) } } ) } , _assertPopupView : function ( ) { var self = this , o = this . options ; ( o . masker && ! BI . Maskers . has ( this . getName ( ) ) || o . masker === ! 1 && ! this . popupView ) && ( this . popupView = BI . createWidget ( o . popup , { type : "bi.searcher_view" , chooseType : o . chooseType } ) , this . popupView . on ( BI . Controller . EVENT _CHANGE , function ( type , value , obj ) { if ( self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) , type === BI . Events . CLICK ) { if ( o . isAutoSync ) { var values = o . adapter && o . adapter . getValue ( ) ; if ( obj . isSelected ( ) ) switch ( o . chooseType ) { case BI . ButtonGroup . CHOOSE _TYPE _SINGLE : o . adapter && o . adapter . setValue ( [ obj . getValue ( ) ] ) ; break ; case BI . ButtonGroup . CHOOSE _TYPE _MULTI : values . push ( obj . getValue ( ) ) , o . adapter && o . adapter . setValue ( values ) } else o . adapter && o . adapter . setValue ( BI . deepWithout ( values , obj . getValue ( ) ) ) } self . fireEvent ( BI . Searcher . EVENT _CHANGE , value , obj ) } } ) , BI . nextTick ( function ( ) { self . fireEvent ( BI . Searcher . EVENT _AFTER _INIT ) } ) ) , o . masker && ! BI . Maskers . has ( this . getName ( ) ) && BI . Maskers . create ( this . getName ( ) , o . adapter , BI . extend ( { container : this , render : this . popupView } , o . masker ) , this ) } , _startSearch : function ( ) { this . _assertPopupView ( ) , this . _stop = ! 1 , this . _isSearching = ! 0 , this . fireEvent ( BI . Searcher . EVENT _START ) , this . popupView . startSearch && this . popupView . startSearch ( ) , BI . nextTick ( function ( name ) { BI . Maskers . show ( name ) } , this . getName ( ) ) } , _pauseSearch : function ( ) { var o = this . options , name = this . getName ( ) ; this . _stop = ! 0 , BI . nextTick ( function ( name ) { BI . Maskers . hide ( name ) } , this . getName ( ) ) , this . _isSearching === ! 0 && ( this . popupView && this . popupView . pauseSearch && this . popupView . pauseSearch ( ) , this . fireEvent ( BI . Searcher . EVENT _PAUSE ) ) , this . _isSearching = ! 1 } , _stopSearch : function ( ) { var o = this . options , name = this . getName ( ) ; this . _stop = ! 0 , BI . Maskers . hide ( name ) , this . _isSearching === ! 0 && ( this . popupView && this . popupView . stopSearch && this . popupView . stopSearch ( ) , this . fireEvent ( BI . Searcher . EVENT _STOP ) ) , this . _isSearching = ! 1 } , _search : function ( ) { var self = this , o = this . options , keyword = o . allowSearchBlank ? this . editor . getValue ( ) : this . _getLastSearchKeyword ( ) ; if ( "" !== keyword && ! this . _stop ) { if ( o . isAutoSearch ) { var items = o . adapter && ( o . adapter . getItems && o . adapter . getItems ( ) || o . adapter . attr ( "items" ) ) || [ ] , finding = BI . Func . getSearchResult ( items , keyword ) , match = finding . match , find = finding . find ; return this . popupView . populate ( find , match , keyword ) , o . isAutoSync && o . adapter && o . adapter . getValue && this . popupView . setValue ( o . adapter . getValue ( ) ) , void self . fireEvent ( BI . Searcher . EVENT _SEARCHING ) } this . popupView . loading && this . popupView . loading ( ) , o . onSearch ( { times : 1 , keyword : keyword , selectedValues : o . adapter && o . adapter . getValue ( ) } , function ( searchResult , matchResult ) { if ( ! self . _stop ) { var args = [ ] . slice . call ( arguments ) ; args . length > 0 && args . push ( keyword ) , BI . Maskers . show ( self . getName ( ) ) , self . popupView . populate . apply ( self . popupView , args ) , o . isAutoSync && o . adapter && o . adapter . getValue && self . popupView . s
} ) } , destroyed : function ( ) { } } ) , BI . shortcut ( "bi.popover" , BI . Popover ) , BI . BarPopover = BI . inherit ( BI . Popover , { _defaultConfig : function ( ) { return BI . extend ( BI . BarPopover . superclass . _defaultConfig . apply ( this , arguments ) , { btns : [ BI . i18nText ( "BI-Basic_Sure" ) , BI . i18nText ( "BI-Basic_Cancel" ) ] } ) } , beforeCreate : function ( ) { var self = this , o = this . options ; o . footer || ( o . footer = { type : "bi.right_vertical_adapt" , lgap : 10 , items : [ { type : "bi.button" , text : this . options . btns [ 1 ] , value : 1 , level : "ignore" , handler : function ( v ) { self . fireEvent ( BI . Popover . EVENT _CANCEL , v ) , self . close ( v ) } } , { type : "bi.button" , text : this . options . btns [ 0 ] , warningTitle : o . warningTitle , value : 0 , handler : function ( v ) { self . fireEvent ( BI . Popover . EVENT _CONFIRM , v ) , self . close ( v ) } } ] } ) } } ) , BI . shortcut ( "bi.bar_popover" , BI . BarPopover ) , BI . Popover . EVENT _CLOSE = "EVENT_CLOSE" , BI . Popover . EVENT _OPEN = "EVENT_OPEN" , BI . Popover . EVENT _CANCEL = "EVENT_CANCEL" , BI . Popover . EVENT _CONFIRM = "EVENT_CONFIRM" , BI . PopupView = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . PopupView . superclass . _defaultConfig . apply ( this , arguments ) , { _baseCls : "bi-popup-view" , maxWidth : "auto" , minWidth : 100 , minHeight : 24 , lgap : 0 , rgap : 0 , tgap : 0 , bgap : 0 , vgap : 0 , hgap : 0 , innerVGap : 0 , direction : BI . Direction . Top , stopEvent : ! 1 , stopPropagation : ! 1 , logic : { dynamic : ! 0 } , tool : ! 1 , tabs : [ ] , buttons : [ ] , el : { type : "bi.button_group" , items : [ ] , chooseType : 0 , behaviors : { } , layouts : [ { type : "bi.vertical" } ] } } ) } , _init : function ( ) { BI . PopupView . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options , fn = function ( e ) { e . stopPropagation ( ) } , stop = function ( e ) { return e . stopEvent ( ) , ! 1 } ; this . element . css ( { "z-index" : BI . zIndex _popup , "min-width" : o . minWidth + "px" , "max-width" : o . maxWidth + "px" } ) . bind ( { click : fn } ) , this . element . bind ( "mousewheel" , fn ) , o . stopPropagation && this . element . bind ( { mousedown : fn , mouseup : fn , mouseover : fn } ) , o . stopEvent && this . element . bind ( { mousedown : stop , mouseup : stop , mouseover : stop } ) , this . tool = this . _createTool ( ) , this . tab = this . _createTab ( ) , this . view = this . _createView ( ) , this . toolbar = this . _createToolBar ( ) , this . view . on ( BI . Controller . EVENT _CHANGE , function ( type ) { self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) , type === BI . Events . CLICK && self . fireEvent ( BI . PopupView . EVENT _CHANGE ) } ) , BI . createWidget ( BI . extend ( { element : this } , BI . LogicFactory . createLogic ( BI . LogicFactory . createLogicTypeByDirection ( o . direction ) , BI . extend ( { } , o . logic , { scrolly : ! 1 , lgap : o . lgap , rgap : o . rgap , tgap : o . tgap , bgap : o . bgap , vgap : o . vgap , hgap : o . hgap , items : BI . LogicFactory . createLogicItemsByDirection ( o . direction , BI . extend ( { cls : "list-view-outer bi-card list-view-shadow" } , BI . LogicFactory . createLogic ( BI . LogicFactory . createLogicTypeByDirection ( o . direction ) , BI . extend ( { } , o . logic , { items : BI . LogicFactory . createLogicItemsByDirection ( o . direction , this . tool , this . tab , this . view , this . toolbar ) } ) ) ) ) } ) ) ) ) } , _createView : function ( ) { var o = this . options ; return this . button _group = BI . createWidget ( o . el , { type : "bi.button_group" , value : o . value } ) , this . button _group . element . css ( { "min-height" : o . minHeight + "px" , "padding-top" : o . innerVGap + "px" , "padding-bottom" : o . innerVGap + "px" } ) , this . button _group } , _createTool : function ( ) { var o = this . options ; if ( ! 1 !== o . tool ) return BI . createWidget ( o . tool ) } , _createTab : function ( ) { var o = this . options ; if ( 0 !== o . tabs . length ) return BI . createWidget ( { type : "bi.center" , cls : "list-view-tab" , height : 25 , items : o . tabs , value : o . value } ) } , _createToolBar : function ( ) { var o = this . options ; if ( 0 !== o . buttons . length ) return BI . createWidget ( { type : "bi.center" , cls : "list-view-toolbar bi-high-light bi-split-top" , height : 24 , items : BI . createItems ( o . buttons , { once : ! 1 , shadow : ! 0 , isShadowShowingOnSelected : ! 0 } ) } ) } , getView : function ( ) { return this . view } , populate : function ( items ) { this . view . populate . apply ( this . view , arguments ) } , resetWidth : function ( w ) { this . options . width = w , this . element . width ( w ) } , resetHeight : function ( h ) { var tbHeight = this . toolbar ? this . toolbar . attr ( "height" ) || 24 : 0 , tabHeight = this . tab ? this . tab . attr ( "height" ) || 24 : 0 , toolHeight = ( this . tool && this . tool . attr ( "height" ) || 24 ) * ( this . tool && this . tool . isVisible ( ) ? 1 : 0 ) , resetHeight = h - tbHeight - tabHeight - toolHeight - 2 * this . options . innerVGap ; this . view . resetHeight ? this . view . resetHeight ( resetHeight ) : this . view . element . css ( { "max-height" : resetHeight + "px" } ) } , setValue :
baseCls : ( conf . baseCls || "" ) + " bi-icon-text-icon-item" , logic : { dynamic : ! 1 } , iconCls1 : "close-ha-font" , iconCls2 : "close-ha-font" , iconHeight : null , iconWidth : null , textHgap : 0 , textVgap : 0 , textLgap : 0 , textRgap : 0 } ) } , _init : function ( ) { BI . IconTextIconItem . superclass . _init . apply ( this , arguments ) ; var o = this . options , c = this . _const ; this . text = BI . createWidget ( { type : "bi.label" , textAlign : "left" , hgap : o . textHgap , vgap : o . textVgap , lgap : o . textLgap , rgap : o . textRgap , text : o . text , value : o . value , keyword : o . keyword , height : o . height } ) ; var icon1 = BI . createWidget ( { type : "bi.icon_label" , cls : o . iconCls1 , width : o . leftIconWrapperWidth , height : o . height , iconWidth : o . iconWidth , iconHeight : o . iconHeight } ) , blank = BI . createWidget ( { type : "bi.layout" , width : o . height } ) ; BI . createWidget ( { type : "bi.absolute" , element : this , items : [ { el : { type : "bi.icon_label" , cls : o . iconCls2 , width : o . rightIconWrapperWidth , height : o . height , iconWidth : o . iconWidth , iconHeight : o . iconHeight } , top : 0 , bottom : 0 , right : 0 } ] } ) , BI . createWidget ( BI . extend ( { element : this } , BI . LogicFactory . createLogic ( "horizontal" , BI . extend ( o . logic , { items : BI . LogicFactory . createLogicItemsByDirection ( "left" , icon1 , this . text , blank ) } ) ) ) ) } , doClick : function ( ) { BI . IconTextIconItem . superclass . doClick . apply ( this , arguments ) , this . isValid ( ) && this . fireEvent ( BI . IconTextIconItem . EVENT _CHANGE , this . getValue ( ) , this ) } , doRedMark : function ( ) { this . text . doRedMark . apply ( this . text , arguments ) } , unRedMark : function ( ) { this . text . unRedMark . apply ( this . text , arguments ) } , doHighLight : function ( ) { this . text . doHighLight . apply ( this . text , arguments ) } , unHighLight : function ( ) { this . text . unHighLight . apply ( this . text , arguments ) } , setValue : function ( ) { this . isReadOnly ( ) || this . text . setValue . apply ( this . text , arguments ) } , getValue : function ( ) { return this . text . getValue ( ) } , setText : function ( ) { this . text . setText . apply ( this . text , arguments ) } , getText : function ( ) { return this . text . getText ( ) } } ) , BI . IconTextIconItem . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.icon_text_icon_item" , BI . IconTextIconItem ) , BI . IconTextItem = BI . inherit ( BI . BasicButton , { _defaultConfig : function ( ) { var conf = BI . IconTextItem . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { baseCls : ( conf . baseCls || "" ) + " bi-icon-text-item" , direction : BI . Direction . Left , logic : { dynamic : ! 1 } , iconWrapperWidth : null , iconHeight : null , iconWidth : null , textHgap : 0 , textVgap : 0 , textLgap : 0 , textRgap : 0 } ) } , _init : function ( ) { BI . IconTextItem . 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 . iconWrapperWidth || o . height , height : o . height , iconWidth : o . iconWidth , iconHeight : o . iconHeight } ) , 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 . icon , this . text ) } ) ) ) ) } , 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 ( ) } , doClick : function ( ) { BI . IconTextItem . superclass . doClick . apply ( this , arguments ) , this . isValid ( ) && this . fireEvent ( BI . IconTextItem . EVENT _CHANGE , this . getValue ( ) , this ) } , doRedMark : function ( ) { this . text . doRedMark . apply ( this . text , arguments ) } , unRedMark : function ( ) { this . text . unRedMark . apply ( this . text , arguments ) } , doHighLight : function ( ) { this . text . doHighLight . apply ( this . text , arguments ) } , unHighLight : function ( ) { this . text . unHighLight . apply ( this . text , arguments ) } } ) , BI . IconTextItem . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.icon_text_item" , BI . IconTextItem ) , BI . TextIconItem = BI . inherit ( BI . BasicButton , { _defaultConfig : function ( ) { var conf = BI . TextIconItem . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { baseCls : ( conf . baseCls || "" ) + " bi-text-icon-item" , logic : { dynamic : ! 1 } , cls : "close-ha-font" , iconHeight : null , iconWidth : null , textHgap : 0 , textVgap : 0 , textLgap : 0 , textRgap : 0 } ) } , _init : func
for ( var xhr = new XMLHttpRequest , upload = xhr . upload || { addEventListener : function ( event , callback ) { this [ "on" + event ] = callback } } , i = 0 ; i < length ; i ++ ) upload . addEventListener ( split [ i ] . substring ( 2 ) , function ( event ) { return function ( rpe ) { isFunction ( handler [ event ] ) && handler [ event ] ( rpe , xhr ) } } ( split [ i ] ) , ! 1 ) ; if ( upload . addEventListener ( "load" , function ( rpe ) { handler . onreadystatechange === ! 1 ? isFunction ( handler . onload ) && handler . onload ( rpe , xhr ) : setTimeout ( function ( ) { 4 === xhr . readyState ? isFunction ( handler . onload ) && handler . onload ( rpe , xhr ) : setTimeout ( arguments . callee , 15 ) } , 15 ) } , ! 1 ) , xhr . open ( "post" , handler . url + "&filename=" + _global . encodeURIComponent ( handler . file . fileName ) , ! 0 ) , xhr . upload ) xhr . onreadystatechange = function ( ) { switch ( xhr . readyState ) { case 4 : var attachO = BI . jsonDecode ( xhr . responseText ) ; handler . file . type . indexOf ( "image" ) != - 1 && ( attachO . attach _type = "image" ) , attachO . filename = handler . file . fileName , 1 == handler . maxlength ? handler . attach _array [ 0 ] = attachO : handler . attach _array . push ( attachO ) } } , isFunction ( upload . onloadstart ) && upload . onloadstart ( ) ; else { var rpe = { loaded : 0 , total : handler . file . fileSize || handler . file . size , simulation : ! 0 } ; rpe . interval = setInterval ( function ( ) { rpe . loaded += 256 , rpe . total <= rpe . loaded && ( rpe . loaded = rpe . total ) , upload . onprogress ( rpe ) } , 100 ) , xhr . onabort = function ( ) { upload . onabort ( { } ) } , xhr . onerror = function ( ) { upload . onerror ( { } ) } , xhr . onreadystatechange = function ( ) { switch ( xhr . readyState ) { case 2 : case 3 : rpe . total <= rpe . loaded && ( rpe . loaded = rpe . total ) , upload . onprogress ( rpe ) ; break ; case 4 : if ( clearInterval ( rpe . interval ) , rpe . interval = 0 , rpe . loaded = rpe . total , upload . onprogress ( rpe ) , 199 < xhr . status && xhr . status < 400 ) { upload . onload ( { } ) ; var attachO = BI . jsonDecode ( xhr . responseText ) ; attachO . filename = handler . file . fileName , handler . file . type . indexOf ( "image" ) != - 1 && ( attachO . attach _type = "image" ) , handler . attach _array . push ( attachO ) } else upload . onerror ( { } ) } } , upload . onloadstart ( rpe ) } var boundary = "AjaxUploadBoundary" + ( new Date ) . getTime ( ) ; if ( xhr . setRequestHeader ( "Content-Type" , "multipart/form-data; boundary=" + boundary ) , handler . file . getAsBinary ) xhr [ xhr . sendAsBinary ? "sendAsBinary" : "send" ] ( multipart ( boundary , handler . name , handler . file ) ) ; else { xhr . setRequestHeader ( "Content-Type" , "multipart/form-data" ) ; var form = new FormData ; form . append ( "FileData" , handler . file ) , xhr . send ( form ) } return handler } : function ( handler , maxSize , width , height ) { var url = handler . url . concat ( - 1 === handler . url . indexOf ( "?" ) ? "?" : "&" , "AjaxUploadFrame=true" ) , rpe = { loaded : 1 , total : 100 , simulation : ! 0 , interval : setInterval ( function ( ) { rpe . loaded < rpe . total && ++ rpe . loaded , isFunction ( handler . onprogress ) && handler . onprogress ( rpe , { } ) } , 100 ) } , onload = function ( ) { iframe . onreadystatechange = iframe . onload = iframe . onerror = null , form . parentNode . removeChild ( form ) , form = null , clearInterval ( rpe . interval ) ; try { var responseText = ( iframe . contentWindow . document || iframe . contentWindow . contentDocument ) . body . innerHTML , attachO = BI . jsonDecode ( responseText ) ; handler . file . type . indexOf ( "image" ) != - 1 && ( attachO . attach _type = "image" ) ; try { attachO . filename = _global . decodeURIComponent ( handler . file . fileName ) } catch ( e ) { attachO . filename = handler . file . fileName } 1 == handler . maxlength ? handler . attach _array [ 0 ] = attachO : handler . attach _array . push ( attachO ) } catch ( e ) { isFunction ( handler . onerror ) && handler . onerror ( rpe , event || _global . event ) } isFunction ( handler . onload ) && handler . onload ( rpe , { responseText : responseText } ) } , target = [ "AjaxUpload" , ( new Date ) . getTime ( ) , String ( Math . random ( ) ) . substring ( 2 ) ] . join ( "_" ) ; try { var form = document . createElement ( '<form enctype="multipart/form-data"></form>' ) , iframe = handler . iframe || ( handler . iframe = document . createElement ( '<iframe id="' + target + '" name="' + target + '" src="' + url + '"></iframe>' ) ) } catch ( e ) { var form = document . createElement ( "form" ) , iframe = handler . iframe || ( handler . iframe = document . createElement ( "iframe" ) ) ; form . setAttribute ( "enctype" , "multipart/form-data" ) , iframe . setAttribute ( "name" , iframe . id = target ) , iframe . setAttribute ( "src" , url ) } with ( iframe . style . position = "absolute" , iframe . style . left = iframe . style . top = "-10000px" , iframe . onload = onload , iframe . onerror = function ( event ) { isFunction ( handler . onerror ) && handler . onerror ( rpe , event || _global . event ) } , iframe . onreadystatechange = function ( ) { / l o a d e d | c o m p l e t
item . itemsCreator = item . popup . itemsCreator = function ( op ) { if ( BI . isNotNull ( op . node ) ) return o . itemsCreator . apply ( self , arguments ) ; var args = Array . prototype . slice . call ( arguments , 0 ) ; return args [ 0 ] . node = node , o . itemsCreator . apply ( self , args ) } , BI . isNull ( item . popup . el ) && ( item . popup . el = BI . deepClone ( o . el ) ) , items . push ( item ) } else items . push ( node ) } ) , items } , initTree : function ( nodes ) { var self = this , o = this . options ; this . tree = BI . createWidget ( o . el , { element : this , items : this . _formatItems ( nodes ) , itemsCreator : function ( op , callback ) { o . itemsCreator . apply ( this , [ op , function ( items ) { var args = Array . prototype . slice . call ( arguments , 0 ) ; args [ 0 ] = self . _formatItems ( items ) , callback . apply ( null , args ) } ] ) } , value : o . value } ) , this . tree . on ( BI . Controller . EVENT _CHANGE , function ( type , val , obj ) { self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) , type === BI . Events . CLICK && self . fireEvent ( BI . CustomTree . EVENT _CHANGE , val , obj ) } ) } , stroke : function ( nodes ) { this . populate . apply ( this , arguments ) } , populate : function ( nodes ) { var args = Array . prototype . slice . call ( arguments , 0 ) ; arguments . length > 0 && ( args [ 0 ] = this . _formatItems ( nodes ) ) , this . tree . populate . apply ( this . tree , args ) } , setValue : function ( v ) { this . tree && this . tree . setValue ( v ) } , getValue : function ( ) { return this . tree ? this . tree . getValue ( ) : [ ] } , getAllButtons : function ( ) { return this . tree ? this . tree . getAllButtons ( ) : [ ] } , getAllLeaves : function ( ) { return this . tree ? this . tree . getAllLeaves ( ) : [ ] } , getNodeById : function ( id ) { return this . tree && this . tree . getNodeById ( id ) } , getNodeByValue : function ( id ) { return this . tree && this . tree . getNodeByValue ( id ) } , empty : function ( ) { this . tree . empty ( ) } } ) , BI . CustomTree . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.custom_tree" , BI . CustomTree ) , function ( $ ) { var settings = { } , roots = { } , caches = { } , _consts = { className : { BUTTON : "button" , LEVEL : "level" , ICO _LOADING : "ico_loading" , SWITCH : "switch" } , event : { NODECREATED : "ztree_nodeCreated" , CLICK : "ztree_click" , EXPAND : "ztree_expand" , COLLAPSE : "ztree_collapse" , ASYNC _SUCCESS : "ztree_async_success" , ASYNC _ERROR : "ztree_async_error" , REMOVE : "ztree_remove" , SELECTED : "ztree_selected" , UNSELECTED : "ztree_unselected" } , id : { A : "_a" , ICON : "_ico" , SPAN : "_span" , SWITCH : "_switch" , UL : "_ul" } , line : { ROOT : "root" , ROOTS : "roots" , CENTER : "center" , BOTTOM : "bottom" , NOLINE : "noline" , LINE : "line" } , folder : { OPEN : "open" , CLOSE : "close" , DOCU : "docu" } , node : { CURSELECTED : "curSelectedNode" } } , _setting = { treeId : "" , treeObj : null , view : { addDiyDom : null , autoCancelSelected : ! 0 , dblClickExpand : ! 0 , expandSpeed : "fast" , fontCss : { } , nameIsHTML : ! 1 , selectedMulti : ! 0 , showIcon : ! 0 , showLine : ! 0 , showTitle : ! 0 , txtSelectedEnable : ! 1 } , data : { key : { children : "children" , name : "name" , title : "" , url : "url" } , simpleData : { enable : ! 1 , idKey : "id" , pIdKey : "pId" , rootPId : null } , keep : { parent : ! 1 , leaf : ! 1 } } , async : { enable : ! 1 , contentType : "application/x-www-form-urlencoded" , type : "post" , dataType : "text" , url : "" , autoParam : [ ] , otherParam : [ ] , dataFilter : null } , callback : { beforeAsync : null , beforeClick : null , beforeDblClick : null , beforeRightClick : null , beforeMouseDown : null , beforeMouseUp : null , beforeExpand : null , beforeCollapse : null , beforeRemove : null , onAsyncError : null , onAsyncSuccess : null , onNodeCreated : null , onClick : null , onDblClick : null , onRightClick : null , onMouseDown : null , onMouseUp : null , onExpand : null , onCollapse : null , onRemove : null } } , _initRoot = function ( setting ) { var r = data . getRoot ( setting ) ; r || ( r = { } , data . setRoot ( setting , r ) ) , r [ setting . data . key . children ] = [ ] , r . expandTriggerFlag = ! 1 , r . curSelectedList = [ ] , r . noSelection = ! 0 , r . createdNodes = [ ] , r . zId = 0 , r . _ver = ( new Date ) . getTime ( ) } , _initCache = function ( setting ) { var c = data . getCache ( setting ) ; c || ( c = { } , data . setCache ( setting , c ) ) , c . nodes = [ ] , c . doms = [ ] } , _bindEvent = function ( setting ) { var o = setting . treeObj , c = consts . event ; o . bind ( c . NODECREATED , function ( event , treeId , node ) { tools . apply ( setting . callback . onNodeCreated , [ event , treeId , node ] ) } ) , o . bind ( c . CLICK , function ( event , srcEvent , treeId , node , clickFlag ) { tools . apply ( setting . callback . onClick , [ srcEvent , treeId , node , clickFlag ] ) } ) , o . bind ( c . EXPAND , function ( event , treeId , node ) { tools . apply ( setting . callback . onExpand , [ event , treeId , node ] ) } ) , o . bind ( c . COLLAPSE , function ( event , treeId , node ) { tools . apply ( setting . callback . onCollapse , [ event , treeId , node ] ) } ) , o . bind ( c . ASYNC _SUCCESS , function ( event , treeId , node , msg ) { tools . apply ( settin
node . isParent ? lineClass . push ( node . open ? consts . folder . OPEN : consts . folder . CLOSE ) : lineClass . push ( consts . folder . DOCU ) , view . makeNodeLineClassEx ( node ) + lineClass . join ( "_" ) } , makeNodeLineClassEx : function ( node ) { return consts . className . BUTTON + " " + consts . className . LEVEL + node . level + " " + consts . className . SWITCH + " " } , makeNodeTarget : function ( node ) { return node . target || "_blank" } , makeNodeUrl : function ( setting , node ) { var urlKey = setting . data . key . url ; return node [ urlKey ] ? node [ urlKey ] : null } , makeUlHtml : function ( setting , node , html , content ) { html . push ( "<ul id='" , node . tId , consts . id . UL , "' class='" , consts . className . LEVEL , node . level , " " , view . makeUlLineClass ( setting , node ) , "' style='display:" , node . open ? "block" : "none" , "'>" ) , html . push ( content ) , html . push ( "</ul>" ) } , makeUlLineClass : function ( setting , node ) { return setting . view . showLine && ! node . isLastNode ? consts . line . LINE : "" } , removeChildNodes : function ( setting , node ) { if ( node ) { var childKey = setting . data . key . children , nodes = node [ childKey ] ; if ( nodes ) { for ( var i = 0 , l = nodes . length ; i < l ; i ++ ) data . removeNodeCache ( setting , nodes [ i ] ) ; if ( data . removeSelectedNode ( setting ) , delete node [ childKey ] , setting . data . keep . parent ) $$ ( node , consts . id . UL , setting ) . empty ( ) ; else { node . isParent = ! 1 , node . open = ! 1 ; var tmp _switchObj = $$ ( node , consts . id . SWITCH , setting ) , tmp _icoObj = $$ ( node , consts . id . ICON , setting ) ; view . replaceSwitchClass ( node , tmp _switchObj , consts . folder . DOCU ) , view . replaceIcoClass ( node , tmp _icoObj , consts . folder . DOCU ) , $$ ( node , consts . id . UL , setting ) . remove ( ) } } } } , setFirstNode : function ( setting , parentNode ) { var childKey = setting . data . key . children , childLength = parentNode [ childKey ] . length ; childLength > 0 && ( parentNode [ childKey ] [ 0 ] . isFirstNode = ! 0 ) } , setLastNode : function ( setting , parentNode ) { var childKey = setting . data . key . children , childLength = parentNode [ childKey ] . length ; childLength > 0 && ( parentNode [ childKey ] [ childLength - 1 ] . isLastNode = ! 0 ) } , removeNode : function ( setting , node ) { var root = data . getRoot ( setting ) , childKey = setting . data . key . children , parentNode = node . parentTId ? node . getParentNode ( ) : root ; if ( node . isFirstNode = ! 1 , node . isLastNode = ! 1 , node . getPreNode = function ( ) { return null } , node . getNextNode = function ( ) { return null } , data . getNodeCache ( setting , node . tId ) ) { $$ ( node , setting ) . remove ( ) , data . removeNodeCache ( setting , node ) , data . removeSelectedNode ( setting , node ) ; for ( var i = 0 , l = parentNode [ childKey ] . length ; i < l ; i ++ ) if ( parentNode [ childKey ] [ i ] . tId == node . tId ) { parentNode [ childKey ] . splice ( i , 1 ) ; break } view . setFirstNode ( setting , parentNode ) , view . setLastNode ( setting , parentNode ) ; var tmp _ulObj , tmp _switchObj , tmp _icoObj , childLength = parentNode [ childKey ] . length ; if ( setting . data . keep . parent || 0 != childLength ) { if ( setting . view . showLine && childLength > 0 ) { var newLast = parentNode [ childKey ] [ childLength - 1 ] ; if ( tmp _ulObj = $$ ( newLast , consts . id . UL , setting ) , tmp _switchObj = $$ ( newLast , consts . id . SWITCH , setting ) , tmp _icoObj = $$ ( newLast , consts . id . ICON , setting ) , parentNode == root ) if ( 1 == parentNode [ childKey ] . length ) view . replaceSwitchClass ( newLast , tmp _switchObj , consts . line . ROOT ) ; else { var tmp _first _switchObj = $$ ( parentNode [ childKey ] [ 0 ] , consts . id . SWITCH , setting ) ; view . replaceSwitchClass ( parentNode [ childKey ] [ 0 ] , tmp _first _switchObj , consts . line . ROOTS ) , view . replaceSwitchClass ( newLast , tmp _switchObj , consts . line . BOTTOM ) } else view . replaceSwitchClass ( newLast , tmp _switchObj , consts . line . BOTTOM ) ; tmp _ulObj . removeClass ( consts . line . LINE ) } } else parentNode . isParent = ! 1 , parentNode . open = ! 1 , tmp _ulObj = $$ ( parentNode , consts . id . UL , setting ) , tmp _switchObj = $$ ( parentNode , consts . id . SWITCH , setting ) , tmp _icoObj = $$ ( parentNode , consts . id . ICON , setting ) , view . replaceSwitchClass ( parentNode , tmp _switchObj , consts . folder . DOCU ) , view . replaceIcoClass ( parentNode , tmp _icoObj , consts . folder . DOCU ) , tmp _ulObj . css ( "display" , "none" ) } } , replaceIcoClass : function ( node , obj , newName ) { if ( obj && ! node . isAjaxing ) { var tmpName = obj . attr ( "class" ) ; if ( void 0 != tmpName ) { var tmpList = tmpName . split ( "_" ) ; switch ( newName ) { case consts . folder . OPEN : case consts . folder . CLOSE : case consts . folder . DOCU : tmpList [ tmpList . length - 1 ] = newName } obj . attr ( "class" , tmpList . join ( "_" ) ) } } } , replaceSwitchClass : function ( node , obj , newName ) { if ( obj ) { var tmpName = obj . attr ( "class" ) ; if ( void 0 != tmpName ) { var tmpList = tmpName . split ( "_" ) ; switch ( newName ) { case consts . line . ROOT :
delete this . nodeLists [ tId ] , 0 === BI . size ( this . nodeLists ) && this . clear ( ) } , clear : function ( ) { var self = this ; BI . each ( this . nodeLists , function ( tId ) { self . removeNodeList ( tId ) } ) , this . nodeLists = { } } } ) } ( ) , BI . IconChangeButton = BI . inherit ( BI . Single , { _defaultConfig : function ( ) { var conf = BI . IconChangeButton . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { baseCls : "bi-icon-change-button" , iconCls : "" , iconWidth : null , iconHeight : null , stopEvent : ! 1 , stopPropagation : ! 1 , selected : ! 1 , once : ! 1 , forceSelected : ! 1 , forceNotSelected : ! 1 , disableSelected : ! 1 , shadow : ! 1 , isShadowShowingOnSelected : ! 1 , trigger : null , handler : BI . emptyFn } ) } , _init : function ( ) { BI . IconChangeButton . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . button = BI . createWidget ( { type : "bi.icon_button" , element : this , cls : o . iconCls , height : o . height , iconWidth : o . iconWidth , iconHeight : o . iconHeight , stopEvent : o . stopEvent , stopPropagation : o . stopPropagation , selected : o . selected , once : o . once , forceSelected : o . forceSelected , forceNotSelected : o . forceNotSelected , disableSelected : o . disableSelected , shadow : o . shadow , isShadowShowingOnSelected : o . isShadowShowingOnSelected , trigger : o . trigger , handler : o . handler } ) , this . button . on ( BI . Controller . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) , this . button . on ( BI . IconButton . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . IconChangeButton . EVENT _CHANGE , arguments ) } ) } , isSelected : function ( ) { return this . button . isSelected ( ) } , setSelected : function ( b ) { this . button . setSelected ( b ) } , setIcon : function ( cls ) { var o = this . options ; o . iconCls !== cls && ( this . element . removeClass ( o . iconCls ) . addClass ( cls ) , o . iconCls = cls ) } } ) , BI . IconChangeButton . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.icon_change_button" , BI . IconChangeButton ) , BI . TriggerIconButton = BI . inherit ( BI . IconButton , { _defaultConfig : function ( ) { var conf = BI . TriggerIconButton . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { baseCls : ( conf . baseCls || "" ) + " bi-trigger-icon-button" , extraCls : "pull-down-font" } ) } } ) , BI . TriggerIconButton . EVENT _CHANGE = BI . IconButton . EVENT _CHANGE , BI . shortcut ( "bi.trigger_icon_button" , BI . TriggerIconButton ) , BI . HalfIconButton = BI . inherit ( BI . IconButton , { _defaultConfig : function ( ) { var conf = BI . HalfIconButton . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { extraCls : "bi-half-icon-button check-half-select-icon" , height : 16 , width : 16 , iconWidth : 16 , iconHeight : 16 , selected : ! 1 } ) } } ) , BI . HalfIconButton . EVENT _CHANGE = BI . IconButton . EVENT _CHANGE , BI . shortcut ( "bi.half_icon_button" , BI . HalfIconButton ) , BI . HalfButton = BI . inherit ( BI . BasicButton , { _defaultConfig : function ( ) { var conf = BI . HalfIconButton . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { extraCls : "bi-half-button bi-high-light-border" , height : 14 , width : 14 , selected : ! 1 } ) } , _init : function ( ) { BI . HalfButton . superclass . _init . apply ( this , arguments ) , BI . createWidget ( { type : "bi.center_adapt" , element : this . element , items : [ { type : "bi.layout" , cls : "bi-high-light-background" , width : 8 , height : 8 } ] } ) } , doClick : function ( ) { BI . HalfButton . superclass . doClick . apply ( this , arguments ) , this . isValid ( ) && this . fireEvent ( BI . HalfButton . EVENT _CHANGE ) } } ) , BI . HalfButton . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.half_button" , BI . HalfButton ) , BI . MultiSelectItem = BI . inherit ( BI . BasicButton , { _defaultConfig : function ( ) { return BI . extend ( BI . MultiSelectItem . superclass . _defaultConfig . apply ( this , arguments ) , { extraCls : "bi-multi-select-item" , height : 24 , logic : { dynamic : ! 1 } , iconWrapperWidth : 26 } ) } , _init : function ( ) { BI . MultiSelectItem . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . checkbox = BI . createWidget ( { type : "bi.checkbox" } ) , this . text = BI . createWidget ( { type : "bi.label" , cls : "list-item-text" , textAlign : "left" , whiteSpace : "nowrap" , textHeight : o . height , height : o . height , hgap : o . hgap , rgap : o . rgap , text : o . text , keyword : o . keyword , value : o . value , py : o . py } ) , this . checkbox . on ( BI . Controller . EVENT _CHANGE , function ( type ) { type === BI . Events . CLICK && self . setSelected ( self . isSelected ( ) ) } ) , BI . createWidget ( BI . extend ( { element : this } , BI . LogicFactory . createLogic ( "horizontal" , BI . extend ( o . logic , { items : BI . LogicFactory . createLogicItemsByDirection ( "left" , { type : "bi.center_adapt" , items : [ this . c
Y = 0 | Y , De . setFullYear ( Y , M , 1 ) ; var newDate = BI . getOffsetDate ( De , - 1 * ( day + 1 ) ) ; return ! ! BI . checkDateVoid ( newDate . getFullYear ( ) , newDate . getMonth ( ) , newDate . getDate ( ) , o . min , o . max ) [ 0 ] } , isFinalDate : function ( ) { var o = this . options , c = this . _const , Y = o . year , M = o . month , De = BI . getDate ( ) , day = De . getDay ( ) ; Y = 0 | Y , De . setFullYear ( Y , M , 1 ) ; var newDate = BI . getOffsetDate ( De , 42 - day ) ; return ! ! BI . checkDateVoid ( newDate . getFullYear ( ) , newDate . getMonth ( ) , newDate . getDate ( ) , o . min , o . max ) [ 0 ] } , _getItems : function ( ) { var o = this . options , days = this . _dateCreator ( o . year , o . month - 1 , o . day ) , items = [ ] ; return items . push ( days . slice ( 0 , 7 ) ) , items . push ( days . slice ( 7 , 14 ) ) , items . push ( days . slice ( 14 , 21 ) ) , items . push ( days . slice ( 21 , 28 ) ) , items . push ( days . slice ( 28 , 35 ) ) , items . push ( days . slice ( 35 , 42 ) ) , BI . map ( items , function ( i , item ) { return BI . map ( item , function ( j , td ) { var month = td . lastMonth ? o . month - 1 : td . nextMonth ? o . month + 1 : o . month ; return BI . extend ( td , { type : "bi.calendar_date_item" , textAlign : "center" , whiteSpace : "normal" , once : ! 1 , forceSelected : ! 0 , height : 24 , value : o . year + "-" + month + "-" + td . text , disabled : td . lastMonth || td . nextMonth || td . disabled , lgap : 5 , rgap : 5 } ) } ) } ) } , _populate : function ( ) { this . days . populate ( this . _getItems ( ) ) } , setMinDate : function ( minDate ) { var o = this . options ; BI . isNotEmptyString ( o . min ) && ( o . min = minDate , this . _populate ( ) ) } , setMaxDate : function ( maxDate ) { var o = this . options ; BI . isNotEmptyString ( o . max ) && ( o . max = maxDate , this . _populate ( ) ) } , setValue : function ( ob ) { this . days . setValue ( [ ob . year + "-" + ob . month + "-" + ob . day ] ) } , getValue : function ( ) { var date = this . days . getValue ( ) [ 0 ] . match ( /\d+/g ) ; return { year : 0 | date [ 0 ] , month : 0 | date [ 1 ] , day : 0 | date [ 2 ] } } } ) , BI . extend ( BI . Calendar , { getPageByDateJSON : function ( json ) { var year = BI . getDate ( ) . getFullYear ( ) , month = BI . getDate ( ) . getMonth ( ) , page = 12 * ( json . year - year ) ; return page += json . month - 1 - month } , getDateJSONByPage : function ( v ) { var months = BI . getDate ( ) . getMonth ( ) , page = v ; page += months ; var year = BI . parseInt ( page / 12 ) ; page < 0 && page % 12 !== 0 && year -- ; var month = page >= 0 ? page % 12 : ( 12 + page % 12 ) % 12 ; return { year : BI . getDate ( ) . getFullYear ( ) + year , month : month + 1 } } } ) , BI . shortcut ( "bi.calendar" , BI . Calendar ) , BI . YearCalendar = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { var conf = BI . YearCalendar . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { baseCls : "bi-year-calendar" , behaviors : { } , logic : { dynamic : ! 1 } , min : "1900-01-01" , max : "2099-12-31" , year : null } ) } , _yearCreator : function ( Y ) { var o = this . options ; Y = 0 | Y ; var start = BI . YearCalendar . getStartYear ( Y ) , items = [ ] , startDate = BI . parseDateTime ( o . min , "%Y-%X-%d" ) , endDate = BI . parseDateTime ( o . max , "%Y-%X-%d" ) ; return BI . each ( BI . range ( BI . YearCalendar . INTERVAL ) , function ( i ) { var td = { } ; BI . checkDateVoid ( start + i , 1 , 1 , BI . print ( BI . getDate ( startDate . getFullYear ( ) , 0 , 1 ) , "%Y-%X-%d" ) , BI . print ( BI . getDate ( endDate . getFullYear ( ) , 0 , 1 ) , "%Y-%X-%d" ) ) [ 0 ] && ( td . disabled = ! 0 ) , td . text = start + i , items . push ( td ) } ) , items } , _init : function ( ) { BI . YearCalendar . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . currentYear = BI . getDate ( ) . getFullYear ( ) , this . years = BI . createWidget ( { type : "bi.button_group" , behaviors : o . behaviors , items : BI . createItems ( this . _getItems ( ) , { } ) , layouts : [ BI . LogicFactory . createLogic ( "table" , BI . extend ( { } , o . logic , { columns : 2 , rows : 6 , columnSize : [ . 5 , . 5 ] , rowSize : 24 } ) ) , { type : "bi.center_adapt" , vgap : 1 } ] } ) , this . years . on ( BI . Controller . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) , BI . createWidget ( BI . extend ( { element : this } , BI . LogicFactory . createLogic ( "vertical" , BI . extend ( { } , o . logic , { items : BI . LogicFactory . createLogicItemsByDirection ( "top" , this . years ) } ) ) ) ) } , isFrontYear : function ( ) { var o = this . options , Y = o . year ; return Y = 0 | Y , ! ! BI . checkDateVoid ( BI . YearCalendar . getStartYear ( Y ) - 1 , 1 , 1 , o . min , o . max ) [ 0 ] } , isFinalYear : function ( ) { var o = this . options , c = this . _const , Y = o . year ; return Y = 0 | Y , ! ! BI . checkDateVoid ( BI . YearCalendar . getEndYear ( Y ) + 1 , 1 , 1 , o . min , o . max ) [ 0 ] } , _getItems : function ( ) { var o = this . options , years = this . _yearCreator ( o . year || this . currentYear ) , len = years . length , tyears = BI . makeArray ( len , "" ) , map = [ 0 , 6 , 1 , 7 , 2 , 8 , 3 , 9 , 4 , 10 , 5 , 11 ] ; BI . each ( years , function ( i , y ) { tyears [ i ] = years [ map [ i ] ] } ) ; var items = [ ] ; return items . push ( tyears . slice ( 0 , 2 ) ) , items . push ( tyears . slice ( 2 , 4 ) ) , items . push ( tyears . slice ( 4 , 6 ) ) , items . push ( t
return "#" + ( r < 16 ? "0" : "" ) + r . toString ( 16 ) + ( g < 16 ? "0" : "" ) + g . toString ( 16 ) + ( b < 16 ? "0" : "" ) + b . toString ( 16 ) } , _setColor : function ( color ) { var unpack = this . _unpack ( color ) ; this . value !== color && unpack && ( this . value = color , this . rgb = unpack , this . hsl = this . _RGBToHSL ( this . rgb ) , this . _updateDisplay ( ) ) } , _setHSL : function ( hsl ) { return this . hsl = hsl , this . rgb = this . _HSLToRGB ( hsl ) , this . value = this . _pack ( this . rgb ) , this . _updateDisplay ( ) , this } , _HSLToRGB : function ( hsl ) { var m1 , m2 , r , g , b , h = hsl [ 0 ] , s = hsl [ 1 ] , l = hsl [ 2 ] ; return m2 = l <= . 5 ? l * ( s + 1 ) : l + s - l * s , m1 = 2 * l - m2 , [ this . _hueToRGB ( m1 , m2 , h + . 33333 ) , this . _hueToRGB ( m1 , m2 , h ) , this . _hueToRGB ( m1 , m2 , h - . 33333 ) ] } , _hueToRGB : function ( m1 , m2 , h ) { return h = h < 0 ? h + 1 : h > 1 ? h - 1 : h , 6 * h < 1 ? m1 + ( m2 - m1 ) * h * 6 : 2 * h < 1 ? m2 : 3 * h < 2 ? m1 + ( m2 - m1 ) * ( . 66666 - h ) * 6 : m1 } , _RGBToHSL : function ( rgb ) { var min , max , delta , h , s , l , r = rgb [ 0 ] , g = rgb [ 1 ] , b = rgb [ 2 ] ; return min = Math . min ( r , Math . min ( g , b ) ) , max = Math . max ( r , Math . max ( g , b ) ) , delta = max - min , l = ( min + max ) / 2 , s = 0 , l > 0 && l < 1 && ( s = delta / ( l < . 5 ? 2 * l : 2 - 2 * l ) ) , h = 0 , delta > 0 && ( max == r && max != g && ( h += ( g - b ) / delta ) , max == g && max != b && ( h += 2 + ( b - r ) / delta ) , max == b && max != r && ( h += 4 + ( r - g ) / delta ) , h /= 6 ) , [ h , s , l ] } , _updateDisplay : function ( ) { var angle = 6.28 * this . hsl [ 0 ] ; this . hMarker . element . css ( { left : Math . round ( Math . sin ( angle ) * this . constants . RADIUS + this . constants . WIDTH / 2 ) + "px" , top : Math . round ( - Math . cos ( angle ) * this . constants . RADIUS + this . constants . WIDTH / 2 ) + "px" } ) , this . slMarker . element . css ( { left : Math . round ( this . constants . SQUARE * ( . 5 - this . hsl [ 1 ] ) + this . constants . WIDTH / 2 ) + "px" , top : Math . round ( this . constants . SQUARE * ( . 5 - this . hsl [ 2 ] ) + this . constants . WIDTH / 2 ) + "px" } ) , this . colorWrapper . element . css ( "backgroundColor" , this . _pack ( this . _HSLToRGB ( [ this . hsl [ 0 ] , 1 , . 5 ] ) ) ) , this . fireEvent ( BI . Farbtastic . EVENT _CHANGE , this . getValue ( ) , this ) } , _absolutePosition : function ( el ) { var r = { x : el . offsetLeft , y : el . offsetTop } ; if ( el . offsetParent ) { var tmp = this . _absolutePosition ( el . offsetParent ) ; r . x += tmp . x , r . y += tmp . y } return r } , _widgetCoords : function ( event ) { var x , y , el = event . target || event . srcElement , reference = this . wheel . element [ 0 ] ; if ( "undefined" != typeof event . offsetX ) { for ( var pos = { x : event . offsetX , y : event . offsetY } , e = el ; e ; ) e . mouseX = pos . x , e . mouseY = pos . y , pos . x += e . offsetLeft , pos . y += e . offsetTop , e = e . offsetParent ; for ( var e = reference , offset = { x : 0 , y : 0 } ; e ; ) { if ( "undefined" != typeof e . mouseX ) { x = e . mouseX - offset . x , y = e . mouseY - offset . y ; break } offset . x += e . offsetLeft , offset . y += e . offsetTop , e = e . offsetParent } for ( e = el ; e ; ) e . mouseX = void 0 , e . mouseY = void 0 , e = e . offsetParent } else { var pos = this . _absolutePosition ( reference ) ; x = ( event . pageX || 0 ) - pos . x , y = ( event . pageY || 0 ) - pos . y } return { x : x - this . constants . WIDTH / 2 , y : y - this . constants . WIDTH / 2 } } , _doMouseMove : function ( event ) { var pos = this . _widgetCoords ( event ) ; if ( this . circleDrag ) { var hue = Math . atan2 ( pos . x , - pos . y ) / 6.28 ; hue < 0 && ( hue += 1 ) , this . _setHSL ( [ hue , this . hsl [ 1 ] , this . hsl [ 2 ] ] ) } else { var sat = Math . max ( 0 , Math . min ( 1 , - ( pos . x / this . constants . SQUARE ) + . 5 ) ) , lum = Math . max ( 0 , Math . min ( 1 , - ( pos . y / this . constants . SQUARE ) + . 5 ) ) ; this . _setHSL ( [ this . hsl [ 0 ] , sat , lum ] ) } } , doClick : function ( event ) { var pos = this . _widgetCoords ( event ) ; return this . circleDrag = 2 * Math . max ( Math . abs ( pos . x ) , Math . abs ( pos . y ) ) > this . constants . SQUARE , this . _doMouseMove ( event ) , ! 1 } , setValue : function ( color ) { this . _setColor ( color ) } , getValue : function ( ) { return this . value } } ) , BI . Farbtastic . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.farbtastic" , BI . Farbtastic ) , BI . BubbleCombo = BI . inherit ( BI . Widget , { _const : { TRIANGLE _LENGTH : 6 } , _defaultConfig : function ( ) { return BI . extend ( BI . BubbleCombo . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-bubble-combo" , trigger : "click" , toggle : ! 0 , direction : "bottom,left" , isDefaultInit : ! 1 , destroyWhenHide : ! 1 , isNeedAdjustHeight : ! 0 , isNeedAdjustWidth : ! 0 , stopPropagation : ! 1 , adjustLength : 0 , hideChecker : BI . emptyFn , offsetStyle : "left" , el : { } , popup : { } } ) } , _init : function ( ) { BI . BubbleCombo . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . combo = BI . createWidget ( { type : "bi.combo" , element : this , trigger : o . trigger , toggle : o . toggle , container : o . container , direction : o . direction , isDefaultInit : o . isDefaultInit , destroyWhenHide : o . destroyWhenHide , isNeedAdjustHeight : o . isNeedAdjustHeight , isNeedAdjustWidth : o . isNeedAdjustWidth , adjustLength : this . _getAdjustLength ( ) , stopPropagation : o . stopPropagation ,
populate : function ( items ) { this . options . items = items , this . textIconCombo . populate ( items ) } } ) , BI . TextValueCombo . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.text_value_combo" , BI . TextValueCombo ) , BI . SmallTextValueCombo = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . SmallTextValueCombo . superclass . _defaultConfig . apply ( this , arguments ) , { width : 100 , height : 20 , chooseType : BI . ButtonGroup . CHOOSE _TYPE _SINGLE , el : { } , text : "" } ) } , _init : function ( ) { BI . SmallTextValueCombo . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . trigger = BI . createWidget ( o . el , { type : "bi.small_select_text_trigger" , items : o . items , height : o . height , text : o . text } ) , this . popup = BI . createWidget ( { type : "bi.text_value_combo_popup" , chooseType : o . chooseType , items : o . items } ) , this . popup . on ( BI . TextValueComboPopup . EVENT _CHANGE , function ( ) { self . setValue ( self . popup . getValue ( ) ) , self . SmallTextValueCombo . hideView ( ) , self . fireEvent ( BI . SmallTextValueCombo . EVENT _CHANGE ) } ) , this . popup . on ( BI . Controller . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) , this . SmallTextValueCombo = BI . createWidget ( { type : "bi.combo" , element : this , container : o . container , adjustLength : 2 , el : this . trigger , popup : { el : this . popup , maxHeight : 240 , minHeight : 25 } } ) } , setValue : function ( v ) { this . trigger . setValue ( v ) , this . popup . setValue ( v ) } , getValue : function ( ) { return this . popup . getValue ( ) } , populate : function ( items ) { this . options . items = items , this . SmallTextValueCombo . populate ( items ) } } ) , BI . SmallTextValueCombo . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.small_text_value_combo" , BI . SmallTextValueCombo ) , BI . TextValueComboPopup = BI . inherit ( BI . Pane , { _defaultConfig : function ( ) { return BI . extend ( BI . TextValueComboPopup . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-text-icon-popup" , chooseType : BI . ButtonGroup . CHOOSE _TYPE _SINGLE } ) } , _init : function ( ) { BI . TextValueComboPopup . 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_item" , textAlign : o . textAlign , 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 . TextValueComboPopup . EVENT _CHANGE , val , obj ) } ) , this . check ( ) , BI . createWidget ( { type : "bi.vertical" , element : this , vgap : 5 , items : [ this . popup ] } ) } , populate : function ( items ) { BI . TextValueComboPopup . superclass . populate . apply ( this , arguments ) , items = BI . createItems ( items , { type : "bi.single_select_item" , height : 24 } ) , this . popup . populate ( items ) } , getValue : function ( ) { return this . popup . getValue ( ) } , setValue : function ( v ) { this . popup . setValue ( v ) } } ) , BI . TextValueComboPopup . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.text_value_combo_popup" , BI . TextValueComboPopup ) , BI . ClearEditor = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { var conf = BI . ClearEditor . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { baseCls : "bi-clear-editor" , height : 24 , errorText : "" , watermark : "" , validationChecker : BI . emptyFn , quitChecker : BI . emptyFn } ) } , _init : function ( ) { BI . ClearEditor . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . editor = BI . createWidget ( { type : "bi.editor" , height : o . height , watermark : o . watermark , allowBlank : ! 0 , errorText : o . errorText , validationChecker : o . validationChecker , quitChecker : o . quitChecker , value : o . value } ) , this . clear = BI . createWidget ( { type : "bi.icon_button" , stopEvent : ! 0 , cls : "search-close-h-font" } ) , this . clear . on ( BI . IconButton . EVENT _CHANGE , function ( ) { self . setValue ( "" ) , self . fireEvent ( BI . Controller . EVENT _CHANGE , BI . Events . STOPEDIT ) , self . fireEvent ( BI . ClearEditor . EVENT _CLEAR ) } ) , BI . createWidget ( { element : this , type : "bi.htape" , items : [ { el : this . editor } , { el : this . clear , width : 24 } ] } ) , 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 . ClearEditor . EVENT _FOCUS ) } ) , this . editor . on ( BI . Editor . EVENT _BLUR , function ( ) { self . fireEvent ( BI . ClearEditor . EVENT _BLUR ) } ) , this . editor . on ( BI . Editor . EVENT _CLICK , function ( ) { self . fireE
return BI . extend ( conf , { _baseCls : ( conf . _baseCls || "" ) + " bi-multi-list-view" , buttons : [ BI . i18nText ( "BI-Basic_Sure" ) ] } ) } , _init : function ( ) { BI . MultiPopupView . superclass . _init . apply ( this , arguments ) } , _createToolBar : function ( ) { var o = this . options , self = this ; if ( 0 !== o . buttons . length ) { var text = [ ] ; return BI . each ( o . buttons , function ( idx , item ) { text . push ( { text : item , value : idx } ) } ) , this . buttongroup = BI . createWidget ( { type : "bi.button_group" , cls : "list-view-toolbar bi-high-light bi-split-top" , height : 24 , items : BI . createItems ( text , { type : "bi.text_button" , once : ! 1 , shadow : ! 0 , isShadowShowingOnSelected : ! 0 } ) , layouts : [ { type : "bi.center" , hgap : 0 , vgap : 0 } ] } ) , this . buttongroup . on ( BI . ButtonGroup . EVENT _CHANGE , function ( value , obj ) { self . fireEvent ( BI . MultiPopupView . EVENT _CLICK _TOOLBAR _BUTTON , value , obj ) } ) , this . buttongroup } } } ) , BI . MultiPopupView . EVENT _CHANGE = "EVENT_CHANGE" , BI . MultiPopupView . EVENT _CLICK _TOOLBAR _BUTTON = "EVENT_CLICK_TOOLBAR_BUTTON" , BI . shortcut ( "bi.multi_popup_view" , BI . MultiPopupView ) , BI . PopupPanel = BI . inherit ( BI . MultiPopupView , { _defaultConfig : function ( ) { var conf = BI . PopupPanel . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { baseCls : ( conf . baseCls || "" ) + " bi-popup-panel" , title : "" } ) } , _init : function ( ) { BI . PopupPanel . superclass . _init . apply ( this , arguments ) } , _createTool : function ( ) { var self = this , o = this . options , close = BI . createWidget ( { type : "bi.icon_button" , cls : "close-h-font" , width : 25 , height : 25 } ) ; return close . on ( BI . IconButton . EVENT _CHANGE , function ( ) { self . setVisible ( ! 1 ) , self . fireEvent ( BI . PopupPanel . EVENT _CLOSE ) } ) , BI . createWidget ( { type : "bi.htape" , cls : "popup-panel-title bi-header-background" , height : 25 , items : [ { el : { type : "bi.label" , textAlign : "left" , text : o . title , height : 25 , lgap : 10 } } , { el : close , width : 25 } ] } ) } } ) , BI . PopupPanel . EVENT _CHANGE = "EVENT_CHANGE" , BI . PopupPanel . EVENT _CLOSE = "EVENT_CLOSE" , BI . PopupPanel . EVENT _CLICK _TOOLBAR _BUTTON = "EVENT_CLICK_TOOLBAR_BUTTON" , BI . shortcut ( "bi.popup_panel" , BI . PopupPanel ) , BI . ListPane = BI . inherit ( BI . Pane , { _defaultConfig : function ( ) { var conf = BI . ListPane . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { baseCls : ( conf . baseCls || "" ) + " bi-list-pane" , logic : { dynamic : ! 0 } , lgap : 0 , rgap : 0 , tgap : 0 , bgap : 0 , vgap : 0 , hgap : 0 , items : [ ] , itemsCreator : BI . emptyFn , hasNext : BI . emptyFn , onLoaded : BI . emptyFn , el : { type : "bi.button_group" } } ) } , _init : function ( ) { BI . ListPane . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . button _group = BI . createWidget ( o . el , { type : "bi.button_group" , chooseType : BI . ButtonGroup . CHOOSE _TYPE _SINGLE , behaviors : { } , items : o . items , itemsCreator : function ( op , calback ) { 1 === op . times && ( self . empty ( ) , BI . nextTick ( function ( ) { self . loading ( ) } ) ) , o . itemsCreator ( op , function ( ) { calback . apply ( self , arguments ) , 1 === op . times && BI . nextTick ( function ( ) { self . loaded ( ) , self . check ( ) } ) } ) } , hasNext : o . hasNext , 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 . ListPane . EVENT _CHANGE , value , obj ) } ) , this . check ( ) , BI . createWidget ( BI . extend ( { element : this } , BI . LogicFactory . createLogic ( BI . LogicFactory . createLogicTypeByDirection ( BI . Direction . Top ) , BI . extend ( { scrolly : ! 0 , lgap : o . lgap , rgap : o . rgap , tgap : o . tgap , bgap : o . bgap , vgap : o . vgap , hgap : o . hgap } , o . logic , { items : BI . LogicFactory . createLogicItemsByDirection ( BI . Direction . Top , this . button _group ) } ) ) ) ) } , hasPrev : function ( ) { return this . button _group . hasPrev && this . button _group . hasPrev ( ) } , hasNext : function ( ) { return this . button _group . hasNext && this . button _group . hasNext ( ) } , prependItems : function ( items ) { this . options . items = items . concat ( this . options . items ) , this . button _group . prependItems . apply ( this . button _group , arguments ) , this . check ( ) } , addItems : function ( items ) { this . options . items = this . options . items . concat ( items ) , this . button _group . addItems . apply ( this . button _group , arguments ) , this . check ( ) } , removeItemAt : function ( indexes ) { indexes = indexes || [ ] , BI . removeAt ( this . options . items , indexes ) , this . button _group . removeItemAt . apply ( this . button _group , arguments ) , this . check ( ) } , populate : function ( items ) { var self = this , o = this . options ; return 0 === arguments . length && BI . isFunction ( this . button _group . attr ( "itemsCreator" ) ) ? voi
cls : "page-ellipsis" , text : "…" } ) , view . push ( { text : last , value : "last" , disabled : ! ( pages > groups && dict . end < pages && 0 !== groups ) } ) ) , dict . flow = ! prev && 0 === groups , ( ! o . dynamicShow && ! o . dynamicShowPrevNext && next || curr !== pages && next || dict . flow ) && view . push ( function ( ) { return BI . isKey ( next ) ? pages === ! 1 ? { text : next , value : "next" , disabled : o . hasNext ( curr ) === ! 1 } : dict . flow && curr === pages ? { text : next , value : "next" , disabled : ! 0 } : { text : next , value : "next" , disabled : ! ( curr !== pages && next || dict . flow ) } : BI . extend ( { disabled : pages === ! 1 ? o . hasNext ( curr ) === ! 1 : ! ( curr !== pages && next || dict . flow ) } , next ) } ( ) ) , this . button _group = BI . createWidget ( { type : "bi.button_group" , element : this , items : BI . createItems ( view , { cls : "page-item bi-border bi-list-item-active" , height : 23 , hgap : 10 } ) , behaviors : o . behaviors , layouts : o . layouts } ) , this . button _group . on ( BI . Controller . EVENT _CHANGE , function ( type , value , obj ) { if ( self . _lock !== ! 0 ) { if ( self . _lock = ! 0 , self . _debouce ( ) , type === BI . Events . CLICK ) { var v = self . button _group . getValue ( ) [ 0 ] ; switch ( v ) { case "first" : self . currPage = 1 ; break ; case "last" : self . currPage = pages ; break ; case "prev" : self . currPage -- ; break ; case "next" : self . currPage ++ ; break ; default : self . currPage = v } o . jump . apply ( self , [ { pages : pages , curr : self . currPage } ] ) , self . _populate ( ) , self . fireEvent ( BI . DetailPager . EVENT _CHANGE , obj ) } self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } } ) , this . fireEvent ( BI . DetailPager . EVENT _AFTER _POPULATE ) } , getCurrentPage : function ( ) { return this . currPage } , setAllPages : function ( pages ) { this . options . pages = pages } , hasPrev : function ( v ) { v || ( v = 1 ) ; var o = this . options , pages = this . options . pages ; return pages === ! 1 ? o . hasPrev ( v ) : v > 1 } , hasNext : function ( v ) { v || ( v = 1 ) ; var o = this . options , pages = this . options . pages ; return pages === ! 1 ? o . hasNext ( v ) : v < pages } , setValue : function ( v ) { var o = this . options ; if ( v = v || 0 , v = v < 1 ? 1 : v , o . pages === ! 1 ) { var lastPage = BI . result ( o , "lastPage" ) , firstPage = 1 ; this . currPage = v > lastPage ? lastPage : ( firstPage = BI . result ( o , "firstPage" ) , v < firstPage ? firstPage : v ) } else v = v > o . pages ? o . pages : v , this . currPage = v ; this . _populate ( ) } , getValue : function ( ) { var val = this . button _group . getValue ( ) [ 0 ] ; switch ( val ) { case "prev" : return - 1 ; case "next" : return 1 ; case "first" : return BI . MIN ; case "last" : return BI . MAX ; default : return val } } , attr : function ( key , value ) { BI . DetailPager . superclass . attr . apply ( this , arguments ) , "curr" === key && ( this . currPage = BI . result ( this . options , "curr" ) ) } , populate : function ( ) { this . _populate ( ) } } ) , BI . DetailPager . EVENT _CHANGE = "EVENT_CHANGE" , BI . DetailPager . EVENT _AFTER _POPULATE = "EVENT_AFTER_POPULATE" , BI . shortcut ( "bi.detail_pager" , BI . DetailPager ) , BI . SegmentButton = BI . inherit ( BI . BasicButton , { _defaultConfig : function ( ) { var conf = BI . SegmentButton . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { baseCls : ( conf . baseCls || "" ) + " bi-segment-button bi-list-item-select" , shadow : ! 0 , readonly : ! 0 , hgap : 5 } ) } , _init : function ( ) { BI . SegmentButton . superclass . _init . apply ( this , arguments ) ; var opts = this . options , self = this ; this . text = BI . createWidget ( { type : "bi.label" , element : this , textHeight : opts . height , whiteSpace : opts . whiteSpace , text : opts . text , value : opts . value , hgap : opts . hgap } ) } , setSelected : function ( ) { BI . SegmentButton . superclass . setSelected . apply ( this , arguments ) } , setText : function ( text ) { BI . SegmentButton . superclass . setText . apply ( this , arguments ) , this . text . setText ( text ) } , destroy : function ( ) { BI . SegmentButton . superclass . destroy . apply ( this , arguments ) } } ) , BI . shortcut ( "bi.segment_button" , BI . SegmentButton ) , BI . Segment = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . Segment . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-segment" , items : [ ] , height : 24 } ) } , _init : function ( ) { BI . Segment . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . buttonGroup = BI . createWidget ( { element : this , type : "bi.button_group" , value : o . value , items : BI . createItems ( o . items , { type : "bi.segment_button" , height : o . height - 2 , whiteSpace : o . whiteSpace } ) , layout : [ { type : "bi.center" } ] } ) , this . buttonGroup . on ( BI . Controller . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) , this . buttonGroup . on ( BI . ButtonGroup . EVENT _CHANGE , function ( value , obj ) { self . fireEvent ( BI . Segment . EVENT _CHANGE , value , obj ) } ) } , _setEnable : function ( enable ) { BI . Segment . superclass . _s
} , getValue : function ( ) { return this . year . getValue ( ) } } ) , BI . YearPicker . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.year_picker" , BI . YearPicker ) , BI . DateCalendarPopup = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { var conf = BI . DateCalendarPopup . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { baseCls : "bi-date-calendar-popup" , min : "1900-01-01" , max : "2099-12-31" , selectedTime : null } ) } , _createNav : function ( v ) { var date = BI . Calendar . getDateJSONByPage ( v ) , calendar = BI . createWidget ( { type : "bi.calendar" , logic : { dynamic : ! 0 } , min : this . options . min , max : this . options . max , year : date . year , month : date . month , day : 1 } ) ; return calendar } , _init : function ( ) { BI . DateCalendarPopup . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . today = BI . getDate ( ) , this . _year = this . today . getFullYear ( ) , this . _month = this . today . getMonth ( ) + 1 , this . _day = this . today . getDate ( ) , this . selectedTime = o . selectedTime || { year : this . _year , month : this . _month , day : this . _day } , this . datePicker = BI . createWidget ( { type : "bi.date_picker" , behaviors : o . behaviors , min : o . min , max : o . max } ) , this . calendar = BI . createWidget ( { direction : "top" , logic : { dynamic : ! 0 } , type : "bi.navigation" , tab : this . datePicker , cardCreator : BI . bind ( this . _createNav , this ) , afterCardCreated : function ( ) { } , afterCardShow : function ( ) { this . setValue ( self . selectedTime ) } } ) , this . datePicker . on ( BI . DatePicker . EVENT _CHANGE , function ( ) { self . selectedTime = self . datePicker . getValue ( ) , self . selectedTime . day = 1 , self . calendar . setSelect ( BI . Calendar . getPageByDateJSON ( self . selectedTime ) ) } ) , this . calendar . on ( BI . Navigation . EVENT _CHANGE , function ( ) { self . selectedTime = self . calendar . getValue ( ) , self . setValue ( self . selectedTime ) , self . fireEvent ( BI . DateCalendarPopup . EVENT _CHANGE ) } ) , BI . createWidget ( { type : "bi.absolute" , element : this , items : [ { el : this . calendar , left : 5 , right : 5 } , { el : { type : "bi.layout" , cls : "bi-split-top" } , height : 1 , top : 40 , left : 0 , right : 0 } ] } ) } , _checkMin : function ( ) { var calendar = this . calendar . getSelectedCard ( ) ; BI . isNotNull ( calendar ) && calendar . setMinDate ( this . options . min ) } , _checkMax : function ( ) { var calendar = this . calendar . getSelectedCard ( ) ; BI . isNotNull ( calendar ) && calendar . setMaxDate ( this . options . max ) } , setMinDate : function ( minDate ) { BI . isNotEmptyString ( this . options . min ) && ( this . options . min = minDate , this . datePicker . setMinDate ( minDate ) , this . _checkMin ( ) ) } , setMaxDate : function ( maxDate ) { BI . isNotEmptyString ( this . options . max ) && ( this . options . max = maxDate , this . datePicker . setMaxDate ( maxDate ) , this . _checkMax ( ) ) } , setValue : function ( timeOb ) { this . datePicker . setValue ( timeOb ) , this . calendar . setSelect ( BI . Calendar . getPageByDateJSON ( timeOb ) ) , this . calendar . setValue ( timeOb ) , this . selectedTime = timeOb } , getValue : function ( ) { return this . selectedTime } } ) , BI . DateCalendarPopup . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.date_calendar_popup" , BI . DateCalendarPopup ) , BI . MonthPopup = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . MonthPopup . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-month-popup" , behaviors : { } } ) } , _init : function ( ) { BI . MonthPopup . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options , month = [ 1 , 7 , 2 , 8 , 3 , 9 , 4 , 10 , 5 , 11 , 6 , 12 ] , items = [ ] ; items . push ( month . slice ( 0 , 2 ) ) , items . push ( month . slice ( 2 , 4 ) ) , items . push ( month . slice ( 4 , 6 ) ) , items . push ( month . slice ( 6 , 8 ) ) , items . push ( month . slice ( 8 , 10 ) ) , items . push ( month . slice ( 10 , 12 ) ) , items = BI . map ( items , function ( i , item ) { return BI . map ( item , function ( j , td ) { return { type : "bi.text_item" , cls : "bi-list-item-select" , textAlign : "center" , whiteSpace : "nowrap" , once : ! 1 , forceSelected : ! 0 , height : 23 , width : 38 , value : td , text : td } } ) } ) , this . month = BI . createWidget ( { type : "bi.button_group" , element : this , behaviors : o . behaviors , items : BI . createItems ( items , { } ) , layouts : [ BI . LogicFactory . createLogic ( "table" , BI . extend ( { dynamic : ! 0 } , { columns : 2 , rows : 6 , columnSize : [ . 5 , . 5 ] , rowSize : 25 } ) ) , { type : "bi.center_adapt" , vgap : 1 , hgap : 2 } ] , value : o . value } ) , this . month . on ( BI . Controller . EVENT _CHANGE , function ( type ) { self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) , type === BI . Events . CLICK && self . fireEvent ( BI . MonthPopup . EVENT _CHANGE ) } ) } , getValue : function ( ) { return this . month . getValue ( ) [ 0 ] } , setValue : function ( v ) { v = BI . parseInt ( v ) , this . month . setValue ( [ v ] ) } } ) , BI . MonthPopup . EVENT _CHANGE = "EVENT_CHANGE" , BI . shor
this . singleValues = [ ] , this . childValueMap = { } , this . fatherValueMap = { } , this . items = BI . deepClone ( this . options . items ) ; var self = this , o = this . options , children = this . _createChildren ( this . items ) ; this . popup = BI . createWidget ( { type : "bi.button_tree" , items : BI . createItems ( children , { } , { adjustLength : - 2 } ) , layouts : [ { type : "bi.vertical" , hgap : this . constants . hgap , vgap : this . constants . vgap } ] , value : this . _digest ( o . value ) , chooseType : o . chooseType } ) , this . popup . on ( BI . ButtonTree . EVENT _CHANGE , function ( value , object ) { var changedValue = value ; if ( BI . isNotNull ( self . childValueMap [ value ] ) ? ( changedValue = self . childValueMap [ value ] , self . fireEvent ( BI . DownListPopup . EVENT _SON _VALUE _CHANGE , changedValue , self . fatherValueMap [ value ] ) ) : self . fireEvent ( BI . DownListPopup . EVENT _CHANGE , changedValue , object ) , ! BI . contains ( self . singleValues , changedValue ) ) { var item = self . getValue ( ) , result = [ ] ; BI . each ( item , function ( i , valueObject ) { valueObject . value != changedValue && result . push ( valueObject ) } ) , self . setValue ( result ) } } ) , BI . createWidget ( { type : "bi.vertical" , element : this , items : [ this . popup ] , vgap : 5 } ) } , _createChildren : function ( items ) { var self = this , result = [ ] ; return BI . each ( items , function ( i , it ) { var item _done = { type : "bi.down_list_group" , items : [ ] } ; if ( BI . each ( it , function ( i , item ) { BI . isNotEmptyArray ( item . children ) && ! BI . isEmpty ( item . el ) ? ( item . type = "bi.combo_group" , item . isDefaultInit = ! 0 , item . cls = "down-list-group" , item . trigger = "hover" , item . isNeedAdjustWidth = ! 1 , item . el . title = item . el . title || item . el . text , item . el . type = "bi.down_list_group_item" , item . el . logic = { dynamic : ! 0 } , item . el . height = self . constants . height , item . el . iconCls2 = self . constants . nextIcon , item . popup = { lgap : 1 , el : { type : "bi.button_tree" , chooseType : 0 , layouts : [ { type : "bi.vertical" } ] } , innerVGap : 5 , maxHeight : 378 } , item . el . childValues = [ ] , BI . each ( item . children , function ( i , child ) { var fatherValue = BI . deepClone ( item . el . value ) , childValue = BI . deepClone ( child . value ) ; self . singleValues . push ( child . value ) , child . type = "bi.down_list_item" , child . extraCls = " child-down-list-item" , child . title = child . title || child . text , child . textRgap = 10 , child . isNeedAdjustWidth = ! 1 , child . logic = { dynamic : ! 0 } , child . father = fatherValue , self . fatherValueMap [ self . _createChildValue ( fatherValue , childValue ) ] = fatherValue , self . childValueMap [ self . _createChildValue ( fatherValue , childValue ) ] = childValue , child . value = self . _createChildValue ( fatherValue , childValue ) , item . el . childValues . push ( child . value ) } ) ) : ( item . type = "bi.down_list_item" , item . title = item . title || item . text , item . textRgap = 10 , item . isNeedAdjustWidth = ! 1 , item . logic = { dynamic : ! 0 } ) ; var el _done = { } ; el _done . el = item , item _done . items . push ( el _done ) } ) , self . _isGroup ( item _done . items ) && BI . each ( item _done . items , function ( i , item ) { self . singleValues . push ( item . el . value ) } ) , result . push ( item _done ) , self . _needSpliter ( i , items . length ) ) { var spliter _container = BI . createWidget ( { type : "bi.vertical" , items : [ { el : { type : "bi.layout" , cls : "bi-down-list-spliter bi-split-top cursor-pointer" , height : 0 } } ] , cls : "bi-down-list-spliter-container cursor-pointer" , vgap : 5 , lgap : 10 , rgap : 0 } ) ; result . push ( spliter _container ) } } ) , result } , _isGroup : function ( i ) { return i . length > 1 } , _needSpliter : function ( i , itemLength ) { return i < itemLength - 1 } , _createChildValue : function ( fatherValue , childValue ) { return fatherValue + "_" + childValue } , _digest : function ( valueItem ) { var self = this , valueArray = [ ] ; return BI . each ( valueItem , function ( i , item ) { var value ; value = BI . isNotNull ( item . childValue ) ? self . _createChildValue ( item . value , item . childValue ) : item . value , valueArray . push ( value ) } ) , valueArray } , _checkValues : function ( values ) { function joinValue ( sources , targets ) { var value = "" ; return BI . some ( sources , function ( idx , s ) { return BI . some ( targets , function ( id , t ) { if ( s === t ) return value = s , ! 0 } ) } ) , value } var value = [ ] ; return BI . each ( this . items , function ( idx , itemGroup ) { BI . each ( itemGroup , function ( id , item ) { if ( BI . isNotNull ( item . children ) ) { var childValues = BI . map ( item . children , "value" ) , v = joinValue ( childValues , values [ idx ] ) ; BI . isNotEmptyString ( v ) && value . push ( v ) } else item . value === values [ idx ] [ 0 ] && value . push ( values [ idx ] [ 0 ] ) } ) } ) , value } , populate : function ( items ) { BI . DownListPopup . superclass . populate . apply ( this , arguments ) , this . items = BI . deepClone ( items ) , this . childValueMap = { } , this . fatherValueMap = { } , this . singleValues = [ ] ; var
this . editor . setState ( dateStr ) , this . editor . setValue ( dateStr ) } , _getText : function ( obj ) { function getPositionText ( baseText , position ) { switch ( position ) { case BI . DynamicDateCard . OFFSET . BEGIN : return baseText + BI . i18nText ( "BI-Basic_Begin_Start" ) ; case BI . DynamicDateCard . OFFSET . END : return baseText + BI . i18nText ( "BI-Basic_End_Stop" ) ; case BI . DynamicDateCard . OFFSET . CURRENT : default : return BI . i18nText ( "BI-Basic_Current_Day" ) } } var value = "" , endText = "" ; return BI . isNotNull ( obj . year ) && ( 0 !== BI . parseInt ( obj . year ) && ( value += Math . abs ( obj . year ) + BI . i18nText ( "BI-Basic_Year" ) + ( obj . year < 0 ? BI . i18nText ( "BI-Basic_Front" ) : BI . i18nText ( "BI-Basic_Behind" ) ) ) , endText = getPositionText ( BI . i18nText ( "BI-Basic_Year" ) , obj . position ) ) , BI . isNotNull ( obj . quarter ) && ( 0 !== BI . parseInt ( obj . quarter ) && ( value += Math . abs ( obj . quarter ) + BI . i18nText ( "BI-Basic_Single_Quarter" ) + ( obj . quarter < 0 ? BI . i18nText ( "BI-Basic_Front" ) : BI . i18nText ( "BI-Basic_Behind" ) ) ) , endText = getPositionText ( BI . i18nText ( "BI-Basic_Single_Quarter" ) , obj . position ) ) , BI . isNotNull ( obj . month ) && ( 0 !== BI . parseInt ( obj . month ) && ( value += Math . abs ( obj . month ) + BI . i18nText ( "BI-Basic_Month" ) + ( obj . month < 0 ? BI . i18nText ( "BI-Basic_Front" ) : BI . i18nText ( "BI-Basic_Behind" ) ) ) , endText = getPositionText ( BI . i18nText ( "BI-Basic_Month" ) , obj . position ) ) , BI . isNotNull ( obj . week ) && ( 0 !== BI . parseInt ( obj . week ) && ( value += Math . abs ( obj . week ) + BI . i18nText ( "BI-Basic_Week" ) + ( obj . week < 0 ? BI . i18nText ( "BI-Basic_Front" ) : BI . i18nText ( "BI-Basic_Behind" ) ) ) , endText = getPositionText ( BI . i18nText ( "BI-Basic_Week" ) , obj . position ) ) , BI . isNotNull ( obj . day ) && ( 0 !== BI . parseInt ( obj . day ) && ( value += Math . abs ( obj . day ) + BI . i18nText ( "BI-Basic_Day" ) + ( obj . day < 0 ? BI . i18nText ( "BI-Basic_Front" ) : BI . i18nText ( "BI-Basic_Behind" ) ) ) , endText = 1 === BI . size ( obj ) ? getPositionText ( BI . i18nText ( "BI-Basic_Month" ) , obj . position ) : "" ) , BI . isNotNull ( obj . workDay ) && 0 !== BI . parseInt ( obj . workDay ) && ( value += Math . abs ( obj . workDay ) + BI . i18nText ( "BI-Basic_Work_Day" ) + ( obj . workDay < 0 ? BI . i18nText ( "BI-Basic_Front" ) : BI . i18nText ( "BI-Basic_Behind" ) ) ) , value + endText } , setValue : function ( v ) { var type , value , self = this , date = BI . getDate ( ) ; switch ( this . storeValue = v , BI . isNotNull ( v ) && ( type = v . type || BI . DynamicDateCombo . Static , value = v . value || v ) , type ) { case BI . DynamicDateCombo . Dynamic : var text = this . _getText ( value ) ; date = BI . DynamicDateHelper . getCalculation ( value ) , this . _setInnerValue ( date , text ) ; break ; case BI . DynamicDateCombo . Static : default : if ( BI . isNull ( value ) || BI . isNull ( value . day ) ) this . editor . setState ( "" ) , this . editor . setValue ( "" ) ; else { var dateStr = BI . print ( BI . getDate ( value . year , value . month - 1 , value . day ) , this . _getFormatString ( ) ) ; this . editor . setState ( dateStr ) , this . editor . setValue ( dateStr ) } } } , setMinDate : function ( minDate ) { BI . isNotEmptyString ( this . options . min ) && ( this . options . min = minDate ) } , setMaxDate : function ( maxDate ) { BI . isNotEmptyString ( this . options . max ) && ( this . options . max = maxDate ) } , getKey : function ( ) { return this . editor . getValue ( ) } , getValue : function ( ) { return this . storeValue } } ) , BI . DynamicDateTrigger . EVENT _BLUR = "EVENT_BLUR" , BI . DynamicDateTrigger . EVENT _FOCUS = "EVENT_FOCUS" , BI . DynamicDateTrigger . EVENT _START = "EVENT_START" , BI . DynamicDateTrigger . EVENT _STOP = "EVENT_STOP" , BI . DynamicDateTrigger . EVENT _CONFIRM = "EVENT_CONFIRM" , BI . DynamicDateTrigger . EVENT _CHANGE = "EVENT_CHANGE" , BI . DynamicDateTrigger . EVENT _VALID = "EVENT_VALID" , BI . DynamicDateTrigger . EVENT _ERROR = "EVENT_ERROR" , BI . DynamicDateTrigger . EVENT _TRIGGER _CLICK = "EVENT_TRIGGER_CLICK" , BI . DynamicDateTrigger . EVENT _KEY _DOWN = "EVENT_KEY_DOWN" , BI . shortcut ( "bi.dynamic_date_trigger" , BI . DynamicDateTrigger ) , BI . DynamicDateTimeCombo = BI . inherit ( BI . Single , { constants : { popupHeight : 259 , popupWidth : 270 , comboAdjustHeight : 1 , border : 1 } , props : { baseCls : "bi-dynamic-date-combo bi-border bi-focus-shadow bi-border-radius" , height : 22 , minDate : "1900-01-01" , maxDate : "2099-12-31" , format : "" , allowEdit : ! 0 } , render : function ( ) { var self = this , opts = this . options ; this . storeTriggerValue = "" ; var date = BI . getDate ( ) ; return this . storeValue = opts . value , { type : "bi.htape" , items : [ { el : { type : "bi.icon_button" , cls : "bi-trigger-icon-button date-change-h-font" , width : opts . height , height : opts . height , ref : function ( ) { self . changeIcon = this } } , width : opts . height } , { type : "bi.absolute" , items : [ { el : { type : "bi.combo" , destroyWhenHide : ! 0 , c
BI . SearchEditor . EVENT _FOCUS = "EVENT_FOCUS" , BI . SearchEditor . EVENT _BLUR = "EVENT_BLUR" , BI . SearchEditor . EVENT _CLICK = "EVENT_CLICK" , BI . SearchEditor . EVENT _KEY _DOWN = "EVENT_KEY_DOWN" , BI . SearchEditor . EVENT _SPACE = "EVENT_SPACE" , BI . SearchEditor . EVENT _BACKSPACE = "EVENT_BACKSPACE" , BI . SearchEditor . EVENT _CLEAR = "EVENT_CLEAR" , BI . SearchEditor . EVENT _START = "EVENT_START" , BI . SearchEditor . EVENT _PAUSE = "EVENT_PAUSE" , BI . SearchEditor . EVENT _STOP = "EVENT_STOP" , BI . SearchEditor . EVENT _CONFIRM = "EVENT_CONFIRM" , BI . SearchEditor . EVENT _CHANGE _CONFIRM = "EVENT_CHANGE_CONFIRM" , BI . SearchEditor . EVENT _VALID = "EVENT_VALID" , BI . SearchEditor . EVENT _ERROR = "EVENT_ERROR" , BI . SearchEditor . EVENT _ENTER = "EVENT_ENTER" , BI . SearchEditor . EVENT _RESTRICT = "EVENT_RESTRICT" , BI . SearchEditor . EVENT _REMOVE = "EVENT_REMOVE" , BI . SearchEditor . EVENT _EMPTY = "EVENT_EMPTY" , BI . shortcut ( "bi.search_editor" , BI . SearchEditor ) , BI . SmallSearchEditor = BI . inherit ( BI . SearchEditor , { _defaultConfig : function ( ) { var conf = BI . SmallSearchEditor . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { baseCls : ( conf . baseCls || "" ) + " bi-small-search-editor" , height : 20 } ) } , _init : function ( ) { BI . SmallSearchEditor . superclass . _init . apply ( this , arguments ) } } ) , BI . shortcut ( "bi.small_search_editor" , BI . SmallSearchEditor ) , BI . TextEditor = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { var conf = BI . TextEditor . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { extraCls : "bi-text-editor bi-border bi-focus-shadow" , hgap : 4 , vgap : 2 , lgap : 0 , rgap : 0 , tgap : 0 , bgap : 0 , validationChecker : BI . emptyFn , quitChecker : BI . emptyFn , allowBlank : ! 1 , watermark : "" , errorText : "" , height : 24 } ) } , _init : function ( ) { BI . TextEditor . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; BI . isNumber ( o . height ) && this . element . css ( { height : o . height - 2 } ) , BI . isNumber ( o . width ) && this . element . css ( { width : o . width - 2 } ) , this . editor = BI . createWidget ( { type : "bi.editor" , height : o . height - 2 , hgap : o . hgap , vgap : o . vgap , lgap : o . lgap , rgap : o . rgap , tgap : o . tgap , bgap : o . bgap , value : o . value , title : o . title , tipType : o . tipType , validationChecker : o . validationChecker , quitChecker : o . quitChecker , allowBlank : o . allowBlank , watermark : o . watermark , errorText : o . errorText } ) , 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 . TextEditor . EVENT _FOCUS ) } ) , this . editor . on ( BI . Editor . EVENT _BLUR , function ( ) { self . fireEvent ( BI . TextEditor . EVENT _BLUR ) } ) , this . editor . on ( BI . Editor . EVENT _CLICK , function ( ) { self . fireEvent ( BI . TextEditor . EVENT _CLICK ) } ) , this . editor . on ( BI . Editor . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . TextEditor . EVENT _CHANGE ) } ) , this . editor . on ( BI . Editor . EVENT _KEY _DOWN , function ( v ) { self . fireEvent ( BI . TextEditor . EVENT _KEY _DOWN ) } ) , this . editor . on ( BI . Editor . EVENT _SPACE , function ( v ) { self . fireEvent ( BI . TextEditor . EVENT _SPACE ) } ) , this . editor . on ( BI . Editor . EVENT _BACKSPACE , function ( v ) { self . fireEvent ( BI . TextEditor . EVENT _BACKSPACE ) } ) , this . editor . on ( BI . Editor . EVENT _VALID , function ( ) { self . fireEvent ( BI . TextEditor . EVENT _VALID ) } ) , this . editor . on ( BI . Editor . EVENT _CONFIRM , function ( ) { self . fireEvent ( BI . TextEditor . EVENT _CONFIRM ) } ) , this . editor . on ( BI . Editor . EVENT _CHANGE _CONFIRM , function ( ) { self . fireEvent ( BI . TextEditor . EVENT _CHANGE _CONFIRM ) } ) , this . editor . on ( BI . Editor . EVENT _REMOVE , function ( v ) { self . fireEvent ( BI . TextEditor . EVENT _REMOVE ) } ) , this . editor . on ( BI . Editor . EVENT _START , function ( ) { self . fireEvent ( BI . TextEditor . EVENT _START ) } ) , this . editor . on ( BI . Editor . EVENT _PAUSE , function ( ) { self . fireEvent ( BI . TextEditor . EVENT _PAUSE ) } ) , this . editor . on ( BI . Editor . EVENT _STOP , function ( ) { self . fireEvent ( BI . TextEditor . EVENT _STOP ) } ) , this . editor . on ( BI . Editor . EVENT _ERROR , function ( ) { self . fireEvent ( BI . TextEditor . EVENT _ERROR , arguments ) } ) , this . editor . on ( BI . Editor . EVENT _ENTER , function ( ) { self . fireEvent ( BI . TextEditor . EVENT _ENTER ) } ) , this . editor . on ( BI . Editor . EVENT _RESTRICT , function ( ) { self . fireEvent ( BI . TextEditor . EVENT _RESTRICT ) } ) , this . editor . on ( BI . Editor . EVENT _EMPTY , function ( ) { self . fireEvent ( BI . TextEditor . EVENT _EMPTY ) } ) , BI . createWidget ( { type : "bi.vertical" , scrolly : ! 1 , element : this , items : [ this . editor ] } ) } , setWaterMark : function ( v ) { this . options . watermark = v , this . editor . setWaterMark ( v ) }
self . combo . isViewVisible ( ) ? self . combo . hideView ( ) : self . combo . showView ( ) } } , right : 0 , bottom : 0 , top : 0 } ] } : combo } , _getBaseConfig : function ( ) { var self = this , o = this . options ; return { type : "bi.combo" , container : o . container , destroyWhenHide : o . destroyWhenHide , adjustLength : 2 , ref : function ( _ref ) { self . combo = _ref } , popup : { el : { type : "bi.multilayer_select_tree_popup" , isDefaultInit : o . isDefaultInit , itemsCreator : o . itemsCreator , items : o . items , ref : function ( _ref ) { self . trigger && self . trigger . getSearcher ( ) . setAdapter ( _ref ) } , listeners : [ { eventName : BI . MultiLayerSelectTreePopup . EVENT _CHANGE , action : function ( ) { self . setValue ( this . getValue ( ) ) , self . combo . hideView ( ) , self . fireEvent ( BI . MultiLayerSelectTreeCombo . EVENT _CHANGE ) } } ] , onLoaded : function ( ) { BI . nextTick ( function ( ) { self . combo . adjustWidth ( ) , self . combo . adjustHeight ( ) } ) } } , value : o . value , maxHeight : 400 , minHeight : 240 } , listeners : [ { eventName : BI . Combo . EVENT _BEFORE _POPUPVIEW , action : function ( ) { self . fireEvent ( BI . MultiLayerSelectTreeCombo . EVENT _BEFORE _POPUPVIEW ) } } ] } } , _getSearchConfig : function ( ) { var self = this , o = this . options ; return { el : { type : "bi.multilayer_select_tree_trigger" , container : o . container , allowInsertValue : o . allowInsertValue , allowSearchValue : o . allowSearchValue , allowEdit : o . allowEdit , cls : "multilayer-select-tree-trigger" , ref : function ( _ref ) { self . trigger = _ref } , items : o . items , itemsCreator : o . itemsCreator , valueFormatter : o . valueFormatter , watermark : o . watermark , height : o . height - 2 , text : o . text , value : o . value , tipType : o . tipType , warningTitle : o . warningTitle , title : o . title , listeners : [ { eventName : BI . MultiLayerSelectTreeTrigger . EVENT _CHANGE , action : function ( ) { self . setValue ( this . getValue ( ) ) , self . combo . hideView ( ) , self . fireEvent ( BI . MultiLayerSelectTreeCombo . EVENT _CHANGE ) } } , { eventName : BI . MultiLayerSelectTreeTrigger . EVENT _FOCUS , action : function ( ) { self . fireEvent ( BI . MultiLayerSelectTreeCombo . EVENT _FOCUS ) } } , { eventName : BI . MultiLayerSelectTreeTrigger . EVENT _BLUR , action : function ( ) { self . fireEvent ( BI . MultiLayerSelectTreeCombo . EVENT _BLUR ) } } , { eventName : BI . MultiLayerSelectTreeTrigger . EVENT _SEARCHING , action : function ( ) { self . fireEvent ( BI . MultiLayerSelectTreeCombo . EVENT _SEARCHING ) } } , { eventName : BI . MultiLayerSelectTreeTrigger . EVENT _ADD _ITEM , action : function ( ) { var value = self . trigger . getSearcher ( ) . getKeyword ( ) ; self . combo . setValue ( [ value ] ) , self . combo . hideView ( ) } } ] } , toggle : ! o . allowEdit , hideChecker : function ( e ) { return ! ( o . container && self . trigger . getSearcher ( ) . isSearching ( ) && self . trigger . getSearcher ( ) . getView ( ) . element . find ( e . target ) . length > 0 ) && 0 === self . triggerBtn . element . find ( e . target ) . length } , listeners : [ { eventName : BI . Combo . EVENT _AFTER _HIDEVIEW , action : function ( ) { self . trigger . stopEditing ( ) } } , { eventName : BI . Combo . EVENT _BEFORE _POPUPVIEW , action : function ( ) { self . fireEvent ( BI . MultiLayerSelectTreeCombo . EVENT _BEFORE _POPUPVIEW ) } } ] } } , _getSyncConfig : function ( ) { var o = this . options , baseConfig = this . _getBaseConfig ( ) ; return BI . extend ( baseConfig , o . allowEdit ? this . _getSearchConfig ( ) : { el : { type : "bi.single_tree_trigger" , text : o . text , height : o . height , items : o . items , value : o . value } } ) } , _getAsyncConfig : function ( ) { var config = this . _getBaseConfig ( ) ; return BI . extend ( config , this . _getSearchConfig ( ) ) } , setValue : function ( v ) { v = BI . isArray ( v ) ? v : [ v ] , this . combo . setValue ( v ) } , getValue : function ( ) { return this . combo . getValue ( ) } , populate : function ( items ) { this . combo . populate ( items ) } } ) , BI . MultiLayerSelectTreeCombo . EVENT _SEARCHING = "EVENT_SEARCHING" , BI . MultiLayerSelectTreeCombo . EVENT _BLUR = "EVENT_BLUR" , BI . MultiLayerSelectTreeCombo . EVENT _FOCUS = "EVENT_FOCUS" , BI . MultiLayerSelectTreeCombo . EVENT _CHANGE = "EVENT_CHANGE" , BI . MultiLayerSelectTreeCombo . EVENT _BEFORE _POPUPVIEW = "EVENT_BEFORE_POPUPVIEW" , BI . shortcut ( "bi.multilayer_select_tree_combo" , BI . MultiLayerSelectTreeCombo ) , BI . MultiLayerSelectTreeInsertSearchPane = BI . inherit ( BI . Widget , { props : function ( ) { return { baseCls : "bi-multilayer-select-tree-popup" , tipText : BI . i18nText ( "BI-No_Selected_Item" ) , isDefaultInit : ! 1 , itemsCreator : BI . emptyFn , items : [ ] , value : "" } } , render : function ( ) { var self = this , o = this . options ; return this . tree = BI . createWidget ( { type : "bi.multilayer_select_level_tree" , isDefaultInit : o . isDefaultInit , items : o . items , itemsCreator : o . itemsCreator === BI . emptyFn ? BI . emptyFn : function ( op , callback ) { o . itemsCreator
type : "bi.adaptive" , element : this , scrollable : o . scrollable , items : [ this . tree ] } ) } , _populate : function ( ) { BI . MultiLayerSelectLevelTree . superclass . populate . apply ( this , arguments ) } , populate : function ( nodes ) { this . _populate ( nodes ) , BI . isNull ( nodes ) ? this . tree . populate ( ) : this . tree . populate ( this . _formatItems ( BI . Tree . transformToTreeFormat ( nodes ) , 0 ) ) } , setValue : function ( v ) { this . options . chooseType === BI . Selection . None || ( this . storeValue = v , this . tree . setValue ( v ) ) } , getValue : function ( ) { return BI . isArray ( this . storeValue ) ? this . storeValue : BI . isNull ( this . storeValue ) ? [ ] : [ this . storeValue ] } , getAllLeaves : function ( ) { return this . tree . getAllLeaves ( ) } , getNodeById : function ( id ) { return this . tree . getNodeById ( id ) } , getNodeByValue : function ( id ) { return this . tree . getNodeByValue ( id ) } } ) , BI . MultiLayerSingleLevelTree . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.multilayer_single_level_tree" , BI . MultiLayerSingleLevelTree ) , BI . MultiLayerSingleTreePopup = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . MultiLayerSingleTreePopup . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-multilayer-singletree-popup" , tipText : BI . i18nText ( "BI-No_Selected_Item" ) , isDefaultInit : ! 1 , itemsCreator : BI . emptyFn , items : [ ] , onLoaded : BI . emptyFn } ) } , _init : function ( ) { BI . MultiLayerSingleTreePopup . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . tree = BI . createWidget ( { type : "bi.multilayer_single_level_tree" , isDefaultInit : o . isDefaultInit , items : o . items , itemsCreator : o . itemsCreator , keywordGetter : o . keywordGetter , value : o . value , scrollable : null , onLoaded : function ( ) { self . tree . check ( ) , o . onLoaded ( ) } } ) , BI . createWidget ( { type : "bi.vertical" , scrolly : ! 1 , scrollable : ! 0 , element : this , vgap : 5 , items : [ this . tree ] } ) , this . tree . on ( BI . Controller . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . Controller . EVENT _CHANGE , arguments ) } ) , this . tree . on ( BI . MultiLayerSingleLevelTree . EVENT _CHANGE , function ( ) { self . fireEvent ( BI . MultiLayerSingleTreePopup . EVENT _CHANGE ) } ) } , getValue : function ( ) { return this . tree . getValue ( ) } , setValue : function ( v ) { v = BI . isArray ( v ) ? v : [ v ] , this . tree . setValue ( v ) } , populate : function ( items ) { this . tree . populate ( items ) } } ) , BI . MultiLayerSingleTreePopup . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.multilayer_single_tree_popup" , BI . MultiLayerSingleTreePopup ) , BI . MultiLayerSingleTreeTrigger = BI . inherit ( BI . Trigger , { props : function ( ) { return { extraCls : "bi-multi-layer-single-tree-trigger bi-border bi-focus-shadow bi-border-radius" , height : 24 , valueFormatter : function ( v ) { return v } , itemsCreator : BI . emptyFn , watermark : BI . i18nText ( "BI-Basic_Search" ) , allowSearchValue : ! 1 , title : BI . bind ( this . _getShowText , this ) } } , render : function ( ) { var self = this , o = this . options ; o . itemsCreator === BI . emptyFn && this . _initData ( ) ; var content = { type : "bi.htape" , items : [ { el : { type : "bi.searcher" , ref : function ( ) { self . searcher = this } , masker : BI . isNotNull ( o . container ) ? { offset : { } , container : o . container } : { offset : { } } , isAutoSearch : ! 1 , el : { type : "bi.state_editor" , ref : function ( ) { self . editor = this } , defaultText : o . text , text : this . _digest ( o . value ) , value : o . value , height : o . height , tipText : "" , watermark : o . watermark , listeners : [ { eventName : BI . StateEditor . EVENT _FOCUS , action : function ( ) { self . fireEvent ( BI . MultiLayerSingleTreeTrigger . EVENT _FOCUS ) } } , { eventName : BI . StateEditor . EVENT _BLUR , action : function ( ) { self . fireEvent ( BI . MultiLayerSingleTreeTrigger . EVENT _BLUR ) } } , { eventName : BI . StateEditor . EVENT _CHANGE , action : function ( ) { self . fireEvent ( BI . MultiLayerSingleTreeTrigger . EVENT _SEARCHING ) } } ] } , popup : { type : o . allowInsertValue ? "bi.multilayer_single_tree_insert_search_pane" : "bi.multilayer_single_tree_popup" , itemsCreator : o . itemsCreator === BI . emptyFn ? BI . emptyFn : function ( op , callback ) { op . keyword = self . editor . getValue ( ) , o . itemsCreator ( op , callback ) } , keywordGetter : function ( ) { return self . editor . getValue ( ) } , cls : "bi-card" , listeners : [ { eventName : BI . MultiLayerSingleTreeInsertSearchPane . EVENT _ADD _ITEM , action : function ( ) { self . options . text = self . getSearcher ( ) . getKeyword ( ) , self . fireEvent ( BI . MultiLayerSingleTreeTrigger . EVENT _ADD _ITEM ) } } ] , ref : function ( _ref ) { self . popup = _ref } } , onSearch : function ( obj , callback ) { var keyword = obj . keyword ; o . itemsCreator === BI . emptyFn ? ( callback ( self . _getSearchItems ( keyword ) ) , o . allowInsertValue && self . popup . setKe
BI . MultiSelectCombo . EVENT _SEARCHING = "EVENT_SEARCHING" , BI . MultiSelectCombo . EVENT _CLICK _ITEM = "EVENT_CLICK_ITEM" , BI . MultiSelectCombo . EVENT _CONFIRM = "EVENT_CONFIRM" , BI . shortcut ( "bi.multi_select_combo" , BI . MultiSelectCombo ) , BI . MultiSelectNoBarCombo = BI . inherit ( BI . Single , { _defaultConfig : function ( ) { return BI . extend ( BI . MultiSelectNoBarCombo . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-multi-select-combo-no-bar" , itemsCreator : BI . emptyFn , valueFormatter : BI . emptyFn , height : 24 , attributes : { tabIndex : 0 } } ) } , _init : function ( ) { BI . MultiSelectNoBarCombo . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options , assertShowValue = function ( ) { BI . isKey ( self . _startValue ) && ( self . storeValue . type === BI . Selection . All ? ( BI . remove ( self . storeValue . value , self . _startValue ) , self . storeValue . assist = self . storeValue . assist || [ ] , self . storeValue . assist . pushDistinct ( self . _startValue ) ) : ( BI . pushDistinct ( self . storeValue . value , self . _startValue ) , BI . remove ( self . storeValue . assist , self . _startValue ) ) ) , self . trigger . getSearcher ( ) . setState ( self . storeValue ) , self . numberCounter . setButtonChecked ( self . storeValue ) } ; this . storeValue = { type : BI . Selection . Multi , value : o . value || [ ] } , this . requesting = ! 1 , this . trigger = BI . createWidget ( { type : "bi.multi_select_trigger" , height : o . height , text : o . text , masker : { offset : { left : 0 , top : 0 , right : 0 , bottom : 25 } } , valueFormatter : o . valueFormatter , itemsCreator : BI . bind ( this . _itemsCreator4Trigger , this ) , value : { type : BI . Selection . Multi , value : o . value } } ) , this . trigger . on ( BI . MultiSelectTrigger . EVENT _FOCUS , function ( ) { self . fireEvent ( BI . MultiSelectNoBarCombo . EVENT _FOCUS ) } ) , this . trigger . on ( BI . MultiSelectTrigger . EVENT _BLUR , function ( ) { self . fireEvent ( BI . MultiSelectNoBarCombo . EVENT _BLUR ) } ) , this . trigger . on ( BI . MultiSelectTrigger . EVENT _START , function ( ) { self . _setStartValue ( "" ) , this . getSearcher ( ) . setValue ( self . storeValue ) } ) , this . trigger . on ( BI . MultiSelectTrigger . EVENT _STOP , function ( ) { self . _setStartValue ( "" ) , self . fireEvent ( BI . MultiSelectNoBarCombo . EVENT _STOP ) } ) , this . trigger . on ( BI . MultiSelectTrigger . 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 ( ) ) } ) } ) , this . trigger . on ( BI . MultiSelectTrigger . EVENT _CHANGE , function ( value , obj ) { obj instanceof BI . MultiSelectBar ? self . _joinAll ( this . getValue ( ) , function ( ) { assertShowValue ( ) } ) : self . _join ( this . getValue ( ) , function ( ) { assertShowValue ( ) } ) , self . fireEvent ( BI . MultiSelectNoBarCombo . EVENT _CLICK _ITEM ) } ) , this . trigger . on ( BI . MultiSelectTrigger . EVENT _BEFORE _COUNTER _POPUPVIEW , function ( ) { self . numberCounter . updateSelectedValue ( self . storeValue ) } ) , this . trigger . on ( BI . MultiSelectTrigger . EVENT _COUNTER _CLICK , function ( ) { self . combo . isViewVisible ( ) || self . combo . showView ( ) } ) , this . combo = BI . createWidget ( { type : "bi.combo" , toggle : ! 1 , container : o . container , el : this . trigger , adjustLength : 1 , popup : { type : "bi.multi_select_no_bar_popup_view" , ref : function ( ) { self . popup = this , self . trigger . setAdapter ( this ) , self . numberCounter . setAdapter ( this ) } , listeners : [ { eventName : BI . MultiSelectPopupView . EVENT _CHANGE , action : function ( ) { self . storeValue = this . getValue ( ) , self . _adjust ( function ( ) { assertShowValue ( ) } ) , self . fireEvent ( BI . MultiSelectNoBarCombo . EVENT _CLICK _ITEM ) } } , { eventName : BI . MultiSelectPopupView . EVENT _CLICK _CONFIRM , action : function ( ) { self . _defaultState ( ) } } , { eventName : BI . MultiSelectPopupView . EVENT _CLICK _CLEAR , action : function ( ) { self . setValue ( ) , self . _defaultState ( ) } } ] , itemsCreator : o . itemsCreator , valueFormatter : o . valueFormatter , onLoaded : function ( ) { BI . nextTick ( function ( ) { self . combo . adjustWidth ( ) , self . combo . adjustHeight ( ) , self . numberCounter . adjustView ( ) , self . trigger . getSearcher ( ) . adjustView ( ) } ) } } , value : { type : BI . Selection . Multi , value : o . value } , hideChecker : function ( e ) { return 0 === triggerBtn . element . find ( e . target ) . length && 0 === self . numberCounter . element . find ( e . target ) . length } } ) , this . combo . on ( BI . Combo . EVENT _BEFORE _POPUPVIEW , function ( ) { this . setValue ( self . storeValue ) , BI . nextTick ( function ( ) { self . populate ( ) } ) } ) , this . wants2Quit = ! 1 , this
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 : ! 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 } ) , BI . createWidget ( BI . extend ( { element : this } , BI . LogicFactory . createLogic ( BI . LogicFactory . createLogicTypeByDirection ( BI . Direction . Top ) , BI . extend ( { scrolly : ! 0 , vgap : 5 } , opts . logic , { items : BI . LogicFactory . createLogicItemsByDirection ( BI . Direction . Top , this . button _group ) } ) ) ) ) , 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 . MultiSelectLoader . 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 - 10 ) } , resetWi
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 ) } , getState : function ( ) { return this . editor . getState ( ) } , 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 . createWidget ( o . el , { type : "bi.multi_select_check_selected_button" , itemsCreator : o . itemsCreator , value : o . value } ) , this . button . on ( BI . Events . VIEW , function ( ) { self . fireEvent ( BI . Events . VIEW , arguments ) } ) , this . switcher = BI . createWidget ( { type : "bi.switcher" , toggle : ! 1 , element : this , el : this . button , popup : BI . extend ( { type : "bi.multi_select_check_pane" , valueFormatter : o . valueFormatter , itemsCreator : o . itemsCreator , onClickContinueSelect : function ( ) { self . switcher . hideView ( ) } , ref : function ( _ref ) { self . checkPane = _ref } , value : o . value } , o . popup ) , adapter : o . adapter , masker : o . masker } ) , this . switcher . on ( BI . Switcher . EVENT _TRIGGER _CHANGE , function ( ) { self . fireEvent ( BI . MultiSelectCheckSelectedSwitcher . EVENT _TRIGGER _CHANGE ) } ) , this . switcher . on ( BI . Switcher . EVENT _BEFORE _POPUPVIEW , function ( ) { self . fireEvent ( BI . MultiSelectCheckSelectedSwitcher . EVENT _BEFORE _POPUPVIEW ) } ) , this . switcher . on ( BI . Switcher . EVENT _AFTER _POPUPVIEW , function ( ) { var me = this ; BI . nextTick ( function ( ) { me . populate ( ) } ) } ) } , adjustView : function ( ) { this . switcher . adjustView ( ) } , hideView : function ( ) { this . switcher . empty ( ) , this . switcher . hideView ( ) } , setAdapter : function ( adapter ) { this . switcher . setAdapter ( adapter ) } , setValue : function ( v ) { this . switcher . setValue ( v ) } , updateSelectedValue : function ( v ) { this . checkPane . setValue ( v ) } , setButtonChecked : function ( v ) { this . button . setValue ( v ) } , getValue : function ( ) { } , populate : function ( items ) { this . switcher . populate . apply ( this . switcher , arguments ) } , populateSwitcher : function ( ) { this . button . populate . apply ( this . button , arguments ) } } ) , BI . MultiSelectCheckSelectedSwitcher . EVENT _TRIGGER _CHANGE = "EVENT_TRIGGER_CHANGE" , BI . MultiSelectCheckSelectedSwitcher . EVENT _BEFORE _POPUPVIEW = "EVENT_BEFORE_POPUPVIEW" , BI . shortcut ( "bi.multi_select_check_selected_switcher" , BI . MultiSelectCheckSelectedSwitcher ) , BI . MultiSelectInsertList = BI . inherit ( BI . Single , { _defaultConfig : function ( ) { return BI . extend ( BI . MultiSelectInsertList . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-multi-select-insert-list" , itemsCreator : BI . emptyFn , valueFormatter : BI . emptyFn } ) } , _init : function ( ) { BI . MultiSelectInsertList . superclass . _init . apply ( this , arguments ) ; var self = this , o = this . options ; this . storeValue = o . value || { } ; var assertShowValue = function ( ) { BI . isKey ( self . _startValue ) && ( self . storeValue . type === BI . Selection . All ? BI . remove ( self . storeValue . value , self . _startValue ) : BI . pushDistinct ( self . storeValue . value , self . _startValue ) ) } ; this . adapter = BI . createWidget
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 . setValue ( self . storeValue ) , self . populate ( ) , self . fireEvent ( BI . MultiTreeCombo . EVENT _BEFORE _POPUPVIEW ) ) } ) , this . combo . on ( BI . Combo . EVENT _BEFORE _HIDEVIEW , function ( ) { isSearching ( ) ? ( self . _stopEditing ( ) , self . fireEvent ( BI . MultiTreeCombo . EVENT _CONFIRM ) ) : isPopupView ( ) && ( self . _stopEditing ( ) , self . storeValue = { value : self . combo . getValue ( ) } , clear === ! 0 && ( self . storeValue = { value : { } } ) , self . fireEvent ( BI . MultiTreeCombo . EVENT _CONFIRM ) ) , clear = ! 1 , change = ! 1 } ) ; var triggerBtn = BI . createWidget ( { type : "bi.trigger_icon_button" , width : o . height , height : o . height , cls : "multi-select-trigger-icon-button" } ) ; triggerBtn . on ( BI . TriggerIconButton . EVENT _CHANGE , function ( ) { self . numberCounter . hideView ( ) , self . combo . isViewVisible ( ) ? self . combo . hideView ( ) : self . combo . showView ( ) } ) , this . numberCounter = BI . createWidget ( { type : "bi.multi_select_check_selected_switcher" , el : { type : "bi.multi_tree_check_selected_button" } , popup : { type : "bi.multi_tree_check_pane" } , masker : { offset : this . constants . offset } , itemsCreator : o . itemsCreator , valueFormatter : o . valueFormatter , value : { value : o . value || { } } } ) , this . numberCounter . on ( BI . MultiSelectCheckSelectedSwitcher . EVENT _TRIGGER _CHANGE , function ( ) { self . combo . isViewVisible ( ) || self . combo . showView ( ) } ) , this . numberCounter . on ( BI . MultiSelectCheckSelectedSwitcher . EVENT _BEFORE _POPUPVIEW , function ( ) { want2showCounter === ! 1 && ( want2showCounter = ! 0 ) , isInit === ! 0 && ( want2showCounter = null , showCounter ( ) ) } ) , this . numberCounter . on ( BI . Events . VIEW , function ( b ) { BI . nextTick ( function ( ) { self . trigger . refreshPlaceHolderWidth ( b === ! 0 ? self . numberCounter . element . outerWidth ( ) + 8 : 0 ) } ) } ) , this . trigger . element . click ( function ( e ) { self . trigger . element . find ( e . target ) . length > 0 && self . numberCounter . hideView ( ) } ) , BI . createWidget ( { type : "bi.absolute" , element : this , items : [ { el : this . combo , left : 0 , right : 0 , top : 0 , bottom : 0 } , { el : triggerBtn , right : 0 , top : 0 , bottom : 0 } , { el : { type : "bi.vertical_adapt" , items : [ this . numberCounter ] } , right : o . height , top : 0 , height : o . height } ] } ) } , _stopEditing : function ( ) { this . trigger . stopEditing ( ) , this . numberCount
} ) , count > 20 ? this . editor . setState ( BI . Selection . Multi ) : this . editor . setState ( text ) } } , getState : function ( ) { return this . editor . getState ( ) } , 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" , height : o . height - 2 , element : this , items : [ this . editor , { el : { type : "bi.grid" , columns : 1 , rows : 2 , items : [ { column : 0 , row : 0 , el : this . topBtn } , { column : 0 , row : 1 , el : this . bottomBtn } ] } , width : 23 } ] } ) } , focus : function ( ) { this . editor . focus ( ) } , isEditing : function ( ) { return this . editor . isEditing ( ) } , _finetuning : function ( add ) { var v = BI . parseFloat ( this . getValue ( ) ) ; this . setValue ( BI . add ( v , add ) ) } , setUpEnable : function ( v ) { this . topBtn . setEnable ( ! ! v ) } , setDownEnable : function ( v ) { this . bottomBtn . setEnable ( ! ! v ) } , getLastValidValue : function ( ) { return this . editor . getLastValidValue ( ) } , getLastChangedValue : function ( ) { return this . editor . getLastChangedValue ( ) } , getValue : function ( ) { return this . options . value } , setValue : function ( v ) { var o = this . options ; o . value = v , this . editor . setValue ( o . valueFormatter ( v ) ) } } ) , BI . NumberEditor . EVENT _CONFIRM = "EVENT_CONFIRM" , BI . NumberEditor . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.number_editor" , BI . NumberEditor ) , BI . NumberInterval = BI . inherit ( BI . Single , { constants : { typeError : "typeBubble" , numberError : "numberBubble" , signalError : "signalBubble" , editorWidth : 114 , columns : 5 , width : 24 , rows : 1 , numberErrorCls : "number-error" , border : 1 , less : 0 , less _equal : 1 , numTip : "" , adjustYOffset : 2 } , _defaultConfig : function ( ) { var conf = BI . NumberInterval . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { extraCls : "bi-number-interval" + ( BI . isIE ( ) && BI . getIEVersion ( ) < 10 ? " hack" : "" ) , height : 24 , validation : "valid" , closeMin : ! 0 , allowBlank : ! 0 , watermark : BI . i18nText ( "BI-Basic_Unrestricted" ) } ) } , _init : function ( ) { var self = this , c = this . constants , o = this . options ; BI . NumberInterval . superclass . _init . apply ( this , arguments ) , this . smallEditor = BI . createWidget ( { t
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 . fireEvent ( BI . SearchMultiSelectPopupView . EVENT _CLICK _CONFIRM ) } } ) } , isAllSelected : function ( ) { return this . loader . isAllSelected ( ) } , setStartValue : function ( v ) { this . loader . setStartValue ( v ) } , setValue : function ( v ) { this . popupView . setValue ( v ) } , getValue : function ( ) { return this . popupView . getValue ( ) } , populate : function ( items ) { this . popupView . populate . apply ( this . popupView , arguments ) } , resetHeight : function ( h ) { this . popupView . resetHeight ( h ) } , resetWidth : function ( w ) { this . popupView . resetWidth ( w ) } } ) , BI . SearchMultiSelectPopupView . EVENT _CHANGE = "EVENT_CHANGE" , BI . SearchMultiSelectPopupView . EVENT _CLICK _CONFIRM = "EVENT_CLICK_CONFIRM" , BI . SearchMultiSelectPopupView . EVENT _CLICK _CLEAR = "EVENT_CLICK_CLEAR" , BI . shortcut ( "bi.search_multi_select_popup_view" , BI . SearchMultiSelectPopupView ) , BI . SearchMultiSelectSearcher = BI . inherit ( BI . Widget , { _defaultConfig : function ( ) { return BI . extend ( BI . SearchMultiSelectSearcher . superclass . _defaultConfig . apply ( this , arguments ) , { baseCls : "bi-multi-select-searcher" , itemsCreator : BI . emptyFn , el : { } , popup : { } , valueFormatter : BI . emptyFn , adapter : null , masker : { } } ) } , _init : function ( ) { BI . SearchMultiSelectSearcher . 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 , tipType : o . tipType , warningTitle : o . warningTitle } ) , this . searcher = BI . createWidget ( { type : "bi.searcher" , allowSearchBlank : ! 1 , 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 ) } , va
} ) , 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 . stopEditing ( ) , self . requesting === ! 0 ? self . wants2Quit = ! 0 : self . fireEvent ( BI . SingleSelectInsertCombo . EVENT _CONFIRM ) } ) ; var triggerBtn = BI . createWidget ( { type : "bi.trigger_icon_button" , width : o . height , height : o . height , cls : "single-select-trigger-icon-button" } ) ; triggerBtn . on ( BI . TriggerIconButton . EVENT _CHANGE , function ( ) { self . combo . isViewVisible ( ) ? self . combo . hideView ( ) : self . combo . showView ( ) } ) , BI . createWidget ( { type : "bi.absolute" , element : this , items : [ { el : this . combo , left : 0 , right : 0 , top : 0 , bottom : 0 } , { el : triggerBtn , right : 0 , top : 0 , bottom : 0 } ] } ) } , _defaultState : function ( ) { this . trigger . stopEditing ( ) , this . combo . hideView ( ) } , _assertValue : function ( val ) { } , _makeMap : function ( values ) { return BI . makeObject ( values || [ ] ) } , _joinKeywords : function ( keywords , callback ) { function digest ( items ) { var selectedMap = self . _makeMap ( items ) ; BI . each ( keywords , function ( i , val ) { BI . isNotNull ( selectedMap [ val ] ) && BI . remove ( self . storeValue . value , val ) } ) , self . _adjust ( callback ) } var self = this , o = this . options ; this . _assertValue ( this . storeValue ) , this . requesting = ! 0 , o . itemsCreator ( { type : BI . SingleSelectInsertCombo . REQ _GET _ALL _DATA , keywords : keywords } , function ( ob ) { var values = BI . map ( ob . items , "value" ) ; digest ( values ) } ) } , _adjust : function ( callback ) { function adjust ( ) { self . wants2Quit === ! 0 && ( self . fireEvent ( BI . SingleSelectInsertCombo . EVENT _CONFIRM ) , self . wants2Quit = ! 1 ) , self . requesting = ! 1 } var self = this , o = this . options ; adjust ( ) , callback ( ) } , _setStartValue : function ( value ) { this . _startValue = value , this . popup . setStartValue ( value ) } , setValue : function ( v ) { this . storeValue = v , this . _assertValue ( this . storeValue ) , this . combo . setValue ( this . storeValue ) } , getValue : function ( ) { return this . storeValue } , populate : function ( ) { this . combo . populate . apply ( this . combo , arguments ) } } ) , BI . extend ( BI . SingleSelectInsertCombo , { REQ
} ] } ] , 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 } , _getValueByPercent : function ( percent ) { var thousandth = BI . parseInt ( 10 * percent ) ; return ( this . max - this . min ) * thousandth / 1e3 + this . min } , _getPercentByValue : function ( v ) { return 100 * ( v - this . min ) / ( this . max - this . min ) } , getValue : function ( ) { return this . value } , setValue : function ( v ) { var o = this . options ; v = BI . parseFloat ( v ) , v = o . digit === ! 1 ? v : v . toFixed ( o . digit ) , isNaN ( v ) || ( this . _checkValidation ( v ) && ( this . value = v ) , v > this . max && ( this . value = this . max ) , v < this . min && ( this . value = this . min ) ) } , _setEnable : function ( b ) { BI . SingleSlider . superclass . _setEnable . apply ( this , [ b ] ) , b ? this . blueTrack . element . removeClass ( "disabled-blue-track" ) . addClass ( "blue-track" ) : this . blueTrack . element . removeClass ( "blue-track" ) . addClass ( "disabled-blue-track" ) } , setMinAndMax : function ( v ) { var minNumber = BI . parseFloat ( v . min ) , maxNumber = BI . parseFloat ( v . max ) ; ! isNaN ( minNumber ) && ! isNaN ( maxNumber ) && maxNumber > minNumber && ( this . min = minNumber , this . max = maxNumber ) } , reset : function ( ) { this . _setVisible ( ! 1 ) , this . enable = ! 1 , this . value = "" , this . min = 0 , this . max = 0 , this . _setBlueTrack ( 0 ) } , populate : function ( ) { isNaN ( this . min ) || isNaN ( this . max ) || ( this . _setVisible ( ! 0 ) , this . enable = ! 0 , this . label . setErrorText ( BI . i18nText ( "BI-Basic_Please_Enter_Number_Between" , this . min , this . max ) ) , BI . isNumeric ( this . value ) || BI . isNotEmptyString ( this . value ) ? ( this . label . setValue ( this . value ) , this . _setAllPosition ( this . _getPercentByValue ( this . value ) ) ) : ( this . label . setValue ( this . max ) , this . _setAllPosition ( 100 ) ) ) } } ) , BI . SingleSlider . EVENT _CHANGE = "EVENT_CHANGE" , BI . shortcut ( "bi.single_slider" , BI . SingleSlider ) , BI . SingleSliderLabel = BI . inherit ( BI . Single , { _constant : { EDITOR _WIDTH : 90 , EDIT
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 _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 = "EVENT_CHANGE" , BI . shortcut ( "bi.date_interval" , BI . DateInterval ) , BI . TimeInterval = BI . inherit ( BI . Single , { constants : { height : 24 , width : 24 , lgap : 15 , offset : 0 , timeErrorCls : "time-error" } , _defaultConfig : function ( ) { var conf = BI . TimeInterval . superclass . _defaultConfig . apply ( this , arguments ) ; return BI . extend ( conf , { extraCls : "bi-time-interval" , minDate : "1900-01-01" , maxDate : "2099-12-31" } ) } , _init : function ( ) { var self = this , o = this . options ; BI . TimeInterval . superclass . _init . apply ( this , arguments ) , o . value = o . value || { } , this . left = this . _createCombo ( o . value . start ) , this . right = this . _createCombo ( o . value . end ) , this . label = BI . createWidget ( { type : "bi.label" , height : this . constants . height , width : this . constants . width , text : "-" } ) , BI . createWidget ( { element : self , type : "bi.center" , 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_time_combo" , behaviors : o . behaviors , value : v } ) ; return combo . on ( BI . DynamicDateTimeCombo . EVENT _ERROR , function ( ) { self . _clearTitle ( ) , BI . Bubbles . hide ( "error" ) , self . element . removeClass ( self . constants . timeErrorCls ) , self . fireEvent ( BI . TimeInterval . EVENT _ERROR ) } ) , combo
} } ) , 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 ( ) ) ; self . year . setValue ( { year : date . getFullYear ( ) , month : date . getMonth ( ) + 1 } ) , self . _setInnerValue ( ) ; break ; case BI . DynamicYearCombo . Dynamic : default : self . storeValue && self . storeValue . type === BI . DynamicYearCombo . Dynamic ? self . dynamicPane . setValue ( self . storeValue . value ) : self . dynamicPane . setValue ( { year : 0 } ) , self . _setInnerValue ( ) } } } ] } } , setMinDate : function ( minDate ) { this . options . min !== minDate && ( this . options . min = minDate , this . year . setMinDate ( minDate ) ) } , setMaxDate : function ( maxDate ) { this . options . max !== maxDate && ( this . options . max = maxDate , this . year . setMaxDate ( maxDate ) ) } , setValue : function ( v ) { this . storeValue = v ; var self = this , type , value ; switch ( v = v || { } , type = v . type || BI . DynamicDateCombo . Static , value = v . value || v , this . dateTab . setSelect ( type ) , type ) { case BI . DynamicDateCombo . Dynamic : this . dynamicPane . setValue ( value ) , self . _setInnerValue ( ) ; break ; case BI . DynamicDateCombo . Static : default : this . year . setValue ( value ) , this . textButton . setValue (
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 } } } , setValue : function ( v ) { var value = this . _digestValue ( v ) ; this . combo . setValue ( value ) } , getValue : function ( ) { var obj = this . combo . getValue ( ) || { } ; if ( obj . value = obj . value || [ ] , obj . type === BI . Selection . All ) { var values = [ ] ; return BI . each ( this . options . items , function ( idx , item ) { ! BI . contains ( obj . value , item . value ) && values . push ( item . value ) } ) , values } return obj . value || [ ] } , populate : function ( items ) { this . options . items = items , this . combo . populate . apply ( this , arguments ) } , _digestValue : function ( v ) { return { type : BI . Selection . Multi , value : v || [ ] } } } ) , BI . AllValueMultiTextValueCombo . EVENT _CONFIRM = "EVENT_CONFIRM" , BI . shortcut ( "bi.all_value_multi_text_value_combo" , BI . AllValueMultiTextVal
} ) } , _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 } , _getItemsByTimes : function ( items , times ) { for ( var res = [ ] , i = ( times - 1 ) * this . _const . perPage ; items [ i ] && i < times * this . _const . perPage ; i ++ ) res . push ( items [ i ] ) ; return res } , _hasNextByTimes : function ( items , times ) { return times * this . _const . perPage < items . length } , _itemsCreator : function ( options , callback ) { function call ( items ) { var keywords = ( options . keywords || [ ] ) . slice ( ) , 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 : 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 , allowEdit : o . allowEdit , 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 , allowEdit : o . allowEdit , text : o . text , value : o . value , itemsCreator : BI . bind ( this . _itemsCreator , this ) , valueFormatter : BI . bind ( this . _valueFormatter , this ) , width : o . wi
! 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 o ( e ) { return e && e . _ _esModule ? e : { "default" : e } } ( r ( 143 ) ) ; BI . extend ( BI , n [ "default" ] ) } , 143 : function ( e , t , r ) { "use strict" ; function i ( e ) { return ( i = "function" == typeof Symbol && "symbol" == typeof Symbol . iterator ? function ( e ) { return typeof e } : function ( e ) { return e && "function" == typeof Symbol && e . constructor === Symbol && e !== Symbol . prototype ? "symbol" : typeof e } ) ( e ) } function c ( ) { if ( "function" != typeof WeakMap ) return null ; var e = new WeakMap ; return c = function ( ) { return e } , e } Object . defineProperty ( t , "__esModule" , { value : ! 0 } ) , t [ "default" ] = void 0 ; var n = { Decorators : function f ( e ) { if ( e && e . _ _esModule ) return e ; if ( null === e || "object" !== i ( e ) && "function" != typeof e ) return { "default" : e } ; var t = c ( ) ; if ( t && t . has ( e ) ) return t . get ( e ) ; var r = { } , n = Object . defineProperty && Object . getOwnPropertyDescriptor ; for ( var o in e ) { var u ; Object . prototype . hasOwnProperty . call ( e , o ) && ( ( u = n ? Object . getOwnPropertyDescriptor ( e , o ) : null ) && ( u . get || u . set ) ? Object . defineProperty ( r , o , u ) : r [ o ] = e [ o ] ) } r [ "default" ] = e , t && t . set ( e , r ) ; return r } ( r ( 144 ) ) } ; t [ "default" ] = n } , 144 : 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 l ( r ) { var n = 1 < arguments . length && arguments [ 1 ] !== undefined ? arguments [ 1 ] : { } ; return function ( e ) { function t ( ) { return e . apply ( this , arguments ) || this } return c ( t , e ) , t . prototype . _store = function ( ) { var e = n . props ? n . props . apply ( this ) : undefined ; return BI . Models . getModel ( r . xtype , e ) } , t } } , 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 } } ) ;