fineui是帆软报表和BI产品线所使用的前端框架。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.5 MiB

/*! fineui 2019-12-31 13:52:53 */
5 years ago
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)?obj1+""+obj2:BI.isArray(obj1)?obj1.concat(obj2):BI.isObject(obj1)?_.extend({},obj1,obj2):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,context))}}),_.each(["keys","allKeys","values","pairs","invert","create"
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=GG(c,d,a,b,M_offset_3,14,T[26]),b=GG(b,c,d,a,M_offset_8,20,T[27]),a=GG(a,b,c,d,M_offset_13,5,T[28]),d=GG(d,a,b,c,M_offset_2,9,T[29]),c=GG(c,d,a,b,M_offset_7,14,T[30]),b=GG(b,c,d,a,M_offset_12,20,T[31]),a=HH(a,b,c,d,M_offset_5,4,T[32]),d=HH(d,a,b,c,M_offset_8,11,T[33]),c=HH(c,d,a,b,M_offset_11,16,T[34]),b=HH(b,c,d,a,M_offset_14,23,T[35]),a=HH(a,b,c,d,M_offset_1,4,T[36]),d=HH(d,a,b,c,M_offset_4,11,T[3
5 years ago
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:"JC",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.layerManager[name].destroy(),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.i
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){var element=this;resetTriggers(this),this.__resizeRAF__&&c
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;valueIsBorderBox=isBorderBox&&(jQuery.support.
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=this,i=this.length,resolve=function(){--count||defer.resolveWith(elements,[el
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,matchContext=addCombinator(function(elem){return elem===che
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),core_push.apply(ret,elems.get());return this.pushStack(ret)}}),jQuery.e
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,props):curElem.css(props)}},jQuery.fn.extend({position:function(){if(this[0]){var offsetParent,offset,parentOffset={top:0,left:0},elem=this[0];return"fixed"===j
5 years ago
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.hgap:0)+"px","margin-right":o.hgap+"px","margin-top":o.vgap+"px","margin-bottom":o.vgap+"px"}),w},appendFragment:function(frag){this.$wrapper.append(frag),th
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.length&&(first(arr[i],this.rows,i),abs.push(BI.extend({top:0,bottom:0,left:left<=1?100*left+"%":left,right:right<=1?100*right+"%
_$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={},allDefineModelInstances={},emptyFn=function emptyFn(){},TTL=10,Watcher=function(){function Watcher(_ref){var get=
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.getCheckStatus();status.half===!0&&status.checked===!0&&(checked=!1),self.nodes.checkNode(treeNode,!checked,!0,!0)}function getUrl(treeId,treeNode){var
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._popupView()},_initPullDownAction:function(){function hide(){self.isEnabled()&&self.isValid()&&self.combo.isEnabled()&&self.combo.isValid()&&o.toggle===!0&&(self._hideView(),self.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.COLLAPSE,"",self.combo),self.fireEvent(BI.Combo.EVENT_COLLAPSE)),self.popupView&&self.popupView.element.off("mouseenter."+self.getName()).off("mouseleave."+self.getName()),enterPopup=!1}var self=this,o=this.options,evs=(this.options.trigger||"").split(","),st=function(e){o.stopEvent&&e.stopEvent(),o.stopPropagation&&e.stopPropagation()},enterPopup=!1;BI.each(evs,function(i,ev){switch(ev){case"hover":self.element.on("mouseenter."+self.getName(),function(e){self.isEnabled()&&self.isValid()&&self.combo.isEnabled()&&self.combo.isValid()&&(self._popupView(),self.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.EXPAND,"",self.combo),self.fireEvent(BI.Combo.EVENT_EXPAND))}),self.element.on("mouseleave."+self.getName(),function(e){self.popupView&&(self.popupView.element.on("mouseenter."+self.getName(),function(e){enterPopup=!0,self.popupView.element.on("mouseleave."+self.ge
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=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.setValue(o.adapter.getValue()),self.popupView.loaded&&self.popupView.loaded(),self.fireEvent(BI.Searcher.EVENT_SEARCHING)}})}},_getLastSearchKeyword:function(){if(this.isValid()){var res=this.editor.getValue().match(/[\S]+/g);return BI.isNull(res)?"":res[res.length-1]}},setAdapter:function(adapter){this.options.adapter=adapter,BI.Maskers.remove(this.getName())},doSearch:function(){this.isSearching()&&this._search()},stopSearch:function(){this._stopSearch();try{this.editor.blur()}catch(e){if(!this.editor.blur)throw new Error("editor没有实现blur方法")}finally{this.editor.setValue("")}},isSearching:function(){return this._isSearching},isViewVisible:function(){return this.editor.isEnabled()&&BI.Maskers.isVisible(this.getName())},getView:function(){return this.popupView},hasMatched:function(){return this._assertPopupView(),this.popupView.hasMatched()},adjustHeight:function(){BI.Maskers.has(this.getName())&&BI.Maskers.get(this.getName()).isVisible()&&BI.Maskers.show(this.getName())},adjustView:function(){this.isViewVisible()&&BI.Maskers.show(this.getName())},setValue:function(v){BI.isNull(this.popupView)?this.options.popup.value=v:this.popupView.setValue(v)},getKeyword:function(){return this._
}]}})},_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:function(selectedValues){this.tab&&this.tab.setValue(selectedValues),this.view.setValue(selectedValues)},getValue:function(){return this.view.getValue()}}),BI.PopupView.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.popup_view",BI.PopupView),BI.SearcherView=BI.inherit(BI.Pane,{_defaultConfig:function(){var conf=BI.SearcherView.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{baseCls:(conf.baseCls||"")+" bi-searcher-view bi-card",tipText:BI.i18nText("BI-No_Select"),chooseType:BI.Selection.Single,matcher:{type:"bi.button_group",behaviors:{redmark:function(){return!0}},items:[],layouts:[{type:"bi.vertical"}]},searcher:{type:"bi.button_group",behaviors:{redmark:function(){return!0}},items:[],layouts:[{type:"bi.vertical"}]}})},_init:function(){BI.SearcherView.superclass._init.apply(this,arguments);var self=this,o=this.options;this.matcher=BI.createWidget(o.matcher,{type:"bi.button_group",chooseType:o.chooseType,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}],value:o.value}),this.matcher.on(BI.Controller.EVENT_CHANGE,function(type,val,ob){self.fireEvent(BI.Controller.EVENT_CHANGE,arguments),type===BI.Events.CLICK&&self.fireEvent(BI.SearcherView.EVENT_CHANGE,val,ob)}),this.spliter=BI.createWidget({type:"bi.vertical",height:1,hgap:10,items:[{type:"bi.layout",height:1,cls:"searcher-view-spliter bi-backgrou
},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:function(){BI.TextIconItem.superclass._init.apply(this,arguments);var o=this.options,c=this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:o.textHgap,vgap:o.textVgap,lgap:o.textLgap,rgap:o.textRgap,text:o.text,value:o.value,keyword:o.keyword,height:o.height}),this.icon=BI.createWidget({type:"bi.icon_label",width:o.height,height:o.height,iconWidth:o.iconWidth,iconHeight:o.iconHeight}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(o.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",this.text,this.icon)}))))},doClick:function(){BI.TextIconItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.TextIconItem.EVENT_CHANGE,this.getValue(),this)},setValue:function(){this.isReadOnly()||this.text.setValue.apply(this.text,arguments)},getValue:function(){return this.text.getValue()},setText:function(){this.text.setText.apply(this.text,arguments)},getText:function(){return this.text.getText()},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)}}),BI.TextIconItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_icon_item",BI.TextIconItem),BI.TextItem=BI.i
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"),attachO.filename=_global.decodeURIComponent(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(){/loaded|complete/i.test(iframe.readyState)?onload():isFunction(handler.onloadprogress)&&(rpe.loaded<rpe.total&&++rpe.loaded,handler.onloadprogress(rpe,{readyState:{loading:2,interactive:3,loaded:4,complete:4}[iframe.readyState]||1}))},form.setAttribute("action",handler.url+"&filename="+_global.encodeURIComponent(handler.file.fileName)),form.setAttribute("target",iframe.id),form.setAttribute("method","post"),form.appendChild(handler.file),form.style.display="none",isFunction(handler.onloadstart)&&handler.onloadstart(rpe,{}),document.body||document.documentElement)appendChild(iframe),appendChild(form),form.submit();return handler},xhr=null,sendFile}(Object.prototype.toString),sendFiles=function(handler,maxSize,width,height){var length=handler.files.length,i=0,onload=handler.onload,onloadstart=handler.onloadstart;for(handler.current=0,handler.total=0,handler.sent=0;handler.current<length;)handler.total+=handler.files[handler.current].fileSize||handler.files[handler.current].size,handler.current++;return handler.current=0,length&&handler.files[0].fileSize!==-1?(handler.file=handler.files[handler.current],sendFile(handler,maxSize,width,height).onload=function(rpe,xhr){handler.onloadstart=null,handler.sent+=handler.files[handler.current].fileSize||handler.files[handler.current].size,++handler.current<length?(handler.file=handler.files[handler.current],sendFile(handler,maxSize,width,height).onload=argumen
},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(setting.callback.onAsyncSuccess,[event,treeId,node,msg])}),o.bind(c.ASYNC_ERROR,function(event,treeId,node,XMLHttpRequest,textStatus,errorThrown){tools.apply(setting.callback.onAsyncError,[event,treeId,node,XMLHttpRequest,textStatus,errorThrown])}),o.bind(c.REMOVE,function(event,treeId,treeNode){tools.apply(setting.callback.onRemove,[event,treeId,treeNode])}),o.bind(c.SELECTED,function(event,srcEvent,treeId,node){tools.apply(setting.callback.onSelected,[srcEvent,treeId,node])}),o.bind(c.UNSELECTED,function(event,srcEvent,treeId,node){tools.apply(setting.callback.onUnSelected,[srcEvent,treeId,node])})},_unbindEvent=function(setting){var o=setting.treeObj,c=consts.event;o.unbind(c.NODECREATED).unbind(c.CLICK).unbind(c.EXPAND).unbind(c.COLLAPSE).unbind(c.ASYNC_SUCCESS).unbind(c.ASYNC_ERROR).unbind(c.REMOVE).unbind(c.SELECTED).unbind(c.UNSELECTED)},_eventProxy=function(event){var target=event.target,setting=data.getSetting(event.data.treeId),tId="",node=null,nodeEventType="",treeEventType="",nodeEventCallback=null,treeEventCallback=null,tmp=null;if(tools.eqs(event.type,"mousedown")?treeEventType="mousedown":tools.eqs(event.type,"mouseup")?treeEventType="mouseup":tools.eqs(event.type,"contextmenu")?treeEventType="contextmenu":tools.eqs(event.type,"click")?tools.eqs(target.tagName,"span")&&null!==target.getAttribute("treeNode"+consts.id.SWITCH)?(tId=tools.getNodeMainDom(target).id,nodeEventType="switchNode"):(tmp=tools.
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:case consts.line.ROOTS:case consts.line.CENTER:case consts.line.BOTTOM:case consts.line.NOLINE:tmpList[0]=view.makeNodeLineClassEx(node)+newName;break;case consts.folder.OPEN:case consts.folder.CLOSE:case consts.folder.DOCU:tmpList[1]=newName}obj.attr("class",tmpList.join("_")),newName!==consts.folder.DOCU?obj.removeAttr("disabled"):obj.attr("disabled","disabled")}}},selectNode:function(setting,node,addFlag){addFlag||view.cancelPreSelectedNode(setting,null,node),$$(node,consts.id.A,setting).addClass(consts.node.CURSELECTED),data.addSelectedNode(setting,node),setting.treeObj.trigger(consts.event.SELECTED,[event,setting.treeId,node])},setNodeFontCss:function(setting,treeNode){var aObj=$$(treeNode,consts.id.A,setting),fontCss=view.makeNodeFontCss(setting,treeNode);fontCss&&aObj.css(fontCss)},setNodeLineIcos:function(setting,node){if(node){var switchObj=$$(node,consts.id.SWITCH,setting),ulObj=$$(node,consts.id.UL,setting),icoObj=$$(node,consts.id.ICON,setting),ulLine=view.makeUlLineClass(setting,node);0==ulLine.length?ulObj.removeClass(consts.line.LINE):ulObj.addClass(ulLine),switchObj.attr("class",view.makeNodeLineClass(setting,node)),node.isParent?switchObj.removeAttr("disabled"):switchObj.attr("disabled","disabled"),icoObj.removeAttr("style"),icoObj.attr("style",vie
this.checkbox.setSelected(this.isSelected()),this.isValid()&&this.fireEvent(BI.MultiSelectItem.EVENT_CHANGE,this.getValue(),this)},setSelected:function(v){BI.MultiSelectItem.superclass.setSelected.apply(this,arguments),this.checkbox.setSelected(v)}}),BI.MultiSelectItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_item",BI.MultiSelectItem),BI.SingleSelectIconTextItem=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.SingleSelectIconTextItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-single-select-icon-text-item bi-list-item-active",iconCls:"",height:24})},_init:function(){BI.SingleSelectIconTextItem.superclass._init.apply(this,arguments);var self=this,o=this.options;this.text=BI.createWidget({type:"bi.icon_text_item",element:this,cls:o.iconCls,once:o.once,iconWrapperWidth:o.iconWrapperWidth,selected:o.selected,height:o.height,iconHeight:o.iconHeight,iconWidth:o.iconWidth,text:o.text,keyword:o.keyword,value:o.value,py:o.py}),this.text.on(BI.Controller.EVENT_CHANGE,function(){self.fireEvent(BI.Controller.EVENT_CHANGE,arguments)})},isSelected:function(){return this.text.isSelected()},setSelected:function(b){this.text.setSelected(b)},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.SingleSelectIconTextItem.superclass.doClick.apply(this,arguments)}}),BI.shortcut("bi.single_select_icon_text_item",BI.SingleSelectIconTextItem),BI.SingleSelectItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.SingleSelectItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-single-select-item bi-list-item-active",hgap:10,height:24,textAlign:"left"})},_init:function(){BI.SingleSelectItem.superclass._init.apply(this,arguments);var self=this,o=this.options;this.text=BI.createWidget({type:"bi.label",element:this,textAlign:o.textAlign,whiteSpace:"nowrap",textHeight:o.height,height:o.height,hgap:o.hgap,text:o.text,keyword:o.keyword,value:o.value,title:o.title||o.text,warningTitle:o.warningTitle,py:o.py})},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.SingleSelectItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.SingleSelectItem.EVENT_CHANGE,this.isSelected(),this)},setSelected:function(v){BI.SingleSelectItem.superclass.setSelected.apply(this,arguments)}}),BI.SingleSelectItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_item",BI.SingleSelectItem),BI.SingleSelectRadioItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.SingleSelectRadioItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-single-select-radio-item",logic:{dynamic:!1},hgap:10,height:24})},_init:function(){BI.SingleSelectRadioItem.superclass._init.apply(this,arguments);var self=this,o=this.options;this.radio=BI.createWidget({type:"bi.radio",once:o.once}),this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",whiteSpace:"nowrap",textHeight:o.height,height:o.height,hgap:o.hgap,text:o.text,keyword:o.keyword,value:o.value,py:o.py}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(o.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",{type:"bi.center_adapt",items:[this.radio],width:16},this.text)}))))},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.SingleSelectRadioItem.superclass.doClick.apply(this,arguments),this.radio.setSelected(this.isSelected()),this.isValid()&&this.fireEvent(BI.SingleSelectRadioItem.EVENT_CHANGE,this.isSelected(),this)},setSelected:function(v){BI.SingleSelectRadioItem.superclass.setSelected.apply(this,arguments),this.radio.setSelected(v)}}),BI.SingleSelectRadioItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_radio_item",BI.SingleSelectRadioItem),BI.ArrowNode=BI.inherit(BI.NodeButt
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(tyears.slice(6,8)),items.push(tyears.slice(8,10)),items.push(tyears.slice(10,12)),BI.map(items,function(i,item){return BI.map(item,function(j,td){return BI.extend(td,{type:"bi.text_item",cls:"bi-list-item-select",textAlign:"center",whiteSpace:"normal",once:!1,forceSelected:!0,height:24,width:45,value:td.text,disabled:td.disabled})})})},_populate:function(){this.years.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(this.options.max)&&(o.max=maxDate,this._populate())},setValue:function(val){this.years.setValue([val])},getValue:function(){return this.years.getValue()[0]}}),BI.extend(BI.YearCalendar,{INTERVAL:12,getStartYear:function(year){var cur=BI.getDate().getFullYear();return year-((year-cur+3)%BI.YearCalendar.INTERVAL+12)%BI.YearCalendar.INTERVAL},getEndYear:function(year){return BI.YearCalendar.getStartYear(year)+BI.YearCalendar.INTERVAL-1},getPageByYear:function(year){var cur=BI.getDate().getFullYear();return year=BI.YearCalendar.getStartYear(year),(year-cur+3)/BI.YearCalendar.INTERVAL}}),BI.shortcut("bi.year_calendar",BI.YearCalendar),BI.ArrowTreeGroupNodeCheckbox=BI.inherit(BI.IconButton,{_defaultConfig:function(){return BI.extend(BI.ArrowTreeGroupNodeCheckbox.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-arrow-group-node-checkbox"})},setSelected:function(v){BI.ArrowTreeGroupNodeCheckbox.superclass.setSelected.apply(this,arguments),v?this.element.removeClass("expander-right-font").addClass("expander-down-font"):this.element.removeClass("expander-down-font").addClass("expander-right-font")}}),BI.shortcut("bi.arrow_group_node_checkbox",BI.ArrowTreeGroupNodeCheckbox),BI.CheckingMarkNode=BI.inherit(BI.IconButton,{_defaultConfig:function(){return BI.extend(BI.CheckingMarkNode.superclass._defaultConfig.apply(this,arguments),{extraCls:"check-mark-font"})},_init:function(){BI.CheckingMarkNode.superclass._init.apply(this,arguments),this.setSelected(this.options.selected)},setSelected:function(v){BI.CheckingMarkNode.superclass.setSelected.apply(this,arguments),v===!0?this.element.addClass("check-mark-font"):this.element.removeClass("check-mark-font")}}),BI.shortcut("bi.checking_mark_node",BI.CheckingMarkNode),BI.FirstTreeNodeCheckbox=BI.inherit(BI.IconButton,{_defaultConfig:function(){return BI.extend(BI.FirstTreeNodeCheckbox.superclass._defaultConfig.apply(this,arguments),{extraCls:"tree-collapse-icon-type2",iconWidth:24,iconHeight:24})},setSelected:function(v){BI.FirstTreeNodeCheckbox.superclass.setSelected.apply(this,arguments),v===!0?this.element.addClass("tree-expand-icon-type2"):this.element.removeClass("tree-expand-icon-type2")}}),BI.shortcut("bi.first_tree_node_checkbox",BI.FirstTreeNodeCheckbox),BI.LastTreeNodeCheckbox=BI.inherit(BI.IconButton,{_defaultConfig:function(){return BI.extend(
}},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,adjustXOffset:0,adjustYOffset:0,hideChecker:o.hideChecker,offsetStyle:o.offsetStyle,el:o.el,popup:BI.extend({type:"bi.bubble_popup_view"},o.popup)}),this.combo.on(BI.Combo.EVENT_TRIGGER_CHANGE,function(){self.fireEvent(BI.BubbleCombo.EVENT_TRIGGER_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_CHANGE,function(){self.fireEvent(BI.BubbleCombo.EVENT_CHANGE,arguments)}),this.combo.on(BI.Combo.EVENT_EXPAND,function(){self.fireEvent(BI.BubbleCombo.EVENT_EXPAND,arguments)}),this.combo.on(BI.Combo.EVENT_COLLAPSE,function(){self.fireEvent(BI.BubbleCombo.EVENT_COLLAPSE,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_INIT,function(){self.fireEvent(BI.BubbleCombo.EVENT_AFTER_INIT,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){self.fireEvent(BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_POPUPVIEW,function(){self._showTriangle(),self.fireEvent(BI.BubbleCombo.EVENT_AFTER_POPUPVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){self._hideTriangle(),self.fireEvent(BI.BubbleCombo.EVENT_BEFORE_HIDEVIEW,arguments)}),this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){self.fireEvent(BI.BubbleCombo.EVENT_AFTER_HIDEVIEW,arguments)})},_getAdjustLength:function(){return this._const.TRIANGLE_LENGTH+this.options.adjustLength},_createTriangle:function(direction){var pos={},op={},adjustLength=this.options.adjustLength,offset=this.element.offset(),left=offset.left,right=offset.left+this.element.outerWidth(),top=offset.top,bottom=offset.top+this.element.outerHeight();switch(direction){case"left":pos={top:top,height:this.element.outerHeight(),left:left-adjustLength-this._const.TRIANGLE_LENGTH},op={width:this._const.TRIANGLE_LENGTH};break;case"right":pos={top:top,height:this.element.outerHeight(),left:right+adjustLength},op={width:this._const.TRIANGLE_LENGTH};break;case"top":pos={left:left,width:this.element.outerWidth(),top:top-adjustLength-this._const.TRIANGLE_LENGTH},op={height:this._const.TRIANGLE_LENGTH};break;case"bottom":pos={left:left,width:this.element.outerWidth(),top:bottom+adjustLength},op={height:this._const.TRIANGLE_LENGTH}}this.triangle&&this.triangle.destroy(),this.triangle=BI.createWidget(op,{type:"bi.center_adapt",cls:"button-combo-triangle-wrapper",items:[{type:"bi.layout",cls:"bubble-combo-triangle-"+direction}]}),pos.el=this.triangle,BI.createWidget({type:"bi.absolute",element:this,items:[pos]})},_createLeftTriangle:function(){this._createTriangle("left")},_createRightTriangle:function(){this._createTriangle("right")},_createTopTriangle:function(){this._createTriangle("top")},_createBottomTriangle:function(){this._createTriangle("bottom")},_showTriangle:function(){var pos=this.combo.getPopupPosition();switch(pos.dir){case"left,top":case"left,bottom":this._createLeftTriangle();break;case"right,top":case"right,bottom":this._createRightTriangle();br
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.fireEvent(BI.ClearEditor.EVENT_CLICK)}),this.editor.on(BI.Editor.EVENT_CHANGE,function(){self._checkClear(),self.fireEvent(BI.ClearEditor.EVENT_CHANGE)}),this.editor.on(BI.Editor.EVENT_KEY_DOWN,function(v){self.fireEvent(BI.ClearEditor.EVENT_KEY_DOWN,v)}),this.editor.on(BI.Editor.EVENT_SPACE,function(){self.fireEvent(BI.ClearEditor.EVENT_SPACE)}),this.editor.on(BI.Editor.EVENT_BACKSPACE,function(){self.fireEvent(BI.ClearEditor.EVENT_BACKSPACE)}),this.editor.on(BI.Editor.EVENT_VALID,function(){self.fireEvent(BI.ClearEditor.EVENT_VALID)}),this.editor.on(BI.Editor.EVENT_ERROR,function(){self.fireEvent(BI.ClearEditor.EVENT_ERROR)}),this.editor.on(BI.Editor.EVENT_ENTER,function(){self.fireEvent(BI.ClearEditor.EVENT_ENTER)}),this.editor.on(BI.Editor.EVENT_RESTRICT,function(){self.fireEvent(BI.ClearEditor.EVENT_RESTRICT)}),this.editor.on(BI.Editor.EVENT_EMPTY,function(){self._checkClear(),self.fireEvent(BI.ClearEditor.EVENT_EMPTY)}),this.editor.on(BI.Editor.EVENT_REMOVE,function(){self.fireEvent(BI.ClearEditor.EVENT_REMOVE)}),this.editor.on(BI.Editor.EVENT_CONFIRM,function(){self.fireEvent(BI.ClearEditor.EVENT_CONFIRM)}),this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM,function(){self.fireEvent(BI.ClearEditor.EVENT_CHANGE_CONFIRM)}),this.editor.on(BI.Editor.EVENT_START,function(){self.fireEvent(BI.ClearEditor.EVENT_START)}),this.editor.on(BI.Editor.EVENT_PAUSE,function(){self.fireEvent(BI.ClearEditor.EVENT_PAUSE)}),this.editor.on(BI.Editor.EVENT_STOP,function(){self.fireEvent(BI.ClearEditor.EVENT_STOP)}),BI.isKey(o.value)?this.clear.visible():this.clear.invisible()},_checkClear:function(){this.getValue()?this.clear.visible():this.clear.invisible()},setWaterMark:function(v){this.options.watermark=v,this.editor.setWaterMark(v)},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},getValue:function(){if(this.isValid()){var res=this.editor.getValue().match(/[\S]+/g);return BI.isNull(res)?"":res[res.length-1]}},setValue:function(v){this.editor.setValue(v),BI.isKey(v)&&this.clear.visible()},isValid:function(){return this.editor.isValid()}}),BI.ClearEditor.EVENT_CHANGE="EVENT_CHANGE",BI.ClearEditor.EVENT_FOCUS="EVENT_FOCUS",BI.ClearEditor.EVENT_BLUR="EVENT_BLUR",BI.ClearEditor.EVENT_CLICK="EVENT_CLICK",BI.ClearEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.ClearEditor.EVENT_SPACE="EVENT_SPACE",BI.ClearEditor.EVENT_BACKSPACE="EVENT_BACKSPACE",BI.ClearEditor.EVENT_CLEAR="EVENT_CLEAR",BI.ClearEditor.EVENT_START="EVENT_START",BI.ClearEditor.EVENT_PAUSE="EVENT_PAUSE",BI.ClearEditor.EVENT_STOP="EVENT_STOP",BI.ClearEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.ClearEditor.EVENT_CHANGE_CONFIRM="EVENT_CHANGE_CONFIRM",BI.ClearEditor.EVENT_VALID="EVENT_VALID",BI.ClearEditor.EVENT_ERROR="EVENT_ERROR",BI.ClearEditor.EVENT_ENTER="EVENT_ENTER",BI.ClearEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.ClearEditor.EVENT_REMOVE="EVENT_REMOVE",BI.ClearEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.clear_editor",BI.ClearEditor),BI.ShelterEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var conf=BI.ShelterEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{baseCls:(conf.baseCls||"")+" bi-shelter-editor",hgap:4,vgap:2,lgap:0,rgap:0,tgap:0,bgap:0,validationChecker:BI.emptyFn,quitChecker:BI.emptyFn,allowBlank:!0,watermark:"",errorText:"",height:24,textAlign:"left"})},_init:function(){BI.ShelterEditor.superclass._init.apply(this,arguments);var self=this,o=this.options;this.editor=BI.createWidget({type:"bi.editor",height:o.height,hgap:o.hgap,vgap:o.vgap,lgap:o.lgap,rgap:o.rgap,tgap:o.tgap,bgap:o.bgap,value:o.value,validationChecker:o.validationChec
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"))?void this.button_group.attr("itemsCreator").apply(this,[{times:1},function(){if(0===arguments.length)throw new Error("参数不能为空");self.populate.apply(self,arguments)}]):(BI.ListPane.superclass.populate.apply(this,arguments),void this.button_group.populate.apply(this.button_group,arguments))},empty:function(){this.button_group.empty()},setNotSelectedValue:function(){this.button_group.setNotSelectedValue.apply(this.button_group,arguments)},getNotSelectedValue:function(){return this.button_group.getNotSelectedValue()},setValue:function(){this.button_group.setValue.apply(this.button_group,arguments)},getValue:function(){return this.button_group.getValue.apply(this.button_group,arguments)},getAllButtons:function(){return this.button_group.getAllButtons()},getAllLeaves:function(){return this.button_group.getAllLeaves()},getSelectedButtons:function(){return this.button_group.getSelectedButtons()},getNotSelectedButtons:function(){return this.button_group.getNotSelectedButtons()},getIndexByValue:function(value){return this.button_group.getIndexByValue(value)},getNodeById:function(id){return this.button_group.getNodeById(id)},getNodeByValue:function(value){return this.button_group.getNodeByValue(value)}}),BI.ListPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.list_pane",BI.ListPane),BI.Panel=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Panel.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-panel bi-border",title:"",titleButtons:[],el:{},logic:{dynamic:!1}})},_init:function(){BI.Panel.superclass._init.apply(this,arguments);var o=this.options;BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("vertical",BI.extend(o.logic,{items:BI.LogicFactory.createLogicItemsByDirection("top",this._createTitle(),this.options.el)}))))},_createTitle:function(){var self=this,o=this.options;return this.text=BI.createWidget({type:"bi.label",cls:"panel-title-text",text:o.title,height:30}),this.button_group=BI.createWidget({type:"bi.button_group",items:o.titleButtons,layouts:[{type:"bi.center_adapt",lgap:10}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){self.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.ButtonGroup.EVENT_CHANGE,function(value,obj){self.fireEvent(BI.Panel.EVENT_CHANGE,value,obj)}),{el:{type:"bi.left_right_vertical_adapt",cls:"panel-title bi-header-background bi-border-bottom",height:29,items:{left:[this.text],right:[this.button_group]},lhgap:10,rhgap:10},height:29}},setTitle:function(title){this.text.setValue(title)}}),BI.Panel.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.panel",BI.Panel),BI.LinearSegmentButton=BI.inherit(BI.BasicButton,{props:{extraCls:"bi-line-segment-button bi-list-item-effect",once:!0,readonly:!0,hgap:10,height:25},render:function(){var self=this,o=this.options;return[{type:"bi.label",text:o.text,height:o.height,value:o.value,hgap:o.hgap,ref:function(){self.text=this}},{type:"bi.absolute",items:[{el:{type:"bi.layout",cls:"line-segment-button-line",height:2,ref:function(){self.line=this}},left:0,right:0,bottom:0}]}]},setSelected:function(v){BI.LinearSegmentButton.superclass.setSelected.apply(this,arguments),v?this.line.element.addClass("bi-high-light-background"):this.line.element.removeClass("bi-high-light-background")},setText:function(text){this.text.setText(text)}}),BI.shortcut("bi.linear_segment_button",BI.LinearSegmentButton),BI.LinearSegment=BI.inherit(BI.Widget,{props:{baseCls:"bi-linear-segment bi-split-bottom",items:[],height:29},render:function(){var self=this,o=this.options;return{type:"bi.button_group",items:BI.createItems(o.items,{type:"bi.linear_segment_button",height:o.height-1}),layout:[{type:"bi.center"}],listeners:[{eve
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._setEnable.apply(this,arguments),enable===!0?this.element.removeClass("base-disabled disabled"):enable===!1&&this.element.addClass("base-disabled disabled")},setValue:function(v){this.buttonGroup.setValue(v)},setEnabledValue:function(v){this.buttonGroup.setEnabledValue(v)},getValue:function(){return this.buttonGroup.getValue()}}),BI.Segment.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.segment",BI.Segment),BI.MultiSelectBar=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiSelectBar.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multi-select-bar",height:25,text:BI.i18nText("BI-Select_All"),isAllCheckedBySelectedValue:BI.emptyFn,disableSelected:!0,isHalfCheckedBySelectedValue:function(selectedValues){return selectedValues.length>0},halfSelected:!1,iconWrapperWidth:26})},_init:function(){BI.MultiSelectBar.superclass._init.apply(this,arguments);var self=this,o=this.options,isSelect=o.selected===!0,isHalfSelect=!o.selected&&o.halfSelected;this.checkbox=BI.createWidget({type:"bi.checkbox",stopPropagation:!0,handler:function(){self.setSelected(self.isSelected())},selected:isSelect,invisible:isHalfSelect}),this.half=BI.createWidget({type:"bi.half_icon_button",stopPropagation:!0,handler:function(){self.setSelected(!0)},invisible:isSelect||!isHalfSelect}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(){self.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,self.isSelected(),self)}),this.checkbox.on(BI.Checkbox.EVENT_CHANGE,function(){self.fireEvent(BI.MultiSelectBar.EVENT_CHANGE,self.isSelected(),self)}),this.half.on(BI.Controller.EVENT_CHANGE,function(){self.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.CLICK,self.isSelected(),self)}),this.half.on(BI.HalfIconButton.EVENT_CHANGE,function(){self.fireEvent(BI.MultiSelectBar.EVENT_CHANGE,self.isSelected(),self)}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:o.height,height:o.height,hgap:o.hgap,text:o.text,keyword:o.keyword,value:o.value,py:o.py}),BI.createWidget({type:"bi.htape",element:this,items:[{width:o.iconWrapperWidth,el:{type:"bi.center_adapt",items:[this.checkbox,this.half]}},{el:this.text}]})},_setSelected:function(v){this.checkbox.setSelected(!!v)},beforeClick:function(){var isHalf=this.isHalfSelected(),isSelected=this.isSelected();isHalf===!0?this.setSelected(!0):this.setSelected(!isSelected)},setSelected:function(v){this.checkbox.setSelected(v),this.setHalfSelected(!1)},setHalfSelected:function(b){this.halfSelected=!!b,b===!0?(this.checkbox.setSelected(!1),this.half.visible(),this.checkbox.invisible()):(this.half.invisible(),this.checkbox.visible())},isHalfSelected:function(){return!this.isSelected()&&!!this.halfSelected},isSelected:function(){return this.checkbox.isSelected()},setValue:function(selectedValues){BI.MultiSelectBar.superclass.setValue.apply(this,arguments);var isAllChecked=this.options.isAllCheckedBySelectedValue.apply(this,arguments);this._setSelected(isAllChecked),!isAllChecked&&this.setHalfSelected(this.options.isHalfCheckedBySelectedValue.apply(this,arguments))},doClick:function(){BI.MultiSelectBar.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.MultiSelectBar.EVENT_CHANGE,this.isSelected(),this)}}),BI.MultiSelectBar.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_bar",BI.MultiSelectBar),BI.LevelTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.LevelTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-level-tree",el:{chooseType:0},expander:{},items:[],value:""})},_init:function(){BI.LevelTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(nodes,layer,pNode){var self=this;return BI.each(
})},_createYearCalendar:function(v){var o=this.options,y=this._year,calendar=BI.createWidget({type:"bi.year_calendar",behaviors:o.behaviors,min:o.min,max:o.max,logic:{dynamic:!0},year:y+12*v});return calendar.setValue(this._year),calendar},_init:function(){BI.YearPopup.superclass._init.apply(this,arguments);var self=this,o=this.options;this.selectedYear=this._year=BI.getDate().getFullYear(),this.backBtn=BI.createWidget({type:"bi.icon_button",cls:"pre-page-h-font",width:24,height:24,value:-1}),this.preBtn=BI.createWidget({type:"bi.icon_button",cls:"next-page-h-font",width:24,height:24,value:1}),this.navigation=BI.createWidget({type:"bi.navigation",element:this,single:!0,logic:{dynamic:!0},tab:{cls:"year-popup-navigation bi-high-light bi-split-top",height:24,items:[this.backBtn,this.preBtn]},cardCreator:BI.bind(this._createYearCalendar,this),afterCardShow:function(){this.setValue(self.selectedYear);var calendar=this.getSelectedCard();calendar&&self.backBtn.setEnable(!calendar.isFrontYear()),calendar&&self.preBtn.setEnable(!calendar.isFinalYear())}}),this.navigation.on(BI.Navigation.EVENT_CHANGE,function(){self.selectedYear=this.getValue(),self.fireEvent(BI.Controller.EVENT_CHANGE,arguments),self.fireEvent(BI.YearPopup.EVENT_CHANGE,self.selectedYear)}),BI.isKey(o.value)&&this.setValue(o.value)},_checkMin:function(){var calendar=this.navigation.getSelectedCard();BI.isNotNull(calendar)&&(calendar.setMinDate(this.options.min),this.backBtn.setEnable(!calendar.isFrontYear()),this.preBtn.setEnable(!calendar.isFinalYear()))},_checkMax:function(){var calendar=this.navigation.getSelectedCard();BI.isNotNull(calendar)&&(calendar.setMaxDate(this.options.max),this.backBtn.setEnable(!calendar.isFrontYear()),this.preBtn.setEnable(!calendar.isFinalYear()))},setMinDate:function(minDate){BI.isNotEmptyString(this.options.min)&&(this.options.min=minDate,this._checkMin())},setMaxDate:function(maxDate){BI.isNotEmptyString(this.options.max)&&(this.options.max=maxDate,this._checkMax())},getValue:function(){return this.selectedYear},setValue:function(v){var o=this.options;v=BI.parseInt(v);var startDate=BI.parseDateTime(o.min,"%Y-%X-%d"),endDate=BI.parseDateTime(o.max,"%Y-%X-%d");BI.checkDateVoid(v,1,1,BI.print(BI.getDate(startDate.getFullYear(),0,1),"%Y-%X-%d"),BI.print(BI.getDate(endDate.getFullYear(),0,1),"%Y-%X-%d"))[0]?(v=BI.getDate().getFullYear(),this.selectedYear="",this.navigation.setSelect(BI.YearCalendar.getPageByYear(v)),this.navigation.setValue("")):(this.selectedYear=v,this.navigation.setSelect(BI.YearCalendar.getPageByYear(v)),this.navigation.setValue(v))}}),BI.YearPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.year_popup",BI.YearPopup),BI.DateTriangleTrigger=BI.inherit(BI.Trigger,{_const:{height:24,iconWidth:12,iconHeight:12},_defaultConfig:function(){return BI.extend(BI.DateTriangleTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-date-triangle-trigger pull-down-ha-font cursor-pointer",height:24})},_init:function(){BI.DateTriangleTrigger.superclass._init.apply(this,arguments);var o=this.options,c=this._const;this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"right",text:o.text,value:o.value,height:c.height}),BI.createWidget({type:"bi.vertical_adapt",element:this,items:[{el:this.text,rgap:5},{type:"bi.icon_label",width:16}]})},setValue:function(v){this.text.setValue(v)},getValue:function(){return this.text.getValue()},setText:function(v){this.text.setText(v)},getText:function(){return this.item.getText()},getKey:function(){}}),BI.shortcut("bi.date_triangle_trigger",BI.DateTriangleTrigger),BI.StaticDatePaneCard=BI.inherit(BI.Widget,{_defaultConfig:function(){var conf=BI.StaticDatePaneCard.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{baseCls:"bi-date-pane",min:"1900-01-01",max:"2099-12-31",selectedTime:null})},_init:function(){BI.StaticDatePaneCard.superclass._init.apply(this,arguments);var self=this,o=this.options;this.today=BI.getDate(),this._year=this.today.getFullYear(),this._month=this.today.getMonth()+1,this.selectedTime=o.selectedTime||{year:this._year,mont
var v=[];return BI.each(this.popup.getAllButtons(),function(i,item){i%2===0&&v.push(item.getValue())}),v},getValue:function(){var self=this,result=[],values=this._checkValues(this._getValue());return BI.each(values,function(i,value){var valueItem={};if(BI.isNotNull(self.childValueMap[value])){var fartherValue=self.fatherValueMap[value];valueItem.childValue=self.childValueMap[value],valueItem.value=fartherValue}else valueItem.value=value;result.push(valueItem)}),result}}),BI.DownListPopup.EVENT_CHANGE="EVENT_CHANGE",BI.DownListPopup.EVENT_SON_VALUE_CHANGE="EVENT_SON_VALUE_CHANGE",BI.shortcut("bi.down_list_popup",BI.DownListPopup),!function(){BI.DynamicDateHelper={},BI.extend(BI.DynamicDateHelper,{getCalculation:function(obj){var date=BI.getDate();return this.getCalculationByDate(date,obj)},getCalculationByDate:function(date,obj){if(BI.isNotNull(obj.year)&&(date=BI.getDate(date.getFullYear()+BI.parseInt(obj.year),date.getMonth(),date.getDate())),BI.isNotNull(obj.quarter)&&(date=BI.getOffsetQuarter(date,BI.parseInt(obj.quarter))),BI.isNotNull(obj.month)&&(date=BI.getOffsetMonth(date,BI.parseInt(obj.month))),BI.isNotNull(obj.week)&&(date=BI.getOffsetDate(date,7*BI.parseInt(obj.week))),BI.isNotNull(obj.day)&&(date=BI.getOffsetDate(date,BI.parseInt(obj.day))),BI.isNotNull(obj.workDay))if(BI.isNotNull(BI.holidays))for(var count=Math.abs(obj.workDay),i=0;i<count;i++)date=BI.getOffsetDate(date,obj.workDay<0?-1:1),BI.isNotNull(BI.holidays[BI.print(date,"%Y-%X-%d")])&&i--;else date=BI.getOffsetDate(date,BI.parseInt(obj.workDay));return BI.isNotNull(obj.position)&&obj.position!==BI.DynamicDateCard.OFFSET.CURRENT&&(date=this.getBeginDate(date,obj)),BI.getDate(date.getFullYear(),date.getMonth(),date.getDate())},getBeginDate:function(date,obj){return BI.isNotNull(obj.day)?obj.position===BI.DynamicDateCard.OFFSET.BEGIN?BI.getDate(date.getFullYear(),date.getMonth(),1):BI.getDate(date.getFullYear(),date.getMonth(),BI.getLastDateOfMonth(date).getDate()):BI.isNotNull(obj.week)?obj.position===BI.DynamicDateCard.OFFSET.BEGIN?BI.getWeekStartDate(date):BI.getWeekEndDate(date):BI.isNotNull(obj.month)?obj.position===BI.DynamicDateCard.OFFSET.BEGIN?BI.getDate(date.getFullYear(),date.getMonth(),1):BI.getDate(date.getFullYear(),date.getMonth(),BI.getLastDateOfMonth(date).getDate()):BI.isNotNull(obj.quarter)?obj.position===BI.DynamicDateCard.OFFSET.BEGIN?BI.getQuarterStartDate(date):BI.getQuarterEndDate(date):BI.isNotNull(obj.year)?obj.position===BI.DynamicDateCard.OFFSET.BEGIN?BI.getDate(date.getFullYear(),0,1):BI.getDate(date.getFullYear(),11,31):date}})}(),BI.DynamicDateCard=BI.inherit(BI.Widget,{props:{baseCls:"bi-dynamic-date-card"},render:function(){var self=this;return this.position=BI.DynamicDateCard.OFFSET.CURRENT,{type:"bi.vertical",items:[{el:{type:"bi.label",text:BI.i18nText("BI-Multi_Date_Relative_Current_Time"),textAlign:"left",height:12,lgap:10},tgap:10,bgap:5},{type:"bi.button_group",ref:function(){self.checkgroup=this},chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,lgap:4,value:[BI.DynamicDateCard.TYPE.YEAR],items:BI.createItems([{text:BI.i18nText("BI-Basic_Year"),value:BI.DynamicDateCard.TYPE.YEAR},{text:BI.i18nText("BI-Basic_Single_Quarter"),value:BI.DynamicDateCard.TYPE.QUARTER},{text:BI.i18nText("BI-Basic_Month"),value:BI.DynamicDateCard.TYPE.MONTH},{text:BI.i18nText("BI-Basic_Week"),value:BI.DynamicDateCard.TYPE.WEEK},{text:BI.i18nText("BI-Basic_Day"),value:BI.DynamicDateCard.TYPE.DAY}],{type:"bi.multi_select_item",logic:{dynamic:!0}}),layouts:[{type:"bi.left",rgap:4}],listeners:[{eventName:BI.ButtonGroup.EVENT_CHANGE,action:function(){var value=self.checkgroup.getValue();0!==value.length&&self.workDayBox.setSelected(!1);var plainValue={};BI.each(self.resultPane.getAllButtons(),function(idx,button){var value=button.getValue();BI.isNotNull(value.dateType)&&(plainValue[value.dateType]={value:value.value,offset:value.offset})}),self.resultPane.populate(self._getParamJson(BI.map(self.checkgroup.getValue(),function(idx,v){var obj={dateType:v};return BI.has(plainValue,v)&&(obj.value=plainValue[v].value,obj.offset=plainValue[v].offset),o
watermark:opts.watermark,format:opts.format,height:opts.height,value:opts.value,ref:function(){self.trigger=this},listeners:[{eventName:BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN,action:function(){self.combo.isViewVisible()&&self.combo.hideView(),self.fireEvent(BI.DynamicDateTimeCombo.EVENT_KEY_DOWN,arguments)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_STOP,action:function(){self.combo.isViewVisible()||self.combo.showView()}},{eventName:BI.DynamicDateTimeTrigger.EVENT_TRIGGER_CLICK,action:function(){self.combo.toggle()}},{eventName:BI.DynamicDateTimeTrigger.EVENT_FOCUS,action:function(){self.storeTriggerValue=self.trigger.getKey(),self.combo.isViewVisible()||self.combo.showView(),self.fireEvent(BI.DynamicDateTimeCombo.EVENT_FOCUS)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_BLUR,action:function(){self.fireEvent(BI.DynamicDateTimeCombo.EVENT_BLUR)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_ERROR,action:function(){self.storeValue={type:BI.DynamicDateTimeCombo.Static,value:{year:date.getFullYear(),month:date.getMonth()+1}},self.fireEvent(BI.DynamicDateTimeCombo.EVENT_ERROR)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_VALID,action:function(){self.fireEvent(BI.DynamicDateTimeCombo.EVENT_VALID)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_CHANGE,action:function(){self.fireEvent(BI.DynamicDateTimeCombo.EVENT_CHANGE)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_CONFIRM,action:function(){if(!self.combo.isViewVisible()){var dateStore=self.storeTriggerValue,dateObj=self.trigger.getKey();BI.isNotEmptyString(dateObj)&&!BI.isEqual(dateObj,dateStore)?(self.storeValue=self.trigger.getValue(),self.setValue(self.trigger.getValue())):BI.isEmptyString(dateObj)&&(self.storeValue=null,self.trigger.setValue()),self._checkDynamicValue(self.storeValue),self.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}}}]},adjustLength:this.constants.comboAdjustHeight,popup:{el:{type:"bi.dynamic_date_time_popup",behaviors:opts.behaviors,min:opts.minDate,max:opts.maxDate,ref:function(){self.popup=this},listeners:[{eventName:BI.DynamicDateTimePopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){self.setValue(),self.combo.hideView(),self.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDateTimePopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var date=BI.getDate();self.setValue({type:BI.DynamicDateTimeCombo.Static,value:{year:date.getFullYear(),month:date.getMonth()+1,day:date.getDate(),hour:0,minute:0,second:0}}),self.combo.hideView(),self.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDateTimePopup.BUTTON_OK_EVENT_CHANGE,action:function(){var value=self.popup.getValue();self._checkValue(value)&&self.setValue(value),self.combo.hideView(),self.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDateTimePopup.EVENT_CHANGE,action:function(){self.setValue(self.popup.getValue()),self.combo.hideView(),self.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}}]},stopPropagation:!1},listeners:[{eventName:BI.Combo.EVENT_BEFORE_POPUPVIEW,action:function(){self.popup.setValue(self.storeValue),self.popup.setMinDate(opts.minDate),self.popup.setMaxDate(opts.maxDate),self.fireEvent(BI.DynamicDateTimeCombo.EVENT_BEFORE_POPUPVIEW)}}],hideChecker:function(e){return 0===self.triggerBtn.element.find(e.target).length}},top:0,left:0,right:0,bottom:0},{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-font",width:opts.height,height:opts.height,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){self.combo.isViewVisible()||self.combo.showView()}}],ref:function(){self.triggerBtn=this}},top:0,right:0}]}],ref:function(_ref){self.comboWrapper=_ref}}},mounted:function(){this._checkDynamicValue(this.storeValue)},_checkDynamicValue:function(v){var o=this.options,type=null;switch(BI.isNotNull(v)&&(type=v.type),type){case BI.DynamicDateTimeCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=o.height,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},_checkValue:function(v){switc
},isValid:function(){return this.editor.isValid()},setValue:function(v){this.editor.setValue(v)},getValue:function(){return this.editor.getValue()}}),BI.TextEditor.EVENT_CHANGE="EVENT_CHANGE",BI.TextEditor.EVENT_FOCUS="EVENT_FOCUS",BI.TextEditor.EVENT_BLUR="EVENT_BLUR",BI.TextEditor.EVENT_CLICK="EVENT_CLICK",BI.TextEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.TextEditor.EVENT_SPACE="EVENT_SPACE",BI.TextEditor.EVENT_BACKSPACE="EVENT_BACKSPACE",BI.TextEditor.EVENT_START="EVENT_START",BI.TextEditor.EVENT_PAUSE="EVENT_PAUSE",BI.TextEditor.EVENT_STOP="EVENT_STOP",BI.TextEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.TextEditor.EVENT_CHANGE_CONFIRM="EVENT_CHANGE_CONFIRM",BI.TextEditor.EVENT_VALID="EVENT_VALID",BI.TextEditor.EVENT_ERROR="EVENT_ERROR",BI.TextEditor.EVENT_ENTER="EVENT_ENTER",BI.TextEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.TextEditor.EVENT_REMOVE="EVENT_REMOVE",BI.TextEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.text_editor",BI.TextEditor),BI.SmallTextEditor=BI.inherit(BI.TextEditor,{_defaultConfig:function(){var conf=BI.SmallTextEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{baseCls:(conf.baseCls||"")+" bi-small-text-editor",height:20})},_init:function(){BI.SmallTextEditor.superclass._init.apply(this,arguments)}}),BI.shortcut("bi.small_text_editor",BI.SmallTextEditor),BI.IntervalSlider=BI.inherit(BI.Single,{_constant:{EDITOR_WIDTH:58,EDITOR_R_GAP:60,EDITOR_HEIGHT:30,SLIDER_WIDTH_HALF:15,SLIDER_WIDTH:30,SLIDER_HEIGHT:30,TRACK_HEIGHT:24},props:{baseCls:"bi-interval-slider bi-slider-track",digit:!1,unit:""},render:function(){var self=this,c=this._constant;return this.enable=!1,this.valueOne="",this.valueTwo="",this.calculation=new BI.AccurateCalculationModel,this.grayTrack=BI.createWidget({type:"bi.layout",cls:"gray-track",height:6}),this.blueTrack=BI.createWidget({type:"bi.layout",cls:"blue-track bi-high-light-background",height:6}),this.track=this._createTrackWrapper(),this.labelOne=BI.createWidget({type:"bi.sign_text_editor",cls:"slider-editor-button",text:this.options.unit,allowBlank:!1,width:c.EDITOR_WIDTH,validationChecker:function(v){return self._checkValidation(v)}}),this.labelOne.element.hover(function(){self.labelOne.element.removeClass("bi-border").addClass("bi-border")},function(){self.labelOne.element.removeClass("bi-border")}),this.labelOne.on(BI.Editor.EVENT_CONFIRM,function(){var oldValueOne=self.valueOne,v=BI.parseFloat(this.getValue());self.valueOne=v;var percent=self._getPercentByValue(v),significantPercent=BI.parseFloat(percent.toFixed(1));self._setSliderOnePosition(significantPercent),self._setBlueTrack(),self._checkLabelPosition(oldValueOne,self.valueTwo,self.valueOne,self.valueTwo),self.fireEvent(BI.IntervalSlider.EVENT_CHANGE)}),this.labelTwo=BI.createWidget({type:"bi.sign_text_editor",cls:"slider-editor-button",text:this.options.unit,allowBlank:!1,width:c.EDITOR_WIDTH,validationChecker:function(v){return self._checkValidation(v)}}),this.labelTwo.element.hover(function(){self.labelTwo.element.removeClass("bi-border").addClass("bi-border")},function(){self.labelTwo.element.removeClass("bi-border")}),this.labelTwo.on(BI.Editor.EVENT_CONFIRM,function(){var oldValueTwo=self.valueTwo,v=BI.parseFloat(this.getValue());self.valueTwo=v;var percent=self._getPercentByValue(v),significantPercent=BI.parseFloat(percent.toFixed(1));self._setSliderTwoPosition(significantPercent),self._setBlueTrack(),self._checkLabelPosition(self.valueOne,oldValueTwo,self.valueOne,self.valueTwo),self.fireEvent(BI.IntervalSlider.EVENT_CHANGE)}),this.sliderOne=BI.createWidget({type:"bi.single_slider_button"}),this.sliderTwo=BI.createWidget({type:"bi.single_slider_button"}),this._draggable(this.sliderOne,!0),this._draggable(this.sliderTwo,!1),this._setVisible(!1),{type:"bi.absolute",element:this,items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.track,width:"100%",height:c.TRACK_HEIGHT}]}],hgap:7,height:c.TRACK_HEIGHT},top:23,left:0,width:"100%"},this._createLabelWrapper(),this._createSliderWrapper()]}},_rePosBySizeAfterMove:function(size,isLeft){var o=this.options,percent=100*si
},setValue:function(v){v=BI.isArray(v)?v:[v],this.tree.setValue(v)},populate:function(items){this.tree.populate(items)}}),BI.MultiLayerSelectTreeInsertSearchPane.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.MultiLayerSelectTreeInsertSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_select_tree_insert_search_pane",BI.MultiLayerSelectTreeInsertSearchPane),BI.MultiLayerSelectLevelTree=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSelectLevelTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-select-level-tree",isDefaultInit:!1,items:[],itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,value:"",scrollable:!0})},_init:function(){var o=this.options;BI.MultiLayerSelectLevelTree.superclass._init.apply(this,arguments),this.storeValue=o.value,this.initTree(this.options.items),this.check()},_formatItems:function(nodes,layer,pNode){var self=this,o=this.options,keyword=o.keywordGetter();return BI.each(nodes,function(i,node){var extend={};node.layer=layer,BI.isKey(node.id)||(node.id=BI.UUID()),node.keyword=node.keyword||keyword,extend.pNode=pNode,node.isParent===!0||node.parent===!0||BI.isNotEmptyArray(node.children)?(extend.type="bi.multilayer_select_tree_mid_plus_group_node",i===nodes.length-1&&(extend.type="bi.multilayer_select_tree_last_plus_group_node",extend.isLastNode=!0),0!==i||pNode||(extend.type="bi.multilayer_select_tree_first_plus_group_node"),0!==i||i!==nodes.length-1||pNode||(extend.type="bi.multilayer_select_tree_plus_group_node"),BI.defaults(node,extend),self._formatItems(node.children,layer+1,node)):(extend.type="bi.multilayer_single_tree_mid_tree_leaf_item",0!==i||pNode||(extend.type="bi.multilayer_single_tree_first_tree_leaf_item"),i===nodes.length-1&&(extend.type="bi.multilayer_single_tree_last_tree_leaf_item"),BI.defaults(node,extend))}),nodes},_assertId:function(sNodes){BI.each(sNodes,function(i,node){node.id=node.id||BI.UUID()})},initTree:function(nodes){var self=this,o=this.options,hasNext=!1;this.empty(),this._assertId(nodes),this.tree=BI.createWidget({type:"bi.custom_tree",cls:"tree-view display-table",expander:{type:"bi.select_tree_expander",isDefaultInit:o.isDefaultInit,el:{},popup:{type:"bi.custom_tree"}},items:this._formatItems(BI.Tree.transformToTreeFormat(nodes),0),itemsCreator:function(op,callback){1===op.times&&!op.node&&BI.nextTick(function(){self.loading()}),o.itemsCreator(op,function(ob){hasNext=ob.hasNext,1===op.times&&!op.node&&self._populate(ob.items),callback(self._formatItems(BI.Tree.transformToTreeFormat(ob.items),op.node?op.node.layer+1:0,op.node)),self.setValue(self.storeValue),1===op.times&&!op.node&&BI.nextTick(function(){self.loaded()})})},value:o.value,el:{type:"bi.loader",isDefaultInit:o.itemsCreator!==BI.emptyFn,el:{type:"bi.button_tree",chooseType:o.chooseType,behaviors:o.behaviors,layouts:[{type:"bi.vertical"}]},hasNext:function(){return hasNext}}}),this.tree.on(BI.Controller.EVENT_CHANGE,function(type,value){self.fireEvent(BI.Controller.EVENT_CHANGE,arguments),type===BI.Events.CLICK&&(self.setValue(value),self.fireEvent(BI.MultiLayerSelectLevelTree.EVENT_CHANGE,arguments))}),BI.createWidget({type:"bi.adaptive",element:this,scrollable:o.scrollable,items:[this.tree]})},_populate:function(){BI.MultiLayerSelectLevelTree.superclass.populate.apply(this,arguments)},populate:function(nodes){this._populate(nodes),BI.isNull(nodes)?this.tree.populate():this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(nodes),0))},setValue:function(v){this.options.chooseType===BI.Selection.None||(this.storeValue=v,this.tree.setValue(v))},getValue:function(){return BI.isArray(this.storeValue)?this.storeValue:BI.isNull(this.storeValue)?[]:[this.storeValue]},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(id){return this.tree.getNodeById(id)},getNodeByValue:function(id){return this.tree.getNodeByValue(id)}}),BI.MultiLayerSelectLevelTree.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_select_level_tree",BI.MultiLayerSelectLevelTree),BI.MultiLayerSelectTreePopup=BI.inherit(BI.Widget,{_defaultConfig:fun
return item.value===v});return BI.isNotNull(result)?result.text:o.text}return o.valueFormatter(v)},stopEditing:function(){this.searcher.stopSearch()},getSearcher:function(){return this.searcher},populate:function(items){this.options.items=items,this._initData()},setValue:function(v){this.editor.setState(this._digest(v[0]))},getValue:function(){return this.searcher.getValue()}}),BI.MultiLayerSingleTreeTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.MultiLayerSingleTreeTrigger.EVENT_BLUR="EVENT_BLUR",BI.MultiLayerSingleTreeTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiLayerSingleTreeTrigger.EVENT_STOP="EVENT_STOP",BI.MultiLayerSingleTreeTrigger.EVENT_START="EVENT_START",BI.MultiLayerSingleTreeTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.MultiLayerSingleTreeTrigger.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.shortcut("bi.multilayer_single_tree_trigger",BI.MultiLayerSingleTreeTrigger),BI.MultiLayerSingleTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var conf=BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{extraCls:"bi-multilayer-single-tree-first-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:24})},_init:function(){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var self=this,o=this.options;this.node=this._createNode();for(var needBlankLayers=[],pNode=o.pNode;pNode;)pNode.isLastNode&&needBlankLayers.push(pNode.layer),pNode=pNode.pNode;var items=[];BI.count(0,o.layer,function(index){items.push({type:"bi.layout",cls:BI.contains(needBlankLayers,index)?"":"base-line-conn-background",width:12,height:o.height})}),items.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(o.layer,12),items:[items]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(v){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(v)},_createNode:function(){var self=this,o=this.options;return BI.createWidget({type:"bi.first_plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:o.id,pId:o.pId,open:o.open,isLastNode:o.isLastNode,height:o.height,hgap:o.hgap,text:o.text,value:o.value,py:o.py,keyword:o.keyword,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(type){type!==BI.Events.CLICK&&self.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}}]})}}),BI.shortcut("bi.multilayer_single_tree_first_plus_group_node",BI.MultiLayerSingleTreeFirstPlusGroupNode),BI.MultiLayerSingleTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var conf=BI.MultiLayerSingleTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{extraCls:"bi-multilayer-single-tree-last-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:24})},_init:function(){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var self=this,o=this.options;this.node=this._createNode();for(var needBlankLayers=[],pNode=o.pNode;pNode;)pNode.isLastNode&&needBlankLayers.push(pNode.layer),pNode=pNode.pNode;var items=[];BI.count(0,o.layer,function(index){items.push({type:"bi.layout",cls:BI.contains(needBlankLayers,index)?"":"base-line-conn-background",width:12,height:o.height})}),items.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(o.layer,12),items:[items]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(v){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(v)},_createNode
}),self._adjust(callback)}var self=this,o=this.options;this._assertValue(this.storeValue),this.requesting=!0,o.itemsCreator({type:BI.MultiSelectNoBarCombo.REQ_GET_ALL_DATA,keywords:keywords},function(ob){var values=BI.map(ob.items,"value");digest(values)})},_joinAll:function(res,callback){var self=this,o=this.options;this._assertValue(res),this.requesting=!0,o.itemsCreator({type:BI.MultiSelectNoBarCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(ob){var items=BI.map(ob.items,"value");if(self.storeValue.type===res.type){var change=!1,map=self._makeMap(self.storeValue.value);return BI.each(items,function(i,v){BI.isNotNull(map[v])&&(change=!0,self.storeValue.assist&&self.storeValue.assist.push(map[v]),delete map[v])}),change&&(self.storeValue.value=BI.values(map)),void self._adjust(callback)}var selectedMap=self._makeMap(self.storeValue.value),notSelectedMap=self._makeMap(res.value),newItems=[];BI.each(items,function(i,item){BI.isNotNull(selectedMap[items[i]])&&(self.storeValue.assist&&self.storeValue.assist.push(selectedMap[items[i]]),delete selectedMap[items[i]]),BI.isNull(notSelectedMap[items[i]])&&(BI.remove(self.storeValue.assist,item),newItems.push(item))}),self.storeValue.value=newItems.concat(BI.values(selectedMap)),self._adjust(callback)})},_adjust:function(callback){function adjust(){self.wants2Quit===!0&&(self.fireEvent(BI.MultiSelectNoBarCombo.EVENT_CONFIRM),self.wants2Quit=!1),self.requesting=!1}var self=this,o=this.options;adjust(),callback()},_join:function(res,callback){var self=this,o=this.options;if(this._assertValue(res),this._assertValue(this.storeValue),this.storeValue.type===res.type){var map=this._makeMap(this.storeValue.value);BI.each(res.value,function(i,v){map[v]||(self.storeValue.value.push(v),BI.remove(self.storeValue.assist,v),map[v]=v)});var change=!1;return BI.each(res.assist,function(i,v){BI.isNotNull(map[v])&&(change=!0,self.storeValue.assist&&self.storeValue.assist.push(map[v]),delete map[v])}),change&&(this.storeValue.value=BI.values(map)),void self._adjust(callback)}this._joinAll(res,callback)},_setStartValue:function(value){this._startValue=value,this.popup.setStartValue(value)},setValue:function(v){this.storeValue={type:BI.Selection.Multi,value:v||[]},this.combo.setValue(this.storeValue),this.numberCounter.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue.value)},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.MultiSelectNoBarCombo,{REQ_GET_DATA_LENGTH:1,REQ_GET_ALL_DATA:-1}),BI.MultiSelectNoBarCombo.EVENT_BLUR="EVENT_BLUR",BI.MultiSelectNoBarCombo.EVENT_FOCUS="EVENT_FOCUS",BI.MultiSelectNoBarCombo.EVENT_STOP="EVENT_STOP",BI.MultiSelectNoBarCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectNoBarCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.MultiSelectNoBarCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_select_no_bar_combo",BI.MultiSelectNoBarCombo),BI.MultiSelectInsertCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-insert-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24,attributes:{tabIndex:0},allowEdit:!0})},_init:function(){BI.MultiSelectInsertCombo.superclass._init.apply(this,arguments);var self=this,o=this.options,assertShowValue=function(){BI.isKey(self._startValue)&&(self.storeValue.type===BI.Selection.All?BI.remove(self.storeValue.value,self._startValue):BI.pushDistinct(self.storeValue.value,self._startValue)),self.trigger.getSearcher().setState(self.storeValue),self.numberCounter.setButtonChecked(self.storeValue)};this.storeValue=o.value||{},this.requesting=!1,this.trigger=BI.createWidget({type:"bi.multi_select_insert_trigger",allowEdit:o.allowEdit,height:o.height,text:o.text,watermark:o.watermark,masker:{offset:{left:0,top:0,right:0,bottom:25}},valueFormatter:o.valueFormatter,itemsCreator:BI.bind(this._itemsCreator4Trigger,this),value:o.value}),this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_FOCUS,function(){self.fireEvent(BI.MultiSelectIn
},resetHeight:function(h){this.button_group.element.css({"max-height":h+"px"})},resetWidth:function(){}}),BI.MultiSelectNoBarLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_no_bar_loader",BI.MultiSelectNoBarLoader),BI.MultiSelectPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-popup-view",maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectPopupView.superclass._init.apply(this,arguments);var self=this,opts=this.options;this.loader=BI.createWidget({type:"bi.multi_select_loader",itemsCreator:opts.itemsCreator,valueFormatter:opts.valueFormatter,onLoaded:opts.onLoaded,value:opts.value}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",stopPropagation:!1,maxWidth:opts.maxWidth,minWidth:opts.minWidth,maxHeight:opts.maxHeight,element:this,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.loader,value:opts.value}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){self.fireEvent(BI.MultiSelectPopupView.EVENT_CHANGE)}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(index){switch(index){case 0:self.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CLEAR);break;case 1:self.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM)}})},isAllSelected:function(){return this.loader.isAllSelected()},setStartValue:function(v){this.loader.setStartValue(v)},setValue:function(v){this.popupView.setValue(v)},getValue:function(){return this.popupView.getValue()},populate:function(items){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(h){this.popupView.resetHeight(h)},resetWidth:function(w){this.popupView.resetWidth(w)}}),BI.MultiSelectPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiSelectPopupView.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_select_popup_view",BI.MultiSelectPopupView),BI.MultiSelectNoBarPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectNoBarPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-popup-view",maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.MultiSelectNoBarPopupView.superclass._init.apply(this,arguments);var self=this,opts=this.options;this.loader=BI.createWidget({type:"bi.multi_select_no_bar_loader",itemsCreator:opts.itemsCreator,valueFormatter:opts.valueFormatter,onLoaded:opts.onLoaded,value:opts.value}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",stopPropagation:!1,maxWidth:opts.maxWidth,minWidth:opts.minWidth,maxHeight:opts.maxHeight,element:this,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.loader,value:opts.value}),this.popupView.on(BI.MultiPopupView.EVENT_CHANGE,function(){self.fireEvent(BI.MultiSelectNoBarPopupView.EVENT_CHANGE)}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(index){switch(index){case 0:self.fireEvent(BI.MultiSelectNoBarPopupView.EVENT_CLICK_CLEAR);break;case 1:self.fireEvent(BI.MultiSelectNoBarPopupView.EVENT_CLICK_CONFIRM)}})},setStartValue:function(v){this.loader.setStartValue(v)},setValue:function(v){this.popupView.setValue(v)},getValue:function(){return this.popupView.getValue()},populate:function(items){this.popupView.populate.apply(this.popupView,arguments)},resetHeight:function(h){this.popupView.resetHeight(h)},resetWidth:function(w){this.popupView.resetWidth(w)}}),BI.MultiSelectNoBarPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectNoBarPopupView.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiSelectNoBarPopupView.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.shortcut("bi.multi_select_no_bar_popup_view",BI.MultiSelectNoBarPopupView),BI.MultiSelectTrigger=BI.inherit(BI.Trigger,{constants:{height:14,rgap:4,lgap:4},_defaultConfig:function(){return BI.extend(B
}),callback()}var self=this,o=this.options;this._assertValue(this.storeValue),o.itemsCreator({type:BI.MultiSelectInsertList.REQ_GET_ALL_DATA,keywords:keywords},function(ob){var values=BI.map(ob.items,"value");digest(values)})},_joinAll:function(res,callback){var self=this,o=this.options;this._assertValue(res),o.itemsCreator({type:BI.MultiSelectInsertList.REQ_GET_ALL_DATA,keywords:[self.trigger.getKeyword()]},function(ob){var items=BI.map(ob.items,"value");if(self.storeValue.type===res.type){var change=!1,map=self._makeMap(self.storeValue.value);return BI.each(items,function(i,v){BI.isNotNull(map[v])&&(change=!0,delete map[v])}),change&&(self.storeValue.value=BI.values(map)),void callback()}var selectedMap=self._makeMap(self.storeValue.value),notSelectedMap=self._makeMap(res.value),newItems=[];BI.each(items,function(i,item){BI.isNotNull(selectedMap[items[i]])&&delete selectedMap[items[i]],BI.isNull(notSelectedMap[items[i]])&&newItems.push(item)}),self.storeValue.value=newItems.concat(BI.values(selectedMap)),callback()})},_join:function(res,callback){var self=this,o=this.options;if(this._assertValue(res),this._assertValue(this.storeValue),this.storeValue.type===res.type){var map=this._makeMap(this.storeValue.value);BI.each(res.value,function(i,v){map[v]||(self.storeValue.value.push(v),map[v]=v)});var change=!1;return BI.each(res.assist,function(i,v){BI.isNotNull(map[v])&&(change=!0,delete map[v])}),change&&(this.storeValue.value=BI.values(map)),void callback()}this._joinAll(res,callback)},_setStartValue:function(value){this._startValue=value,this.adapter.setStartValue(value)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(v){this.storeValue=v||{},this._assertValue(this.storeValue),this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.MultiSelectInsertList,{REQ_GET_DATA_LENGTH:1,REQ_GET_ALL_DATA:-1}),BI.MultiSelectInsertList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_insert_list",BI.MultiSelectInsertList),BI.MultiSelectInsertNoBarList=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertNoBarList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-insert-list",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectInsertNoBarList.superclass._init.apply(this,arguments);var self=this,o=this.options;this.storeValue={type:BI.Selection.Multi,value:o.value||[]};var assertShowValue=function(){BI.isKey(self._startValue)&&(self.storeValue.type===BI.Selection.All?BI.remove(self.storeValue.value,self._startValue):BI.pushDistinct(self.storeValue.value,self._startValue))};this.adapter=BI.createWidget({type:"bi.multi_select_no_bar_loader",cls:"popup-multi-select-list bi-border-left bi-border-right bi-border-bottom",itemsCreator:o.itemsCreator,valueFormatter:o.valueFormatter,logic:{dynamic:!1},el:{},value:{type:BI.Selection.Multi,value:o.value||[]}}),this.adapter.on(BI.MultiSelectLoader.EVENT_CHANGE,function(){self.storeValue=this.getValue(),assertShowValue(),self.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE)}),this.searcherPane=BI.createWidget({type:"bi.multi_select_search_insert_pane",cls:"bi-border-left bi-border-right bi-border-bottom",valueFormatter:o.valueFormatter,keywordGetter:function(){return self.trigger.getKeyword()},itemsCreator:function(op,callback){op.keywords=[self.trigger.getKeyword()],this.setKeyword(op.keywords[0]),o.itemsCreator(op,callback)},listeners:[{eventName:BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM,action:function(){var keyword=self.trigger.getKeyword();self.trigger.hasMatched()||(self.storeValue.type===BI.Selection.Multi&&BI.pushDistinct(self.storeValue.value,keyword),self._showAdapter(),self.adapter.setValue(self.storeValue),self.adapter.populate(),self.storeValue.type===BI.Selection.Multi&&self.fireEvent(BI.MultiSelectInsertNoBarL
}),this.trigger.on(BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK,function(){self.combo.toggle()}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(){var checked=this.getSearcher().hasChecked(),val={type:BI.Selection.Multi,value:checked?{1:1}:{}};this.getSearcher().setState(checked?BI.Selection.Multi:BI.Selection.None),self.numberCounter.setButtonChecked(val),self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM,self.combo.getValue())}),this.combo.on(BI.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())}),this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW,function(){isSearching()?(self._stopEditing(),self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CONFIRM)):isPopupView()&&(self._stopEditing(),self.storeValue={value:self.combo.getValue()},clear===!0&&(self.storeValue={value:{}}),self.fireEvent(BI.MultiTreeInsertCombo.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"},itemsCreator:o.itemsCreator,masker:{offset:this.constants.offset},valueFormatter:o.valueFormatter,value:o.value}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE,function(){self.combo.isViewVisible()||self.combo.showView()}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW,function(){want2showCounter===!1&&(want2showCounter=!0),isInit===!0&&(want2showCounter=null,showCounter())}),this.numberCounter.on(BI.Events.VIEW,function(b){BI.nextTick(function(){self.trigger.refreshPlaceHolderWidth(b===!0?self.numberCounter.element.outerWidth()+8:0)})}),this.trigger.element.click(function(e){self.trigger.element.find(e.target).length>0&&self.numberCounter.hideView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:triggerBtn,right:0,top:0,bottom:0},{el:{type:"bi.vertical_adapt",items:[this.numberCounter]},right:o.height,top:0,height:o.height}]})},_assertShowValue:function(){this.trigger.getSearcher().setState(this.storeValue),this.numberCounter.setButtonChecked(this.storeValue)},_stopEditing:function(){this.trigger.stopEditing(),this.numberCounter.hideView()},_defaultState:function(){this._stopEditing(),this.combo.hideView()},setValue:function(v){this.storeValue.value=v||{},this.combo.setValue({value:v||{}}),this.numberCounter.setValue({value:v||{}})},getValue:function(){return BI.deepClone(this.storeValue.value)},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.MultiTreeInsertCombo.EVENT_FOCUS="EVENT_FOCUS",BI.MultiTreeInsertCombo.EVENT_BLUR="EVENT_BLUR",BI.MultiTreeInsertCombo.EVENT_STOP="EVENT_STOP",BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.MultiTreeInsertCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiTreeInsertCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_tree_insert_combo",BI.MultiTreeInsertCombo),BI.MultiTreeListCombo=BI.inherit(BI.Single,{constants:{offset:{top:0,left:0,right:0,bottom:25}},_defaultConfig:function(){return BI.extend(BI.MultiTreeListCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-list-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24,allowEdit:!0,allowInsertValue:!0})},_init:function(){function showCounter(){isSearching()?self.storeValue={value:self.trigger.getValue()}:isPopupView()&&(self.storeValue={value:self.combo.getValue()}),self.trigger.setValue(self.storeValue),self.numberCounter.setValue(self.storeValue)}BI.MultiTreeListCombo.superclass._init.apply(this,arguments);var self=this,o=this.options,isInit=!
self.smallEditor.setTitle(v),self.label.setTitle(v)},_setFocusEvent:function(w){var self=this,c=this.constants;w.on(BI.NumberIntervalSingleEidtor.EVENT_FOCUS,function(){switch(self._setTitle(""),self._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),self,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),self,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),self,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;default:return}})},_setBlurEvent:function(w){var c=this.constants,self=this;w.on(BI.NumberIntervalSingleEidtor.EVENT_BLUR,function(){switch(BI.Bubbles.hide(c.typeError),BI.Bubbles.hide(c.numberError),BI.Bubbles.hide(c.signalError),self._checkValidation()){case c.typeError:self._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data"));break;case c.numberError:self._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value"));break;case c.signalError:self._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value"));break;default:self._setTitle("")}})},_setErrorEvent:function(w){var c=this.constants,self=this;w.on(BI.NumberIntervalSingleEidtor.EVENT_ERROR,function(){self._checkValidation(),BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),self,{offsetStyle:"left",adjustYOffset:c.adjustYOffset}),self.fireEvent(BI.NumberInterval.EVENT_ERROR)})},_setValidEvent:function(w){var self=this,c=this.constants;w.on(BI.NumberIntervalSingleEidtor.EVENT_VALID,function(){switch(self._checkValidation()){case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),self,{offsetStyle:"left",adjustYOffset:c.adjustYOffset}),self.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),self,{offsetStyle:"left",adjustYOffset:c.adjustYOffset}),self.fireEvent(BI.NumberInterval.EVENT_ERROR);break;default:self.fireEvent(BI.NumberInterval.EVENT_VALID)}})},_setEditorValueChangedEvent:function(w){var self=this,c=this.constants;w.on(BI.NumberIntervalSingleEidtor.EVENT_CHANGE,function(){switch(self._checkValidation()){case c.typeError:BI.Bubbles.show(c.typeError,BI.i18nText("BI-Numerical_Interval_Input_Data"),self,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;case c.numberError:BI.Bubbles.show(c.numberError,BI.i18nText("BI-Numerical_Interval_Number_Value"),self,{offsetStyle:"left",adjustYOffset:c.adjustYOffset});break;case c.signalError:BI.Bubbles.show(c.signalError,BI.i18nText("BI-Numerical_Interval_Signal_Value"),self,{offsetStyle:"left",adjustYOffset:c.adjustYOffset})}self.fireEvent(BI.NumberInterval.EVENT_CHANGE)}),w.on(BI.NumberIntervalSingleEidtor.EVENT_CONFIRM,function(){self.fireEvent(BI.NumberInterval.EVENT_CONFIRM)})},_setComboValueChangedEvent:function(w){var self=this,c=this.constants;w.on(BI.IconCombo.EVENT_CHANGE,function(){switch(self._checkValidation()){case c.typeError:self._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data")),self.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case c.numberError:self._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value")),self.fireEvent(BI.NumberInterval.EVENT_ERROR);break;case c.signalError:self._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value")),self.fireEvent(BI.NumberInterval.EVENT_ERROR);break;default:self.fireEvent(BI.NumberInterval.EVENT_CHANGE),self.fireEvent(BI.NumberInterval.EVENT_CONFIRM),self.fireEvent(BI.NumberInterval.EVENT_VALID)}})},isStateValid:function(){return"valid"===this.options.validation},setMinEnable:function(b){this.smallEditor.setEnable(b)},setCloseMinEnable:function(b){this.smallCombo.setEnable(b)},setMaxEnable:function(b){this.bigEditor.setEnable(b)},setCloseMaxEnable:function(b){this.bigCombo.setEnable(b)},showNumTip:function(){this.smallTip.setVisible(!0),this.bigTip.setVisible(!0)},hideNumTip:function(){t
return BI.extend(conf,{baseCls:(conf.baseCls||"")+" bi-select-tree-last-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:24})},_init:function(){BI.SelectTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var self=this,o=this.options;this.checkbox=BI.createWidget({type:"bi.last_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:o.height,height:o.height,hgap:o.hgap,text:o.text,value:o.value,keyword:o.keyword,py:o.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(type){type===BI.Events.CLICK&&(this.isSelected()?self.triggerExpand():self.triggerCollapse())});var type=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),items=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(type,BI.extend(o.logic,{items:items}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(v){BI.SelectTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(v)}}),BI.shortcut("bi.select_tree_last_plus_group_node",BI.SelectTreeLastPlusGroupNode),BI.SelectTreeMidPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var conf=BI.SelectTreeMidPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{baseCls:(conf.baseCls||"")+" bi-select-tree-mid-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:24})},_init:function(){BI.SelectTreeMidPlusGroupNode.superclass._init.apply(this,arguments);var self=this,o=this.options;this.checkbox=BI.createWidget({type:"bi.mid_tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:o.height,height:o.height,hgap:o.hgap,text:o.text,value:o.value,keyword:o.keyword,py:o.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(type){type===BI.Events.CLICK&&(this.isSelected()?self.triggerExpand():self.triggerCollapse())});var type=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),items=BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left,{width:24,el:this.checkbox},this.text);BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(type,BI.extend(o.logic,{items:items}))))},isOnce:function(){return!0},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doClick:function(){BI.NodeButton.superclass.doClick.apply(this,arguments)},setOpened:function(v){BI.SelectTreeMidPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.checkbox)&&this.checkbox.setSelected(v)}}),BI.shortcut("bi.select_tree_mid_plus_group_node",BI.SelectTreeMidPlusGroupNode),BI.SelectTreePlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var conf=BI.SelectTreePlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{baseCls:(conf.baseCls||"")+" bi-select-tree-plus-group-node bi-list-item-active",logic:{dynamic:!1},id:"",pId:"",readonly:!0,open:!1,height:24})},_init:function(){BI.SelectTreePlusGroupNode.superclass._init.apply(this,arguments);var self=this,o=this.options;this.checkbox=BI.createWidget({type:"bi.tree_node_checkbox",stopPropagation:!0}),this.text=BI.createWidget({type:"bi.label",textAlign:"left",whiteSpace:"nowrap",textHeight:o.height,height:o.height,hgap:o.hgap,text:o.text,value:o.value,keyword:o.keyword,py:o.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(type){type===BI.Events.CLICK&&(this.isSelected()?self.triggerExpand():self.triggerCollapse())});var type=BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left),items=BI.LogicFactory.createLogicItemsByDirection(BI.
},getSelectedButtons:function(){return this.list.getSelectedButtons()},getNotSelectedButtons:function(){return this.list.getNotSelectedButtons()},getIndexByValue:function(value){return this.list.getIndexByValue(value)},getNodeById:function(id){return this.list.getNodeById(id)},getNodeByValue:function(value){return this.list.getNodeByValue(value)}}),BI.SingleSelectList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_list",BI.SingleSelectList),BI.SingleSelectLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-loader",logic:{dynamic:!0},el:{height:400},allowNoSelect:!1,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.SingleSelectLoader.superclass._init.apply(this,arguments);var self=this,opts=this.options,hasNext=!1;this.storeValue=opts.value,this.button_group=BI.createWidget({type:"bi.single_select_list",allowNoSelect:opts.allowNoSelect,logic:opts.logic,el:BI.extend({onLoaded:opts.onLoaded,el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},opts.el),itemsCreator:function(op,callback){var startValue=self._startValue;BI.isNotNull(self.storeValue)&&(op=BI.extend(op||{},{selectedValues:[self.storeValue]})),opts.itemsCreator(op,function(ob){hasNext=ob.hasNext;var firstItems=[];if(1===op.times&&BI.isNotNull(self.storeValue)){var json=BI.map([self.storeValue],function(i,v){var txt=opts.valueFormatter(v)||v;return{text:txt,value:v,title:txt,selected:!0}});firstItems=self._createItems(json)}callback(firstItems.concat(self._createItems(ob.items)),ob.keyword||""),1===op.times&&self.storeValue&&(BI.isKey(startValue)&&(self.storeValue=startValue),self.setValue(self.storeValue)),1===op.times&&self._scrollToTop()})},hasNext:function(){return hasNext},value:this.storeValue}),BI.createWidget({type:"bi.vertical",element:this,items:[this.button_group],vgap:5}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){self.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SingleSelectList.EVENT_CHANGE,function(){self.fireEvent(BI.SingleSelectLoader.EVENT_CHANGE,arguments)})},_createItems:function(items){return BI.createItems(items,{type:this.options.allowNoSelect?"bi.single_select_item":"bi.single_select_combo_item",logic:this.options.logic,cls:"bi-list-item-active",height:24,selected:!1})},_scrollToTop:function(){var self=this;BI.delay(function(){self.button_group.element.scrollTop(0)},30)},_assertValue:function(val){},setStartValue:function(v){this._startValue=v},setValue:function(v){this.storeValue=v,this._assertValue(this.storeValue),this.button_group.setValue(this.storeValue)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(items){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(h){this.button_group.resetHeight(h)},resetWidth:function(w){this.button_group.resetWidth(w)}}),BI.SingleSelectLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_loader",BI.SingleSelectLoader),BI.SingleSelectPopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectPopupView.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-popup-view",allowNoSelect:!1,maxWidth:"auto",minWidth:135,maxHeight:400,valueFormatter:BI.emptyFn,itemsCreator:BI.emptyFn,onLoaded:BI.emptyFn})},_init:function(){BI.SingleSelectPopupView.superclass._init.apply(this,arguments);var self=this,opts=this.options;this.loader=BI.createWidget({type:"bi.single_select_loader",allowNoSelect:opts.allowNoSelect,itemsCreator:opts.itemsCreator,valueFormatter:opts.valueFormatter,onLoaded:opts.onLoaded,value:opts.value}),this.popupView=BI.createWidget({type:"bi.popup_view",stopPropagation:!1,maxWidth:opts.maxWidth,minWidth:opts.minWidth,maxH
},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))},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(){var o=this.options;isNaN(this.min)||isNaN(this.max)||(this._setVisible(!0),this.enable=!0,BI.isNumeric(this.value)||BI.isNotEmptyString(this.value)?(this.label.setValue(this.value+o.unit),this._setAllPosition(this._getPercentByValue(this.value))):(this.label.setValue(this.max+o.unit),this._setAllPosition(100)))}}),BI.SingleSliderLabel.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_slider_label",BI.SingleSliderLabel),BI.SingleSliderNormal=BI.inherit(BI.Single,{_constant:{HEIGHT:28,SLIDER_WIDTH_HALF:15,SLIDER_WIDTH:30,SLIDER_HEIGHT:30,TRACK_HEIGHT:24,TRACK_GAP_HALF:7,TRACK_GAP:14},props:{baseCls:"bi-single-slider-normal bi-slider-track",minMax:{min:0,max:100}},render:function(){var self=this,c=this._constant,track=this._createTrack();this.slider=BI.createWidget({type:"bi.single_slider_button"}),this._draggable(this.slider);var sliderVertical=BI.createWidget({type:"bi.vertical",items:[{type:"bi.absolute",items:[this.slider]}],hgap:c.SLIDER_WIDTH_HALF,height:c.SLIDER_HEIGHT});return sliderVertical.element.click(function(e){if(self.enable&&self.isEnabled()){var offset=e.clientX-self.element.offset().left-c.SLIDER_WIDTH_HALF,trackLength=self.track.element[0].scrollWidth-c.TRACK_GAP,percent=0;offset<0&&(percent=0),offset>0&&offset<trackLength&&(percent=100*offset/self._getGrayTrackLength()),offset>=trackLength&&(percent=100);var significantPercent=BI.parseFloat(percent.toFixed(1));self._setAllPosition(significantPercent);var v=self._getValueByPercent(significantPercent);self.value=v,self.fireEvent(BI.SingleSlider.EVENT_CHANGE)}}),{type:"bi.absolute",element:this,items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:track,width:"100%",height:c.TRACK_HEIGHT}]}],hgap:c.TRACK_GAP_HALF,height:c.TRACK_HEIGHT},top:3,left:0,width:"100%"},{el:sliderVertical,top:0,left:0,width:"100%"}]}},_draggable:function(widget){function optimizeSize(s){return BI.clamp(s,0,self._getGrayTrackLength())}var self=this,o=this.options,startDrag=!1,size=0,offset=0,defaultSize=0,mouseMoveTracker=new BI.MouseMoveTracker(function(deltaX){if(mouseMoveTracker.isDragging()){startDrag=!0,offset+=deltaX,size=optimizeSize(defaultSize+offset),widget.element.addClass("dragging");var percent=100*size/self._getGrayTrackLength(),significantPercent=BI.parseFloat(percent.toFixed(1));self._setBlueTrack(significantPercent),self._setSliderPosition(significantPercent);var v=self._getValueByPercent(significantPercent);v=o.digit===!1?v:v.toFixed(o.digit),self.value=v,self.fireEvent(BI.SingleSliderNormal.EVENT_DRAG,v)}},function(){if(startDrag===!0){size=optimizeSize(size);var percent=100*size/self._getGrayTrackLength(),significantPercent=BI.parseFloat(percent.toFixed(1));self._setSliderPosition(significantPercent),size=0,offset=0,defaultSize=size,startDrag=!1}widget.element.removeClass("dragging"),mouseMoveTracker.releaseMouseMoves(),self.fireEvent(BI.SingleSlider.EVENT_CHANGE)},window);widget.element.on("mousedown",function(event){widget.isEnabled()&&(defaultSize=this.offsetLeft,optimizeSize(defaultSize),mouseMoveTracker.captureMouseMoves(event))})},_createTrack:function(){var self=this,c=this._constant;return this.grayTrack=BI.createWidget({type:"bi.layout",cls:"gray-track",height:6}),this.blueTrack=BI.createWidget({type:"bi.layout",cls:"blue-track bi-high-light-background",height:6}),this.options.color&&this.blueTrack.element.css({"background-color":this.options.color}),{type:"bi.absolute",items:[{el:{type:"bi.vertical",items:[{type:"bi.absolute",items:[{el:this.grayTrack,top:0,left:0,wi
}(),BI.DynamicYearCard=BI.inherit(BI.Widget,{props:{baseCls:"bi-year-card"},render:function(){var self=this;return{type:"bi.vertical",items:[{type:"bi.label",text:BI.i18nText("BI-Multi_Date_Relative_Current_Time"),textAlign:"left",height:24},{type:"bi.dynamic_date_param_item",ref:function(){self.item=this},listeners:[{eventName:"EVENT_CHANGE",action:function(){self.fireEvent("EVENT_CHANGE")}}]}],vgap:10,hgap:10}},_createValue:function(type,v){return{dateType:type,value:Math.abs(v),offset:v>0?1:0}},setValue:function(v){v=v||{year:0},this.item.setValue(this._createValue(BI.DynamicDateCard.TYPE.YEAR,v.year))},getValue:function(){var value=this.item.getValue();return{year:0===value.offset?-value.value:value.value}}}),BI.DynamicYearCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_year_card",BI.DynamicYearCard),BI.StaticYearCard=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.StaticYearCard.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-year-card",behaviors:{},min:"1900-01-01",max:"2099-12-31"})},_createYearCalendar:function(v){var o=this.options,y=this._year,calendar=BI.createWidget({type:"bi.year_calendar",behaviors:o.behaviors,min:o.min,max:o.max,logic:{dynamic:!0},year:y+12*v});return calendar.setValue(this._year),calendar},_init:function(){BI.StaticYearCard.superclass._init.apply(this,arguments);var self=this,o=this.options;this.selectedYear=this._year=BI.getDate().getFullYear(),this.backBtn=BI.createWidget({type:"bi.icon_button",cls:"pre-page-h-font",width:25,height:25,value:-1,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){self.navigation.setSelect(self.navigation.getSelect()-1),self._checkLeftValid(),self._checkRightValid()}}]}),this.preBtn=BI.createWidget({type:"bi.icon_button",cls:"next-page-h-font",width:25,height:25,value:1,listeners:[{eventName:BI.IconButton.EVENT_CHANGE,action:function(){self.navigation.setSelect(self.navigation.getSelect()+1),self._checkLeftValid(),self._checkRightValid()}}]}),this.navigation=BI.createWidget({type:"bi.navigation",direction:"top",element:this,single:!0,logic:{dynamic:!0},tab:{type:"bi.htape",cls:"bi-split-top bi-split-bottom",height:30,items:[{el:{type:"bi.center_adapt",items:[self.backBtn]},width:25},{type:"bi.layout"},{el:{type:"bi.center_adapt",items:[self.preBtn]},width:25}]},cardCreator:BI.bind(this._createYearCalendar,this),afterCardShow:function(){this.setValue(self.selectedYear);var calendar=this.getSelectedCard();self.backBtn.setEnable(!calendar.isFrontYear()),self.preBtn.setEnable(!calendar.isFinalYear())}}),this.navigation.on(BI.Navigation.EVENT_CHANGE,function(){self.selectedYear=this.getValue(),self.fireEvent(BI.Controller.EVENT_CHANGE,arguments),self.fireEvent(BI.StaticYearCard.EVENT_CHANGE,self.selectedYear)}),BI.isKey(o.value)&&this.setValue(o.value)},_checkLeftValid:function(){var o=this.options,valid=!0;return this.backBtn.setEnable(valid),valid},_checkRightValid:function(){var o=this.options,valid=!0;return this.preBtn.setEnable(valid),valid},getValue:function(){return{year:this.selectedYear}},setValue:function(obj){var o=this.options;obj=obj||{};var v=obj.year;BI.checkDateVoid(v,1,1,o.min,o.max)[0]?(v=BI.getDate().getFullYear(),this.selectedYear="",this.navigation.setSelect(BI.YearCalendar.getPageByYear(v)),this.navigation.setValue("")):(this.selectedYear=BI.parseInt(v),this.navigation.setSelect(BI.YearCalendar.getPageByYear(v)),this.navigation.setValue(this.selectedYear)),this._checkLeftValid(),this._checkRightValid()}}),BI.StaticYearCard.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.static_year_card",BI.StaticYearCard),BI.DynamicYearCombo=BI.inherit(BI.Widget,{props:{baseCls:"bi-year-combo bi-border bi-focus-shadow",behaviors:{},min:"1900-01-01",max:"2099-12-31",height:22},_init:function(){BI.DynamicYearCombo.superclass._init.apply(this,arguments);var self=this,o=this.options;this.storeValue=o.value,this.trigger=BI.createWidget({type:"bi.dynamic_year_trigger",min:o.min,max:o.max,height:o.height,value:o.value||""}),this.trigger.on(BI.DynamicYearTrigger.EVENT_FOCUS,function(){self.storeTriggerValue=t
case 1:return value.month;case 2:return value.year;case 3:default:return value.year+"-"+value.month}},setValue:function(v){var type,value,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:value=value||{};var month=BI.isNull(value.month)?null:value.month;this.yearEditor.setValue(value.year),this.monthEditor.setValue(month)}},getValue:function(){return this.storeValue},getKey:function(){return this.yearEditor.getValue()+"-"+this.monthEditor.getValue()},isValid:function(){return this.yearEditor.isValid()&&this.monthEditor.isValid()}}),BI.DynamicYearMonthTrigger.EVENT_VALID="EVENT_VALID",BI.DynamicYearMonthTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.DynamicYearMonthTrigger.EVENT_ERROR="EVENT_ERROR",BI.DynamicYearMonthTrigger.EVENT_START="EVENT_START",BI.DynamicYearMonthTrigger.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicYearMonthTrigger.EVENT_STOP="EVENT_STOP",BI.DynamicYearMonthTrigger.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.shortcut("bi.dynamic_year_month_trigger",BI.DynamicYearMonthTrigger),BI.YearMonthInterval=BI.inherit(BI.Single,{constants:{height:24,width:25,lgap:15,offset:-15,timeErrorCls:"time-error"},props:{extraCls:"bi-year-month-interval",minDate:"1900-01-01",maxDate:"2099-12-31"},_init:function(){var self=this,o=this.options;BI.YearMonthInterval.superclass._init.apply(this,arguments),o.value=o.value||{},this.left=this._createCombo(o.value.start),this.right=this._createCombo(o.value.end),this.label=BI.createWidget({type:"bi.label",height:this.constants.height,width:this.constants.width,text:"-"}),BI.createWidget({element:self,type:"bi.center",hgap:15,height:this.constants.height,items:[{type:"bi.absolute",items:[{el:self.left,left:this.constants.offset,right:0,top:0,bottom:0}]},{type:"bi.absolute",items:[{el:self.right,left:0,right:this.constants.offset,top:0,bottom:0}]}]}),BI.createWidget({type:"bi.horizontal_auto",element:this,items:[self.label]})},_createCombo:function(v){var self=this,o=this.options,combo=BI.createWidget({type:"bi.dynamic_year_month_combo",behaviors:o.behaviors,value:v,listeners:[{eventName:BI.DynamicYearMonthCombo.EVENT_BEFORE_POPUPVIEW,action:function(){self.fireEvent(BI.YearMonthInterval.EVENT_BEFORE_POPUPVIEW)}}]});return combo.on(BI.DynamicYearMonthCombo.EVENT_ERROR,function(){self._clearTitle(),BI.Bubbles.hide("error"),self.element.removeClass(self.constants.timeErrorCls),self.fireEvent(BI.YearMonthInterval.EVENT_ERROR)}),combo.on(BI.DynamicYearMonthCombo.EVENT_VALID,function(){self._checkValid()}),combo.on(BI.DynamicYearMonthCombo.EVENT_FOCUS,function(){self._checkValid()}),combo.on(BI.DynamicYearMonthCombo.EVENT_BEFORE_POPUPVIEW,function(){self.left.hideView(),self.right.hideView()}),combo.on(BI.DynamicYearMonthCombo.EVENT_CONFIRM,function(){BI.Bubbles.hide("error");var smallDate=self.left.getKey(),bigDate=self.right.getKey();self.left.isValid()&&self.right.isValid()&&self._check(smallDate,bigDate)&&self._compare(smallDate,bigDate)?(self._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")),self.element.addClass(self.constants.timeErrorCls),self.fireEvent(BI.YearMonthInterval.EVENT_ERROR)):(self._clearTitle(),self.element.removeClass(self.constants.timeErrorCls),self.fireEvent(BI.YearMonthInterval.EVENT_CHANGE))}),combo},_dateCheck:function(date){return BI.print(BI.parseDateTime(date,"%Y-%x"),"%Y-%x")===date||BI.print(BI.parseDateTime(date,"%Y-%X"),"%Y-%X")===date},_checkVoid:function(obj){var o=this.options;return!BI.checkDateVoid(obj.year,obj.month,1,o.minDate,o.maxDate)[0]},_check:function(smallDate,bigDate){var smallObj=smallDate.match(/\d+/g),bigObj=bigDate.match(/\d+/g),smallDate4Check="";BI.isNotNull(smallObj)&&(smallDate4Check=(smallObj[0]||"")+"-"+(smallObj[1]||1));var bigDate4Check="";return BI.isNotNull(bigObj)&&(bigDate4Check=(bigObj[0]||"")+"-"+(bigObj[1]||1)),this._dateCheck(smallDate4Check)&&BI.checkDateLegal(smallDate)&&this.
var can=!0;return BI.each(selected,function(k,v){var p=BI.clone(parents);p.push(k),dealWithSelectedValues(selected[k],p)||(BI.each(selected[k],function(nk,nv){var t=BI.clone(p);t.push(nk),result.push(t)}),can=!1)}),can&&isAllSelected(selected,parents)}function isAllSelected(selected,parents){return BI.isEmpty(selected)||self._getChildCount(parents)===BI.size(selected)}var self=this,result=[],selectedValues=op.selectedValues;if(null==selectedValues||BI.isEmpty(selectedValues))return void callback({});BI.each(selectedValues,function(k,v){result.push([k])}),dealWithSelectedValues(selectedValues,[]);var jo={};BI.each(result,function(i,strs){self._buildTree(jo,strs)}),callback(jo)},_reqInitTreeNode:function(op,callback){function search(){var children=self._getChildren([]),start=children.length;if(""!==lastSearchValue){for(var j=0,len=start;j<len;j++)if(children[j].value===lastSearchValue){start=j+1;break}}else start=0;for(var output=[],i=start,len=children.length;i<len;i++){if(output.length<self._const.perPage)var find=nodeSearch(1,[],children[i].value,!1,result);else if(output.length===self._const.perPage)var find=nodeSearch(1,[],children[i].value,!1,[]);if(find[0]===!0&&output.push(children[i].value),output.length>self._const.perPage)break}if(1===op.times){var nodes=self._getAddedValueNode([],selectedValues);result=BI.concat(BI.filter(nodes,function(idx,node){var find=BI.Func.getSearchResult([node.text||node.value],keyword);return find.find.length>0||find.match.length>0}),result)}return output}function nodeSearch(deep,parentValues,current,isAllSelect,result){if(self._isMatch(parentValues,current,keyword)){var checked=isAllSelect||isSelected(parentValues,current);return createOneJson(parentValues,current,!1,checked,!isAllSelect&&isHalf(parentValues,current),!0,result),[!0,checked]}var newParents=BI.clone(parentValues);newParents.push(current);var children=self._getChildren(newParents),can=!1,checked=!1,isCurAllSelected=isAllSelect||isAllSelected(parentValues,current);return BI.each(children,function(i,child){var state=nodeSearch(deep+1,newParents,child.value,isCurAllSelected,result);state[1]===!0&&(checked=!0),state[0]===!0&&(can=!0)}),can===!0&&(checked=isCurAllSelected||isSelected(parentValues,current)&&checked,createOneJson(parentValues,current,!0,checked,!1,!1,result)),[can,checked]}function createOneJson(parentValues,value,isOpen,checked,half,flag,result){var node=self._getTreeNode(parentValues,value);result.push({id:node.id,pId:node.pId,text:node.text,value:node.value,title:node.title,isParent:node.getChildrenLength()>0,open:isOpen,checked:checked,halfCheck:half,flag:flag})}function isHalf(parentValues,value){var find=findSelectedObj(parentValues);return null==find?null:BI.any(find,function(v,ob){if(v===value&&null!=ob&&!BI.isEmpty(ob))return!0})}function isAllSelected(parentValues,value){var find=findSelectedObj(parentValues);return null==find?null:BI.any(find,function(v,ob){if(v===value&&null!=ob&&BI.isEmpty(ob))return!0})}function isSelected(parentValues,value){var find=findSelectedObj(parentValues);return null!=find&&BI.any(find,function(v){if(v===value)return!0})}function findSelectedObj(parentValues){var find=selectedValues;return null==find?null:(BI.every(parentValues,function(i,v){return find=find[v],null!=find}),find)}var self=this,result=[],keyword=op.keyword||"",selectedValues=op.selectedValues,lastSearchValue=op.lastSearchValue||"",output=search();BI.nextTick(function(){callback({hasNext:output.length>self._const.perPage,items:result,lastSearchValue:BI.last(output)})})},_reqTreeNode:function(op,callback){function judgeState(parentValues,selected_value,checkState){var checked=checkState.checked,half=checkState.half;return!(parentValues.length>0&&!checked)&&(0===parentValues.length||checked&&half&&!BI.isEmpty(selected_value))}function dealWithSelectedValue(parentValues,selectedValues){var valueMap={};return BI.each(parentValues,function(i,v){selectedValues=selectedValues[v]||{}}),BI.each(selectedValues,function(value,obj){if(BI.isNull(obj))return void(valueMap[value]=[0,0]);if(BI.isEmpty(obj))return void(val
BI.history){var navigate=BI.history.navigate;BI.history.navigate=function(){navigate.apply(this,arguments),BI.defer(function(){additionFunc()},200)};var back=window.history.back;window.history.back=function(){back.apply(this,arguments),BI.defer(function(){additionFunc()},200)}}if(BI.Router){var execute=BI.Router.prototype.execute;BI.Router.prototype.execute=function(){execute.apply(this,arguments),additionFunc()}}_.each(["each","map","reduce","reduceRight","find","filter","reject","every","all","some","any","max","min","sortBy","groupBy","indexBy","countBy","partition","keys","allKeys","values","pairs","invert","mapObject","findKey","pick","omit","tap"],function(name){var old=BI[name];BI[name]=function(obj,fn,context){return"function"==typeof fn?old(obj,function(key,value){if(!(key in Fix.$$skipArray))return fn.apply(this,arguments)},context):old.apply(this,arguments)}}),BI.isEmpty=function(ob){return BI.isPlainObject(ob)&&ob.__ob__?0===BI.keys(ob).length:_.isEmpty(ob)},BI.keys=function(ob){for(var keys=_.keys(ob),nKeys=[],i=0;i<keys.length;i++)keys[i]in Fix.$$skipArray||nKeys.push(keys[i]);return nKeys},BI.values=function(ob){for(var keys=BI.keys(obj),length=keys.length,values=[],i=0;i<length;i++)values[i]=obj[keys[i]];return values},BI.extend=function(){var args=Array.prototype.slice.call(arguments);if(args.length<1)return{};for(var object=args[0],i=1;i<args.length;)BI.each(args[i],function(key,v){object[key]=v}),i++;return object},BI.size=function(ob){return BI.isPlainObject(ob)&&ob.__ob__?BI.keys(ob).length:_.size(ob)},BI.isEmptyObject=function(ob){return 0===BI.size(ob)},BI.deepClone=function(ob){return Fix.toJSON(ob)},Fix.set=function(obj,k,v){try{obj&&(obj[k]=v)}catch(e){}finally{return _.cloneDeep(obj)}},Fix.del=function(obj,k){try{delete obj[k]}catch(e){}finally{return _.cloneDeep(obj)}},BI.watch=Fix.watch}(),function(){var Events={on:function(name,callback,context){if(!eventsApi(this,"on",name,[callback,context])||!callback)return this;this._events||(this._events={});var events=this._events[name]||(this._events[name]=[]);return events.push({callback:callback,context:context,ctx:context||this}),this},once:function(name,callback,context){if(!eventsApi(this,"once",name,[callback,context])||!callback)return this;var self=this,once=_.once(function(){self.off(name,once),callback.apply(this,arguments)});return once._callback=callback,this.on(name,once,context)},off:function(name,callback,context){if(!this._events||!eventsApi(this,"off",name,[callback,context]))return this;if(!name&&!callback&&!context)return this._events=void 0,this;for(var names=name?[name]:_.keys(this._events),i=0,length=names.length;i<length;i++){name=names[i];var events=this._events[name];if(events)if(callback||context){for(var remaining=[],j=0,k=events.length;j<k;j++){var event=events[j];(callback&&callback!==event.callback&&callback!==event.callback._callback||context&&context!==event.context)&&remaining.push(event)}remaining.length?this._events[name]=remaining:delete this._events[name]}else delete this._events[name]}return this},un:function(){this.off.apply(this,arguments)},trigger:function(name){if(!this._events)return this;var args=slice.call(arguments,1);if(!eventsApi(this,"trigger",name,args))return this;var events=this._events[name],allEvents=this._events.all;return events&&triggerEvents(events,args),allEvents&&triggerEvents(allEvents,arguments),this},fireEvent:function(){this.trigger.apply(this,arguments)},listenTo:function(obj,name,callback){var listeningTo=this._listeningTo||(this._listeningTo={}),id=obj._listenId||(obj._listenId=_.uniqueId("l"));return listeningTo[id]=obj,callback||"object"!=typeof name||(callback=this),obj.on(name,callback,this),this},listenToOnce:function(obj,name,callback){if("object"==typeof name){for(var event in name)this.listenToOnce(obj,event,name[event]);return this}if(eventSplitter.test(name)){for(var names=name.split(eventSplitter),i=0,length=names.length;i<length;i++)this.listenToOnce(obj,names[i],callback);return this}if(!callback)return this;var once=_.once(function(){this.stopListening(obj,name,once),ca
!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)if(Object.prototype.hasOwnProperty.call(e,o)){var u=n?Object.getOwnPropertyDescriptor(e,o):null;u&&(u.get||u.set)?Object.defineProperty(r,o,u):r[o]=e[o]}r["default"]=e,t&&t.set(e,r);return r}(r(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){return function(e){function t(){return e.apply(this,arguments)||this}return c(t,e),t.prototype._store=function(){var e=n.props?n.props.apply(this):undefined;return BI.Models.getModel(r.xtype,e)},t}(e)}},t.Model=void 0;var n=function(o){function e(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return i(u(e=o.call.apply(o,[this].concat(r))||this),"model",void 0),i(u(e),"store",void 0),i(u(e),"context",void 0),i(u(e),"actions",void 0),i(u(e),"childContext",void 0),i(u(e),"TYPE",void 0),i(u(e),"computed",void 0),e}return c(e,o),e.prototype.state=function(){return{}},e}(Fix.Model);t.Model=n}});